aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/core.cpp33
-rw-r--r--engines/tsage/core.h10
-rw-r--r--engines/tsage/ringworld_scenes10.cpp41
-rw-r--r--engines/tsage/ringworld_scenes10.h10
4 files changed, 48 insertions, 46 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index c550b603d7..e58a6ef7b0 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1568,39 +1568,6 @@ void SceneHotspot::doAction(int action) {
/*--------------------------------------------------------------------------*/
-void SceneHotspot_3::doAction(int action) {
- switch (action) {
- case CURSOR_WALK:
- // Nothing
- break;
- case CURSOR_LOOK:
- if (_field28 == -1)
- SceneHotspot::doAction(action);
- else
- SceneItem::display(_field26, _field28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- break;
- case CURSOR_USE:
- if (_field2A == -1)
- SceneHotspot::doAction(action);
- else
- SceneItem::display(_field26, _field2A, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- break;
- default:
- SceneHotspot::doAction(action);
- break;
- }
-}
-
-void SceneHotspot_3::quickInit(const int ys, const int xe, const int ye, const int xs, const int val26, const int val28, const int val2A) {
- setBounds(ys, xe, ye, xs);
- _field26 = val26;
- _field28 = val28;
- _field2A = val2A;
- _globals->_sceneItems.addItems(this, NULL);
-}
-
-/*--------------------------------------------------------------------------*/
-
void SceneObjectWrapper::setSceneObject(SceneObject *so) {
_sceneObject = so;
so->_strip = 1;
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 79bf89145d..b37d576b4e 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -447,16 +447,6 @@ public:
virtual Common::String getClassName() { return "SceneHotspot_2"; }
};
-class SceneHotspot_3: public SceneHotspot_2 {
-public:
- int _field2A;
- SceneHotspot_3(): SceneHotspot_2() {}
-
- void quickInit(const int ys, const int xe, const int ye, const int xs, const int val26, const int val28, const int val2A);
- virtual void doAction(int action);
- virtual Common::String getClassName() { return "SceneHotspot_3"; }
-};
-
enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MODE_3 = 3,
ANIM_MODE_4 = 4, ANIM_MODE_5 = 5, ANIM_MODE_6 = 6, ANIM_MODE_7 = 7, ANIM_MODE_8 = 8};
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index 9bfa2e017c..79df3185c0 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -36,6 +36,41 @@ Scene2::Scene2() {
_sceneState = 0;
}
+/*--------------------------------------------------------------------------*/
+
+void SceneHotspot_3::doAction(int action) {
+ switch (action) {
+ case CURSOR_WALK:
+ // Nothing
+ break;
+ case CURSOR_LOOK:
+ if (_lookLineNum == -1)
+ SceneHotspot::doAction(action);
+ else
+ SceneItem::display(_resnum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ break;
+ case CURSOR_USE:
+ if (_useLineNum == -1)
+ SceneHotspot::doAction(action);
+ else
+ SceneItem::display(_resnum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ break;
+ default:
+ SceneHotspot::doAction(action);
+ break;
+ }
+}
+
+void SceneHotspot_3::quickInit(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum) {
+ setBounds(ys, xe, ye, xs);
+ _resnum = resnum;
+ _lookLineNum = lookLineNum;
+ _useLineNum = useLineNum;
+ _globals->_sceneItems.addItems(this, NULL);
+}
+
+/*--------------------------------------------------------------------------*/
+
void Object9350::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager.postInit(&_globals->_sceneManager._altSceneObjects);
}
@@ -1488,15 +1523,15 @@ void Scene9850::signal() {
_objSword.hide();
_globals->_sceneItems.remove(&_objScimitar);
_globals->_sceneItems.remove(&_objSword);
- _globals->_sceneItems.addItems(&_hotspot19);
+ _globals->_sceneItems.addItems(&_hotspot19, NULL);
_globals->_player.enableControl();
break;
case 11:
// Hidden closet opened
if (_globals->_inventory._scimitar._sceneNumber == 9850)
- _globals->_sceneItems.addItems(&_objScimitar);
+ _globals->_sceneItems.addItems(&_objScimitar, NULL);
if (_globals->_inventory._sword._sceneNumber == 9850)
- _globals->_sceneItems.addItems(&_objSword);
+ _globals->_sceneItems.addItems(&_objSword, NULL);
_globals->_sceneItems.remove(&_hotspot19);
_globals->_player.enableControl();
break;
diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h
index 6a09773179..8eac21ac47 100644
--- a/engines/tsage/ringworld_scenes10.h
+++ b/engines/tsage/ringworld_scenes10.h
@@ -46,6 +46,16 @@ public :
}
};
+class SceneHotspot_3: public SceneHotspot {
+public:
+ int _resnum, _lookLineNum, _useLineNum;
+ SceneHotspot_3(): SceneHotspot() {}
+
+ void quickInit(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum);
+ virtual void doAction(int action);
+ virtual Common::String getClassName() { return "SceneHotspot_3"; }
+};
+
class Object9350: public SceneObject {
public:
virtual void postInit(SceneObjectList *OwnerList = NULL);