diff options
| author | Paul Gilbert | 2013-11-12 21:13:14 -0500 |
|---|---|---|
| committer | Paul Gilbert | 2013-11-12 21:13:14 -0500 |
| commit | fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13 (patch) | |
| tree | 640e57fef9d4853ba291808d82f91000d655c4c6 | |
| parent | ab3cf625d59430d9b7496b0437d6a08e33698d58 (diff) | |
| download | scummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.tar.gz scummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.tar.bz2 scummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.zip | |
TSAGE: Animation player fix to match speed with the original
| -rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 18 | ||||
| -rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.h | 4 |
2 files changed, 10 insertions, 12 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 8f01a34cc4..f9bf164bb5 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -1775,13 +1775,13 @@ AnimationPlayer::AnimationPlayer(): EventHandler() { _screenBounds = R2_GLOBALS._gfxManagerInstance._bounds; _rect1 = R2_GLOBALS._gfxManagerInstance._bounds; _paletteMode = ANIMPALMODE_REPLACE_PALETTE; - _field3A = true; + _canSkip = true; _sliceHeight = 1; _endAction = NULL; _sliceCurrent = nullptr; _sliceNext = nullptr; - _field38 = false; + _animLoaded = false; _objectMode = ANIMOBJMODE_1; _dataNeeded = 0; _playbackTick = 0; @@ -1812,7 +1812,7 @@ void AnimationPlayer::remove() { } void AnimationPlayer::process(Event &event) { - if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) && _field3A) { + if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) && _canSkip) { // Move the current position to the end _position = _subData._duration; } @@ -1858,9 +1858,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) { _playbackTickPrior = -1; _playbackTick = 0; - // The final multiplication is used to deliberately slow down playback, since the original - // was slowed down by the amount of time spent to decode and display the frames - _frameDelay = (60 / _subData._frameRate) * 8; + _frameDelay = (60 / _subData._frameRate); _gameFrame = R2_GLOBALS._events.getFrameNumber(); if (_subData._totalSize) { @@ -1931,7 +1929,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) { } ++R2_GLOBALS._animationCtr; - _field38 = true; + _animLoaded = true; return true; } @@ -2078,7 +2076,7 @@ bool AnimationPlayer::isCompleted() { } void AnimationPlayer::close() { - if (_field38) { + if (_animLoaded) { switch (_paletteMode) { case 0: R2_GLOBALS._scenePalette.replace(&_palette); @@ -2107,7 +2105,7 @@ void AnimationPlayer::close() { _animData1 = NULL; _animData2 = NULL; - _field38 = false; + _animLoaded = false; if (g_globals != NULL) R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr - 1, 0); } @@ -2156,7 +2154,7 @@ void AnimationPlayer::getSlices() { AnimationPlayerExt::AnimationPlayerExt(): AnimationPlayer() { _isActive = false; - _field3A = false; + _canSkip = false; } void AnimationPlayerExt::synchronize(Serializer &s) { diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h index 133cdee6b2..41ddb277de 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.h +++ b/engines/tsage/ringworld2/ringworld2_logic.h @@ -407,8 +407,8 @@ public: AnimationData *_sliceNext; Common::File _resourceFile; Rect _rect1, _screenBounds; - bool _field38; - bool _field3A; + bool _animLoaded; + bool _canSkip; AnimationPaletteMode _paletteMode; AnimationObjectMode _objectMode; int _sliceHeight; |
