aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-03-26 22:12:16 +1100
committerPaul Gilbert2011-03-26 22:12:16 +1100
commitc0b376ad9ab145869d4c1761c4d8019c53a9393e (patch)
tree312721fbb956e1df00d4085f2985bbae4b82ddf4
parent0b9d36cb6bb46380e9dda610936f5d0967f3baa6 (diff)
downloadscummvm-rg350-c0b376ad9ab145869d4c1761c4d8019c53a9393e.tar.gz
scummvm-rg350-c0b376ad9ab145869d4c1761c4d8019c53a9393e.tar.bz2
scummvm-rg350-c0b376ad9ab145869d4c1761c4d8019c53a9393e.zip
TSAGE: Implemented objects in Scene #4100
-rw-r--r--engines/tsage/ringworld_scenes5.cpp121
-rw-r--r--engines/tsage/ringworld_scenes5.h27
2 files changed, 142 insertions, 6 deletions
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index 9eb23d95d9..33e76b3044 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -2450,7 +2450,126 @@ void Scene4100::Action6::signal() {
/*--------------------------------------------------------------------------*/
-Scene4100::Scene4100() {
+void Scene4100::Hotspot1::doAction(int action) {
+ Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_LOOK:
+ SceneItem::display2(4100, _globals->getFlag(42) ? 24 : 12);
+ break;
+ case OBJECT_STUNNER:
+ SceneItem::display2(4100, 16);
+ break;
+ case CURSOR_USE:
+ SceneItem::display2(4100, 22);
+ break;
+ case CURSOR_TALK:
+ if (_globals->_inventory._peg._sceneNumber == 1) {
+ _globals->_player.disableControl();
+ scene->setAction(&scene->_sequenceManager, scene, 4109, NULL);
+ } else if (_globals->getFlag(42)) {
+ scene->setAction(&scene->_sequenceManager, scene, 4102, NULL);
+ } else {
+ if (_globals->getFlag(33))
+ _globals->_stripNum = 4077;
+ else if (_globals->getFlag(82)) {
+ _globals->clearFlag(82);
+ _globals->_stripNum = 4100;
+ } else {
+ _globals->_stripNum = 4075;
+ _globals->setFlag(33);
+ }
+
+ scene->setAction(&scene->_action1);
+ }
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+void Scene4100::Hotspot2::doAction(int action) {
+ switch (action) {
+ case CURSOR_LOOK:
+ error("*** The Chief's daughter... WOW!");
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+void Scene4100::Hotspot5::doAction(int action) {
+ Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_LOOK:
+ SceneItem::display2(4100, 14);
+ break;
+ case CURSOR_TALK:
+ scene->_sceneMode = 4102;
+ scene->setAction(&scene->_sequenceManager, scene, 4104, NULL);
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+void Scene4100::Hotspot6::doAction(int action) {
+ Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_LOOK:
+ SceneItem::display2(4100, 2);
+ break;
+ case CURSOR_USE:
+ if (_globals->getFlag(42)) {
+ _globals->_player.disableControl();
+ scene->setAction(&scene->_action5);
+ } else {
+ scene->_sceneMode = 4102;
+ scene->setAction(&scene->_sequenceManager, scene, 4103, NULL);
+ }
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+
+void Scene4100::Hotspot14::doAction(int action) {
+ Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_LOOK:
+ SceneItem::display2(4100, 0);
+ break;
+ case OBJECT_LADDER:
+ _globals->_player.disableControl();
+ scene->setAction(&scene->_action5);
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+
+/*--------------------------------------------------------------------------*/
+
+Scene4100::Scene4100():
+ _hotspot3(0, CURSOR_LOOK, 4100, 10, CURSOR_USE, 4100, 21, LIST_END),
+ _hotspot4(0, CURSOR_LOOK, 4100, 8, LIST_END),
+ _hotspot7(0, CURSOR_USE, 4100, 3, CURSOR_USE, 4150, 29, LIST_END),
+ _hotspot8(0, CURSOR_LOOK, 4100, 5, LIST_END),
+ _hotspot9(0, CURSOR_LOOK, 4100, 6, CURSOR_USE, 4100, 20, LIST_END),
+ _hotspot10(0, CURSOR_LOOK, 4100, 7, CURSOR_USE, 4100, 19, LIST_END),
+ _hotspot11(0, CURSOR_LOOK, 4100, 8, CURSOR_USE, 4100, 18, LIST_END),
+ _hotspot12(0, CURSOR_LOOK, 4100, 9, LIST_END),
+ _hotspot13(0, CURSOR_LOOK, 4100, 11, CURSOR_USE, 4100, 17, LIST_END) {
}
void Scene4100::postInit(SceneObjectList *OwnerList) {
diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h
index e9462b6513..ccfb80b449 100644
--- a/engines/tsage/ringworld_scenes5.h
+++ b/engines/tsage/ringworld_scenes5.h
@@ -387,11 +387,23 @@ class Scene4100: public Scene {
};
/* Hotspots */
- class Hotspot14: public SceneObject {
+ class Hotspot1: public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot17: public SceneObject {
+ class Hotspot2: public SceneObject {
+ public:
+ virtual void doAction(int action);
+ };
+ class Hotspot5: public SceneObject {
+ public:
+ virtual void doAction(int action);
+ };
+ class Hotspot6: public SceneObject {
+ public:
+ virtual void doAction(int action);
+ };
+ class Hotspot14: public SceneObject {
public:
virtual void doAction(int action);
};
@@ -410,9 +422,14 @@ public:
Action4 _action4;
Action5 _action5;
Action6 _action6;
- SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5;
- SceneObject _hotspot6, _hotspot7, _hotspot8, _hotspot9, _hotspot10;
- SceneObject _hotspot11, _hotspot12, _hotspot13, _hotspot14;
+ Hotspot1 _hotspot1;
+ Hotspot2 _hotspot2;
+ DisplayHotspot _hotspot3, _hotspot4;
+ Hotspot5 _hotspot5;
+ Hotspot6 _hotspot6;
+ DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
+ DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
+ Hotspot14 _hotspot14;
Scene4100();
virtual void postInit(SceneObjectList *OwnerList = NULL);