[Scummvm-cvs-logs] SF.net SVN: scummvm:[42977] scummvm/branches/gsoc2009-draci/engines/draci/ game.cpp
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Sat Aug 1 19:52:16 CEST 2009
Revision: 42977
http://scummvm.svn.sourceforge.net/scummvm/?rev=42977&view=rev
Author: dkasak13
Date: 2009-08-01 17:52:16 +0000 (Sat, 01 Aug 2009)
Log Message:
-----------
* 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
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-01 16:10:00 UTC (rev 42976)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-01 17:52:16 UTC (rev 42977)
@@ -184,6 +184,10 @@
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 @@
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::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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list