aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r--engines/draci/game.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 34549df416..6d0c929fc6 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -219,6 +219,7 @@ void Game::init() {
setRoomNum(kNoEscRoom);
rememberRoomNumAsPrevious();
scheduleEnteringRoomUsingGate(_info._startRoom, 0);
+ _pushedNewRoom = _pushedNewGate = -1;
}
void Game::loop() {
@@ -1426,6 +1427,18 @@ void Game::scheduleEnteringRoomUsingGate(int room, int gate) {
_newGate = gate;
}
+void Game::pushNewRoom() {
+ _pushedNewRoom = _newRoom;
+ _pushedNewGate = _newGate;
+}
+
+void Game::popNewRoom() {
+ if (_loopStatus != kStatusInventory && _pushedNewRoom >= 0) {
+ scheduleEnteringRoomUsingGate(_pushedNewRoom, _pushedNewGate);
+ _pushedNewRoom = _pushedNewGate = -1;
+ }
+}
+
void Game::setLoopStatus(LoopStatus status) {
_loopStatus = status;
}