Mercurial > might-and-magic-trilogy
diff GUIWindow.cpp @ 44:916bec351934
22.10.12(pCurrentScreen)
author | Ritor1 |
---|---|
date | Mon, 22 Oct 2012 17:28:15 +0600 |
parents | 93bf1d5f6a6d |
children | 79a30ee1ecdb 6a62c4005f0e |
line wrap: on
line diff
--- a/GUIWindow.cpp Sun Oct 21 23:26:23 2012 +0600 +++ b/GUIWindow.cpp Mon Oct 22 17:28:15 2012 +0600 @@ -108,7 +108,7 @@ v7 = v2->uFrameHeight; v2->uFrameZ = v6 + v2->uFrameX - 1; v2->uFrameW = v2->uFrameY + v7 - 1; - v2->_415551(0); + v2->DrawMessageBox(0); v2->DrawText2(pFontArrus, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[451], 3u); if ( !v19 ) v2->DrawText2(v1, 0, 0x28u, 0, pGlobalTXT_LocalizationStrings[153], 3u); @@ -220,7 +220,7 @@ v12 = v1->uFrameY; v1->uFrameZ = v11; v1->uFrameW = v9 + v12 - 1; - v1->_415551(0); + v1->DrawMessageBox(0); if ( pPlayer->pConditions[16] ) { v13 = pTexture_PlayerFaceEradicated; @@ -369,7 +369,7 @@ if ( !v5 ) { pIcons_LOD->_40F9C5(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = dword_506978; + pCurrentScreen = dword_506978; pKeyActionMap->_459ED1(3); goto LABEL_26; } @@ -431,7 +431,7 @@ pTexture_Dialogue_Background->Release(); pIcons_LOD->_40F9C5(); LABEL_19: - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = dword_506978; + pCurrentScreen = dword_506978; goto LABEL_26; } OnCloseSpellook(); @@ -459,7 +459,7 @@ { v12 = pVisibleWindowsIdxs[v10 + 1]; pVisibleWindowsIdxs[v10] = v12; - --*((int *)&stru_506F20.field_18 + 21 * v12); + --*((int *)&pTexture_PCX.field_18 + 21 * v12); ++v10; } pVisibleWindowsIdxs[v11] = 0; @@ -525,7 +525,7 @@ pAudioPlayer->StopChannels(-1, -1); InitializeBookFonts(); v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 3; + pCurrentScreen = 3; dword_506524 = 0; dword_506528 = 0; dword_50651C = 0; @@ -1033,7 +1033,7 @@ //----- (00415551) -------------------------------------------------------- -void GUIWindow::_415551(int arg0) +void GUIWindow::DrawMessageBox(int arg0) { unsigned int v2; // edi@1 GUIWindow *v3; // ebx@1 @@ -1120,7 +1120,7 @@ v19.uFrameZ = v19.uFrameWidth + v19.uFrameX - 1; v23 = v12; v19.uFrameW = v19.uFrameHeight + v19.uFrameY - 1; - v14 = v3->str_48; + v14 = v3->Hint; if ( v14 ) { v15 = pFontLucida->CalcTextHeight(v14, &v19, 0, 0); @@ -1136,7 +1136,7 @@ if ( (signed int)(v16 + v12) > 479 ) v16 = 479 - v12; DrawPopupWindow(a2.y, v12, v21, v16); - v17 = v3->str_48; + v17 = v3->Hint; if ( v17 ) { v18 = pFontLucida->CalcTextHeight(v17, &v19, 0, 0); @@ -1477,7 +1477,7 @@ _4E5EE0_transui_y - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 14 ) + if ( pCurrentScreen == 14 ) { CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); goto LABEL_58; @@ -2164,7 +2164,7 @@ pWindow->uFrameZ = uX + uWidth - 1; pWindow->uFrameW = uY + uHeight - 1; pWindow->ptr_1C = (void *)a4; - pWindow->str_48 = (char *)a5; + pWindow->Hint = (char *)a5; v10 = uNumVisibleWindows; pWindow->uFrameX = uX; ++v10; @@ -2185,8 +2185,8 @@ pWindow->InitializeBookView(); break; case WINDOW_A: - dword_506978 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 4; + dword_506978 = pCurrentScreen; + pCurrentScreen = 4; ptr_5076F4 = pWindow->CreateButton( 0x1D7u, 0x1BDu, @@ -2382,8 +2382,8 @@ } break; case WINDOW_11: - dword_506978 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 17; + dword_506978 = pCurrentScreen; + pCurrentScreen = 17; ptr_5076F4 = pWindow->CreateButton( 0x236u, 0x1BDu, @@ -2407,7 +2407,7 @@ 0x5Au, 0, 0x59u, - pWindow->str_48, + pWindow->Hint, (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); pWindow->CreateButton( @@ -2420,20 +2420,20 @@ 0x5Au, 1u, 0x20u, - pWindow->str_48, + pWindow->Hint, 0, 0, 0); - pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x5Au, 1u, 0, pWindow->str_48, 0); + pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x5Au, 1u, 0, pWindow->Hint, 0); break; case WINDOW_12: InitializeBookTextures(); pWindow->_411621(); break; case WINDOW_13: - dword_506978 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; + dword_506978 = pCurrentScreen; pKeyActionMap->_459E5A(0, 15, pWindow); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 19; + pCurrentScreen = 19; break; } return pWindow; @@ -2448,7 +2448,7 @@ } if (eWindowType == WINDOW_HouseInterior) { - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 13; + pCurrentScreen = 13; ptr_5076F4 = pWindow->CreateButton( 0x1D7u, 0x1BDu, @@ -2514,8 +2514,8 @@ { if (eWindowType == WINDOW_1A) { - dword_506978 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 18; + dword_506978 = pCurrentScreen; + pCurrentScreen = 18; ptr_5076F4 = pWindow->CreateButton( 0x236u, 0x1BDu, @@ -2539,7 +2539,7 @@ 0x19Bu, 0, 0x59u, - pWindow->str_48, + pWindow->Hint, (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); pWindow->CreateButton( @@ -2552,9 +2552,9 @@ 0x19Bu, 1u, 0x20u, - pWindow->str_48, + pWindow->Hint, 0); - pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x19Bu, 1u, 0, pWindow->str_48, 0); + pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x19Bu, 1u, 0, pWindow->Hint, 0); return pWindow; } if (eWindowType == WINDOW_1B) @@ -2586,7 +2586,7 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2u); ++pIcons_LOD->uTexturePacksCount; pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 23; + pCurrentScreen = 23; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; }