From 6f66459f4ab89aeb152d7b13b4289ab7ba8cfca4 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 21 May 2014 00:04:38 +0200 Subject: MADS: Add synchronize where useful in scene group 7 --- engines/mads/nebular/nebular_scenes7.cpp | 67 ++++++++++++++++++++++++++++++++ engines/mads/nebular/nebular_scenes7.h | 7 ++++ 2 files changed, 74 insertions(+) (limited to 'engines/mads/nebular') diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp index 541e22e99f..b7699392f1 100644 --- a/engines/mads/nebular/nebular_scenes7.cpp +++ b/engines/mads/nebular/nebular_scenes7.cpp @@ -99,6 +99,12 @@ void Scene701::setup() { _scene->addActiveVocab(VERB_WALKTO); } +void Scene701::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsSint16LE(_fishingLineId); +} + void Scene701::enter() { _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 0)); _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('b', 5)); @@ -549,6 +555,25 @@ void Scene703::setup() { setAAName(); } +void Scene703::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsSint16LE(_monsterMode); + s.syncAsSint16LE(_boatFrame); + s.syncAsSint16LE(_curSequence); + s.syncAsSint16LE(_boatDir); + + s.syncAsByte(_useBomb); + s.syncAsByte(_startMonsterTimer); + s.syncAsByte(_rexDeathFl); + s.syncAsByte(_restartTrigger70Fl); + + s.syncAsUint32LE(_lastFrameTime); + s.syncAsUint32LE(_monsterTime); + + _dialog1.synchronize(s); +} + void Scene703::handleBottleInterface() { switch (_globals[kBottleStatus]) { case 0: @@ -1077,6 +1102,19 @@ void Scene704::setup() { _scene->addActiveVocab(VERB_LOOK_AT); } +void Scene704::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsSint16LE(_bottleHotspotId); + s.syncAsSint16LE(_boatCurrentFrame); + s.syncAsSint16LE(_animationMode); + s.syncAsSint16LE(_boatDirection); + + s.syncAsByte(_takeBottleFl); + + _dialog1.synchronize(s); +} + void Scene704::handleBottleInterface() { switch (_globals[kBottleStatus]) { case 0: @@ -1414,6 +1452,12 @@ void Scene705::setup() { setAAName(); } +void Scene705::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + _dialog1.synchronize(s); +} + void Scene705::handleBottleInterface() { switch (_globals[kBottleStatus]) { case 0: @@ -1681,6 +1725,17 @@ void Scene706::setup() { _scene->addActiveVocab(VERB_WALKTO); } +void Scene706::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsSint16LE(_vaseHotspotId); + s.syncAsSint16LE(_vaseMode); + s.syncAsSint16LE(_animationMode); + s.syncAsSint16LE(_animationFrame); + + s.syncAsByte(_emptyPedestral); +} + void Scene706::handleRexDeath() { switch (_game._trigger) { case 0: @@ -2089,6 +2144,12 @@ void Scene751::setup() { _scene->addActiveVocab(VERB_WALKTO); } +void Scene751::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsByte(_rexHandingLine); +} + void Scene751::enter() { _globals._spriteIndexes[1] = _scene->_sprites.addSprites("*RM701X0"); _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('a', 0)); @@ -2417,6 +2478,12 @@ void Scene752::setup() { _scene->addActiveVocab(NOUN_LASER_BEAM); } +void Scene752::synchronize(Common::Serializer &s) { + Scene7xx::synchronize(s); + + s.syncAsByte(_cardId); +} + void Scene752::enter() { _globals._spriteIndexes[14] = _scene->_sprites.addSprites(formAnimName('l', -1)); _globals._spriteIndexes[12] = _scene->_sprites.addSprites("*RXMBD_8"); diff --git a/engines/mads/nebular/nebular_scenes7.h b/engines/mads/nebular/nebular_scenes7.h index 0223fe2447..150c598b9b 100644 --- a/engines/mads/nebular/nebular_scenes7.h +++ b/engines/mads/nebular/nebular_scenes7.h @@ -56,6 +56,7 @@ private: public: Scene701(MADSEngine *vm) : Scene7xx(vm), _fishingLineId(-1) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -97,6 +98,7 @@ private: public: Scene703(MADSEngine *vm) : Scene7xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -121,6 +123,7 @@ private: public: Scene704(MADSEngine *vm) : Scene7xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -138,6 +141,7 @@ private: public: Scene705(MADSEngine *vm) : Scene7xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -159,6 +163,7 @@ private: public: Scene706(MADSEngine *vm) : Scene7xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -203,6 +208,7 @@ private: public: Scene751(MADSEngine *vm) : Scene7xx(vm) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); @@ -217,6 +223,7 @@ private: public: Scene752(MADSEngine *vm) : Scene7xx(vm), _cardId(-1) {} + void synchronize(Common::Serializer &s); virtual void setup(); virtual void enter(); -- cgit v1.2.3