diff options
author | Arnaud Boutonné | 2010-11-29 17:42:08 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-11-29 17:42:08 +0000 |
commit | 45f55128b1c811bd2824e0acfbd5801fc78a2256 (patch) | |
tree | d1cc851ea4b8db2ee0a7fbbb0e3bc40fcd6082af /engines/hugo/hugo.h | |
parent | 4bed2b3ff588452ed754d0758bf9b1b0df0e8c92 (diff) | |
download | scummvm-rg350-45f55128b1c811bd2824e0acfbd5801fc78a2256.tar.gz scummvm-rg350-45f55128b1c811bd2824e0acfbd5801fc78a2256.tar.bz2 scummvm-rg350-45f55128b1c811bd2824e0acfbd5801fc78a2256.zip |
HUGO: Add GMM save/load and RTL
svn-id: r54576
Diffstat (limited to 'engines/hugo/hugo.h')
-rw-r--r-- | engines/hugo/hugo.h | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index d7dd767b6b..903dd5a7bc 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -32,6 +32,7 @@ // This include is here temporarily while the engine is being refactored. #include "hugo/game.h" +#include "hugo/file.h" #define HUGO_DAT_VER_MAJ 0 // 1 byte #define HUGO_DAT_VER_MIN 30 // 1 byte @@ -59,6 +60,8 @@ class RandomSource; */ namespace Hugo { +static const int kSavegameVersion = 2; + enum GameType { kGameTypeNone = 0, kGameTypeHugo1, @@ -114,6 +117,8 @@ public: HugoEngine(OSystem *syst, const HugoGameDescription *gd); ~HugoEngine(); + OSystem *_system; + byte _numVariant; byte _gameVariant; byte _maxInvent; @@ -172,6 +177,7 @@ public: const HugoGameDescription *_gameDescription; uint32 getFeatures() const; + const char *HugoEngine::getGameId() const; GameType getGameType() const; Common::Platform getPlatform() const; @@ -183,17 +189,17 @@ public: return *s_Engine; } - void initGame(const HugoGameDescription *gd); - void initGamePart(const HugoGameDescription *gd); + bool canLoadGameStateCurrently(); + bool canSaveGameStateCurrently(); bool loadHugoDat(); - int getMouseX() const { - return _mouseX; - } - int getMouseY() const { - return _mouseY; - } + char *useBG(char *name); + int deltaX(int x1, int x2, int vx, int y); + int deltaY(int x1, int x2, int vy, int y); + + void initGame(const HugoGameDescription *gd); + void initGamePart(const HugoGameDescription *gd); void boundaryCollision(object_t *obj); void clearBoundary(int x1, int x2, int y); void endGame(); @@ -204,10 +210,12 @@ public: void shutdown(); void storeBoundary(int x1, int x2, int y); - char *useBG(char *name); - - int deltaX(int x1, int x2, int vx, int y); - int deltaY(int x1, int x2, int vy, int y); + int getMouseX() const { + return _mouseX; + } + int getMouseY() const { + return _mouseY; + } overlay_t &getBoundaryOverlay() { return _boundary; @@ -242,6 +250,18 @@ public: byte getIntroSize() { return _introXSize; } + Common::Error saveGameState(int slot, const char *desc) { + + return (_file->saveGame(slot, desc) ? Common::kWritingFailed : Common::kNoError); + } + + Common::Error loadGameState(int slot) { + return (_file->restoreGame(slot) ? Common::kReadingFailed : Common::kNoError); + } + + bool hasFeature(EngineFeature f) const { + return (f == kSupportsRTL) || (f == kSupportsLoadingDuringRuntime) || (f == kSupportsSavingDuringRuntime); + } FileManager *_file; Scheduler *_scheduler; |