aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld2/ringworld2_logic.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2013-11-12 21:13:14 -0500
committerPaul Gilbert2013-11-12 21:13:14 -0500
commitfe6ed6008ea7cec6700f2f8d32c2f44b011d9f13 (patch)
tree640e57fef9d4853ba291808d82f91000d655c4c6 /engines/tsage/ringworld2/ringworld2_logic.cpp
parentab3cf625d59430d9b7496b0437d6a08e33698d58 (diff)
downloadscummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.tar.gz
scummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.tar.bz2
scummvm-rg350-fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13.zip
TSAGE: Animation player fix to match speed with the original
Diffstat (limited to 'engines/tsage/ringworld2/ringworld2_logic.cpp')
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp18
1 files changed, 8 insertions, 10 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) {