diff options
author | Paul Gilbert | 2016-03-02 22:05:25 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-03-02 22:05:25 -0500 |
commit | 3ae4e63c80cda635f941370e72536988bde67698 (patch) | |
tree | a63cb088bbb9109f7e3ad36cdf20112ebf60f99d /engines/titanic/sound | |
parent | 5dce31417cd257785b9bbc790a9686e64a4aff37 (diff) | |
download | scummvm-rg350-3ae4e63c80cda635f941370e72536988bde67698.tar.gz scummvm-rg350-3ae4e63c80cda635f941370e72536988bde67698.tar.bz2 scummvm-rg350-3ae4e63c80cda635f941370e72536988bde67698.zip |
TITANIC: Implemented more saveable classes
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r-- | engines/titanic/sound/auto_sound_event.cpp | 46 | ||||
-rw-r--r-- | engines/titanic/sound/dome_from_top_of_well.cpp (renamed from engines/titanic/sound/bilge_auto_sound_event.cpp) | 10 | ||||
-rw-r--r-- | engines/titanic/sound/dome_from_top_of_well.h (renamed from engines/titanic/sound/bilge_auto_sound_event.h) | 12 | ||||
-rw-r--r-- | engines/titanic/sound/door_auto_sound_event.h | 59 | ||||
-rw-r--r-- | engines/titanic/sound/season_noises.cpp (renamed from engines/titanic/sound/door_auto_sound_event.cpp) | 28 | ||||
-rw-r--r-- | engines/titanic/sound/season_noises.h (renamed from engines/titanic/sound/auto_sound_event.h) | 23 |
6 files changed, 41 insertions, 137 deletions
diff --git a/engines/titanic/sound/auto_sound_event.cpp b/engines/titanic/sound/auto_sound_event.cpp deleted file mode 100644 index 673f35b210..0000000000 --- a/engines/titanic/sound/auto_sound_event.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "titanic/sound/auto_sound_event.h" - -namespace Titanic { - -CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _value1(0), _value2(70) { -} - -void CAutoSoundEvent::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - file->writeNumberLine(_value1, indent); - file->writeNumberLine(_value2, indent); - - CGameObject::save(file, indent); -} - -void CAutoSoundEvent::load(SimpleFile *file) { - file->readNumber(); - _value1 = file->readNumber(); - _value2 = file->readNumber(); - - CGameObject::load(file); -} - -} // End of namespace Titanic diff --git a/engines/titanic/sound/bilge_auto_sound_event.cpp b/engines/titanic/sound/dome_from_top_of_well.cpp index 2446a5df06..6e31937af0 100644 --- a/engines/titanic/sound/bilge_auto_sound_event.cpp +++ b/engines/titanic/sound/dome_from_top_of_well.cpp @@ -20,18 +20,18 @@ * */ -#include "titanic/sound/bilge_auto_sound_event.h" +#include "titanic/sound/dome_from_top_of_well.h" namespace Titanic { -void CBilgeAutoSoundEvent::save(SimpleFile *file, int indent) const { +void CDomeFromTopOfWell::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); - CAutoSoundEvent::save(file, indent); + CViewAutoSoundPlayer::save(file, indent); } -void CBilgeAutoSoundEvent::load(SimpleFile *file) { +void CDomeFromTopOfWell::load(SimpleFile *file) { file->readNumber(); - CAutoSoundEvent::load(file); + CViewAutoSoundPlayer::load(file); } } // End of namespace Titanic diff --git a/engines/titanic/sound/bilge_auto_sound_event.h b/engines/titanic/sound/dome_from_top_of_well.h index 96572839ae..faea805b1a 100644 --- a/engines/titanic/sound/bilge_auto_sound_event.h +++ b/engines/titanic/sound/dome_from_top_of_well.h @@ -20,19 +20,19 @@ * */ -#ifndef TITANIC_BILGE_AUTO_SOUND_EVENT_H -#define TITANIC_BILGE_AUTO_SOUND_EVENT_H +#ifndef TITANIC_DOME_FROM_TOP_OF_WELL_H +#define TITANIC_DOME_FROM_TOP_OF_WELL_H -#include "titanic/sound/auto_sound_event.h" +#include "titanic/sound/view_auto_sound_player.h" namespace Titanic { -class CBilgeAutoSoundEvent : public CAutoSoundEvent { +class CDomeFromTopOfWell : public CViewAutoSoundPlayer { public: /** * Return the class name */ - virtual const char *getClassName() const { return "CBilgeAutoSoundEvent"; } + virtual const char *getClassName() const { return "CDomeFromTopOfWell"; } /** * Save the data for the class to file @@ -47,4 +47,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_BILGE_AUTO_SOUND_EVENT_H */ +#endif /* TITANIC_DOME_FROM_TOP_OF_WELL_H */ diff --git a/engines/titanic/sound/door_auto_sound_event.h b/engines/titanic/sound/door_auto_sound_event.h deleted file mode 100644 index 017912dc36..0000000000 --- a/engines/titanic/sound/door_auto_sound_event.h +++ /dev/null @@ -1,59 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef TITANIC_DOOR_AUTO_SOUND_EVENT_H -#define TITANIC_DOOR_AUTO_SOUND_EVENT_H - -#include "titanic/sound/auto_sound_event.h" - -namespace Titanic { - -class CDoorAutoSoundEvent : public CAutoSoundEvent { -public: - CString _string1; - CString _string2; - int _fieldDC; - int _fieldE0; -public: - CDoorAutoSoundEvent::CDoorAutoSoundEvent() : CAutoSoundEvent(), - _string1("z#44.wav"), _string2("z#43.wav"), _fieldDC(25), _fieldE0(25) { - } - - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CDoorAutoSoundEvent"; } - - /** - * Save the data for the class to file - */ - virtual void save(SimpleFile *file, int indent) const; - - /** - * Load the data for the class from file - */ - virtual void load(SimpleFile *file); -}; - -} // End of namespace Titanic - -#endif /* TITANIC_DOOR_AUTO_SOUND_EVENT_H */ diff --git a/engines/titanic/sound/door_auto_sound_event.cpp b/engines/titanic/sound/season_noises.cpp index f0e77fce91..beacdefffa 100644 --- a/engines/titanic/sound/door_auto_sound_event.cpp +++ b/engines/titanic/sound/season_noises.cpp @@ -20,28 +20,34 @@ * */ -#include "titanic/sound/door_auto_sound_event.h" +#include "titanic/sound/season_noises.h" namespace Titanic { -void CDoorAutoSoundEvent::save(SimpleFile *file, int indent) const { +CSeasonNoises::CSeasonNoises() : CViewAutoSoundPlayer(), _fieldF0(0), + _string2("NULL"), _string3("NULL"), _string4("NULL"), _string5("NULL") { +} + +void CSeasonNoises::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); - file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldF0, indent); file->writeQuotedLine(_string2, indent); - file->writeNumberLine(_fieldDC, indent); - file->writeNumberLine(_fieldE0, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); - CAutoSoundEvent::save(file, indent); + CViewAutoSoundPlayer::save(file, indent); } -void CDoorAutoSoundEvent::load(SimpleFile *file) { +void CSeasonNoises::load(SimpleFile *file) { file->readNumber(); - _string1 = file->readString(); + _fieldF0 = file->readNumber(); _string2 = file->readString(); - _fieldDC = file->readNumber(); - _fieldE0 = file->readNumber(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); - CAutoSoundEvent::load(file); + CViewAutoSoundPlayer::load(file); } } // End of namespace Titanic diff --git a/engines/titanic/sound/auto_sound_event.h b/engines/titanic/sound/season_noises.h index cb5bfee788..def709c536 100644 --- a/engines/titanic/sound/auto_sound_event.h +++ b/engines/titanic/sound/season_noises.h @@ -20,24 +20,27 @@ * */ -#ifndef TITANIC_AUTO_SOUND_EVENT_H -#define TITANIC_AUTO_SOUND_EVENT_H +#ifndef TITANIC_SEASON_NOISES_H +#define TITANIC_SEASON_NOISES_H -#include "titanic/core/game_object.h" +#include "titanic/sound/view_auto_sound_player.h" namespace Titanic { -class CAutoSoundEvent : public CGameObject { +class CSeasonNoises : public CViewAutoSoundPlayer { +private: + int _fieldF0; + CString _string2; + CString _string3; + CString _string4; + CString _string5; public: - int _value1; - int _value2; -public: - CAutoSoundEvent(); + CSeasonNoises(); /** * Return the class name */ - virtual const char *getClassName() const { return "CAutoSoundEvent"; } + virtual const char *getClassName() const { return "CSeasonNoises"; } /** * Save the data for the class to file @@ -52,4 +55,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_AUTO_SOUND_EVENT_H */ +#endif /* TITANIC_SEASON_NOISES_H */ |