diff options
| author | Paul Gilbert | 2015-03-15 17:50:10 -0400 | 
|---|---|---|
| committer | Paul Gilbert | 2015-03-15 17:50:10 -0400 | 
| commit | a6db2fb281fb5842be2d8fc0621922e70ad9668c (patch) | |
| tree | a15f8208ebf56ef94383b96aaca7b8cb0a5f31c6 | |
| parent | eaab373a9687c6d6d3be3983bb77da5a69897a24 (diff) | |
| download | scummvm-rg350-a6db2fb281fb5842be2d8fc0621922e70ad9668c.tar.gz scummvm-rg350-a6db2fb281fb5842be2d8fc0621922e70ad9668c.tar.bz2 scummvm-rg350-a6db2fb281fb5842be2d8fc0621922e70ad9668c.zip | |
SHERLOCK: Further game setup
| -rw-r--r-- | engines/sherlock/room.cpp | 2 | ||||
| -rw-r--r-- | engines/sherlock/room.h | 1 | ||||
| -rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 8 | ||||
| -rw-r--r-- | engines/sherlock/scalpel/scalpel.h | 4 | ||||
| -rw-r--r-- | engines/sherlock/sherlock.cpp | 2 | ||||
| -rw-r--r-- | engines/sherlock/sherlock.h | 7 | ||||
| -rw-r--r-- | engines/sherlock/tattoo/tattoo.cpp | 7 | ||||
| -rw-r--r-- | engines/sherlock/tattoo/tattoo.h | 2 | 
8 files changed, 13 insertions, 20 deletions
| diff --git a/engines/sherlock/room.cpp b/engines/sherlock/room.cpp index 246a316562..9926899953 100644 --- a/engines/sherlock/room.cpp +++ b/engines/sherlock/room.cpp @@ -27,6 +27,8 @@ namespace Sherlock {  Rooms::Rooms() {  	for (int roomNum = 0; roomNum < ROOMS_COUNT; ++roomNum)  		Common::fill(&_stats[roomNum][0], &_stats[roomNum][9], false); + +	_goToRoom = -1;  }  } // End of namespace Sherlock diff --git a/engines/sherlock/room.h b/engines/sherlock/room.h index 46755c1a10..75800b623a 100644 --- a/engines/sherlock/room.h +++ b/engines/sherlock/room.h @@ -93,6 +93,7 @@ class Rooms {  public:  	bool _stats[ROOMS_COUNT][9];  	bool _savedStats[ROOMS_COUNT][9]; +	int _goToRoom;  public:  	Rooms();  }; diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index 11b78946f9..bd8c96f253 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -27,14 +27,18 @@ namespace Sherlock {  namespace Scalpel {  /** - * Initialises game flags + * Game initialization   */ -void ScalpelEngine::initFlags() { +void ScalpelEngine::initialize() {  	_flags.resize(100 * 8);  	_flags[3] = true;		// Turn on Alley  	_flags[39] = true;		// Turn on Baker Street + +	// Starting room +	_rooms->_goToRoom = 4;  } +  } // End of namespace Scalpel  } // End of namespace Scalpel diff --git a/engines/sherlock/scalpel/scalpel.h b/engines/sherlock/scalpel/scalpel.h index e9f9aa05a2..9001c20456 100644 --- a/engines/sherlock/scalpel/scalpel.h +++ b/engines/sherlock/scalpel/scalpel.h @@ -30,12 +30,12 @@ namespace Sherlock {  namespace Scalpel {  class ScalpelEngine : public SherlockEngine { +protected: +	virtual void initialize();  public:  	ScalpelEngine(OSystem *syst, const SherlockGameDescription *gameDesc) :  		SherlockEngine(syst, gameDesc) {}  	virtual ~ScalpelEngine() {} - -	virtual void initFlags();  };  } // End of namespace Scalpel diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index 0d55e0ba8d..13731e2fd8 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -69,8 +69,6 @@ void SherlockEngine::initialize() {  	_rooms = new Rooms();  	_screen = new Screen(this);  	_talk = new Talk(); - -	initFlags();  }  Common::Error SherlockEngine::run() { diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index 4c5f86dd09..172c940c34 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -60,9 +60,8 @@ class Resource;  class SherlockEngine : public Engine {  private: -	bool detectGame(); - -	void initialize(); +protected: +	virtual void initialize();  public:  	const SherlockGameDescription *_gameDescription;  	Journal *_journal; @@ -77,8 +76,6 @@ public:  	virtual Common::Error run(); -	virtual void initFlags() = 0; -  	int getGameType() const;  	uint32 getGameID() const;  	uint32 getGameFeatures() const; diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp index bed6edb3d4..57ca5c6e29 100644 --- a/engines/sherlock/tattoo/tattoo.cpp +++ b/engines/sherlock/tattoo/tattoo.cpp @@ -26,13 +26,6 @@ namespace Sherlock {  namespace Tattoo { -/** - * Initialises game flags - */ -void TattooEngine::initFlags() { -	_flags.resize(100 * 8); -} -  } // End of namespace Tattoo  } // End of namespace Scalpel diff --git a/engines/sherlock/tattoo/tattoo.h b/engines/sherlock/tattoo/tattoo.h index e2977983f1..f06fa1532d 100644 --- a/engines/sherlock/tattoo/tattoo.h +++ b/engines/sherlock/tattoo/tattoo.h @@ -34,8 +34,6 @@ public:  	TattooEngine(OSystem *syst, const SherlockGameDescription *gameDesc) :  		SherlockEngine(syst, gameDesc) {}  	virtual ~TattooEngine() {} - -	virtual void initFlags();  };  } // End of namespace Tattoo | 
