aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorRobert Špalek2009-11-01 23:20:46 +0000
committerRobert Špalek2009-11-01 23:20:46 +0000
commit9f711bd0ced5368a0dd5a28be7db5d7128849c01 (patch)
treec05102c485a43dd8ba53c359a1556bba47ece981 /engines/draci
parent9ad86a800af7124684fca7fbf762feec5cd83574 (diff)
downloadscummvm-rg350-9f711bd0ced5368a0dd5a28be7db5d7128849c01.tar.gz
scummvm-rg350-9f711bd0ced5368a0dd5a28be7db5d7128849c01.tar.bz2
scummvm-rg350-9f711bd0ced5368a0dd5a28be7db5d7128849c01.zip
Commented the rest of the loop() logic
svn-id: r45606
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/game.cpp7
-rw-r--r--engines/draci/game.h16
2 files changed, 13 insertions, 10 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index d8f9f899c0..67b7b04ef6 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -242,8 +242,9 @@ void Game::init() {
void Game::loop() {
// Can run both as an outer and inner loop. In both mode it updates
- // the screen according to the timer. It the outer mode it also reacts
- // to user events. In the inner mode, the loop runs until its stopping
+ // the screen according to the timer. It the outer mode
+ // (kSubstatusOrdinary) it also reacts to user events. In the inner
+ // mode (all other kSubstatus* enums), the loop runs until its stopping
// condition, possibly stopping earlier if the user interrupts it,
// however no other user intervention is allowed.
Surface *surface = _vm->_screen->getSurface();
@@ -303,6 +304,8 @@ void Game::loop() {
updateCursor();
updateTitle();
+ // During the normal game-play, in particular not when
+ // running the init-scripts, enable interactivity.
if (_loopStatus == kStatusOrdinary && _loopSubstatus == kSubstatusOrdinary) {
if (_vm->_mouse->lButtonPressed()) {
_vm->_mouse->lButtonSet(false);
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 3ac27a2997..3cd55a77ea 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -159,17 +159,17 @@ struct Room {
};
enum LoopStatus {
- kStatusOrdinary,
- kStatusGate,
- kStatusInventory,
- kStatusDialogue
+ kStatusOrdinary, // normal game-play: everything allowed
+ kStatusGate, // during running init-scripts when entering a room: disable interactivity
+ kStatusInventory, // inventory is open: cannot change the room or go to map
+ kStatusDialogue // during a dialogue: cannot change the room, go to inventory
};
enum LoopSubstatus {
- kSubstatusOrdinary,
- kSubstatusTalk,
- kSubstatusFade,
- kSubstatusStrange
+ kSubstatusOrdinary, // outer loop: everything is allowed
+ kSubstatusTalk, // playing a voice: inner loop will exit afterwards
+ kSubstatusFade, // fading a palette: inner loop will exit when done
+ kSubstatusStrange // other inner loop: either immediately exiting or waiting for an animation to end (whose callback ends the loop)
};
class Game {