# HG changeset patch # User Nomad # Date 1350932054 -7200 # Node ID 79a30ee1ecdb307a5bd26be9313230f9c7935e3d # Parent bcc051713d20589b06f4392fe7be8f965201073d# Parent 916bec351934f0188aa71c846d8095befd6e4f72 Merge diff -r bcc051713d20 -r 79a30ee1ecdb AudioPlayer.cpp --- a/AudioPlayer.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/AudioPlayer.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -1608,7 +1608,7 @@ } } } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != v2 ) + if ( pCurrentScreen != v2 ) { v42 = &v1->pMixerChannels[4]; if ( AIL_sample_status(v42->hSample) == 4 ) diff -r bcc051713d20 -r 79a30ee1ecdb GUIWindow.cpp --- a/GUIWindow.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/GUIWindow.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -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; } diff -r bcc051713d20 -r 79a30ee1ecdb GUIWindow.h --- a/GUIWindow.h Mon Oct 22 20:45:14 2012 +0200 +++ b/GUIWindow.h Mon Oct 22 20:54:14 2012 +0200 @@ -68,7 +68,7 @@ void _4B3157(); GUIButton *_411621(); void InitializeBookView(); - void _415551(int arg0); + void DrawMessageBox(int arg0); GUIButton *GetControl(unsigned int uID); void Release(); void _41D08F(int a2, int a3, int a4, int a5); @@ -95,7 +95,7 @@ int field_3C; int field_40; int field_44; - char *str_48; + char *Hint; GUIButton *pControlsHead; GUIButton *pControlsTail; }; diff -r bcc051713d20 -r 79a30ee1ecdb Game.cpp --- a/Game.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/Game.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -254,7 +254,8 @@ pEventTimer->Resume(); dword_6BE364_game_settings_1 |= 0x80; dword_6BE340 = 2; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + // uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; if (pAsyncMouse) pAsyncMouse->Resume(); if (pGame->pKeyboardInstance->bUsingAsynKeyboard && pAsyncKeyboard ) @@ -486,7 +487,7 @@ } break; } - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 16; + pCurrentScreen = 16; sub_491E3A(); } @@ -1053,8 +1054,7 @@ int a3; // [sp+1Fh] [bp-1h]@5 auto v7 = this; - if (!uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions - && pRenderer->pRenderD3D) + if (!pCurrentScreen && pRenderer->pRenderD3D) { if (!pVisInstance) { @@ -1079,14 +1079,12 @@ } return false; } -// 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; //----- (0044EB12) -------------------------------------------------------- bool Game::_44EB12(bool bOutline, stru157 *a3, stru157 *a4) { - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions - && pVisInstance - && pRenderer->pRenderD3D ) + if ( !pCurrentScreen && pVisInstance && pRenderer->pRenderD3D ) { bool r = pVisInstance->_4C05CC(&pVisInstance->stru1, a3, a4); @@ -1096,7 +1094,7 @@ } return false; } -// 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; //----- (0044EB5A) -------------------------------------------------------- void Game::OutlineSelection() diff -r bcc051713d20 -r 79a30ee1ecdb GameUIs.cpp --- a/GameUIs.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/GameUIs.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -52,7 +52,7 @@ 8u, 8u, (Texture *)(uTextureID_loadsave != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11 ) + if ( pCurrentScreen == 11 ) { v1 = uTextureID_save_up; v2 = uTextureID_LS_saveU; @@ -71,7 +71,7 @@ } else { - pRenderer->DrawTextureRGB(0, 0, &stru_506F20); + pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); } pGUIWindow_CurrentMenu = GUIWindow::Create( saveload_dlg_xs[uDialogueType_], @@ -132,7 +132,7 @@ } LABEL_24: v15.FreeSubIndexAndIO(); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11 ) + if ( pCurrentScreen == 11 ) { v6 = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE); v10 = (TEXTURE_TYPE)2; @@ -244,7 +244,7 @@ 8u, 8u, (Texture *)(uTextureID_loadsave != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11 ) + if ( pCurrentScreen == 11 ) { v0 = uTextureID_save_up; v1 = uTextureID_LS_saveU; diff -r bcc051713d20 -r 79a30ee1ecdb Overlays.cpp --- a/Overlays.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/Overlays.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -96,8 +96,8 @@ int v6; // [sp-4h] [bp-8h]@4 Texture *v7; // [sp-4h] [bp-8h]@14 - result = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + result = pCurrentScreen; + if ( pCurrentScreen || pParty->bTurnBasedModeOn != 1 ) return result; if ( pTurnEngine->field_4 == 3 ) @@ -144,7 +144,7 @@ } return result; } -// 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; // 50C994: using guessed type int dword_50C994; // 50C998: using guessed type int dword_50C998_turnbased_icon_1A; diff -r bcc051713d20 -r 79a30ee1ecdb Player.cpp --- a/Player.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/Player.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -7746,7 +7746,7 @@ v21 = v67; goto LABEL_83; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 23 ) + if ( pCurrentScreen == 23 ) return; if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) goto LABEL_89; @@ -7762,7 +7762,7 @@ pMouse->RemoveHoldingItem(); pGUIWindow_CurrentMenu->Release(); pIcons_LOD->_4114F2(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; _42777D_CastSpell_UseWand_ShootArrow(v24, a2 - 1, 0x85u, 1, 0); } @@ -7777,7 +7777,7 @@ *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = a2 - 1; ++dword_50C9E8; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( pCurrentScreen && pGUIWindow_CurrentMenu && pGUIWindow_CurrentMenu->eWindowType != WINDOW_null && (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) @@ -7789,7 +7789,7 @@ } } } -// 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; // 50C9AC: using guessed type int dword_50C9AC; // 50C9EC: using guessed type int dword_50C9EC[]; // 6BE3C4: using guessed type char bUnderwater; diff -r bcc051713d20 -r 79a30ee1ecdb Render.cpp --- a/Render.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/Render.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -10922,15 +10922,15 @@ dword_A74C88 = 1; goto LABEL_38; } - v6 = &stru_506F20; - stru_506F20.Release(); + v6 = &pTexture_PCX; + pTexture_PCX.Release(); v9 = 0; v8 = "makeme.pcx"; } else { - v6 = &stru_506F20; - stru_506F20.Release(); + v6 = &pTexture_PCX; + pTexture_PCX.Release(); v7 = "title.pcx"; if ( uCurrentMenuID ) v7 = "lsave640.pcx"; diff -r bcc051713d20 -r 79a30ee1ecdb SaveLoad.cpp --- a/SaveLoad.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/SaveLoad.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -221,7 +221,7 @@ pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = true; @@ -358,7 +358,7 @@ strcpy((char *)&pDir, "image.pcx"); pRenderer->_49F5A2((int)v3, 150, 112, DstBuf, 1000000, (int)&pDir.uDataSize); free(v3); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11 ) + if ( pCurrentScreen == 11 ) { pRenderer->DrawTextureIndexed( 8u, @@ -709,7 +709,7 @@ } GUI_UpdateWindows(); pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; v3 = pSavegameThumbnails; viewparams->bRedrawGameUI = 1; do @@ -727,7 +727,7 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[656], 2u);// "Game Saved!" viewparams->bRedrawGameUI = 1; } -// 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; diff -r bcc051713d20 -r 79a30ee1ecdb Texture.cpp --- a/Texture.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/Texture.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -70,7 +70,7 @@ RGBTexture stru_506E40; // weak -RGBTexture stru_506F20; +RGBTexture pTexture_PCX; int uTextureID_RestUI_restb4; // weak diff -r bcc051713d20 -r 79a30ee1ecdb Texture.h --- a/Texture.h Mon Oct 22 20:45:14 2012 +0200 +++ b/Texture.h Mon Oct 22 20:54:14 2012 +0200 @@ -172,7 +172,7 @@ extern RGBTexture stru_506E40; // weak -extern RGBTexture stru_506F20; +extern RGBTexture pTexture_PCX; extern int uTextureID_RestUI_restb4; // weak diff -r bcc051713d20 -r 79a30ee1ecdb VideoPlayer.cpp --- a/VideoPlayer.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/VideoPlayer.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -364,7 +364,7 @@ pRenderer->ClearTarget(0); pRenderer->EndScene(); } - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 16; + pCurrentScreen = 16; if ( pVideoPlayer->uMovieFormat == 2 ) { if ( pVideoPlayer->pBinkMovie ) @@ -423,11 +423,11 @@ } } if ( a4 == 1 ) - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; pVideoPlayer->bPlayingMovie = 0; ShowCursor(1); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 ) - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + if ( pCurrentScreen == 16 ) + pCurrentScreen = 0; } } diff -r bcc051713d20 -r 79a30ee1ecdb mm7_1.cpp --- a/mm7_1.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_1.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -871,7 +871,7 @@ if ( !(v16 & 0xF0) ) { if ( v16 & 1 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 13 ) + || pCurrentScreen != 13 ) { if ( v16 & 2 ) pRenderer->_4A6776(a2a, a3, v7); @@ -926,7 +926,7 @@ } while ( v27 < 126 ); } -// 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; // 507958: using guessed type int uTextureID_507958; // 50C9A8: using guessed type int dword_50C9A8; @@ -1314,7 +1314,7 @@ qword_507CC8 = pParty->uTimePlayed; byte_50697C = byte_50697C == 0; if ( byte_50697C - && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 ) + && pCurrentScreen != 5 ) { if ( bFlashQuestBook ) pRenderer->DrawTextureTransparent( @@ -2186,7 +2186,7 @@ v12 = pWindowList[v3].field_34; if ( pWindowList[v3].field_2C_focus_id - pWindowList[v3].field_38 - v12 >= 0 ) { - v8 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 21; + v8 = pCurrentScreen == 21; pWindowList[v3].field_2C_focus_id -= v12; if ( v8 ) { @@ -2226,7 +2226,7 @@ v7 = pWindowList[v3].field_2C_focus_id + pWindowList[v3].field_34; if ( v7 < pWindowList[v3].field_28 + pWindowList[v3].field_38 ) { - v8 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 21; + v8 = pCurrentScreen == 21; pWindowList[v3].field_2C_focus_id = v7; if ( v8 ) { @@ -2509,7 +2509,7 @@ v82 = pFontComic; if ( v1->uItemID ) { - v79.str_48 = 0; + v79.Hint = 0; v79.uFrameWidth = 384; v79.uFrameHeight = 180; v79.uFrameY = 40; @@ -2594,7 +2594,7 @@ a2.y = _this->uAttributes & 1; if ( v13 & 2 ) { - v79._415551(0); + v79.DrawMessageBox(0); //v15 = &; pRenderer->Clip( v79.uFrameX + 12, @@ -2621,7 +2621,7 @@ } if ( !v14 ) { - v79._415551(0); + v79.DrawMessageBox(0); v15 = pRenderer; pRenderer->Clip( v79.uFrameX + 12, @@ -2742,7 +2742,7 @@ v79.uFrameHeight += (unsigned int)v83; v79.uFrameW = v79.uFrameY + v79.uFrameHeight - 1; v79.uFrameZ = v79.uFrameX + v79.uFrameWidth - 1; - v79._415551(0); + v79.DrawMessageBox(0); v15 = pRenderer; pRenderer->Clip( v79.uFrameX + 12, @@ -3773,7 +3773,7 @@ pTexture_RestUI_CurrentSkyFrame = 0; pIcons_LOD->_4114F2(); pIcons_LOD->_40F9C5(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) { @@ -3799,10 +3799,10 @@ if ( !dword_506F14 ) pAudioPlayer->StopChannels(-1, -1); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) { pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; } pEventTimer->Pause(); @@ -3841,7 +3841,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 = 5; + pCurrentScreen = 5; _507CD4_RestUI_hourglass_anim_controller = 0; uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE); uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE); @@ -4653,7 +4653,7 @@ (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); ptr_507BB8->CreateButton(7u, 8u, 460u, 343u, 1, 0, 0xCu, 0, 0, nullstring, 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 10; + pCurrentScreen = 10; pEventTimer->Pause(); return 1; } @@ -5032,7 +5032,7 @@ pMouse->GetClickPos(&pX, &pY); if ( (pX & 0x80000000u) != 0 || (signed int)pX > 639 || (pY & 0x80000000u) != 0 || (signed int)pY > 479 ) return; - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) { if ( (signed int)pX > 467 || (signed int)pY > 351 ) goto _click_on_game_ui; @@ -5138,12 +5138,12 @@ if ( uNumVisibleWindows <= 0 ) { LABEL_38: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) + if ( pCurrentScreen == 10 ) { sub_42038D(); goto _return; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 ) + if ( pCurrentScreen == 13 ) { if ( dword_F8B19C != 2 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) @@ -5366,7 +5366,7 @@ pAudioPlayer->StopChannels(-1, -1); bRingsShownInCharScreen = 0; CharacterUI_LoadPaperdollTextures(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = v1; + pCurrentScreen = v1; v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0); pCharacterScreen_StatsBtn = v2->CreateButton( pViewport->uViewportX + 12, @@ -5475,7 +5475,7 @@ pAudioPlayer->StopChannels(-1, -1); bRingsShownInCharScreen = 0; CharacterUI_LoadPaperdollTextures(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 23; + pCurrentScreen = 23; v2 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|WINDOW_Options), v1, 0); ptr_50767C = v2->CreateButton( 394u, @@ -5629,7 +5629,7 @@ v4->PlaySound(15, 0); } LABEL_9: - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) { viewparams->bRedrawGameUI = 1; if ( uActiveCharacter != v1 ) @@ -5639,16 +5639,16 @@ pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); return; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 8 ) + if ( pCurrentScreen == 8 ) return; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) + if ( pCurrentScreen == 10 ) { LABEL_23: viewparams->bRedrawGameUI = 1; if ( uActiveCharacter == v1 ) { 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 = 15; + pCurrentScreen = 15; goto LABEL_28; } LABEL_27: @@ -5656,15 +5656,15 @@ return; goto LABEL_28; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 13 ) - { - 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 != 13 ) + { + if ( pCurrentScreen == 14 ) { LABEL_28: uActiveCharacter = v1; return; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 15 ) + if ( pCurrentScreen != 15 ) { viewparams->bRedrawGameUI = 1; uActiveCharacter = v1; @@ -5686,7 +5686,7 @@ goto LABEL_22; } } -// 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; // F8B19C: using guessed type int dword_F8B19C; //----- (00421EA6) -------------------------------------------------------- @@ -6045,18 +6045,18 @@ //----- (004226C2) -------------------------------------------------------- bool __cdecl sub_4226C2() { - if ( 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 - && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 17 ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 18 ) + if ( pCurrentScreen + && pCurrentScreen != 4 + && pCurrentScreen != 17 ) + { + if ( pCurrentScreen == 18 ) return pVideoPlayer->pSmackerMovie != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 19 ) + if ( pCurrentScreen != 19 ) return 1; } return 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; //----- (004226EF) -------------------------------------------------------- void __fastcall SetUserInterface(int a1, bool bReplace) diff -r bcc051713d20 -r 79a30ee1ecdb mm7_2.cpp --- a/mm7_2.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_2.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -4528,7 +4528,7 @@ v0 = pPlayers[uActiveCharacter]; v77 = pPlayers[uActiveCharacter]; - 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 ) goto LABEL_73; if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) { @@ -12114,7 +12114,7 @@ GUIButton *v14; // [sp+0h] [bp-3Ch]@27 GUIWindow *v15; // [sp+4h] [bp-38h]@11 - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; if (pAsyncMouse) pAsyncMouse->Resume(); if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) @@ -12184,8 +12184,8 @@ pExit, 0); - stru_506F20.Release(); - stru_506F20.Load("title.pcx", 0); + pTexture_PCX.Release(); + pTexture_PCX.Load("title.pcx", 0); SetCurrentMenuID(MENU_MAIN); SetForegroundWindow(hWnd); SendMessageW(hWnd, WM_ACTIVATEAPP, 1, 0); @@ -12199,12 +12199,12 @@ v15 = pWindow_MainMenu; if ( GetCurrentMenuID() == MENU_SAVELOAD) { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 12 ) - { - stru_506F20.Release(); - stru_506F20.Load("lsave640.pcx", 0); + if ( pCurrentScreen != 12 ) + { + pTexture_PCX.Release(); + pTexture_PCX.Load("lsave640.pcx", 0); pGUIWindow2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 12; + pCurrentScreen = 12; GameUI_DrawLoadMenu(0); } v15 = pGUIWindow_CurrentMenu; @@ -12225,7 +12225,7 @@ else { pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &stru_506F20); + pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); if (pAsyncMouse) pAsyncMouse->_46B736_consume_click_lists(1); GUI_MainMenuMessageProc(); @@ -12240,7 +12240,7 @@ pIcons_LOD->_4114F2(); pGUIWindow_CurrentMenu->Release(); pGUIWindow_CurrentMenu = 0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; } } @@ -12312,7 +12312,7 @@ GUI_UpdateWindows(); pRenderer->EndScene(); pRenderer->Present(); - stru_506F20.Release(); + pTexture_PCX.Release(); if ( pGUIWindow2 ) { pGUIWindow2->Release(); @@ -12645,8 +12645,8 @@ v35 = hWnd; goto LABEL_104; } - if ( 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 != 21 ) + if ( pCurrentScreen + && pCurrentScreen != 21 ) return 0; } if ( !viewparams->field_4C ) @@ -15149,7 +15149,7 @@ GUIWindow a1; // [sp+Ch] [bp-54h]@1 memcpy(&a1, ptr_507BC4, sizeof(a1)); - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameX = 1; a1.uFrameY = 1; a1.uFrameWidth = 468; @@ -15164,7 +15164,7 @@ } a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1; a1.uFrameW = v0 + a1.uFrameY - 1; - a1._415551(0); + a1.DrawMessageBox(0); a1.uFrameX += 12; a1.uFrameWidth -= 24; a1.uFrameY += 12; @@ -15968,13 +15968,13 @@ } if ( v5 & 0x100000 || (v6 = pIndoor->pFaceExtras[v4->uFaceExtraID].uEventID) == 0 ) return 1; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 19 ) + if ( pCurrentScreen != 19 ) goto LABEL_13; break; } return 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; //----- (0046A6AC) -------------------------------------------------------- int __fastcall sub_46A6AC(int a1, int a2, int a3) diff -r bcc051713d20 -r 79a30ee1ecdb mm7_3.cpp --- a/mm7_3.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_3.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -13422,15 +13422,15 @@ //----- (0044100D) -------------------------------------------------------- bool __cdecl sub_44100D() { - return uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 4 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 7 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 12 - && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 14 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 16 - && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 18 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 23)); -} -// 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; + return pCurrentScreen == 4 + || pCurrentScreen == 7 + || pCurrentScreen > 12 + && (pCurrentScreen <= 14 + || pCurrentScreen > 16 + && (pCurrentScreen <= 18 + || pCurrentScreen == 23)); +} +// 4E28F8: using guessed type int pCurrentScreen; //----- (00441498) -------------------------------------------------------- void __cdecl GameUI_DrawTorchlightAndWizardEye() @@ -13440,17 +13440,17 @@ unsigned int v2; // eax@19 IconFrame *v3; // eax@19 - if ( !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 == 1 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 2 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 5 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 8 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 12 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 15 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 3 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 19 ) + if ( !pCurrentScreen + || pCurrentScreen == 1 + || pCurrentScreen == 2 + || pCurrentScreen == 5 + || pCurrentScreen == 8 + || pCurrentScreen == 10 + || pCurrentScreen == 11 + || pCurrentScreen == 12 + || pCurrentScreen == 15 + || pCurrentScreen == 3 + || pCurrentScreen == 19 ) { if ( SHIDWORD(pParty->pPartyBuffs[16].uExpireTime) >= 0 && (SHIDWORD(pParty->pPartyBuffs[16].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[16].uExpireTime)) ) @@ -13474,7 +13474,7 @@ } } } -// 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; //----- (0044158F) -------------------------------------------------------- void __cdecl GameUI_DrawCharacterSelectionFrame() @@ -13541,8 +13541,8 @@ ++v1; } while ( v1 < 14 ); - if ( !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 ) + if ( !pCurrentScreen + || pCurrentScreen == 4 ) { if ( (signed __int64)pParty->pPartyBuffs[7].uExpireTime > 0 ) { @@ -17206,7 +17206,7 @@ pVideoPlayer->field_40 = 0; if (pAsyncMouse) pAsyncMouse->Suspend(); - v128 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; + v128 = pCurrentScreen; //v13 = &pSomeEVT[v9]; //v14 = (unsigned __int8)v13[5]; //v15 = (unsigned __int8)v13[6]; @@ -17239,7 +17239,7 @@ LABEL_28: if ( !v15 || v128 == 3 ) { - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = v128; + pCurrentScreen = v128; if ( v128 == 3 ) pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; if ( v128 == 13 ) @@ -18139,7 +18139,7 @@ pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((_5C3420_pDecoration == 0) + 1); sub_44987B(v99, 0); v133 = 1; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 ) + if ( pCurrentScreen == 13 ) { if ( uGameState == 2 ) { @@ -18152,7 +18152,7 @@ ptr_507BC0 = 0; if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; array_5913D8[6] = 0; pDialogueWindow->Release(); @@ -19653,7 +19653,7 @@ dword_5B65C0 = 0; pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; sub_44987B("nwc.blv", 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; result = 1; } return result; diff -r bcc051713d20 -r 79a30ee1ecdb mm7_4.cpp --- a/mm7_4.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_4.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -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); @@ -9604,7 +9609,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; @@ -9647,7 +9652,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; diff -r bcc051713d20 -r 79a30ee1ecdb mm7_5.cpp --- a/mm7_5.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_5.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -330,7 +330,7 @@ case UIMSG_Quit|0x2: case 0x87: if ( bNoNPCHiring != 1 - && !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + && !pCurrentScreen ) { if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; @@ -403,7 +403,7 @@ pGUIWindow_CurrentMenu->Release(); uGameState = 4; LABEL_188: - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v0; } else @@ -421,7 +421,7 @@ if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 12; + pCurrentScreen = 12; GameUI_DrawLoadMenu(v0); goto _continue; case UIMSG_Quit: @@ -432,7 +432,7 @@ if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v0; if ( !uMessageParam ) pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0); @@ -449,7 +449,7 @@ pIcons_LOD->_40F9C5(); pIcons_LOD->_4114F2(); pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 2; + pCurrentScreen = 2; v162 = 0; v148 = 0; v141 = (WindowType)8; @@ -496,7 +496,7 @@ case UIMSG_A5: if ( pGUIWindow_CurrentMenu->field_40 == v0 ) pKeyActionMap->_459ED1(0); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 11 + if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != dword_6A0C9C + uMessageParam ) { v10 = dword_6A0C9C + uMessageParam; @@ -554,7 +554,7 @@ goto _release_tex_and_continue; case UIMSG_StartNewGame|0x2: pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 11; + pCurrentScreen = 11; GameUI_DrawSaveMenu(); goto _continue; case UIMSG_Game_OpenOptionsDialog: @@ -562,7 +562,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 2; + pCurrentScreen = 2; uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); @@ -779,7 +779,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = 1; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 26; + pCurrentScreen = 26; uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); @@ -871,7 +871,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 28; + pCurrentScreen = 28; uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); @@ -1184,7 +1184,7 @@ case UIMSG_OpenQuestBook: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); @@ -1195,7 +1195,7 @@ case UIMSG_OpenAutonotes: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); @@ -1206,7 +1206,7 @@ case UIMSG_OpenMapBook: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); pEventTimer->Pause(); viewparams->sPartyPosX = pParty->vPosition.x; @@ -1221,7 +1221,7 @@ case UIMSG_OpenCalendar: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); @@ -1237,7 +1237,7 @@ case UIMSG_OpenHistoryBook: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); @@ -1249,11 +1249,11 @@ back_to_game(); if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 15 ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions >= 17 - && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 18 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 104) ) + if ( pCurrentScreen > 15 ) + { + if ( pCurrentScreen >= 17 + && (pCurrentScreen <= 18 + || pCurrentScreen == 104) ) { LABEL_229: if ( dword_50CDC8 ) @@ -1264,11 +1264,11 @@ } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions >= 14 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 4 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) + if ( pCurrentScreen >= 14 + || pCurrentScreen == 4 + || pCurrentScreen == 10 ) goto LABEL_229; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 + if ( pCurrentScreen == 13 && !dword_50CDC8 && !dword_5C35C8 ) { @@ -1285,18 +1285,18 @@ pRenderer->ClearZBuffer(0, 479); viewparams->bRedrawGameUI = v0; viewparams->field_48 = v0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 103 ) + if ( pCurrentScreen ) + { + if ( pCurrentScreen > 103 ) { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 104 ) + if ( pCurrentScreen == 104 ) goto LABEL_321; } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions < 100 ) + if ( pCurrentScreen < 100 ) { - switch ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + switch ( pCurrentScreen ) { case 23: pIcons_LOD->_4114F2(); @@ -1330,7 +1330,7 @@ //crt_deconstruct_ptr_6A0118(); goto LABEL_291; case 15: - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 10; + pCurrentScreen = 10; goto _continue; case 10: v29 = ptr_507BB8; @@ -1340,7 +1340,7 @@ LABEL_249: v29->Release(); pIcons_LOD->_4114F2(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v0; pEventTimer->Resume(); goto _continue; @@ -1481,7 +1481,7 @@ goto LABEL_322; case 14: pGUIWindow_CurrentMenu->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 13; + pCurrentScreen = 13; pIcons_LOD->_4114F2(); goto _continue; case 13: @@ -1551,7 +1551,7 @@ LABEL_322: if ( ptr_507BD4 ) { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 7 ) + if ( pCurrentScreen == 7 ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1572,7 +1572,7 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); goto _continue; @@ -1585,7 +1585,7 @@ pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); ++pIcons_LOD->uTexturePacksCount; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = v0; + pCurrentScreen = v0; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0); @@ -1814,7 +1814,7 @@ pParty->vPosition.z = 22528; LABEL_317: sub_44603D(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; } else { @@ -1887,7 +1887,7 @@ sub_461103(); pEventTimer->Resume(); viewparams->bRedrawGameUI = 1; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; pGameLoadingUI_ProgressBar->Release(); } goto LABEL_422; @@ -2230,7 +2230,7 @@ _5B65B8_npcdata_hiword_house_or_other = v66; UpdateActors(); } - v67 = pGUIWindow_CurrentMenu->str_48; + v67 = pGUIWindow_CurrentMenu->Hint; if ( v67 ) *((int *)v67 + 17) = v0; else @@ -2466,10 +2466,10 @@ goto LABEL_416; case 0x1C: if ( !uActiveCharacter - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + || pCurrentScreen ) goto LABEL_90; ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 25; + pCurrentScreen = 25; pEventTimer->Pause(); goto _continue; case 0x1B: @@ -2544,7 +2544,7 @@ case 0x68: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) goto _continue; if ( sub_42F4DA() ) goto LABEL_594; @@ -2802,7 +2802,7 @@ pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); viewparams->bRedrawGameUI = v0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; pIcons_LOD->_4114F2(); v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734); if ( dword_50C9E8 < 40 ) @@ -2869,17 +2869,17 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) { - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) goto LABEL_693; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 - && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 7 - && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 99 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 103) ) + if ( pCurrentScreen != 5 + && pCurrentScreen != 7 + && (pCurrentScreen <= 99 + || pCurrentScreen > 103) ) { pGUIWindow_CurrentMenu->Release(); LABEL_693: GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 8; + pCurrentScreen = 8; pEventTimer->Pause(); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); @@ -2892,7 +2892,7 @@ case 0x6A: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) pGUIWindow_CurrentMenu->Release(); ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) @@ -2901,7 +2901,7 @@ viewparams->bRedrawGameUI = v0; pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 104; + pCurrentScreen = 104; pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton( @@ -2920,11 +2920,11 @@ v179); goto _continue; case 0x6B: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) { pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v0; } stru_506E40.Release(); @@ -3190,7 +3190,7 @@ sprintfex(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); goto _set_status_string_pTmpBuf_and_continue; case 0xC: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 15 ) + if ( pCurrentScreen == 15 ) goto LABEL_762; sub_420E01(); goto _continue; @@ -3260,7 +3260,7 @@ OnPressSpace(); goto _continue; case UIMSG_ChangeSoundVolume|0x100: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) goto _continue; pParty->uFlags |= 2u; GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); @@ -3283,7 +3283,7 @@ viewparams->field_28 = 11; goto LABEL_788; case UIMSG_ChangeMusicVolume|0x100: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) goto _continue; pParty->uFlags |= 2u; GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); @@ -3363,7 +3363,7 @@ dword_50CDCC = 0; if ( ptr_507BC4 ) free_book_subwindow(); - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( !pCurrentScreen && !ptr_507BD4 ) pEventTimer->Resume(); viewparams->bRedrawGameUI = 1; @@ -3474,7 +3474,7 @@ //main menu save/load wnd clicking on savegame lines if (pGUIWindow_CurrentMenu->field_40 == 1) pKeyActionMap->_459ED1(0); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 11 + if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != *(int *)uClass + dword_6A0C9C ) { //load clicked line @@ -3635,11 +3635,11 @@ } if ( v45 == 107 ) { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) { pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; } GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0); @@ -3663,7 +3663,7 @@ viewparams->field_48 = 1; if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 ) { - v17 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; + v17 = pCurrentScreen; LABEL_83: if ( v17 == 16 ) pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40); @@ -3689,16 +3689,16 @@ continue; } v16 = GetCurrentMenuID() == 8; - v17 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; + v17 = pCurrentScreen; if ( v16 - && !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + && !pCurrentScreen ) goto LABEL_83; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 12 ) + if ( pCurrentScreen == 12 ) { pIcons_LOD->_4114F2(); //crt_deconstruct_ptr_6A0118(); - stru_506F20.Release(); - stru_506F20.Load("title.pcx", 0); + pTexture_PCX.Release(); + pTexture_PCX.Load("title.pcx", 0); SetCurrentMenuID(MENU_MAIN); v15 = 1; LABEL_81: @@ -3706,17 +3706,17 @@ pGUIWindow2->Release(); pGUIWindow2 = 0; pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = v15; continue; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 ) + if ( pCurrentScreen == 16 ) { pVideoPlayer->Unload(); } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 27 ) + if ( pCurrentScreen != 27 ) goto LABEL_81; //VideoPlayer::dtor(); } @@ -12577,7 +12577,7 @@ a1.uFrameX = 90; a1.uFrameZ = 417; a1.uFrameW = v3 + 67; - a1.str_48 = 0; + a1.Hint = 0; a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]); v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]); v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]); @@ -12614,7 +12614,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 = v2->pName; @@ -14165,28 +14165,28 @@ v2 = pStr; v3 = a4; pEventTimer->Pause(); - dword_506F0C[0] = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; + dword_506F0C[0] = pCurrentScreen; result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2); ptr_507BDC = result; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 22; + pCurrentScreen = 22; return result; } -// 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; //----- (0041420D) -------------------------------------------------------- void __cdecl sub_41420D_press_esc() { GUIWindow v0; // [sp+4h] [bp-54h]@1 - sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->str_48, pGlobalTXT_LocalizationStrings[61]);// Press Escape - v0.str_48 = pTmpBuf2; + sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->Hint, pGlobalTXT_LocalizationStrings[61]);// Press Escape + v0.Hint = pTmpBuf2; v0.uFrameWidth = 400; v0.uFrameHeight = 100; v0.uFrameX = 120; v0.uFrameY = 140; v0.uFrameZ = 519; v0.uFrameW = 239; - v0._415551(0); + v0.DrawMessageBox(0); } //----- (0041426F) -------------------------------------------------------- @@ -14204,10 +14204,10 @@ } v0->Release(); ptr_507BDC = 0; - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = dword_506F0C[0]; + pCurrentScreen = dword_506F0C[0]; pEventTimer->Resume(); } -// 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; //----- (004142D3) -------------------------------------------------------- char __cdecl GameMenuUI_DrawKeyBindings() @@ -14755,7 +14755,7 @@ Dst.uFrameY = 470 - Dst.uFrameHeight; Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; Dst.uFrameW = 469; - Dst._415551(0); + Dst.DrawMessageBox(0); Dst.uFrameWidth -= 24; Dst.uFrameX += 12; Dst.uFrameY += 12; @@ -14840,16 +14840,16 @@ case WINDOW_5E: // window that initiates savegame loading { - if (v0->str_48 != (char *)1) + if (v0->Hint != (char *)1) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); auto v20 = (GUIButton *)v0->ptr_1C; pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v20->pTextures[0]); - v21 = v0->str_48; + v21 = v0->Hint; viewparams->bRedrawGameUI = 1; if ( v21 && v21 != (char *)1 ) v20->DrawLabel(v21, pFontCreate, 0, 0); v0->Release(); - if (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11) + if (pCurrentScreen == 11) pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0); else pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); @@ -14865,11 +14865,11 @@ v33 = v1 - 96; if ( !v33 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v42 = (GUIButton *)v0->ptr_1C; pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v42->pTextures[0]); - v43 = v0->str_48; + v43 = v0->Hint; viewparams->bRedrawGameUI = 1; if ( v43 && v43 != (char *)1 ) v42->DrawLabel(v43, pFontCreate, 0, 0); @@ -14910,7 +14910,7 @@ } else { - v0->_415551(0); + v0->DrawMessageBox(0); v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); if ( !pKeyActionMap->field_204 ) @@ -14918,7 +14918,7 @@ v51.Reset(); v0->Release(); pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); if ( v39 > 0 ) @@ -14954,7 +14954,7 @@ Dst.pParent = 0; goto LABEL_134; } - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v32 = v0->ptr_1C; pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 16)); @@ -14962,12 +14962,12 @@ } if ( v1 == 95 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v32 = v0->ptr_1C; pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 15)); LABEL_138: - v40 = v0->str_48; + v40 = v0->Hint; viewparams->bRedrawGameUI = 1; if ( v40 && v40 != (char *)1 ) ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0); @@ -14984,7 +14984,7 @@ v15 = v14 - 9; if ( !v15 ) { - v0->_415551(0); + v0->DrawMessageBox(0); v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); if ( !pKeyActionMap->field_204 ) @@ -14992,7 +14992,7 @@ _this.Reset(); v0->Release(); pEventTimer->Resume(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; viewparams->bRedrawGameUI = 1; v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); if ( v26 > 0 ) @@ -15021,7 +15021,7 @@ v16 = v15 - 1; if ( !v16 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v22 = (GUIButton *)v0->ptr_1C; if ( (v22->uX & 0x80000000u) == 0 ) @@ -15039,7 +15039,7 @@ } } } - v23 = v0->str_48; + v23 = v0->Hint; viewparams->bRedrawGameUI = 1; if ( v23 ) { @@ -15053,14 +15053,14 @@ v17 = v16 - 1; if ( !v17 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v22 = (GUIButton *)v0->ptr_1C; v47 = v22->pTextures[1]; LABEL_94: pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v47); LABEL_80: - v23 = v0->str_48; + v23 = v0->Hint; viewparams->bRedrawGameUI = 1; if ( v23 ) { @@ -15074,7 +15074,7 @@ v18 = v17 - 1; if ( !v18 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); v22 = (GUIButton *)v0->ptr_1C; pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, v22->pTextures[0]); @@ -15083,7 +15083,7 @@ v19 = v18 - 1; if ( !v19 ) { - if ( v0->str_48 != (char *)1 ) + if ( v0->Hint != (char *)1 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 16)); viewparams->bRedrawGameUI = 1; @@ -15095,7 +15095,7 @@ v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); if ( ptr_507BD0->field_40 == 1 ) { - ptr_507BD0->_415551(0); + ptr_507BD0->DrawMessageBox(0); ptr_507BD0->DrawText( pFontCreate, 30, @@ -15123,7 +15123,7 @@ } pEventTimer->Resume(); ptr_507BD0->Release(); - uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; + pCurrentScreen = 0; goto LABEL_114; } if ( ptr_507BD0->field_40 == 3 ) @@ -15198,13 +15198,13 @@ } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) + if ( pCurrentScreen == 10 ) { Chest::DrawChestUI((unsigned int)v0->ptr_1C); } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 15 ) + if ( pCurrentScreen == 15 ) { pRenderer->ClearZBuffer(0, 479); draw_leather(); @@ -15402,7 +15402,7 @@ if ( !v0->CanAct() ) { sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]); - v43.str_48 = pTmpBuf; + v43.Hint = pTmpBuf; v43.uFrameWidth = 384; v43.uFrameHeight = 180; v43.uFrameY = 40; @@ -15411,7 +15411,7 @@ else v38 = pMouse->GetCursorPos(&a2)->x - 414; v43.uFrameX = v38; - v43._415551(0); + v43.DrawMessageBox(0); return; } --pOut.z; @@ -15820,7 +15820,7 @@ if ( !lpsz ) lpsz = nullstring; } - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameX = 38; a1.uFrameY = 60; a1.uFrameWidth = 276; @@ -15832,7 +15832,7 @@ a1.uFrameHeight = 130; a1.uFrameWidth = 400; a1.uFrameZ = a1.uFrameX + 399; - a1._415551(0); + a1.DrawMessageBox(0); sprintfex(pTmpBuf2, "NPC%03d", v6->uPortraitID); v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE); pRenderer->DrawTextureIndexed( @@ -15900,7 +15900,7 @@ unsigned int pX; // [sp+70h] [bp-8h]@3 unsigned int pY; // [sp+74h] [bp-4h]@3 - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 ) + if ( pCurrentScreen == 16 ) return; if ( _this ) { @@ -15939,9 +15939,9 @@ while ( v1 < 4 ); } pEventTimer->Pause(); - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 10 ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) + if ( pCurrentScreen <= 10 ) + { + if ( pCurrentScreen == 10 ) { if ( !pPlayers[uActiveCharacter]->CanAct() ) { @@ -15950,7 +15950,7 @@ pGlobalTXT_LocalizationStrings[427], pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]); - a1.str_48 = pTmpBuf; + a1.Hint = pTmpBuf; a1.uFrameWidth = 384; a1.uFrameHeight = 180; a1.uFrameY = 40; @@ -15974,13 +15974,13 @@ } else { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 3 ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 7 ) - { - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 8 ) + if ( pCurrentScreen ) + { + if ( pCurrentScreen != 3 ) + { + if ( pCurrentScreen != 7 ) + { + if ( pCurrentScreen == 8 ) { if ( dword_507B00_spell_info_to_draw_in_popup ) DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); @@ -15989,7 +15989,7 @@ } LABEL_119: if ( (signed int)pX > 467 - && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 14 ) + && pCurrentScreen != 14 ) { LABEL_126: identify_item(); @@ -16018,7 +16018,7 @@ || (signed int)pX > (signed int)pViewport->uViewportZ || (signed int)pY < (signed int)pViewport->uViewportY || (signed int)pY > (signed int)pViewport->uViewportW - || (v2 = (char *)sub_444564(), (a1.str_48 = v2) == 0) ) + || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) ) goto LABEL_132; v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); v27 = v30 + 6.7553994e15; @@ -16035,7 +16035,7 @@ a1.ptr_1C = (void *)((signed int)pX / 118); if ( (signed int)pX / 118 < 4 ) { - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameWidth = 400; a1.uFrameHeight = 200; a1.uFrameX = 38; @@ -16051,7 +16051,7 @@ { if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) { - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameWidth = 400; a1.uFrameHeight = 200; a1.uFrameX = 38; @@ -16075,7 +16075,7 @@ sub_416B01(v3); goto LABEL_132; } - a1.str_48 = _4443D5_GetMinimapRightClickText(); + a1.Hint = _4443D5_GetMinimapRightClickText(); a1.uFrameWidth = 256; a1.uFrameX = 130; a1.uFrameY = 140; @@ -16083,10 +16083,10 @@ a1.uFrameHeight = 64; pAudioPlayer->StopChannels(-1, -1); LABEL_42: - a1._415551(0); + a1.DrawMessageBox(0); goto LABEL_132; } - a1.str_48 = 0; + a1.Hint = 0; a1.uFrameWidth = 320; a1.uFrameHeight = 320; v4 = pX - 350; @@ -16105,13 +16105,13 @@ { if ( pRenderer->uNumSceneBegins ) { - a1._415551(1); + a1.DrawMessageBox(1); MonsterPopup_Draw(v6 >> 3, &a1); } else { pRenderer->BeginScene(); - a1._415551(1); + a1.DrawMessageBox(1); MonsterPopup_Draw(v6 >> 3, &a1); pRenderer->EndScene(); } @@ -16126,22 +16126,22 @@ GameUI_DrawItemInfo(v8); goto LABEL_132; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 ) + if ( pCurrentScreen == 13 ) { if ( (signed int)pY < 345 && (signed int)pX < 469 ) sub_4B1A2D(); goto LABEL_132; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 13 ) + if ( pCurrentScreen <= 13 ) goto LABEL_132; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 15 ) + if ( pCurrentScreen <= 15 ) goto LABEL_119; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 21 ) - { - v11 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 23; + if ( pCurrentScreen != 21 ) + { + v11 = pCurrentScreen == 23; goto LABEL_125; } - a1.str_48 = 0; + a1.Hint = 0; v12 = pGUIWindow_CurrentMenu->pControlsHead; if ( !v12 ) goto LABEL_132; @@ -16160,7 +16160,7 @@ { if ( v15 == 65 ) { - a1.str_48 = pClassDescriptions[v12->uControlParam]; + a1.Hint = pClassDescriptions[v12->uControlParam]; v14 = pClassNames[v12->uControlParam]; } else @@ -16178,7 +16178,7 @@ v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder( v12->uControlParam + 4); v14 = pSkillNames[v18]; - a1.str_48 = pSkillDesc[v18]; + a1.Hint = pSkillDesc[v18]; v13 = pY; } goto LABEL_117; @@ -16193,7 +16193,7 @@ } goto LABEL_116; } - a1.str_48 = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; + a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; v14 = aAttributeNames[(signed int)v12->uControlParam % 7]; } goto LABEL_117; @@ -16225,7 +16225,7 @@ v14 = pParty->pPlayers[v20].pName; v19 = pClassDescriptions[pParty->pPlayers[v20].uClass]; LABEL_116: - a1.str_48 = v19; + a1.Hint = v19; goto LABEL_117; } goto LABEL_117; @@ -16237,14 +16237,14 @@ goto LABEL_117; v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21); strcpy(pTmpBuf2, v22); - a1.str_48 = pTmpBuf2; + a1.Hint = pTmpBuf2; v14 = pSkillNames[pY]; LABEL_112: - v23 = a1.str_48; - if ( a1.str_48 ) - { - v24 = a1.str_48; - a1.str_48 = 0; + v23 = a1.Hint; + if ( a1.Hint ) + { + v24 = a1.Hint; + a1.Hint = 0; a1.uFrameWidth = 384; a1.uFrameHeight = 256; a1.uFrameX = 128; @@ -16254,7 +16254,7 @@ + 24; a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1; - a1._415551(0); + a1.DrawMessageBox(0); a1.uFrameX += 12; a1.uFrameWidth -= 24; a1.uFrameY += 12; @@ -16290,7 +16290,7 @@ unsigned int pY; // [sp+18h] [bp-4h]@7 pXY_ = pXY; - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 + if ( pCurrentScreen == 16 || sub_4637E0_is_there_popup_onscreen() ) return; if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 ) @@ -16311,7 +16311,7 @@ y = pY; x = pX; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( pCurrentScreen || !dword_507B98_ctrl_pressed ) goto LABEL_30; v4 = GetCurrentMenuID(); @@ -16545,7 +16545,7 @@ Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; - Dst._415551(0); + Dst.DrawMessageBox(0); Dst.uFrameX += 12; Dst.uFrameWidth -= 24; Dst.uFrameY += 12; diff -r bcc051713d20 -r 79a30ee1ecdb mm7_6.cpp --- a/mm7_6.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_6.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -8922,7 +8922,7 @@ switch ( inputAction ) { case INPUT_MoveForward: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (!pParty->bTurnBasedModeOn) goto _do_move_forward; @@ -8939,7 +8939,7 @@ } break; case INPUT_MoveBackwards: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (!pParty->bTurnBasedModeOn) goto _do_move_backwards; @@ -8956,7 +8956,7 @@ } break; case INPUT_StrafeLeft: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (!pParty->bTurnBasedModeOn) goto _do_strafe_left; @@ -8967,7 +8967,7 @@ partyAction = PARTY_StrafeLeft; goto _add_action_and_continue_; case INPUT_StrafeRight: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (!pParty->bTurnBasedModeOn) goto _do_strafe_right; @@ -8978,7 +8978,7 @@ partyAction = PARTY_StrafeRight; goto _add_action_and_continue_; case INPUT_TurnLeft: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if ( GetAsyncKeyState(VK_CONTROL) ) // strafing { @@ -9005,7 +9005,7 @@ } break; case INPUT_TurnRight: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if ( GetAsyncKeyState(17) ) // strafing { @@ -9033,13 +9033,13 @@ } break; case INPUT_Jump: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( pCurrentScreen || pParty->bTurnBasedModeOn) break; partyAction = (PartyAction)12; goto _add_action_and_continue_; case INPUT_Yell: - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( !pCurrentScreen && uActiveCharacter ) { pParty->Yell(); @@ -9047,7 +9047,7 @@ } break; case INPUT_Pass: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (pParty->bTurnBasedModeOn && pTurnEngine->field_4 == 3) goto LABEL_118; @@ -9066,7 +9066,7 @@ } break; case INPUT_Combat: - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) { if (pParty->bTurnBasedModeOn) { @@ -9084,7 +9084,7 @@ } break; case INPUT_CastReady: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (pParty->bTurnBasedModeOn && pTurnEngine->field_4 == 3) goto LABEL_118; @@ -9120,7 +9120,7 @@ default: break; case INPUT_Attack: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( pCurrentScreen ) break; if (!pParty->bTurnBasedModeOn || pTurnEngine->field_4 != 3) goto LABEL_120; @@ -9128,14 +9128,14 @@ pTurnEngine->field_18 |= 8u; break; case INPUT_EventTrigger: - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) { if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) break; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; goto _send_message; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 4 ) + if ( pCurrentScreen == 4 ) { v11 = pMessageQueue_50CBD0->uNumMessages; if ( pMessageQueue_50CBD0->uNumMessages ) @@ -9160,7 +9160,7 @@ } break; case INPUT_CharCycle: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 8 + if ( pCurrentScreen == 8 || dword_50C9E8 >= 40 ) break; dword_50C9EC[3 * dword_50C9E8] = 176; @@ -9181,19 +9181,19 @@ partyAction = (PartyAction)8; goto _add_action_and_continue_; case INPUT_FlyUp: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( pCurrentScreen || pEventTimer->bPaused ) break; partyAction = (PartyAction)13; goto _add_action_and_continue_; case INPUT_Land: - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( pCurrentScreen || pEventTimer->bPaused ) break; partyAction = (PartyAction)15; goto _add_action_and_continue_; case INPUT_FlyDown: - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions + if ( !pCurrentScreen && !pEventTimer->bPaused ) { partyAction = (PartyAction)14; @@ -9239,15 +9239,15 @@ v14 = v13->IsKeyBeingHeld(v22); if ( v14 && v12 == 9 ) { - if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) + if ( !pCurrentScreen ) { if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) goto LABEL_175; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; goto LABEL_174; } - if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 4 - || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 19 ) + if ( pCurrentScreen == 4 + || pCurrentScreen == 19 ) { v15 = pMessageQueue_50CBD0->uNumMessages; if ( pMessageQueue_50CBD0->uNumMessages ) diff -r bcc051713d20 -r 79a30ee1ecdb mm7_data.cpp --- a/mm7_data.cpp Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_data.cpp Mon Oct 22 20:54:14 2012 +0200 @@ -469,7 +469,7 @@ char aS100110D[777]; // idb char aS100110DS[777]; // idb char aS100110D02dSS[777]; // idb -int uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; // weak +int pCurrentScreen; // weak char byte_4E28FC; // weak unsigned int uGammaPos; int dword_4E2910[777]; // weak diff -r bcc051713d20 -r 79a30ee1ecdb mm7_data.h --- a/mm7_data.h Mon Oct 22 20:45:14 2012 +0200 +++ b/mm7_data.h Mon Oct 22 20:54:14 2012 +0200 @@ -456,7 +456,7 @@ extern char aS100110D[]; // idb extern char aS100110DS[]; // idb extern char aS100110D02dSS[]; // idb -extern int uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; // weak +extern int pCurrentScreen; // weak extern char byte_4E28FC; // weak extern unsigned int uGammaPos; extern int dword_4E2910[]; // weak