Mercurial > mm7
diff mm7_5.cpp @ 1031:f93d17337113
UI stuff.
author | Nomad |
---|---|
date | Tue, 21 May 2013 14:34:14 +0200 |
parents | c94d6a37d298 |
children | 3a5c8df8381d |
line wrap: on
line diff
--- a/mm7_5.cpp Tue May 21 12:52:38 2013 +0200 +++ b/mm7_5.cpp Tue May 21 14:34:14 2013 +0200 @@ -624,16 +624,16 @@ pGUIWindow_CurrentMenu->CreateButton(350u, 224u, 70u, 0x13u, 1, 0, UIMSG_ChangeKeyButton, 0xBu, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, UIMSG_ChangeKeyButton, 0xCu, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, UIMSG_ChangeKeyButton, 0xDu, 0, "", 0); - dword_506E68 = -1; + uGameMenuUI_CurentlySelectedKeyIdx = -1; KeyboardPageNum = 1; - memset(KeyButtonFlagChangesArray, 0, sizeof(KeyButtonFlagChangesArray)); + memset(GameMenuUI_InvaligKeyBindingsFlags, 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags)); //*(_WORD *)KeyButtonArray[28] = 0; memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); //v1 = ""; //v0 = 1; continue; case UIMSG_ChangeKeyButton: - if ( dword_506E68 != -1 ) + if ( uGameMenuUI_CurentlySelectedKeyIdx != -1 ) { pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); continue; @@ -641,7 +641,7 @@ v14 = uMessageParam; if ( KeyboardPageNum != 1 ) v14 = uMessageParam + 14; - dword_506E68 = v14; + uGameMenuUI_CurentlySelectedKeyIdx = v14; pKeyActionMap->EnterText(0, 1, pGUIWindow_CurrentMenu); continue; case UIMSG_ResetKeyMapping: @@ -669,7 +669,7 @@ v18 = uAction++; v13 = uAction > 28; v12 = uAction - 28 < 0; - KeyButtonFlagChangesArray[v18] = 0; + GameMenuUI_InvaligKeyBindingsFlags[v18] = 0; } while ( v12 ^ v13 ); pAudioPlayer->PlaySound((SoundID)219, 0, 0, -1, 0, 0, 0, 0); @@ -1199,22 +1199,25 @@ WriteWindowsRegistryInt("GammaPos", uGammaPos); stru_506E40.Release(); break; + case SCREEN_KEYBOARD_OPTIONS://Return to game v197 = 1; v32 = 0; - while ( KeyButtonFlagChangesArray[v32] != 1 ) + while ( !GameMenuUI_InvaligKeyBindingsFlags[v32]) { ++v32; if ( v32 >= 28 ) { thisb = (signed int)&uTextureID_Optkb; + assert(false && "Invalid condition values"); do { if ( *(int *)thisb ) pIcons_LOD->pTextures[*(int *)thisb].Release(); thisb += 4; } - while ( thisb < (signed int)&dword_507C08 ); + while ( thisb < (signed int)0x00507C08 ); + memset(&uTextureID_Optkb, 0, 0x14u); pIcons_LOD->SyncLoadedFilesCount(); uAction = 0; @@ -10065,7 +10068,7 @@ //----- (004156F0) -------------------------------------------------------- -void __cdecl GUI_UpdateWindows() +void GUI_UpdateWindows() { GUIWindow *pWindow; // esi@4 unsigned int pWindowType; // eax@4 @@ -10113,7 +10116,7 @@ } case WINDOW_Options: { - DrawGameOptions(); + GameMenuUI_Options_Draw(); continue; } case WINDOW_Book: