[Scummvm-cvs-logs] scummvm master -> 53929044a66005031658657f5ede8931979f9104

Strangerke Strangerke at scummvm.org
Wed Dec 21 22:42:52 CET 2011


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:
53929044a6 TSAGE: R2R - Implement scene 3175


Commit: 53929044a66005031658657f5ede8931979f9104
    https://github.com/scummvm/scummvm/commit/53929044a66005031658657f5ede8931979f9104
Author: Strangerke (strangerke at scummvm.org)
Date: 2011-12-21T13:42:16-08:00

Commit Message:
TSAGE: R2R - Implement scene 3175

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



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 0248a3c..d84e4eb 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -181,6 +181,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
 		// Jail
 		return new Scene3150();
 	case 3175:
+		// Autopsy room
+		return new Scene3175();
 	case 3200:
 	case 3210:
 	case 3220:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 2c2530f..cdb4bee 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -793,5 +793,135 @@ void Scene3150::dispatch() {
 	Scene::dispatch();
 }
 
+/*--------------------------------------------------------------------------
+ * Scene 3175 - Autopsy room
+ *
+ *--------------------------------------------------------------------------*/
+bool Scene3175::Item1::startAction(CursorType action, Event &event) {
+	Scene3175 *scene = (Scene3175 *)R2_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_USE:
+		if (_useLineNum != -1) {
+			SceneItem::display(_resNum, _useLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	case CURSOR_LOOK:
+		if (_lookLineNum != -1) {
+			SceneItem::display(_resNum, _lookLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	case CURSOR_TALK:
+		if (_talkLineNum != -1) {
+			SceneItem::display(_resNum, _talkLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	default:
+		break;
+	}
+	warning("scene->display() called with two parameters");
+	return scene->display(action);
+}
+
+bool Scene3175::Actor3::startAction(CursorType action, Event &event) {
+	Scene3175 *scene = (Scene3175 *)R2_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_USE:
+		if (_useLineNum != -1) {
+			SceneItem::display(_resNum, _useLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	case CURSOR_LOOK:
+		if (_lookLineNum != -1) {
+			SceneItem::display(_resNum, _lookLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	case CURSOR_TALK:
+		if (_talkLineNum != -1) {
+			SceneItem::display(_resNum, _talkLineNum, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+			return true;
+		}
+		break;
+	default:
+		break;
+	}
+	warning("scene->display() called with two parameters");
+	return scene->display(action);
+}
+
+bool Scene3175::Actor1::startAction(CursorType action, Event &event) {
+	Scene3175 *scene = (Scene3175 *)R2_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_USE:
+		R2_GLOBALS._player.disableControl();
+		scene->_sceneMode = 3176;
+		scene->setAction(&scene->_sequenceManager, scene, 3176, &R2_GLOBALS._player, &scene->_actor1, NULL);
+		return true;
+		break;
+	case CURSOR_LOOK:
+		SceneItem::display(3175, 9, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+		return true;
+		break;
+	case CURSOR_TALK:
+		SceneItem::display(3175, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
+		return true;
+		break;
+	default:
+		return SceneActor::startAction(action, event);
+		break;
+	}
+}
+
+void Scene3175::postInit(SceneObjectList *OwnerList) {
+	loadScene(3175);
+	SceneExt::postInit();
+
+	_actor1.postInit();
+	_actor1.setup(3175, 1, 1);
+	_actor1.setPosition(Common::Point(35, 72));
+	_actor1.setDetails(3175, 9, 10, -1, 1, NULL);
+
+	_actor2.postInit();
+	_actor2.setup(3175, 2, 1);
+	_actor2.setPosition(Common::Point(87, 148));
+
+	_actor3.postInit();
+	_actor3.setup(3175, 3, 1);
+	_actor3.setPosition(Common::Point(199, 117));
+	_actor3.setDetails(3175, 15, 16, 17, 1, NULL);
+
+	_item2.setDetails(12, 3175, 3, 1, 5);
+	_item3.setDetails(11, 3175, 6, 7, 8);
+	_item1.setDetails(Rect(0, 0, 320, 200), 3175, 0, 1, 2, 1, NULL);
+
+	R2_GLOBALS._player.postInit();
+
+	if (R2_GLOBALS._player._oldCharacterScene[3] == 3250) {
+		R2_GLOBALS._player.setup(30, 5, 1);
+		R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+		R2_GLOBALS._player.setPosition(Common::Point(126, 77));
+		R2_GLOBALS._player.enableControl();
+	} else {
+		_sceneMode = 3175;
+		setAction(&_sequenceManager, this, 3175, &R2_GLOBALS._player, &_actor1, NULL);
+	}
+
+	R2_GLOBALS._player._oldCharacterScene[3] = 3175;
+}
+
+void Scene3175::signal() {
+	if (_sceneMode == 3176)
+		R2_GLOBALS._sceneManager.changeScene(3250);
+	else
+		R2_GLOBALS._player.enableControl();
+}
+
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h
index cdbf435..67c430c 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.h
@@ -159,6 +159,32 @@ public:
 	virtual void signal();
 	virtual void dispatch();
 };
+
+class Scene3175 : public SceneExt {
+	class Item1 : public NamedHotspot {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+
+	class Actor3 : public SceneActor {
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Actor1 : public Actor3 {
+		virtual bool startAction(CursorType action, Event &event);
+	};
+public:
+
+	Item1 _item1;
+	Item1 _item2;
+	Item1 _item3;
+	Actor1 _actor1;
+	SceneActor _actor2;
+	Actor3 _actor3;
+	SequenceManager _sequenceManager;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void signal();
+};
 } // End of namespace Ringworld2
 } // End of namespace TsAGE
 






More information about the Scummvm-git-logs mailing list