aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorDenis Kasak2009-08-01 17:52:16 +0000
committerDenis Kasak2009-08-01 17:52:16 +0000
commite0e06fc9e065466e4092e983056d67d1469e6752 (patch)
tree584c8cbf9f538d92fd832308f3a27bd036411b51 /engines/draci
parent5c6643f0f3e70c4465b5dcc8011d0fdbff0c5070 (diff)
downloadscummvm-rg350-e0e06fc9e065466e4092e983056d67d1469e6752.tar.gz
scummvm-rg350-e0e06fc9e065466e4092e983056d67d1469e6752.tar.bz2
scummvm-rg350-e0e06fc9e065466e4092e983056d67d1469e6752.zip
* Made the engine set the appropriate loop status before running a gate program or entering the main loop
* Removed hack which ran programs for all gates when the room was changed svn-id: r42977
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/game.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index c4f1161945..4f83f135c6 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -184,6 +184,10 @@ void Game::start() {
runGateProgram(_newGate);
}
+ // Mimic the original engine by setting the loop status to Ordinary before
+ // entering the main loop
+ setLoopStatus(kStatusOrdinary);
+
loop();
}
}
@@ -433,13 +437,6 @@ void Game::loadRoom(int roomNum) {
debugC(4, kDraciLogicDebugLevel, "Running room init program...");
_vm->_script->run(_currentRoom._program, _currentRoom._init);
- // HACK: Gates' scripts shouldn't be run unconditionally
- // This is for testing
- //for (uint i = 0; i < _currentRoom._numGates; ++i) {
- // debugC(6, kDraciLogicDebugLevel, "Running program for gate %d", i);
- // _vm->_script->run(_currentRoom._program, gates[i]);
- //}
-
// Set room palette
f = _vm->_paletteArchive->getFile(_currentRoom._palette);
_vm->_screen->setPalette(f->_data, 0, kNumColours);
@@ -651,6 +648,11 @@ void Game::changeRoom(uint roomNum) {
void Game::runGateProgram(int gate) {
+ debugC(6, kDraciLogicDebugLevel, "Running program for gate %d", gate);
+
+ // Set the appropriate loop statu before executing the gate program
+ setLoopStatus(kStatusGate);
+
// Mark last animation
int lastAnimIndex = _vm->_anims->getLastIndex();