changeset 1755:77abbabd2a04

m
author Ritor1
date Mon, 30 Sep 2013 18:05:50 +0600
parents f305a00a6d98
children dc5d8edf629a
files UI/UITransition.cpp
diffstat 1 files changed, 18 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/UI/UITransition.cpp	Sun Sep 29 21:32:47 2013 +0600
+++ b/UI/UITransition.cpp	Mon Sep 30 18:05:50 2013 +0600
@@ -188,25 +188,15 @@
   }
 }
 
-
-
 //----- (00444A51) --------------------------------------------------------
 void TransitionUI_Draw()
 {
-  MapInfo *pMapInfo; // esi@5
-  char *v1; // eax@6
-  std::string v3; // [sp-18h] [bp-84h]@11
   unsigned int v4; // [sp-10h] [bp-7Ch]@12
-  int v5; // [sp-Ch] [bp-78h]@12
-  const char *v6; // [sp-8h] [bp-74h]@11
-  signed int v7; // [sp-4h] [bp-70h]@11
-  GUIWindow v8; // [sp+Ch] [bp-60h]@1
+  GUIWindow transition_window; // [sp+Ch] [bp-60h]@1
   unsigned int v9; // [sp+60h] [bp-Ch]@1
-  unsigned int v10; // [sp+64h] [bp-8h]@1
-  int a3; // [sp+6Bh] [bp-1h]@11
+  unsigned int map_id; // [sp+64h] [bp-8h]@1
 
-  memcpy(&v8, pPrimaryWindow, sizeof(v8));
-  v10 = pMapStats->GetMapInfo(pCurrentMapName);
+  memcpy(&transition_window, pPrimaryWindow, sizeof(transition_window));
   v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name);
   pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
   pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(uTextureID_50795C));
@@ -215,29 +205,27 @@
   pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel));
   pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u));
   pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u));
+  map_id = pMapStats->GetMapInfo(pCurrentMapName);
   if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' )
-    v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name);
-  pMapInfo = &pMapStats->pInfos[v10];
-  v8.uFrameX = 493;
-  v8.uFrameWidth = 126;
-  v8.uFrameZ = 366;
-  v8.DrawTitleText(pFontCreate, 0, 5u, 0, pMapInfo->pName, 3);
-  v8.uFrameX = 483;
-  v8.uFrameWidth = 148;
-  v8.uFrameZ = 334;
+    map_id = pMapStats->GetMapInfo(dword_591164_teleport_map_name);
+  transition_window.uFrameX = 493;
+  transition_window.uFrameWidth = 126;
+  transition_window.uFrameZ = 366;
+  transition_window.DrawTitleText(pFontCreate, 0, 5, 0, pMapStats->pInfos[map_id].pName, 3);
+  transition_window.uFrameX = 483;
+  transition_window.uFrameWidth = 148;
+  transition_window.uFrameZ = 334;
 
-  v1 = "";
   if ( uCurrentHouse_Animation )
   {
-    v1 = pTransitionStrings[uCurrentHouse_Animation];
-    v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101;
-    v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3);
+    v4 = (212 - pFontCreate->CalcTextHeight(pTransitionStrings[uCurrentHouse_Animation], &transition_window, 0, 0)) / 2 + 101;
+    transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTransitionStrings[uCurrentHouse_Animation], 3);
   }
-  else if ( v10 )
+  else if ( map_id )
   {
-    sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?"
-    v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &v8, 0, 0)) / 2 + 101;
-    v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3);
+    sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapStats->pInfos[map_id].pName);// "Do you wish to leave %s?"
+    v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &transition_window, 0, 0)) / 2 + 101;
+    transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3);
   }
   else Error("Troubles in da house");