ADL: Make 'room' debug command behave like opcode

This commit is contained in:
Walter van Niftrik 2016-12-22 22:28:57 +01:00
parent 57864f5e6c
commit 33dc1c88f2
6 changed files with 18 additions and 16 deletions

View file

@ -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;
}