diff options
author | Filippos Karapetis | 2014-05-08 01:51:05 +0300 |
---|---|---|
committer | Filippos Karapetis | 2014-05-08 01:51:05 +0300 |
commit | 189b629b338cb0658507776a71e9a37376ad15bb (patch) | |
tree | 2b0e17679b511ad60d84a524428b118b1cf2c876 /engines | |
parent | 35a54a057063a3d04ea448670bd77e78f1cc40a5 (diff) | |
download | scummvm-rg350-189b629b338cb0658507776a71e9a37376ad15bb.tar.gz scummvm-rg350-189b629b338cb0658507776a71e9a37376ad15bb.tar.bz2 scummvm-rg350-189b629b338cb0658507776a71e9a37376ad15bb.zip |
MADS: Synchronize the remaining local scene variables for Rex scene group 4
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/nebular_scenes4.cpp | 47 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes4.h | 6 |
2 files changed, 48 insertions, 5 deletions
diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp index 1bb53ed857..91c522cd25 100644 --- a/engines/mads/nebular/nebular_scenes4.cpp +++ b/engines/mads/nebular/nebular_scenes4.cpp @@ -2729,6 +2729,12 @@ void Scene406::actions() { _action._inProgress = false; } +void Scene406::synchronize(Common::Serializer &s) { + Scene4xx::synchronize(s); + + s.syncAsByte(_hitStorageDoor); +} + /*------------------------------------------------------------------------*/ void Scene407::setup() { @@ -2782,16 +2788,16 @@ void Scene407::preActions() { if (_game._player._needToWalk && _fromNorth) { if (_globals[kSexOfRex] == REX_MALE) - destPos = Common::Point(171, 95); + _destPos = Common::Point(171, 95); else - destPos = Common::Point(173, 96); + _destPos = Common::Point(173, 96); - _game._player.walk(destPos, FACING_SOUTH); + _game._player.walk(_destPos, FACING_SOUTH); } } void Scene407::actions() { - if ((_game._player._playerPos == destPos) && _fromNorth) { + if ((_game._player._playerPos == _destPos) && _fromNorth) { if (_globals[kSexOfRex] == REX_MALE) { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _game._player._stepEnabled = false; @@ -2837,6 +2843,14 @@ void Scene407::actions() { _action._inProgress = false; } +void Scene407::synchronize(Common::Serializer &s) { + Scene4xx::synchronize(s); + + s.syncAsByte(_fromNorth); + s.syncAsSint16LE(_destPos.x); + s.syncAsSint16LE(_destPos.y); +} + /*------------------------------------------------------------------------*/ void Scene408::setup() { @@ -3957,6 +3971,24 @@ void Scene411::actions() { _action._inProgress = false; } +void Scene411::synchronize(Common::Serializer &s) { + Scene4xx::synchronize(s); + + s.syncAsSint32LE(_curAnimationFrame); + s.syncAsSint32LE(_newIngredient); + s.syncAsSint32LE(_newQuantity); + s.syncAsSint32LE(_resetFrame); + s.syncAsSint32LE(_badThreshold); + + s.syncAsByte(_killRox); + s.syncAsByte(_makeMushroomCloud); + + _dialog1.synchronize(s); + _dialog2.synchronize(s); + _dialog3.synchronize(s); + _dialog4.synchronize(s); +} + /*------------------------------------------------------------------------*/ void Scene413::setup() { @@ -4102,6 +4134,13 @@ void Scene413::actions() { _action._inProgress = false; } +void Scene413::synchronize(Common::Serializer &s) { + Scene4xx::synchronize(s); + + s.syncAsSint32LE(_rexDeath); + s.syncAsSint32LE(_canMove); +} + /*------------------------------------------------------------------------*/ } // End of namespace Nebular diff --git a/engines/mads/nebular/nebular_scenes4.h b/engines/mads/nebular/nebular_scenes4.h index 1f7b56b5cd..f2e8961089 100644 --- a/engines/mads/nebular/nebular_scenes4.h +++ b/engines/mads/nebular/nebular_scenes4.h @@ -148,6 +148,7 @@ private: public: Scene406(MADSEngine *vm) : Scene4xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -160,10 +161,11 @@ public: class Scene407: public Scene4xx { private: bool _fromNorth; - Common::Point destPos; + Common::Point _destPos; public: Scene407(MADSEngine *vm) : Scene4xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -236,6 +238,7 @@ private: public: Scene411(MADSEngine *vm) : Scene4xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -252,6 +255,7 @@ private: public: Scene413(MADSEngine *vm) : Scene4xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); |