aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/sherlock.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-22 22:31:21 -0400
committerPaul Gilbert2015-05-22 22:31:21 -0400
commitb4b6bf63dbfd3f952f4ca207467315396b53bd23 (patch)
tree48e6390df9c5487e73bc1b0ded246d0076561bcd /engines/sherlock/sherlock.h
parent40f7fff42977d01c8bac81d462580c2c8ec39dc3 (diff)
parent2db07a9d39cc9557d292908d84d3fc146635fd75 (diff)
downloadscummvm-rg350-b4b6bf63dbfd3f952f4ca207467315396b53bd23.tar.gz
scummvm-rg350-b4b6bf63dbfd3f952f4ca207467315396b53bd23.tar.bz2
scummvm-rg350-b4b6bf63dbfd3f952f4ca207467315396b53bd23.zip
Merge branch 'master' into sherlock2
Diffstat (limited to 'engines/sherlock/sherlock.h')
-rw-r--r--engines/sherlock/sherlock.h82
1 files changed, 70 insertions, 12 deletions
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index 2688b51d4c..bf8c0d6aaf 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -50,10 +50,6 @@
namespace Sherlock {
enum {
- kFileTypeHash
-};
-
-enum {
kDebugScript = 1 << 0
};
@@ -62,8 +58,8 @@ enum GameType {
GType_RoseTattoo = 1
};
-#define SHERLOCK_SCREEN_WIDTH _vm->_screen->w
-#define SHERLOCK_SCREEN_HEIGHT _vm->_screen->h
+#define SHERLOCK_SCREEN_WIDTH _vm->_screen->w()
+#define SHERLOCK_SCREEN_HEIGHT _vm->_screen->h()
#define SHERLOCK_SCENE_HEIGHT 138
struct SherlockGameDescription;
@@ -72,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;
@@ -103,39 +114,86 @@ public:
UserInterface *_ui;
Common::RandomSource _randomSource;
Common::Array<bool> _flags;
- Common::String _soundOverride;
- Common::String _titleOverride;
bool _useEpilogue2;
int _loadGameSlot;
bool _canLoadSave;
bool _showOriginalSavesDialog;
+ bool _interactiveFl;
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();
- virtual bool getIsDemo() const;
+ /**
+ * 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);
};