[Scummvm-cvs-logs] SF.net SVN: scummvm:[44474] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Wed Sep 30 06:33:53 CEST 2009


Revision: 44474
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44474&view=rev
Author:   spalek
Date:     2009-09-30 04:33:52 +0000 (Wed, 30 Sep 2009)

Log Message:
-----------
Implemented the map room, entered when 'm' is pressed.

Modified Paths:
--------------
    scummvm/trunk/engines/draci/draci.cpp
    scummvm/trunk/engines/draci/game.cpp
    scummvm/trunk/engines/draci/game.h

Modified: scummvm/trunk/engines/draci/draci.cpp
===================================================================
--- scummvm/trunk/engines/draci/draci.cpp	2009-09-30 00:13:59 UTC (rev 44473)
+++ scummvm/trunk/engines/draci/draci.cpp	2009-09-30 04:33:52 UTC (rev 44474)
@@ -215,6 +215,15 @@
 					_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;

Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp	2009-09-30 00:13:59 UTC (rev 44473)
+++ scummvm/trunk/engines/draci/game.cpp	2009-09-30 04:33:52 UTC (rev 44474)
@@ -982,6 +982,11 @@
 }
 
 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 @@
 	return _currentRoom._escRoom;
 }
 
+int Game::getMapRoom() const {
+	return _info._mapRoom;
+}
+
 void Game::schedulePalette(int paletteID) {
 	_scheduledPalette = paletteID;
 }

Modified: scummvm/trunk/engines/draci/game.h
===================================================================
--- scummvm/trunk/engines/draci/game.h	2009-09-30 00:13:59 UTC (rev 44473)
+++ scummvm/trunk/engines/draci/game.h	2009-09-30 04:33:52 UTC (rev 44474)
@@ -298,6 +298,7 @@
 	void addItem(int itemID);
 
 	int getEscRoom() const;
+	int getMapRoom() const;
 
 	int getMarkedAnimationIndex() const;
 	void setMarkedAnimationIndex(int index);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list