diff mm7_3.cpp @ 829:d5b1870df3ab

Merge
author Nomad
date Wed, 27 Mar 2013 00:28:45 +0200
parents 0f56abdcce94 085eb19b7ffd
children 9c3f28b31b4a
line wrap: on
line diff
--- a/mm7_3.cpp	Wed Mar 27 00:27:38 2013 +0200
+++ b/mm7_3.cpp	Wed Mar 27 00:28:45 2013 +0200
@@ -12428,8 +12428,8 @@
 
   v0 = pFontArrus;
   pFont = pFontArrus;
-  if ( ptr_F8B1E8 && !byte_5B0938[0] )
-    strcpy(byte_5B0938, ptr_F8B1E8);
+  if ( current_npc_text && !byte_5B0938[0] )
+    strcpy(byte_5B0938, current_npc_text);
   v5.uFrameWidth = game_viewport_width;
   v5.uFrameZ = 452;
   v1 = pFontArrus->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7;
@@ -12542,7 +12542,7 @@
 void __cdecl DrawDialogueUI()
 {
   NPCData *pNPC; // ebx@2
-  int v1; // eax@2
+  int pGreetType; // eax@2
   unsigned __int16 v2; // di@2
   //unsigned int v3; // eax@2
   char *v4; // esi@3
@@ -12593,7 +12593,7 @@
     return;
   memcpy(&v51, pDialogueWindow, sizeof(v51));
   pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID);
-  v1 = sub_445C8B(sDialogue_SpeakingActorNPC_ID);
+  pGreetType = GetGreetType(sDialogue_SpeakingActorNPC_ID);
   v51.uFrameWidth -= 10;
   v51.uFrameZ -= 10;
   //v54 = v1;
@@ -12657,9 +12657,9 @@
     default:
       if (uDialogueType > DIALOGUE_18 && uDialogueType < DIALOGUE_23 && !byte_5B0938[0])
       {
-        pInString = (char *)ptr_F8B1E8;
-      }
-      else if (v1 == 1)
+        pInString = (char *)current_npc_text;
+      }
+      else if (pGreetType == 1)//QuestNPC_greet
       {
         if (pNPC->greet)
         {
@@ -12669,7 +12669,7 @@
             pInString = pNPCStats->pNPCGreetings[pNPC->greet - 1].pGreeting1;
         }
       }
-      else if (v1 == 2)
+      else if (pGreetType == 2)//HiredNPC_greet
       {
         auto prof = pNPCStats->pProfessions + pNPC->uProfession - 1;
 
@@ -12893,7 +12893,7 @@
 }
 
 //----- (00445C8B) --------------------------------------------------------
-int __fastcall sub_445C8B(signed int a1)
+int __fastcall GetGreetType(signed int SpeakingNPC_ID)
 {
   signed int v1; // ebx@1
   int v3; // edi@6
@@ -12904,13 +12904,13 @@
   NPCData *v8; // esi@11
 
   v1 = 0;
-  if ( a1 >= 0 )
-  {
-    if ( a1 < 5000 )
-      return 1;
-    return 2;
-  }
-  if ( a1 >= 5000 )
+  if ( SpeakingNPC_ID >= 0 )
+  {
+    if ( SpeakingNPC_ID < 5000 )
+      return 1;//QuestNPC_greet
+    return 2;//HiredNPC_greet
+  }
+  if ( SpeakingNPC_ID >= 5000 )
     return 2;
   v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
   v4 = 0;
@@ -12940,7 +12940,7 @@
     }
     while ( v1 < (signed int)pNPCStats->uNumNewNPCs );
   }
-  return ((unsigned __int8)pTmpBuf[v3] < 2u) + 1;
+  return ((unsigned __int8)pTmpBuf[v3] < 2) + 1;
 }
 
 //----- (0044603D) --------------------------------------------------------