[Scummvm-cvs-logs] scummvm master -> 395c94401a407f77d11ff142bbe648bb7b21d5c6

dreammaster dreammaster at scummvm.org
Mon Sep 16 02:42:43 CEST 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:
395c94401a TSAGE: Added a Skip button to the R2R balloon scene to allow skipping it


Commit: 395c94401a407f77d11ff142bbe648bb7b21d5c6
    https://github.com/scummvm/scummvm/commit/395c94401a407f77d11ff142bbe648bb7b21d5c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-09-15T17:41:44-07:00

Commit Message:
TSAGE: Added a Skip button to the R2R balloon scene to allow skipping it

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



diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index 81c936d..fb4dde6 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -4677,6 +4677,18 @@ bool Scene2900::KnobRight::startAction(CursorType action, Event &event) {
 	return true;
 }
 
+bool Scene2900::Skip::startAction(CursorType action, Event &event) {
+	Scene2900 *scene = (Scene2900 *)R2_GLOBALS._sceneManager._scene;
+
+	if (action == CURSOR_USE) {
+		R2_GLOBALS._player.disableControl();
+		scene->_sceneMode = 12;
+		scene->signal();
+	}
+
+	return true;
+}
+
 /*------------------------------------------------------------------------*/
 
 void Scene2900::Action1::signal() {
@@ -4912,7 +4924,6 @@ void Scene2900::Map::moveLine(int xpSrc, int ypSrc, int xpDest, int ypDest, int
 	surface.unlockSurface();
 }
 
-
 /*------------------------------------------------------------------------*/
 
 Scene2900::Scene2900(): SceneExt() {
@@ -4988,11 +4999,21 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 	_knobRightContent.setPosition(Common::Point(247, 199));
 	_knobRightContent.fixPriority(200);
 
+	// Set up hotspots
 	_scenery.setDetails(Rect(0, 0, 320, 150), 2900, -1, -1, -1, 1, (SceneItem *)NULL);
 	_controlPanel.setDetails(Rect(0, 150, 320, 200), 2900, -1, -1, -1, 1, (SceneItem *)NULL);
 	_altimeter.setDetails(Rect(42, 164, 129, 190), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
 	_knobLeft.setDetails(Rect(165, 160, 228, 200), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
 	_knobRight.setDetails(Rect(228, 160, 285, 200), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
+	_skip.postInit();
+	_skip.setBounds(185, 50, 200, 0);
+	R2_GLOBALS._sceneItems.push_front(&_skip);
+
+	// For ScummVM, we're introducing a Skip button, since the scene is a pain
+	_skipText._color1 = R2_GLOBALS._scenePalette._colors.foreground;
+	_skipText._color2 = R2_GLOBALS._scenePalette._colors.background;
+	_skipText.setPosition(Common::Point(0, 185));
+	_skipText.setup("Skip");
 
 	setAction(&_action1);
 	R2_GLOBALS._player.postInit();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 0c2b971..4225078 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -689,6 +689,10 @@ class Scene2900 : public SceneExt {
 	public:
 		virtual bool startAction(CursorType action, Event &event);
 	};
+	class Skip : public NamedHotspot {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
 
 	/* Actions */
 	class Action1: public Action {
@@ -696,7 +700,7 @@ class Scene2900 : public SceneExt {
 		void signal();
 	};
 
-	/* Custom classes */
+	/* Miscellaneous */
 	class Map {
 	private:
 		void moveArea(Rect &r, int xAmt, int yAmt);
@@ -731,8 +735,10 @@ public:
 	Altimeter _altimeter;
 	KnobLeft _knobLeft;
 	KnobRight _knobRight;
+	Skip _skip;
 	Action1 _action1;
 	Map _map;
+	SceneText _skipText;
 
 	int _field412;
 	bool _altitudeChanging;






More information about the Scummvm-git-logs mailing list