diff mm7_4.cpp @ 55:663d5bf032d9

Слияние
author Ritor1
date Wed, 24 Oct 2012 17:55:45 +0600
parents c28452924144 4211cceb3813
children 30ec77bbd018 5ec98919c8fd
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Oct 24 17:54:35 2012 +0600
+++ b/mm7_4.cpp	Wed Oct 24 17:55:45 2012 +0600
@@ -7288,11 +7288,12 @@
         v1 = pRenderer->pTargetSurface;
         v2 = Dst.lpSurface;
 
+
         for (uint y = 0; y < 480; ++y)
         {
           auto pDst = (unsigned short *)((char *)Dst.lpSurface + y * Dst.lPitch);
           for (uint x = 0; x < 640; ++x)
-            pDst[x] = pRenderer->uTargetGMask | pRenderer->uTargetBMask;
+            pDst[x] = pRenderer->uTargetRMask | pRenderer->uTargetBMask;
         }
         
         auto pSrc = pRenderer->pTargetSurface;
@@ -15066,10 +15067,10 @@
   SpriteFrame *v10; // ebx@18
   int *v11; // eax@18
   int v12; // ecx@28
-  IndoorCameraD3D **v14; // eax@36
+  //IndoorCameraD3D **v14; // eax@36
   double v15; // st7@36
   float v16; // eax@36
-  double v17; // ST30_8@36
+  //double v17; // ST30_8@36
   signed __int64 v18; // qtt@36
   int v19; // ST5C_4@36
   signed __int64 v20; // qtt@37
@@ -15079,8 +15080,8 @@
   signed int v24; // ecx@40
   int v25; // edx@44
   __int16 v26; // ax@44
-  MonsterDesc *v27; // edx@44
-  int v28; // ecx@44
+  //MonsterDesc *v27; // edx@44
+  //int v28; // ecx@44
   unsigned __int8 v29; // zf@44
   unsigned __int8 v30; // sf@44
   unsigned int v31; // [sp-8h] [bp-5Ch]@15
@@ -15138,7 +15139,7 @@
     if (p->pActorBuffs[5].uExpireTime > 0i64 || p->pActorBuffs[6].uExpireTime > 0i64 )
       v8 = 0;
     v31 = p->pSpriteIDs[v5];
-    if (p->uAIState == 16 )
+    if (p->uAIState == Resurrected)
       v9 = pSpriteFrameTable->GetFrameBy_x(v31, v8);
     else
       v9 = pSpriteFrameTable->GetFrame(v31, v8);
@@ -15169,13 +15170,13 @@
         v11);
     }
     v12 = 0;
-    if ( pStru170->field_53730 <= 0 )
+    if ( pStru170->uNumVisibleNotEmptySectors <= 0 )
       continue;
-    while (pStru170->pSectorIDs_toDrawDecorationsFrom[v12] != p->uSectorID)
+    while (pStru170->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v12] != p->uSectorID)
     {
       ++v12;
-      if ( v12 >= pStru170->field_53730 )
-        continue;
+      if ( v12 >= pStru170->uNumVisibleNotEmptySectors )
+        goto _continue;
     }
     if ( !pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(a1a, a2, a3, &x, &y, &z, 1)
       || (v0 = (RenderBillboard *)abs(x), (signed int)v0 < abs(y)) )
@@ -15202,14 +15203,14 @@
     }
     else
     {
-      v14 = &pGame->pIndoorCameraD3D;
+      //v14 = &pGame->pIndoorCameraD3D;
       v0->flt_8 = pGame->pIndoorCameraD3D->flt_D0;
-      v15 = (*v14)->flt_D4;
+      v15 = pGame->pIndoorCameraD3D->flt_D4;
       v16 = v0->flt_8;
       v0->flt_C = v15;
-      v17 = v16 + 6.7553994e15;
+      //v17 = v16 + 6.7553994e15;
       LODWORD(v18) = 0;
-      HIDWORD(v18) = SLOWORD(v17);
+      HIDWORD(v18) = floorf(v16 + 0.5f);
       v19 = v18 / x;
       v0->field_0 = (unsigned __int64)(v10->scale * v18 / x) >> 16;
       a5a = (unsigned __int64)(v10->scale * (signed __int64)v19) >> 16;
@@ -15247,18 +15248,21 @@
     LOWORD(v25) = 0;
     LOBYTE(v26) = v41;
     v0->sZValue = v25 + (8 * i | 3);
-    v27 = pMonsterList->pMonsters;
-    v28 = p->pMonsterInfo.uID;
+    //v27 = pMonsterList->pMonsters;
+    //v28 = p->pMonsterInfo.uID;
     v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0;
     v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0;
     v0->field_1E = v41;
     v0->pSpriteFrame = v10;
-    v0->uTintColor = *((_DWORD *)&v27[v28] - 36);
+    v0->uTintColor = pMonsterList->pMonsters[p->pMonsterInfo.uID - 1].uTintColor;
     if ( !v30 && (!(v30 | v29) || LODWORD(p->pActorBuffs[5].uExpireTime)) )
     {
       HIBYTE(v26) = HIBYTE(v41) | 1;
       v0->field_1E = v26;
     }
+    
+_continue:
+    ;
   }
 }