changeset 33:a9e9c6989d04

20.01.13
author Ritor1
date Sun, 20 Jan 2013 18:57:23 +0600
parents 4c90ae1041aa
children bf67f3164041
files Actor.cpp Autonotes.h LOD.h Outdoor.cpp ParticleEngine.cpp Render.cpp mm7_1.cpp mm7_3.cpp mm7_4.cpp mm7_data.cpp
diffstat 10 files changed, 26 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Sat Jan 19 22:26:31 2013 +0600
+++ b/Actor.cpp	Sun Jan 20 18:57:23 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	Sat Jan 19 22:26:31 2013 +0600
+++ b/Autonotes.h	Sun Jan 20 18:57:23 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	Sat Jan 19 22:26:31 2013 +0600
+++ b/LOD.h	Sun Jan 20 18:57:23 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	Sat Jan 19 22:26:31 2013 +0600
+++ b/Outdoor.cpp	Sun Jan 20 18:57:23 2013 +0600
@@ -102,7 +102,7 @@
 //LABEL_14:
     pRenderer->DrawSkyD3D();
     pRenderer->DrawBuildingsD3D();
-    pRenderer->DrawBezierTerrain();
+    //pRenderer->DrawBezierTerrain();
     goto LABEL_16;
   }
   pRenderer->DrawBuildingsSW();
--- a/ParticleEngine.cpp	Sat Jan 19 22:26:31 2013 +0600
+++ b/ParticleEngine.cpp	Sun Jan 20 18:57:23 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	Sat Jan 19 22:26:31 2013 +0600
+++ b/Render.cpp	Sun Jan 20 18:57:23 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();
   }
@@ -11096,7 +11096,7 @@
     if (p->uOpacity != RenderBillboardD3D::InvalidOpacity)
       SetBillboardBlendOptions(p->uOpacity);
     
-    ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, p->pTexture));
+    //ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, p->pTexture));
     ErrD3D(pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1,
         p->pQuards, p->uNumVertices, D3DDP_DONOTLIGHT | D3DDP_DONOTUPDATEEXTENTS));
   }
--- a/mm7_1.cpp	Sat Jan 19 22:26:31 2013 +0600
+++ b/mm7_1.cpp	Sun Jan 20 18:57:23 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	Sat Jan 19 22:26:31 2013 +0600
+++ b/mm7_3.cpp	Sun Jan 20 18:57:23 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) )
--- a/mm7_4.cpp	Sat Jan 19 22:26:31 2013 +0600
+++ b/mm7_4.cpp	Sun Jan 20 18:57:23 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;
@@ -9675,7 +9675,7 @@
   sub_44A56A();
   if ( pParty->pHirelings[0].pName )
   {
-    memcpy(&pParty->pHirelings[1], v2, sizeof(pParty->pHirelings[1]));
+    memcpy(&pParty->pHirelings[1], v2, sizeof(pParty->pHirelings[1]));//Ritor1: unknow
     v24 = v2->pName;
     v22 = pParty->pHireling2Name;
   }
--- a/mm7_data.cpp	Sat Jan 19 22:26:31 2013 +0600
+++ b/mm7_data.cpp	Sun Jan 20 18:57:23 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];