diff options
author | Paul Gilbert | 2016-03-01 20:41:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-03-01 20:41:07 -0500 |
commit | 9ce8e1130cc32c49e31a2160b2f4034f05430b4b (patch) | |
tree | ed1c25ade35c6e5449b80918c9377bf55b113199 | |
parent | 32d84ed33d88e42bc521b3736b35bacdfa5c13e7 (diff) | |
download | scummvm-rg350-9ce8e1130cc32c49e31a2160b2f4034f05430b4b.tar.gz scummvm-rg350-9ce8e1130cc32c49e31a2160b2f4034f05430b4b.tar.bz2 scummvm-rg350-9ce8e1130cc32c49e31a2160b2f4034f05430b4b.zip |
TITANIC: Lots more miscellaneous classes
39 files changed, 628 insertions, 48 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 8328aa5e49..08a3668053 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -72,6 +72,7 @@ #include "titanic/core/static_image.h" #include "titanic/core/turn_on_object.h" #include "titanic/core/turn_on_play_sound.h" +#include "titanic/core/turn_on_turn_off.h" #include "titanic/core/tree_item.h" #include "titanic/core/view_item.h" @@ -107,8 +108,11 @@ #include "titanic/game/eject_phonograph_button.h" #include "titanic/game/emma_control.h" #include "titanic/game/empty_nut_bowl.h" -#include "titanic/game/enter_exit_first_class_state.h" -#include "titanic/game/enter_exit_view.h" +#include "titanic/game/end_credit_text.h" +#include "titanic/game/end_credits.h" +#include "titanic/game/end_explode_ship.h" +#include "titanic/game/end_game_credits.h" +#include "titanic/game/end_sequence_control.h" #include "titanic/game/fan.h" #include "titanic/game/fan_control.h" #include "titanic/game/fan_decrease.h" @@ -116,6 +120,7 @@ #include "titanic/game/fan_noises.h" #include "titanic/game/floor_indicator.h" #include "titanic/game/games_console.h" +#include "titanic/game/get_lift_eye2.h" #include "titanic/game/hammer_clip.h" #include "titanic/game/hammer_dispensor.h" #include "titanic/game/hammer_dispensor_button.h" @@ -185,7 +190,6 @@ #include "titanic/game/pet/pet_sounds.h" #include "titanic/game/pet/pet_transition.h" #include "titanic/game/pet/pet_transport.h" -#include "titanic/game/sgt/enter_exit_mini_lift.h" #include "titanic/game/sgt/sgt_doors.h" #include "titanic/game/sgt/sgt_navigation.h" #include "titanic/game/sgt/sgt_restaurant_doors.h" @@ -241,8 +245,13 @@ #include "titanic/messages/pet_messages.h" #include "titanic/moves/enter_bomb_room.h" +#include "titanic/moves/enter_bridge.h" +#include "titanic/moves/enter_exit_first_class_state.h" +#include "titanic/moves/enter_exit_mini_lift.h" +#include "titanic/moves/enter_exit_view.h" #include "titanic/moves/exit_arboretum.h" #include "titanic/moves/exit_bridge.h" +#include "titanic/moves/exit_lift.h" #include "titanic/moves/exit_state_room.h" #include "titanic/moves/move_player_in_parrot_room.h" #include "titanic/moves/move_player_to.h" @@ -271,11 +280,14 @@ #include "titanic/sound/auto_music_player_base.h" #include "titanic/sound/auto_sound_player.h" #include "titanic/sound/background_sound_maker.h" +#include "titanic/sound/bird_song.h" +#include "titanic/sound/gondolier_song.h" #include "titanic/sound/music_player.h" #include "titanic/sound/restricted_auto_music_player.h" #include "titanic/sound/seasonal_music_player.h" #include "titanic/sound/titania_speech.h" #include "titanic/sound/trigger_auto_music_player.h" +#include "titanic/sound/water_lapping_sounds.h" namespace Titanic { @@ -337,6 +349,7 @@ DEFFN(CProjectItem); DEFFN(CStaticImage); DEFFN(CTurnOnObject); DEFFN(CTurnOnPlaySound); +DEFFN(CTurnOnTurnOff); DEFFN(CTreeItem); DEFFN(CViewItem); @@ -370,8 +383,11 @@ DEFFN(CEarSweetBowl); DEFFN(CEjectPhonographButton); DEFFN(CEmmaControl); DEFFN(CEmptyNutBowl); -DEFFN(CEnterExitFirstClassState); -DEFFN(CEnterExitView); +DEFFN(CEndCreditText); +DEFFN(CEndCredits); +DEFFN(CEndExplodeShip); +DEFFN(CEndGameCredits); +DEFFN(CEndSequenceControl); DEFFN(CFan); DEFFN(CFanControl); DEFFN(CFanDecrease); @@ -379,6 +395,7 @@ DEFFN(CFanIncrease); DEFFN(CFanNoises); DEFFN(CFloorIndicator); DEFFN(CGamesConsole); +DEFFN(CGetLiftEye2); DEFFN(CHammerClip); DEFFN(CHammerDispensor); DEFFN(CHammerDispensorButton); @@ -677,8 +694,12 @@ DEFFN(CVirtualKeyCharMsg); DEFFN(CVisibleMsg); DEFFN(CEnterBombRoom); +DEFFN(CEnterBridge); +DEFFN(CEnterExitFirstClassState); +DEFFN(CEnterExitView); DEFFN(CExitArboretum); DEFFN(CExitBridge); +DEFFN(CExitLift); DEFFN(CExitStateRoom); DEFFN(CMovePlayerInParrotRoom); DEFFN(CMovePlayerTo); @@ -706,11 +727,14 @@ DEFFN(CAutoMusicPlayer); DEFFN(CAutoMusicPlayerBase); DEFFN(CAutoSoundPlayer); DEFFN(CBackgroundSoundMaker); +DEFFN(CBirdSong); +DEFFN(CGondolierSong); DEFFN(CMusicPlayer); DEFFN(CRestrictedAutoMusicPlayer); DEFFN(CSeasonalMusicPlayer); DEFFN(CTitaniaSpeech); DEFFN(CTriggerAutoMusicPlayer); +DEFFN(CWaterLappingSounds); void CSaveableObject::initClassList() { _classList = new Common::HashMap<Common::String, CreateFunction>(); @@ -764,9 +788,10 @@ void CSaveableObject::initClassList() { ADDFN(CNodeItem); ADDFN(CProjectItem); ADDFN(CStaticImage); - ADDFN(CTreeItem); ADDFN(CTurnOnObject); + ADDFN(CTreeItem); ADDFN(CTurnOnPlaySound); + ADDFN(CTurnOnTurnOff); ADDFN(CViewItem); ADDFN(CAnnounce); @@ -800,8 +825,11 @@ void CSaveableObject::initClassList() { ADDFN(CEjectPhonographButton); ADDFN(CEmmaControl); ADDFN(CEmptyNutBowl); - ADDFN(CEnterExitFirstClassState); - ADDFN(CEnterExitView); + ADDFN(CEndCreditText); + ADDFN(CEndCredits); + ADDFN(CEndExplodeShip); + ADDFN(CEndGameCredits); + ADDFN(CEndSequenceControl); ADDFN(CFan); ADDFN(CFanControl); ADDFN(CFanDecrease); @@ -809,6 +837,7 @@ void CSaveableObject::initClassList() { ADDFN(CFanNoises); ADDFN(CFloorIndicator); ADDFN(CGamesConsole); + ADDFN(CGetLiftEye2); ADDFN(CHammerClip); ADDFN(CHammerDispensor); ADDFN(CHammerDispensorButton); @@ -1107,8 +1136,12 @@ void CSaveableObject::initClassList() { ADDFN(CVisibleMsg); ADDFN(CEnterBombRoom); + ADDFN(CEnterBridge); + ADDFN(CEnterExitFirstClassState); + ADDFN(CEnterExitView); ADDFN(CExitArboretum); ADDFN(CExitBridge); + ADDFN(CExitLift); ADDFN(CExitStateRoom); ADDFN(CMovePlayerInParrotRoom); ADDFN(CMovePlayerTo); @@ -1137,12 +1170,15 @@ void CSaveableObject::initClassList() { ADDFN(CAutoMusicPlayerBase); ADDFN(CAutoSoundPlayer); ADDFN(CBackgroundSoundMaker); + ADDFN(CBirdSong); + ADDFN(CGondolierSong); ADDFN(CMusicPlayer); ADDFN(CRestrictedAutoMusicPlayer); ADDFN(CSeasonalMusicPlayer); ADDFN(CAutoMusicPlayer); ADDFN(CTitaniaSpeech); ADDFN(CTriggerAutoMusicPlayer); + ADDFN(CWaterLappingSounds); } void CSaveableObject::freeClassList() { diff --git a/engines/titanic/core/turn_on_turn_off.cpp b/engines/titanic/core/turn_on_turn_off.cpp new file mode 100644 index 0000000000..a6a65e30f2 --- /dev/null +++ b/engines/titanic/core/turn_on_turn_off.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/core/turn_on_turn_off.h" + +namespace Titanic { + +CTurnOnTurnOff::CTurnOnTurnOff() : CBackground(), _fieldE0(0), + _fieldE4(0), _fieldE8(0), _fieldEC(0), _fieldF0(0) { +} + +void CTurnOnTurnOff::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldE8, indent); + file->writeNumberLine(_fieldEC, indent); + file->writeNumberLine(_fieldF0, indent); + + CBackground::save(file, indent); +} + +void CTurnOnTurnOff::load(SimpleFile *file) { + file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldE8 = file->readNumber(); + _fieldEC = file->readNumber(); + _fieldF0 = file->readNumber(); + + CBackground::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/core/turn_on_turn_off.h b/engines/titanic/core/turn_on_turn_off.h new file mode 100644 index 0000000000..41a0156391 --- /dev/null +++ b/engines/titanic/core/turn_on_turn_off.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_TURN_ON_TURN_OFF_H +#define TITANIC_TURN_ON_TURN_OFF_H + +#include "titanic/core/background.h" + +namespace Titanic { + +class CTurnOnTurnOff : public CBackground { +private: + int _fieldE0; + int _fieldE4; + int _fieldE8; + int _fieldEC; + int _fieldF0; +public: + CTurnOnTurnOff(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CTurnOnTurnOff"; } + + /** + * 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_TURN_ON_TURN_OFF_H */ diff --git a/engines/titanic/game/end_credit_text.cpp b/engines/titanic/game/end_credit_text.cpp index 949c6e2187..8ae83ac8d0 100644 --- a/engines/titanic/game/end_credit_text.cpp +++ b/engines/titanic/game/end_credit_text.cpp @@ -26,11 +26,13 @@ namespace Titanic { void CEndCreditText::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); CGameObject::save(file, indent); } void CEndCreditText::load(SimpleFile *file) { file->readNumber(); + _value = file->readNumber(); CGameObject::load(file); } diff --git a/engines/titanic/game/end_credit_text.h b/engines/titanic/game/end_credit_text.h index 258b1a3ef3..de0e54d7e0 100644 --- a/engines/titanic/game/end_credit_text.h +++ b/engines/titanic/game/end_credit_text.h @@ -28,7 +28,11 @@ namespace Titanic { class CEndCreditText : public CGameObject { +private: + int _value; public: + CEndCreditText() : CGameObject(), _value(0) {} + /** * Return the class name */ diff --git a/engines/titanic/game/end_game_credits.cpp b/engines/titanic/game/end_game_credits.cpp index 36c0510b20..56b06e6ec0 100644 --- a/engines/titanic/game/end_game_credits.cpp +++ b/engines/titanic/game/end_game_credits.cpp @@ -20,17 +20,26 @@ * */ -#include "titanic/game/nut_replacer.h" +#include "titanic/game/end_game_credits.h" namespace Titanic { -void CNutReplacer::save(SimpleFile *file, int indent) const { +CEndGameCredits::CEndGameCredits() : CGameObject(), _fieldBC(0) { +} + +void CEndGameCredits::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writePoint(_pos1, indent); + CGameObject::save(file, indent); } -void CNutReplacer::load(SimpleFile *file) { +void CEndGameCredits::load(SimpleFile *file) { file->readNumber(); + _fieldBC = file->readNumber(); + _pos1 = file->readPoint(); + CGameObject::load(file); } diff --git a/engines/titanic/game/end_game_credits.h b/engines/titanic/game/end_game_credits.h index c243f9a79c..f8ec6b00a7 100644 --- a/engines/titanic/game/end_game_credits.h +++ b/engines/titanic/game/end_game_credits.h @@ -20,19 +20,24 @@ * */ -#ifndef TITANIC_END_GAME_SHIP_H -#define TITANIC_END_GAME_SHIP_H +#ifndef TITANIC_END_GAME_CREDITS_H +#define TITANIC_END_GAME_CREDITS_H #include "titanic/core/game_object.h" namespace Titanic { -class CEndGameShip : public CGameObject { +class CEndGameCredits : public CGameObject { +private: + int _fieldBC; + Common::Point _pos1; public: + CEndGameCredits(); + /** * Return the class name */ - virtual const char *getClassName() const { return "CEndGameShip"; } + virtual const char *getClassName() const { return "CEndGameCredits"; } /** * Save the data for the class to file @@ -47,4 +52,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_END_GAME_SHIP_H */ +#endif /* TITANIC_END_GAME_CREDITS_H */ diff --git a/engines/titanic/game/get_lift_eye2.cpp b/engines/titanic/game/get_lift_eye2.cpp index 67a7b43be6..472f884d01 100644 --- a/engines/titanic/game/get_lift_eye2.cpp +++ b/engines/titanic/game/get_lift_eye2.cpp @@ -24,13 +24,25 @@ namespace Titanic { +CString *CGetLiftEye2::_v1; + +void CGetLiftEye2::init() { + _v1 = new CString(); +} + +void CGetLiftEye2::deinit() { + delete _v1; +} + void CGetLiftEye2::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeQuotedLine(*_v1, indent); CGameObject::save(file, indent); } void CGetLiftEye2::load(SimpleFile *file) { file->readNumber(); + *_v1 = file->readString(); CGameObject::load(file); } diff --git a/engines/titanic/game/get_lift_eye2.h b/engines/titanic/game/get_lift_eye2.h index baca1204d8..e8149cacae 100644 --- a/engines/titanic/game/get_lift_eye2.h +++ b/engines/titanic/game/get_lift_eye2.h @@ -28,7 +28,12 @@ namespace Titanic { class CGetLiftEye2 : public CGameObject { +private: + static CString *_v1; public: + static void init(); + static void deinit(); + /** * Return the class name */ diff --git a/engines/titanic/game/starling_puret.cpp b/engines/titanic/game/starling_puret.cpp index 026128b53a..1fa0dc82ea 100644 --- a/engines/titanic/game/starling_puret.cpp +++ b/engines/titanic/game/starling_puret.cpp @@ -26,11 +26,13 @@ namespace Titanic { void CStarlingPuret::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); CGameObject::save(file, indent); } void CStarlingPuret::load(SimpleFile *file) { file->readNumber(); + _value = file->readNumber(); CGameObject::load(file); } diff --git a/engines/titanic/game/starling_puret.h b/engines/titanic/game/starling_puret.h index 5c53a53b47..5bfdd660f9 100644 --- a/engines/titanic/game/starling_puret.h +++ b/engines/titanic/game/starling_puret.h @@ -28,7 +28,11 @@ namespace Titanic { class CStarlingPuret : public CGameObject { +private: + int _value; public: + CStarlingPuret() : CGameObject(), _value(0) {} + /** * Return the class name */ diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 87d5774878..d4bbed8f7a 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -72,6 +72,7 @@ MODULE_OBJS := \ core/static_image.o \ core/turn_on_object.o \ core/turn_on_play_sound.o \ + core/turn_on_turn_off.o \ core/tree_item.o \ core/view_item.o \ game/announce.o \ @@ -120,17 +121,10 @@ MODULE_OBJS := \ game/end_credit_text.o \ game/end_credits.o \ game/end_explode_ship.o \ - game/end_game_cerdits.o \ + game/end_game_credits.o \ game/end_sequence_control.o \ - game/enter_bridge.o \ - game/enter_exit_first_class_state.o \ - game/enter_exit_sec_class_mini_lift.o \ - game/enter_exit_view.o \ - game/enter_sec_class_state.o \ game/hammer_dispensor.o \ game/hammer_dispensor_button.o \ - game/exit_lift.o \ - game/exit_pellerator.o \ game/fan.o \ game/fan_control.o \ game/fan_decrease.o \ @@ -238,7 +232,6 @@ MODULE_OBJS := \ game/transport/pellerator.o \ game/transport/service_elevator.o \ game/transport/transport.o \ - game/sgt/enter_exit_mini_lift.o \ game/sgt/sgt_doors.o \ game/sgt/sgt_navigation.o \ game/sgt/sgt_restaurant_doors.o \ @@ -281,8 +274,16 @@ MODULE_OBJS := \ messages/door_auto_sound_event.o \ messages/messages.o \ moves/enter_bomb_room.o \ + moves/enter_bridge.o \ + moves/enter_exit_first_class_state.o \ + moves/enter_exit_mini_lift.o \ + moves/enter_exit_sec_class_mini_lift.o \ + moves/enter_exit_view.o \ + moves/enter_sec_class_state.o \ moves/exit_arboretum.o \ moves/exit_bridge.o \ + moves/exit_lift.o \ + moves/exit_pellerator.o \ moves/exit_state_room.o \ moves/exit_titania.o \ moves/move_player_in_parrot_room.o \ @@ -313,11 +314,15 @@ MODULE_OBJS := \ sound/auto_music_player_base.o \ sound/auto_sound_player.o \ sound/background_sound_maker.o \ + sound/bird_song.o \ + sound/gondolier_song.o \ sound/music_player.o \ sound/restricted_auto_music_player.o \ + sound/room_auto_sound_player.o \ sound/seasonal_music_player.o \ sound/titania_speech.o \ - sound/trigger_auto_music_player.o + sound/trigger_auto_music_player.o \ + sound/water_lapping_sounds.o # This module can be built as a plugin ifeq ($(ENABLE_TITANIC), DYNAMIC_PLUGIN) diff --git a/engines/titanic/game/enter_bridge.cpp b/engines/titanic/moves/enter_bridge.cpp index 13e4a50264..a1e0b7e489 100644 --- a/engines/titanic/game/enter_bridge.cpp +++ b/engines/titanic/moves/enter_bridge.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/enter_bridge.h" +#include "titanic/moves/enter_bridge.h" namespace Titanic { diff --git a/engines/titanic/game/enter_bridge.h b/engines/titanic/moves/enter_bridge.h index bbc4cc96d0..bbc4cc96d0 100644 --- a/engines/titanic/game/enter_bridge.h +++ b/engines/titanic/moves/enter_bridge.h diff --git a/engines/titanic/game/enter_exit_first_class_state.cpp b/engines/titanic/moves/enter_exit_first_class_state.cpp index 7fa191b0e3..ed80947c07 100644 --- a/engines/titanic/game/enter_exit_first_class_state.cpp +++ b/engines/titanic/moves/enter_exit_first_class_state.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/enter_exit_first_class_state.h" +#include "titanic/moves/enter_exit_first_class_state.h" namespace Titanic { diff --git a/engines/titanic/game/enter_exit_first_class_state.h b/engines/titanic/moves/enter_exit_first_class_state.h index f7bc4c69f7..f7bc4c69f7 100644 --- a/engines/titanic/game/enter_exit_first_class_state.h +++ b/engines/titanic/moves/enter_exit_first_class_state.h diff --git a/engines/titanic/game/sgt/enter_exit_mini_lift.cpp b/engines/titanic/moves/enter_exit_mini_lift.cpp index a7f85b9952..b6a1423875 100644 --- a/engines/titanic/game/sgt/enter_exit_mini_lift.cpp +++ b/engines/titanic/moves/enter_exit_mini_lift.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/sgt/enter_exit_mini_lift.h" +#include "titanic/moves/enter_exit_mini_lift.h" namespace Titanic { diff --git a/engines/titanic/game/sgt/enter_exit_mini_lift.h b/engines/titanic/moves/enter_exit_mini_lift.h index 417e25d13f..417e25d13f 100644 --- a/engines/titanic/game/sgt/enter_exit_mini_lift.h +++ b/engines/titanic/moves/enter_exit_mini_lift.h diff --git a/engines/titanic/game/enter_exit_sec_class_mini_lift.cpp b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp index d4162ac008..11df8d9ad8 100644 --- a/engines/titanic/game/enter_exit_sec_class_mini_lift.cpp +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/enter_exit_sec_class_mini_lift.h" +#include "titanic/moves/enter_exit_sec_class_mini_lift.h" namespace Titanic { diff --git a/engines/titanic/game/enter_exit_sec_class_mini_lift.h b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h index aa3f9b3731..aa3f9b3731 100644 --- a/engines/titanic/game/enter_exit_sec_class_mini_lift.h +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h diff --git a/engines/titanic/game/enter_exit_view.cpp b/engines/titanic/moves/enter_exit_view.cpp index e892161757..3e5789eebe 100644 --- a/engines/titanic/game/enter_exit_view.cpp +++ b/engines/titanic/moves/enter_exit_view.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/enter_exit_view.h" +#include "titanic/moves/enter_exit_view.h" namespace Titanic { diff --git a/engines/titanic/game/enter_exit_view.h b/engines/titanic/moves/enter_exit_view.h index 05ed63da5c..05ed63da5c 100644 --- a/engines/titanic/game/enter_exit_view.h +++ b/engines/titanic/moves/enter_exit_view.h diff --git a/engines/titanic/game/enter_sec_class_state.cpp b/engines/titanic/moves/enter_sec_class_state.cpp index 2a18e81b6a..74f6176650 100644 --- a/engines/titanic/game/enter_sec_class_state.cpp +++ b/engines/titanic/moves/enter_sec_class_state.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/enter_sec_class_state.h" +#include "titanic/moves/enter_sec_class_state.h" namespace Titanic { diff --git a/engines/titanic/game/enter_sec_class_state.h b/engines/titanic/moves/enter_sec_class_state.h index 5da623dc08..5da623dc08 100644 --- a/engines/titanic/game/enter_sec_class_state.h +++ b/engines/titanic/moves/enter_sec_class_state.h diff --git a/engines/titanic/game/exit_lift.cpp b/engines/titanic/moves/exit_lift.cpp index 82e4411f6f..376b9e04f1 100644 --- a/engines/titanic/game/exit_lift.cpp +++ b/engines/titanic/moves/exit_lift.cpp @@ -20,23 +20,19 @@ * */ -#include "titanic/game/exit_lift.h" +#include "titanic/moves/exit_lift.h" namespace Titanic { void CExitLift::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); - file->writeNumberLine(_value1, indent); - file->writeNumberLine(_value2, indent); - + file->writeQuotedLine(_value, indent); CGameObject::save(file, indent); } void CExitLift::load(SimpleFile *file) { file->readNumber(); - _value1 = file->readNumber(); - _value2 = file->readNumber(); - + _value = file->readString(); CGameObject::load(file); } diff --git a/engines/titanic/game/exit_lift.h b/engines/titanic/moves/exit_lift.h index 9531fd6528..534de1b8ec 100644 --- a/engines/titanic/game/exit_lift.h +++ b/engines/titanic/moves/exit_lift.h @@ -29,10 +29,8 @@ namespace Titanic { class CExitLift : public CGameObject { public: - int _value1, _value2; + CString _value; public: - CExitLift() : CGameObject(), _value1(0), _value2(0) {} - /** * Return the class name */ diff --git a/engines/titanic/game/exit_pellerator.cpp b/engines/titanic/moves/exit_pellerator.cpp index 79754f8567..81bec82748 100644 --- a/engines/titanic/game/exit_pellerator.cpp +++ b/engines/titanic/moves/exit_pellerator.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/game/exit_pellerator.h" +#include "titanic/moves/exit_pellerator.h" namespace Titanic { diff --git a/engines/titanic/game/exit_pellerator.h b/engines/titanic/moves/exit_pellerator.h index 6185f61e01..6185f61e01 100644 --- a/engines/titanic/game/exit_pellerator.h +++ b/engines/titanic/moves/exit_pellerator.h diff --git a/engines/titanic/sound/auto_sound_player.cpp b/engines/titanic/sound/auto_sound_player.cpp index 619c36298e..7b20f65907 100644 --- a/engines/titanic/sound/auto_sound_player.cpp +++ b/engines/titanic/sound/auto_sound_player.cpp @@ -25,17 +25,39 @@ namespace Titanic { CAutoSoundPlayer::CAutoSoundPlayer() : CGameObject(), - _fieldC8(0), _fieldCC(70), _fieldD0(0), _fieldD4(0), _fieldD8(-1), + _fieldBC(0), _fieldCC(70), _fieldD0(0), _fieldD4(0), _fieldD8(-1), _fieldDC(0), _fieldE0(-1), _fieldE4(0), _fieldE8(0) { } void CAutoSoundPlayer::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + file->writeNumberLine(_fieldD4, indent); + file->writeNumberLine(_fieldD8, indent); + file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldE8, indent); + CGameObject::save(file, indent); } void CAutoSoundPlayer::load(SimpleFile *file) { file->readNumber(); + _fieldBC = file->readNumber(); + _string1 = file->readString(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + _fieldD4 = file->readNumber(); + _fieldD8 = file->readNumber(); + _fieldDC = file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldE8 = file->readNumber(); + CGameObject::load(file); } diff --git a/engines/titanic/sound/auto_sound_player.h b/engines/titanic/sound/auto_sound_player.h index 07ac0acd2e..bc849341df 100644 --- a/engines/titanic/sound/auto_sound_player.h +++ b/engines/titanic/sound/auto_sound_player.h @@ -29,8 +29,8 @@ namespace Titanic { class CAutoSoundPlayer : public CGameObject { public: + int _fieldBC; CString _string1; - int _fieldC8; int _fieldCC; int _fieldD0; int _fieldD4; diff --git a/engines/titanic/sound/bird_song.cpp b/engines/titanic/sound/bird_song.cpp new file mode 100644 index 0000000000..f003a4f2c4 --- /dev/null +++ b/engines/titanic/sound/bird_song.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/sound/bird_song.h" + +namespace Titanic { + +void CBirdSong::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CRoomAutoSoundPlayer::save(file, indent); +} + +void CBirdSong::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/bird_song.h b/engines/titanic/sound/bird_song.h new file mode 100644 index 0000000000..50c1f2b722 --- /dev/null +++ b/engines/titanic/sound/bird_song.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_BIRD_SONG_H +#define TITANIC_BIRD_SONG_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CBirdSong : public CRoomAutoSoundPlayer { +public: + int _value; +public: + CBirdSong() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBirdSong"; } + + /** + * 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_BIRD_SONG_H */ diff --git a/engines/titanic/sound/gondolier_song.cpp b/engines/titanic/sound/gondolier_song.cpp new file mode 100644 index 0000000000..52b7ae04bf --- /dev/null +++ b/engines/titanic/sound/gondolier_song.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/sound/gondolier_song.h" + +namespace Titanic { + +void CGondolierSong::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CRoomAutoSoundPlayer::save(file, indent); +} + +void CGondolierSong::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/gondolier_song.h b/engines/titanic/sound/gondolier_song.h new file mode 100644 index 0000000000..38f7e867f8 --- /dev/null +++ b/engines/titanic/sound/gondolier_song.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_GONDOLIER_SONG_H +#define TITANIC_GONDOLIER_SONG_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CGondolierSong : public CRoomAutoSoundPlayer { +public: + int _value; +public: + CGondolierSong() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CGondolierSong"; } + + /** + * 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_GONDOLIER_SONG_H */ diff --git a/engines/titanic/sound/room_auto_sound_player.cpp b/engines/titanic/sound/room_auto_sound_player.cpp new file mode 100644 index 0000000000..8c54726afc --- /dev/null +++ b/engines/titanic/sound/room_auto_sound_player.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/room_auto_sound_player.h" + +namespace Titanic { + +void CRoomAutoSoundPlayer::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CAutoSoundPlayer::save(file, indent); +} + +void CRoomAutoSoundPlayer::load(SimpleFile *file) { + file->readNumber(); + CAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/room_auto_sound_player.h b/engines/titanic/sound/room_auto_sound_player.h new file mode 100644 index 0000000000..719eddcb84 --- /dev/null +++ b/engines/titanic/sound/room_auto_sound_player.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_ROOM_AUTO_SOUND_PLAYER_H +#define TITANIC_ROOM_AUTO_SOUND_PLAYER_H + +#include "titanic/sound/auto_sound_player.h" + +namespace Titanic { + +class CRoomAutoSoundPlayer : public CAutoSoundPlayer { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CRoomAutoSoundPlayer"; } + + /** + * 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_ROOM_AUTO_SOUND_PLAYER_H */ diff --git a/engines/titanic/sound/water_lapping_sounds.cpp b/engines/titanic/sound/water_lapping_sounds.cpp new file mode 100644 index 0000000000..7222b5a16d --- /dev/null +++ b/engines/titanic/sound/water_lapping_sounds.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/sound/water_lapping_sounds.h" + +namespace Titanic { + +void CWaterLappingSounds::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value, indent); + CRoomAutoSoundPlayer::save(file, indent); +} + +void CWaterLappingSounds::load(SimpleFile *file) { + file->readNumber(); + _value = file->readNumber(); + CRoomAutoSoundPlayer::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/water_lapping_sounds.h b/engines/titanic/sound/water_lapping_sounds.h new file mode 100644 index 0000000000..3dd72b5250 --- /dev/null +++ b/engines/titanic/sound/water_lapping_sounds.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_WATER_LAPPING_SOUNDS_H +#define TITANIC_WATER_LAPPING_SOUNDS_H + +#include "titanic/sound/room_auto_sound_player.h" + +namespace Titanic { + +class CWaterLappingSounds : public CRoomAutoSoundPlayer { +public: + int _value; +public: + CWaterLappingSounds() : CRoomAutoSoundPlayer(), _value(0) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CWaterLappingSounds"; } + + /** + * 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_WATER_LAPPING_SOUNDS_H */ diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp index 03dbacd6da..d8d4c77429 100644 --- a/engines/titanic/titanic.cpp +++ b/engines/titanic/titanic.cpp @@ -28,12 +28,13 @@ #include "graphics/scaler.h" #include "graphics/thumbnail.h" #include "titanic/titanic.h" +#include "titanic/carry/hose.h" #include "titanic/core/saveable_object.h" -#include "titanic/game/enter_exit_first_class_state.h" +#include "titanic/game/get_lift_eye2.h" #include "titanic/game/parrot/parrot_lobby_object.h" #include "titanic/game/sgt/sgt_navigation.h" #include "titanic/game/sgt/sgt_state_room.h" -#include "titanic/carry/hose.h" +#include "titanic/moves/enter_exit_first_class_state.h" namespace Titanic { @@ -57,9 +58,10 @@ void TitanicEngine::initialize() { DebugMan.addDebugChannel(kDebugSound, "sound", "Sound and Music handling"); CSaveableObject::initClassList(); - CParrotLobbyObject::init(); CEnterExitFirstClassState::init(); + CGetLiftEye2::init(); CHose::init(); + CParrotLobbyObject::init(); CSGTNavigation::init(); CSGTStateRoom::init(); @@ -70,6 +72,7 @@ void TitanicEngine::initialize() { void TitanicEngine::deinitialize() { CEnterExitFirstClassState::deinit(); + CGetLiftEye2::deinit(); CHose::deinit(); CSGTNavigation::deinit(); CSGTStateRoom::deinit(); |