Mercurial > might-and-magic-trilogy
diff mm7_4.cpp @ 44:916bec351934
22.10.12(pCurrentScreen)
author | Ritor1 |
---|---|
date | Mon, 22 Oct 2012 17:28:15 +0600 |
parents | 484492a6dd28 |
children | 79a30ee1ecdb 6a62c4005f0e |
line wrap: on
line diff
--- a/mm7_4.cpp Sun Oct 21 23:26:23 2012 +0600 +++ b/mm7_4.cpp Mon Oct 22 17:28:15 2012 +0600 @@ -4254,7 +4254,7 @@ v51 = v65; if ( v65 ) goto LABEL_135; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 ) + if ( pCurrentScreen != 5 ) { v52 = (signed int)&pPlayers[1]; while ( 1 ) @@ -4270,13 +4270,13 @@ *(int *)(v53 + 20) = 0; v51 = 1; LABEL_135: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 + if ( pCurrentScreen != 5 && (!v51 || dword_5C35C0) ) uGameState = 8; } if ( uActiveCharacter ) { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 ) + if ( pCurrentScreen != 5 ) { v54 = pPlayers[uActiveCharacter]; if ( v54->pConditions[2] @@ -5476,7 +5476,7 @@ uColorGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); uColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &stru_506F20); + pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); v0 = pTexture_MAKESKY; pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2u, pTexture_MAKESKY); pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos++ - 640, 2u, v0); @@ -5627,9 +5627,9 @@ switch (uNumRace) { case 0: uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human" - case 1: uRaceName = pGlobalTXT_LocalizationStrings[101]; break; // "Dwarf" + case 1: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Dwarf" case 2: uRaceName = pGlobalTXT_LocalizationStrings[106]; break; // "Goblin" - case 3: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Elf" + case 3: uRaceName = pGlobalTXT_LocalizationStrings[101]; break; // "Elf" }; strcpy(pTmpBuf, uRaceName); pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134 + 72, v128 + 12, 0, pTmpBuf, 130, 0); @@ -5806,15 +5806,20 @@ v104 = 0; if ( (signed int)v103 > 0 ) { - while ( Str1[v104] != 32 ) - { - ++v104; - if ( v104 >= (signed int)v103 ) - goto LABEL_77; - } - Str1[v104] = 0; - } -LABEL_77: + if ( Str1[v104] == 32 ) + { + Str1[v104] = 0; + } + else + { + while ( Str1[v104] != 32 ) + { + ++v104; + if ( v104 >= (signed int)v103 ) + break; + } + } + } uColorGreen = -5; if ( (signed int)v124 <= 3 ) uColorGreen = 0; @@ -5847,16 +5852,16 @@ pGUIWindow_CurrentMenu->DrawText(pFontCreate, v115 + 530, 410, v114, pTmpBuf, 0, 0, 0); if ( GameUI_StatusBar_TimedStringTimeLeft > GetTickCount() ) { - pWindow.str_48 = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." + pWindow.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." if ( v113 < 0 ) - pWindow.str_48 = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." + pWindow.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." pWindow.uFrameWidth = 300; pWindow.uFrameHeight = 100; pWindow.uFrameX = 170; pWindow.uFrameY = 140; pWindow.uFrameZ = 469; pWindow.uFrameW = 239; - pWindow._415551(0); + pWindow.DrawMessageBox(0); } pRenderer->EndScene(); } @@ -5886,7 +5891,7 @@ ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 21; + pCurrentScreen = 21; uPlayerCreationUI_ArrowAnim = 0; uPlayerCreationUI_SkySliderPos = 0; uPlayerCreationUI_SelectedCharacter = 0; @@ -6361,7 +6366,7 @@ 0); pFontCChar = LoadFont("cchar.fnt", "FONTPAL", 0); } -// 4E28F8: using guessed type int uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; +// 4E28F8: using guessed type int pCurrentScreen; //----- (0049750E) -------------------------------------------------------- void __cdecl DeleteCCharFont() @@ -6401,11 +6406,11 @@ bool v26; // [sp+74h] [bp-Ch]@1 POINT v24; // [sp+78h] [bp-8h]@6 - v0 = &stru_506F20; + v0 = &pTexture_PCX; v1 = 0; v26 = 0; - stru_506F20.Release(); - stru_506F20.Load("makeme.pcx", 0); + pTexture_PCX.Release(); + pTexture_PCX.Load("makeme.pcx", 0); if (pAsyncMouse) pAsyncMouse->Resume(); v2 = 6; @@ -6424,7 +6429,7 @@ v6 = pMessageQueue_50CBD0->uNumMessages; do { - if ( uMouseX >= (signed int)v5->uX + if ( uMouseX >= (signed int)v5->uX //mouse movement && uMouseX <= (signed int)v5->uZ && uMouseY >= (signed int)v5->uY && uMouseY <= (signed int)v5->uW ) @@ -6433,7 +6438,7 @@ if ( (signed int)v6 < 40 ) { pMessageQueue_50CBD0->pMessages[v6].eType = (UIMessageType)v5->field_1C; - v0 = &stru_506F20; + v0 = &pTexture_PCX; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v7; *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; v6 = pMessageQueue_50CBD0->uNumMessages + 1; @@ -6763,7 +6768,7 @@ free(pString); pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, (int)ptr); pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, 0x71u, 0, 0x1Bu, nullstring, 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 9; + pCurrentScreen = 9; SetCurrentMenuID(MENU_Credits); pRenderer->BeginScene(); pRenderer->DrawTextureRGB(0, 0, &v16); @@ -9704,7 +9709,7 @@ v3 = pMouse->GetCursorPos(&a2)->y + 30; else v3 = 30; - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameY = v3; a1.uFrameWidth = 328; a1.uFrameHeight = 68; @@ -9747,7 +9752,7 @@ if ( (signed int)a1.uFrameHeight < 150 ) a1.uFrameHeight = 150; a1.uFrameWidth = 460; - a1._415551(0); + a1.DrawMessageBox(0); a1.uFrameWidth -= 12; a1.uFrameHeight -= 12; v7 = pSpellStats->pInfos[v1].pName;