diff mm7_4.cpp @ 1461:845907a747d3

Merge
author Gloval
date Wed, 21 Aug 2013 20:59:16 +0400
parents ff2118028c71 2ca62c9e7b3c
children 7ef4b64f6329
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Aug 21 20:58:36 2013 +0400
+++ b/mm7_4.cpp	Wed Aug 21 20:59:16 2013 +0400
@@ -47,7 +47,7 @@
 #include "Lights.h"
 
 //----- (0046CC4B) --------------------------------------------------------
-void __cdecl check_event_triggers()
+void check_event_triggers()
 {
   int v0; // eax@1
   LevelDecoration *v1; // esi@2
@@ -90,9 +90,9 @@
   signed int v38; // [sp+20h] [bp-4h]@24
 
   v0 = 0;
-  for ( i = 0; i < _6836C8_num_decorations_6807E8; ++i )
+  for ( i = 0; i < num_event_triggers; ++i )
   {
-    v1 = &pLevelDecorations[_6807E8_level_decorations_ids[v0]];
+    v1 = &pLevelDecorations[event_triggers[v0]];
     v2 = v1->field_18;
     v3 = v1->vPosition.y;
     v33 = v1->vPosition.x;
@@ -440,7 +440,7 @@
 }
 
 //----- (0046E0B2) --------------------------------------------------------
-void __cdecl _46E0B2_collide_against_decorations()
+void  _46E0B2_collide_against_decorations()
 {
   BLVSector *v0; // ebp@1
   LevelDecoration *v1; // edi@2
@@ -532,7 +532,7 @@
 }
 
 //----- (00487DA9) --------------------------------------------------------
-void __cdecl sub_487DA9()
+void  sub_487DA9()
 {
   for (int i = 0; i < 20000; ++i)
     array_77EC08[i].field_108 = 0;
@@ -597,7 +597,7 @@
 }
 
 //----- (00491E3A) --------------------------------------------------------
-void __cdecl sub_491E3A()
+void sub_491E3A()
 {
   Player *v0; // ebx@1
   signed int v1; // esi@3
@@ -698,7 +698,7 @@
 // 4ED498: using guessed type char byte_4ED498;
 
 //----- (00493938) --------------------------------------------------------
-int __cdecl _493938_regenerate()
+int  _493938_regenerate()
 {
   int v0; // edi@1
   signed __int64 v1; // qax@1
@@ -842,7 +842,7 @@
       a1.spell_caster_pid = v12;
       a1.uFacing = 0;
       a1.uSoundID = 0;
-      v13 = sub_46A89E((int)v41, 100, 307);
+      v13 = _46A89E_immolation_effect((int)v41, 100, 307);
       if ( v13 > 0 )
       {
         do
@@ -1070,7 +1070,7 @@
 }
 
 //----- (00493F79) --------------------------------------------------------
-void sub_493F79(stru351_summoned_item *_this, __int64 a2)
+void init_summoned_item(stru351_summoned_item *_this, __int64 duration)
 {
   signed __int64 v2; // ST2C_8@1
   signed __int64 v3; // qax@1
@@ -1078,7 +1078,7 @@
   unsigned __int64 v5; // qax@1
   unsigned int v6; // ebx@1
 
-  v2 = (signed __int64)((double)a2 * 0.234375);
+  v2 = (signed __int64)((double)duration * 0.234375);
   v3 = v2 / 60 / 60;
   //v4 = v3;
   v5 = (unsigned int)v3 / 0x18;
@@ -1885,8 +1885,7 @@
   dword_AE3370 = v3;
   return pNPCStats->pNPCNames[0][v11 + 2 * v3];
 }
-// AE336C: using guessed type int dword_AE336C;
-// AE3370: using guessed type int dword_AE3370;
+
 
 //----- (00495430) --------------------------------------------------------
 char * GetReputationString( signed int a1 )
@@ -2241,7 +2240,7 @@
               i += 2;
               break;
             }
-            sub_493F79(&v56, *a6);
+            init_summoned_item(&v56, *a6);
             sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year);
             strcat(pTmpBuf2.data(), a1);
             dst = strlen(pTmpBuf2.data());
@@ -2272,7 +2271,7 @@
               i += 2;
               break;
             }
-            sub_493F79(&v56, pParty->field_3C._s_times[v17-51]);
+            init_summoned_item(&v56, pParty->field_3C._s_times[v17-51]);
             sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year);
             strcat(pTmpBuf2.data(), a1);
             dst = strlen(pTmpBuf2.data());
@@ -2615,7 +2614,7 @@
 }
 
 //----- (004A57E9) --------------------------------------------------------
-void __cdecl Present_ColorKey()
+void  Present_ColorKey()
 {
   HRESULT v0; // eax@3
   HRESULT v1; // eax@3
@@ -2939,7 +2938,7 @@
 }
 
 //----- (004B1523) --------------------------------------------------------
-void __thiscall sub_4B1523(int *_this)
+void  sub_4B1523(int *_this)
 {
   int v1; // esi@1
   int v2; // edx@1
@@ -3009,7 +3008,7 @@
 }
 
 //----- (004B1ECE) --------------------------------------------------------
-void __cdecl sub_4B1ECE()
+void OracleDialogue()
 {
   __int16 *v0; // edi@1
   int v1; // ebx@3
@@ -3103,13 +3102,9 @@
 	  v9->uHolderPlayer = v5;
   }
 }
-// 4F08EC: using guessed type int dword_4F08EC[];
-// 722B3C: using guessed type int dword_722B3C;
-// 722B44: using guessed type int dword_722B44;
-// F8B1A8: using guessed type int dword_F8B1A8;
 
 //----- (004B254D) --------------------------------------------------------
-char *__thiscall _4B254D_SkillMasteryTeacher(int _this)
+char * _4B254D_SkillMasteryTeacher(int _this)
 {
   //Player *v1; // esi@1
   int v2; // edx@1
@@ -3485,7 +3480,7 @@
 }
 
 //----- (004B3E1E) --------------------------------------------------------
-void __cdecl sub_4B3E1E()
+void  sub_4B3E1E()
 {
   NPCData *v0; // ST40_4@1
   signed int v1; // edi@1
@@ -3506,7 +3501,6 @@
   pDialogueWindow->_41D08F_set_keyboard_control_group(v1 + 1, 1, 0, 1);
 }
 
-// F8B19C: using guessed type int dword_F8B19C;
 
 //----- (004B3FE5) --------------------------------------------------------
 void __fastcall sub_4B3FE5(int a4)
@@ -3544,13 +3538,13 @@
 }
 
 //----- (004B46F8) --------------------------------------------------------
-int __fastcall sub_4B46F8(int a1)
+__int64 GetExperienceRequiredForLevel(int level)
 {
-  int v1; // eax@1
+  __int64 v1; // eax@1
   int i; // edx@1
 
   v1 = 0;
-  for ( i = 0; i < a1; ++i )
+  for ( i = 0; i < level; ++i )
     v1 += i + 1;
   return 1000 * v1;
 }
@@ -3756,12 +3750,13 @@
 			switch ( npc_event_id )
 			{
 				case 139:
-					sub_4B1ECE();
+					OracleDialogue();
 					break;
 				case 311:
 					sub_4BBA85_bounties();
 					break;
 				case 399:
+                  __debugbreak(); // what kind of dialogue is that?
 					sub_4BBCDD();
 					break;
 				default: