diff mm7_3.cpp @ 602:628694cd5744

Margaret working
author zipi
date Wed, 06 Mar 2013 23:26:46 +0000
parents d59398528e4f
children 5bf285f56fa8 f234b67a9caf
line wrap: on
line diff
--- a/mm7_3.cpp	Thu Mar 07 01:07:45 2013 +0400
+++ b/mm7_3.cpp	Wed Mar 06 23:26:46 2013 +0000
@@ -14122,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;
@@ -14423,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
@@ -14460,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;
@@ -14518,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;
@@ -14597,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;
@@ -14671,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;
@@ -14706,7 +14706,7 @@
 //----- (0044603D) --------------------------------------------------------
 void __cdecl sub_44603D()
 {
-  uDialogue_SpeakingActorNPC_ID = 0;
+  sDialogue_SpeakingActorNPC_ID = 0;
   pDialogueWindow->Release();
   pDialogueWindow = 0;
   pMiscTimer->Resume();