comparison UI/UiGame.cpp @ 2069:259df09dfb50

32bits almost there
author Nomad
date Tue, 03 Dec 2013 20:18:17 +0200
parents 28cb79ae2f6f
children 4231fdf46dde
comparison
equal deleted inserted replaced
2061:b2a434d65344 2069:259df09dfb50
228 else 228 else
229 { 229 {
230 v11 = pTmpBuf.data(); 230 v11 = pTmpBuf.data();
231 strcpy(pTmpBuf.data(), pNPC->pName); 231 strcpy(pTmpBuf.data(), pNPC->pName);
232 } 232 }
233 popup_window.DrawTitleText(pFontArrus, 0, 12, TargetColor(0xFFu, 0xFFu, 0x9Bu), v11, 3); 233 popup_window.DrawTitleText(pFontArrus, 0, 12, Color16(0xFFu, 0xFFu, 0x9Bu), v11, 3);
234 popup_window.uFrameWidth -= 24; 234 popup_window.uFrameWidth -= 24;
235 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; 235 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1;
236 popup_window.DrawText(pFontArrus, 100, 36, 0, BuildDialogueString((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0), 0, 0, 0); 236 popup_window.DrawText(pFontArrus, 100, 36, 0, BuildDialogueString((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0), 0, 0, 0);
237 } 237 }
238 } 238 }
1820 int uHeight; // ebx@6 1820 int uHeight; // ebx@6
1821 unsigned int pW; // ebx@23 1821 unsigned int pW; // ebx@23
1822 int v15; // eax@23 1822 int v15; // eax@23
1823 double v20; // st7@30 1823 double v20; // st7@30
1824 signed int v27; // eax@37 1824 signed int v27; // eax@37
1825 unsigned __int16 *v28; // ecx@37 1825 //unsigned __int16 *v28; // ecx@37
1826 signed int v29; // edi@40 1826 signed int v29; // edi@40
1827 int pPoint_X; // edi@72 1827 int pPoint_X; // edi@72
1828 int pPoint_Y; // ebx@72 1828 int pPoint_Y; // ebx@72
1829 unsigned int lPitch; // [sp+20h] [bp-34h]@1 1829 unsigned int lPitch; // [sp+20h] [bp-34h]@1
1830 unsigned int pY; // [sp+20h] [bp-34h]@23 1830 unsigned int pY; // [sp+20h] [bp-34h]@23
1886 uWb = uWb - (double)(uHeight / 8); 1886 uWb = uWb - (double)(uHeight / 8);
1887 } 1887 }
1888 break; 1888 break;
1889 default: assert(false); 1889 default: assert(false);
1890 } 1890 }
1891
1892 static unsigned __int16 pOdmMinimap[117][137];
1891 assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short)); 1893 assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short));
1892 1894
1893 v70 = floorf(v20 * 65536.0 + 0.5f);//LODWORD(v24); 1895 v70 = floorf(v20 * 65536.0 + 0.5f);//LODWORD(v24);
1894 uBluea = floorf(uWb * 65536.0 + 0.5f);//LODWORD(v25); 1896 uBluea = floorf(uWb * 65536.0 + 0.5f);//LODWORD(v25);
1895 v27 = uBluea >> 16; 1897 v27 = uBluea >> 16;
1896 v28 = &pRenderer->pTargetSurface[uX + uY * lPitch]; 1898 //v28 = &pRenderer->pTargetSurface[uX + uY * lPitch];
1899
1897 if (pMapLod0 && bRedrawOdmMinimap) 1900 if (pMapLod0 && bRedrawOdmMinimap)
1898 { 1901 {
1899 assert(uWidth == 137 && uHeight == 117); 1902 assert(uWidth == 137 && uHeight == 117);
1900 //auto pMinimap = (unsigned __int16 *)pOdmMinimap; 1903 //auto pMinimap = (unsigned __int16 *)pOdmMinimap;
1901 1904
1902 ushort mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth; 1905 ushort mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
1903 1906
1904 v29 = v70 >> 16; 1907 v29 = v70 >> 16;
1908 for (int y = 0; y < uHeight; ++y)
1909 {
1910 uchar* pMapLod0Line = &pMapLod0[v27 * mapWidth];
1911 for (int x = 0; x < uWidth; ++x)
1912 {
1913 //*pMinimap++ = pPal[pMapLod0Line[v29]];
1914 pRenderer->WritePixel16(uX + x, uY + y, pPal[pMapLod0Line[v29]]);
1915 v29 = (v70 + x * v73) >> 16;
1916 }
1917 }
1918
1919 /*v29 = v70 >> 16;
1905 for (int y = 0; y < uHeight; ++y) 1920 for (int y = 0; y < uHeight; ++y)
1906 { 1921 {
1907 uchar* pMapLod0Line = &pMapLod0[v27 * mapWidth]; 1922 uchar* pMapLod0Line = &pMapLod0[v27 * mapWidth];
1908 for (int x = 0; x < uWidth; ++x) 1923 for (int x = 0; x < uWidth; ++x)
1909 { 1924 {
1913 } 1928 }
1914 v29 = v70 >> 16; 1929 v29 = v70 >> 16;
1915 v28 += 137 - uWidth; 1930 v28 += 137 - uWidth;
1916 uBluea += v73; 1931 uBluea += v73;
1917 v27 = uBluea >> 16; 1932 v27 = uBluea >> 16;
1918 } 1933 }*/
1919 } 1934 }
1920 1935
1921 for (int y = 0; y < 117; ++y) 1936 /*for (int y = 0; y < 117; ++y)
1922 { 1937 {
1923 for (int x = 0; x < 137; ++x) 1938 for (int x = 0; x < 137; ++x)
1924 { 1939 {
1925 *v28++ = pOdmMinimap[y][x]; 1940 *v28++ = pOdmMinimap[y][x];
1926 } 1941 }
1927 v28 += lPitch - 137; 1942 v28 += lPitch - 137;
1928 } 1943 }*/
1929 uNumBlueFacesInBLVMinimap = 0; 1944 uNumBlueFacesInBLVMinimap = 0;
1930 } 1945 }
1931 else// uCurrentlyLoadedLevelType == LEVEL_Indoor 1946 else// uCurrentlyLoadedLevelType == LEVEL_Indoor
1932 { 1947 {
1933 pRenderer->FillRectFast(uX, uY, uZ - uX, uHeight, 0xF); 1948 pRenderer->FillRectFast(uX, uY, uZ - uX, uHeight, 0xF);
2212 else//Red( current_pos < 1/4 ) 2227 else//Red( current_pos < 1/4 )
2213 R = 255, G = 0, B = 0; 2228 R = 255, G = 0, B = 0;
2214 } 2229 }
2215 else//Green 2230 else//Green
2216 R = 0, G = 255, B = 0; 2231 R = 0, G = 255, B = 0;
2217 return TargetColor(R, G, B); 2232 return Color16(R, G, B);
2218 } 2233 }
2219 2234
2220 //----- (00417939) -------------------------------------------------------- 2235 //----- (00417939) --------------------------------------------------------
2221 int GetConditionDrawColor(unsigned int uConditionIdx) 2236 int GetConditionDrawColor(unsigned int uConditionIdx)
2222 { 2237 {