Mercurial > mm7
comparison UI/UITransition.cpp @ 1755:77abbabd2a04
m
author | Ritor1 |
---|---|
date | Mon, 30 Sep 2013 18:05:50 +0600 |
parents | 2b5c8fe78e79 |
children | dc5d8edf629a |
comparison
equal
deleted
inserted
replaced
1746:f305a00a6d98 | 1755:77abbabd2a04 |
---|---|
186 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf.data(), 3); | 186 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf.data(), 3); |
187 _unused_5B5924_is_travel_ui_drawn = 1; | 187 _unused_5B5924_is_travel_ui_drawn = 1; |
188 } | 188 } |
189 } | 189 } |
190 | 190 |
191 | |
192 | |
193 //----- (00444A51) -------------------------------------------------------- | 191 //----- (00444A51) -------------------------------------------------------- |
194 void TransitionUI_Draw() | 192 void TransitionUI_Draw() |
195 { | 193 { |
196 MapInfo *pMapInfo; // esi@5 | |
197 char *v1; // eax@6 | |
198 std::string v3; // [sp-18h] [bp-84h]@11 | |
199 unsigned int v4; // [sp-10h] [bp-7Ch]@12 | 194 unsigned int v4; // [sp-10h] [bp-7Ch]@12 |
200 int v5; // [sp-Ch] [bp-78h]@12 | 195 GUIWindow transition_window; // [sp+Ch] [bp-60h]@1 |
201 const char *v6; // [sp-8h] [bp-74h]@11 | |
202 signed int v7; // [sp-4h] [bp-70h]@11 | |
203 GUIWindow v8; // [sp+Ch] [bp-60h]@1 | |
204 unsigned int v9; // [sp+60h] [bp-Ch]@1 | 196 unsigned int v9; // [sp+60h] [bp-Ch]@1 |
205 unsigned int v10; // [sp+64h] [bp-8h]@1 | 197 unsigned int map_id; // [sp+64h] [bp-8h]@1 |
206 int a3; // [sp+6Bh] [bp-1h]@11 | 198 |
207 | 199 memcpy(&transition_window, pPrimaryWindow, sizeof(transition_window)); |
208 memcpy(&v8, pPrimaryWindow, sizeof(v8)); | |
209 v10 = pMapStats->GetMapInfo(pCurrentMapName); | |
210 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); | 200 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); |
211 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); | 201 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); |
212 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(uTextureID_50795C)); | 202 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(uTextureID_50795C)); |
213 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); | 203 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); |
214 uTextureID_right_panel_loop = uTextureID_right_panel; | 204 uTextureID_right_panel_loop = uTextureID_right_panel; |
215 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel)); | 205 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel)); |
216 pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u)); | 206 pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u)); |
217 pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); | 207 pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); |
208 map_id = pMapStats->GetMapInfo(pCurrentMapName); | |
218 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' ) | 209 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' ) |
219 v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name); | 210 map_id = pMapStats->GetMapInfo(dword_591164_teleport_map_name); |
220 pMapInfo = &pMapStats->pInfos[v10]; | 211 transition_window.uFrameX = 493; |
221 v8.uFrameX = 493; | 212 transition_window.uFrameWidth = 126; |
222 v8.uFrameWidth = 126; | 213 transition_window.uFrameZ = 366; |
223 v8.uFrameZ = 366; | 214 transition_window.DrawTitleText(pFontCreate, 0, 5, 0, pMapStats->pInfos[map_id].pName, 3); |
224 v8.DrawTitleText(pFontCreate, 0, 5u, 0, pMapInfo->pName, 3); | 215 transition_window.uFrameX = 483; |
225 v8.uFrameX = 483; | 216 transition_window.uFrameWidth = 148; |
226 v8.uFrameWidth = 148; | 217 transition_window.uFrameZ = 334; |
227 v8.uFrameZ = 334; | 218 |
228 | |
229 v1 = ""; | |
230 if ( uCurrentHouse_Animation ) | 219 if ( uCurrentHouse_Animation ) |
231 { | 220 { |
232 v1 = pTransitionStrings[uCurrentHouse_Animation]; | 221 v4 = (212 - pFontCreate->CalcTextHeight(pTransitionStrings[uCurrentHouse_Animation], &transition_window, 0, 0)) / 2 + 101; |
233 v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; | 222 transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTransitionStrings[uCurrentHouse_Animation], 3); |
234 v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); | 223 } |
235 } | 224 else if ( map_id ) |
236 else if ( v10 ) | 225 { |
237 { | 226 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapStats->pInfos[map_id].pName);// "Do you wish to leave %s?" |
238 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" | 227 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &transition_window, 0, 0)) / 2 + 101; |
239 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &v8, 0, 0)) / 2 + 101; | 228 transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3); |
240 v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3); | |
241 } | 229 } |
242 else Error("Troubles in da house"); | 230 else Error("Troubles in da house"); |
243 | 231 |
244 _unused_5B5924_is_travel_ui_drawn = true; | 232 _unused_5B5924_is_travel_ui_drawn = true; |
245 } | 233 } |