annotate GUI/UI/UIOptions.cpp @ 2502:a77c34acdbc9

Media folder
author Ritor1
date Fri, 19 Sep 2014 05:13:32 +0600
parents 0ff6a9e9bf7f
children a902abdfc7f2
rev   line source
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
1 #define _CRTDBG_MAP_ALLOC
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
2 #include <stdlib.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
3 #include <crtdbg.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
4
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
6 #include "..\../Engine/MM7.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
7
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
8 #include "..\../IO/Keyboard.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
9 #include "..\../Engine/Graphics/IndoorCameraD3D.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
10 #include "..\../Engine/Graphics/GammaControl.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
11 #include "..\../Engine/Graphics/Render.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
12
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
13 #include "..\../Engine/Game.h"
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
14 #include "..\../GUI/GUIWindow.h"
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
15 #include "..\../GUI/GUIFont.h"
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
16 #include "..\../Media/Audio/AudioPlayer.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
17 #include "..\../Engine/LOD.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
18 #include "..\../Engine/texts.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
19
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
20 #include "..\../Engine/mm7_data.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
21
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
22
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
23
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
24
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
25 OptionsMenuSkin options_menu_skin; // 507C60
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
26
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
27
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
28 std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
29 //----- (00414D24) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
30 static unsigned int GameMenuUI_GetKeyBindingColor(int key_index)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
31 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
32 if (uGameMenuUI_CurentlySelectedKeyIdx == key_index)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
33 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
34 if (GetTickCount() % 1000 < 500)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
35 return ui_gamemenu_keys_key_selection_blink_color_1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
36 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
37 return ui_gamemenu_keys_key_selection_blink_color_2;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
38 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
39 else if (GameMenuUI_InvaligKeyBindingsFlags[key_index])
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
40 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
41 int intensity;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
42
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
43 int time = GetTickCount() % 800;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
44 if (time < 400)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
45 intensity = - 70 + 70 * time / 400;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
46 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
47 intensity = + 70 - 70 * time / 800;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
48
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
49 return Color16(185 + intensity, 40 + intensity / 4, 40 + intensity / 4);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
50 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
51
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
52 return ui_gamemenu_keys_key_default_color;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
53 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
54
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
55 //----- (004142D3) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
56 void GameMenuUI_DrawKeyBindings()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
57 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
58 signed int v4; // ecx@7
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
59 signed int v5; // eax@8
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
60
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
61 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
62 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
63 pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0];
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
64 memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
65 v4 = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
66 do
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
67 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
68 v5 = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
69 do
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
70 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
71 if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
72 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
73 GameMenuUI_InvaligKeyBindingsFlags[v4] = true;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
74 GameMenuUI_InvaligKeyBindingsFlags[v5] = true;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
75 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
76 ++v5;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
77 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
78 while ( v5 < 28 );
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
79 ++v4;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
80 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
81 while ( v4 < 28 );
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
82 uGameMenuUI_CurentlySelectedKeyIdx = -1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
83 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
84 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
85 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));//draw base texture
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
86 if ( KeyboardPageNum == 1 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
87 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
88 pRenderer->DrawTextureIndexed(19, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[3]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
89
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
90 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
91 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
92 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
93 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
94 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
95 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
96 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
97 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
98 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
99 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
100 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
101 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
102 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
103 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
104 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
105 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
106 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
107 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
108 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
109 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
110 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
111 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
112 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
113 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
114 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
115 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
116 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
117 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
118 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
119 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
120 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
121 pRenderer->DrawTextureIndexed(127, 302, pIcons_LOD->GetTexture(uTextureID_Optkb[4]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
122
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
123 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
124 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
125 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
126 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
127 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
128 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
129 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
130 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
131 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
132 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
133 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
134 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
135 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
136 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
137 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
138 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
139 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
140 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
141 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
142 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
143 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
144 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
145 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
146 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
147 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
148 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
149 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
150 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[27]), 0, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
151 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
152 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
153
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
154 //----- (00414D9A) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
155 void GameMenuUI_DrawVideoOptions()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
156 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
157 GUIWindow msg_window; // [sp+8h] [bp-54h]@3
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
158
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
159 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(optvid_base_texture_id));//draw base texture
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
160 //if ( !pRenderer->bWindowMode && pRenderer->IsGammaSupported() )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
161 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
162 pRenderer->DrawTextureIndexed(17 * uGammaPos + 42, 162, pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
163 pRenderer->DrawTextureRGB(274, 169, &stru_506E40);//review_window
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
164 msg_window.uFrameX = 22;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
165 msg_window.uFrameY = 190;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
166 msg_window.uFrameWidth = 211;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
167 msg_window.uFrameHeight = 79;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
168 msg_window.uFrameZ = 232;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
169 msg_window.uFrameW = 268;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
170 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."
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
171 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
172
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
173 /*if (!pRenderer->pRenderD3D)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
174 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
175 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(not_available_bloodsplats_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
176 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(not_available_us_colored_lights_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
177 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(not_available_tinting_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
178 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
179 else*/
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
180 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
181 if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
182 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(bloodsplats_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
183 if (pRenderer->bUseColoredLights)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
184 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(us_colored_lights_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
185 if (pRenderer->bTinting)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
186 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(tinting_texture_id));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
187 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
188 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
189
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
190 //----- (00414F82) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
191 void GameMenuUI_Options_Draw()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
192 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
193 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
194 pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
195
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
196 switch (uTurnSpeed)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
197 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
198 case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])); break;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
199 case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])); break;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
200 default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])); break;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
201 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
202
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
203 if (bWalkSound) pRenderer->DrawTextureIndexed( 20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
204 if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
205 if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
206 if (bAlwaysRun) pRenderer->DrawTextureIndexed( 20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
207
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
208 pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
209 pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
210 pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier]));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
211 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
212
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
213 OptionsMenuSkin::OptionsMenuSkin():
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
214 uTextureID_Background(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
215 uTextureID_ArrowLeft(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
216 uTextureID_ArrowRight(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
217 uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
218 uTextureID_FlipOnExit(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
219 uTextureID_AlwaysRun(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
220 uTextureID_WalkSound(0),
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
221 uTextureID_ShowDamage(0)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
222 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
223 for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
224 for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
225 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
226
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
227 void OptionsMenuSkin::Relaease()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
228 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
229 #define RELEASE(id) \
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
230 {\
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
231 if (id)\
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
232 pIcons_LOD->GetTexture(id)->Release();\
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
233 id = 0;\
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
234 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
235
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
236 RELEASE(uTextureID_Background);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
237 for (uint i = 0; i < 3; ++i)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
238 RELEASE(uTextureID_TurnSpeed[i]);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
239 RELEASE(uTextureID_ArrowLeft);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
240 RELEASE(uTextureID_ArrowRight);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
241 RELEASE(uTextureID_FlipOnExit);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
242 for (uint i = 0; i < 10; ++i)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
243 RELEASE(uTextureID_SoundLevels[i]);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
244 RELEASE(uTextureID_AlwaysRun);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
245 RELEASE(uTextureID_WalkSound);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
246 RELEASE(uTextureID_ShowDamage);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
247
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
248 #undef RELEASE
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
249 }