[Scummvm-cvs-logs] SF.net SVN: scummvm:[45890] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sat Nov 14 12:29:37 CET 2009
Revision: 45890
http://scummvm.svn.sourceforge.net/scummvm/?rev=45890&view=rev
Author: megath
Date: 2009-11-14 11:29:37 +0000 (Sat, 14 Nov 2009)
Log Message:
-----------
added cancel() for current action
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/teenagent.cpp
scummvm/trunk/engines/teenagent/teenagent.h
Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp 2009-11-14 11:20:00 UTC (rev 45889)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp 2009-11-14 11:29:37 UTC (rev 45890)
@@ -121,11 +121,11 @@
object->rect.dump();
object->actor_rect.dump();
+ action = kActionUse;
if (object->actor_rect.valid())
scene->moveTo(Common::Point(object->actor_rect.right, object->actor_rect.bottom), object->actor_orientation);
- if (object->actor_orientation > 0)
+ else if (object->actor_orientation > 0)
scene->setOrientation(object->actor_orientation);
- action = kActionUse;
}
void TeenAgentEngine::examine(const Common::Point &point, Object *object) {
@@ -135,15 +135,15 @@
if (object != NULL) {
Common::Point dst = object->actor_rect.center();
debug(0, "click %d, %d, object %d, %d", point.x, point.y, dst.x, dst.y);
+ action = kActionExamine;
if (object->actor_rect.valid())
scene->moveTo(dst, object->actor_orientation);
- action = kActionExamine;
dst_object = object;
} else {
debug(0, "click %d, %d", point.x, point.y);
+ action = kActionNone;
scene->moveTo(point, 0, true);
dst_object = NULL;
- action = kActionNone;
}
}
Modified: scummvm/trunk/engines/teenagent/teenagent.h
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.h 2009-11-14 11:20:00 UTC (rev 45889)
+++ scummvm/trunk/engines/teenagent/teenagent.h 2009-11-14 11:29:37 UTC (rev 45890)
@@ -59,6 +59,7 @@
void examine(const Common::Point &point, Object *object);
void use(Object *object);
+ inline void cancel() { action = kActionNone; }
bool processCallback(uint16 addr);
inline Scene *getScene() { return scene; }
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