diff options
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r-- | engines/adl/adl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index bc5bc74f3a..81950450ab 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -427,6 +427,11 @@ void AdlEngine::initState() { initGameState(); } +void AdlEngine::switchRoom(byte roomNr) { + getCurRoom().curPicture = getCurRoom().picture; + _state.room = roomNr; +} + byte AdlEngine::roomArg(byte room) const { return room; } @@ -1073,8 +1078,7 @@ int AdlEngine::o1_moveItem(ScriptEnv &e) { int AdlEngine::o1_setRoom(ScriptEnv &e) { OP_DEBUG_1("\tROOM = %d", e.arg(1)); - getCurRoom().curPicture = getCurRoom().picture; - _state.room = e.arg(1); + switchRoom(e.arg(1)); return 1; } |