22 #ifndef AGS_ENGINE_GAME_SAVEGAME_H 23 #define AGS_ENGINE_GAME_SAVEGAME_H 25 #include "common/std/memory.h" 26 #include "ags/shared/core/platform.h" 27 #include "ags/shared/ac/game_version.h" 28 #include "ags/shared/util/error.h" 29 #include "ags/shared/util/version.h" 42 using Shared::ErrorHandle;
43 using Shared::TypedCodeError;
46 using Shared::Version;
57 enum SavegameVersion {
58 kSvgVersion_Undefined = 0,
60 kSvgVersion_Components = 9,
61 kSvgVersion_Cmp_64bit = 10,
62 kSvgVersion_350_final = 11,
63 kSvgVersion_350_final2 = 12,
65 kSvgVersion_360_beta = 3060023,
66 kSvgVersion_360_final = 3060041,
67 kSvgVersion_Current = kSvgVersion_360_final,
68 kSvgVersion_LowestSupported = kSvgVersion_321
72 enum SavegameErrorType {
74 kSvgErr_FileOpenFailed,
75 kSvgErr_SignatureFailed,
76 kSvgErr_FormatVersionNotSupported,
77 kSvgErr_IncompatibleEngine,
78 kSvgErr_GameGuidMismatch,
79 kSvgErr_ComponentListOpeningTagFormat,
80 kSvgErr_ComponentListClosingTagMissing,
81 kSvgErr_ComponentOpeningTagFormat,
82 kSvgErr_ComponentClosingTagFormat,
83 kSvgErr_ComponentSizeMismatch,
84 kSvgErr_UnsupportedComponent,
85 kSvgErr_ComponentSerialization,
86 kSvgErr_ComponentUnserialization,
87 kSvgErr_InconsistentFormat,
88 kSvgErr_UnsupportedComponentVersion,
89 kSvgErr_GameContentAssertion,
90 kSvgErr_InconsistentData,
91 kSvgErr_InconsistentPlugin,
92 kSvgErr_DifferentColorDepth,
93 kSvgErr_GameObjectInitFailed,
97 String GetSavegameErrorText(SavegameErrorType err);
99 typedef TypedCodeError<SavegameErrorType, GetSavegameErrorText> SavegameError;
100 typedef ErrorHandle<SavegameError> HSaveError;
105 static const char *Signature;
107 static const char *LegacySignature;
121 enum SavegameDescElem {
123 kSvgDesc_EnvInfo = 0x0001,
124 kSvgDesc_UserText = 0x0002,
125 kSvgDesc_UserImage = 0x0004,
126 kSvgDesc_All = kSvgDesc_EnvInfo | kSvgDesc_UserText | kSvgDesc_UserImage
147 GameDataVersion MainDataVersion;
166 HSaveError RestoreGameState(
Stream *in, SavegameVersion svg_version);
172 void SaveGameState(
Stream *out);
Definition: achievements_tables.h:27
Definition: allegro_bitmap.h:44
Definition: savegame.h:131
Definition: savegame.h:103