diff options
author | Gregory Montoir | 2003-11-16 19:55:04 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-11-16 19:55:04 +0000 |
commit | ba50b42c36d54e5f37987ae13621d2108ae873b9 (patch) | |
tree | 0e168d7f5a690573800ac01409a0a390d0b67f65 /queen | |
parent | 501c77fc7a6b6d67ecd684f3a57aaa02932dccd9 (diff) | |
download | scummvm-rg350-ba50b42c36d54e5f37987ae13621d2108ae873b9.tar.gz scummvm-rg350-ba50b42c36d54e5f37987ae13621d2108ae873b9.tar.bz2 scummvm-rg350-ba50b42c36d54e5f37987ae13621d2108ae873b9.zip |
fix 'wrong Joe position when switching from hotel basement to lobby' issue
svn-id: r11313
Diffstat (limited to 'queen')
-rw-r--r-- | queen/cutaway.cpp | 2 | ||||
-rw-r--r-- | queen/logic.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 3f1123ad19..53acb35dd4 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -1354,6 +1354,8 @@ void Cutaway::run(char *nextFilename) { _logic->newRoom(_initialRoom); _logic->display()->fullscreen(true); } + _logic->joeX(0); + _logic->joeY(0); } // XXX CUTJOEF=0; diff --git a/queen/logic.cpp b/queen/logic.cpp index bff4ceb4cc..a6ba7565a1 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1595,6 +1595,8 @@ void Logic::joeSetup() { ObjectData *Logic::joeSetupInRoom(bool autoPosition, uint16 scale) { // queen.c SETUP_HERO() + debug(0, "Logic::joeSetupInRoom(%d, %d) joe.x=%d joe.y=%d", autoPosition, scale, _joe.x, _joe.y); + uint16 oldx; uint16 oldy; WalkOffData *pwo = NULL; @@ -1603,9 +1605,9 @@ ObjectData *Logic::joeSetupInRoom(bool autoPosition, uint16 scale) { error("Logic::joeSetupInRoom() - No object data for obj %d", _entryObj); } - if (!autoPosition || _joe.x != 0 || _joe.y != 0) { - oldx = _joe.x; - oldy = _joe.y; + if (!autoPosition || joeX() != 0 || joeY() != 0) { + oldx = joeX(); + oldy = joeY(); } else { // find the walk off point for the entry object and make @@ -1661,8 +1663,8 @@ ObjectData *Logic::joeSetupInRoom(bool autoPosition, uint16 scale) { pbs->x = oldx; pbs->y = oldy; pbs->frameNum = 29 + FRAMES_JOE_XTRA; - _joe.x = 0; - _joe.y = 0; + joeX(0); + joeY(0); if (pwo != NULL) { // entryObj has a walk off point, then walk from there to object x,y |