[Scummvm-cvs-logs] SF.net SVN: scummvm:[43065] scummvm/branches/gsoc2009-draci/engines/draci/ draci.cpp
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Wed Aug 5 04:42:24 CEST 2009
Revision: 43065
http://scummvm.svn.sourceforge.net/scummvm/?rev=43065&view=rev
Author: dkasak13
Date: 2009-08-05 02:42:23 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
* Implemented the "escape room" feature of the original engine which lets a user switch to another location (or skip the intro) by pressing ESC (the escRoom for every location is stored in the data files).
* Reworked the left and right arrow key commands so they don't call changeRoom() themselves but instead schedule the room change via Game::setRoomNum(). In this way, changing rooms like that is still a hack but a bit more "natural", since the loop doesn't get skipped, the gate scripts get run, etc.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-08-05 02:37:19 UTC (rev 43064)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-08-05 02:42:23 UTC (rev 43065)
@@ -191,12 +191,21 @@
_game->setQuit(true);
break;
case Common::EVENT_KEYDOWN:
- if (event.kbd.keycode == Common::KEYCODE_RIGHT)
- _game->changeRoom(_game->nextRoomNum());
-
- else if (event.kbd.keycode == Common::KEYCODE_LEFT)
- _game->changeRoom(_game->prevRoomNum());
-
+ if (event.kbd.keycode == Common::KEYCODE_RIGHT) {
+ _game->setRoomNum(_game->nextRoomNum());
+ _game->setGateNum(0);
+ _game->_roomChange = true;
+ }
+ else if (event.kbd.keycode == Common::KEYCODE_LEFT) {
+ _game->setRoomNum(_game->prevRoomNum());
+ _game->setGateNum(0);
+ _game->_roomChange = true;
+ }
+ else if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+ _game->setRoomNum(_game->getEscRoom());
+ _game->setGateNum(0);
+ _game->_roomChange = true;
+ }
// Show walking map toggle
else if (event.kbd.keycode == Common::KEYCODE_w) {
_showWalkingMap = !_showWalkingMap;
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