30 #ifndef AGS_SHARED_GAME_ROOM_FILE_H 31 #define AGS_SHARED_GAME_ROOM_FILE_H 33 #include "common/std/memory.h" 34 #include "common/std/vector.h" 35 #include "ags/shared/core/platform.h" 36 #include "ags/shared/game/room_version.h" 37 #include "ags/shared/util/error.h" 38 #include "ags/shared/util/stream.h" 39 #include "ags/shared/util/string.h" 49 enum RoomFileErrorType {
51 kRoomFileErr_FileOpenFailed,
52 kRoomFileErr_FormatNotSupported,
53 kRoomFileErr_BlockListFailed,
54 kRoomFileErr_UnknownBlockType,
55 kRoomFileErr_OldBlockNotSupported,
56 kRoomFileErr_BlockDataOverlapping,
57 kRoomFileErr_IncompatibleEngine,
58 kRoomFileErr_ScriptLoadFailed,
59 kRoomFileErr_InconsistentData,
60 kRoomFileErr_PropertiesBlockFormat,
61 kRoomFileErr_InvalidPropertyValues,
62 kRoomFileErr_BlockNotFound
72 kRoomFblk_CompScript = 3,
73 kRoomFblk_CompScript2 = 4,
75 kRoomFblk_ObjectNames = 5,
79 kRoomFblk_CompScript3 = 7,
81 kRoomFblk_Properties = 8,
83 kRoomFblk_ObjectScNames = 9,
88 String GetRoomFileErrorText(RoomFileErrorType err);
89 String GetRoomBlockName(RoomFileBlock
id);
91 typedef TypedCodeError<RoomFileErrorType, GetRoomFileErrorText> RoomFileError;
92 typedef ErrorHandle<RoomFileError> HRoomFileError;
93 #ifdef AGS_PLATFORM_SCUMMVM 105 RoomFileVersion DataVersion;
117 HRoomFileError ReadRoomData(
RoomStruct *room,
Stream *in, RoomFileVersion data_ver);
123 HRoomFileError ExtractScriptText(
String &script,
Stream *in, RoomFileVersion data_ver);
125 HRoomFileError WriteRoomData(
const RoomStruct *room,
Stream *out, RoomFileVersion data_ver);
135 void WriteRoomBlock(
const RoomStruct *room, RoomFileBlock block, PfnWriteRoomBlock writer,
Stream *out);
Definition: achievements_tables.h:27
Definition: room_file.h:101
Definition: room_struct.h:270