From 5dce31417cd257785b9bbc790a9686e64a4aff37 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 2 Mar 2016 19:21:31 -0500 Subject: TITANIC: More saveable classes implemented --- engines/titanic/core/saveable_object.cpp | 36 +++++++++++++-- engines/titanic/game/bilge_succubus.cpp | 51 ++++++++++++++++++++ engines/titanic/game/bilge_succubus.h | 57 +++++++++++++++++++++++ engines/titanic/game/nav_helmet.cpp | 39 ++++++++++++++++ engines/titanic/game/nav_helmet.h | 54 ++++++++++++++++++++++ engines/titanic/game/service_elevator_door.h | 2 +- engines/titanic/game/useless_lever.cpp | 37 +++++++++++++++ engines/titanic/game/useless_lever.h | 50 ++++++++++++++++++++ engines/titanic/game/wheel_spin_horn.cpp | 43 +++++++++++++++++ engines/titanic/game/wheel_spin_horn.h | 53 +++++++++++++++++++++ engines/titanic/gfx/toggle_button.cpp | 41 ++++++++++++++++ engines/titanic/gfx/toggle_button.h | 54 ++++++++++++++++++++++ engines/titanic/messages/messages.cpp | 47 ------------------- engines/titanic/messages/messages.h | 50 -------------------- engines/titanic/module.mk | 10 +++- 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/door_auto_sound_event.cpp | 47 +++++++++++++++++++ engines/titanic/sound/door_auto_sound_event.h | 59 ++++++++++++++++++++++++ 21 files changed, 814 insertions(+), 104 deletions(-) create mode 100644 engines/titanic/game/bilge_succubus.cpp create mode 100644 engines/titanic/game/bilge_succubus.h create mode 100644 engines/titanic/game/nav_helmet.cpp create mode 100644 engines/titanic/game/nav_helmet.h create mode 100644 engines/titanic/game/useless_lever.cpp create mode 100644 engines/titanic/game/useless_lever.h create mode 100644 engines/titanic/game/wheel_spin_horn.cpp create mode 100644 engines/titanic/game/wheel_spin_horn.h create mode 100644 engines/titanic/gfx/toggle_button.cpp create mode 100644 engines/titanic/gfx/toggle_button.h create mode 100644 engines/titanic/sound/auto_sound_event.cpp create mode 100644 engines/titanic/sound/auto_sound_event.h create mode 100644 engines/titanic/sound/bilge_auto_sound_event.cpp create mode 100644 engines/titanic/sound/bilge_auto_sound_event.h create mode 100644 engines/titanic/sound/door_auto_sound_event.cpp create mode 100644 engines/titanic/sound/door_auto_sound_event.h (limited to 'engines') diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index a29bde69cd..84f0887b57 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -85,6 +85,7 @@ #include "titanic/game/bar_menu.h" #include "titanic/game/bar_menu_button.h" #include "titanic/game/belbot_get_light.h" +#include "titanic/game/bilge_succubus.h" #include "titanic/game/bomb.h" #include "titanic/game/bottom_of_well_monitor.h" #include "titanic/game/bowl_unlocker.h" @@ -150,6 +151,8 @@ #include "titanic/game/music_room_phonograph.h" #include "titanic/game/music_room_stop_phonograph_button.h" #include "titanic/game/music_system_lock.h" +#include "titanic/game/nav_helmet.h" +#include "titanic/game/navigation_computer.h" #include "titanic/game/no_nut_bowl.h" #include "titanic/game/nose_holder.h" #include "titanic/game/null_port_hole.h" @@ -174,6 +177,7 @@ #include "titanic/game/service_elevator_window.h" #include "titanic/game/ship_setting.h" #include "titanic/game/ship_setting_button.h" +#include "titanic/game/show_cell_points.h" #include "titanic/game/speech_dispensor.h" #include "titanic/game/starling_puret.h" #include "titanic/game/start_action.h" @@ -186,9 +190,11 @@ #include "titanic/game/titania_still_control.h" #include "titanic/game/tow_parrot_nav.h" #include "titanic/game/up_lighter.h" +#include "titanic/game/useless_lever.h" #include "titanic/game/wheel_button.h" #include "titanic/game/wheel_hotspot.h" #include "titanic/game/wheel_spin.h" +#include "titanic/game/wheel_spin_horn.h" #include "titanic/game/parrot/parrot_lobby_controller.h" #include "titanic/game/parrot/parrot_lobby_link_updater.h" #include "titanic/game/parrot/parrot_lobby_object.h" @@ -285,6 +291,7 @@ #include "titanic/gfx/small_chev_right_on.h" #include "titanic/gfx/status_change_button.h" #include "titanic/gfx/st_button.h" +#include "titanic/gfx/toggle_button.h" #include "titanic/gfx/toggle_switch.h" #include "titanic/gfx/volume_control.h" #include "titanic/messages/messages.h" @@ -329,10 +336,13 @@ #include "titanic/sound/auto_music_player.h" #include "titanic/sound/auto_music_player_base.h" +#include "titanic/sound/auto_sound_event.h" #include "titanic/sound/auto_sound_player.h" #include "titanic/sound/auto_sound_player_adsr.h" #include "titanic/sound/background_sound_maker.h" +#include "titanic/sound/bilge_auto_sound_event.h" #include "titanic/sound/bird_song.h" +#include "titanic/sound/door_auto_sound_event.h" #include "titanic/sound/gondolier_song.h" #include "titanic/sound/enter_view_toggles_other_music.h" #include "titanic/sound/music_player.h" @@ -419,6 +429,7 @@ DEFFN(CBarBell); DEFFN(CBarMenu); DEFFN(CBarMenuButton); DEFFN(CBelbotGetLight); +DEFFN(CBilgeSuccUBus); DEFFN(CBomb); DEFFN(CBottomOfWellMonitor); DEFFN(CBowlUnlocker); @@ -483,6 +494,8 @@ DEFFN(CMusicConsoleButton); DEFFN(CMusicRoomPhonograph); DEFFN(CMusicRoomStopPhonographButton); DEFFN(CMusicSystemLock); +DEFFN(CNavHelmet); +DEFFN(CNavigationComputer); DEFFN(CNoNutBowl); DEFFN(CNoseHolder); DEFFN(CNullPortHole); @@ -507,6 +520,7 @@ DEFFN(CServiceElevatorDoor); DEFFN(CServiceElevatorWindow); DEFFN(CShipSetting); DEFFN(CShipSettingButton); +DEFFN(CShowCellpoints); DEFFN(CSpeechDispensor); DEFFN(CStarlingPuret); DEFFN(CStartAction); @@ -519,9 +533,11 @@ DEFFN(CThrowTVDownWell); DEFFN(CTitaniaStillControl); DEFFN(CTOWParrotNav); DEFFN(CUpLighter); +DEFFN(CUselessLever); DEFFN(CWheelButton); DEFFN(CWheelHotSpot); DEFFN(CWheelSpin); +DEFFN(CWheelSpinHorn); DEFFN(CParrotLobbyController); DEFFN(CParrotLobbyLinkUpdater); DEFFN(CParrotLobbyObject); @@ -621,6 +637,8 @@ DEFFN(CSmallChevRightOff); DEFFN(CSmallChevRightOn); DEFFN(CStatusChangeButton); DEFFN(CSTButton); +DEFFN(CToggleButton); +DEFFN(CToggleSwitch); DEFFN(CVolumeControl); DEFFN(CActMsg); @@ -629,7 +647,6 @@ DEFFN(CAddHeadPieceMsg); DEFFN(CAnimateMaitreDMsg); DEFFN(CArboretumGateMsg); DEFFN(CArmPickedUpFromTableMsg); -DEFFN(CAutoSoundEvent); DEFFN(CBodyInBilgeRoomMsg); DEFFN(CBowlStateChange); DEFFN(CCarryObjectArrivedMsg); @@ -649,7 +666,6 @@ DEFFN(CDisableMaitreDProdReceptor); DEFFN(CDismissBotMsg); DEFFN(CDoffNavHelmet); DEFFN(CDonNavHelmet); -DEFFN(CDoorAutoSoundEvent); DEFFN(CDoorbotNeededInElevatorMsg); DEFFN(CDoorbotNeededInHomeMsg); DEFFN(CDropobjectMsg); @@ -834,11 +850,14 @@ DEFFN(CSummonBots); DEFFN(CSuccUBus); DEFFN(CTitania); DEFFN(CAutoMusicPlayer); +DEFFN(CAutoSoundEvent); DEFFN(CAutoMusicPlayerBase); DEFFN(CAutoSoundPlayer); DEFFN(CAutoSoundPlayerADSR); DEFFN(CBackgroundSoundMaker); +DEFFN(CBilgeAutoSoundEvent); DEFFN(CBirdSong); +DEFFN(CDoorAutoSoundEvent); DEFFN(CEnterViewTogglesOtherMusic); DEFFN(CGondolierSong); DEFFN(CMusicPlayer); @@ -919,6 +938,7 @@ void CSaveableObject::initClassList() { ADDFN(CBarMenu); ADDFN(CBarMenuButton); ADDFN(CBelbotGetLight); + ADDFN(CBilgeSuccUBus); ADDFN(CBomb); ADDFN(CBottomOfWellMonitor); ADDFN(CBrainSlot); @@ -984,6 +1004,8 @@ void CSaveableObject::initClassList() { ADDFN(CMusicRoomPhonograph); ADDFN(CMusicRoomStopPhonographButton); ADDFN(CMusicSystemLock); + ADDFN(CNavHelmet); + ADDFN(CNavigationComputer); ADDFN(CNoNutBowl); ADDFN(CNoseHolder); ADDFN(CNullPortHole); @@ -1008,6 +1030,7 @@ void CSaveableObject::initClassList() { ADDFN(CServiceElevatorWindow); ADDFN(CShipSetting); ADDFN(CShipSettingButton); + ADDFN(CShowCellpoints); ADDFN(CSpeechDispensor); ADDFN(CStarlingPuret); ADDFN(CStartAction); @@ -1020,9 +1043,11 @@ void CSaveableObject::initClassList() { ADDFN(CTitaniaStillControl); ADDFN(CTOWParrotNav); ADDFN(CUpLighter); + ADDFN(CUselessLever); ADDFN(CWheelButton); ADDFN(CWheelHotSpot); ADDFN(CWheelSpin); + ADDFN(CWheelSpinHorn); ADDFN(CParrotLobbyController); ADDFN(CParrotLobbyLinkUpdater); ADDFN(CParrotLobbyObject); @@ -1122,6 +1147,8 @@ void CSaveableObject::initClassList() { ADDFN(CSmallChevRightOn); ADDFN(CStatusChangeButton); ADDFN(CSTButton); + ADDFN(CToggleButton); + ADDFN(CToggleSwitch); ADDFN(CVolumeControl); ADDFN(CActMsg); @@ -1130,7 +1157,6 @@ void CSaveableObject::initClassList() { ADDFN(CAnimateMaitreDMsg); ADDFN(CArboretumGateMsg); ADDFN(CArmPickedUpFromTableMsg); - ADDFN(CAutoSoundEvent); ADDFN(CBodyInBilgeRoomMsg); ADDFN(CBowlStateChange); ADDFN(CCarryObjectArrivedMsg); @@ -1150,7 +1176,6 @@ void CSaveableObject::initClassList() { ADDFN(CDismissBotMsg); ADDFN(CDoffNavHelmet); ADDFN(CDonNavHelmet); - ADDFN(CDoorAutoSoundEvent); ADDFN(CDoorbotNeededInElevatorMsg); ADDFN(CDoorbotNeededInHomeMsg); ADDFN(CDropobjectMsg); @@ -1336,11 +1361,14 @@ void CSaveableObject::initClassList() { ADDFN(CTitania); ADDFN(CAutoMusicPlayer); + ADDFN(CAutoSoundEvent); ADDFN(CAutoMusicPlayerBase); ADDFN(CAutoSoundPlayer); ADDFN(CAutoSoundPlayerADSR); ADDFN(CBackgroundSoundMaker); + ADDFN(CBilgeAutoSoundEvent); ADDFN(CBirdSong); + ADDFN(CDoorAutoSoundEvent); ADDFN(CGondolierSong); ADDFN(CEnterViewTogglesOtherMusic); ADDFN(CGondolierSong); diff --git a/engines/titanic/game/bilge_succubus.cpp b/engines/titanic/game/bilge_succubus.cpp new file mode 100644 index 0000000000..9c19d81020 --- /dev/null +++ b/engines/titanic/game/bilge_succubus.cpp @@ -0,0 +1,51 @@ +/* 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/game/bilge_succubus.h" + +namespace Titanic { + +CBilgeSuccUBus::CBilgeSuccUBus() : CSuccUBus(), _field1DC(0), + _field1E0(0), _field1E4(0), _field1E8(0) { +} + +void CBilgeSuccUBus::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field1DC, indent); + file->writeNumberLine(_field1E0, indent); + file->writeNumberLine(_field1E4, indent); + file->writeNumberLine(_field1E8, indent); + + CSuccUBus::save(file, indent); +} + +void CBilgeSuccUBus::load(SimpleFile *file) { + file->readNumber(); + _field1DC = file->readNumber(); + _field1E0 = file->readNumber(); + _field1E4 = file->readNumber(); + _field1E8 = file->readNumber(); + + CSuccUBus::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/bilge_succubus.h b/engines/titanic/game/bilge_succubus.h new file mode 100644 index 0000000000..795fe865c2 --- /dev/null +++ b/engines/titanic/game/bilge_succubus.h @@ -0,0 +1,57 @@ +/* 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_SUCCUBUS_H +#define TITANIC_BILGE_SUCCUBUS_H + +#include "titanic/npcs/succubus.h" + +namespace Titanic { + +class CBilgeSuccUBus : public CSuccUBus { +public: + int _field1DC; + int _field1E0; + int _field1E4; + int _field1E8; +public: + CBilgeSuccUBus(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBilgeSuccUBus"; } + + /** + * 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_SUCCUBUS_H */ diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp new file mode 100644 index 0000000000..c1dbb115f5 --- /dev/null +++ b/engines/titanic/game/nav_helmet.cpp @@ -0,0 +1,39 @@ +/* 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/game/nav_helmet.h" + +namespace Titanic { + +void CNavHelmet::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CGameObject::save(file, indent); +} + +void CNavHelmet::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/nav_helmet.h b/engines/titanic/game/nav_helmet.h new file mode 100644 index 0000000000..31eee9977a --- /dev/null +++ b/engines/titanic/game/nav_helmet.h @@ -0,0 +1,54 @@ +/* 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_NAV_HELMET_H +#define TITANIC_NAV_HELMET_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CNavHelmet : public CGameObject { +private: + int _value; +public: + CNavHelmet() : CGameObject(), _value(0) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CNavHelmet"; } + + /** + * 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_NAV_HELMET_H */ diff --git a/engines/titanic/game/service_elevator_door.h b/engines/titanic/game/service_elevator_door.h index 616601d196..52465d842d 100644 --- a/engines/titanic/game/service_elevator_door.h +++ b/engines/titanic/game/service_elevator_door.h @@ -23,7 +23,7 @@ #ifndef TITANIC_SERVICE_ELEVATOR_DOOR_H #define TITANIC_SERVICE_ELEVATOR_DOOR_H -#include "titanic/messages/messages.h" +#include "titanic/sound/door_auto_sound_event.h" namespace Titanic { diff --git a/engines/titanic/game/useless_lever.cpp b/engines/titanic/game/useless_lever.cpp new file mode 100644 index 0000000000..afc025b58f --- /dev/null +++ b/engines/titanic/game/useless_lever.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/game/useless_lever.h" + +namespace Titanic { + +void CUselessLever::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CToggleButton::save(file, indent); +} + +void CUselessLever::load(SimpleFile *file) { + file->readNumber(); + CToggleButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/useless_lever.h b/engines/titanic/game/useless_lever.h new file mode 100644 index 0000000000..444df0c69f --- /dev/null +++ b/engines/titanic/game/useless_lever.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_USELESS_LEVER_H +#define TITANIC_USELESS_LEVER_H + +#include "titanic/gfx/toggle_button.h" + +namespace Titanic { + +class CUselessLever : public CToggleButton { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CUselessLever"; } + + /** + * 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_UP_LIGHTER_H */ diff --git a/engines/titanic/game/wheel_spin_horn.cpp b/engines/titanic/game/wheel_spin_horn.cpp new file mode 100644 index 0000000000..3bc705dddb --- /dev/null +++ b/engines/titanic/game/wheel_spin_horn.cpp @@ -0,0 +1,43 @@ +/* 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/game/wheel_spin_horn.h" + +namespace Titanic { + +void CWheelSpinHorn::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string1, indent); + file->writeQuotedLine(_string2, indent); + + CWheelSpin::save(file, indent); +} + +void CWheelSpinHorn::load(SimpleFile *file) { + file->readNumber(); + _string1 = file->readString(); + _string2 = file->readString(); + + CWheelSpin::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/wheel_spin_horn.h b/engines/titanic/game/wheel_spin_horn.h new file mode 100644 index 0000000000..b96b20b6c4 --- /dev/null +++ b/engines/titanic/game/wheel_spin_horn.h @@ -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. + * + */ + +#ifndef TITANIC_WHEEL_SPIN_HORN_H +#define TITANIC_WHEEL_SPIN_HORN_H + +#include "titanic/game/wheel_spin.h" + +namespace Titanic { + +class CWheelSpinHorn : public CWheelSpin { +public: + CString _string1; + CString _string2; +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CWheelSpinHorn"; } + + /** + * 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_WHEEL_SPIN_HORN_H */ diff --git a/engines/titanic/gfx/toggle_button.cpp b/engines/titanic/gfx/toggle_button.cpp new file mode 100644 index 0000000000..8284d35aac --- /dev/null +++ b/engines/titanic/gfx/toggle_button.cpp @@ -0,0 +1,41 @@ +/* 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/gfx/toggle_button.h" + +namespace Titanic { + +void CToggleButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldE0, indent); + + CBackground::save(file, indent); +} + +void CToggleButton::load(SimpleFile *file) { + file->readNumber(); + _fieldE0 = file->readNumber(); + + CBackground::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/toggle_button.h b/engines/titanic/gfx/toggle_button.h new file mode 100644 index 0000000000..b5113d7f95 --- /dev/null +++ b/engines/titanic/gfx/toggle_button.h @@ -0,0 +1,54 @@ +/* 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_TOGGLE_BUTTON_H +#define TITANIC_TOGGLE_BUTTON_H + +#include "titanic/core/background.h" + +namespace Titanic { + +class CToggleButton : public CBackground { +private: + int _fieldE0; +public: + CToggleButton() : CBackground(), _fieldE0(1) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CToggleButton"; } + + /** + * 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_TOGGLE_BUTTON_H */ diff --git a/engines/titanic/messages/messages.cpp b/engines/titanic/messages/messages.cpp index f60ad12cd7..c2a6197d4a 100644 --- a/engines/titanic/messages/messages.cpp +++ b/engines/titanic/messages/messages.cpp @@ -37,51 +37,4 @@ void CMessage::load(SimpleFile *file) { CSaveableObject::load(file); } -/*------------------------------------------------------------------------*/ - -CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) { -} - -void CAutoSoundEvent::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - file->writeNumberLine(_fieldBC, indent); - file->writeNumberLine(_fieldC0, indent); - - CGameObject::save(file, indent); -} - -void CAutoSoundEvent::load(SimpleFile *file) { - file->readNumber(); - _fieldBC = file->readNumber(); - _fieldC0 = file->readNumber(); - - CGameObject::load(file); -} - -/*------------------------------------------------------------------------*/ - -CDoorAutoSoundEvent::CDoorAutoSoundEvent() : CAutoSoundEvent(), -_string1("z#44.wav"), _string2("z#43.wav"), _fieldDC(25), _fieldE0(25) { -} - -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/messages/messages.h b/engines/titanic/messages/messages.h index e9490a8cb5..6b6695d28c 100644 --- a/engines/titanic/messages/messages.h +++ b/engines/titanic/messages/messages.h @@ -48,56 +48,6 @@ public: virtual void load(SimpleFile *file); }; -class CAutoSoundEvent : public CGameObject { -protected: - int _fieldBC; - int _fieldC0; -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); -}; - - -class CDoorAutoSoundEvent : public CAutoSoundEvent { -protected: - CString _string1; - CString _string2; - int _fieldDC; - int _fieldE0; -public: - CDoorAutoSoundEvent(); - - /** - * 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); -}; - - class CEditControlMsg : public CMessage { private: int _field4; diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 86ddafddef..975d5aa08c 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -80,6 +80,7 @@ MODULE_OBJS := \ game/arb_background.o \ game/arboretum_gate.o \ game/auto_animate.o \ + game/bilge_succubus.o \ game/bomb.o \ game/bar_menu.o \ game/bar_menu_button.o \ @@ -159,6 +160,7 @@ MODULE_OBJS := \ game/music_room_stop_phonograph_button.o \ game/music_system_lock.o \ game/musical_instrument.o \ + game/nav_helmet.o \ game/navigation_computer.o \ game/no_nut_bowl.o \ game/nose_holder.o \ @@ -204,9 +206,11 @@ MODULE_OBJS := \ game/throw_tv_down_well.o \ game/titania_still_control.o \ game/up_lighter.o \ + game/useless_lever.o \ game/wheel_button.o \ game/wheel_hotspot.o \ game/wheel_spin.o \ + game/wheel_spin_horn.o \ game/parrot/parrot_lobby_controller.o \ game/parrot/parrot_lobby_link_updater.o \ game/parrot/parrot_lobby_object.o \ @@ -297,10 +301,9 @@ MODULE_OBJS := \ gfx/small_chev_right_on.o \ gfx/status_change_button.o \ gfx/st_button.o \ + gfx/toggle_button.o \ gfx/toggle_switch.o \ gfx/volume_control.o \ - messages/auto_sound_event.o \ - messages/door_auto_sound_event.o \ messages/messages.o \ moves/enter_bomb_room.o \ moves/enter_bridge.o \ @@ -341,10 +344,13 @@ MODULE_OBJS := \ npcs/true_talk_npc.o \ sound/auto_music_player.o \ sound/auto_music_player_base.o \ + sound/auto_sound_event.o \ sound/auto_sound_player.o \ sound/auto_sound_player_adsr.o \ sound/background_sound_maker.o \ + sound/bilge_auto_sound_event.o \ sound/bird_song.o \ + sound/door_auto_sound_event.o \ sound/enter_view_toggles_other_music.o \ sound/gondolier_song.o \ sound/music_player.o \ diff --git a/engines/titanic/sound/auto_sound_event.cpp b/engines/titanic/sound/auto_sound_event.cpp new file mode 100644 index 0000000000..673f35b210 --- /dev/null +++ b/engines/titanic/sound/auto_sound_event.cpp @@ -0,0 +1,46 @@ +/* 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 new file mode 100644 index 0000000000..cb5bfee788 --- /dev/null +++ b/engines/titanic/sound/auto_sound_event.h @@ -0,0 +1,55 @@ +/* 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 new file mode 100644 index 0000000000..2446a5df06 --- /dev/null +++ b/engines/titanic/sound/bilge_auto_sound_event.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/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 new file mode 100644 index 0000000000..96572839ae --- /dev/null +++ b/engines/titanic/sound/bilge_auto_sound_event.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_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/door_auto_sound_event.cpp b/engines/titanic/sound/door_auto_sound_event.cpp new file mode 100644 index 0000000000..f0e77fce91 --- /dev/null +++ b/engines/titanic/sound/door_auto_sound_event.cpp @@ -0,0 +1,47 @@ +/* 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 new file mode 100644 index 0000000000..017912dc36 --- /dev/null +++ b/engines/titanic/sound/door_auto_sound_event.h @@ -0,0 +1,59 @@ +/* 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 */ -- cgit v1.2.3