comparison UIOptions.cpp @ 948:5a2dbb00c399

Code cleaning.
author Nomad
date Wed, 01 May 2013 17:31:10 +0200
parents 9be9afdbeac3
children c0d0656aa662
comparison
equal deleted inserted replaced
947:99aa9c8464cf 948:5a2dbb00c399
40 #include "StorylineTextTable.h" 40 #include "StorylineTextTable.h"
41 #include "Events2D.h" 41 #include "Events2D.h"
42 #include "texts.h" 42 #include "texts.h"
43 43
44 #include "mm7_data.h" 44 #include "mm7_data.h"
45
46
47
48
49 OptionsMenuSkin options_menu_skin; // 507C60
50
45 51
46 52
47 53
48 //----- (004142D3) -------------------------------------------------------- 54 //----- (004142D3) --------------------------------------------------------
49 char __cdecl GameMenuUI_DrawKeyBindings() 55 char __cdecl GameMenuUI_DrawKeyBindings()
106 const char *v55; // ST0C_4@17 112 const char *v55; // ST0C_4@17
107 unsigned int v56; // eax@17 113 unsigned int v56; // eax@17
108 const char *v57; // ST0C_4@17 114 const char *v57; // ST0C_4@17
109 unsigned int v58; // eax@17 115 unsigned int v58; // eax@17
110 unsigned int v59; // eax@18 116 unsigned int v59; // eax@18
111 int v61; // [sp-14h] [bp-28h]@16 117 //int v61; // [sp-14h] [bp-28h]@16
112 const char *v62; // [sp-10h] [bp-24h]@16 118 const char *v62; // [sp-10h] [bp-24h]@16
113 int v63; // [sp-Ch] [bp-20h]@16
114 int v64; // [sp-8h] [bp-1Ch]@16
115 unsigned int v65; // [sp-4h] [bp-18h]@16
116 unsigned int a5; // [sp+10h] [bp-4h]@1 119 unsigned int a5; // [sp+10h] [bp-4h]@1
117 120
118 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 121 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
119 a5 = v0; 122 a5 = v0;
120 if ( byte_4E28FC ) 123 if ( byte_4E28FC )
156 } 159 }
157 while ( v4 < 28 ); 160 while ( v4 < 28 );
158 dword_506E68 = -1; 161 dword_506E68 = -1;
159 v3->field_40 = 0; 162 v3->field_40 = 0;
160 } 163 }
161 pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Optkb[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[0]] : 0)); 164 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0]));
162 if ( KeyboardPageNum == 1 ) 165 if ( KeyboardPageNum == 1 )
163 { 166 {
164 pRenderer->DrawTextureIndexed(0x13, 0x12E, (Texture *)(uTextureID_Optkb[3] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[3]] : 0)); 167 pRenderer->DrawTextureIndexed(0x13, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[3]));
165 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0); 168 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, "ÂÏÅШÄ", 0, 0, 0);
166 v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]); 169 v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]);
167 v7 = sub_414D24(0); 170 v7 = sub_414D24(0);
168 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0); 171 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0);
169 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0); 172 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, "ÍÀÇÀÄ", 0, 0, 0);
170 v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]); 173 v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]);
171 v9 = sub_414D24(1); 174 v9 = sub_414D24(1);
172 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0); 175 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0);
173 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0); 176 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, "ÂËÅÂÎ", 0, 0, 0);
174 v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]); 177 v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]);
175 v11 = sub_414D24(2); 178 v11 = sub_414D24(2);
176 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0); 179 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0);
177 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0); 180 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, "ÂÏÐÀÂÎ", 0, 0, 0);
178 v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]); 181 v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]);
179 v13 = sub_414D24(3); 182 v13 = sub_414D24(3);
180 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0); 183 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0);
181 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0); 184 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, "ÊÐÈÊ", 0, 0, 0);
182 v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]); 185 v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]);
183 v15 = sub_414D24(4); 186 v15 = sub_414D24(4);
184 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0); 187 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0);
185 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0); 188 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, "ÏÐÛÆÎÊ", 0, 0, 0);
186 v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]); 189 v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]);
187 v17 = sub_414D24(5); 190 v17 = sub_414D24(5);
188 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0); 191 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0);
189 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0); 192 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, "Ï.ÐÅÆÈÌ", 0, 0, 0);
190 v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]); 193 v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]);
191 v19 = sub_414D24(6); 194 v19 = sub_414D24(6);
192 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0); 195 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0);
193 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0); 196 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0);
194 v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]); 197 v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]);
195 v21 = sub_414D24(7); 198 v21 = sub_414D24(7);
196 v22 = 350; 199 v22 = 350;
197 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0); 200 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0);
198 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0); 201 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, "ÀÒÀÊÀ", 0, 0, 0);
199 v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]); 202 v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]);
200 v24 = sub_414D24(8); 203 v24 = sub_414D24(8);
201 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0); 204 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0);
202 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0); 205 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, "ÄÅÉÑÒÂ.", 0, 0, 0);
203 v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]); 206 v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]);
204 v26 = sub_414D24(9); 207 v26 = sub_414D24(9);
205 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0); 208 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0);
206 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0); 209 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, "ÇÀÊËÈÍ.", 0, 0, 0);
207 v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]); 210 v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]);
208 v28 = sub_414D24(10); 211 v28 = sub_414D24(10);
209 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0); 212 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0);
210 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0); 213 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, "ÈÃÐÎÊ", 0, 0, 0);
211 v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]); 214 v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]);
212 v30 = sub_414D24(11); 215 v30 = sub_414D24(11);
213 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0); 216 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0);
214 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0); 217 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0);
215 v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]); 218 v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]);
216 v32 = sub_414D24(12); 219 v32 = sub_414D24(12);
217 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0); 220 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0);
218 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0); 221 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, "ÇÀÄÀÍÈß", 0, 0, 0);
219 v65 = 0; 222
220 v64 = 0;
221 v63 = 0;
222 v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]); 223 v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]);
223 v61 = 13; 224 v59 = sub_414D24(13);
224 } 225 }
225 else 226 else
226 { 227 {
227 pRenderer->DrawTextureIndexed(0x7F, 0x12E, (Texture *)(uTextureID_Optkb[4] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[4]] : 0)); 228 pRenderer->DrawTextureIndexed(0x7F, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[4]));
228 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0); 229 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0);
229 v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]); 230 v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]);
230 v34 = sub_414D24(14); 231 v34 = sub_414D24(14);
231 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0); 232 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0);
232 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0); 233 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, "ÎÒÄÛÕ", 0, 0, 0);
233 v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]); 234 v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]);
234 v36 = sub_414D24(15); 235 v36 = sub_414D24(15);
235 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0); 236 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0);
236 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0); 237 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0);
237 v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]); 238 v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]);
238 v38 = sub_414D24(16); 239 v38 = sub_414D24(16);
239 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0); 240 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0);
240 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0); 241 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0);
241 v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]); 242 v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]);
242 v40 = sub_414D24(17); 243 v40 = sub_414D24(17);
243 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0); 244 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0);
244 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0); 245 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, "ÊÀÐÒÀ", 0, 0, 0);
245 v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]); 246 v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]);
246 v42 = sub_414D24(18); 247 v42 = sub_414D24(18);
247 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0); 248 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0);
248 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0); 249 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, "ÁÅÆÀÒÜ", 0, 0, 0);
249 v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]); 250 v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]);
250 v44 = sub_414D24(19); 251 v44 = sub_414D24(19);
251 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0); 252 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0);
252 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0); 253 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0);
253 v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]); 254 v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]);
254 v46 = sub_414D24(20); 255 v46 = sub_414D24(20);
255 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0); 256 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0);
256 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0); 257 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, "ÑÌ. ÂÍÈÇ", 0, 0, 0);
257 v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]); 258 v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]);
258 v48 = sub_414D24(21); 259 v48 = sub_414D24(21);
259 v22 = 350; 260 v22 = 350;
260 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0); 261 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0);
261 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0); 262 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, "ÑÌ. ÂÏÅШÄ", 0, 0, 0);
262 v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]); 263 v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]);
263 v50 = sub_414D24(22); 264 v50 = sub_414D24(22);
264 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0); 265 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0);
265 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0); 266 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, "ÏÐÈÁËÈÇ", 0, 0, 0);
266 v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]); 267 v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]);
267 v52 = sub_414D24(23); 268 v52 = sub_414D24(23);
268 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0); 269 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0);
269 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0); 270 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, "ÎÒÄÀËÈÒÜ", 0, 0, 0);
270 v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]); 271 v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]);
271 v54 = sub_414D24(24); 272 v54 = sub_414D24(24);
272 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0); 273 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0);
273 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0); 274 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, "Ï. ÂÂÅÐÕ", 0, 0, 0);
274 v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]); 275 v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]);
275 v56 = sub_414D24(25); 276 v56 = sub_414D24(25);
276 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0); 277 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0);
277 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0); 278 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, "Ï. ÂÍÈÇ", 0, 0, 0);
278 v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]); 279 v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]);
279 v58 = sub_414D24(26); 280 v58 = sub_414D24(26);
280 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0); 281 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0);
281 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0); 282 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, "ÏÐÈÇÅÌË", 0, 0, 0);
282 v65 = 0; 283
283 v64 = 0;
284 v63 = 0;
285 v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]); 284 v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]);
286 v61 = 27; 285 v59 = sub_414D24(27);
287 } 286 }
288 v59 = sub_414D24(v61); 287 return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, 0, 0, 0);
289 return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65);
290 } 288 }
291 289
292 290
293 //----- (00414D24) -------------------------------------------------------- 291 //----- (00414D24) --------------------------------------------------------
294 unsigned int __thiscall sub_414D24(int _this) 292 unsigned int __thiscall sub_414D24(int _this)
314 if ( KeyButtonFlagChangesArray[v1] ) 312 if ( KeyButtonFlagChangesArray[v1] )
315 result = dword_507C08; 313 result = dword_507C08;
316 } 314 }
317 return result; 315 return result;
318 } 316 }
319 // 506E68: using guessed type int dword_506E68;
320 // 506E6C: using guessed type __int16 word_506E6C[18];
321 // 507C08: using guessed type int dword_507C08;
322 317
323 //----- (00414D9A) -------------------------------------------------------- 318 //----- (00414D9A) --------------------------------------------------------
324 void __cdecl GameMenuUI_DrawVideoOptions() 319 void GameMenuUI_DrawVideoOptions()
325 { 320 {
326 const char *v0; // ST0C_4@3 321 const char *v0; // ST0C_4@3
327 unsigned __int16 v1; // ax@3 322 unsigned __int16 v1; // ax@3
328 int v2; // eax@10 323 //int v2; // eax@10
329 GUIWindow v3; // [sp+8h] [bp-54h]@3 324 GUIWindow v3; // [sp+8h] [bp-54h]@3
330 325
331 pRenderer->DrawTextureIndexed( 326 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507C10));
332 8u,
333 8u,
334 (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0));
335 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() ) 327 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() )
336 { 328 {
337 pRenderer->DrawTextureIndexed( 329 pRenderer->DrawTextureIndexed(
338 17 * uGammaPos + 42, 330 17 * uGammaPos + 42,
339 162u, 331 162,
340 (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0)); 332 pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos]));
341 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40); 333 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40);
342 v3.uFrameX = 22; 334 v3.uFrameX = 22;
343 v0 = pGlobalTXT_LocalizationStrings[226]; 335 v0 = pGlobalTXT_LocalizationStrings[226]; // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor."
344 v3.uFrameY = 190; 336 v3.uFrameY = 190;
345 v3.uFrameWidth = 211; 337 v3.uFrameWidth = 211;
346 v3.uFrameHeight = 79; 338 v3.uFrameHeight = 79;
347 v3.uFrameZ = 232; 339 v3.uFrameZ = 232;
348 v3.uFrameW = 268; 340 v3.uFrameW = 268;
349 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 341 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
350 v3.DrawTitleText(pFontSmallnum, 0, 0, v1, v0, 3u); 342 v3.DrawTitleText(pFontSmallnum, 0, 0, v1, v0, 3u);
351 } 343 }
352 if ( !pRenderer->pRenderD3D ) 344
353 { 345 if (!pRenderer->pRenderD3D)
354 pRenderer->DrawTextureIndexed( 346 {
355 0x14u, 347 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C50));
356 0x119u, 348 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C54));
357 (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0)); 349 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C58));
358 pRenderer->DrawTextureIndexed(
359 0x14u,
360 0x12Fu,
361 (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0));
362 v2 = uTextureID_507C58;
363 goto LABEL_12;
364 }
365 if ( pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS )
366 pRenderer->DrawTextureIndexed(
367 0x14u,
368 0x119u,
369 (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0));
370 if ( pRenderer->bUseColoredLights )
371 pRenderer->DrawTextureIndexed(
372 0x14u,
373 0x12Fu,
374 (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0));
375 if ( pRenderer->bTinting )
376 {
377 v2 = uTextureID_507C1C;
378 LABEL_12:
379 pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0));
380 }
381 } 350 }
351 else
352 {
353 if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS)
354 pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C14));
355 if (pRenderer->bUseColoredLights)
356 pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C18));
357 if (pRenderer->bTinting)
358 pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C1C));
359 }
360 }
382 361
383 362
384 363
385 //----- (00414F82) -------------------------------------------------------- 364 //----- (00414F82) --------------------------------------------------------
386 void __cdecl DrawGameOptions() 365 void DrawGameOptions()
387 { 366 {
388 signed int v0; // eax@1 367 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options));
389 368 pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background));
390 pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0)); 369
391 pRenderer->DrawTextureIndexed(8, 132, (Texture *)(uTextureID_ControlBG[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[0]] : 0)); 370 switch (uTurnSpeed)
392 v0 = 0; 371 {
393 if ( uTurnSpeed == 128 ) 372 default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0]));
394 { 373 case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1]));
395 v0 = 2; 374 case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2]));
396 } 375 }
397 else 376
398 { 377 if (bWalkSound) pRenderer->DrawTextureIndexed( 20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound));
399 if ( uTurnSpeed == 64 ) 378 if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage));
400 v0 = 1; 379 if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit));
401 } 380 if (bAlwaysRun) pRenderer->DrawTextureIndexed( 20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun));
402 pRenderer->DrawTextureIndexed(BtnTurnCoord[v0], 270, (Texture *)(uTextureID_ControlBG[v0 + 1] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[v0 + 1]] : 0)); 381
403 if ( bWalkSound ) 382 pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier]));
404 pRenderer->DrawTextureIndexed(20, 303, (Texture *)(uTextureID_ControlBG[21] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[21]] : 0)); 383 pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier]));
405 if ( bShowDamage ) 384 pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier]));
406 pRenderer->DrawTextureIndexed(128, 303, (Texture *)(uTextureID_ControlBG[22] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[22]] : 0)); 385 }
407 if ( bFlipOnExit ) 386
408 pRenderer->DrawTextureIndexed(128, 325, (Texture *)(uTextureID_ControlBG[9] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[9]] : 0)); 387
409 if ( bAlwaysRun ) 388
410 pRenderer->DrawTextureIndexed(20, 325, (Texture *)(uTextureID_ControlBG[20] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[20]] : 0)); 389
411 pRenderer->DrawTextureIndexed(17 * (char)uSoundVolumeMultiplier + 265, 162, 390
412 (Texture *)(uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10]] : 0)); 391
413 pRenderer->DrawTextureIndexed(17 * (char)uMusicVolimeMultiplier + 265, 216, 392
414 (Texture *)(uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10]] : 0)); 393
415 pRenderer->DrawTextureIndexed(17 * (char)uVoicesVolumeMultiplier + 265, 270, 394
416 (Texture *)(uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10]] : 0)); 395
417 } 396 OptionsMenuSkin::OptionsMenuSkin():
397 uTextureID_Background(0),
398 uTextureID_ArrowLeft(0),
399 uTextureID_ArrowRight(0),
400 uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0),
401 uTextureID_FlipOnExit(0),
402 uTextureID_AlwaysRun(0),
403 uTextureID_WalkSound(0),
404 uTextureID_ShowDamage(0)
405 {
406 for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
407 for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
408 }
409
410 void OptionsMenuSkin::Relaease()
411 {
412 #define RELEASE(id) \
413 {\
414 if (id)\
415 pIcons_LOD->GetTexture(id)->Release();\
416 id = 0;\
417 }
418
419 RELEASE(uTextureID_Background);
420 for (uint i = 0; i < 3; ++i)
421 RELEASE(uTextureID_TurnSpeed[i]);
422 RELEASE(uTextureID_ArrowLeft);
423 RELEASE(uTextureID_ArrowRight);
424 RELEASE(uTextureID_FlipOnExit);
425 for (uint i = 0; i < 10; ++i)
426 RELEASE(uTextureID_SoundLevels[i]);
427 RELEASE(uTextureID_AlwaysRun);
428 RELEASE(uTextureID_WalkSound);
429 RELEASE(uTextureID_ShowDamage);
430
431 #undef RELEASE
432 }