Mercurial > mm7
diff mm7_3.cpp @ 434:137c59c3dbc4
Temple of Moon and Dragon Lair can now be entered.
author | Nomad |
---|---|
date | Sun, 24 Feb 2013 01:42:35 +0200 |
parents | 0eaed3e0d75f |
children | e5cf03a3d98e |
line wrap: on
line diff
--- a/mm7_3.cpp Sun Feb 24 01:08:02 2013 +0200 +++ b/mm7_3.cpp Sun Feb 24 01:42:35 2013 +0200 @@ -14603,11 +14603,10 @@ //----- (00444A51) -------------------------------------------------------- -char *__cdecl TransitionUI_Draw() +void TransitionUI_Draw() { MapInfo *pMapInfo; // esi@5 char *v1; // eax@6 - char *result; // eax@12 std::string v3; // [sp-18h] [bp-84h]@11 unsigned int v4; // [sp-10h] [bp-7Ch]@12 int v5; // [sp-Ch] [bp-78h]@12 @@ -14622,13 +14621,13 @@ v10 = pMapStats->GetMapInfo(pCurrentMapName); 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->pTextures[uTextureID_50795C]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(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)); - pRenderer->DrawTextureIndexed(476, 451, (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); - if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != 48 ) + 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)); + if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' ) v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name); pMapInfo = &pMapStats->pInfos[v10]; v8.uFrameX = 493; @@ -14638,31 +14637,23 @@ v8.uFrameX = 483; v8.uFrameWidth = 148; v8.uFrameZ = 334; + + v1 = ""; if ( uCurrentHouse_Animation ) { - v1 = (&off_4EB080)[4 * uCurrentHouse_Animation]; - } - else - { - if ( v10 ) - { - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" - v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; - result = v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); - dword_5B5924 = 1; - return result; - } - v1 = ""; - } - if ( !v1 ) - { - MessageBoxW(nullptr, L"No transition text found!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1410", 0); - v1 = ""; - } - v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; - result = v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); - dword_5B5924 = 1; - return result; + v1 = pTransitionStrings[uCurrentHouse_Animation]; + v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; + v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); + } + else if ( v10 ) + { + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" + v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; + v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); + } + else assert(false); + + _unused_5B5924_is_travel_ui_drawn = true; } @@ -14782,7 +14773,7 @@ strcat(pTmpBuf, pTmpBuf2); v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); - dword_5B5924 = 1; + _unused_5B5924_is_travel_ui_drawn = 1; } } @@ -16872,7 +16863,7 @@ v2 = pMapName; v3 = uStartingPointType; pAudioPlayer->StopChannels(-1, -1); - pGameLoadingUI_ProgressBar->_443484((GUIProgressBar::Type)0); + pGameLoadingUI_ProgressBar->Initialize(GUIProgressBar::TYPE_None); if ( _strcmpi(pCurrentMapName, v2) ) SaveGame(1, 0); uGameState = 2;