aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-30 20:23:00 -0400
committerPaul Gilbert2014-06-30 20:23:00 -0400
commit53eee91c3f8acc41d54719d5f46ddffcf48fa60b (patch)
tree516534b1c1578543f7459dba7e6483fa1b7d3e52
parent559e9f98fca1583841e41926b2a4715f4b1c301d (diff)
downloadscummvm-rg350-53eee91c3f8acc41d54719d5f46ddffcf48fa60b.tar.gz
scummvm-rg350-53eee91c3f8acc41d54719d5f46ddffcf48fa60b.tar.bz2
scummvm-rg350-53eee91c3f8acc41d54719d5f46ddffcf48fa60b.zip
TSAGE: Fix for loading savegames in the R2R Flub tube maze
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h2
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp11
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 31d801fa55..d95f279e27 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -320,7 +320,7 @@ public:
int pixelToCellXY(Common::Point &pt);
virtual Common::String getClassName() { return "MazeUI"; }
- void synchronize(Serializer &s);
+ virtual void synchronize(Serializer &s);
virtual void reposition();
virtual void draw();
};
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 3f32503fdf..0898cfd0b4 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -3668,11 +3668,12 @@ void Scene3500::postInit(SceneObjectList *OwnerList) {
_horizontalSpeedDisplay.setPosition(Common::Point(126, 108));
_horizontalSpeedDisplay.fixPriority(200);
+ _action1._turningFl = false;
+
+ _mazeUI.postInit();
_mazeUI.setDisplayBounds(Rect(160, 89, 299, 182));
_mazeUI.load(2);
_mazeUI.setMazePosition(_mazePosition);
-
- _action1._turningFl = false;
_mazeUI.draw();
_directionChangesEnabled = true;
@@ -3876,6 +3877,11 @@ void Scene3500::dispatch() {
Rect tmpRect;
Scene::dispatch();
+ // WORKAROUND: The _mazeUI wasn't originally added to the scene in postInit.
+ // This is only needed to fix old savegames
+ if (!R2_GLOBALS._sceneObjects->contains(&_mazeUI))
+ _mazeUI.draw();
+
if (((_shuttle._frame % 2) == 0) && (!_action1._turningFl)) {
_shuttle.setFrame(_shuttle.changeFrame());
_mazeDirection = _shuttle._frame;
@@ -4215,7 +4221,6 @@ void Scene3500::dispatch() {
_rotation->_idxChange = 0;
}
- _mazeUI.draw();
if (_exitCounter != 0)
++_exitCounter;
}