aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-29 15:26:48 +0000
committerRobert Špalek2009-10-29 15:26:48 +0000
commit403668898fcf59012aa405c36fad8d18dfbf205b (patch)
tree7fdfdc73b5a21cc1d22b40e37bc4e70c8c9fb1ab /engines/draci/game.cpp
parent8178d548eb2e822cfc7a9c21fa7c569f5b695398 (diff)
downloadscummvm-rg350-403668898fcf59012aa405c36fad8d18dfbf205b.tar.gz
scummvm-rg350-403668898fcf59012aa405c36fad8d18dfbf205b.tar.bz2
scummvm-rg350-403668898fcf59012aa405c36fad8d18dfbf205b.zip
Implement flipping the QuickHero and SpeedText flags in GPL2.
All GPL2 callbacks are now fully implemented. It remains to implement proper walking. svn-id: r45501
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r--engines/draci/game.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index e59e4677b5..eeed48f005 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -166,6 +166,9 @@ void Game::init() {
setExitLoop(false);
_scheduledPalette = 0;
_fadePhases = _fadePhase = 0;
+ setEnableQuickHero(true);
+ setWantQuickHero(false);
+ setEnableSpeedText(true);
setLoopStatus(kStatusGate);
setLoopSubstatus(kSubstatusOrdinary);
@@ -439,14 +442,13 @@ void Game::loop() {
if (_loopSubstatus == kSubstatusTalk) {
// If the current speech text has expired or the user clicked a mouse button,
// advance to the next line of text
- if (_vm->_mouse->lButtonPressed() ||
- _vm->_mouse->rButtonPressed() ||
+ if (getEnableSpeedText() && (_vm->_mouse->lButtonPressed() || _vm->_mouse->rButtonPressed()) ||
(_vm->_system->getMillis() - _speechTick) >= _speechDuration) {
setExitLoop(true);
- _vm->_mouse->lButtonSet(false);
- _vm->_mouse->rButtonSet(false);
}
+ _vm->_mouse->lButtonSet(false);
+ _vm->_mouse->rButtonSet(false);
}
// This returns true if we got a signal to quit the game
@@ -1573,6 +1575,19 @@ void Game::initializeFading(int phases) {
_fadeTick = _vm->_system->getMillis();
}
+void Game::setEnableQuickHero(bool value) {
+ _enableQuickHero = value;
+}
+
+void Game::setWantQuickHero(bool value) {
+ _wantQuickHero = value;
+ // TODO: after proper walking is implemented, do super-fast animation when walking
+}
+
+void Game::setEnableSpeedText(bool value) {
+ _enableSpeedText = value;
+}
+
/**
* The GPL command Mark sets the animation index (which specifies the order in which
* animations were loaded in) which is then used by the Release command to delete