annotate GUI/UI/UISaveLoad.cpp @ 2541:a902abdfc7f2

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