annotate GUI/UI/UISaveLoad.cpp @ 2544:c674d547cc7c

GUIWindow switch logic refactored into behaviour classes
author a.parshin
date Mon, 11 May 2015 09:51:04 +0200
parents a902abdfc7f2
children fed97f15d1e1
rev   line source
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
1 #define _CRTDBG_MAP_ALLOC
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
2 #include <stdlib.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
3 #include <crtdbg.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
4
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
6 #include <io.h>
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
7
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
8 #include "Engine/Engine.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
9
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
10 #include "..\../IO/Keyboard.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
11
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
12 #include "..\../Engine/MapInfo.h"
2502
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
13 #include "..\../GUI/GUIWindow.h"
a77c34acdbc9 Media folder
Ritor1
parents: 2501
diff changeset
14 #include "..\../GUI/GUIFont.h"
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
15 #include "..\../Engine/Graphics/Render.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
16 #include "..\../Engine/LOD.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
17 #include "..\../Engine/SaveLoad.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
18 #include "..\../Engine/texts.h"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
19
2544
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
20 #include "Game/MainMenu.h"
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
21
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
22
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
23 //----- (004601B7) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
24 static void UI_DrawSaveLoad(bool save)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
25 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
26 // const char *pSlotName; // edi@36
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
27 GUIWindow save_load_window; // [sp+Ch] [bp-78h]@8
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
28 unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
29 unsigned __int64 full_hours;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
30 unsigned __int64 full_days;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
31 int full_weeks;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
32 int full_month;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
33 int current_year;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
34 int current_month;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
35 int current_day;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
36 int current_hour;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
37 int current_minutes;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
38
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
39 pRenderer->BeginScene();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
40 if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
41 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
42 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
43 if (save)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
44 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
45 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
46 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(uTextureID_save_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
47 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
48 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
49 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
50 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
51 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(uTextureID_load_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
52 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
53 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
54 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
55 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
56 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
57 memset(&save_load_window, 0, 0x54);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
58 save_load_window.uFrameX = pGUIWindow_CurrentMenu->uFrameX + 240;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
59 save_load_window.uFrameWidth = 220;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
60 save_load_window.uFrameY = (pGUIWindow_CurrentMenu->uFrameY - pFontSmallnum->uFontHeight) + 157;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
61 save_load_window.uFrameZ = save_load_window.uFrameX + 219;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
62 save_load_window.uFrameHeight = pFontSmallnum->uFontHeight;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
63 save_load_window.uFrameW = pFontSmallnum->uFontHeight + save_load_window.uFrameY - 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
64 if ( pSavegameThumbnails[uLoadGameUI_SelectedSlot].pPixels )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
65 pRenderer->DrawTextureRGB(pGUIWindow_CurrentMenu->uFrameX + 276, pGUIWindow_CurrentMenu->uFrameY + 171, &pSavegameThumbnails[uLoadGameUI_SelectedSlot]);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
66 //Draw map name
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
67 save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pMapStats->pInfos[pMapStats->GetMapInfo(pSavegameHeader[uLoadGameUI_SelectedSlot].pLocationName)].pName, 3);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
68 //Draw date
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
69 full_hours = ((signed __int64)(pSavegameHeader[uLoadGameUI_SelectedSlot].uWordTime * 0.234375) / 60) / 60i64;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
70 full_days = (unsigned int)full_hours / 24;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
71 full_weeks = (unsigned int)(full_days / 7);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
72 full_month = (unsigned int)full_weeks / 4;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
73 current_year = (full_month / 12) + game_starting_year;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
74 current_month = full_month % 12;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
75 current_day = full_days % 28;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
76 current_hour = full_hours % 24;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
77 current_minutes = (((signed __int64)(pSavegameHeader[uLoadGameUI_SelectedSlot].uWordTime * 0.234375) / 60) % 60i64);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
78
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
79 save_load_window.uFrameY = pGUIWindow_CurrentMenu->uFrameY + 261;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
80 int am;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
81 if ( (signed int)current_hour >= 12 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
82 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
83 current_hour -= 12;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
84 if ( !current_hour )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
85 current_hour = 12;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
86 am = 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
87 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
88 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
89 am = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
90 const char* day = aDayNames[full_days % 7];
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
91 const char* ampm = aAMPMNames[am];
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
92 const char* month = aMonthNames[current_month];
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
93
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
94 sprintfex(pTmpBuf.data(), "%s %d:%02d %s\n%d %s %d", day, current_hour, current_minutes, aAMPMNames[am], current_day + 1, month, current_year);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
95 save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf.data(), 3);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
96 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
97 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
98 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
99 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
100 strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pKeyActionMap->pPressedKeysBuffer);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
101 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_SaveGame, 0, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
102 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
103 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
104 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
105 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
106 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
107 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
108 if (GetCurrentMenuID() == MENU_LoadingProcInMainMenu)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
109 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
110 pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[135]) + 25,
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
111 220, 0, pGlobalTXT_LocalizationStrings[135], 0, 0, 0);//Загрузка
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
112 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, pFontSmallnum->AlignText_Center(186,
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
113 pSavegameHeader[uLoadGameUI_SelectedSlot].pName) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
114 pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[165]) + 25,
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
115 304, 0, pGlobalTXT_LocalizationStrings[165], 0, 0, 0);//"Пожалуйста, пожождите"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
116 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
117 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
118 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
119 if ( save )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
120 pSaveFiles = 40;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
121 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
122 pSaveFiles = uNumSavegameFiles;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
123
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
124 int slot_Y = 199;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
125 for ( uint i = pSaveListPosition; i < pSaveFiles; ++i )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
126 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
127 if ( slot_Y >= 346 )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
128 break;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
129 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS || i != uLoadGameUI_SelectedSlot )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
130 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 27, slot_Y, i == uLoadGameUI_SelectedSlot ? Color16(0xFF, 0xFF, 0x64) : 0, pSavegameHeader[i].pName, 185, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
131 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
132 pGUIWindow_CurrentMenu->DrawFlashingInputCursor(pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 27, slot_Y, i == uLoadGameUI_SelectedSlot ? Color16(0xFF, 0xFF, 0x64) : 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 175, 1) + 27,
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
133 slot_Y, pFontSmallnum);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
134 slot_Y += 21;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
135 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
136 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
137 pRenderer->EndScene();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
138 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
139 // 6A0C9C: using guessed type int dword_6A0C9C;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
140
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
141 //----- (004606F7) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
142 void LoadUI_Draw()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
143 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
144 UI_DrawSaveLoad(false);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
145 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
146
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
147 //----- (004606FE) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
148 void SaveUI_Draw()
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
149 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
150 UI_DrawSaveLoad(true);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
151 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
152
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
153 //----- (0045E361) --------------------------------------------------------
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
154 void LoadUI_Load(unsigned int uDialogueType)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
155 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
156 LODWriteableFile pLODFile; // [sp+1Ch] [bp-248h]@1
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
157
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
158 dword_6BE138 = -1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
159 pIcons_LOD->_inlined_sub2();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
160
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
161 memset(pSavegameUsedSlots.data(), 0, sizeof(pSavegameUsedSlots));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
162 memset(pSavegameThumbnails.data(), 0, 45 * sizeof(RGBTexture));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
163 uTextureID_loadsave = pIcons_LOD->LoadTexture("loadsave", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
164 uTextureID_load_up = pIcons_LOD->LoadTexture("load_up", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
165 uTextureID_save_up = pIcons_LOD->LoadTexture("save_up", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
166 uTextureID_LS_loadU = pIcons_LOD->LoadTexture("LS_loadU", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
167 uTextureID_LS_saveU = pIcons_LOD->LoadTexture("LS_saveU", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
168 uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
169 if ( uDialogueType )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
170 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
171 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave));
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
172 if ( current_screen_type == SCREEN_SAVEGAME )
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
173 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
174 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
175 pRenderer->DrawTextureIndexed( 18, 141, pIcons_LOD->GetTexture(uTextureID_save_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
176 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
177 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
178 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
179 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
180 pRenderer->DrawTextureIndexed( 18, 141, pIcons_LOD->GetTexture(uTextureID_load_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
181 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
182 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
183 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
184 else
2544
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
185 pRenderer->DrawTextureNew(0, 0, &main_menu_background);
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
186 pGUIWindow_CurrentMenu = new GUIWindow_Load(saveload_dlg_xs[uDialogueType], saveload_dlg_ys[uDialogueType], saveload_dlg_zs[uDialogueType],
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
187 saveload_dlg_ws[uDialogueType], 0, 0);
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
188 pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, 25, 199, 0, pGlobalTXT_LocalizationStrings[505], 0, 0, 0);// "Reading..."
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
189 pRenderer->Present();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
190 pSavegameList->Initialize(0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
191 if ( pSaveListPosition > (signed int)uNumSavegameFiles )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
192 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
193 pSaveListPosition = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
194 uLoadGameUI_SelectedSlot = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
195 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
196 pLODFile.AllocSubIndicesAndIO(300, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
197 Assert(sizeof(SavegameHeader) == 100);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
198 for (uint i = 0; i < uNumSavegameFiles; ++i)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
199 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
200 sprintf(pTmpBuf.data(), "saves\\%s", pSavegameList->pFileList[i].pSaveFileName);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
201 if (_access(pTmpBuf.data(), 6))
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
202 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
203 pSavegameUsedSlots[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
204 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[72]); // "Empty"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
205 continue;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
206 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
207 pLODFile.LoadFile(pTmpBuf.data(), 1);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
208 if ( pLODFile.FindContainer("header.bin", true) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
209 fread(&pSavegameHeader[i], 100, 1, pLODFile.FindContainer("header.bin", true));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
210 if ( !_stricmp(pSavegameList->pFileList[i].pSaveFileName, pGlobalTXT_LocalizationStrings[613]) )// "AutoSave.MM7"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
211 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[16]);// "Autosave"
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
212 if ( !pLODFile.FindContainer("image.pcx", true) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
213 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
214 pSavegameUsedSlots[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
215 strcpy(pSavegameList->pFileList[i].pSaveFileName, "");
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
216 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
217 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
218 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
219 pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", true), 0, true);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
220 pLODFile.CloseWriteFile();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
221 pSavegameUsedSlots[i] = 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
222 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
223 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
224
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
225 pLODFile.FreeSubIndexAndIO();
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
226 if ( current_screen_type == SCREEN_SAVEGAME )
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
227 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
228 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
229 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_saveD",TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
230 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
231 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
232 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
233 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
234 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_loadD",TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
235 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
236 uTextureID_AR_UP_DN = pIcons_LOD->LoadTexture("AR_UP_DN", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
237 uTextureID_AR_DN_DN = pIcons_LOD->LoadTexture("AR_DN_DN", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
238 pGUIWindow_CurrentMenu->CreateButton(21, 198, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
239 pGUIWindow_CurrentMenu->CreateButton(21, 219, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 1, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
240 pGUIWindow_CurrentMenu->CreateButton(21, 240, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 2, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
241 pGUIWindow_CurrentMenu->CreateButton(21, 261, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 3, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
242 pGUIWindow_CurrentMenu->CreateButton(21, 282, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
243 pGUIWindow_CurrentMenu->CreateButton(21, 303, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
244 pGUIWindow_CurrentMenu->CreateButton(21, 324, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
245 pBtnLoadSlot = pGUIWindow_CurrentMenu->CreateButton(241, 302, 105, 40, 1, 0, UIMSG_SaveLoadBtn, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
246 pBtnCancel = pGUIWindow_CurrentMenu->CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
247 pBtnArrowUp = pGUIWindow_CurrentMenu->CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
248 pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, uNumSavegameFiles, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
249 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
250
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
251 //----- (0045E93E) --------------------------------------------------------
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
252 GUIWindow *SaveUI_Load(enum CURRENT_SCREEN screen)
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
253 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
254 char *v3; // eax@7
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
255 LODWriteableFile pLODFile; // [sp+1Ch] [bp-248h]@1
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
256
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
257 ++pIcons_LOD->uTexturePacksCount;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
258 if ( !pIcons_LOD->uNumPrevLoadedFiles )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
259 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
260 memset(&pSavegameUsedSlots, 0, sizeof(pSavegameUsedSlots));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
261 memset(&pSavegameThumbnails, 0, sizeof(pSavegameThumbnails));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
262 uTextureID_loadsave = pIcons_LOD->LoadTexture("loadsave", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
263 uTextureID_load_up = pIcons_LOD->LoadTexture("load_up", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
264 uTextureID_save_up = pIcons_LOD->LoadTexture("save_up", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
265 uTextureID_LS_loadU = pIcons_LOD->LoadTexture("LS_loadU", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
266 uTextureID_LS_saveU = pIcons_LOD->LoadTexture("LS_saveU", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
267 uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
268 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave));
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
269 if (screen == SCREEN_SAVEGAME)
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
270 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
271 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
272 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
273 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_save_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
274 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
275 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
276 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
277 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
278 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
279 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_load_up));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
280 }
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
281
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
282 //pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, 25, 199, 0, pGlobalTXT_LocalizationStrings[505], 0, 0, 0);//Read...(Чтение...)
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
283 pRenderer->Present();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
284 pSavegameList->Initialize(1);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
285 pLODFile.AllocSubIndicesAndIO(300, 0);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
286 for (uint i = 0; i < 40; ++i)
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
287 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
288 v3 = pSavegameList->pFileList[i].pSaveFileName;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
289 if ( !*pSavegameList->pFileList[i].pSaveFileName )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
290 v3 = "1.mm7";
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
291 sprintf(pTmpBuf.data(), "saves\\%s", v3);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
292 if ( _access(pTmpBuf.data(), 0) || _access(pTmpBuf.data(), 6) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
293 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
294 pSavegameUsedSlots[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
295 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[LOCSTR_EMPTY]);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
296 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
297 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
298 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
299 pLODFile.LoadFile(pTmpBuf.data(), 1);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
300 fread(&pSavegameHeader[i], 100, 1, pLODFile.FindContainer("header.bin", 1));
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
301 if ( pLODFile.FindContainer("image.pcx", 1) )
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
302 {
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
303 pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", 1), 0, 1);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
304 pLODFile.CloseWriteFile();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
305 pSavegameUsedSlots[i] = 1;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
306 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
307 else
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
308 pSavegameUsedSlots[i] = 0;
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
309 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
310 }
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
311 pLODFile.FreeSubIndexAndIO();
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
312 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
313 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_saveD", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
314 uTextureID_AR_UP_DN = pIcons_LOD->LoadTexture("AR_UP_DN", TEXTURE_16BIT_PALETTE);
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
315 uTextureID_AR_DN_DN = pIcons_LOD->LoadTexture("AR_DN_DN", TEXTURE_16BIT_PALETTE);
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
316
2544
c674d547cc7c GUIWindow switch logic refactored into behaviour classes
a.parshin
parents: 2541
diff changeset
317 auto wnd = new GUIWindow_Save(0, 0, window->GetWidth(), window->GetHeight(), 0, 0);
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
318 wnd->CreateButton(21, 198, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
319 wnd->CreateButton(21, 218, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 1, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
320 wnd->CreateButton(21, 238, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 2, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
321 wnd->CreateButton(21, 258, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 3, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
322 wnd->CreateButton(21, 278, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
323 wnd->CreateButton(21, 298, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
324 wnd->CreateButton(21, 318, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
325 pBtnLoadSlot = wnd->CreateButton(241, 302, 105, 40, 1, 0, UIMSG_SaveLoadBtn, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
326 pBtnCancel = wnd->CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
327 pBtnArrowUp = wnd->CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
328 pBtnDownArrow = wnd->CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, 34, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
329
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
330 return wnd;
2501
0ff6a9e9bf7f GUI folger
Ritor1
parents:
diff changeset
331 }