[Scummvm-cvs-logs] scummvm master -> fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13

dreammaster dreammaster at scummvm.org
Wed Nov 13 03:13:48 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fe6ed6008e TSAGE: Animation player fix to match speed with the original


Commit: fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13
    https://github.com/scummvm/scummvm/commit/fe6ed6008ea7cec6700f2f8d32c2f44b011d9f13
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-11-12T18:13:14-08:00

Commit Message:
TSAGE: Animation player fix to match speed with the original

Changed paths:
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.h



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 8f01a34..f9bf164 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 133cdee..41ddb27 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;






More information about the Scummvm-git-logs mailing list