diff mm7_3.cpp @ 109:62772029b56d

Слияние
author Ritor1
date Tue, 06 Nov 2012 10:07:35 +0600
parents ccc0cf95706a 142de719a3ea
children 8e802a11b20d
line wrap: on
line diff
--- a/mm7_3.cpp	Tue Nov 06 10:06:45 2012 +0600
+++ b/mm7_3.cpp	Tue Nov 06 10:07:35 2012 +0600
@@ -2443,7 +2443,7 @@
     pParty->bFlying = 0;
     __debugbreak();
     if (pParty->FlyActive())
-      stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing]
+      stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing]
   }
   if ( v80 == -30000 )
   {
@@ -3162,7 +3162,7 @@
   {
     LOBYTE(pParty->uFlags) &= 0x7Fu;
     bWaterWalk = 1;
-    *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
+    *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
     if ( !(pParty->pPartyBuffs[18].uFlags & 1)
       && *(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 )
       bWaterWalk = 0;
@@ -3553,7 +3553,7 @@
         v123 = v113;
       if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0
         && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) )
-        stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu;
+        stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu;
       pParty->uFallStartY = v123;
       goto LABEL_141;
     }
@@ -3568,7 +3568,7 @@
   v113 = v123;
   if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0
     && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) )
-    stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;
+    stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;
 LABEL_141:
   v32 = 0;
   if ( bJumping && !pParty->bFlying )
@@ -4052,7 +4052,7 @@
     {
       LOBYTE(pParty->uFlags) &= 0x7Fu;
       v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178;
-      *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
+      *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
       if ( !v122 || !v69 )
       {
         if ( !v76 )
@@ -8313,15 +8313,15 @@
   int v2; // ebx@3
   unsigned int v3; // eax@3
   MapInfo *v4; // edi@4
-  int v5; // eax@8
-  SpawnPointMM7 *v6; // edx@14
+  //int v5; // eax@8
+  //SpawnPointMM7 *v6; // edx@14
   size_t v7; // eax@19
   char *v8; // eax@19
   char *v9; // eax@21
   char Source[120]; // [sp+Ch] [bp-84h]@19
   const char *pFilename; // [sp+84h] [bp-Ch]@1
-  unsigned int v12; // [sp+88h] [bp-8h]@12
-  int v13; // [sp+8Ch] [bp-4h]@11
+  //unsigned int v12; // [sp+88h] [bp-8h]@12
+  //int v13; // [sp+8Ch] [bp-4h]@11
 
   pFilename = pLevelFilename;
   thisa->AllocSoftwareDrawBuffers();
@@ -8352,32 +8352,33 @@
     (int)&thisa);
   if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x20) )
   {
-    UpdateActors();
-    UpdateLayingItems();
+    InitializeActors();
+    InitializeLayingItems();
   }
   BYTE1(dword_6BE364_game_settings_1) &= 0xDFu;
-  v5 = 0;
+  //v5 = 0;
   if ( !v2 )
     thisa = 0;
   if ( thisa == (OutdoorCamera *)1 )
   {
-    v13 = 0;
-    if ( (signed int)pOutdoor->uNumSpawnPoints > 0 )
-    {
-      v12 = 0;
-      while ( 1 )
-      {
-        v6 = &pOutdoor->pSpawnPoints[v12 / 0x18];
-        if ( pOutdoor->pSpawnPoints[v12 / 0x18].uKind == 3 )
-          SpawnEncounter(v4, v6, v5, v5, v5);
-        else
-          v4->SpawnRandomTreasure(v6);
-        ++v13;
-        v12 += 24;
-        if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints )
-          break;
-        v5 = 0;
-      }
+    //v13 = 0;
+    for (uint i = 0; i < pOutdoor->uNumSpawnPoints; ++i)
+    {
+      //v12 = 0;
+      //while ( 1 )
+      //{
+      auto spawn = pOutdoor->pSpawnPoints + i;
+        //v6 = &pOutdoor->pSpawnPoints[v12 / 0x18];
+      if (spawn->uKind == 3 )
+        SpawnEncounter(v4, spawn, 0, 0, 0);
+      else
+        v4->SpawnRandomTreasure(spawn);
+        //++v13;
+        //v12 += 24;
+        //if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints )
+        //  break;
+        //v5 = 0;
+      //}
     }
     RespawnGlobalDecorations();
   }
@@ -12906,8 +12907,6 @@
 //----- (0043F9E1) --------------------------------------------------------
 void stru170_stru2::_43F9E1(__int16 x, int y, __int16 z, int w)
 {
-  __debugbreak();
-
   _viewport_space_y = y;
   _viewport_space_w = w;
 
@@ -17271,12 +17270,12 @@
             v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8);
             if ( v25 )
             {
-              stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = _evt->v5 - 124;
+              stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = _evt->v5 - 124;
             }
             else
             {
               v26 = _5C3420_pDecoration;
-              stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = 0;
+              stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = 0;
               LOBYTE(v26->field_2) |= 0x20u;
             }
             goto LABEL_291;