aboutsummaryrefslogtreecommitdiff
path: root/sky/control.h
diff options
context:
space:
mode:
Diffstat (limited to 'sky/control.h')
-rw-r--r--sky/control.h31
1 files changed, 7 insertions, 24 deletions
diff --git a/sky/control.h b/sky/control.h
index 15be94e0aa..717ac4ef36 100644
--- a/sky/control.h
+++ b/sky/control.h
@@ -37,6 +37,7 @@ class Mouse;
class Text;
class MusicBase;
class Sound;
+class SkyCompact;
struct Compact;
struct dataFileHeader;
struct MegaSet;
@@ -118,9 +119,8 @@ struct MegaSet;
#define SAVE_GRAFX 32
#define SAVE_TURNP 64
-#define SAVE_FILE_REVISION 5
-// skipping revision 4, that one will be used for messy downward compatibility in 0.5.0 branch
-#define OLD_SAVEGAME_TYPE 4
+#define SAVE_FILE_REVISION 6
+#define OLD_SAVEGAME_TYPE 5
struct AllocedMem {
uint16 *mem;
@@ -175,7 +175,7 @@ private:
class Control {
public:
- Control(SaveFileManager *saveFileMan, Screen *screen, Disk *disk, Mouse *mouse, Text *text, MusicBase *music, Logic *logic, Sound *sound, OSystem *system);
+ Control(SaveFileManager *saveFileMan, Screen *screen, Disk *disk, Mouse *mouse, Text *text, MusicBase *music, Logic *logic, Sound *sound, SkyCompact *skyCompact, OSystem *system);
void doControlPanel(void);
void doLoadSavePanel(void);
void restartGame(void);
@@ -218,33 +218,16 @@ private:
uint16 _selectedGame;
uint16 saveGameToFile(void);
- void stosMegaSet(uint8 **destPos, MegaSet *mega);
- void stosCompact(uint8 **destPos, Compact *cpt);
- void stosStr(uint8 **destPos, Compact *cpt, uint16 type);
uint32 prepareSaveData(uint8 *destBuf);
bool autoSaveExists(void);
uint16 restoreGameFromFile(bool autoSave);
- void lodsMegaSet(uint8 **srcPos, MegaSet *mega);
- void lodsCompact(uint8 **srcPos, Compact *cpt);
- void lodsStr(uint8 **srcPos, uint16 *src);
+ void importOldMegaSet(uint8 **srcPos, MegaSet *mega);
+ void importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems, uint16 type, char *name);
uint16 parseSaveData(uint8 *srcBuf);
- uint16 *lz77decode(uint16 *data);
- void applyDiff(uint16 *data, uint16 *diffData, uint16 len);
- static Compact *_saveLoadCpts[833]; //-----------------
- static uint16 *_saveLoadARs[19];
- static uint8 _resetData288[0x39B8];
- static uint8 _resetDiff303[824]; // moved to sky/compacts/savedata.cpp
- static uint8 _resetDiff331[824];
- static uint8 _resetDiff348[824];
- static uint8 _resetDiffCd[856]; //-----------------
-
- AllocedMem *_memListRoot;
- void appendMemList(uint16 *pMem);
- void freeMemList(void);
-
SaveFileManager *_saveFileMan;
+ SkyCompact *_skyCompact;
Screen *_skyScreen;
Disk *_skyDisk;
Mouse *_skyMouse;