diff options
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/core.h | 24 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes10.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes10.h | 16 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes8.cpp | 25 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes8.h | 18 |
5 files changed, 46 insertions, 47 deletions
diff --git a/engines/tsage/core.h b/engines/tsage/core.h index b374c50266..568c659190 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -583,30 +583,6 @@ public: virtual Common::String getClassName() { return "SceneObjectExt"; } }; -class SceneObject3: public SceneObjectExt { -public: - int _field88, _field8A; - - virtual void synchronise(Serialiser &s) { - SceneObject::synchronise(s); - s.syncAsSint16LE(_field88); - s.syncAsSint16LE(_field8A); - } - virtual Common::String getClassName() { return "SceneObject3"; } -}; - -class SceneObject4: public SceneObject { -public: - int _field88, _field8A; - - virtual void synchronise(Serialiser &s) { - SceneObject::synchronise(s); - s.syncAsSint16LE(_field88); - s.syncAsSint16LE(_field8A); - } - virtual Common::String getClassName() { return "SceneObject4"; } -}; - class SceneText: public SceneObject { public: int _fontNumber; diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp index 12e69a7011..9b7d727600 100644 --- a/engines/tsage/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld_scenes10.cpp @@ -183,20 +183,20 @@ void Scene9100::postInit(SceneObjectList *OwnerList) { * *--------------------------------------------------------------------------*/ void Scene9150::Object3::signal() { - switch (_field8A++) { + switch (_signalFlag++) { case 0: - _field88 = 10 + _globals->_randomSource.getRandomNumber(90); + _timer = 10 + _globals->_randomSource.getRandomNumber(90); break; default: animate(ANIM_MODE_5, this); - _field88 = 0; + _signalFlag = 0; break; } } void Scene9150::Object3::dispatch() { SceneObject::dispatch(); - if ((_field88 != 0) && (--_field88 == 0)) + if ((_timer != 0) && (--_timer == 0)) signal(); } @@ -223,7 +223,7 @@ void Scene9150::signal() { void Scene9150::dispatch() { if ((_sceneState != 0) && (_sceneBounds.left == 0)) { - _object3._field88 = 0; + _object3._timer = 0; _sceneState = 0; _sceneHotspot3.setAction(&_sequenceManager2, 0, 9154, &_object3, 0); _sceneHotspot10.remove(); diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h index 00b524f7c8..66b8c70d93 100644 --- a/engines/tsage/ringworld_scenes10.h +++ b/engines/tsage/ringworld_scenes10.h @@ -35,6 +35,18 @@ namespace tSage { +class SceneObject9150: public SceneObject { +public: + int _timer, _signalFlag; + + virtual void synchronise(Serialiser &s) { + SceneObject::synchronise(s); + s.syncAsSint16LE(_timer); + s.syncAsSint16LE(_signalFlag); + } + virtual Common::String getClassName() { return "SceneObject4"; } +}; + class Scene2: public Scene { public : int _sceneState; @@ -79,7 +91,7 @@ public: }; class Scene9150: public Scene2 { - class Object3: public SceneObject4 { + class Object3: public SceneObject9150 { public: virtual void signal(); virtual void dispatch(); @@ -237,7 +249,7 @@ class Scene9450: public Scene2 { virtual void signal(); }; - class Object3: public SceneObject4 { + class Object3: public SceneObject9150 { public: virtual void dispatch(); }; diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp index 8482cb0416..e9277fbe00 100644 --- a/engines/tsage/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld_scenes8.cpp @@ -1917,7 +1917,7 @@ void Scene7700::Object1::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; if (action == CURSOR_LOOK) { - SceneItem::display(7700, _field88, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); } else if (action == CURSOR_USE) { if (_globals->getFlag(78)) { _globals->_player.disableControl(); @@ -1948,7 +1948,7 @@ void Scene7700::SceneHotspot11::doAction(int action) { void Scene7700::Object1::signal() { if (_state == 0) { _state = 1; - SceneItem::display(7701, _field8A, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); + SceneItem::display(7701, _defltLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END); } else { _state = 0; } @@ -2333,15 +2333,15 @@ void Scene7700::postInit(SceneObjectList *OwnerList) { _object1.postInit(); _object1.setVisage(7700); _object1.setPosition(Common::Point(184, 61), 0); - _object1._field88 = 18; - _object1._field8A = 16; + _object1._lookLineNum = 18; + _object1._defltLineNum = 16; _object2.postInit(); _object2.setVisage(7700); _object2.setPosition(Common::Point(184, 70), 0); _object2.setPriority2(60); - _object2._field88 = 19; - _object2._field8A = 17; + _object2._lookLineNum = 19; + _object2._defltLineNum = 17; _object3.postInit(); _object3.setVisage(7703); @@ -2352,24 +2352,24 @@ void Scene7700::postInit(SceneObjectList *OwnerList) { _object4.setVisage(7700); _object4.setPosition(Common::Point(268, 59), 0); _object4.setStrip(2); - _object4._field88 = 37; - _object4._field8A = 35; + _object4._lookLineNum = 37; + _object4._defltLineNum = 35; _object5.postInit(); _object5.setVisage(7700); _object5.setPosition(Common::Point(268, 67), 0); _object5.setPriority2(58); _object5.setStrip2(3); - _object5._field88 = 38; - _object5._field8A = 36; + _object5._lookLineNum = 38; + _object5._defltLineNum = 36; _object6.postInit(); _object6.setVisage(7700); _object6.setPosition(Common::Point(268, 75), 0); _object6.setPriority2(57); _object6.setStrip2(4); - _object6._field88 = 40; - _object6._field8A = 43; + _object6._lookLineNum = 40; + _object6._defltLineNum = 43; _object8.postInit(); _object8.setVisage(7703); @@ -2499,7 +2499,6 @@ void Scene7700::postInit(SceneObjectList *OwnerList) { Scene7700::Scene7700() { _object1._state = 0; _object2._state = 0; - _object3._state = 0; _object4._state = 0; _object5._state = 0; _object6._state = 0; diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h index 7be113bdf7..929426696e 100644 --- a/engines/tsage/ringworld_scenes8.h +++ b/engines/tsage/ringworld_scenes8.h @@ -35,7 +35,7 @@ namespace tSage { - class NamedHotspotMult: public SceneHotspot { +class NamedHotspotMult: public SceneHotspot { public: int _useLineNum, _lookLineNum; NamedHotspotMult(): SceneHotspot() {} @@ -43,6 +43,18 @@ public: virtual Common::String getClassName() { return "NamedHotspotMult"; } }; +class SceneObject7700: public SceneObjectExt { +public: + int _lookLineNum, _defltLineNum; + + virtual void synchronise(Serialiser &s) { + SceneObject::synchronise(s); + s.syncAsSint16LE(_lookLineNum); + s.syncAsSint16LE(_defltLineNum); + } + virtual Common::String getClassName() { return "SceneObject7700"; } +}; + class Scene7000: public Scene { /* Actions */ class Action1: public Action { @@ -323,12 +335,12 @@ class Scene7700: public Scene { virtual void signal(); }; - class Object1: public SceneObject3 { + class Object1: public SceneObject7700 { public: virtual void signal(); virtual void doAction(int action); }; - class Object3: public SceneObject3 { + class Object3: public SceneObject { public: virtual void doAction(int action); }; |