diff options
| author | Robert Špalek | 2009-09-30 04:33:52 +0000 | 
|---|---|---|
| committer | Robert Špalek | 2009-09-30 04:33:52 +0000 | 
| commit | 76a0bcb6c4a523c5a5b312ece3cb2bab359ab4a9 (patch) | |
| tree | b1a762bc87deb75708aced9d5b3738b488d7dc81 | |
| parent | 77bd8d0bfbfaea6c05ca606ead77334d88cd22d1 (diff) | |
| download | scummvm-rg350-76a0bcb6c4a523c5a5b312ece3cb2bab359ab4a9.tar.gz scummvm-rg350-76a0bcb6c4a523c5a5b312ece3cb2bab359ab4a9.tar.bz2 scummvm-rg350-76a0bcb6c4a523c5a5b312ece3cb2bab359ab4a9.zip  | |
Implemented the map room, entered when 'm' is pressed.
svn-id: r44474
| -rw-r--r-- | engines/draci/draci.cpp | 9 | ||||
| -rw-r--r-- | engines/draci/game.cpp | 9 | ||||
| -rw-r--r-- | engines/draci/game.h | 1 | 
3 files changed, 19 insertions, 0 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index d77712b586..abe3393c31 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -215,6 +215,15 @@ bool DraciEngine::handleEvents() {  					_script->endCurrentProgram();  				}  			} +			else if (event.kbd.keycode == Common::KEYCODE_m) { +				if (_game->getLoopStatus() == kStatusOrdinary) { +					// TODO: record the current room number +					// so that we can quickly exit there +					// when Escape is pressed +					_game->setRoomNum(_game->getMapRoom()); +					_game->setGateNum(0); +				} +			}  			// Show walking map toggle  			else if (event.kbd.keycode == Common::KEYCODE_w) {   				_showWalkingMap = !_showWalkingMap; diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 3b088773af..61cb4c7988 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -982,6 +982,11 @@ int Game::getCurrentDialogueOffset() const {  }  void Game::walkHero(int x, int y) { +	// Needed for the map room with empty walking map.  For some reason, +	// findNearestWalkable() takes several seconds with 100% CPU to finish +	// (correctly). +	if (!_currentRoom._heroOn) +		return;  	Surface *surface = _vm->_screen->getSurface(); @@ -1476,6 +1481,10 @@ int Game::getEscRoom() const {  	return _currentRoom._escRoom;  } +int Game::getMapRoom() const { +	return _info._mapRoom; +} +  void Game::schedulePalette(int paletteID) {  	_scheduledPalette = paletteID;  } diff --git a/engines/draci/game.h b/engines/draci/game.h index bcc2323272..861ba6292d 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -298,6 +298,7 @@ public:  	void addItem(int itemID);  	int getEscRoom() const; +	int getMapRoom() const;  	int getMarkedAnimationIndex() const;  	void setMarkedAnimationIndex(int index);  | 
