Mercurial > mm7
comparison 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 |
comparison
equal
deleted
inserted
replaced
433:0eaed3e0d75f | 434:137c59c3dbc4 |
---|---|
14601 | 14601 |
14602 | 14602 |
14603 | 14603 |
14604 | 14604 |
14605 //----- (00444A51) -------------------------------------------------------- | 14605 //----- (00444A51) -------------------------------------------------------- |
14606 char *__cdecl TransitionUI_Draw() | 14606 void TransitionUI_Draw() |
14607 { | 14607 { |
14608 MapInfo *pMapInfo; // esi@5 | 14608 MapInfo *pMapInfo; // esi@5 |
14609 char *v1; // eax@6 | 14609 char *v1; // eax@6 |
14610 char *result; // eax@12 | |
14611 std::string v3; // [sp-18h] [bp-84h]@11 | 14610 std::string v3; // [sp-18h] [bp-84h]@11 |
14612 unsigned int v4; // [sp-10h] [bp-7Ch]@12 | 14611 unsigned int v4; // [sp-10h] [bp-7Ch]@12 |
14613 int v5; // [sp-Ch] [bp-78h]@12 | 14612 int v5; // [sp-Ch] [bp-78h]@12 |
14614 const char *v6; // [sp-8h] [bp-74h]@11 | 14613 const char *v6; // [sp-8h] [bp-74h]@11 |
14615 signed int v7; // [sp-4h] [bp-70h]@11 | 14614 signed int v7; // [sp-4h] [bp-70h]@11 |
14620 | 14619 |
14621 memcpy(&v8, pPrimaryWindow, sizeof(v8)); | 14620 memcpy(&v8, pPrimaryWindow, sizeof(v8)); |
14622 v10 = pMapStats->GetMapInfo(pCurrentMapName); | 14621 v10 = pMapStats->GetMapInfo(pCurrentMapName); |
14623 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); | 14622 v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); |
14624 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); | 14623 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); |
14625 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); | 14624 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(uTextureID_50795C)); |
14626 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); | 14625 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); |
14627 uTextureID_507B04 = uTextureID_right_panel; | 14626 uTextureID_507B04 = uTextureID_right_panel; |
14628 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0)); | 14627 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel)); |
14629 pRenderer->DrawTextureIndexed(556, 451, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); | 14628 pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u)); |
14630 pRenderer->DrawTextureIndexed(476, 451, (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); | 14629 pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); |
14631 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != 48 ) | 14630 if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' ) |
14632 v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name); | 14631 v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name); |
14633 pMapInfo = &pMapStats->pInfos[v10]; | 14632 pMapInfo = &pMapStats->pInfos[v10]; |
14634 v8.uFrameX = 493; | 14633 v8.uFrameX = 493; |
14635 v8.uFrameWidth = 126; | 14634 v8.uFrameWidth = 126; |
14636 v8.uFrameZ = 366; | 14635 v8.uFrameZ = 366; |
14637 v8.DrawTitleText(pFontCreate, 0, 5u, 0, pMapInfo->pName, 3); | 14636 v8.DrawTitleText(pFontCreate, 0, 5u, 0, pMapInfo->pName, 3); |
14638 v8.uFrameX = 483; | 14637 v8.uFrameX = 483; |
14639 v8.uFrameWidth = 148; | 14638 v8.uFrameWidth = 148; |
14640 v8.uFrameZ = 334; | 14639 v8.uFrameZ = 334; |
14640 | |
14641 v1 = ""; | |
14641 if ( uCurrentHouse_Animation ) | 14642 if ( uCurrentHouse_Animation ) |
14642 { | 14643 { |
14643 v1 = (&off_4EB080)[4 * uCurrentHouse_Animation]; | 14644 v1 = pTransitionStrings[uCurrentHouse_Animation]; |
14644 } | 14645 v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; |
14645 else | 14646 v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); |
14646 { | 14647 } |
14647 if ( v10 ) | 14648 else if ( v10 ) |
14648 { | 14649 { |
14649 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" | 14650 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" |
14650 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; | 14651 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; |
14651 result = v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); | 14652 v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); |
14652 dword_5B5924 = 1; | 14653 } |
14653 return result; | 14654 else assert(false); |
14654 } | 14655 |
14655 v1 = ""; | 14656 _unused_5B5924_is_travel_ui_drawn = true; |
14656 } | |
14657 if ( !v1 ) | |
14658 { | |
14659 MessageBoxW(nullptr, L"No transition text found!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1410", 0); | |
14660 v1 = ""; | |
14661 } | |
14662 v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; | |
14663 result = v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); | |
14664 dword_5B5924 = 1; | |
14665 return result; | |
14666 } | 14657 } |
14667 | 14658 |
14668 | 14659 |
14669 //----- (00444C8F) -------------------------------------------------------- | 14660 //----- (00444C8F) -------------------------------------------------------- |
14670 GUIWindow *__cdecl UI_CreateTravelDialogue() | 14661 GUIWindow *__cdecl UI_CreateTravelDialogue() |
14780 strcat(pTmpBuf, "\n \n"); | 14771 strcat(pTmpBuf, "\n \n"); |
14781 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); | 14772 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); |
14782 strcat(pTmpBuf, pTmpBuf2); | 14773 strcat(pTmpBuf, pTmpBuf2); |
14783 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); | 14774 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); |
14784 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); | 14775 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); |
14785 dword_5B5924 = 1; | 14776 _unused_5B5924_is_travel_ui_drawn = 1; |
14786 } | 14777 } |
14787 } | 14778 } |
14788 | 14779 |
14789 | 14780 |
14790 //----- (00444FBE) -------------------------------------------------------- | 14781 //----- (00444FBE) -------------------------------------------------------- |
16870 char *result; // eax@3 | 16861 char *result; // eax@3 |
16871 | 16862 |
16872 v2 = pMapName; | 16863 v2 = pMapName; |
16873 v3 = uStartingPointType; | 16864 v3 = uStartingPointType; |
16874 pAudioPlayer->StopChannels(-1, -1); | 16865 pAudioPlayer->StopChannels(-1, -1); |
16875 pGameLoadingUI_ProgressBar->_443484((GUIProgressBar::Type)0); | 16866 pGameLoadingUI_ProgressBar->Initialize(GUIProgressBar::TYPE_None); |
16876 if ( _strcmpi(pCurrentMapName, v2) ) | 16867 if ( _strcmpi(pCurrentMapName, v2) ) |
16877 SaveGame(1, 0); | 16868 SaveGame(1, 0); |
16878 uGameState = 2; | 16869 uGameState = 2; |
16879 result = strcpy(pCurrentMapName, v2); | 16870 result = strcpy(pCurrentMapName, v2); |
16880 uLevel_StartingPointType = v3; | 16871 uLevel_StartingPointType = v3; |