changeset 790:1e2be0f5eb30

Merge
author Nomad
date Sun, 24 Mar 2013 23:45:50 +0200
parents 83a58d185d3c (current diff) f004c7ceb7bd (diff)
children 346f7069676a
files mm7_1.cpp mm7_3.cpp mm7_data.cpp mm7_data.h
diffstat 6 files changed, 16 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/Events.cpp	Sun Mar 24 23:15:33 2013 +0200
+++ b/Events.cpp	Sun Mar 24 23:45:50 2013 +0200
@@ -1065,8 +1065,9 @@
 				v11 = (unsigned __int8)*(&_evt->v5 + rand() % ((_evt->v5 != 0) + (_evt->v6 != 0) + (_evt->v7 != 0) + (_evt->v8 != 0) + (_evt->v9 != 0)
 					+ (_evt->v10 != 0)));
                 curr_seq_num = v11 - 1;
-                   ++curr_seq_num;
-                   v4 = v124;
+                ++curr_seq_num;
+                v4 = v124;
+                break;
 			case EVENT_ReceiveDamage:
 				v85 = EVT_DWORD(_evt->v7 );
 				v86 = _evt->v5;
--- a/Indoor.cpp	Sun Mar 24 23:15:33 2013 +0200
+++ b/Indoor.cpp	Sun Mar 24 23:45:50 2013 +0200
@@ -3208,7 +3208,7 @@
                v59 = pVertices[pFace->pVertexIDs[0]].y >= sY;
 
                         //v21 = pFace->pVertexIDs + 1;
-               for (uint k = 1; k < pFace->uNumVertices; ++k)
+               for (uint k = 0; k < pFace->uNumVertices; k++)
                {
                  if (v54 >= 2)
                    break;
@@ -3218,10 +3218,10 @@
                           //v22 = pVertex->y;
                           //v47 = pVertex->y;
                  v50 = v2->y >= sY;
-                 if ( v59 ^ v50 )
+                 if ( v59 != v50 )
                  {
                             //v58 = &pVertices[pFace->pVertexIDs[k - 1]];
-                   auto v1 = &pVertices[pFace->pVertexIDs[k - 1]];
+                   auto v1 = &pVertices[pFace->pVertexIDs[k]];
                             //v23 = v58->x;
                             //HIWORD(v24) = HIWORD(v49);
                             //LOWORD(v24) = v49->x;
@@ -3259,7 +3259,7 @@
                         _a58 = v33 / (v2->y - v1->y);
                         _a59 = (unsigned __int64)(_a58 * (signed __int64)(sY - v1->y)) >> 16;
 
-                        if (_a59 + pVertices[k - 1].x > sX)
+                        if (_a59 + pVertices[k].x > sX)
                           ++v54;
                       }
                     }
--- a/mm7_1.cpp	Sun Mar 24 23:15:33 2013 +0200
+++ b/mm7_1.cpp	Sun Mar 24 23:45:50 2013 +0200
@@ -1164,7 +1164,7 @@
     }
     else
     {
-      if ( (v0 & 7) != OBJECT_BModel || (unsigned int)v0 >= 0x2000000 )
+      if ( (v0 & 7) != OBJECT_BModel || (signed)v0 >= 0x2000000 )
 	  {
           v4 = pParty->pPickedItem.uItemID;
           if ( !pParty->pPickedItem.uItemID )
--- a/mm7_3.cpp	Sun Mar 24 23:15:33 2013 +0200
+++ b/mm7_3.cpp	Sun Mar 24 23:45:50 2013 +0200
@@ -13522,29 +13522,15 @@
 }
 
 //----- (00448B67) --------------------------------------------------------
-void OnTimer(int a1)
-{
-  //int v1; // ebp@1
-  //unsigned int v2; // ebx@4
-  //unsigned int v3; // edi@4
-  //char *v4; // esi@6
-  //__int16 v5; // ax@8
-  //int v6; // ecx@10
-  //unsigned int v7; // ebp@12
-  //int v8; // eax@16
-  //int v9; // eax@19
-  //unsigned __int64 v10; // qax@20
-  //int v11; // ecx@24
-  //int v12; // [sp+Ch] [bp-10h]@5
-  unsigned int v13; // [sp+10h] [bp-Ch]@4
-  
+void OnTimer(int __unused)
+{
   if (pEventTimer->bPaused)
     return;
   
-  if (a1)
-    dword_5773C0 = 0;
+  if (__unused)
+    _5773C0_unused = 0;
   
-  v13 = (signed __int64)(pParty->uTimePlayed - _5773B8_event_timer) / 128;
+  auto v13 = (signed __int64)(pParty->uTimePlayed - _5773B8_event_timer) / 128;
   if (!v13)
     return;
 
--- a/mm7_data.cpp	Sun Mar 24 23:15:33 2013 +0200
+++ b/mm7_data.cpp	Sun Mar 24 23:45:50 2013 +0200
@@ -1640,7 +1640,7 @@
 int dword_576E28; // weak
 int dword_576E2C; // weak
 __int64 _5773B8_event_timer; // weak
-int dword_5773C0; // weak
+int _5773C0_unused; // weak
 
 
 int dword_591084; // weak
--- a/mm7_data.h	Sun Mar 24 23:15:33 2013 +0200
+++ b/mm7_data.h	Sun Mar 24 23:45:50 2013 +0200
@@ -1146,7 +1146,7 @@
 extern int dword_576E28; // weak
 extern int dword_576E2C; // weak
 extern __int64 _5773B8_event_timer; // weak
-extern int dword_5773C0; // weak
+extern int _5773C0_unused; // weak
 
 
 extern int dword_591084; // weak
@@ -1857,7 +1857,7 @@
 void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on);
 void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle);
 void __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb
-void OnTimer(int a1);
+void OnTimer(int);
 void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName);
 void __fastcall sub_448DF8_cast_spell(int spellnum, int rank, int level, int fromx, int fromy, int fromz, int tox, int toy, int toz);
 __int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2); // idb