annotate UI/UIOptions.cpp @ 1687:5f01f1ed97f4

Player::StealFromActor cleanup, renamed UIMSG_1B to UIMSG_STEALFROMACTOR
author Grumpy7
date Sun, 22 Sep 2013 03:12:11 +0200
parents c4ab816fcc5e
children 483cc7f0d86c
rev   line source
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
1 #include "..\MM7.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
3 #include "..\Keyboard.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
4 #include "..\IndoorCameraD3D.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
5 #include "..\CShow.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
6 #include "..\GammaControl.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
7 #include "..\Render.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
8
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
9 #include "..\Game.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
10 #include "..\GUIWindow.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
11 #include "..\GUIFont.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
12 #include "..\AudioPlayer.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
13 #include "..\LOD.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
14 #include "..\texts.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
15
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
16 #include "..\mm7_data.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
19
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
20
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
21 OptionsMenuSkin options_menu_skin; // 507C60
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
22
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
23
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
24 std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
25 //----- (00414D24) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
26 static unsigned int GameMenuUI_GetKeyBindingColor(int key_index)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
27 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
28 if (uGameMenuUI_CurentlySelectedKeyIdx == key_index)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
29 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
30 if (GetTickCount() % 1000 < 500)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
31 return ui_gamemenu_keys_key_selection_blink_color_1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
32 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
33 return ui_gamemenu_keys_key_selection_blink_color_2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
34 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
35 else if (GameMenuUI_InvaligKeyBindingsFlags[key_index])
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
36 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
37 int intensity;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
38
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
39 int time = GetTickCount() % 800;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
40 if (time < 400)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
41 intensity = - 70 + 70 * time / 400;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
42 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
43 intensity = + 70 - 70 * time / 800;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
44
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
45 return TargetColor(185 + intensity, 40 + intensity / 4, 40 + intensity / 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
46 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
47
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
48 return ui_gamemenu_keys_key_default_color;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
49 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
50
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
51 //----- (004142D3) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
52 void GameMenuUI_DrawKeyBindings()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
53 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
54 signed int v4; // ecx@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
55 signed int v5; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
56
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
57 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
58 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
59 pPrevVirtualCidesMapping[uGameMenuUI_CurentlySelectedKeyIdx] = pKeyActionMap->pPressedKeysBuffer[0];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
60 memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0, sizeof(GameMenuUI_InvaligKeyBindingsFlags));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
61 v4 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
62 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
63 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
64 v5 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
65 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
66 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
67 if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
68 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
69 GameMenuUI_InvaligKeyBindingsFlags[v4] = true;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
70 GameMenuUI_InvaligKeyBindingsFlags[v5] = true;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
71 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
72 ++v5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
73 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
74 while ( v5 < 28 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
75 ++v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
76 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
77 while ( v4 < 28 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
78 uGameMenuUI_CurentlySelectedKeyIdx = -1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
79 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
80 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
81 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
82 if ( KeyboardPageNum == 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
83 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
84 pRenderer->DrawTextureIndexed(0x13, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[3]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
86 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "ÂÏÅШÄ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
87 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(0), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
88 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÍÀÇÀÄ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
89 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(1), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
90 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÂËÅÂÎ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
91 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(2), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
92 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÂÏÐÀÂÎ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
93 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(3), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
94 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÐÈÊ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
95 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(4), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
96 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÏÐÛÆÎÊ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
97 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(5), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
98 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "Ï.ÐÅÆÈÌ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
99 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(6), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
100 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
101 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(7), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
102 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÀÒÀÊÀ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
103 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(8), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
104 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÄÅÉÑÒÂ.", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
105 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(9), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
106 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÇÀÊËÈÍ.", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
107 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(10), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
108 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "ÈÃÐÎÊ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
109 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(11), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
110 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
111 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(12), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
112 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÇÀÄÀÍÈß", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
113 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(13), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
114 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
115 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
116 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
117 pRenderer->DrawTextureIndexed(0x7F, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[4]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
118
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
119 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, ui_gamemenu_keys_action_name_color, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
120 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, GameMenuUI_GetKeyBindingColor(14), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
121 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, ui_gamemenu_keys_action_name_color, "ÎÒÄÛÕ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
122 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, GameMenuUI_GetKeyBindingColor(15), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
123 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, ui_gamemenu_keys_action_name_color, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
124 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, GameMenuUI_GetKeyBindingColor(16), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
125 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, ui_gamemenu_keys_action_name_color, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
126 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, GameMenuUI_GetKeyBindingColor(17), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
127 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, ui_gamemenu_keys_action_name_color, "ÊÀÐÒÀ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
128 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, GameMenuUI_GetKeyBindingColor(18), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
129 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, ui_gamemenu_keys_action_name_color, "ÁÅÆÀÒÜ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
130 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, GameMenuUI_GetKeyBindingColor(19), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
131 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
132 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, GameMenuUI_GetKeyBindingColor(20), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
133 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÍÈÇ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
134 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, GameMenuUI_GetKeyBindingColor(21), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
135 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, ui_gamemenu_keys_action_name_color, "ÑÌ. ÂÏÅШÄ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
136 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, GameMenuUI_GetKeyBindingColor(22), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
137 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, ui_gamemenu_keys_action_name_color, "ÏÐÈÁËÈÇ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
138 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, GameMenuUI_GetKeyBindingColor(23), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
139 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, ui_gamemenu_keys_action_name_color, "ÎÒÄÀËÈÒÜ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
140 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, GameMenuUI_GetKeyBindingColor(24), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
141 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, ui_gamemenu_keys_action_name_color, "Ï. ÂÂÅÐÕ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
142 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, GameMenuUI_GetKeyBindingColor(25), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
143 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, ui_gamemenu_keys_action_name_color, "Ï. ÂÍÈÇ", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
144 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, GameMenuUI_GetKeyBindingColor(26), pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
145 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, ui_gamemenu_keys_action_name_color, "ÏÐÈÇÅÌË", 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
146 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 268, GameMenuUI_GetKeyBindingColor(27), pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
147 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
148 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
149
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
150
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
151
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
152
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
153 //----- (00414D9A) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
154 void GameMenuUI_DrawVideoOptions()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
155 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
156 const char *v0; // ST0C_4@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
157 //unsigned __int16 v1; // ax@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
158 //int v2; // eax@10
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
159 GUIWindow v3; // [sp+8h] [bp-54h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
160
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
161 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507C10));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
162 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
163 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
164 pRenderer->DrawTextureIndexed(
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
165 17 * uGammaPos + 42,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
166 162,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
167 pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
168 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
169 v3.uFrameX = 22;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
170 v0 = pGlobalTXT_LocalizationStrings[226]; // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor."
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
171 v3.uFrameY = 190;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
172 v3.uFrameWidth = 211;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
173 v3.uFrameHeight = 79;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
174 v3.uFrameZ = 232;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
175 v3.uFrameW = 268;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
176 //v1 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
177 v3.DrawTitleText(pFontSmallnum, 0, 0, ui_gamemenu_video_gamma_title_color, v0, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
178 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
179
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
180 if (!pRenderer->pRenderD3D)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
181 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
182 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C50));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
183 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C54));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
184 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C58));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
185 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
186 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
187 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
188 if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
189 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C14));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
190 if (pRenderer->bUseColoredLights)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
191 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C18));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
192 if (pRenderer->bTinting)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
193 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C1C));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
194 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
195 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
196
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
197
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
198
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
199 //----- (00414F82) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
200 void GameMenuUI_Options_Draw()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
201 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
202 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
203 pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
204
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
205 switch (uTurnSpeed)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
206 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
207 case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])); break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
208 case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])); break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
209 default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])); break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
210 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
211
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
212 if (bWalkSound) pRenderer->DrawTextureIndexed( 20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
213 if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
214 if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
215 if (bAlwaysRun) pRenderer->DrawTextureIndexed( 20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
216
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
217 pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
218 pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
219 pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier]));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
220 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
221
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
222
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
223
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
224
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
225
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
226
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
227
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
228
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
229
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
230
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
231 OptionsMenuSkin::OptionsMenuSkin():
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
232 uTextureID_Background(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
233 uTextureID_ArrowLeft(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
234 uTextureID_ArrowRight(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
235 uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
236 uTextureID_FlipOnExit(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
237 uTextureID_AlwaysRun(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
238 uTextureID_WalkSound(0),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
239 uTextureID_ShowDamage(0)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
240 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
241 for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
242 for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
243 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
244
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
245 void OptionsMenuSkin::Relaease()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
246 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
247 #define RELEASE(id) \
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
248 {\
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
249 if (id)\
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
250 pIcons_LOD->GetTexture(id)->Release();\
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
251 id = 0;\
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
252 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
253
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
254 RELEASE(uTextureID_Background);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
255 for (uint i = 0; i < 3; ++i)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
256 RELEASE(uTextureID_TurnSpeed[i]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
257 RELEASE(uTextureID_ArrowLeft);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
258 RELEASE(uTextureID_ArrowRight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
259 RELEASE(uTextureID_FlipOnExit);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
260 for (uint i = 0; i < 10; ++i)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
261 RELEASE(uTextureID_SoundLevels[i]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
262 RELEASE(uTextureID_AlwaysRun);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
263 RELEASE(uTextureID_WalkSound);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
264 RELEASE(uTextureID_ShowDamage);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
265
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
266 #undef RELEASE
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
267 }