Mercurial > might-and-magic-trilogy
diff mm7_1.cpp @ 46:79a30ee1ecdb
Merge
author | Nomad |
---|---|
date | Mon, 22 Oct 2012 20:54:14 +0200 |
parents | bcc051713d20 916bec351934 |
children | 8a8dd0164b12 |
line wrap: on
line diff
--- 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)