From d82d476b277f80b69514fcb360ec47e9482e4a28 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 May 2015 20:57:27 +0200 Subject: SHERLOCK: Add code to make non-interactive demo completable --- engines/sherlock/sherlock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sherlock/sherlock.h') diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 33e4a45b40..bd6d4a4c8e 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -109,6 +109,7 @@ public: int _loadGameSlot; bool _canLoadSave; bool _showOriginalSavesDialog; + bool _interactiveFl; public: SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc); virtual ~SherlockEngine(); -- cgit v1.2.3 From 0aebac9174f935e535b8e133efde43bd94be5b27 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 May 2015 23:23:37 +0200 Subject: SHERLOCK: Fix some issues pointed by LordHoto --- engines/sherlock/sherlock.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'engines/sherlock/sherlock.h') diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index bd6d4a4c8e..68c8e8daca 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -49,10 +49,6 @@ namespace Sherlock { -enum { - kFileTypeHash -}; - enum { kDebugScript = 1 << 0 }; -- cgit v1.2.3 From 844d8012598bf1f43b7eff4c8d7b9a7be9287b18 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 May 2015 18:30:31 -0400 Subject: SHERLOCK: Syntactic fixes --- engines/sherlock/sherlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sherlock/sherlock.h') diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 68c8e8daca..571bd4dc61 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -117,7 +117,7 @@ public: virtual Common::Error loadGameState(int slot); virtual Common::Error saveGameState(int slot, const Common::String &desc); virtual void syncSoundSettings(); - virtual bool getIsDemo() const; + virtual bool isDemo() const; GameType getGameID() const; Common::Language getLanguage() const; -- cgit v1.2.3 From 19d93325b1ccda2d02d708cbef20a49786f38d2b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 May 2015 19:53:49 -0400 Subject: SHERLOCK: Move the override filename fields into the Animation class --- engines/sherlock/sherlock.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'engines/sherlock/sherlock.h') diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 571bd4dc61..830a255f5f 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -99,8 +99,6 @@ public: UserInterface *_ui; Common::RandomSource _randomSource; Common::Array _flags; - Common::String _soundOverride; - Common::String _titleOverride; bool _useEpilogue2; int _loadGameSlot; bool _canLoadSave; -- cgit v1.2.3 From 1df183ffcb08a69ed414afd69284a0596fee4e82 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 May 2015 07:37:55 -0400 Subject: SHERLOCK: Move method comments from cpp to headers --- engines/sherlock/sherlock.h | 69 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) (limited to 'engines/sherlock/sherlock.h') diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 830a255f5f..24a72076ef 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -68,18 +68,33 @@ class Resource; class SherlockEngine : public Engine { private: + /** + * Main loop for displaying a scene and handling all that occurs within it + */ void sceneLoop(); + /** + * Handle all player input + */ void handleInput(); + /** + * Load game configuration esttings + */ void loadConfig(); protected: + /** + * Does basic initialization of the game engine + */ virtual void initialize(); virtual void showOpening() = 0; virtual void startScene() {} + /** + * Returns a list of features the game itself supports + */ virtual bool hasFeature(EngineFeature f) const; public: const SherlockGameDescription *_gameDescription; @@ -108,29 +123,77 @@ public: SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc); virtual ~SherlockEngine(); + /** + * Main method for running the game + */ virtual Common::Error run(); + /** + * Returns true if a savegame can be loaded + */ virtual bool canLoadGameStateCurrently(); + + /** + * Returns true if the game can be saved + */ virtual bool canSaveGameStateCurrently(); + + /** + * Called by the GMM to load a savegame + */ virtual Common::Error loadGameState(int slot); + + /** + * Called by the GMM to save the game + */ virtual Common::Error saveGameState(int slot, const Common::String &desc); + + /** + * Called by the engine when sound settings are updated + */ virtual void syncSoundSettings(); + + /** + * Returns whether the version is a demo + */ virtual bool isDemo() const; + /** + * Returns the Id of the game + */ GameType getGameID() const; - Common::Language getLanguage() const; - Common::Platform getPlatform() const; - Common::String getGameFile(int fileType); + /** + * Returns the platform the game's datafiles are for + */ + Common::Platform getPlatform() const; + /** + * Return a random number + */ int getRandomNumber(int limit) { return _randomSource.getRandomNumber(limit - 1); } + /** + * Read the state of a global flag + * @remarks If a negative value is specified, it will return the inverse value + * of the positive flag number + */ bool readFlags(int flagNum); + /** + * Sets a global flag to either true or false depending on whether the specified + * flag is positive or negative + */ void setFlags(int flagNum); + /** + * Saves game configuration information + */ void saveConfig(); + /** + * Synchronize the data for a savegame + */ void synchronize(Common::Serializer &s); }; -- cgit v1.2.3