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