aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/walking.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-03-20 14:18:57 -0400
committerMatthew Hoops2012-03-20 14:49:16 -0400
commit71756bdf4eae5ba9cc3f329b85e894f04640aaef (patch)
tree40d464262da107ab5eed82f198685209161ebac1 /engines/draci/walking.cpp
parent03eba05b09e5c9e5a351f8111185934b92a3fed3 (diff)
parent3c3576a224b92c703b4e8ea20008ac8a069980dd (diff)
downloadscummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.gz
scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.bz2
scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/draci/walking.cpp')
-rw-r--r--engines/draci/walking.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp
index 9a66c6163a..f1ae769d80 100644
--- a/engines/draci/walking.cpp
+++ b/engines/draci/walking.cpp
@@ -729,20 +729,18 @@ Movement WalkingState::transitionBetweenAnimations(Movement previous, Movement n
Movement WalkingState::animationForSightDirection(SightDirection dir, const Common::Point &hero, const Common::Point &mouse, const WalkingPath &path, Movement startingDirection) {
switch (dir) {
+ case kDirectionLeft:
+ return kStopLeft;
+ case kDirectionRight:
+ return kStopRight;
case kDirectionMouse:
if (mouse.x < hero.x) {
return kStopLeft;
} else if (mouse.x > hero.x) {
return kStopRight;
- } else {
- goto defaultCase;
}
- case kDirectionLeft:
- return kStopLeft;
- case kDirectionRight:
- return kStopRight;
+ // fall-through here intentional
default: {
-defaultCase:
// Find the last horizontal direction on the path.
int i = path.size() - 1;
while (i >= 0 && path[i].x == hero.x) {