diff UI/UiGame.cpp @ 2069:259df09dfb50

32bits almost there
author Nomad
date Tue, 03 Dec 2013 20:18:17 +0200
parents 28cb79ae2f6f
children 4231fdf46dde
line wrap: on
line diff
--- a/UI/UiGame.cpp	Mon Dec 02 15:13:49 2013 +0200
+++ b/UI/UiGame.cpp	Tue Dec 03 20:18:17 2013 +0200
@@ -230,7 +230,7 @@
           v11 = pTmpBuf.data();
           strcpy(pTmpBuf.data(), pNPC->pName);
         }
-        popup_window.DrawTitleText(pFontArrus, 0, 12, TargetColor(0xFFu, 0xFFu, 0x9Bu), v11, 3);
+        popup_window.DrawTitleText(pFontArrus, 0, 12, Color16(0xFFu, 0xFFu, 0x9Bu), v11, 3);
         popup_window.uFrameWidth -= 24;
         popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1;
         popup_window.DrawText(pFontArrus, 100, 36, 0, BuildDialogueString((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0), 0, 0, 0);
@@ -1822,7 +1822,7 @@
   int v15; // eax@23
   double v20; // st7@30
   signed int v27; // eax@37
-  unsigned __int16 *v28; // ecx@37
+  //unsigned __int16 *v28; // ecx@37
   signed int v29; // edi@40
   int pPoint_X; // edi@72
   int pPoint_Y; // ebx@72
@@ -1888,12 +1888,15 @@
       break;
       default: assert(false);
     }
+
+    static unsigned __int16 pOdmMinimap[117][137];
     assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short));
 
     v70 = floorf(v20 * 65536.0 + 0.5f);//LODWORD(v24);
     uBluea = floorf(uWb * 65536.0 + 0.5f);//LODWORD(v25);
     v27 = uBluea >> 16;
-    v28 = &pRenderer->pTargetSurface[uX + uY * lPitch];
+    //v28 = &pRenderer->pTargetSurface[uX + uY * lPitch];
+
     if (pMapLod0 && bRedrawOdmMinimap)
     {
       assert(uWidth == 137 && uHeight == 117);
@@ -1908,6 +1911,18 @@
         for (int x = 0; x < uWidth; ++x)
         {
           //*pMinimap++ = pPal[pMapLod0Line[v29]];
+          pRenderer->WritePixel16(uX + x, uY + y, pPal[pMapLod0Line[v29]]);
+          v29 = (v70 + x * v73) >> 16;
+        }
+      }
+
+      /*v29 = v70 >> 16;
+      for (int y = 0; y < uHeight; ++y)
+      {
+        uchar* pMapLod0Line = &pMapLod0[v27 * mapWidth];
+        for (int x = 0; x < uWidth; ++x)
+        {
+          //*pMinimap++ = pPal[pMapLod0Line[v29]];
           pOdmMinimap[y][x] = pPal[pMapLod0Line[v29]];
           v29 = (v70 + x * v73) >> 16;
         }
@@ -1915,17 +1930,17 @@
         v28 += 137 - uWidth;
         uBluea += v73;
         v27 = uBluea >> 16;
-      }
+      }*/
     }
 
-    for (int y = 0; y < 117; ++y)
+    /*for (int y = 0; y < 117; ++y)
     {
       for (int x = 0; x < 137; ++x)
       {
         *v28++ = pOdmMinimap[y][x];
       }
       v28 += lPitch - 137;
-    }
+    }*/
     uNumBlueFacesInBLVMinimap = 0;
   }
   else// uCurrentlyLoadedLevelType == LEVEL_Indoor
@@ -2214,7 +2229,7 @@
   }
   else//Green
     R = 0, G = 255, B = 0;
-  return TargetColor(R, G, B);
+  return Color16(R, G, B);
 }
 
 //----- (00417939) --------------------------------------------------------