1 /*
2 	This file is part of Warzone 2100.
3 	Copyright (C) 1999-2004  Eidos Interactive
4 	Copyright (C) 2005-2020  Warzone 2100 Project
5 
6 	Warzone 2100 is free software; you can redistribute it and/or modify
7 	it under the terms of the GNU General Public License as published by
8 	the Free Software Foundation; either version 2 of the License, or
9 	(at your option) any later version.
10 
11 	Warzone 2100 is distributed in the hope that it will be useful,
12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 	GNU General Public License for more details.
15 
16 	You should have received a copy of the GNU General Public License
17 	along with Warzone 2100; if not, write to the Free Software
18 	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 /** @file
21  *
22  *  types and defines for save game routines
23  */
24 
25 #ifndef __INCLUDED_SRC_GAMEDEF_H__
26 #define __INCLUDED_SRC_GAMEDEF_H__
27 
28 /***************************************************************************/
29 /*
30  *	Global Definitions
31  */
32  /***************************************************************************/
33 //the version number used in save games
34 //#define VERSION_1             1	        // demo save games
35 //#define VERSION_2             2	        // names saved for components/structures/features
36 //#define VERSION_3             3	        // changes to SAVE_GAME
37 //#define VERSION_4             4	        // changes to SAVE_GAME
38 //#define VERSION_5             5	        // different types of save game added
39 //#define VERSION_6             6	        // level name added to a user save game
40 #define VERSION_7               7	        // string ID names saved for comps an objects
41 #define VERSION_8               8	        // research status saved out for user saved games
42 #define VERSION_9               9	        // power and experience saved out for user saved games
43 #define VERSION_10              10	        // includes gateways and zones in .map file.
44 #define VERSION_11              11	        // newstyle save game with extending structure checked in 13 Nov.
45 #define VERSION_12              12	        // mission and order stuff checked in 20 Nov.
46 //#define VERSION_13            13	        // odds and ends to 24 Nov. and hashed scripts
47 #define VERSION_14              14	        //
48 #define VERSION_15              15	        //
49 #define VERSION_16              16	        // beta save game
50 #define VERSION_17              17	        // objId and new struct stats included
51 #define VERSION_18              18	        // droid name savegame validity stamps
52 #define VERSION_19              19	        // alliances, colours, radar zoom
53 #define VERSION_20              20	        // MAX_NAME_ SIZE replaced by MAX_SAVE_NAME_SIZE
54 #define VERSION_21              21	        // timeStartHold saved out for research facilities
55 #define VERSION_22              22	        // asRundData
56 #define VERSION_23              23	        // limbo droids and camstart droids saved properly, no cluster save
57 #define VERSION_24              24	        // reinforceTime, droid move, droid resistance
58 #define VERSION_25              25	        // limbo droid, research module hold fixed, cleaned by Alex
59 #define VERSION_26              26	        // reArm pads
60 #define VERSION_27              27	        // unit not the "d" word, experience and repair facility currentPtsAdded
61 #define VERSION_28              28	        // rearm pads currentPtsAdded saved
62 #define VERSION_29              29	        // mission scroll limits saved
63 #define VERSION_30              30	        // script external variables saved
64 #define VERSION_31              31	        // mission cheat time saved
65 #define VERSION_32              32	        // factory secondary order saved
66 #define VERSION_33              33	        // skirmish save
67 #define VERSION_34              34	        // saves AI names for multiplayer (.gam file)
68 #define VERSION_35              35	        // uses the (de)serialization API for saving/loading games and is big-endian instead of little-endian
69 #define VERSION_36              36	        // saves beacon properly
70 //#define VERSION_37            37	        // dpid changes; this had better be the last version
71 #define VERSION_38              38	        // mod list!
72 #define VERSION_39              39	        // lots of changes, breaking everything
73 
74 #define CURRENT_VERSION_NUM     VERSION_39
75 
76 //used in the loadGame
77 #define KEEPOBJECTS				true
78 #define FREEMEM					true
79 
80 enum GAME_TYPE
81 {
82 	GTYPE_SCENARIO_START,   ///< Initial scenario state.
83 	GTYPE_SCENARIO_EXPAND,  ///< Scenario scroll area expansion.
84 	GTYPE_MISSION,          ///< Stand alone mission.
85 	GTYPE_SAVE_START,       ///< User saved game - at the start of a level.
86 	GTYPE_SAVE_MIDMISSION,  ///< User saved game - in the middle of a level
87 };
88 
89 struct VIS_SAVEHEADER
90 {
91 	char        aFileType[4];
92 	uint32_t    version;
93 };
94 
95 #endif // __INCLUDED_SRC_GAMEDEF_H__
96