aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-04-12 20:16:34 +1000
committerPaul Gilbert2011-04-12 20:16:34 +1000
commitd61ad0153017f67e6eb6aaa87b54c1d6fec566ad (patch)
tree33dffdba74b9a6e313e950dac9566d5939950c76 /engines
parent1a1e760800c2b99b894879a2debf00c41c08f21d (diff)
downloadscummvm-rg350-d61ad0153017f67e6eb6aaa87b54c1d6fec566ad.tar.gz
scummvm-rg350-d61ad0153017f67e6eb6aaa87b54c1d6fec566ad.tar.bz2
scummvm-rg350-d61ad0153017f67e6eb6aaa87b54c1d6fec566ad.zip
TSAGE: Reworked the 'probe approaching rocks' cut-scene to work correctly
The problem is the original game presumed that rendering a single frame would take at least 10 ticks (at 60Hz). Since the ScummVM renders it faster than then, the cutscene wasn't working. A new 'ProbeMover' class has been created to ensure the probe shrinking keeps correct pace with the probe's movement.
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/core.cpp2
-rw-r--r--engines/tsage/ringworld_scenes1.cpp35
-rw-r--r--engines/tsage/ringworld_scenes1.h4
3 files changed, 29 insertions, 12 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 72f75190ca..84bd878f6f 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1127,7 +1127,7 @@ void PaletteRotation::signal() {
void PaletteRotation::remove() {
Action *action = _action;
- g_system->getPaletteManager()->setPalette((const byte *)&_palette[0], _start, _end - _start);
+ g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start, _end - _start);
if (_scenePalette->_listeners.contains(this))
_scenePalette->_listeners.remove(this);
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index dd7fdf026e..f847943bc5 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -3000,7 +3000,7 @@ void Scene6100::GetBoxAction::signal() {
case 0: {
scene->_turnAmount = 0;
Common::Point pt(scene->_rocks._position.x, scene->_rocks._position.y + 10);
- NpcMover *mover = new NpcMover();
+ ProbeMover *mover = new ProbeMover();
scene->_probe.addMover(mover, &pt, NULL);
scene->_probe.show();
break;
@@ -3033,22 +3033,20 @@ void Scene6100::GetBoxAction::signal() {
void Scene6100::GetBoxAction::dispatch() {
Scene6100 *scene = (Scene6100 *)_globals->_sceneManager._scene;
- Action::dispatch();
-
- if (scene->_speed > 0) {
- scene->_action5.dispatch();
- scene->_speed = (scene->_speed * 4) / 5;
-
- if (scene->_speed == 0)
- setDelay(2);
- }
- if (scene->_speed == 0) {
+ if (!scene->_probe._mover && (scene->_getBoxAction._actionIndex >= 1)) {
+ if (scene->_getBoxAction._actionIndex == 1) {
+ scene->_speed = 0;
+ scene->_getBoxAction.signal();
+ }
+
if (scene->_probe._percent > 4)
// Handle the probe disappearing into the rocks
scene->_probe._percent = scene->_probe._percent * 7 / 8;
scene->_probe._flags |= OBJFLAG_PANES;
}
+
+ Action::dispatch();
}
void Scene6100::Action7::signal() {
@@ -3068,6 +3066,21 @@ void Scene6100::Action7::signal() {
/*--------------------------------------------------------------------------*/
+void Scene6100::ProbeMover::dispatch() {
+ Scene6100 *scene = (Scene6100 *)_globals->_sceneManager._scene;
+
+ if (!dontMove()) {
+ if (scene->_speed > 0) {
+ scene->_action5.dispatch();
+ scene->_speed = (scene->_speed * 4) / 5;
+ }
+ }
+
+ NpcMover::dispatch();
+}
+
+/*--------------------------------------------------------------------------*/
+
void Scene6100::Item1::doAction(int action) {
SceneItem::display2(4000, 0);
}
diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h
index 01d8ad713f..89aa0a65c5 100644
--- a/engines/tsage/ringworld_scenes1.h
+++ b/engines/tsage/ringworld_scenes1.h
@@ -509,6 +509,10 @@ class Scene6100: public Scene {
public:
FloatSet _floats;
};
+ class ProbeMover: public NpcMover {
+ public:
+ virtual void dispatch();
+ };
/* Items */
class Item1: public SceneItem {