Mercurial > mm7
diff mm7_5.cpp @ 362:38bfbee60146
Menu options
author | Ritor1 |
---|---|
date | Fri, 22 Feb 2013 01:28:48 +0600 |
parents | 57d81602e72c |
children | 3abebb74fd09 |
line wrap: on
line diff
--- a/mm7_5.cpp Thu Feb 21 22:42:52 2013 +0600 +++ b/mm7_5.cpp Fri Feb 22 01:28:48 2013 +0600 @@ -592,12 +592,12 @@ pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; pCurrentScreen = SCREEN_OPTIONS; - 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); - uTextureID_507C70 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); - uTextureID_507C74 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); - uTextureID_507C64[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE); + uTextureID_ControlBG = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); + uTextureID_Con_Smoo[2] = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); + uTextureID_Con_Smoo[1] = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); + uTextureID_Con_ArrL = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); + uTextureID_Con_ArrR = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); + uTextureID_Con_Smoo[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE); pTextureIDs_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); pTextureIDs_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE); pTextureIDs_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE); @@ -608,71 +608,59 @@ pTextureIDs_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE); pTextureIDs_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE); pTextureIDs_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); - uTextureID_507C84 = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); - uTextureID_507CB0 = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); - uTextureID_507CB8 = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); - uTextureID_507CB4 = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); + uTextureID_Option04 = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); + uTextureID_Option03 = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); + uTextureID_Option02 = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); + uTextureID_Option01 = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0); pGUIWindow_CurrentMenu->CreateButton(0x16u, 0x10Eu, - (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureWidth : 24), - (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureHeight : 26), + (uTextureID_Con_Smoo[2] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[2]].uTextureWidth : 24), + (uTextureID_Con_Smoo[2] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[2]].uTextureHeight : 26), v0, 0, 0xB8u, 0x80u, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0x5Du, 0x10Eu, - (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureWidth : 24), - (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureHeight : 26), + (uTextureID_Con_Smoo[1] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[1]].uTextureWidth : 24), + (uTextureID_Con_Smoo[1] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[1]].uTextureHeight : 26), v0, 0, 0xB8u, 0x40u, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0xA4u, 0x10Eu, - (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureWidth : 24), - (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureHeight : 26), + (uTextureID_Con_Smoo[0] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[0]].uTextureWidth : 24), + (uTextureID_Con_Smoo[0] != -1 ? pIcons_LOD->pTextures[uTextureID_Con_Smoo[0]].uTextureHeight : 26), v0, 0, 0xB8u, 0, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0x14u, 0x12Fu, - (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureWidth : 24), - (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureHeight : 26), + (uTextureID_Option01 != -1 ? pIcons_LOD->pTextures[uTextureID_Option01].uTextureWidth : 24), + (uTextureID_Option01 != -1 ? pIcons_LOD->pTextures[uTextureID_Option01].uTextureHeight : 26), v0, 0, 0xB9u, 0, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0x80u, 0x12Fu, - (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureWidth : 24), - (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureHeight : 26), + (uTextureID_Option02 != -1 ? pIcons_LOD->pTextures[uTextureID_Option02].uTextureWidth : 24), + (uTextureID_Option02 != -1 ? pIcons_LOD->pTextures[uTextureID_Option02].uTextureHeight : 26), v0, 0, 0xBBu, 0, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0x14u, 0x145u, - (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureWidth : 24), - (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureHeight : 26), + (uTextureID_Option03 != -1 ? pIcons_LOD->pTextures[uTextureID_Option03].uTextureWidth : 24), + (uTextureID_Option03 != -1 ? pIcons_LOD->pTextures[uTextureID_Option03].uTextureHeight : 26), v0, 0, 0xE1u, 0, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0x80u, 0x145u, - (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureWidth : 24), - (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureHeight : 26), + (uTextureID_Option04 != -1 ? pIcons_LOD->pTextures[uTextureID_Option04].uTextureWidth : 24), + (uTextureID_Option04 != -1 ? pIcons_LOD->pTextures[uTextureID_Option04].uTextureHeight : 26), v0, 0, 0xE2u, 0, 0, v1, 0); pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(243, 162, 16, 16, v0, 0, 111, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C70], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrL], 0); pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0xA2u, 0x10u, 0x10u, v0, 0, 0x6Fu, 5, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C74], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrR], 0); pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xA2u, 0xACu, 0x11u, v0, 0, 0x6Fu, 0, 0, v1, 0); pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0xF3u, 0xD8u, 0x10u, 0x10u, v0, 0, 0x70u, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C70], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrL], 0); pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0xD8u, 0x10u, 0x10u, v0, 0, 0x70u, 5, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C74], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrR], 0); pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xD8u, 0xACu, 0x11u, v0, 0, 0x70u, 0, 0, v1, 0); pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0xF3u, 0x10Eu, 0x10u, 0x10u, v0, 0, 0xBAu, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C70], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrL], 0); pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0x10Eu, 0x10u, 0x10u, v0, 0, 0xBAu, 5u, 0, v1, - &pIcons_LOD->pTextures[uTextureID_507C74], 0); + &pIcons_LOD->pTextures[uTextureID_Con_ArrR], 0); pGUIWindow_CurrentMenu->CreateButton(0x107u, 0x10Eu, 0xACu, 0x11u, v0, 0, 0xBAu, 0, 0, v1, 0); pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, v0, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[619],// "Return to Game" 0); pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x8Cu, 0xD6u, 0x28u, v0, 0, 0x19Fu, 0, 0x4Bu, v1, 0); - pTexture = 0; - v150 = v1; - v143 = 86; - v138 = 0; - v134 = 421; - v131 = 0; - v129 = v0; - v126 = 40; - v124 = 214; - v122 = 194; - v120 = 19; - //goto LABEL_117; - pGUIWindow_CurrentMenu->CreateButton(v120, v122, v124, v126, v129, v131, v134, v138, v143, v150, pTexture); + pGUIWindow_CurrentMenu->CreateButton(19, 194, 214, 40, v0, 0, 421, 0, 86, v1, 0); continue; case UIMSG_OpenKeyMappingOptions: if ( pMessageQueue_50CBD0->uNumMessages ) @@ -680,11 +668,11 @@ pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = 1; pCurrentScreen = SCREEN_KEYBOARD_OPTIONS; - 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); - uTextureID_507C00 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); - uTextureID_507C04 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); + uTextureID_Optkb = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); + uTextureID_Optkb_h = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); + uTextureID_KeyResume1 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); + uTextureID_Optkb_1 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); + uTextureID_Optkb_2 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0); pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, 0x71u, 0, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A0u, 0, 0, "", 0); @@ -706,7 +694,7 @@ pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 0xCu, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 0xDu, 0, "", 0); dword_506E68 = -1; - dword_506F08 = 1; + KeyboardPageNum = 1; memset(word_506E6C, 0, 0x1Cu); word_506E6C[14] = 0; memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); @@ -716,11 +704,14 @@ continue; //default: //continue; - case UIMSG_1A3: + case UIMSG_ChangeKeyButton: if ( dword_506E68 != -1 ) - goto LABEL_623; + { + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; + } v14 = uMessageParam; - if ( dword_506F08 != v0 ) + if ( KeyboardPageNum != v0 ) v14 = uMessageParam + 14; dword_506E68 = v14; pKeyActionMap->EnterText(0, v0, pGUIWindow_CurrentMenu); @@ -762,11 +753,11 @@ v130 = 0; v127 = 219; goto _play_sound_and_continue; - case UIMSG_1A0: - dword_506F08 = v0; - continue; - case UIMSG_1A1: - dword_506F08 = 2; + case UIMSG_SelectKeyPage1: + KeyboardPageNum = v0; + continue; + case UIMSG_SelectKeyPage2: + KeyboardPageNum = 2; continue; case UIMSG_OpenVideoOptions: if ( pMessageQueue_50CBD0->uNumMessages ) @@ -1348,7 +1339,7 @@ pEventTimer->Resume(); continue; case SCREEN_OPTIONS: - thisa = (signed int)&uTextureID_507C60; + thisa = (signed int)&uTextureID_ControlBG; do { if ( *(int *)thisa ) @@ -1356,7 +1347,7 @@ thisa += 4; } while ( thisa < (signed int)&dword_507CBC ); - memset(&uTextureID_507C60, 0, 0x5Cu); + memset(&uTextureID_ControlBG, 0, 0x5Cu); pIcons_LOD->_40F9C5(); WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier); WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier); @@ -1437,7 +1428,7 @@ ++v32; if ( v32 >= 28 ) { - thisb = (signed int)&uTextureID_507BF4; + thisb = (signed int)&uTextureID_Optkb; do { if ( *(int *)thisb ) @@ -1445,7 +1436,7 @@ thisb += 4; } while ( thisb < (signed int)&dword_507C08 ); - memset(&uTextureID_507BF4, 0, 0x14u); + memset(&uTextureID_Optkb, 0, 0x14u); pIcons_LOD->_40F9C5(); uAction = 0; do @@ -1479,7 +1470,8 @@ break; } } - goto LABEL_623; + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; case SCREEN_REST: if ( dword_506F14 ) { @@ -1726,31 +1718,31 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0); - uTextureID_507944 = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); - uTextureID_507940 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); - uTextureID_50793C = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); - uTextureID_507938 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); - uTextureID_507934 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); - uTextureID_507930 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); - uTextureID_50792C = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE); + uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); + uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); + uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); + uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); + uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); + uTextureID_Resume1 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); + uTextureID_Quit1 = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE); pBtn_NewGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x9Bu, 0xD6u, 0x28u, v0, 0, 0x7Cu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[614],// "New Game" - (Texture *)(uTextureID_507940 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507940] : 0), 0); + (Texture *)(uTextureID_New1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_New1] : 0), 0); pBtn_SaveGame = pGUIWindow_CurrentMenu->CreateButton(0x13u, 0xD1u, 0xD6u, 0x28u, v0, 0, 0x7Eu, 0, 0x53u, pGlobalTXT_LocalizationStrings[615],// "Save Game" - (Texture *)(uTextureID_507938 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507938] : 0), 0); + (Texture *)(uTextureID_Save1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Save1] : 0), 0); pBtn_LoadGame = pGUIWindow_CurrentMenu->CreateButton(19, 263, 0xD6u, 0x28u, v0, 0, 0x7Du, 0, 0x4Cu, pGlobalTXT_LocalizationStrings[616],// "Load Game" - (Texture *)(uTextureID_50793C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50793C] : 0), 0); + (Texture *)(uTextureID_Load1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Load1] : 0), 0); pBtn_GameControls = pGUIWindow_CurrentMenu->CreateButton(241, 155, 214, 40, v0, 0, 0x7Fu, 0, 0x43u, pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:"" - (Texture *)(uTextureID_507934 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507934] : 0), 0); + (Texture *)(uTextureID_Controls1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Controls1] : 0), 0); pBtn_QuitGame = pGUIWindow_CurrentMenu->CreateButton(241, 209, 214, 40, v0, 0, 0x84u, 0, 0x51u, pGlobalTXT_LocalizationStrings[618],// "Quit" - (Texture *)(uTextureID_50792C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50792C] : 0), 0); + (Texture *)(uTextureID_Quit1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Quit1] : 0), 0); pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(241, 263, 214, 40, v0, 0, 0x7Bu, 0, 0x52u, pGlobalTXT_LocalizationStrings[619],// "Return to Game" - (Texture *)(uTextureID_507930 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507930] : 0), 0); + (Texture *)(uTextureID_Resume1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Resume1] : 0), 0); pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0); viewparams->field_48 = v0; stru_506E40.Release(); @@ -2609,7 +2601,11 @@ continue; case UIMSG_19: if ( bUnderwater == 1 ) - goto LABEL_682; + { + ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; + } if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) //goto LABEL_90; { @@ -2617,13 +2613,7 @@ v0 = 1; continue; } - v79 = pPlayer2->uQuickSpell; - v175 = uActiveCharacter; - v159 = 0; - v147 = 0; - v80 = uActiveCharacter - 1; - //goto LABEL_679; - _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); + _42777D_CastSpell_UseWand_ShootArrow(pPlayer2->uQuickSpell, uActiveCharacter - 1, 0, 0, uActiveCharacter); continue; case UIMSG_46: case UIMSG_8C: @@ -2760,7 +2750,9 @@ //goto LABEL_621; { v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" - goto LABEL_622; + ShowStatusBarString(v96, 2); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; } GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, (enum WindowType)90, (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" @@ -2772,7 +2764,9 @@ //goto LABEL_621; { v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" - goto LABEL_622; + ShowStatusBarString(v96, 2); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; } GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, (enum WindowType)90, (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" @@ -2865,7 +2859,9 @@ //goto LABEL_621; { v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" - goto LABEL_622; + ShowStatusBarString(v96, 2); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; } if ( pParty->uNumFoodRations < uRestUI_FoodRequiredToRest ) { @@ -2945,7 +2941,9 @@ { //LABEL_621: v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" - goto LABEL_622; + ShowStatusBarString(v96, 2); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); + continue; } GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, (enum WindowType)90, (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" @@ -3155,11 +3153,7 @@ continue; if ( bUnderwater == 1 ) { -LABEL_682: - v96 = pGlobalTXT_LocalizationStrings[652];// "You can not do that while you are underwater!" -LABEL_622: - ShowStatusBarString(v96, 2u); -LABEL_623: + ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" v165 = 0; v151 = 0; v144 = 0; @@ -14832,16 +14826,10 @@ dword_506E68 = -1; v3->field_40 = 0; } - pRenderer->DrawTextureIndexed( - 8u, - 8u, - (Texture *)(uTextureID_507BF4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507BF4] : 0)); - if ( dword_506F08 == 1 ) - { - pRenderer->DrawTextureIndexed( - 0x13u, - 0x12Eu, - (Texture *)(uTextureID_507C00 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C00] : 0)); + pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Optkb != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb] : 0)); + if ( KeyboardPageNum == 1 ) + { + pRenderer->DrawTextureIndexed(0x13, 0x12E, (Texture *)(uTextureID_Optkb_1 != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb_1] : 0)); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0); v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]); v7 = sub_414D24(0); @@ -14904,10 +14892,7 @@ } else { - pRenderer->DrawTextureIndexed( - 0x7Fu, - 0x12Eu, - (Texture *)(uTextureID_507C04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C04] : 0)); + pRenderer->DrawTextureIndexed(0x7F, 0x12E, (Texture *)(uTextureID_Optkb_2 != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb_2] : 0)); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0); v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]); v34 = sub_414D24(14); @@ -15066,18 +15051,12 @@ //----- (00414F82) -------------------------------------------------------- -void __cdecl sub_414F82_DrawGameOptions() +void __cdecl DrawGameOptions() { signed int v0; // eax@1 - pRenderer->DrawTextureIndexed( - 8u, - 8u, - (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0)); - pRenderer->DrawTextureIndexed( - 8u, - 0x84u, - (Texture *)(uTextureID_507C60 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C60] : 0)); + pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0)); + pRenderer->DrawTextureIndexed(8, 132, (Texture *)(uTextureID_ControlBG != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG] : 0)); v0 = 0; if ( uTurnSpeed == 128 ) { @@ -15088,41 +15067,20 @@ if ( uTurnSpeed == 64 ) v0 = 1; } - pRenderer->DrawTextureIndexed( - dword_4E2910[v0], - 0x10Eu, - (Texture *)(uTextureID_507C64[v0] != -1 ? &pIcons_LOD->pTextures[uTextureID_507C64[v0]] : 0)); + pRenderer->DrawTextureIndexed(BtnTurnCoord[v0], 270, (Texture *)(uTextureID_Con_Smoo[v0] != -1 ? &pIcons_LOD->pTextures[uTextureID_Con_Smoo[v0]] : 0)); if ( bWalkSound ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x12Fu, - (Texture *)(uTextureID_507CB4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB4] : 0)); + pRenderer->DrawTextureIndexed(20, 303, (Texture *)(uTextureID_Option01 != -1 ? &pIcons_LOD->pTextures[uTextureID_Option01] : 0)); if ( bShowDamage ) - pRenderer->DrawTextureIndexed( - 0x80u, - 0x12Fu, - (Texture *)(uTextureID_507CB8 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB8] : 0)); + pRenderer->DrawTextureIndexed(128, 303, (Texture *)(uTextureID_Option02 != -1 ? &pIcons_LOD->pTextures[uTextureID_Option02] : 0)); if ( bFlipOnExit ) - pRenderer->DrawTextureIndexed( - 0x80u, - 0x145u, - (Texture *)(uTextureID_507C84 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C84] : 0)); + pRenderer->DrawTextureIndexed(128, 325, (Texture *)(uTextureID_Option04 != -1 ? &pIcons_LOD->pTextures[uTextureID_Option04] : 0)); if ( bAlwaysRun ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x145u, - (Texture *)(uTextureID_507CB0 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB0] : 0)); - pRenderer->DrawTextureIndexed( - 17 * (char)uSoundVolumeMultiplier + 265, - 0xA2u, + pRenderer->DrawTextureIndexed(20, 325, (Texture *)(uTextureID_Option03 != -1 ? &pIcons_LOD->pTextures[uTextureID_Option03] : 0)); + pRenderer->DrawTextureIndexed(17 * (char)uSoundVolumeMultiplier + 265, 162, (Texture *)(pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier]] : 0)); - pRenderer->DrawTextureIndexed( - 17 * (char)uMusicVolimeMultiplier + 265, - 0xD8u, + pRenderer->DrawTextureIndexed(17 * (char)uMusicVolimeMultiplier + 265, 216, (Texture *)(pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier]] : 0)); - pRenderer->DrawTextureIndexed( - 17 * (char)uVoicesVolumeMultiplier + 265, - 0x10Eu, + pRenderer->DrawTextureIndexed(17 * (char)uVoicesVolumeMultiplier + 265, 270, (Texture *)(pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier]] : 0)); } @@ -15859,7 +15817,7 @@ } else if (pWindowType == WINDOW_Options) { - sub_414F82_DrawGameOptions(); + DrawGameOptions(); } } else if (pWindowType == WINDOW_CharacterRecord) @@ -15868,7 +15826,7 @@ } continue; } - pTexture = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0);//pWindowType == 3 (0x3) + pTexture = (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0);//pWindowType == 3 (0x3) pY = pViewport->uViewportY; pX = pViewport->uViewportX; //goto LABEL_18;