diff options
| author | Strangerke | 2014-05-22 18:08:56 +0200 | 
|---|---|---|
| committer | Strangerke | 2014-05-22 18:08:56 +0200 | 
| commit | 904796f3a5dfb965995082614d69542452387bbc (patch) | |
| tree | 9c43814cc772b34e49ab64ef884b241d6d8b08ce | |
| parent | e8cbe9e7dea0a9ccf4982c8c6b045f2cd6c8a92c (diff) | |
| download | scummvm-rg350-904796f3a5dfb965995082614d69542452387bbc.tar.gz scummvm-rg350-904796f3a5dfb965995082614d69542452387bbc.tar.bz2 scummvm-rg350-904796f3a5dfb965995082614d69542452387bbc.zip  | |
MADS: Move contructors out of the header in scene group 3
| -rw-r--r-- | engines/mads/nebular/nebular_scenes3.cpp | 346 | ||||
| -rw-r--r-- | engines/mads/nebular/nebular_scenes3.h | 22 | 
2 files changed, 237 insertions, 131 deletions
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 5391b5f93d..06c4eb6d4c 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -266,6 +266,16 @@ void Scene301::step() {  /*------------------------------------------------------------------------*/ +Scene302::Scene302(MADSEngine *vm) : Scene3xx(vm) { +	_oldFrame = 0; +} + +void Scene302::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsSint32LE(_oldFrame); +} +  void Scene302::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -302,11 +312,6 @@ void Scene302::step() {  	}  } -void Scene302::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); -	s.syncAsSint32LE(_oldFrame); -} -  /*------------------------------------------------------------------------*/  void Scene303::setup() { @@ -336,6 +341,16 @@ void Scene303::step() {  /*------------------------------------------------------------------------*/ +Scene304::Scene304(MADSEngine *vm) : Scene3xx(vm) { +	_explosionSpriteId = -1; +} + +void Scene304::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsSint32LE(_explosionSpriteId); +} +  void Scene304::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -460,12 +475,45 @@ void Scene304::step() {  	}  } -void Scene304::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); -	s.syncAsSint32LE(_explosionSpriteId); +/*------------------------------------------------------------------------*/ + +Scene307::Scene307(MADSEngine *vm) : Scene3xx(vm) { +	_afterPeeingFl = false; +	_duringPeeingFl = false; +	_grateOpenedFl = false; +	_activePrisonerFl = false; + +	_animationMode = -1; +	_prisonerMessageId = -1; +	_fieldCollisionCounter = -1; + +	_lastFrameTime = 0; +	_guardTime = 0; +	_prisonerTimer = 0; + +	_subQuote2 = "";  } -/*------------------------------------------------------------------------*/ +void Scene307::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	_forceField.synchronize(s); + +	s.syncAsByte(_afterPeeingFl); +	s.syncAsByte(_duringPeeingFl); +	s.syncAsByte(_grateOpenedFl); +	s.syncAsByte(_activePrisonerFl); + +	s.syncAsSint32LE(_animationMode); +	s.syncAsSint32LE(_prisonerMessageId); +	s.syncAsSint32LE(_fieldCollisionCounter); + +	s.syncAsUint32LE(_lastFrameTime); +	s.syncAsUint32LE(_guardTime); +	s.syncAsUint32LE(_prisonerTimer); + +	s.syncString(_subQuote2); +}  void Scene307::setup() {  	setPlayerSpritesPrefix(); @@ -1138,27 +1186,6 @@ void Scene307::actions() {  	_action._inProgress = false;  } -void Scene307::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	_forceField.synchronize(s); - -	s.syncAsByte(_afterPeeingFl); -	s.syncAsByte(_duringPeeingFl); -	s.syncAsByte(_grateOpenedFl); -	s.syncAsByte(_activePrisonerFl); - -	s.syncAsSint32LE(_animationMode); -	s.syncAsSint32LE(_prisonerMessageId); -	s.syncAsSint32LE(_fieldCollisionCounter); - -	s.syncAsUint32LE(_lastFrameTime); -	s.syncAsUint32LE(_guardTime); -	s.syncAsUint32LE(_prisonerTimer); - -	s.syncString(_subQuote2); -} -  /*------------------------------------------------------------------------*/  void Scene308::setup() { @@ -1290,6 +1317,27 @@ void Scene308::synchronize(Common::Serializer &s) {  /*------------------------------------------------------------------------*/ +Scene309::Scene309(MADSEngine *vm) : Scene3xx(vm) { +	for (int i = 0; i < 3; i++) { +		_characterSpriteIndexes[i] = -1; +		_messagesIndexes[i] = -1; +	} +	 +	_lastFrame = -1; +} + +void Scene309::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	_forceField.synchronize(s); + +	for (int i = 0; i < 3; ++i) +		s.syncAsSint32LE(_characterSpriteIndexes[i]); +	for (int i = 0; i < 3; ++i) +		s.syncAsSint32LE(_messagesIndexes[i]); +	s.syncAsSint32LE(_lastFrame); +} +  void Scene309::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -1473,18 +1521,6 @@ void Scene309::step() {  		_scene->_nextSceneId = 308;  } -void Scene309::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	_forceField.synchronize(s); - -	for (int i = 0; i < 3; ++i) -		s.syncAsSint32LE(_characterSpriteIndexes[i]); -	for (int i = 0; i < 3; ++i) -		s.syncAsSint32LE(_messagesIndexes[i]); -	s.syncAsSint32LE(_lastFrame); -} -  /*------------------------------------------------------------------------*/  void Scene310::setup() { @@ -1526,6 +1562,16 @@ void Scene310::synchronize(Common::Serializer &s) {  /*------------------------------------------------------------------------*/ +Scene311::Scene311(MADSEngine *vm) : Scene3xx(vm) { +	_checkGuardFl = false; +} + +void Scene311::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsByte(_checkGuardFl); +} +  void Scene311::setup() {  	if (_scene->_currentSceneId == 391)  		_globals[kSexOfRex] = REX_MALE; @@ -1813,12 +1859,6 @@ void Scene311::actions() {  	_action._inProgress = false;  } -void Scene311::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsByte(_checkGuardFl); -} -  /*------------------------------------------------------------------------*/  void Scene313::setup() { @@ -2350,6 +2390,46 @@ void Scene316::actions() {  /*------------------------------------------------------------------------*/ +Scene318::Scene318(MADSEngine *vm) : Scene3xx(vm) { +	_dropTimer = 0; + +	_lastFrame = -1; +	_animMode = -1; +	_internCounter = -1; +	_counter = -1; + +	_dialogFl = false; +	_internTalkingFl = false; +	_internWalkingFl = false; +	_internVisibleFl = false; +	_explosionFl = false; + +	_lastFrameCounter = 0; + +	_subQuote2 = ""; +} + +void Scene318::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsUint32LE(_dropTimer); + +	s.syncAsSint32LE(_lastFrame); +	s.syncAsSint32LE(_animMode); +	s.syncAsSint32LE(_internCounter); +	s.syncAsSint32LE(_counter); + +	s.syncAsByte(_dialogFl); +	s.syncAsByte(_internTalkingFl); +	s.syncAsByte(_internWalkingFl); +	s.syncAsByte(_internVisibleFl); +	s.syncAsByte(_explosionFl); + +	s.syncAsUint32LE(_lastFrameCounter); + +	s.syncString(_subQuote2); +} +  void Scene318::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -2932,29 +3012,42 @@ void Scene318::actions() {  	_action._inProgress = false;  } -void Scene318::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); +/*------------------------------------------------------------------------*/ -	s.syncAsUint32LE(_dropTimer); +Scene319::Scene319(MADSEngine *vm) : Scene3xx(vm) { +	_animMode = -1; +	_animFrame = -1; +	_nextAction1 = -1; +	_nextAction2 = -1; +	_slacheMode = -1; +	_slacheTopic = -1; +	_slachePosY = -1; -	s.syncAsSint32LE(_lastFrame); -	s.syncAsSint32LE(_animMode); -	s.syncAsSint32LE(_internCounter); -	s.syncAsSint32LE(_counter); +	_slacheTalkingFl = false; +	_slacheReady = false; +	_slacheInitFl = false; -	s.syncAsByte(_dialogFl); -	s.syncAsByte(_internTalkingFl); -	s.syncAsByte(_internWalkingFl); -	s.syncAsByte(_internVisibleFl); -	s.syncAsByte(_explosionFl); +	_subQuote2 = ""; +} -	s.syncAsUint32LE(_lastFrameCounter); +void Scene319::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsUint32LE(_animMode); +	s.syncAsUint32LE(_animFrame); +	s.syncAsUint32LE(_nextAction1); +	s.syncAsUint32LE(_nextAction2); +	s.syncAsUint32LE(_slacheMode); +	s.syncAsUint32LE(_slacheTopic); +	s.syncAsUint32LE(_slachePosY); + +	s.syncAsByte(_slacheTalkingFl); +	s.syncAsByte(_slacheReady); +	s.syncAsByte(_slacheInitFl);  	s.syncString(_subQuote2);  } -/*------------------------------------------------------------------------*/ -  void Scene319::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -3413,26 +3506,31 @@ void Scene319::actions() {  	_action._inProgress = false;  } -void Scene319::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsUint32LE(_animMode); -	s.syncAsUint32LE(_animFrame); -	s.syncAsUint32LE(_nextAction1); -	s.syncAsUint32LE(_nextAction2); -	s.syncAsUint32LE(_slacheMode); -	s.syncAsUint32LE(_slacheTopic); -	s.syncAsUint32LE(_slachePosY); +/*------------------------------------------------------------------------*/ -	s.syncAsByte(_slacheTalkingFl); -	s.syncAsByte(_slacheReady); -	s.syncAsByte(_slacheInitFl); +Scene320::Scene320(MADSEngine *vm) : Scene300s(vm) { +	_blinkFl = false; +	_flippedFl = false; -	s.syncString(_subQuote2); +	_buttonId = -1; +	_lastFrame = -1; +	_leftItemId = -1; +	_posX = -1; +	_rightItemId = -1;  } +void Scene320::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); -/*------------------------------------------------------------------------*/ +	s.syncAsByte(_blinkFl); +	s.syncAsByte(_flippedFl); + +	s.syncAsSint32LE(_buttonId); +	s.syncAsSint32LE(_lastFrame); +	s.syncAsSint32LE(_leftItemId); +	s.syncAsSint32LE(_posX); +	s.syncAsSint32LE(_rightItemId); +}  void Scene320::setup() {  	setPlayerSpritesPrefix(); @@ -3740,19 +3838,6 @@ void Scene320::actions() {  	_action._inProgress = false;  } -void Scene320::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsByte(_blinkFl); -	s.syncAsByte(_flippedFl); - -	s.syncAsSint32LE(_buttonId); -	s.syncAsSint32LE(_lastFrame); -	s.syncAsSint32LE(_leftItemId); -	s.syncAsSint32LE(_posX); -	s.syncAsSint32LE(_rightItemId); -} -  /*------------------------------------------------------------------------*/  void Scene321::setup() { @@ -4014,6 +4099,34 @@ void Scene351::actions() {  /*------------------------------------------------------------------------*/ +Scene352::Scene352(MADSEngine *vm) : Scene3xx(vm) { +	_vaultOpenFl = false; +	_mustPutArmDownFl = false; +	_leaveRoomFl = false; + +	_tapePlayerHotspotIdx = -1; +	_hotspot1Idx = -1; +	_hotspot2Idx = -1; +	_lampHostpotIdx = -1; +	_commonSequenceIdx = -1; +	_commonSpriteIndex = -1; +} + +void Scene352::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsByte(_vaultOpenFl); +	s.syncAsByte(_mustPutArmDownFl); +	s.syncAsByte(_leaveRoomFl); + +	s.syncAsSint32LE(_tapePlayerHotspotIdx); +	s.syncAsSint32LE(_hotspot1Idx); +	s.syncAsSint32LE(_hotspot2Idx); +	s.syncAsSint32LE(_lampHostpotIdx); +	s.syncAsSint32LE(_commonSequenceIdx); +	s.syncAsSint32LE(_commonSpriteIndex); +} +  void Scene352::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -4551,21 +4664,6 @@ void Scene352::actions() {  		return;  } -void Scene352::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsByte(_vaultOpenFl); -	s.syncAsByte(_mustPutArmDownFl); -	s.syncAsByte(_leaveRoomFl); - -	s.syncAsSint32LE(_tapePlayerHotspotIdx); -	s.syncAsSint32LE(_hotspot1Idx); -	s.syncAsSint32LE(_hotspot2Idx); -	s.syncAsSint32LE(_lampHostpotIdx); -	s.syncAsSint32LE(_commonSequenceIdx); -	s.syncAsSint32LE(_commonSpriteIndex); -} -  /*------------------------------------------------------------------------*/  void Scene353::setup() { @@ -4803,6 +4901,16 @@ void Scene358::actions() {  /*------------------------------------------------------------------------*/ +Scene359::Scene359(MADSEngine *vm) : Scene3xx(vm) { +	_cardHotspotId = -1; +} + +void Scene359::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsSint32LE(_cardHotspotId); +} +  void Scene359::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -4938,13 +5046,6 @@ void Scene359::actions() {  	_action._inProgress = false;  } -void Scene359::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsSint32LE(_cardHotspotId); -} - -  /*------------------------------------------------------------------------*/  void Scene360::setup() { @@ -5509,6 +5610,18 @@ void Scene388::actions() {  /*------------------------------------------------------------------------*/ +Scene389::Scene389(MADSEngine *vm) : Scene300s(vm) { +	_monsterTime = 0; +	_circularQuoteId = -1; +} + +void Scene389::synchronize(Common::Serializer &s) { +	Scene3xx::synchronize(s); + +	s.syncAsUint32LE(_monsterTime); +	s.syncAsSint32LE(_circularQuoteId); +} +  void Scene389::setup() {  	setPlayerSpritesPrefix();  	setAAName(); @@ -5586,13 +5699,6 @@ void Scene389::actions() {  	_action._inProgress = false;  } -void Scene389::synchronize(Common::Serializer &s) { -	Scene3xx::synchronize(s); - -	s.syncAsUint32LE(_monsterTime); -	s.syncAsSint32LE(_circularQuoteId); -} -  /*------------------------------------------------------------------------*/  void Scene390::setup() { diff --git a/engines/mads/nebular/nebular_scenes3.h b/engines/mads/nebular/nebular_scenes3.h index b42238ddb4..84c8fe7453 100644 --- a/engines/mads/nebular/nebular_scenes3.h +++ b/engines/mads/nebular/nebular_scenes3.h @@ -94,7 +94,7 @@ private:  	int _oldFrame;  public: -	Scene302(MADSEngine *vm) : Scene3xx(vm), _oldFrame(0) {} +	Scene302(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -116,7 +116,7 @@ private:  	int _explosionSpriteId;  public: -	Scene304(MADSEngine *vm) : Scene3xx(vm), _explosionSpriteId(-1) {} +	Scene304(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -153,7 +153,7 @@ private:  	void handlePrisonerSpeech(int firstQuoteId, int number, long timeout);  public: -	Scene307(MADSEngine *vm) : Scene3xx(vm) {} +	Scene307(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -183,7 +183,7 @@ private:  	int _lastFrame;  public: -	Scene309(MADSEngine *vm) : Scene3xx(vm) {} +	Scene309(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -209,7 +209,7 @@ private:  	bool _checkGuardFl;  public: -	Scene311(MADSEngine *vm) : Scene3xx(vm) {} +	Scene311(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -268,7 +268,7 @@ private:  	void handleInternDialog(int quoteId, int quoteNum, uint32 timeout);  public: -	Scene318(MADSEngine *vm) : Scene3xx(vm) {} +	Scene318(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -297,7 +297,7 @@ private:  	void handleRexDialogues(int quote);  	void handleSlacheDialogs(int quoteId, int counter, uint32 timer);  public: -	Scene319(MADSEngine *vm) : Scene3xx(vm) {} +	Scene319(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -322,7 +322,7 @@ private:  	int _rightItemId;  public: -	Scene320(MADSEngine *vm) : Scene300s(vm) {} +	Scene320(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -376,7 +376,7 @@ private:  	void putArmDown(bool corridorExit, bool doorwayExit);  public: -	Scene352(MADSEngine *vm) : Scene3xx(vm) {} +	Scene352(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -429,7 +429,7 @@ private:  	int _cardHotspotId;  public: -	Scene359(MADSEngine *vm) : Scene3xx(vm) {} +	Scene359(MADSEngine *vm);  	virtual void setup();  	virtual void enter(); @@ -497,7 +497,7 @@ private:  	int _circularQuoteId;  public: -	Scene389(MADSEngine *vm) : Scene300s(vm) {} +	Scene389(MADSEngine *vm);  	virtual void setup();  	virtual void enter();  | 
