aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/voyeur.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-01-08 23:31:34 -0500
committerPaul Gilbert2014-01-08 23:31:34 -0500
commitdfe3d8b4ceab85f3831ad4fe7fb0fa587c1e67fa (patch)
tree260e35d31cd673798b45f6e88b31a2ed9bdbf4ff /engines/voyeur/voyeur.h
parentd0703467b42d3636f3d81683efc3e336ab33052f (diff)
downloadscummvm-rg350-dfe3d8b4ceab85f3831ad4fe7fb0fa587c1e67fa.tar.gz
scummvm-rg350-dfe3d8b4ceab85f3831ad4fe7fb0fa587c1e67fa.tar.bz2
scummvm-rg350-dfe3d8b4ceab85f3831ad4fe7fb0fa587c1e67fa.zip
VOYEUR: Preliminary savegame functionality
Diffstat (limited to 'engines/voyeur/voyeur.h')
-rw-r--r--engines/voyeur/voyeur.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index 4ee5f84b02..1622524108 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -33,6 +33,8 @@
#include "common/system.h"
#include "common/error.h"
#include "common/random.h"
+#include "common/savefile.h"
+#include "common/serializer.h"
#include "common/util.h"
#include "engines/engine.h"
#include "graphics/surface.h"
@@ -134,6 +136,11 @@ private:
void playAVideoEvent(int eventIndex);
int getChooseButton();
+
+ /**
+ * Synchronizes the game data
+ */
+ void synchronize(Common::Serializer &s);
protected:
// Engine APIs
virtual Common::Error run();
@@ -169,7 +176,9 @@ public:
int _timeBarVal;
int _checkPhoneVal;
Common::Point _mansionViewPos;
+ ThreadResource *_mainThread;
VoyeurArea _voyeurArea;
+ int _loadGameSlot;
public:
VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc);
virtual ~VoyeurEngine();
@@ -187,6 +196,7 @@ public:
virtual bool canSaveGameStateCurrently();
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ void loadGame(int slot);
void playRL2Video(const Common::String &filename);
void doTransitionCard(const Common::String &time, const Common::String &location);
@@ -243,6 +253,20 @@ public:
Common::String getTimeOfDay();
};
+#define VOYEUR_SAVEGAME_VERSION 1
+
+struct VoyeurSavegameHeader {
+ uint8 _version;
+ Common::String _saveName;
+ Graphics::Surface *_thumbnail;
+ int _saveYear, _saveMonth, _saveDay;
+ int _saveHour, _saveMinutes;
+ int _totalFrames;
+
+ bool read(Common::InSaveFile *f);
+ void write(Common::OutSaveFile *f, VoyeurEngine *vm, const Common::String &saveName);
+};
+
} // End of namespace Voyeur
#endif /* VOYEUR_VOYEUR_H */