diff options
author | Strangerke | 2014-05-23 23:54:58 +0200 |
---|---|---|
committer | Strangerke | 2014-05-23 23:54:58 +0200 |
commit | 55e6e2bdb491edc33c41e219ee227dfd05c8460c (patch) | |
tree | 6a3f27c681986179b1225a93642892aecac9142a | |
parent | 2a73b6c08e98c07e63ef669487aad934da89feb7 (diff) | |
download | scummvm-rg350-55e6e2bdb491edc33c41e219ee227dfd05c8460c.tar.gz scummvm-rg350-55e6e2bdb491edc33c41e219ee227dfd05c8460c.tar.bz2 scummvm-rg350-55e6e2bdb491edc33c41e219ee227dfd05c8460c.zip |
MADS: Reorder some Synchronize functions for consistency across scene groups
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 8 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.h | 23 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 7 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.h | 21 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 24 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes3.h | 26 |
6 files changed, 62 insertions, 47 deletions
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index ff75f704f9..59432c1ac0 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -114,7 +114,6 @@ void Scene101::synchronize(Common::Serializer &s) { s.syncAsByte(_sittingFl); s.syncAsByte(_panelOpened); - s.syncAsSint16LE(_messageNum); s.syncAsSint16LE(_posY); s.syncAsSint16LE(_shieldSpriteIdx); @@ -1289,6 +1288,7 @@ Scene103::Scene103(MADSEngine *vm) : Scene1xx(vm) { void Scene103::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + byte dummy = 0; s.syncAsByte(dummy); // In order to avoid to break savegame compatibility s.syncAsUint32LE(_updateClock); @@ -1825,6 +1825,7 @@ Scene105::Scene105(MADSEngine *vm) : Scene1xx(vm) { void Scene105::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_explosionFl); } @@ -1986,6 +1987,7 @@ Scene106::Scene106(MADSEngine *vm) : Scene1xx(vm) { void Scene106::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_backToShipFl); s.syncAsByte(_shadowFl); s.syncAsByte(_firstEmergingFl); @@ -2205,6 +2207,7 @@ Scene107::Scene107(MADSEngine *vm) : Scene1xx(vm) { void Scene107::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_shootingFl); } @@ -2422,6 +2425,7 @@ Scene109::Scene109(MADSEngine *vm) : Scene1xx(vm) { void Scene109::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_rexThrowingObject); s.syncAsByte(_hoovicDifficultFl); s.syncAsByte(_beforeEatingRex); @@ -2827,6 +2831,7 @@ Scene110::Scene110(MADSEngine *vm) : Scene1xx(vm) { void Scene110::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_crabsFl); } @@ -2961,6 +2966,7 @@ Scene111::Scene111(MADSEngine *vm) : Scene1xx(vm) { void Scene111::synchronize(Common::Serializer &s) { Scene1xx::synchronize(s); + s.syncAsByte(_stampedFl); s.syncAsByte(_launch1Fl); s.syncAsByte(_launched2Fl); diff --git a/engines/mads/nebular/nebular_scenes1.h b/engines/mads/nebular/nebular_scenes1.h index 3cb4d431a8..9eb21349e4 100644 --- a/engines/mads/nebular/nebular_scenes1.h +++ b/engines/mads/nebular/nebular_scenes1.h @@ -65,15 +65,16 @@ private: int _oldSpecial; void sayDang(); + public: Scene101(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene102 : public Scene1xx { @@ -91,6 +92,7 @@ private: public: Scene102(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -98,21 +100,21 @@ public: virtual void preActions(); virtual void actions(); virtual void postActions(); - virtual void synchronize(Common::Serializer &s); }; class Scene103 : public Scene1xx { private: uint32 _updateClock; + public: Scene103(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); virtual void postActions(); - virtual void synchronize(Common::Serializer &s); }; class Scene104 : public Scene1xx { @@ -122,13 +124,13 @@ private: public: Scene104(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene105 : public Scene1xx { @@ -137,13 +139,13 @@ private: public: Scene105(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene106 : public Scene1xx { @@ -156,13 +158,13 @@ private: public: Scene106(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene107 : public Scene1xx { @@ -171,13 +173,13 @@ private: public: Scene107(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene108 : public Scene1xx { @@ -204,13 +206,13 @@ private: public: Scene109(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene110 : public Scene1xx { @@ -219,13 +221,13 @@ private: public: Scene110(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene111 : public Scene1xx { @@ -237,13 +239,13 @@ private: public: Scene111(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene112 : public Scene1xx { @@ -257,7 +259,6 @@ public: }; } // End of namespace Nebular - } // End of namespace MADS #endif /* MADS_NEBULAR_SCENES1_H */ diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 2c26e88fe9..adb174c8ca 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -123,6 +123,7 @@ Scene201::Scene201(MADSEngine *vm) : Scene2xx(vm) { void Scene201::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_pterodactylFlag); } @@ -351,6 +352,7 @@ Scene202::Scene202(MADSEngine *vm) : Scene2xx(vm) { void Scene202::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_activeMsgFl); s.syncAsByte(_ladderTopFl); s.syncAsByte(_waitingMeteoFl); @@ -1020,6 +1022,7 @@ Scene203::Scene203(MADSEngine *vm) : Scene2xx(vm) { void Scene203::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_rhotundaEat2Fl); s.syncAsByte(_rhotundaEatFl); } @@ -1652,6 +1655,7 @@ Scene208::Scene208(MADSEngine *vm) : Scene2xx(vm) { void Scene208::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_rhotundaTurnFl); s.syncAsByte(_boundingFl); s.syncAsSint32LE(_rhotundaTime); @@ -1971,6 +1975,7 @@ Scene209::Scene209(MADSEngine *vm) : Scene2xx(vm) { void Scene209::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_dodgeFl); s.syncAsByte(_forceDodgeFl); s.syncAsByte(_shouldDodgeFl); @@ -3607,6 +3612,7 @@ Scene210::Scene210(MADSEngine *vm) : Scene2xx(vm) { void Scene210::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsSint32LE(_curDialogNode); s.syncAsSint32LE(_nextHandsPlace); s.syncAsSint32LE(_twinkleAnimationType); @@ -4606,6 +4612,7 @@ Scene211::Scene211(MADSEngine *vm) : Scene2xx(vm) { void Scene211::synchronize(Common::Serializer &s) { Scene2xx::synchronize(s); + s.syncAsByte(_ambushFl); s.syncAsByte(_wakeFl); diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h index 750d45e808..e70444a256 100644 --- a/engines/mads/nebular/nebular_scenes2.h +++ b/engines/mads/nebular/nebular_scenes2.h @@ -55,12 +55,12 @@ private: public: Scene201(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene202: public Scene2xx { @@ -77,13 +77,13 @@ private: public: Scene202(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); void setRandomKernelMessage(); }; @@ -94,13 +94,13 @@ private: public: Scene203(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene205: public Scene2xx { @@ -114,12 +114,12 @@ private: public: Scene205(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene207: public Scene2xx { @@ -133,13 +133,13 @@ private: public: Scene207(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene208: public Scene2xx { @@ -152,13 +152,13 @@ private: public: Scene208(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene209: public Scene2xx { @@ -198,13 +198,13 @@ private: public: Scene209(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene210: public Scene2xx { @@ -234,15 +234,16 @@ private: void handleTwinklesSpeech(int quoteId, int shiftX, uint32 delay); void newNode(int node); void restoreDialogNode(int node, int msgId, int posY); + public: Scene210(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene211: public Scene2xx { @@ -253,13 +254,13 @@ private: public: Scene211(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene212: public Scene2xx { @@ -289,12 +290,12 @@ private: public: Scene214(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene215: public Scene2xx { diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 06c4eb6d4c..5d7ee40207 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -1193,6 +1193,12 @@ void Scene308::setup() { setAAName(); } +void Scene308::synchronize(Common::Serializer &s) { + Scene3xx::synchronize(s); + + _forceField.synchronize(s); +} + void Scene308::enter() { _globals._spriteIndexes[1] = _scene->_sprites.addSprites("*SC003x0"); _globals._spriteIndexes[0] = _scene->_sprites.addSprites("*SC003x1"); @@ -1309,12 +1315,6 @@ void Scene308::step() { } } -void Scene308::synchronize(Common::Serializer &s) { - Scene3xx::synchronize(s); - - _forceField.synchronize(s); -} - /*------------------------------------------------------------------------*/ Scene309::Scene309(MADSEngine *vm) : Scene3xx(vm) { @@ -1528,6 +1528,12 @@ void Scene310::setup() { setAAName(); } +void Scene310::synchronize(Common::Serializer &s) { + Scene3xx::synchronize(s); + + _forceField.synchronize(s); +} + void Scene310::enter() { _globals._spriteIndexes[1] = _scene->_sprites.addSprites("*SC003x0"); _globals._spriteIndexes[0] = _scene->_sprites.addSprites("*SC003x1"); @@ -1554,12 +1560,6 @@ void Scene310::step() { _scene->_nextSceneId = 309; } -void Scene310::synchronize(Common::Serializer &s) { - Scene3xx::synchronize(s); - - _forceField.synchronize(s); -} - /*------------------------------------------------------------------------*/ Scene311::Scene311(MADSEngine *vm) : Scene3xx(vm) { diff --git a/engines/mads/nebular/nebular_scenes3.h b/engines/mads/nebular/nebular_scenes3.h index 84c8fe7453..30ab333e53 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -95,11 +95,11 @@ private: public: Scene302(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); - virtual void synchronize(Common::Serializer &s); }; class Scene303: public Scene3xx { @@ -117,11 +117,11 @@ private: public: Scene304(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); - virtual void synchronize(Common::Serializer &s); }; class Scene307: public Scene3xx { @@ -154,12 +154,12 @@ private: public: Scene307(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene308: public Scene3xx { @@ -168,11 +168,11 @@ private: public: Scene308(MADSEngine *vm) : Scene3xx(vm) {} + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); - virtual void synchronize(Common::Serializer &s); }; class Scene309: public Scene3xx { @@ -184,11 +184,11 @@ private: public: Scene309(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); - virtual void synchronize(Common::Serializer &s); }; class Scene310: public Scene3xx { @@ -197,11 +197,11 @@ private: public: Scene310(MADSEngine *vm) : Scene3xx(vm) {} + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); - virtual void synchronize(Common::Serializer &s); }; class Scene311: public Scene3xx { @@ -210,12 +210,12 @@ private: public: Scene311(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene313: public Scene3xx { @@ -269,13 +269,13 @@ private: public: Scene318(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene319: public Scene3xx { @@ -298,12 +298,12 @@ private: void handleSlacheDialogs(int quoteId, int counter, uint32 timer); public: Scene319(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene320: public Scene300s { @@ -323,12 +323,12 @@ private: public: Scene320(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene321: public Scene3xx { @@ -377,12 +377,12 @@ private: public: Scene352(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene353: public Scene3xx { @@ -430,12 +430,12 @@ private: public: Scene359(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void preActions(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene360: public Scene3xx { @@ -498,12 +498,12 @@ private: public: Scene389(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); virtual void step(); virtual void actions(); - virtual void synchronize(Common::Serializer &s); }; class Scene390: public Scene300s { |