mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 21:54:15 +00:00
Commented the rest of the loop() logic
svn-id: r45606
This commit is contained in:
parent
9ad86a800a
commit
9f711bd0ce
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user