changeset 36:415e1f2d5936

Слияние
author Ritor1
date Sun, 20 Jan 2013 20:04:18 +0600
parents aac67e0d2c10 (diff) 8aa7e4a303c9 (current diff)
children 979f13f456dc
files Vis.cpp
diffstat 10 files changed, 32 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/Actor.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -4078,7 +4078,7 @@
   //while ( v10 );
   uActorHeight = v3->uMonsterHeight;
   uActorRadius = v3->uMonsterRadius;
-  uMovementSpeed = LOWORD(v9->uBaseSpeed);
+  uMovementSpeed = v9->uBaseSpeed;
   if ( !(load_sounds_if_bit1_set & 1) )
   {
     v5 = pSoundSampleIDs;
--- a/Autonotes.h	Sun Jan 20 13:49:07 2013 +0000
+++ b/Autonotes.h	Sun Jan 20 20:04:18 2013 +0600
@@ -22,5 +22,5 @@
   enum AUTONOTE_TYPE eType;
 };
 #pragma pack(pop)
-extern Autonote stru_723720[195]; // weak
+extern Autonote pAutonoteTxt[195]; // weak
 
--- a/LOD.h	Sun Jan 20 13:49:07 2013 +0000
+++ b/LOD.h	Sun Jan 20 20:04:18 2013 +0600
@@ -183,7 +183,7 @@
   int uTextureBlueBits;
   int uNumPrevLoadedFiles;
   int uTexturePacksCount;
-  int dword_011BA0;
+  int pFacesLock;
   int dword_011BA4;
   int dword_011BA8;
   struct IDirectDrawSurface **pHardwareSurfaces;
--- a/Outdoor.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/Outdoor.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -102,7 +102,7 @@
 //LABEL_14:
     pRenderer->DrawSkyD3D();
     pRenderer->DrawBuildingsD3D();
-    pRenderer->DrawBezierTerrain();
+    //pRenderer->DrawBezierTerrain();
     goto LABEL_16;
   }
   pRenderer->DrawBuildingsSW();
--- a/ParticleEngine.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/ParticleEngine.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -518,7 +518,7 @@
           + ((unsigned __int64)(v45 * (signed __int64)v3) >> 16);
       if ( X_4 < 262144 )
         return 0;
-      v16 = ((unsigned __int64)(v47 * (signed __int64)v4) >> 16) - v43;
+      v16 = ((unsigned __int64)(v47 * (signed __int64)v4) >> 16); //- v43;Ritor1:it's temporarily
       v17 = ((unsigned __int64)(uIDa * (signed __int64)v3) >> 16)
           - ((unsigned __int64)(v45 * (signed __int64)v44) >> 16);
     }
@@ -726,7 +726,7 @@
   v14.uParentBillboardID = -1;
   v1 = this;
   v2 = this->uStartParticle;
-  v5 = __OFSUB__(v2, this->uEndParticle);
+  v5 = v2 > this->uEndParticle;//  v5 = __OFSUB__(v2, this->uEndParticle);
   v3 = v2 == this->uEndParticle;
   v4 = v2 - this->uEndParticle < 0;
   v16 = this->uStartParticle;
@@ -837,7 +837,7 @@
       }
       v7 += 104;
       v2 = v16 + 1;
-      v5 = __OFSUB__(v16 + 1, v1->uEndParticle);
+      v5 = v16 + 1 > v1->uEndParticle;// v5 = __OFSUB__(v16 + 1, v1->uEndParticle);
       v3 = v16 + 1 == v1->uEndParticle;
       v4 = v16++ + 1 - v1->uEndParticle < 0;
     }
--- a/Render.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/Render.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -7083,7 +7083,7 @@
   if (pRenderD3D)
   {
     pGame->draw_debug_outlines();
-    //DoRenderBillboards_D3D(); Ritor1: it's temporarily
+    //DoRenderBillboards_D3D(); //Ritor1: it's temporarily
     pGame->pStru6Instance->RenderSpecialEffects();
     pRenderD3D->pDevice->EndScene();
   }
--- a/mm7_1.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/mm7_1.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -4771,7 +4771,7 @@
       {
         v11 = (unsigned __int8)pTmpBuf[v2];
         v12 = &pNPCStats->pNPCData[v11 + 499];
-        if ( (unsigned __int8)pTmpBuf[v2] < 2u )
+        if ( (unsigned __int8)pTmpBuf[v2] < 2 )
           v12 = &pParty->pHirelings[v11];
         v13 = v12->uProfession;
         if ( v13 )
--- a/mm7_3.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/mm7_3.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -5039,7 +5039,7 @@
   pAutonoteTXT_Raw = 0;
   pAutonoteTXT_Raw = (char *)pEvents_LOD->LoadRaw("autonote.txt", 0);
   strtok(pAutonoteTXT_Raw, "\r");
-  v0 = (char *)&stru_723720[0].eType;
+  v0 = (char *)&pAutonoteTxt[0].eType;
   for (uint i = 0; i < 195; ++i)
   {
     v1 = 0;
@@ -13926,9 +13926,7 @@
   {
     //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]];
     auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]];
-    pRenderer->Line2D(
-      uCenterX
-    + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
+    pRenderer->Line2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
                                                      * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16)
                   - uZoom * pParty->vPosition.x) >> 16),
       uCenterY
