diff mm7_3.cpp @ 373:edd2d8b7e3c4

Interface reloading fix & party alignment enum
author Nomad
date Fri, 22 Feb 2013 18:40:38 +0200
parents 2bc1c8d68f41
children 243418228760
line wrap: on
line diff
--- a/mm7_3.cpp	Fri Feb 22 17:56:00 2013 +0200
+++ b/mm7_3.cpp	Fri Feb 22 18:40:38 2013 +0200
@@ -14670,14 +14670,14 @@
 //----- (00444C8F) --------------------------------------------------------
 GUIWindow *__cdecl UI_CreateTravelDialogue()
 {
-  signed int v0; // eax@1
+  //signed int v0; // eax@1
   unsigned int v1; // eax@6
   GUIWindow *result; // eax@9
-  const char *v3; // [sp-4h] [bp-2Ch]@2
+  //const char *v3; // [sp-4h] [bp-2Ch]@2
   char pContainer[32]; // [sp+0h] [bp-28h]@1
 
   pEventTimer->Pause();
-  v0 = const_2();
+  /*v0 = const_2();
   sprintf(pContainer, "evt%02d", v0);
   if ( pParty->uAlignment )
   {
@@ -14690,7 +14690,15 @@
     v3 = "-b";
   }
   strcat(pContainer, v3);
-LABEL_6:
+LABEL_6:*/
+  switch (pParty->alignment)
+  {
+    case PartyAlignment_Good:    sprintf(pContainer, "evt%02d-b", const_2());
+    case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2());
+    case PartyAlignment_Evil:    sprintf(pContainer, "evt%02d-c", const_2());
+    default: assert(false);
+  }
+
   pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)];
   pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)];
   v1 = pMapStats->GetMapInfo(pCurrentMapName);