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