[Scummvm-cvs-logs] scummvm master -> 21d570af83bed7b6edcc485b991fc52ecc9f4ab6
dreammaster
dreammaster at scummvm.org
Wed Feb 29 11:40:37 CET 2012
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b60a2f012a TSAGE: Slow down the animation player to match the original game
21d570af83 TSAGE: Bugfixes for startup sequence in R2R Scene 180
Commit: b60a2f012a92729591ab4e3221a980d98a5ceaf0
https://github.com/scummvm/scummvm/commit/b60a2f012a92729591ab4e3221a980d98a5ceaf0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-02-29T02:22:08-08:00
Commit Message:
TSAGE: Slow down the animation player to match the original game
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 582458a..fb5f4a0 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1657,14 +1657,14 @@ void AnimationPlayer::process(Event &event) {
void AnimationPlayer::dispatch() {
uint32 gameFrame = R2_GLOBALS._events.getFrameNumber();
- uint32 gameDiff = (gameFrame > _gameFrame) ? gameFrame - _gameFrame : _gameFrame - gameFrame;
+ uint32 gameDiff = gameFrame - _gameFrame;
if (gameDiff >= _frameDelay) {
drawFrame(_playbackTick % _subData._framesPerSlices);
++_playbackTick;
_position = _playbackTick / _subData._framesPerSlices;
- if (_position == _ticksPerSlices)
+ if (_position == _nextSlicesPosition)
nextSlices();
_playbackTickPrior = _playbackTick;
@@ -1694,8 +1694,11 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
// Set other properties
_playbackTickPrior = -1;
_playbackTick = 0;
- _frameDelay = 60 / _subData._frameRate;
- _gameFrame = R2_GLOBALS._events.getFrameNumber() - _frameDelay;
+
+ // 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;
+ _gameFrame = R2_GLOBALS._events.getFrameNumber();
if (_subData._totalSize) {
_dataNeeded = _subData._totalSize;
@@ -1719,7 +1722,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
}
_position = 0;
- _ticksPerSlices = 1;
+ _nextSlicesPosition = 1;
// Load up the first slices set
_sliceCurrent->_dataSize = _subData._slices._dataSize;
@@ -1868,7 +1871,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) {
* Read the next frame's slice set
*/
void AnimationPlayer::nextSlices() {
- _position = _ticksPerSlices++;
+ _position = _nextSlicesPosition++;
_playbackTick = _position * _subData._framesPerSlices;
_playbackTickPrior = _playbackTick - 1;
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 3d2ffd9..b63c0ac 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -400,7 +400,7 @@ public:
int _playbackTick;
int _playbackTickPrior;
int _position;
- int _ticksPerSlices;
+ int _nextSlicesPosition;
uint _frameDelay;
uint32 _gameFrame;
public:
Commit: 21d570af83bed7b6edcc485b991fc52ecc9f4ab6
https://github.com/scummvm/scummvm/commit/21d570af83bed7b6edcc485b991fc52ecc9f4ab6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-02-29T02:39:48-08:00
Commit Message:
TSAGE: Bugfixes for startup sequence in R2R Scene 180
Changed paths:
engines/tsage/ringworld2/ringworld2_scenes0.cpp
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 460646c..94a1193 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1621,14 +1621,16 @@ void Scene180::signal() {
break;
case 7:
+ // Title screen. Wait until title music finishes playing
R2_GLOBALS._scene180Mode = 2;
- if (R2_GLOBALS._sound1.isPaused())
+ if (R2_GLOBALS._sound1.isPlaying())
_sceneMode = 7;
setFrameInc(1);
break;
case 9:
R2_GLOBALS._sound1.play(3);
+ clearScreen();
setFrameInc(2);
break;
More information about the Scummvm-git-logs
mailing list