diff options
| -rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 39 | ||||
| -rw-r--r-- | engines/mads/nebular/nebular_scenes1.h | 9 | ||||
| -rw-r--r-- | engines/mads/scene_data.h | 11 | 
3 files changed, 53 insertions, 6 deletions
| diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index da2d358458..923d8c0cd0 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -598,6 +598,19 @@ void Scene101::actions() {  	}  } +void Scene101::synchronize(Common::Serializer &s) { +	Scene1xx::synchronize(s); + +	s.syncAsByte(_sittingFl); +	s.syncAsByte(_panelOpened); + +	s.syncAsSint16LE(_messageNum); +	s.syncAsSint16LE(_posY); +	s.syncAsSint16LE(_shieldSpriteIdx); +	s.syncAsSint16LE(_chairHotspotId); +	s.syncAsSint16LE(_oldSpecial); +} +  /*------------------------------------------------------------------------*/  void Scene102::setup() { @@ -1191,6 +1204,19 @@ void Scene102::postActions() {  	}  } +void Scene102::synchronize(Common::Serializer &s) { +	Scene1xx::synchronize(s); + +	s.syncAsByte(_fridgeOpenedFl); +	s.syncAsByte(_fridgeOpenedDescr); +	s.syncAsByte(_fridgeFirstOpenFl); +	s.syncAsByte(_chairDescrFl); +	s.syncAsByte(_drawerDescrFl); +	s.syncAsByte(_activeMsgFl); + +	s.syncAsSint16LE(_fridgeCommentCount); +} +  /*------------------------------------------------------------------------*/  void Scene103::setup() { @@ -1510,6 +1536,12 @@ void Scene103::postActions() {  	}  } +void Scene103::synchronize(Common::Serializer &s) { +	Scene1xx::synchronize(s); +	s.syncAsByte(_sayHiToBinky); +	s.syncAsUint32LE(_updateClock); +} +  /*------------------------------------------------------------------------*/  void Scene104::setup() { @@ -1704,6 +1736,13 @@ void Scene104::actions() {  	_action._inProgress = false;  } +void Scene104::synchronize(Common::Serializer &s) { +	Scene1xx::synchronize(s); + +	s.syncAsByte(_kargShootingFl); +	s.syncAsByte(_loseFl); +} +  /*------------------------------------------------------------------------*/  void Scene105::setup() { diff --git a/engines/mads/nebular/nebular_scenes1.h b/engines/mads/nebular/nebular_scenes1.h index d295c4d727..25a8b52ded 100644 --- a/engines/mads/nebular/nebular_scenes1.h +++ b/engines/mads/nebular/nebular_scenes1.h @@ -24,6 +24,7 @@  #define MADS_NEBULAR_SCENES1_H  #include "common/scummsys.h" +#include "common/serializer.h"  #include "mads/game.h"  #include "mads/scene.h"  #include "mads/nebular/nebular_scenes.h" @@ -73,7 +74,8 @@ public:  	virtual void step();  	virtual void preActions();  	virtual void actions(); -	virtual void postActions() {}; +	virtual void postActions(); +	virtual void synchronize(Common::Serializer &s);  };  class Scene102 : public Scene1xx { @@ -99,6 +101,7 @@ public:  	virtual void preActions();  	virtual void actions();  	virtual void postActions(); +	virtual void synchronize(Common::Serializer &s);  };  class Scene103 : public Scene1xx { @@ -111,9 +114,9 @@ public:  	virtual void setup();  	virtual void enter();  	virtual void step(); -	virtual void preActions() {};  	virtual void actions();  	virtual void postActions(); +	virtual void synchronize(Common::Serializer &s);  };  class Scene104 : public Scene1xx { @@ -129,7 +132,7 @@ public:  	virtual void step();  	virtual void preActions();  	virtual void actions(); -	virtual void postActions() {}; +	virtual void synchronize(Common::Serializer &s);  };  class Scene105 : public Scene1xx { diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h index 5b3d818b96..d59d746706 100644 --- a/engines/mads/scene_data.h +++ b/engines/mads/scene_data.h @@ -96,12 +96,12 @@ public:  	/**  	 * Called one per frame  	 */ -	virtual void step() = 0; +	virtual void step() {}  	/**  	 * Called before an action is started  	 */ -	virtual void preActions() = 0; +	virtual void preActions() {}  	/**  	 * Handles scene actions @@ -111,7 +111,12 @@ public:  	/**  	 * Post-action handling  	 */ -	virtual void postActions() = 0; +	virtual void postActions() {} + +	/** +	 * Synchronize any local data for the scene +	 */ +	virtual void synchronize(Common::Serializer &s) {}  };  struct ARTHeader { | 
