diff mm7_3.cpp @ 424:afad358dc684

Merge
author Gloval
date Sat, 23 Feb 2013 23:15:31 +0400
parents 88c30918eef7 ad1e9c0bf6da
children 24936a5ff8ca 58b71c1af7d8
line wrap: on
line diff
--- a/mm7_3.cpp	Sat Feb 23 23:09:48 2013 +0400
+++ b/mm7_3.cpp	Sat Feb 23 23:15:31 2013 +0400
@@ -14623,8 +14623,8 @@
   v10 = pMapStats->GetMapInfo(pCurrentMapName);
   v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name);
   pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
-  pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50795C] : 0));
-  pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside);
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]);
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside);
   uTextureID_507B04 = uTextureID_right_panel;
   pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0));
   pRenderer->DrawTextureIndexed(556, 451, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
@@ -14750,11 +14750,9 @@
   pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pDestinationMapName, 20);
   v0 = pMapStats->GetMapInfo(pDestinationMapName);
   pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
-  pRenderer->DrawTextureTransparent(0x1D4u, 0,
-    (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
-  pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside);
-  pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u,
-    (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
+  pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_507B04]);
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside);
+  pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
   pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u,
     (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0));
   if ( v0 )
@@ -14978,8 +14976,8 @@
   v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u);
   pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background);
   pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0));
-  pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0));
-  pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pDialogueNPCPortraits[0]);
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0));
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]);
 
   if (pNPC->uProfession)
   {
@@ -17682,7 +17680,7 @@
   //unsigned int v17; // edx@67
   //unsigned int v18; // ecx@67
   //unsigned __int16 v19; // ax@72
-  int *v20; // esi@80
+  //int *v20; // esi@80
   Actor *v21; // ebx@80
   unsigned __int16 v22; // ax@86
   signed int v23; // eax@94
@@ -17839,7 +17837,7 @@
       //pActor = (Actor *)(LODWORD(v80) - 176);
       //v11 = *(unsigned int *)LODWORD(v80);
       //v49 = *(unsigned int *)LODWORD(v80) == 5;
-    dword_4F6E08[i] = 4;
+    ai_near_actors_targets_pid[i] = OBJECT_Player;
     if (actor->uAIState == Dead || actor->uAIState == Removed || actor->uAIState == Disabled || actor->uAttributes & 0x0400)
       continue;
 
@@ -17928,12 +17926,12 @@
       actor_id = ai_near_actors_ids[v78];
       assert(actor_id < uNumActors);
 
-      v20 = &dword_4F6E08[actor_id];
+      //v20 = &ai_near_actors_targets_pid[actor_id];
       v21 = &pActors[actor_id];
-      Actor::_401221(actor_id, &dword_4F6E08[actor_id], 1u);
-      if ( v21->pMonsterInfo.uHostilityType && !*v20 )
+      Actor::_SelectTarget(actor_id, &ai_near_actors_targets_pid[actor_id], true);
+      if (v21->pMonsterInfo.uHostilityType && !ai_near_actors_targets_pid[actor_id])
         v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
-      a2 = *v20;
+      a2 = ai_near_actors_targets_pid[actor_id];
       v76 = a2 & 7;
       if ( (a2 & 7) == OBJECT_Actor)
         v80 = 0.5;
@@ -18687,7 +18685,7 @@
           v7 = v6->uAttributes;
           if ( v7 & 0x8000 < 0 )
           {
-            v8 = dword_4F6E08[v5];
+            v8 = ai_near_actors_targets_pid[v5];
             LOBYTE(v7) = v7 | 0x80;
             v6->uAttributes = v7;
             v33 = 8 * v5 | OBJECT_Actor;