diff mm7_3.cpp @ 613:5bf285f56fa8

Слияние
author Ritor1
date Thu, 07 Mar 2013 22:45:43 +0600
parents 42d5777c2f47 628694cd5744
children 5cfb5dadf330
line wrap: on
line diff
--- a/mm7_3.cpp	Thu Mar 07 22:45:23 2013 +0600
+++ b/mm7_3.cpp	Thu Mar 07 22:45:43 2013 +0600
@@ -13310,8 +13310,8 @@
 
 
 //----- (00443E31) --------------------------------------------------------
-void __cdecl LoadLevel_InitializeLevelStr()
-{
+void LoadLevel_InitializeLevelStr()
+    {
   
   char Args[100]; 
   int string_num;
@@ -13417,10 +13417,7 @@
 
 		if (_evt->_e_type == EVENT_PlaySound)
 			{
-			pSoundList->LoadSound(
-				_evt->v5 +
-				((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8),
-				0);
+			pSoundList->LoadSound(EVT_DWORD(_evt->v5), 0);
 			}
 		else if (_evt->_e_type == EVENT_OnMapReload)
 			{
@@ -14125,8 +14122,8 @@
   if ( !pDialogueWindow )
     return;
   memcpy(&v51, pDialogueWindow, sizeof(v51));
-  pNPC = GetNPCData(uDialogue_SpeakingActorNPC_ID);
-  v1 = sub_445C8B(uDialogue_SpeakingActorNPC_ID);
+  pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID);
+  v1 = sub_445C8B(sDialogue_SpeakingActorNPC_ID);
   v51.uFrameWidth -= 10;
   v51.uFrameZ -= 10;
   //v54 = v1;
@@ -14426,7 +14423,7 @@
 }
 
 //----- (004459F9) --------------------------------------------------------
-NPCData *__fastcall GetNPCData(unsigned int npcid)
+NPCData *__fastcall GetNPCData(signed int npcid)
 {
   unsigned int v1; // esi@1
   NPCData *result; // eax@5
@@ -14463,13 +14460,13 @@
   }
   if ( (signed int)npcid >= 5000 )
     return &pNPCStats->array_13EF4[npcid - 5000];
-  if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
+  if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
   {
     result = 0;
   }
   else
   {
-    v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1;
+    v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
     v4 = 0;
     v5 = 0;
     v6 = pParty->pHirelings;
@@ -14521,16 +14518,16 @@
 
   if ( npcid >= 5000 )
     return &pNPCStats->pAdditionalNPC[npcid - 5000];
-  if (uDialogue_SpeakingActorNPC_ID >= 0)
+  if (sDialogue_SpeakingActorNPC_ID >= 0)
   {
     result = 0;
   }
   else
   {
-    v3 = uDialogue_SpeakingActorNPC_ID - 1;
+    v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1;
     v4 = 0;
 
-    for (i = 0; i < 4; ++i)
+    for (i = 0; i < 2; ++i)
     {
       if (pParty->pHirelings[i].pName)
         pTmpBuf[v4++] = i;
@@ -14600,14 +14597,14 @@
   }
   if ( npcid >= 5000 )
     goto LABEL_7;
-  if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
+  if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
   {
     *(int *)a2 = 0;
     result = 0;
   }
   else
   {
-    v5 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1;
+    v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
     v6 = 0;
     v7 = 0;
     v8 = pParty->pHirelings;
@@ -14674,7 +14671,7 @@
   }
   if ( a1 >= 5000 )
     return 2;
-  v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1;
+  v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
   v4 = 0;
   v5 = 0;
   v6 = pParty->pHirelings;
@@ -14709,7 +14706,7 @@
 //----- (0044603D) --------------------------------------------------------
 void __cdecl sub_44603D()
 {
-  uDialogue_SpeakingActorNPC_ID = 0;
+  sDialogue_SpeakingActorNPC_ID = 0;
   pDialogueWindow->Release();
   pDialogueWindow = 0;
   pMiscTimer->Resume();