2549
|
1 #include "Engine/Engine.h"
|
2574
|
2 #include "Engine/AssetsManager.h"
|
2549
|
3 #include "Engine/Party.h"
|
|
4 #include "Engine/LOD.h"
|
|
5 #include "Engine/Timer.h"
|
|
6 #include "Engine/texts.h"
|
|
7 #include "Engine/Graphics/Render.h"
|
|
8 #include "Engine/Graphics/Viewport.h"
|
|
9
|
|
10 #include "IO/Mouse.h"
|
|
11
|
|
12 #include "GUI/UI/Spellbook.h"
|
|
13 #include "GUI/GUIFont.h"
|
|
14
|
|
15 #include "Media/Audio/AudioPlayer.h"
|
|
16
|
|
17
|
|
18
|
|
19 void InitializeSpellBookTextures();
|
|
20 void OnCloseSpellBookPage();
|
|
21 void OnCloseSpellBook();
|
|
22 void LoadSpellbook(unsigned int spell_school);
|
|
23 void BookUI_Spellbook_DrawCurrentSchoolBackground();
|
|
24
|
|
25
|
|
26 std::array<char *, 9> spellbook_texture_filename_suffices = {{"f", "a", "w", "e", "s", "m", "b", "l", "d"}};
|
|
27
|
|
28 std::array<std::array<unsigned char, 12>, 9> pSpellbookSpellIndices = // 4E2430 from pSpellbookSpellIndices[9][12]
|
|
29 {
|
|
30 { //0 1 2 3 4 5 6 7 8 9 10 11
|
|
31 { 0, 3, 1, 8, 11, 7, 4, 10, 6, 2, 5, 9 },
|
|
32 { 0, 11, 2, 9, 6, 8, 5, 10, 3, 7, 1, 4 },
|
|
33 { 0, 4, 8, 9, 1, 10, 3, 11, 7, 6, 2, 5 },
|
|
34 { 0, 7, 10, 8, 2, 11, 1, 5, 3, 6, 4, 9 },
|
|
35 { 0, 5, 10, 11, 7, 2, 8, 1, 4, 9, 3, 6 },
|
|
36 { 0, 5, 9, 8, 3, 7, 6, 4, 1, 11, 2, 10 },
|
|
37 { 0, 1, 6, 9, 3, 5, 8, 11, 7, 10, 4, 2 },
|
|
38 { 0, 1, 10, 11, 9, 4, 3, 6, 5, 7, 8, 2 },
|
|
39 { 0, 9, 3, 7, 1, 5, 2, 10, 11, 8, 6, 4 }
|
|
40 }
|
|
41 };
|
|
42
|
|
43
|
2574
|
44 Image *ui_spellbook_btn_quckspell = nullptr;
|
|
45 Image *ui_spellbook_btn_quckspell_click = nullptr;
|
|
46 Image *ui_spellbook_btn_close = nullptr;
|
|
47 Image *ui_spellbook_btn_close_click = nullptr;
|
|
48
|
|
49
|
|
50 std::array<Image *, 12> SBPageCSpellsTextureList;
|
|
51 std::array<Image *, 12> SBPageSSpellsTextureList;
|
|
52
|
|
53 std::array<Image *, 9> ui_spellbook_school_backgrounds;
|
|
54 std::array<std::array<Image *, 2>, 9> ui_spellbook_school_tabs;
|
|
55
|
2549
|
56
|
|
57
|
|
58 GUIWindow_Spellbook::GUIWindow_Spellbook() :
|
|
59 GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr)
|
|
60 {
|
|
61 // ------------------------------------
|
|
62 // 004304E7 void Game_EventLoop -- part
|
|
63 current_screen_type = SCREEN_SPELL_BOOK;
|
|
64 pEventTimer->Pause();
|
|
65
|
|
66 InitializeSpellBookTextures();
|
|
67 OpenSpellbook();
|
|
68
|
|
69 // ------------------------------------
|
|
70 // 004304E7 void Game_EventLoop -- part
|
|
71 pAudioPlayer->PlaySound(SOUND_48, 0, 0, -1, 0, 0, 0, 0);
|
|
72 viewparams->field_48 = 1;
|
|
73 }
|
|
74
|
|
75
|
|
76 void GUIWindow_Spellbook::OpenSpellbookPage(int page)
|
|
77 {
|
|
78 // ------------------------------------
|
|
79 // 004304E7 void Game_EventLoop -- part
|
2574
|
80
|
2549
|
81 OnCloseSpellBookPage();
|
|
82 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = page;
|
|
83 OpenSpellbook();
|
|
84 pAudioPlayer->PlaySound((SoundID)(SOUND_TurnPageU + rand() % 2), 0, 0, -1, 0, 0, 0, 0);
|
|
85 }
|
|
86
|
|
87 //----- (00411621) --------------------------------------------------------
|
|
88 void GUIWindow_Spellbook::OpenSpellbook()
|
|
89 {
|
|
90 Player *pPlayer; // edi@1
|
|
91 //GUIWindow *pWindow; // esi@1
|
|
92 //unsigned int v3; // ebp@1
|
|
93 int v4; // eax@3
|
|
94 ///GUIButton *result; // eax@25
|
|
95 int a2; // [sp+10h] [bp-8h]@1
|
|
96 //int v7; // [sp+14h] [bp-4h]@1
|
|
97
|
|
98 pPlayer = pPlayers[uActiveCharacter];
|
|
99 //pWindow = this;
|
|
100 LoadSpellbook(pPlayer->lastOpenedSpellbookPage);
|
|
101 //v3 = 0;
|
|
102 a2 = 0;
|
|
103
|
|
104 PlayerSpellbookChapter* chapter = &pPlayer->spellbook.pChapters[pPlayer->lastOpenedSpellbookPage];
|
|
105 for (uint i = 0; i < 11; ++i)
|
|
106 {
|
|
107 if (!chapter->bIsSpellAvailable[i])
|
|
108 continue;
|
|
109 v4 = pPlayer->lastOpenedSpellbookPage;
|
|
110 //v4 = (12 * pPlayer->lastOpenedSpellbookPage + pSpellbookSpellIndices[pPlayer->lastOpenedSpellbookPage][i + 1]);
|
2574
|
111 CreateButton(
|
|
112 pViewport->uViewportTL_X + pIconPos[v4][pSpellbookSpellIndices[v4][i + 1]].Xpos,
|
2549
|
113 pViewport->uViewportTL_Y + pIconPos[v4][pSpellbookSpellIndices[v4][i + 1]].Ypos, //dword_4E20D0
|
2574
|
114 SBPageSSpellsTextureList[i + 1]->GetWidth(),
|
|
115 SBPageSSpellsTextureList[i + 1]->GetHeight(),
|
2549
|
116 1, 79, UIMSG_SelectSpell, i, 0, "", 0);
|
|
117 ++a2;
|
|
118 //++v3;
|
|
119 }
|
|
120 //while ( (signed int)v3 < 11 );
|
|
121
|
|
122 CreateButton(0, 0, 0, 0, 1, 0, UIMSG_SpellBook_PressTab, 0, '\t', "", 0);
|
|
123 if (a2)
|
|
124 _41D08F_set_keyboard_control_group(a2, 0, 0, 0);
|
|
125
|
|
126 if (pPlayer->pActiveSkills[PLAYER_SKILL_FIRE]) CreateButton(399, 10, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 0, 0, aSpellSchoolNames[0], 0);
|
|
127 if (pPlayer->pActiveSkills[PLAYER_SKILL_AIR]) CreateButton(399, 46, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 1, 0, aSpellSchoolNames[1], 0);
|
|
128 if (pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) CreateButton(399, 83, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 2, 0, aSpellSchoolNames[2], 0);
|
|
129 if (pPlayer->pActiveSkills[PLAYER_SKILL_EARTH]) CreateButton(399, 121, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 3, 0, aSpellSchoolNames[3], 0);
|
|
130 if (pPlayer->pActiveSkills[PLAYER_SKILL_SPIRIT]) CreateButton(399, 158, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 4, 0, aSpellSchoolNames[4], 0);
|
|
131 if (pPlayer->pActiveSkills[PLAYER_SKILL_MIND]) CreateButton(400, 196, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 5, 0, aSpellSchoolNames[5], 0);
|
|
132 if (pPlayer->pActiveSkills[PLAYER_SKILL_BODY]) CreateButton(400, 234, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 6, 0, aSpellSchoolNames[6], 0);
|
|
133 if (pPlayer->pActiveSkills[PLAYER_SKILL_LIGHT]) CreateButton(400, 271, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 7, 0, aSpellSchoolNames[7], 0);
|
|
134 if (pPlayer->pActiveSkills[PLAYER_SKILL_DARK]) CreateButton(400, 307, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 8, 0, aSpellSchoolNames[8], 0);
|
|
135
|
2574
|
136 CreateButton(476, 450, ui_spellbook_btn_quckspell->GetWidth(), ui_spellbook_btn_quckspell->GetHeight(), 1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn, 0, 0, "", 0);
|
|
137 pBtn_InstallRemoveSpell = CreateButton(476, 450, 48, 32, 1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn, 0, 0, "", ui_spellbook_btn_quckspell_click, 0);
|
|
138 CreateButton(561, 450, ui_spellbook_btn_close->GetWidth(), ui_spellbook_btn_close->GetHeight(), 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
|
|
139 pBtn_CloseBook = CreateButton(561, 450, 48, 32, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], ui_spellbook_btn_close_click, 0);
|
2549
|
140 }
|
|
141
|
|
142 void GUIWindow_Spellbook::Update()
|
|
143 {
|
|
144 // -----------------------------------
|
|
145 // 004156F0 GUI_UpdateWindows --- part
|
|
146 // {
|
|
147 // DrawSpellBookContent(pPlayers[uActiveCharacter]);
|
|
148 // }
|
|
149 //
|
|
150 // --------------------------------------------------
|
|
151 // 00412B58 void DrawSpellBookContent(Player *player)
|
|
152 auto player = pPlayers[uActiveCharacter];
|
|
153
|
2574
|
154 //Texture_MM7 *PendingTexture; // edi@1
|
|
155 Image *pTexture; // edx@5
|
2549
|
156 int v10; // eax@13
|
|
157 unsigned int pX_coord; // esi@18
|
|
158 unsigned int pY_coord; // edi@18
|
2574
|
159 //Texture_MM7 *pPageTexture; // eax@21
|
2549
|
160 // signed int v22; // [sp-4h] [bp-24h]@22
|
|
161 POINT a2; // [sp+18h] [bp-8h]@13
|
|
162
|
|
163 static unsigned int texture_tab_coord1[9][2] =
|
|
164 { { 406, 9 }, { 406, 46 }, { 406, 84 }, { 406, 121 }, { 407, 158 }, { 405, 196 }, { 405, 234 }, { 405, 272 }, { 405, 309 } };
|
|
165
|
|
166 static unsigned int texture_tab_coord0[9][2] =
|
|
167 { { 415, 10 }, { 415, 46 }, { 415, 83 }, { 415, 121 }, { 415, 158 }, { 416, 196 }, { 416, 234 }, { 416, 271 }, { 416, 307 } };
|
|
168
|
|
169 BookUI_Spellbook_DrawCurrentSchoolBackground();
|
|
170
|
2574
|
171 //PendingTexture = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending"));
|
2549
|
172 pRenderer->ClearZBuffer(0, 479);
|
|
173 if ((11 * player->lastOpenedSpellbookPage) || ((11 * player->lastOpenedSpellbookPage) + 11))//??? maybe structure need fix
|
|
174 {
|
|
175 for (uint i = 1; i <= 11; ++i)
|
|
176 {
|
|
177 if (player->_achieved_awards_bits[(11 * player->lastOpenedSpellbookPage) + i + 63])
|
|
178 {
|
2574
|
179 if (SBPageSSpellsTextureList[i])
|
2549
|
180 {
|
|
181 if (quick_spell_at_page == i)
|
|
182 pTexture = SBPageCSpellsTextureList[i];
|
|
183 else
|
|
184 pTexture = SBPageSSpellsTextureList[i];
|
2574
|
185 if (pTexture)
|
2549
|
186 {
|
|
187 pX_coord = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos;
|
|
188 pY_coord = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos;
|
2574
|
189
|
|
190 pRenderer->DrawTextureAlphaNew(pX_coord/640.0f, pY_coord/480.0f, pTexture);
|
|
191 pRenderer->ZDrawTextureAlpha(
|
|
192 pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Xpos/640.0f,
|
|
193 pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][i]].Ypos/480.0f,
|
|
194 pTexture, i);
|
2549
|
195 }
|
|
196 }
|
|
197 }
|
|
198 }
|
|
199 }
|
|
200
|
|
201 pMouse->GetCursorPos(&a2);
|
|
202 v10 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
|
|
203 if (v10)
|
|
204 {
|
2574
|
205 if (SBPageCSpellsTextureList[v10])
|
2549
|
206 {
|
|
207 pX_coord = pViewport->uViewportTL_X + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Xpos;
|
|
208 pY_coord = pViewport->uViewportTL_Y + pIconPos[player->lastOpenedSpellbookPage][pSpellbookSpellIndices[player->lastOpenedSpellbookPage][v10]].Ypos;
|
2574
|
209
|
|
210 pRenderer->DrawTextureAlphaNew(pX_coord/640.0f, pY_coord/480.0f, SBPageCSpellsTextureList[v10]);
|
2549
|
211 }
|
|
212 }
|
2574
|
213
|
2549
|
214 for (uint i = 0; i < 9; i++)
|
|
215 {
|
|
216 if (player->pActiveSkills[PLAYER_SKILL_FIRE + i])
|
|
217 {
|
2574
|
218 auto pPageTexture = ui_spellbook_school_tabs[i][0];
|
2549
|
219 if (player->lastOpenedSpellbookPage == i)
|
|
220 {
|
2574
|
221 pPageTexture = ui_spellbook_school_tabs[i][1];
|
2549
|
222 pX_coord = texture_tab_coord1[i][0];
|
|
223 pY_coord = texture_tab_coord1[i][1];
|
|
224 }
|
|
225 else
|
|
226 {
|
2574
|
227 pPageTexture = ui_spellbook_school_tabs[i][0];
|
2549
|
228 pX_coord = texture_tab_coord0[i][0];
|
|
229 pY_coord = texture_tab_coord0[i][1];
|
|
230 }
|
2574
|
231
|
|
232 pRenderer->DrawTextureAlphaNew(pX_coord/640.0f, pY_coord/480.0f, pPageTexture);
|
2549
|
233 }
|
|
234 }
|
|
235 }
|
|
236
|
|
237
|
|
238 void GUIWindow_Spellbook::Release()
|
|
239 {
|
|
240 // -----------------------------------------
|
|
241 // 0041C26A void GUIWindow::Release --- part
|
|
242 OnCloseSpellBookPage();
|
|
243 OnCloseSpellBook();
|
|
244
|
|
245 GUIWindow::Release();
|
|
246 }
|
|
247
|
|
248
|
|
249 //----- (00411300) --------------------------------------------------------
|
|
250 void LoadSpellbook(unsigned int spell_school)
|
|
251 {
|
|
252 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
|
|
253
|
|
254 byte_506550 = 0;
|
|
255 if ( pPlayers[uActiveCharacter]->uQuickSpell && (unsigned __int8)pPlayers[uActiveCharacter]->uQuickSpell / 11 == spell_school )
|
|
256 quick_spell_at_page = (unsigned __int8)pPlayers[uActiveCharacter]->uQuickSpell - 11 * spell_school;
|
|
257 else
|
|
258 quick_spell_at_page = 0;
|
|
259
|
|
260 for (uint i = 1; i <= 11; ++i)
|
|
261 {
|
|
262 if (pPlayers[uActiveCharacter]->spellbook.pChapters[spell_school].bIsSpellAvailable[i - 1])
|
|
263 {
|
|
264 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
|
2574
|
265 SBPageSSpellsTextureList[i] = assets->GetImage_16BitAlpha(pContainer);
|
2549
|
266
|
|
267 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
|
2574
|
268 SBPageCSpellsTextureList[i] = assets->GetImage_16BitAlpha(pContainer);
|
2549
|
269 }
|
|
270 }
|
|
271 }
|
|
272
|
|
273 //----- (00412AF9) --------------------------------------------------------
|
|
274 static void BookUI_Spellbook_DrawCurrentSchoolBackground()
|
|
275 {
|
|
276 int pTexID = 0;
|
|
277 if ( uActiveCharacter )
|
|
278 pTexID = pParty->pPlayers[uActiveCharacter - 1].lastOpenedSpellbookPage;
|
2574
|
279 pRenderer->DrawTextureAlphaNew(8/640.0f, 8/480.0f, ui_spellbook_school_backgrounds[pTexID]);
|
|
280
|
|
281 pRenderer->DrawTextureAlphaNew(476/640.0f, 450/480.0f, ui_spellbook_btn_quckspell);
|
|
282 pRenderer->DrawTextureAlphaNew(561/640.0f, 450/480.0f, ui_spellbook_btn_close);
|
2549
|
283 }
|
|
284
|
|
285
|
|
286
|
|
287
|
|
288
|
|
289 //----- (0041192C) --------------------------------------------------------
|
|
290 void InitializeSpellBookTextures()
|
|
291 {
|
|
292 pAudioPlayer->StopChannels(-1, -1);
|
|
293 ++pIcons_LOD->uTexturePacksCount;
|
|
294 if (!pIcons_LOD->uNumPrevLoadedFiles)
|
|
295 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
|
|
296 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0);
|
2574
|
297
|
|
298 ui_spellbook_btn_close = assets->GetImage_16BitAlpha(L"ib-m5-u");
|
|
299 ui_spellbook_btn_close_click = assets->GetImage_16BitAlpha(L"ib-m5-d");
|
|
300 ui_spellbook_btn_quckspell = assets->GetImage_16BitAlpha(L"ib-m6-u");
|
|
301 ui_spellbook_btn_quckspell_click = assets->GetImage_16BitAlpha(L"ib-m6-d");
|
2549
|
302
|
|
303 static const char *texNames[9] = // 004E24EC
|
|
304 {
|
|
305 "SBFB00", "SBAB00", "SBWB00", "SBEB00",
|
|
306 "SBSB00", "SBMB00", "SBBB00", "SBLB00", "SBDB00"
|
|
307 };
|
|
308
|
|
309 for (uint i = 0; i < 9; ++i)
|
|
310 {
|
2574
|
311 ui_spellbook_school_backgrounds[i] = assets->GetImage_16BitColorKey(texNames[i], 0x7FF);
|
|
312
|
2549
|
313 sprintf(pTmpBuf.data(), "tab%da", i + 1);
|
2574
|
314 ui_spellbook_school_tabs[i][0] = assets->GetImage_16BitAlpha(pTmpBuf.data());
|
|
315
|
2549
|
316 sprintf(pTmpBuf.data(), "tab%db", i + 1);
|
2574
|
317 ui_spellbook_school_tabs[i][1] = assets->GetImage_16BitAlpha(pTmpBuf.data());
|
2549
|
318 }
|
|
319 }
|
|
320
|
|
321
|
|
322 //----- (00411473) --------------------------------------------------------
|
|
323 void OnCloseSpellBook()
|
|
324 {
|
2574
|
325 if (ui_spellbook_btn_close)
|
|
326 {
|
|
327 ui_spellbook_btn_close->Release();
|
|
328 ui_spellbook_btn_close = nullptr;
|
|
329 }
|
|
330 if (ui_spellbook_btn_close_click)
|
|
331 {
|
|
332 ui_spellbook_btn_close_click->Release();
|
|
333 ui_spellbook_btn_close_click = nullptr;
|
|
334 }
|
|
335
|
|
336
|
|
337
|
|
338 if (ui_spellbook_btn_quckspell)
|
|
339 {
|
|
340 ui_spellbook_btn_quckspell->Release();
|
|
341 ui_spellbook_btn_quckspell = nullptr;
|
|
342 }
|
|
343 if (ui_spellbook_btn_quckspell_click)
|
|
344 {
|
|
345 ui_spellbook_btn_quckspell_click->Release();
|
|
346 ui_spellbook_btn_quckspell_click = nullptr;
|
|
347 }
|
|
348
|
|
349
|
2549
|
350 for (uint i = 0; i < 9; ++i)
|
|
351 {
|
2574
|
352 if (ui_spellbook_school_backgrounds[i])
|
|
353 {
|
|
354 ui_spellbook_school_backgrounds[i]->Release();
|
|
355 ui_spellbook_school_backgrounds[i] = nullptr;
|
|
356 }
|
|
357
|
|
358 if (ui_spellbook_school_tabs[i][0])
|
|
359 {
|
|
360 ui_spellbook_school_tabs[i][0]->Release();
|
|
361 ui_spellbook_school_tabs[i][0] = nullptr;
|
|
362 }
|
|
363 if (ui_spellbook_school_tabs[i][1])
|
|
364 {
|
|
365 ui_spellbook_school_tabs[i][1]->Release();
|
|
366 ui_spellbook_school_tabs[i][1] = nullptr;
|
|
367 }
|
2549
|
368 }
|
2574
|
369
|
2549
|
370 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0);
|
|
371 }
|
2574
|
372
|
|
373
|
|
374
|
|
375 //----- (0041140B) --------------------------------------------------------
|
|
376 void OnCloseSpellBookPage()
|
|
377 {
|
|
378 GUIButton *pNextButton; // esi@4
|
|
379 for ( uint i = 1; i <= 11; i++ )
|
|
380 {
|
|
381 if (SBPageCSpellsTextureList[i])
|
|
382 {
|
|
383 SBPageCSpellsTextureList[i]->Release();
|
|
384 SBPageCSpellsTextureList[i] = nullptr;
|
|
385 }
|
|
386 if (SBPageSSpellsTextureList[i])
|
|
387 {
|
|
388 SBPageSSpellsTextureList[i]->Release();
|
|
389 SBPageSSpellsTextureList[i] = nullptr;
|
|
390 }
|
|
391 }
|
|
392
|
|
393
|
|
394 pIcons_LOD->SyncLoadedFilesCount();
|
|
395 if ( pGUIWindow_CurrentMenu->pControlsHead )
|
|
396 {
|
|
397 do
|
|
398 {
|
|
399 pNextButton = pGUIWindow_CurrentMenu->pControlsHead->pNext;
|
|
400 free(pGUIWindow_CurrentMenu->pControlsHead);
|
|
401 pGUIWindow_CurrentMenu->pControlsHead = pNextButton;
|
|
402 }
|
|
403 while ( pNextButton );
|
|
404 }
|
|
405 pGUIWindow_CurrentMenu->pControlsHead = 0;
|
|
406 pGUIWindow_CurrentMenu->pControlsTail = 0;
|
|
407 pGUIWindow_CurrentMenu->uNumControls = 0;
|
|
408 }
|
|
409
|