diff options
author | Paul Gilbert | 2015-08-30 12:03:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-08-30 12:03:40 -0400 |
commit | b65436937733c519346a653493d26d3dd00fe106 (patch) | |
tree | ca61e9feb0ff5927d6e50919cd593bb8fd68fb03 /engines/sherlock/scalpel/tsage | |
parent | 944cf4c64fd978db9b49a4317a955dc681b51089 (diff) | |
download | scummvm-rg350-b65436937733c519346a653493d26d3dd00fe106.tar.gz scummvm-rg350-b65436937733c519346a653493d26d3dd00fe106.tar.bz2 scummvm-rg350-b65436937733c519346a653493d26d3dd00fe106.zip |
SHERLOCK: SS: Fix speed of intro sequence
Diffstat (limited to 'engines/sherlock/scalpel/tsage')
-rw-r--r-- | engines/sherlock/scalpel/tsage/logo.cpp | 11 | ||||
-rw-r--r-- | engines/sherlock/scalpel/tsage/logo.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/sherlock/scalpel/tsage/logo.cpp b/engines/sherlock/scalpel/tsage/logo.cpp index 4eab01947a..64539b941a 100644 --- a/engines/sherlock/scalpel/tsage/logo.cpp +++ b/engines/sherlock/scalpel/tsage/logo.cpp @@ -399,8 +399,9 @@ bool Logo::show(ScalpelEngine *vm) { for (int idx = 0; idx < 4; ++idx) logo->_objects[idx].update(); - events.wait(2); + events.delay(10); events.setButtonState(); + ++logo->_frameCounter; interrupted = vm->shouldQuit() || events.kbHit() || events._pressed; if (interrupted) { @@ -476,7 +477,7 @@ void Logo::nextFrame() { Screen &screen = *_vm->_screen; if (_waitFrames) { - uint32 currFrame = _vm->_events->getFrameCounter(); + uint32 currFrame = _frameCounter; if (currFrame - _waitStartFrame < _waitFrames) { return; } @@ -485,7 +486,7 @@ void Logo::nextFrame() { } if (_animateFrames) { - uint32 currFrame = _vm->_events->getFrameCounter(); + uint32 currFrame = _frameCounter; if (currFrame > _animateStartFrame + _animateFrameDelay) { AnimationFrame animationFrame = _animateFrames[_animateFrame]; if (animationFrame.frame) { @@ -611,14 +612,14 @@ void Logo::nextFrame() { void Logo::waitFrames(uint frames) { _waitFrames = frames; - _waitStartFrame = _vm->_events->getFrameCounter(); + _waitStartFrame = _frameCounter; } void Logo::startAnimation(uint object, uint frameDelay, const AnimationFrame *frames) { _animateObject = object; _animateFrameDelay = frameDelay; _animateFrames = frames; - _animateStartFrame = _vm->_events->getFrameCounter(); + _animateStartFrame = _frameCounter; _animateFrame = 1; _objects[object]._frame = frames[0].frame; diff --git a/engines/sherlock/scalpel/tsage/logo.h b/engines/sherlock/scalpel/tsage/logo.h index c9fac00d9c..8e47ea42a1 100644 --- a/engines/sherlock/scalpel/tsage/logo.h +++ b/engines/sherlock/scalpel/tsage/logo.h @@ -195,7 +195,7 @@ class Logo { private: ScalpelEngine *_vm; TLib _lib; - int _counter; + int _counter, _frameCounter; bool _finished; byte _originalPalette[PALETTE_SIZE]; byte _palette1[PALETTE_SIZE]; |