28 #ifndef GOB_SAVE_SAVELOAD_H 29 #define GOB_SAVE_SAVELOAD_H 31 #include "gob/save/savefile.h" 32 #include "gob/save/savehandler.h" 57 static const char *
stripPath(
const char *fileName,
char separator =
'\\');
69 int32
getSize(
const char *fileName);
71 bool load(
const char *fileName, int16 dataVar, int32 size, int32 offset);
72 bool loadToRaw(
const char *fileName, byte *ptr, int32 size, int32 offset);
74 bool save(
const char *fileName, int16 dataVar, int32 size, int32 offset);
75 bool saveFromRaw(
const char *fileName, byte *ptr, int32 size, int32 offset);
76 bool copySaveGame(
const char *fileNameSrc,
const char *fileNameDest);
84 virtual SaveHandler *getHandler(
const char *fileName)
const;
85 virtual const char *getDescription(
const char *fileName)
const;
97 static const uint32 kSlotCount = 7;
98 static const uint32 kSlotSize = 44;
100 static const uint32 kSaveFileSize = kSlotCount * kSlotSize;
103 const char *sourceName;
106 const char *description;
116 bool load(int16 dataVar, int32 size, int32 offset)
override;
117 bool save(int16 dataVar, int32 size, int32 offset)
override;
126 int getSlot(int32 offset)
const override;
127 int getSlotRemainder(int32 offset)
const override;
135 SaveHandler *getHandler(
const char *fileName)
const override;
136 const char *getDescription(
const char *fileName)
const override;
138 const SaveFile *getSaveFile(
const char *fileName)
const;
139 SaveFile *getSaveFile(
const char *fileName);
145 static const uint32 kSlotCount = 15;
146 static const uint32 kSlotNameLength = 40;
149 static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
158 const char *sourceName;
161 const char *description;
171 bool load(int16 dataVar, int32 size, int32 offset)
override;
172 bool save(int16 dataVar, int32 size, int32 offset)
override;
181 int getSlot(int32 offset)
const override;
182 int getSlotRemainder(int32 offset)
const override;
185 byte _index[kIndexSize];
190 void buildIndex(byte *buffer)
const;
199 SaveHandler *getHandler(
const char *fileName)
const override;
200 const char *getDescription(
const char *fileName)
const override;
202 const SaveFile *getSaveFile(
const char *fileName)
const;
203 SaveFile *getSaveFile(
const char *fileName);
209 static const uint32 kSlotCount = 15;
210 static const uint32 kSlotNameLength = 40;
213 static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
222 const char *sourceName;
226 const char *description;
236 bool load(int16 dataVar, int32 size, int32 offset)
override;
237 bool save(int16 dataVar, int32 size, int32 offset)
override;
246 int getSlot(int32 offset)
const override;
247 int getSlotRemainder(int32 offset)
const override;
256 void buildIndex(byte *buffer)
const;
259 byte _index[kIndexSize];
264 SaveHandler *getHandler(
const char *fileName)
const override;
265 const char *getDescription(
const char *fileName)
const override;
267 const SaveFile *getSaveFile(
const char *fileName)
const;
268 SaveFile *getSaveFile(
const char *fileName);
274 static const int32 kAdibou1NbrOfDrawings = 8;
282 const char *sourceName;
285 const char *description;
294 bool load(int16 dataVar, int32 size, int32 offset)
override;
295 bool save(int16 dataVar, int32 size, int32 offset)
override;
316 bool load(int16 dataVar, int32 size, int32 offset)
override;
317 bool save(int16 dataVar, int32 size, int32 offset)
override;
337 bool load(int16 dataVar, int32 size, int32 offset)
override;
338 bool save(int16 dataVar, int32 size, int32 offset)
override;
343 bool save(
const byte *ptrRaw, int16 dataVar, int32 size, int32 offset);
362 SaveHandler *getHandler(
const char *fileName)
const override;
363 const char *getDescription(
const char *fileName)
const override;
365 const SaveFile *getSaveFile(
const char *fileName)
const;
366 SaveFile *getSaveFile(
const char *fileName);
372 static const uint32 kSlotCount = 30;
373 static const uint32 kSlotNameLength = 40;
375 static const uint32 kPropsSize = 500;
377 static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
391 const char *sourceName;
394 const char *description;
408 bool load(int16 dataVar, int32 size, int32 offset)
override;
409 bool save(int16 dataVar, int32 size, int32 offset)
override;
421 int getSlot(int32 offset)
const override;
422 int getSlotRemainder(int32 offset)
const override;
428 bool _usesScreenshots;
433 byte _props[kPropsSize];
434 byte _index[kIndexSize];
440 void buildIndex(byte *buffer)
const;
442 bool createReader(
int slot);
443 bool createWriter(
int slot);
454 bool load(int16 dataVar, int32 size, int32 offset)
override;
455 bool save(int16 dataVar, int32 size, int32 offset)
override;
462 uint32 shotSize, uint32 shotIndexSize);
465 int getSlot(int32 offset)
const override;
466 int getSlotRemainder(int32 offset)
const override;
468 void buildScreenshotIndex(byte *buffer)
const;
472 uint32 _shotIndexSize;
480 int32 _shotIndexSize;
493 SaveHandler *getHandler(
const char *fileName)
const override;
494 const char *getDescription(
const char *fileName)
const override;
496 const SaveFile *getSaveFile(
const char *fileName)
const;
497 SaveFile *getSaveFile(
const char *fileName);
503 static const uint32 kSlotCount = 40;
504 static const uint32 kPropsSize = 500;
513 const char *sourceName;
516 const char *description;
526 bool load(int16 dataVar, int32 size, int32 offset)
override;
527 bool save(int16 dataVar, int32 size, int32 offset)
override;
541 bool load(int16 dataVar, int32 size, int32 offset)
override;
542 bool save(int16 dataVar, int32 size, int32 offset)
override;
554 int getSlot(int32 offset)
const override;
555 int getSlotRemainder(int32 offset)
const override;
562 byte _props[kPropsSize];
569 bool createReader(
int slot);
570 bool createWriter(
int slot);
580 bool load(int16 dataVar, int32 size, int32 offset)
override;
581 bool save(int16 dataVar, int32 size, int32 offset)
override;
590 int getSlot(int32 offset)
const override;
591 int getSlotRemainder(int32 offset)
const override;
593 void buildScreenshotIndex(byte *buffer)
const;
609 SaveHandler *getHandler(
const char *fileName)
const override;
610 const char *getDescription(
const char *fileName)
const override;
612 const SaveFile *getSaveFile(
const char *fileName)
const;
613 SaveFile *getSaveFile(
const char *fileName);
619 static const uint32 kSlotCount = 10;
620 static const uint32 kSlotNameLength = 40;
622 static const uint32 kPropsSize = 500;
624 static const uint32 kIndexSize = (kSlotCount * kSlotNameLength) + 800;
633 const char *sourceName;
636 const char *description;
648 int getLastSlot()
const;
651 bool load(int16 dataVar, int32 size, int32 offset)
override;
652 bool save(int16 dataVar, int32 size, int32 offset)
override;
654 bool saveScreenProps(
int slot,
const byte *props);
655 bool loadScreenProps(
int slot, byte *props);
664 int getSlot(int32 offset)
const override;
665 int getSlotRemainder(int32 offset)
const override;
671 byte _props[kPropsSize];
672 byte _index[kIndexSize];
682 void buildIndex(byte *buffer)
const;
684 bool createReader(
int slot);
685 bool createWriter(
int slot);
695 bool load(int16 dataVar, int32 size, int32 offset)
override;
696 bool save(int16 dataVar, int32 size, int32 offset)
override;
709 bool load(int16 dataVar, int32 size, int32 offset)
override;
710 bool save(int16 dataVar, int32 size, int32 offset)
override;
718 int getSlot(int32 offset)
const override;
719 int getSlotRemainder(int32 offset)
const override;
738 SaveHandler *getHandler(
const char *fileName)
const override;
739 const char *getDescription(
const char *fileName)
const override;
741 const SaveFile *getSaveFile(
const char *fileName)
const;
742 SaveFile *getSaveFile(
const char *fileName);
748 static const uint32 kSlotCount = 60;
749 static const uint32 kSlotNameLength = 40;
751 static const uint32 kPropsSize = 500;
753 static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
762 const char *sourceName;
765 const char *description;
785 bool load(int16 dataVar, int32 size, int32 offset)
override;
786 bool save(int16 dataVar, int32 size, int32 offset)
override;
788 uint8 getExtraID(
int slot);
789 bool loadExtra(
int slot, uint8
id, int16 dataVar, int32 size, int32 offset);
790 bool saveExtra(
int slot, uint8
id, int16 dataVar, int32 size, int32 offset);
799 int getSlot(int32 offset)
const override;
800 int getSlotRemainder(int32 offset)
const override;
805 byte _props[kPropsSize];
806 byte _index[kIndexSize];
815 void buildIndex(byte *buffer)
const;
819 bool createReader(
int slot);
820 bool createWriter(
int slot);
830 bool load(int16 dataVar, int32 size, int32 offset)
override;
831 bool save(int16 dataVar, int32 size, int32 offset)
override;
850 bool load(int16 dataVar, int32 size, int32 offset)
override;
851 bool save(int16 dataVar, int32 size, int32 offset)
override;
870 bool load(int16 dataVar, int32 size, int32 offset)
override;
871 bool save(int16 dataVar, int32 size, int32 offset)
override;
887 bool load(int16 dataVar, int32 size, int32 offset)
override;
888 bool save(int16 dataVar, int32 size, int32 offset)
override;
906 SaveHandler *getHandler(
const char *fileName)
const override;
907 const char *getDescription(
const char *fileName)
const override;
909 const SaveFile *getSaveFile(
const char *fileName)
const;
910 SaveFile *getSaveFile(
const char *fileName);
916 static const uint32 kSlotCount = 60;
917 static const uint32 kSlotNameLength = 40;
919 static const uint32 kPropsSize = 3921;
921 static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
930 const char *sourceName;
933 const char *description;
943 bool load(int16 dataVar, int32 size, int32 offset)
override;
944 bool save(int16 dataVar, int32 size, int32 offset)
override;
953 int getSlot(int32 offset)
const override;
954 int getSlotRemainder(int32 offset)
const override;
957 byte _props[kPropsSize];
958 byte _index[kIndexSize];
963 void buildIndex(byte *buffer)
const;
970 SaveHandler *getHandler(
const char *fileName)
const override;
971 const char *getDescription(
const char *fileName)
const override;
973 const SaveFile *getSaveFile(
const char *fileName)
const;
974 SaveFile *getSaveFile(
const char *fileName);
980 static const uint32 kChildrenCount = 16;
981 static const uint32 kAdibou2NbrOfApplications = 5;
982 static const uint32 kAdibou2NbrOfSavedDrawings = 12;
983 static const uint32 kAdibou2NbrOfConstructionGameFiles = 3;
992 const char *sourceName;
995 const char *description;
1004 bool load(int16 dataVar, int32 size, int32 offset)
override;
1005 bool save(int16 dataVar, int32 size, int32 offset)
override;
1006 bool loadToRaw(byte *ptr, int32 size, int32 offset)
override;
1007 bool saveFromRaw(
const byte* ptr, int32 size, int32 offset)
override;
1026 uint32 chunkSize = 1);
1030 bool load(int16 dataVar, int32 size, int32 offset)
override;
1031 bool save(int16 dataVar, int32 size, int32 offset)
override;
1054 bool load(int16 dataVar, int32 size, int32 offset)
override;
1055 bool save(int16 dataVar, int32 size, int32 offset)
override;
1056 bool loadToRaw(byte *ptr, int32 size, int32 offset)
override;
1057 bool saveFromRaw(
const byte *ptr, int32 size, int32 offset)
override;
1062 bool save(
const byte *ptrRaw, int16 dataVar, int32 size, int32 offset);
1083 FakeFileHandler *_adibou2ConstructionGameTempFileHandler[kAdibou2NbrOfConstructionGameFiles];
1084 GameFileHandler *_adibou2ConstructionGameProgressHandler[kChildrenCount][kAdibou2NbrOfConstructionGameFiles];
1085 GameFileHandler *_adibou2AppProgressHandler[kChildrenCount][kAdibou2NbrOfApplications];
1095 SpriteHandler *_adibou2DrawingHandler[kChildrenCount][kAdibou2NbrOfSavedDrawings];
1096 SpriteHandler *_adibou2DrawingThumbnailHandler[kChildrenCount][kAdibou2NbrOfSavedDrawings];
1098 SpriteHandler *_adibou2DrawingMailboxHandler[kChildrenCount];
1102 SpriteHandler *_adibou2FadedFlowerInVaseHandler[kChildrenCount];
1112 SaveHandler *getHandler(
const char *fileName)
const override;
1113 const char *getDescription(
const char *fileName)
const override;
1115 const SaveFile *getSaveFile(
const char *fileName)
const;
1120 #endif // GOB_SAVE_SAVELOAD_H Definition: saveload.h:221
Definition: saveload.h:448
Definition: saveload.h:143
static const char * stripPath(const char *fileName, char separator='\\')
Definition: saveload.h:937
Definition: savefile.h:313
Definition: saveload.h:702
Definition: savehandler.h:96
Definition: savehandler.h:172
Definition: saveload.h:1020
Ignore it.
Definition: saveload.h:44
Definition: saveload.h:165
Definition: savefile.h:340
SaveMode
Definition: saveload.h:42
Definition: saveload.h:881
Definition: savehandler.h:194
Definition: saveload.h:824
Definition: saveload.h:110
Definition: saveload.h:102
Definition: saveload.h:779
Definition: saveload.h:617
Definition: saveload.h:89
ScreenshotType
Definition: saveload.h:379
Definition: saveload.h:512
Definition: saveload.h:533
virtual Common::List< Common::String > getFilesMatchingPattern(const char *pattern) const
Definition: saveload.h:207
Definition: saveload.h:978
Definition: saveload.h:642
A normal save.
Definition: saveload.h:46
Definition: savehandler.h:141
Definition: saveload.h:157
Definition: saveload.h:991
Definition: savehandler.h:68
Definition: saveload.h:761
Definition: saveload.h:390
Definition: saveload.h:632
Definition: savehandler.h:116
Definition: saveload.h:288
Goblins 3 type screenshot.
Definition: saveload.h:380
Definition: saveload.h:864
Definition: saveload.h:400
Definition: saveload.h:370
Definition: saveload.h:520
Definition: saveload.h:230
Definition: saveload.h:548
Definition: saveload.h:574
bool load(const char *fileName, int16 dataVar, int32 size, int32 offset)
Definition: saveload.h:272
Definition: savefile.h:162
Definition: saveload.h:844
Definition: saveload.h:415
Definition: saveload.h:308
static Common::String replacePathSeparators(const char *path, char newSeparator)
Definition: saveload.h:929
Definition: saveload.h:39
Definition: saveload.h:501
int32 getSize(const char *fileName)
Definition: saveload.h:1048
bool save(const char *fileName, int16 dataVar, int32 size, int32 offset)
Definition: saveload.h:914
Definition: saveload.h:769
Definition: saveload.h:331
Definition: saveload.h:746
bool deleteFile(const char *fileName)
Definition: saveload.h:688
Don't handle it.
Definition: saveload.h:43
Definition: saveload.h:281
virtual SaveMode getSaveMode(const char *fileName) const
Definition: saveload.h:658
Definition: saveload.h:998
Just claim it exists.
Definition: saveload.h:45