annotate Engine/SaveLoad.h @ 2553:48708da03b7f

Party Creation UI logic separated from MainMenu
author a.parshin
date Wed, 13 May 2015 02:20:05 +0200
parents 68cdef6879a0
children d87bfbd3bb3b
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1 #pragma once
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2 #include<array>
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5 struct SaveFile_
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7 char field_0[20];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8 char pSaveFileName[260];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12 /* 243 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 struct SavegameList
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16 static void Initialize(unsigned int a1);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 SavegameList() {Reset();}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
19 inline void Reset()
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
20 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
21 for ( int j = 0; j < 45; j++ )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
22 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
23 for (int i = 0; i < 20; ++i)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
24 this->pFileList[j].field_0[i] = 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
25 for (int i = 0; i < 260; ++i)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
26 this->pFileList[j].pSaveFileName[i] = 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
27 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
28 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
29 SaveFile_ pFileList[45];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
30
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
31 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
32 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
33
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
34
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
35 /* 244 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
36 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
37 struct SavegameHeader
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
38 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
39 char pName[20];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
40 char pLocationName[20];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
41 unsigned __int64 uWordTime;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
42 char field_30[52];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
43 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
44 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
45
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
46
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
47 void __fastcall LoadGame(unsigned int uSlot); // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
48 void SaveGame(bool IsAutoSAve, bool NotSaveWorld);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
49 void __fastcall DoSavegame(unsigned int uSlot); // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
50 bool Initialize_GamesLOD_NewLOD();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
51 void SaveNewGame();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
52
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
53 extern unsigned int uNumSavegameFiles;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
54 extern std::array<unsigned int, 45> pSavegameUsedSlots;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
55 extern struct SavegameList *pSavegameList;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
56 extern std::array<SavegameHeader, 45> pSavegameHeader;