diff options
author | Paul Gilbert | 2011-05-15 22:30:13 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-05-15 22:30:13 +1000 |
commit | b63e60666fe06001eabdc41cbb2439a119fa37b9 (patch) | |
tree | f77b65c939fc74e0d762441075a27b60d08ed2e2 /engines | |
parent | 38d787676fbf904069c88cd015ee6c47d451b14b (diff) | |
download | scummvm-rg350-b63e60666fe06001eabdc41cbb2439a119fa37b9.tar.gz scummvm-rg350-b63e60666fe06001eabdc41cbb2439a119fa37b9.tar.bz2 scummvm-rg350-b63e60666fe06001eabdc41cbb2439a119fa37b9.zip |
TSAGE: Ensured all scenes with custom data properly save it in the savegames
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/ringworld_scenes1.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes1.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes10.cpp | 15 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes10.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes3.cpp | 40 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes3.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes8.cpp | 17 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes8.h | 7 |
8 files changed, 64 insertions, 31 deletions
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index aad4d5629c..b6daadbef7 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -1759,6 +1759,8 @@ Scene50::Scene50() : _item3(8, OBJECT_STUNNER, 50, 14, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 50, 3, LIST_END), _item4(9, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_USE, 40, 41, CURSOR_LOOK, 50, 5, LIST_END), _item5(10, OBJECT_SCANNER, 50, 17, OBJECT_STUNNER, 50, 18, CURSOR_LOOK, 50, 6, CURSOR_USE, 30, 8, LIST_END) { + + _doorwayRect = Rect(80, 108, 160, 112); } void Scene50::postInit(SceneObjectList *OwnerList) { @@ -1821,7 +1823,6 @@ void Scene50::postInit(SceneObjectList *OwnerList) { _item0.setBounds(Rect(200, 0, 320, 200)); _globals->_sceneItems.addItems(&_item3, &_item4, &_item5, &_item0, NULL); - _doorwayRect = Rect(80, 108, 160, 112); } void Scene50::signal() { @@ -1852,13 +1853,6 @@ void Scene50::dispatch() { } } -void Scene50::synchronize(Serializer &s) { - Scene::synchronize(s); - - if (s.getVersion() >= 3) - _doorwayRect.synchronize(s); -} - /*-------------------------------------------------------------------------- * Scene 60 - Flycycle controls * diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h index 2daf902248..554b261f2c 100644 --- a/engines/tsage/ringworld_scenes1.h +++ b/engines/tsage/ringworld_scenes1.h @@ -309,7 +309,6 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); virtual void dispatch(); - virtual void synchronize(Serializer &s); }; class Scene60 : public Scene { @@ -441,7 +440,6 @@ class Scene95 : public Scene { public: Action1 _action1; - int _field326; SceneObject _object1, _object2, _object3; SoundHandler _soundHandler; diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp index 41bfbdef02..f8844ec486 100644 --- a/engines/tsage/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld_scenes10.cpp @@ -819,6 +819,12 @@ void Scene9400::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 9400, &_globals->_player, &_object1, &_object3, NULL); } +void Scene9400::synchronize(Serializer &s) { + Scene::synchronize(s); + if (s.getVersion() >= 3) + s.syncAsSint16LE(_field1032); +} + /*-------------------------------------------------------------------------- * Scene 9450 * @@ -1777,6 +1783,15 @@ void Scene9900::strAction2::dispatch() { Action::dispatch(); } +void Scene9900::strAction2::synchronize(Serializer &s) { + Action::synchronize(s); + if (s.getVersion() >= 3) { + s.syncAsSint16LE(_lineNum); + s.syncAsSint16LE(_txtArray1Index); + s.syncAsSint16LE(_var3); + } +} + void Scene9900::strAction3::signal() { const byte mask3[3] = {0xff, 0, 0}; const byte mask4[3] = {0, 0, 0}; diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h index 0aec431d8a..aa41555718 100644 --- a/engines/tsage/ringworld_scenes10.h +++ b/engines/tsage/ringworld_scenes10.h @@ -238,6 +238,7 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); virtual void dispatch(); + virtual void synchronize(Serializer &s); }; class Scene9450 : public Scene2 { @@ -468,6 +469,7 @@ class Scene9900 : public Scene { virtual void signal(); virtual void dispatch(); + virtual void synchronize(Serializer &s); }; class strAction3 : public Action { diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp index faa04319d6..5ec21c57ce 100644 --- a/engines/tsage/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld_scenes3.cpp @@ -1955,6 +1955,12 @@ void Scene2100::signal() { } } +void Scene2100::synchronize(Serializer &s) { + Scene::synchronize(s); + if (s.getVersion() >= 3) + s.syncAsSint16LE(_field1800); +} + /*-------------------------------------------------------------------------- * Scene 2120 - Encyclopedia * @@ -2161,12 +2167,19 @@ void Scene2120::Action1::dispatch() { /*--------------------------------------------------------------------------*/ +Scene2120::Scene2120(): Scene() { + _listRect = Rect(18, 48, 260, 177); + _dbMode = 0; + _prevDbMode = 0; + _visageVisable = false; + _subjectIndex = 0; +} + void Scene2120::postInit(SceneObjectList *OwnerList) { loadScene(2120); setZoomPercents(0, 100, 200, 100); _globals->_player.disableControl(); - _listRect = Rect(18, 48, 260, 177); _subjectButton.setBounds(Rect(266, 13, 320, 56)); _nextPageButton.setBounds(Rect(266, 56, 320, 98)); _previousPageButton.setBounds(Rect(266, 98, 320, 140)); @@ -2183,11 +2196,6 @@ void Scene2120::postInit(SceneObjectList *OwnerList) { _arrowHotspot._frame = 1; _arrowHotspot.setPosition(Common::Point(400, 200)); - _dbMode = 0; - _prevDbMode = 0; - _visageVisable = false; - _subjectIndex = 0; - setAction(&_action1); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; @@ -2469,6 +2477,8 @@ Scene2150::Scene2150() : _hotspot8(16, CURSOR_LOOK, 2150, 8, LIST_END), _hotspot9(0, CURSOR_LOOK, 2150, 9, CURSOR_USE, 2150, 13, LIST_END), _hotspot11(0, CURSOR_LOOK, 2150, 12, LIST_END) { + _rect1 = Rect(260, 70, 270, 77); + _rect2 = Rect(222, 142, 252, 150); } void Scene2150::postInit(SceneObjectList *OwnerList) { @@ -2519,9 +2529,6 @@ void Scene2150::postInit(SceneObjectList *OwnerList) { _hotspot10.setStrip(5); _hotspot10.setPosition(Common::Point(59, 56)); - _rect1 = Rect(260, 70, 270, 77); - _rect2 = Rect(222, 142, 252, 150); - _globals->_player.postInit(); _globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0); _globals->_player.animate(ANIM_MODE_1, NULL); @@ -4849,6 +4856,14 @@ Scene2310::Scene2310() { _pageList[18].set(18, 2, 3, 0, 1, 4); _pageList[19].set(19, 3, 0, 1, 4, 2); _pageList[20].set(20, 4, 0, 3, 1, 2); + + _rectList[0].set(135, 70, 151, 140); + _rectList[1].set(151, 70, 167, 140); + _rectList[2].set(167, 70, 183, 140); + _rectList[3].set(183, 70, 199, 140); + _rectList[4].set(199, 70, 215, 140); + + _wireIndex = 5; } void Scene2310::postInit(SceneObjectList *OwnerList) { @@ -4865,16 +4880,9 @@ void Scene2310::postInit(SceneObjectList *OwnerList) { _wireList[idx].setPosition(pointList[idx]); } - _rectList[0].set(135, 70, 151, 140); - _rectList[1].set(151, 70, 167, 140); - _rectList[2].set(167, 70, 183, 140); - _rectList[3].set(183, 70, 199, 140); - _rectList[4].set(199, 70, 215, 140); - _globals->_player.disableControl(); _globals->_events.setCursor(CURSOR_WALK); - _wireIndex = 5; if (_vm->getFeatures() & GF_CD) _pageIndex = _globals->_randomSource.getRandomNumber(14) + 2; else diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h index 7ce262c2dd..3c3b90db56 100644 --- a/engines/tsage/ringworld_scenes3.h +++ b/engines/tsage/ringworld_scenes3.h @@ -285,6 +285,7 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void stripCallback(int v); virtual void signal(); + virtual void synchronize(Serializer &s); }; class Scene2120 : public Scene { @@ -320,6 +321,7 @@ public: int _subjectIndex; int _lineOffset; + Scene2120(); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void synchronize(Serializer &s); }; diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp index 522a4a80b6..05306fb450 100644 --- a/engines/tsage/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld_scenes8.cpp @@ -34,6 +34,14 @@ void NamedHotspotMult::synchronize(Serializer &s) { s.syncAsSint16LE(_lookLineNum); } +void SceneObject7700::synchronize(Serializer &s) { + SceneObject::synchronize(s); + if (s.getVersion() >= 3) { + s.syncAsSint16LE(_lookLineNum); + s.syncAsSint16LE(_defltLineNum); + } +} + /*-------------------------------------------------------------------------- * Scene 7000 * @@ -2520,4 +2528,13 @@ Scene7700::Scene7700() { _prof._state = 0; } +void Scene7700::synchronize(Serializer &s) { + Scene::synchronize(s); + if (s.getVersion() >= 3) { + s.syncAsSint16LE(_field977); + s.syncAsSint16LE(_field979); + s.syncAsSint16LE(_field97B); + } +} + } // End of namespace tSage diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h index ddbbca7731..8b183e895f 100644 --- a/engines/tsage/ringworld_scenes8.h +++ b/engines/tsage/ringworld_scenes8.h @@ -45,11 +45,7 @@ class SceneObject7700 : public SceneObjectExt { public: int _lookLineNum, _defltLineNum; - virtual void synchronize(Serializer &s) { - SceneObject::synchronize(s); - s.syncAsSint16LE(_lookLineNum); - s.syncAsSint16LE(_defltLineNum); - } + virtual void synchronize(Serializer &s); virtual Common::String getClassName() { return "SceneObject7700"; } }; @@ -486,6 +482,7 @@ public: virtual void signal(); virtual void process(Event &event); virtual void dispatch(); + virtual void synchronize(Serializer &s); }; } // End of namespace tSage |