@@ -13999,9 +13997,7 @@
   }
   v35 = v57;
 LABEL_66:
-  pRenderer->DrawTextureTransparent(
-    uCenterX - 3,
-    uCenterY - 3,
+  pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3,
     (Texture *)(pTextureIDs_pMapDirs[v35] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v35]] : 0));
   v36 = 255;
   flagsb = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0xFFu);
@@ -14168,17 +14164,11 @@
     while ( uZg < (signed int)uNumLevelDecorations );
     v33 = 0;
   }
-  pRenderer->DrawTextureTransparent(
-    0x1D4u,
-    v33,
-    (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0));
+  pRenderer->DrawTextureTransparent(0x1D4u, v33, (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0));
   uZooma = (double)pParty->sRotationY * 0.1171875;
   v50 = uZooma + 6.7553994e15;
   pRenderer->Clip(0x21Du, v33, 0x237u, 0x1E0u);
-  pRenderer->DrawTextureIndexed(
-    LODWORD(v50) + 285,
-    0x88u,
-    (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0));
+  pRenderer->DrawTextureIndexed(LODWORD(v50) + 285, 0x88u, (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0));
   pRenderer->ResetClip();
 }
 
@@ -18154,14 +18144,14 @@
               ptr_507BC0->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
             }
             goto LABEL_291;
-          default:
-            goto LABEL_291;
           case EVENT_PressAnyKey:
             v121 = 33;
             v105 = v122 + 1;
             goto LABEL_295;
           case EVENT_Exit:
             goto LABEL_301;
+          default:
+            goto LABEL_291;
         }
       }
       //++v4;
@@ -18618,7 +18608,7 @@
                 v8 = (v9 & 0x7E900) + 86400;
               }
             }
-            v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);
+            v10 = v7 + *((int *)v4 - 3) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);//v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);
             *((int *)v4 - 3) = v10;
             *((int *)v4 - 2) = HIDWORD(v10);
             if ( HIDWORD(v10) <= v3 && (HIDWORD(v10) < v3 || *((int *)v4 - 3) < v2) )
@@ -18679,7 +18669,7 @@
   unsigned int v10; // eax@1
   size_t v11; // ebx@2
   signed int v12; // esi@2
-  char *v13;//Actor_uYawAngle_cr *v13; // ebx@3
+  Actor *pActor;//Actor_uYawAngle_cr *v13; // ebx@3
   AIDirection a3; // [sp+Ch] [bp-50h]@2
   AIDirection v15; // [sp+28h] [bp-34h]@2
   //SpawnPointMM7 v16; // [sp+44h] [bp-18h]@1
@@ -18706,16 +18696,14 @@
     v12 = v11;
     if ( (signed int)v11 < (signed int)uNumActors )
     {
-      v13 = (char *)&pActors[v11].uYawAngle;
-      do
-      {
-        ((Actor *)((char *)v13 - 154))->PrepareSprites(0);
+      
+      for ( pActor = &pActors[v11]; v12 < (signed int)uNumActors; ++pActor )
+      {
+        pActor->PrepareSprites(0);
         ++v12;
-        *(short *)v13/*->uYawAngle*/ = LOWORD(v15.uYawAngle);
-        *(int *)(v13+666)/*->dword_000334_unique_name*/ = uUniqueName;
-        ++v13;
-      }
-      while ( v12 < (signed int)uNumActors );
+        pActor->uYawAngle = v15.uYawAngle;
+        pActor->dword_000334_unique_name = uUniqueName;
+      }
     }
   }
 }
--- a/mm7_4.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/mm7_4.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -2908,7 +2908,7 @@
   char *v3; // esi@5
   char *v4; // [sp+10h] [bp-4h]@1
 
-  pIcons_LOD->dword_011BA0 = pIcons_LOD->uNumLoadedFiles;
+  pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles;
 
   for (uint i = 0; i < 4; ++i)
     for (uint j = 0; j < 56; ++j)
@@ -3017,7 +3017,7 @@
   }
   while ( (signed int)v0 < (signed int)pParty->pHirelings );
   v6 = pIcons_LOD->uNumLoadedFiles - 1;
-  if ( v6 >= pIcons_LOD->dword_011BA0 )
+  if ( v6 >= pIcons_LOD->pFacesLock )
   {
     v7 = &pIcons_LOD->pTextures[v6];
     do
@@ -3046,10 +3046,10 @@
       --v6;
       --v7;
     }
-    while ( v6 >= pIcons_LOD->dword_011BA0 );
-  }
-  v12 = pIcons_LOD->dword_011BA0;
-  pIcons_LOD->dword_011BA0 = 0;
+    while ( v6 >= pIcons_LOD->pFacesLock );
+  }
+  v12 = pIcons_LOD->pFacesLock;
+  pIcons_LOD->pFacesLock = 0;
   pIcons_LOD->uNumLoadedFiles = v12;
 }
 // 4ED498: using guessed type char byte_4ED498;
--- a/mm7_data.cpp	Sun Jan 20 13:49:07 2013 +0000
+++ b/mm7_data.cpp	Sun Jan 20 20:04:18 2013 +0600
@@ -67,7 +67,7 @@
 stru287 stru_5E4C50;
 
 #include "Autonotes.h"
-Autonote stru_723720[195]; // weak
+Autonote pAutonoteTxt[195]; // weak
 
 #include "Awards.h"
 Award pAwards[104];