annotate UI/UISaveLoad.cpp @ 2415:f4af3b203f65

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