[Scummvm-cvs-logs] SF.net SVN: scummvm:[43084] scummvm/branches/gsoc2009-draci/engines/draci/ game.cpp
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Thu Aug 6 07:04:21 CEST 2009
Revision: 43084
http://scummvm.svn.sourceforge.net/scummvm/?rev=43084&view=rev
Author: dkasak13
Date: 2009-08-06 05:04:21 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
Moved walkHero() (in the main loop) to the appropriate place (in anticipation of a smart finding a walkable point) and disabled walking during script execution / inventory.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-06 04:50:37 UTC (rev 43083)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-06 05:04:21 UTC (rev 43084)
@@ -247,11 +247,6 @@
int x = _vm->_mouse->getPosX();
int y = _vm->_mouse->getPosY();
- // If the player clicked on a walkable position, move the dragon there
- if (_vm->_mouse->lButtonPressed() && _currentRoom._walkingMap.isWalkable(x, y)) {
- walkHero(x, y);
- }
-
// Find the game object under the cursor
// (to be more precise, one that corresponds to the animation under the cursor)
int animUnderCursor = _vm->_anims->getTopAnimationID(x, y);
@@ -303,9 +298,24 @@
}
}
} else {
- // If there is no object under the cursor, just delete the previous title
+ // We haven't found an object under the cursor
+
+ // Delete the previous title
titleAnim->markDirtyRect(surface);
title->setText("");
+
+ // TODO: Implement "smart" walkability checking (so one can click
+ // anywhere on the screen and the engine finds the nearest walkable
+ // point)
+
+ // If the player clicked on a walkable position and we are in the
+ // appropriate loop status, move the dragon there
+ if (_vm->_mouse->lButtonPressed() &&
+ _currentRoom._walkingMap.isWalkable(x, y) &&
+ _loopSubstatus == kStatusOrdinary) {
+
+ walkHero(x, y);
+ }
}
debugC(2, kDraciAnimationDebugLevel, "Anim under cursor: %d", animUnderCursor);
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