aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2016-01-30 23:54:41 +0100
committerMartin Kiewitz2016-01-30 23:54:41 +0100
commit26cb39beeefa03c7d0343b60b058334752527a08 (patch)
tree1459d4979c9f4c20afe9cf2eb9398d7358582837
parentcb3b5d5e31570d6b6757e6b5e414414972d1b5d6 (diff)
downloadscummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.tar.gz
scummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.tar.bz2
scummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.zip
AGI: Ego motion type change on newroom only agi3
Ego motion type change on newRoom() was only done for AGI3
-rw-r--r--engines/agi/cycle.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 3d9803e6e3..060dcd356c 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -89,7 +89,9 @@ void AgiEngine::newRoom(int16 newRoomNr) {
break;
}
- if (getVersion() < 0x2000) {
+ uint16 agiVersion = getVersion();
+
+ if (agiVersion < 0x2000) {
warning("STUB: NewRoom(%d)", newRoomNr);
screenObjEgo->flags &= ~fDidntMove;
@@ -98,9 +100,12 @@ void AgiEngine::newRoom(int16 newRoomNr) {
setView(screenObjEgo, screenObjEgo->currentViewNr);
} else {
- if (screenObjEgo->motionType == kMotionEgo) {
- screenObjEgo->motionType = kMotionNormal;
- _game.vars[VM_VAR_EGO_DIRECTION] = 0;
+ if (agiVersion >= 0x3000) {
+ // this was only done in AGI3
+ if (screenObjEgo->motionType == kMotionEgo) {
+ screenObjEgo->motionType = kMotionNormal;
+ _game.vars[VM_VAR_EGO_DIRECTION] = 0;
+ }
}
_game.vars[VM_VAR_BORDER_TOUCH_EGO] = 0;