# HG changeset patch
# User a.parshin
# Date 1431359102 -7200
# Node ID 4087cbc62706e4cd76dba7ddd374cb57476ffa19
# Parent e06a3fe9ad6e43c218b91bd7c6c4e2a050010ef5
GameMenu logic moved to GUIWindow_GameMenu
the same for game menu options
diff -r e06a3fe9ad6e -r 4087cbc62706 Build/Visual Studio 2013/World of Might and Magic.vcxproj
--- a/Build/Visual Studio 2013/World of Might and Magic.vcxproj Mon May 11 16:43:46 2015 +0200
+++ b/Build/Visual Studio 2013/World of Might and Magic.vcxproj Mon May 11 17:45:02 2015 +0200
@@ -171,7 +171,6 @@
-
@@ -344,7 +343,6 @@
-
diff -r e06a3fe9ad6e -r 4087cbc62706 Build/Visual Studio 2013/World of Might and Magic.vcxproj.filters
--- a/Build/Visual Studio 2013/World of Might and Magic.vcxproj.filters Mon May 11 16:43:46 2015 +0200
+++ b/Build/Visual Studio 2013/World of Might and Magic.vcxproj.filters Mon May 11 17:45:02 2015 +0200
@@ -508,9 +508,6 @@
GUI\UI
-
- GUI\UI
-
GUI\UI
@@ -1258,9 +1255,6 @@
GUI\UI
-
- GUI\UI
-
GUI\UI
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/GUIWindow.cpp
--- a/GUI/GUIWindow.cpp Mon May 11 16:43:46 2015 +0200
+++ b/GUI/GUIWindow.cpp Mon May 11 17:45:02 2015 +0200
@@ -1615,28 +1615,24 @@
-void GUIWindow_GameMenu::Update()
-{
- pRenderer->DrawTextureIndexed(
- pViewport->uViewportTL_Y,
- pViewport->uViewportTL_X,
- pIcons_LOD->GetTexture(uTextureID_Options)
- );
- viewparams->bRedrawGameUI = 1;
-}
-
void GUIWindow_CharacterRecord::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]);
}
void GUIWindow_Book::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
BookUI_Draw((WindowType)(int)ptr_1C);
}
void GUIWindow_BooksWindow::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
auto pButton = (GUIButton *)ptr_1C;
pRenderer->DrawTextureIndexed(uFrameY, uFrameX, pButton->pTextures[0]);
viewparams->bRedrawGameUI = true;
@@ -1644,26 +1640,36 @@
void GUIWindow_QuickReference::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
GameUI_QuickRef_Draw();
}
void GUIWindow_Dialogue::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
GameUI_DrawDialogue();
}
void GUIWindow_GenericDialogue::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
GameUI_DrawBranchlessDialogue();
}
void GUIWindow_Spellbook::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
DrawSpellBookContent(pPlayers[uActiveCharacter]);
}
void GUIWindow_Chest::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (current_screen_type == SCREEN_CHEST)
{
Chest::DrawChestUI(par1C);
@@ -1679,16 +1685,22 @@
void GUIWindow_Save::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
SaveUI_Draw();
}
void GUIWindow_Load::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
LoadUI_Draw();
}
void GUIWindow_House::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
HouseDialogManager();
if (!window_SpeakInHouse)
return;
@@ -1705,11 +1717,15 @@
void GUIWindow_Scroll::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
CreateScrollWindow();
}
void GUIWindow_Inventory::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
DrawMessageBox(0);
DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
@@ -1729,6 +1745,8 @@
void GUIWindow_Inventory_CastSpell::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
pRenderer->ClearZBuffer(0, 479);
draw_leather();
CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
@@ -1738,11 +1756,15 @@
void GUIWindow_Modal::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
ModalWindow_ShowHint();
}
void OnButtonClick::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
GUIButton *pButton = (GUIButton *)ptr_1C;
@@ -1755,6 +1777,8 @@
void OnButtonClick2::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
GUIButton *pButton = (GUIButton *)ptr_1C;
@@ -1778,6 +1802,8 @@
void OnButtonClick3::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pButton = (GUIButton *)ptr_1C;
@@ -1790,6 +1816,8 @@
void OnButtonClick4::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pButton = (GUIButton *)ptr_1C;
@@ -1801,6 +1829,8 @@
void OnSaveLoad::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pButton = (GUIButton *)ptr_1C;
@@ -1818,6 +1848,8 @@
void OnCancel::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pGUIButton = (GUIButton *)ptr_1C;
@@ -1832,6 +1864,8 @@
void OnCancel2::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pButton = (GUIButton *)ptr_1C;
@@ -1846,6 +1880,8 @@
void OnCancel3::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
if (Hint != (char *)1)
pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
auto pButton = (GUIButton *)ptr_1C;
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/GUIWindow.h
--- a/GUI/GUIWindow.h Mon May 11 16:43:46 2015 +0200
+++ b/GUI/GUIWindow.h Mon May 11 17:45:02 2015 +0200
@@ -379,15 +379,6 @@
};
#pragma pack(pop)
-struct GUIWindow_GameMenu : public GUIWindow
-{
- GUIWindow_GameMenu(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
- GUIWindow(x, y, width, height, button, hint)
- {}
- virtual ~GUIWindow_GameMenu() {}
-
- virtual void Update();
-};
struct GUIWindow_CharacterRecord : public GUIWindow
{
GUIWindow_CharacterRecord(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
@@ -755,13 +746,6 @@
void GameUI_DrawDialogue();
-// game menu ui
-GUIWindow *GameMenuUI_Load();
-GUIWindow *GameMenuUI_Options_Load();
-GUIWindow *GameMenuUI_OptionsKeymapping_Load();
-GUIWindow *GameMenuUI_OptionsVideo_Load();
-
-
// character ui
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/UI/UIGame.h
--- a/GUI/UI/UIGame.h Mon May 11 16:43:46 2015 +0200
+++ b/GUI/UI/UIGame.h Mon May 11 17:45:02 2015 +0200
@@ -1,5 +1,47 @@
#pragma once
+#include "GUI/GUIWindow.h"
+
void GameUI_WritePointedObjectStatusString();
void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID); // idb
__int16 __fastcall sub_441A4E(int a1);
+
+
+
+struct GUIWindow_GameMenu : public GUIWindow
+{
+ GUIWindow_GameMenu();
+ virtual ~GUIWindow_GameMenu() {}
+
+ virtual void Update();
+};
+
+
+
+struct GUIWindow_GameOptions : public GUIWindow
+{
+ GUIWindow_GameOptions();
+ virtual ~GUIWindow_GameOptions() {}
+
+ virtual void Update();
+};
+
+
+
+struct GUIWindow_GameKeyBindings : public GUIWindow
+{
+ GUIWindow_GameKeyBindings();
+ virtual ~GUIWindow_GameKeyBindings() {}
+
+ virtual void Update();
+};
+
+
+
+struct GUIWindow_GameVideoOptions : public GUIWindow
+{
+ GUIWindow_GameVideoOptions();
+ virtual ~GUIWindow_GameVideoOptions() {}
+
+ virtual void Update();
+};
\ No newline at end of file
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/UI/UIOptions.cpp
--- a/GUI/UI/UIOptions.cpp Mon May 11 16:43:46 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-#define _CRTDBG_MAP_ALLOC
-#include
-#include
-
-#define _CRT_SECURE_NO_WARNINGS
-
-#include "Engine/Engine.h"
-#include "Engine/Graphics/IndoorCameraD3D.h"
-#include "Engine/Graphics/GammaControl.h"
-#include "Engine/Graphics/Render.h"
-#include "Engine/LOD.h"
-#include "Engine/texts.h"
-
-#include "IO/Keyboard.h"
-
-#include "GUI/UI/UIOptions.h"
-#include "GUI/GUIFont.h"
-
-#include "Media/Audio/AudioPlayer.h"
-
-
-
-
-
-OptionsMenuSkin options_menu_skin; // 507C60
-
-
-GUIWindow *GameMenuUI_Load()
-{
- auto wnd = new GUIWindow_GameMenu(0, 0, window->GetWidth(), window->GetHeight(), 0, 0);
-
- 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 = wnd->CreateButton(
- 0x13u, 0x9Bu, 0xD6u, 0x28u, 1, 0, UIMSG_StartNewGame, 0, 0x4Eu,
- pGlobalTXT_LocalizationStrings[614],// "New Game"
- pIcons_LOD->GetTexture(uTextureID_New1),
- 0
- );
- pBtn_SaveGame = wnd->CreateButton(
- 0x13u, 0xD1u, 0xD6u, 0x28u, 1, 0, UIMSG_Game_OpenSaveGameDialog, 0, 0x53u,
- pGlobalTXT_LocalizationStrings[615],// "Save Game"
- pIcons_LOD->GetTexture(uTextureID_Save1),
- 0
- );
- pBtn_LoadGame = wnd->CreateButton(
- 19, 263, 0xD6u, 0x28u, 1, 0, UIMSG_Game_OpenLoadGameDialog, 0, 0x4Cu,
- pGlobalTXT_LocalizationStrings[616],// "Load Game"
- pIcons_LOD->GetTexture(uTextureID_Load1),
- 0
- );
- pBtn_GameControls = wnd->CreateButton(
- 241, 155, 214, 40, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0x43u,
- pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:""
- pIcons_LOD->GetTexture(uTextureID_Controls1),
- 0
- );
- pBtn_QuitGame = wnd->CreateButton(
- 241, 209, 214, 40, 1, 0, UIMSG_Quit, 0, 0x51u,
- pGlobalTXT_LocalizationStrings[618],// "Quit"
- pIcons_LOD->GetTexture(uTextureID_Quit1),
- 0
- );
- pBtn_Resume = wnd->CreateButton(
- 241, 263, 214, 40, 1, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u,
- pGlobalTXT_LocalizationStrings[619],// "Return to Game"
- pIcons_LOD->GetTexture(uTextureID_Resume1),
- 0
- );
- wnd->_41D08F_set_keyboard_control_group(6, 1, 0, 0);
-
- return wnd;
-}
-
-
-std::array GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
-//----- (00414D24) --------------------------------------------------------
-static unsigned int GameMenuUI_GetKeyBindingColor(int key_index)
-{
- if (uGameMenuUI_CurentlySelectedKeyIdx == key_index)
- {
- if (GetTickCount() % 1000 < 500)
- return ui_gamemenu_keys_key_selection_blink_color_1;
- else
- return ui_gamemenu_keys_key_selection_blink_color_2;
- }
- else if (GameMenuUI_InvaligKeyBindingsFlags[key_index])
- {
- int intensity;
-
- int time = GetTickCount() % 800;
- if (time < 400)
- intensity = - 70 + 70 * time / 400;
- else
- intensity = + 70 - 70 * time / 800;
-
- return Color16(185 + intensity, 40 + intensity / 4, 40 + intensity / 4);
- }
-
- return ui_gamemenu_keys_key_default_color;
-}
-
-
-GUIWindow *GameMenuUI_OptionsKeymapping_Load()
-{
- uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE);
- uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE);
- uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
- uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE);
- uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE);
-
- auto wnd = new GUIWindow_KeymappingOptions(0, 0, window->GetWidth(), window->GetHeight(), 0, 0);
-
- wnd->CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0, "", 0);
-
- wnd->CreateButton(19, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0);
- wnd->CreateButton(127, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0);
- wnd->CreateButton(127, 324, 108, 20, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0);
- wnd->CreateButton(19, 324, 108, 20, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0);
-
- wnd->CreateButton(129, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 0, 0, "", 0);
- wnd->CreateButton(129, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 1, 0, "", 0);
- wnd->CreateButton(129, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 2, 0, "", 0);
- wnd->CreateButton(129, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 3, 0, "", 0);
- wnd->CreateButton(129, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 4, 0, "", 0);
- wnd->CreateButton(129, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 5, 0, "", 0);
- wnd->CreateButton(129, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 6, 0, "", 0);
-
- wnd->CreateButton(350, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 7, 0, "", 0);
- wnd->CreateButton(350, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 8, 0, "", 0);
- wnd->CreateButton(350, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 9, 0, "", 0);
- wnd->CreateButton(350, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 10, 0, "", 0);
- wnd->CreateButton(350, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 11, 0, "", 0);
- wnd->CreateButton(350, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 12, 0, "", 0);
- wnd->CreateButton(350, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 13, 0, "", 0);
-
- uGameMenuUI_CurentlySelectedKeyIdx = -1;
- KeyboardPageNum = 1;
- memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
- memcpy(pPrevVirtualCidesMapping.data(), pKeyActionMap->pVirtualKeyCodesMapping, 0x78u);
-
- return wnd;
-}
-
-//----- (004142D3) --------------------------------------------------------
-void GUIWindow_KeymappingOptions::Update()
-{
- signed int v4; // ecx@7
- signed int v5; // eax@8
-
- if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
- {
- pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0];
- memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
- v4 = 0;
- do
- {
- v5 = 0;
- do
- {
- if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
- {
- GameMenuUI_InvaligKeyBindingsFlags[v4] = true;
- GameMenuUI_InvaligKeyBindingsFlags[v5] = true;
- }
- ++v5;
- }
- while ( v5 < 28 );
- ++v4;
- }
- while ( v4 < 28 );
- uGameMenuUI_CurentlySelectedKeyIdx = -1;
- pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
- }
- pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));//draw base texture
- if ( KeyboardPageNum == 1 )
- {
- pRenderer->DrawTextureIndexed(19, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[3]));
-
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0);
- }
- else
- {
- pRenderer->DrawTextureIndexed(127, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[4]));
-
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0);
- pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[27]), 0, 0, 0);
- }
-}
-
-
-GUIWindow *GameMenuUI_OptionsVideo_Load()
-{
- optvid_base_texture_id = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE);
- bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE);
- us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE);
- tinting_texture_id = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE);
- uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
- uTextureID_507C24 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
- pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
- not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
- not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
- not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
- auto wnd = new GUIWindow_VideoOptions(0, 0, window->GetWidth(), window->GetHeight(), 0, 0);
- wnd->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0);
- //if ( pRenderer->pRenderD3D )
- {
- wnd->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0);
- wnd->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0);
- wnd->CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleTint, 0, 0, "", 0);
- }
- /*if ( !pRenderer->bWindowMode )
- {
- //v0 = 1;
- if ( pRenderer->IsGammaSupported() )
- {
- pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0x15u, 0xA1u, 0x10u, 0x10u, 1, 0, UIMSG_1A9, 4u, 0, "", pIcons_LOD->GetTexture(uTextureID_507C20), 0);
- pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0xD5u, 0xA1u, 0x10u, 0x10u, 1, 0, UIMSG_1A9, 5u, 0, "", pIcons_LOD->GetTexture(uTextureID_507C24), 0);
- pGUIWindow_CurrentMenu->CreateButton(42, 162, 170, 18, 1, 0, UIMSG_1A9, 0, 0, "", 0);
- }
- }*/
-
- return wnd;
-}
-
-
-
-//----- (00414D9A) --------------------------------------------------------
-void GUIWindow_VideoOptions::Update()
-{
- GUIWindow msg_window; // [sp+8h] [bp-54h]@3
-
- pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(optvid_base_texture_id));//draw base texture
- //if ( !pRenderer->bWindowMode && pRenderer->IsGammaSupported() )
- {
- pRenderer->DrawTextureIndexed(17 * uGammaPos + 42, 162, pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos]));
- pRenderer->DrawTextureRGB(274, 169, &stru_506E40);//review_window
- msg_window.uFrameX = 22;
- msg_window.uFrameY = 190;
- msg_window.uFrameWidth = 211;
- msg_window.uFrameHeight = 79;
- msg_window.uFrameZ = 232;
- msg_window.uFrameW = 268;
- msg_window.DrawTitleText(pFontSmallnum, 0, 0, ui_gamemenu_video_gamma_title_color, pGlobalTXT_LocalizationStrings[226], 3); // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor."
- }
-
- /*if (!pRenderer->pRenderD3D)
- {
- pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(not_available_bloodsplats_texture_id));
- pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(not_available_us_colored_lights_texture_id));
- pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(not_available_tinting_texture_id));
- }
- else*/
- {
- if (pEngine->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS)
- pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(bloodsplats_texture_id));
- if (pRenderer->bUseColoredLights)
- pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(us_colored_lights_texture_id));
- if (pRenderer->bTinting)
- pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(tinting_texture_id));
- }
-}
-
-
-GUIWindow *GameMenuUI_Options_Load()
-{
- options_menu_skin.uTextureID_Background = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_TurnSpeed[2] = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_TurnSpeed[1] = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_TurnSpeed[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_ArrowLeft = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_ArrowRight = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE);
- options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE);
-
- auto wnd = new GUIWindow_Options(0, 0, window->GetWidth(), window->GetHeight());
- wnd->CreateButton(22, 270,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight,
- 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0);
- wnd->CreateButton(93, 270,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureHeight,
- 1, 0, UIMSG_SetTurnSpeed, 0x40u, 0, "", 0);
- wnd->CreateButton(164, 270,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureHeight,
- 1, 0, UIMSG_SetTurnSpeed, 0, 0, "", 0);
-
- wnd->CreateButton(20, 303,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureHeight,
- 1, 0, UIMSG_ToggleWalkSound, 0, 0, "", 0);
- wnd->CreateButton(128, 303,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureHeight,
- 1, 0, UIMSG_ToggleShowDamage, 0, 0, "", 0);
- wnd->CreateButton(20, 325,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureHeight,
- 1, 0, UIMSG_ToggleAlwaysRun, 0, 0, "", 0);
- wnd->CreateButton(128, 325,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureWidth,
- pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureHeight,
- 1, 0, UIMSG_ToggleFlipOnExit, 0, 0, "", 0);
-
- pBtn_SliderLeft = wnd->CreateButton(243, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
- pBtn_SliderRight = wnd->CreateButton(435, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
- wnd->CreateButton(263, 162, 172, 17, 1, 0, UIMSG_ChangeSoundVolume, 0, 0, "", 0);
-
- pBtn_SliderLeft = wnd->CreateButton(243, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
- pBtn_SliderRight = wnd->CreateButton(435, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
- wnd->CreateButton(263, 216, 172, 17, 1, 0, UIMSG_ChangeMusicVolume, 0, 0, "", 0);
-
- pBtn_SliderLeft = wnd->CreateButton(243, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
- pBtn_SliderRight = wnd->CreateButton(435, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
- wnd->CreateButton(263, 270, 172, 17, 1, 0, UIMSG_ChangeVoiceVolume, 0, 0, "", 0);
-
- wnd->CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[619], 0); // "Return to Game"
- wnd->CreateButton(19, 140, 214, 40, 1, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu, "", 0);
- wnd->CreateButton(19, 194, 214, 40, 1, 0, UIMSG_OpenVideoOptions, 0, 86, "", 0);
-
- return wnd;
-}
-
-
-
-
-//----- (00414F82) --------------------------------------------------------
-void GUIWindow_Options::Update()
-{
- pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options));
- pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background));
-
- switch (uTurnSpeed)
- {
- case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])); break;
- case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])); break;
- default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])); break;
- }
-
- if (bWalkSound) pRenderer->DrawTextureIndexed( 20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound));
- if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage));
- if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit));
- if (bAlwaysRun) pRenderer->DrawTextureIndexed( 20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun));
-
- pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier]));
- pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier]));
- pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier]));
-}
-
-OptionsMenuSkin::OptionsMenuSkin():
- uTextureID_Background(0),
- uTextureID_ArrowLeft(0),
- uTextureID_ArrowRight(0),
- uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0),
- uTextureID_FlipOnExit(0),
- uTextureID_AlwaysRun(0),
- uTextureID_WalkSound(0),
- uTextureID_ShowDamage(0)
-{
- for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
- for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
-}
-
-void OptionsMenuSkin::Relaease()
-{
- #define RELEASE(id) \
- {\
- if (id)\
- pIcons_LOD->GetTexture(id)->Release();\
- id = 0;\
- }
-
- RELEASE(uTextureID_Background);
- for (uint i = 0; i < 3; ++i)
- RELEASE(uTextureID_TurnSpeed[i]);
- RELEASE(uTextureID_ArrowLeft);
- RELEASE(uTextureID_ArrowRight);
- RELEASE(uTextureID_FlipOnExit);
- for (uint i = 0; i < 10; ++i)
- RELEASE(uTextureID_SoundLevels[i]);
- RELEASE(uTextureID_AlwaysRun);
- RELEASE(uTextureID_WalkSound);
- RELEASE(uTextureID_ShowDamage);
-
- #undef RELEASE
-}
\ No newline at end of file
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/UI/UIOptions.h
--- a/GUI/UI/UIOptions.h Mon May 11 16:43:46 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#pragma once
-#include "GUI/GUIWindow.h"
-
-struct GUIWindow_Options : public GUIWindow
-{
- GUIWindow_Options(unsigned int x, unsigned int y, unsigned int width, unsigned int height) :
- GUIWindow(x, y, width, height, 0, nullptr)
- {}
- virtual ~GUIWindow_Options() {}
-
- virtual void Update();
-};
-
-
-
-struct GUIWindow_KeymappingOptions : public GUIWindow
-{
- GUIWindow_KeymappingOptions(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
- GUIWindow(x, y, width, height, button, hint)
- {}
- virtual ~GUIWindow_KeymappingOptions() {}
-
- virtual void Update();
-};
-
-
-
-struct GUIWindow_VideoOptions : public GUIWindow
-{
- GUIWindow_VideoOptions(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
- GUIWindow(x, y, width, height, button, hint)
- {}
- virtual ~GUIWindow_VideoOptions() {}
-
- virtual void Update();
-};
\ No newline at end of file
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/UI/UITransition.cpp
--- a/GUI/UI/UITransition.cpp Mon May 11 16:43:46 2015 +0200
+++ b/GUI/UI/UITransition.cpp Mon May 11 17:45:02 2015 +0200
@@ -143,6 +143,7 @@
}
+
//----- (00444C8F) --------------------------------------------------------
GUIWindow_Travel::GUIWindow_Travel() :
GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
@@ -203,6 +204,8 @@
//----- (00444DCA) --------------------------------------------------------
void GUIWindow_Travel::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
GUIWindow travel_window; // [sp+Ch] [bp-78h]@1
char pDestinationMapName[32]; // [sp+60h] [bp-24h]@1
@@ -240,6 +243,8 @@
//----- (00444A51) --------------------------------------------------------
void GUIWindow_Transition::Update()
{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
unsigned int v4; // [sp-10h] [bp-7Ch]@12
GUIWindow transition_window; // [sp+Ch] [bp-60h]@1
unsigned int v9; // [sp+60h] [bp-Ch]@1
diff -r e06a3fe9ad6e -r 4087cbc62706 GUI/UI/UiGame.cpp
--- a/GUI/UI/UiGame.cpp Mon May 11 16:43:46 2015 +0200
+++ b/GUI/UI/UiGame.cpp Mon May 11 17:45:02 2015 +0200
@@ -1,50 +1,535 @@
#define _CRTDBG_MAP_ALLOC
+#define _CRT_SECURE_NO_WARNINGS
#include
#include
-#define _CRT_SECURE_NO_WARNINGS
-
#include "Engine/Engine.h"
-
-#include "..\../Engine/Events.h"
-#include "..\../Engine/Graphics/Texture.h"
-
-#include "..\../IO/Mouse.h"
-#include "..\../IO/Keyboard.h"
+#include "Engine/Events.h"
+#include "Engine/Graphics/Texture.h"
+#include "Engine/Graphics/Vis.h"
+#include "Engine/MapInfo.h"
+#include "Engine/Party.h"
+#include "Engine/Graphics/Outdoor.h"
+#include "Engine/LOD.h"
+#include "Engine/Objects/Actor.h"
+#include "Engine/Graphics/Viewport.h"
+#include "Engine/Objects/SpriteObject.h"
+#include "Engine/Objects/ObjectList.h"
+#include "Engine/Graphics/DecorationList.h"
+#include "Engine/Tables/PlayerFrameTable.h"
+#include "Engine/stru123.h"
+#include "Engine/Timer.h"
+#include "Engine/Tables/IconFrameTable.h"
+#include "Engine/TurnEngine/TurnEngine.h"
+#include "Engine/texts.h"
+#include "Engine/Graphics/Sprites.h"
+#include "Engine/Graphics/PaletteManager.h"
+#include "Engine/Graphics/BSPModel.h"
+#include "Engine/OurMath.h"
+#include "Engine/Graphics/Level/Decoration.h"
+#include "Engine/Objects/Chest.h"
+#include "Engine/Graphics/Overlays.h"
-#include "..\../Engine/Graphics/Vis.h"
-#include "..\../Engine/MapInfo.h"
-#include "..\../GUI/GUIWindow.h"
-#include "..\../GUI/GUIFont.h"
-#include "..\../Engine/Party.h"
-#include "..\../Media/Audio/AudioPlayer.h"
-#include "..\../Engine/Graphics/Outdoor.h"
-#include "..\../Engine/LOD.h"
-#include "..\../Engine/Objects/Actor.h"
-#include "..\../Engine/Graphics/Viewport.h"
-#include "..\../Engine/Objects/SpriteObject.h"
-#include "..\../Engine/Objects/ObjectList.h"
-#include "..\../Engine/Graphics/DecorationList.h"
-#include "..\../Engine/Tables/PlayerFrameTable.h"
-#include "..\../Engine/stru123.h"
-#include "..\../Engine/Timer.h"
-#include "..\../Engine/Tables/IconFrameTable.h"
-#include "..\../Engine/TurnEngine/TurnEngine.h"
-#include "..\../Engine/texts.h"
-#include "UIHouses.h"
-#include "..\../Engine/Graphics/BSPModel.h"
-#include "..\../Engine/OurMath.h"
-#include "..\../Engine/Graphics/Level/Decoration.h"
-#include "..\../Engine/Objects/Chest.h"
-#include "UIGame.h"
+#include "IO/Mouse.h"
+#include "IO/Keyboard.h"
-#include "..\../Engine/Graphics/Overlays.h"
+#include "GUI/GUIWindow.h"
+#include "GUI/GUIFont.h"
+#include "GUI/UI/UIHouses.h"
+#include "GUI/UI/UIGame.h"
-#include "..\../Engine/Graphics/Sprites.h"
-#include "..\../Engine/Graphics/PaletteManager.h"
+#include "Media/Audio/AudioPlayer.h"
int uTextureID_GameUI_CharSelectionFrame; // 50C98C
+
+
+
+GUIWindow_GameMenu::GUIWindow_GameMenu() :
+ GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
+{
+// -----------------------
+// GameMenuUI_Load -- part
+ 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 = CreateButton(
+ 0x13u, 0x9Bu, 0xD6u, 0x28u, 1, 0, UIMSG_StartNewGame, 0, 0x4Eu,
+ pGlobalTXT_LocalizationStrings[614],// "New Game"
+ pIcons_LOD->GetTexture(uTextureID_New1),
+ 0
+ );
+ pBtn_SaveGame = CreateButton(
+ 0x13u, 0xD1u, 0xD6u, 0x28u, 1, 0, UIMSG_Game_OpenSaveGameDialog, 0, 0x53u,
+ pGlobalTXT_LocalizationStrings[615],// "Save Game"
+ pIcons_LOD->GetTexture(uTextureID_Save1),
+ 0
+ );
+ pBtn_LoadGame = CreateButton(
+ 19, 263, 0xD6u, 0x28u, 1, 0, UIMSG_Game_OpenLoadGameDialog, 0, 0x4Cu,
+ pGlobalTXT_LocalizationStrings[616],// "Load Game"
+ pIcons_LOD->GetTexture(uTextureID_Load1),
+ 0
+ );
+ pBtn_GameControls = CreateButton(
+ 241, 155, 214, 40, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0x43u,
+ pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:""
+ pIcons_LOD->GetTexture(uTextureID_Controls1),
+ 0
+ );
+ pBtn_QuitGame = CreateButton(
+ 241, 209, 214, 40, 1, 0, UIMSG_Quit, 0, 0x51u,
+ pGlobalTXT_LocalizationStrings[618],// "Quit"
+ pIcons_LOD->GetTexture(uTextureID_Quit1),
+ 0
+ );
+ pBtn_Resume = CreateButton(
+ 241, 263, 214, 40, 1, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u,
+ pGlobalTXT_LocalizationStrings[619],// "Return to Game"
+ pIcons_LOD->GetTexture(uTextureID_Resume1),
+ 0
+ );
+ _41D08F_set_keyboard_control_group(6, 1, 0, 0);
+}
+
+void GUIWindow_GameMenu::Update()
+{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
+ pRenderer->DrawTextureIndexed(
+ pViewport->uViewportTL_Y,
+ pViewport->uViewportTL_X,
+ pIcons_LOD->GetTexture(uTextureID_Options)
+ );
+ viewparams->bRedrawGameUI = 1;
+}
+
+
+
+
+
+
+std::array GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
+//----- (00414D24) --------------------------------------------------------
+static unsigned int GameMenuUI_GetKeyBindingColor(int key_index)
+{
+ if (uGameMenuUI_CurentlySelectedKeyIdx == key_index)
+ {
+ if (GetTickCount() % 1000 < 500)
+ return ui_gamemenu_keys_key_selection_blink_color_1;
+ else
+ return ui_gamemenu_keys_key_selection_blink_color_2;
+ }
+ else if (GameMenuUI_InvaligKeyBindingsFlags[key_index])
+ {
+ int intensity;
+
+ int time = GetTickCount() % 800;
+ if (time < 400)
+ intensity = -70 + 70 * time / 400;
+ else
+ intensity = +70 - 70 * time / 800;
+
+ return Color16(185 + intensity, 40 + intensity / 4, 40 + intensity / 4);
+ }
+
+ return ui_gamemenu_keys_key_default_color;
+}
+
+
+
+GUIWindow_GameKeyBindings::GUIWindow_GameKeyBindings():
+ GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
+{
+// ------------------------------------------
+// GameMenuUI_OptionsKeymapping_Load --- part
+ uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE);
+ uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE);
+ uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
+ uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE);
+ uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE);
+
+ CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0, "", 0);
+
+ CreateButton(19, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0);
+ CreateButton(127, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0);
+ CreateButton(127, 324, 108, 20, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0);
+ CreateButton(19, 324, 108, 20, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0);
+
+ CreateButton(129, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 0, 0, "", 0);
+ CreateButton(129, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 1, 0, "", 0);
+ CreateButton(129, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 2, 0, "", 0);
+ CreateButton(129, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 3, 0, "", 0);
+ CreateButton(129, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 4, 0, "", 0);
+ CreateButton(129, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 5, 0, "", 0);
+ CreateButton(129, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 6, 0, "", 0);
+
+ CreateButton(350, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 7, 0, "", 0);
+ CreateButton(350, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 8, 0, "", 0);
+ CreateButton(350, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 9, 0, "", 0);
+ CreateButton(350, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 10, 0, "", 0);
+ CreateButton(350, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 11, 0, "", 0);
+ CreateButton(350, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 12, 0, "", 0);
+ CreateButton(350, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 13, 0, "", 0);
+
+ uGameMenuUI_CurentlySelectedKeyIdx = -1;
+ KeyboardPageNum = 1;
+ memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
+ memcpy(pPrevVirtualCidesMapping.data(), pKeyActionMap->pVirtualKeyCodesMapping, 0x78u);
+}
+
+//----- (004142D3) --------------------------------------------------------
+void GUIWindow_GameKeyBindings::Update()
+{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
+ signed int v4; // ecx@7
+ signed int v5; // eax@8
+
+ if (pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
+ {
+ pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0];
+ memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
+ v4 = 0;
+ do
+ {
+ v5 = 0;
+ do
+ {
+ if (v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5])
+ {
+ GameMenuUI_InvaligKeyBindingsFlags[v4] = true;
+ GameMenuUI_InvaligKeyBindingsFlags[v5] = true;
+ }
+ ++v5;
+ } while (v5 < 28);
+ ++v4;
+ } while (v4 < 28);
+ uGameMenuUI_CurentlySelectedKeyIdx = -1;
+ pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
+ }
+ pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));//draw base texture
+ if (KeyboardPageNum == 1)
+ {
+ pRenderer->DrawTextureIndexed(19, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[3]));
+
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0);
+ }
+ else
+ {
+ pRenderer->DrawTextureIndexed(127, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[4]));
+
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0);
+ pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[27]), 0, 0, 0);
+ }
+}
+
+
+
+GUIWindow_GameVideoOptions::GUIWindow_GameVideoOptions() :
+ GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
+{
+// -------------------------------------
+// GameMenuUI_OptionsVideo_Load --- part
+ optvid_base_texture_id = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE);
+ bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE);
+ us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE);
+ tinting_texture_id = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE);
+ uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
+ uTextureID_507C24 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
+ pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
+ not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
+ not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
+ not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
+
+ CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0);
+ //if ( pRenderer->pRenderD3D )
+ {
+ CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0);
+ CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0);
+ CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleTint, 0, 0, "", 0);
+ }
+ /*if ( !pRenderer->bWindowMode )
+ {
+ //v0 = 1;
+ if ( pRenderer->IsGammaSupported() )
+ {
+ pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0x15u, 0xA1u, 0x10u, 0x10u, 1, 0, UIMSG_1A9, 4u, 0, "", pIcons_LOD->GetTexture(uTextureID_507C20), 0);
+ pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0xD5u, 0xA1u, 0x10u, 0x10u, 1, 0, UIMSG_1A9, 5u, 0, "", pIcons_LOD->GetTexture(uTextureID_507C24), 0);
+ pGUIWindow_CurrentMenu->CreateButton(42, 162, 170, 18, 1, 0, UIMSG_1A9, 0, 0, "", 0);
+ }
+ }*/
+}
+
+
+
+//----- (00414D9A) --------------------------------------------------------
+void GUIWindow_GameVideoOptions::Update()
+{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
+ GUIWindow msg_window; // [sp+8h] [bp-54h]@3
+
+ pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(optvid_base_texture_id));//draw base texture
+ //if ( !pRenderer->bWindowMode && pRenderer->IsGammaSupported() )
+ {
+ pRenderer->DrawTextureIndexed(17 * uGammaPos + 42, 162, pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos]));
+ pRenderer->DrawTextureRGB(274, 169, &stru_506E40);//review_window
+ msg_window.uFrameX = 22;
+ msg_window.uFrameY = 190;
+ msg_window.uFrameWidth = 211;
+ msg_window.uFrameHeight = 79;
+ msg_window.uFrameZ = 232;
+ msg_window.uFrameW = 268;
+ msg_window.DrawTitleText(pFontSmallnum, 0, 0, ui_gamemenu_video_gamma_title_color, pGlobalTXT_LocalizationStrings[226], 3); // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor."
+ }
+
+ /*if (!pRenderer->pRenderD3D)
+ {
+ pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(not_available_bloodsplats_texture_id));
+ pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(not_available_us_colored_lights_texture_id));
+ pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(not_available_tinting_texture_id));
+ }
+ else*/
+ {
+ if (pEngine->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS)
+ pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(bloodsplats_texture_id));
+ if (pRenderer->bUseColoredLights)
+ pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(us_colored_lights_texture_id));
+ if (pRenderer->bTinting)
+ pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(tinting_texture_id));
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+OptionsMenuSkin options_menu_skin; // 507C60
+OptionsMenuSkin::OptionsMenuSkin() :
+uTextureID_Background(0),
+uTextureID_ArrowLeft(0),
+uTextureID_ArrowRight(0),
+uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0),
+uTextureID_FlipOnExit(0),
+uTextureID_AlwaysRun(0),
+uTextureID_WalkSound(0),
+uTextureID_ShowDamage(0)
+{
+ for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
+ for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
+}
+
+void OptionsMenuSkin::Relaease()
+{
+#define RELEASE(id) \
+ {\
+ if (id)\
+ pIcons_LOD->GetTexture(id)->Release();\
+ id = 0;\
+ }
+
+ RELEASE(uTextureID_Background);
+ for (uint i = 0; i < 3; ++i)
+ RELEASE(uTextureID_TurnSpeed[i]);
+ RELEASE(uTextureID_ArrowLeft);
+ RELEASE(uTextureID_ArrowRight);
+ RELEASE(uTextureID_FlipOnExit);
+ for (uint i = 0; i < 10; ++i)
+ RELEASE(uTextureID_SoundLevels[i]);
+ RELEASE(uTextureID_AlwaysRun);
+ RELEASE(uTextureID_WalkSound);
+ RELEASE(uTextureID_ShowDamage);
+
+#undef RELEASE
+}
+
+
+GUIWindow_GameOptions::GUIWindow_GameOptions() :
+ GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
+{
+// GameMenuUI_Options_Load -- part
+ options_menu_skin.uTextureID_Background = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_TurnSpeed[2] = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_TurnSpeed[1] = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_TurnSpeed[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_ArrowLeft = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_ArrowRight = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE);
+ options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE);
+
+ CreateButton(22, 270,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight,
+ 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0);
+ CreateButton(93, 270,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureHeight,
+ 1, 0, UIMSG_SetTurnSpeed, 0x40u, 0, "", 0);
+ CreateButton(164, 270,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureHeight,
+ 1, 0, UIMSG_SetTurnSpeed, 0, 0, "", 0);
+
+ CreateButton(20, 303,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureHeight,
+ 1, 0, UIMSG_ToggleWalkSound, 0, 0, "", 0);
+ CreateButton(128, 303,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureHeight,
+ 1, 0, UIMSG_ToggleShowDamage, 0, 0, "", 0);
+ CreateButton(20, 325,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureHeight,
+ 1, 0, UIMSG_ToggleAlwaysRun, 0, 0, "", 0);
+ CreateButton(128, 325,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureWidth,
+ pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureHeight,
+ 1, 0, UIMSG_ToggleFlipOnExit, 0, 0, "", 0);
+
+ pBtn_SliderLeft = CreateButton(243, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
+ pBtn_SliderRight = CreateButton(435, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
+ CreateButton(263, 162, 172, 17, 1, 0, UIMSG_ChangeSoundVolume, 0, 0, "", 0);
+
+ pBtn_SliderLeft = CreateButton(243, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
+ pBtn_SliderRight = CreateButton(435, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
+ CreateButton(263, 216, 172, 17, 1, 0, UIMSG_ChangeMusicVolume, 0, 0, "", 0);
+
+ pBtn_SliderLeft = CreateButton(243, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 4, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0);
+ pBtn_SliderRight = CreateButton(435, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 5, 0, "", pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0);
+ CreateButton(263, 270, 172, 17, 1, 0, UIMSG_ChangeVoiceVolume, 0, 0, "", 0);
+
+ CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[619], 0); // "Return to Game"
+ CreateButton(19, 140, 214, 40, 1, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu, "", 0);
+ CreateButton(19, 194, 214, 40, 1, 0, UIMSG_OpenVideoOptions, 0, 86, "", 0);
+}
+
+
+
+
+//----- (00414F82) --------------------------------------------------------
+void GUIWindow_GameOptions::Update()
+{
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
+ pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options));
+ pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background));
+
+ switch (uTurnSpeed)
+ {
+ case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])); break;
+ case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])); break;
+ default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])); break;
+ }
+
+ if (bWalkSound) pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound));
+ if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage));
+ if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit));
+ if (bAlwaysRun) pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun));
+
+ pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier]));
+ pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier]));
+ pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier]));
+}
+
+
+
+
+
+
+
+
+
+
//----- (00421D00) --------------------------------------------------------
void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID)
{
diff -r e06a3fe9ad6e -r 4087cbc62706 Game/Game.cpp
--- a/Game/Game.cpp Mon May 11 16:43:46 2015 +0200
+++ b/Game/Game.cpp Mon May 11 17:45:02 2015 +0200
@@ -398,7 +398,7 @@
DoThatMessageThing();
pGUIWindow_CurrentMenu->Release();
- pGUIWindow_CurrentMenu = GameMenuUI_Options_Load();
+ pGUIWindow_CurrentMenu = new GUIWindow_GameOptions();//GameMenuUI_Options_Load();
viewparams->field_48 = 1;
current_screen_type = SCREEN_OPTIONS;
@@ -411,7 +411,7 @@
DoThatMessageThing();
pGUIWindow_CurrentMenu->Release();
- pGUIWindow_CurrentMenu = GameMenuUI_OptionsKeymapping_Load();
+ pGUIWindow_CurrentMenu = new GUIWindow_GameKeyBindings();//GameMenuUI_OptionsKeymapping_Load();
viewparams->field_48 = 1;
current_screen_type = SCREEN_KEYBOARD_OPTIONS;
@@ -470,7 +470,7 @@
DoThatMessageThing();
pGUIWindow_CurrentMenu->Release();
- pGUIWindow_CurrentMenu = GameMenuUI_OptionsVideo_Load();
+ pGUIWindow_CurrentMenu = new GUIWindow_GameVideoOptions();//GameMenuUI_OptionsVideo_Load();
viewparams->field_48 = 1;
current_screen_type = SCREEN_VIDEO_OPTIONS;
@@ -1265,7 +1265,7 @@
if (!pIcons_LOD->uNumPrevLoadedFiles)
pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
- pGUIWindow_CurrentMenu = GameMenuUI_Load();
+ pGUIWindow_CurrentMenu = new GUIWindow_GameMenu();
viewparams->field_48 = 1;