From 3ae4e63c80cda635f941370e72536988bde67698 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 2 Mar 2016 22:05:25 -0500 Subject: TITANIC: Implemented more saveable classes --- engines/titanic/sound/auto_sound_event.cpp | 46 ------------------ engines/titanic/sound/auto_sound_event.h | 55 ---------------------- engines/titanic/sound/bilge_auto_sound_event.cpp | 37 --------------- engines/titanic/sound/bilge_auto_sound_event.h | 50 -------------------- engines/titanic/sound/dome_from_top_of_well.cpp | 37 +++++++++++++++ engines/titanic/sound/dome_from_top_of_well.h | 50 ++++++++++++++++++++ engines/titanic/sound/door_auto_sound_event.cpp | 47 ------------------- engines/titanic/sound/door_auto_sound_event.h | 59 ------------------------ engines/titanic/sound/season_noises.cpp | 53 +++++++++++++++++++++ engines/titanic/sound/season_noises.h | 58 +++++++++++++++++++++++ 10 files changed, 198 insertions(+), 294 deletions(-) delete mode 100644 engines/titanic/sound/auto_sound_event.cpp delete mode 100644 engines/titanic/sound/auto_sound_event.h delete mode 100644 engines/titanic/sound/bilge_auto_sound_event.cpp delete mode 100644 engines/titanic/sound/bilge_auto_sound_event.h create mode 100644 engines/titanic/sound/dome_from_top_of_well.cpp create mode 100644 engines/titanic/sound/dome_from_top_of_well.h delete mode 100644 engines/titanic/sound/door_auto_sound_event.cpp delete mode 100644 engines/titanic/sound/door_auto_sound_event.h create mode 100644 engines/titanic/sound/season_noises.cpp create mode 100644 engines/titanic/sound/season_noises.h (limited to 'engines/titanic/sound') 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/auto_sound_event.h b/engines/titanic/sound/auto_sound_event.h deleted file mode 100644 index cb5bfee788..0000000000 --- a/engines/titanic/sound/auto_sound_event.h +++ /dev/null @@ -1,55 +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_AUTO_SOUND_EVENT_H -#define TITANIC_AUTO_SOUND_EVENT_H - -#include "titanic/core/game_object.h" - -namespace Titanic { - -class CAutoSoundEvent : public CGameObject { -public: - int _value1; - int _value2; -public: - CAutoSoundEvent(); - - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CAutoSoundEvent"; } - - /** - * 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_AUTO_SOUND_EVENT_H */ diff --git a/engines/titanic/sound/bilge_auto_sound_event.cpp b/engines/titanic/sound/bilge_auto_sound_event.cpp deleted file mode 100644 index 2446a5df06..0000000000 --- a/engines/titanic/sound/bilge_auto_sound_event.cpp +++ /dev/null @@ -1,37 +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/bilge_auto_sound_event.h" - -namespace Titanic { - -void CBilgeAutoSoundEvent::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - CAutoSoundEvent::save(file, indent); -} - -void CBilgeAutoSoundEvent::load(SimpleFile *file) { - file->readNumber(); - CAutoSoundEvent::load(file); -} - -} // End of namespace Titanic diff --git a/engines/titanic/sound/bilge_auto_sound_event.h b/engines/titanic/sound/bilge_auto_sound_event.h deleted file mode 100644 index 96572839ae..0000000000 --- a/engines/titanic/sound/bilge_auto_sound_event.h +++ /dev/null @@ -1,50 +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_BILGE_AUTO_SOUND_EVENT_H -#define TITANIC_BILGE_AUTO_SOUND_EVENT_H - -#include "titanic/sound/auto_sound_event.h" - -namespace Titanic { - -class CBilgeAutoSoundEvent : public CAutoSoundEvent { -public: - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CBilgeAutoSoundEvent"; } - - /** - * 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_BILGE_AUTO_SOUND_EVENT_H */ diff --git a/engines/titanic/sound/dome_from_top_of_well.cpp b/engines/titanic/sound/dome_from_top_of_well.cpp new file mode 100644 index 0000000000..6e31937af0 --- /dev/null +++ b/engines/titanic/sound/dome_from_top_of_well.cpp @@ -0,0 +1,37 @@ +/* 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/dome_from_top_of_well.h" + +namespace Titanic { + +void CDomeFromTopOfWell::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CViewAutoSoundPlayer::save(file, indent); +} + +void CDomeFromTopOfWell::load(SimpleFile *file) { + file->readNumber(); + CViewAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/dome_from_top_of_well.h b/engines/titanic/sound/dome_from_top_of_well.h new file mode 100644 index 0000000000..faea805b1a --- /dev/null +++ b/engines/titanic/sound/dome_from_top_of_well.h @@ -0,0 +1,50 @@ +/* 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_DOME_FROM_TOP_OF_WELL_H +#define TITANIC_DOME_FROM_TOP_OF_WELL_H + +#include "titanic/sound/view_auto_sound_player.h" + +namespace Titanic { + +class CDomeFromTopOfWell : public CViewAutoSoundPlayer { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CDomeFromTopOfWell"; } + + /** + * 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_DOME_FROM_TOP_OF_WELL_H */ diff --git a/engines/titanic/sound/door_auto_sound_event.cpp b/engines/titanic/sound/door_auto_sound_event.cpp deleted file mode 100644 index f0e77fce91..0000000000 --- a/engines/titanic/sound/door_auto_sound_event.cpp +++ /dev/null @@ -1,47 +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/door_auto_sound_event.h" - -namespace Titanic { - -void CDoorAutoSoundEvent::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - file->writeQuotedLine(_string1, indent); - file->writeQuotedLine(_string2, indent); - file->writeNumberLine(_fieldDC, indent); - file->writeNumberLine(_fieldE0, indent); - - CAutoSoundEvent::save(file, indent); -} - -void CDoorAutoSoundEvent::load(SimpleFile *file) { - file->readNumber(); - _string1 = file->readString(); - _string2 = file->readString(); - _fieldDC = file->readNumber(); - _fieldE0 = file->readNumber(); - - CAutoSoundEvent::load(file); -} - -} // End of namespace Titanic 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/season_noises.cpp b/engines/titanic/sound/season_noises.cpp new file mode 100644 index 0000000000..beacdefffa --- /dev/null +++ b/engines/titanic/sound/season_noises.cpp @@ -0,0 +1,53 @@ +/* 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/season_noises.h" + +namespace Titanic { + +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->writeNumberLine(_fieldF0, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + + CViewAutoSoundPlayer::save(file, indent); +} + +void CSeasonNoises::load(SimpleFile *file) { + file->readNumber(); + _fieldF0 = file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); + + CViewAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/season_noises.h b/engines/titanic/sound/season_noises.h new file mode 100644 index 0000000000..def709c536 --- /dev/null +++ b/engines/titanic/sound/season_noises.h @@ -0,0 +1,58 @@ +/* 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_SEASON_NOISES_H +#define TITANIC_SEASON_NOISES_H + +#include "titanic/sound/view_auto_sound_player.h" + +namespace Titanic { + +class CSeasonNoises : public CViewAutoSoundPlayer { +private: + int _fieldF0; + CString _string2; + CString _string3; + CString _string4; + CString _string5; +public: + CSeasonNoises(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSeasonNoises"; } + + /** + * 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_SEASON_NOISES_H */ -- cgit v1.2.3