[Scummvm-cvs-logs] scummvm master -> 53eee91c3f8acc41d54719d5f46ddffcf48fa60b

dreammaster dreammaster at scummvm.org
Tue Jul 1 02:23:44 CEST 2014


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:
53eee91c3f TSAGE: Fix for loading savegames in the R2R Flub tube maze


Commit: 53eee91c3f8acc41d54719d5f46ddffcf48fa60b
    https://github.com/scummvm/scummvm/commit/53eee91c3f8acc41d54719d5f46ddffcf48fa60b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-06-30T20:23:00-04:00

Commit Message:
TSAGE: Fix for loading savegames in the R2R Flub tube maze

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



diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 31d801f..d95f279 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 3f32503..0898cfd 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;
 		}






More information about the Scummvm-git-logs mailing list