[Scummvm-cvs-logs] SF.net SVN: scummvm:[45606] scummvm/trunk/engines/draci
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Mon Nov 2 00:20:46 CET 2009
Revision: 45606
http://scummvm.svn.sourceforge.net/scummvm/?rev=45606&view=rev
Author: spalek
Date: 2009-11-01 23:20:46 +0000 (Sun, 01 Nov 2009)
Log Message:
-----------
Commented the rest of the loop() logic
Modified Paths:
--------------
scummvm/trunk/engines/draci/game.cpp
scummvm/trunk/engines/draci/game.h
Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp 2009-11-01 23:20:19 UTC (rev 45605)
+++ scummvm/trunk/engines/draci/game.cpp 2009-11-01 23:20:46 UTC (rev 45606)
@@ -242,8 +242,9 @@
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 @@
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);
Modified: scummvm/trunk/engines/draci/game.h
===================================================================
--- scummvm/trunk/engines/draci/game.h 2009-11-01 23:20:19 UTC (rev 45605)
+++ scummvm/trunk/engines/draci/game.h 2009-11-01 23:20:46 UTC (rev 45606)
@@ -159,17 +159,17 @@
};
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 {
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