From 12ae5e10f3a20b1b909a6ec40257e39e063b78c5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 17 Mar 2016 20:55:32 -0400 Subject: TITANIC: Added stubbed CEnterRoomMsg event handlers as needed --- engines/titanic/core/saveable_object.cpp | 3 ++ engines/titanic/game/light.cpp | 5 +++ engines/titanic/game/light.h | 5 ++- engines/titanic/game/light_switch.cpp | 5 +++ engines/titanic/game/light_switch.h | 5 ++- engines/titanic/game/long_stick_dispenser.cpp | 6 +++ engines/titanic/game/long_stick_dispenser.h | 5 ++- .../titanic/game/parrot/player_meets_parrot.cpp | 5 +++ engines/titanic/game/parrot/player_meets_parrot.h | 5 ++- engines/titanic/game/pet/pet_monitor.cpp | 5 +++ engines/titanic/game/pet/pet_monitor.h | 5 ++- engines/titanic/game/pet/pet_position.cpp | 5 +++ engines/titanic/game/pet/pet_position.h | 5 ++- engines/titanic/game/pet/pet_transport.cpp | 5 +++ engines/titanic/game/pet/pet_transport.h | 5 ++- engines/titanic/game/phonograph.cpp | 5 +++ engines/titanic/game/phonograph.h | 5 ++- engines/titanic/game/sgt/sgt_state_room.cpp | 5 +++ engines/titanic/game/sgt/sgt_state_room.h | 5 ++- engines/titanic/game/ship_setting.cpp | 5 +++ engines/titanic/game/ship_setting.h | 7 ++- engines/titanic/game/transport/lift.cpp | 5 +++ engines/titanic/game/transport/lift.h | 5 ++- engines/titanic/game/transport/lift_indicator.h | 5 ++- engines/titanic/game/transport/pellerator.cpp | 5 +++ engines/titanic/game/transport/pellerator.h | 5 ++- engines/titanic/game/up_lighter.cpp | 5 +++ engines/titanic/game/up_lighter.h | 5 ++- engines/titanic/module.mk | 1 + engines/titanic/npcs/liftbot.cpp | 5 +++ engines/titanic/npcs/liftbot.h | 5 ++- engines/titanic/sound/music_player.cpp | 5 +++ engines/titanic/sound/music_player.h | 7 ++- .../titanic/sound/restricted_auto_music_player.cpp | 5 +++ .../titanic/sound/restricted_auto_music_player.h | 5 ++- engines/titanic/sound/room_auto_sound_player.cpp | 5 +++ engines/titanic/sound/room_auto_sound_player.h | 5 ++- .../sound/room_trigger_auto_music_player.cpp | 42 ++++++++++++++++++ .../titanic/sound/room_trigger_auto_music_player.h | 50 ++++++++++++++++++++++ engines/titanic/sound/titania_speech.cpp | 5 +++ engines/titanic/sound/titania_speech.h | 5 ++- 41 files changed, 265 insertions(+), 21 deletions(-) create mode 100644 engines/titanic/sound/room_trigger_auto_music_player.cpp create mode 100644 engines/titanic/sound/room_trigger_auto_music_player.h (limited to 'engines') diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 3144e60c97..e833a056ac 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -396,6 +396,7 @@ #include "titanic/sound/node_auto_sound_player.h" #include "titanic/sound/restricted_auto_music_player.h" #include "titanic/sound/room_auto_sound_player.h" +#include "titanic/sound/room_trigger_auto_music_player.h" #include "titanic/sound/season_noises.h" #include "titanic/sound/seasonal_music_player.h" #include "titanic/sound/titania_speech.h" @@ -979,6 +980,7 @@ DEFFN(CMusicPlayer) DEFFN(CNodeAutoSoundPlayer) DEFFN(CRestrictedAutoMusicPlayer) DEFFN(CRoomAutoSoundPlayer) +DEFFN(CRoomTriggerAutoMusicPlayer); DEFFN(CSeasonNoises) DEFFN(CSeasonalMusicPlayer) DEFFN(CTitaniaSpeech) @@ -1550,6 +1552,7 @@ void CSaveableObject::initClassList() { ADDFN(CNodeAutoSoundPlayer, CAutoSoundPlayer); ADDFN(CRestrictedAutoMusicPlayer, CAutoMusicPlayer); ADDFN(CRoomAutoSoundPlayer, CAutoSoundPlayer); + ADDFN(CRoomTriggerAutoMusicPlayer, CTriggerAutoMusicPlayer); ADDFN(CSeasonNoises, CViewAutoSoundPlayer); ADDFN(CSeasonalMusicPlayer, CAutoMusicPlayerBase); ADDFN(CAutoMusicPlayer, CAutoMusicPlayerBase); diff --git a/engines/titanic/game/light.cpp b/engines/titanic/game/light.cpp index 4f5a492f2f..7a24391b0e 100644 --- a/engines/titanic/game/light.cpp +++ b/engines/titanic/game/light.cpp @@ -57,4 +57,9 @@ void CLight::load(SimpleFile *file) { CBackground::load(file); } +bool CLight::handleEvent(const CEnterRoomMsg &msg) { + warning("CLight::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/light.h b/engines/titanic/game/light.h index ea6073d038..650e6ba87e 100644 --- a/engines/titanic/game/light.h +++ b/engines/titanic/game/light.h @@ -24,10 +24,11 @@ #define TITANIC_LIGHT_H #include "titanic/core/background.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CLight : public CBackground { +class CLight : public CBackground, CEnterRoomMsgTarget { private: int _fieldE0; int _fieldE4; @@ -37,6 +38,8 @@ private: int _fieldF4; int _fieldF8; int _fieldFC; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CLight(); diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 605fab37f8..5e1b94ac18 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -50,4 +50,9 @@ void CLightSwitch::load(SimpleFile *file) { CBackground::load(file); } +bool CLightSwitch::handleEvent(const CEnterRoomMsg &msg) { + warning("CLightSwitch::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/light_switch.h b/engines/titanic/game/light_switch.h index 334cba75a6..fd2c392d13 100644 --- a/engines/titanic/game/light_switch.h +++ b/engines/titanic/game/light_switch.h @@ -24,16 +24,19 @@ #define TITANIC_LIGHT_SWITCH_H #include "titanic/core/background.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CLightSwitch : public CBackground { +class CLightSwitch : public CBackground, CEnterRoomMsgTarget { public: static int _v1; private: int _fieldE0; int _fieldE4; int _fieldE8; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CLightSwitch(); diff --git a/engines/titanic/game/long_stick_dispenser.cpp b/engines/titanic/game/long_stick_dispenser.cpp index 97981cc01d..237c1f6112 100644 --- a/engines/titanic/game/long_stick_dispenser.cpp +++ b/engines/titanic/game/long_stick_dispenser.cpp @@ -42,4 +42,10 @@ void CLongStickDispenser::load(SimpleFile *file) { CGameObject::load(file); } +bool CLongStickDispenser::handleEvent(const CEnterRoomMsg &msg) { + _fieldC0 = 0; + _fieldC4 = 1; + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/long_stick_dispenser.h b/engines/titanic/game/long_stick_dispenser.h index 30e3541087..75ada29a96 100644 --- a/engines/titanic/game/long_stick_dispenser.h +++ b/engines/titanic/game/long_stick_dispenser.h @@ -24,14 +24,17 @@ #define TITANIC_LONG_STICK_DISPENSER_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { class CLongStickDispenser : public CGameObject { -public: +private: int _fieldBC; int _fieldC0; int _fieldC4; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CLongStickDispenser() : CGameObject(), _fieldBC(0), diff --git a/engines/titanic/game/parrot/player_meets_parrot.cpp b/engines/titanic/game/parrot/player_meets_parrot.cpp index 1d7bd657ac..70628b345a 100644 --- a/engines/titanic/game/parrot/player_meets_parrot.cpp +++ b/engines/titanic/game/parrot/player_meets_parrot.cpp @@ -34,4 +34,9 @@ void CPlayerMeetsParrot::load(SimpleFile *file) { CGameObject::load(file); } +bool CPlayerMeetsParrot::handleEvent(const CEnterRoomMsg &msg) { + warning("CPlayerMeetsParrot::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/parrot/player_meets_parrot.h b/engines/titanic/game/parrot/player_meets_parrot.h index d0c3b9d9f3..8572fd701d 100644 --- a/engines/titanic/game/parrot/player_meets_parrot.h +++ b/engines/titanic/game/parrot/player_meets_parrot.h @@ -24,10 +24,13 @@ #define TITANIC_PLAYER_MEETS_PARROT_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPlayerMeetsParrot : public CGameObject { +class CPlayerMeetsParrot : public CGameObject, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_monitor.cpp b/engines/titanic/game/pet/pet_monitor.cpp index 534fb3fb03..649ac978e9 100644 --- a/engines/titanic/game/pet/pet_monitor.cpp +++ b/engines/titanic/game/pet/pet_monitor.cpp @@ -34,4 +34,9 @@ void CPETMonitor::load(SimpleFile *file) { CGameObject::load(file); } +bool CPETMonitor::handleEvent(const CEnterRoomMsg &msg) { + warning("CPETMonitor::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_monitor.h b/engines/titanic/game/pet/pet_monitor.h index ff2209802d..97961ee929 100644 --- a/engines/titanic/game/pet/pet_monitor.h +++ b/engines/titanic/game/pet/pet_monitor.h @@ -24,10 +24,13 @@ #define TITANIC_PET_MONITOR_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPETMonitor : public CGameObject { +class CPETMonitor : public CGameObject, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_position.cpp b/engines/titanic/game/pet/pet_position.cpp index 80ccec74cd..aafc21beb2 100644 --- a/engines/titanic/game/pet/pet_position.cpp +++ b/engines/titanic/game/pet/pet_position.cpp @@ -34,4 +34,9 @@ void CPETPosition::load(SimpleFile *file) { CGameObject::load(file); } +bool CPETPosition::handleEvent(const CEnterRoomMsg &msg) { + warning("CPETPosition::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_position.h b/engines/titanic/game/pet/pet_position.h index 407a42f0ae..d72f42ca3a 100644 --- a/engines/titanic/game/pet/pet_position.h +++ b/engines/titanic/game/pet/pet_position.h @@ -24,10 +24,13 @@ #define TITANIC_PET_POSITION_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPETPosition : public CGameObject { +class CPETPosition : public CGameObject, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_transport.cpp b/engines/titanic/game/pet/pet_transport.cpp index 037e0b3278..40cc155c5b 100644 --- a/engines/titanic/game/pet/pet_transport.cpp +++ b/engines/titanic/game/pet/pet_transport.cpp @@ -34,4 +34,9 @@ void CPETTransport::load(SimpleFile *file) { CGameObject::load(file); } +bool CPETTransport::handleEvent(const CEnterRoomMsg &msg) { + warning("CPETTransport::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_transport.h b/engines/titanic/game/pet/pet_transport.h index 1aa6df8ced..1eb48322e2 100644 --- a/engines/titanic/game/pet/pet_transport.h +++ b/engines/titanic/game/pet/pet_transport.h @@ -24,10 +24,13 @@ #define TITANIC_PET_TRANSPORT_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPETTransport : public CGameObject { +class CPETTransport : public CGameObject, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/phonograph.cpp b/engines/titanic/game/phonograph.cpp index 3461e34cb6..2ff8ca99bb 100644 --- a/engines/titanic/game/phonograph.cpp +++ b/engines/titanic/game/phonograph.cpp @@ -55,4 +55,9 @@ void CPhonograph::load(SimpleFile *file) { CMusicPlayer::load(file); } +bool CPhonograph::handleEvent(const CEnterRoomMsg &msg) { + warning("CPhonograph::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/phonograph.h b/engines/titanic/game/phonograph.h index 14712e5c1b..3ba2d1ce87 100644 --- a/engines/titanic/game/phonograph.h +++ b/engines/titanic/game/phonograph.h @@ -24,10 +24,11 @@ #define TITANIC_PHONOGRAPH_H #include "titanic/sound/music_player.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPhonograph : public CMusicPlayer { +class CPhonograph : public CMusicPlayer, CEnterRoomMsgTarget { protected: CString _string2; int _fieldE0; @@ -36,6 +37,8 @@ protected: int _fieldEC; int _fieldF0; int _fieldF4; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CPhonograph(); diff --git a/engines/titanic/game/sgt/sgt_state_room.cpp b/engines/titanic/game/sgt/sgt_state_room.cpp index e0d8de1282..a6dc523bcf 100644 --- a/engines/titanic/game/sgt/sgt_state_room.cpp +++ b/engines/titanic/game/sgt/sgt_state_room.cpp @@ -90,4 +90,9 @@ void CSGTStateRoom::load(SimpleFile *file) { CBackground::load(file); } +bool CSGTStateRoom::handleEvent(const CEnterRoomMsg &msg) { + warning("CSGTStateRoom::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_state_room.h b/engines/titanic/game/sgt/sgt_state_room.h index dfac6894b9..dbe4538ced 100644 --- a/engines/titanic/game/sgt/sgt_state_room.h +++ b/engines/titanic/game/sgt/sgt_state_room.h @@ -24,6 +24,7 @@ #define TITANIC_SGT_STATE_ROOM_H #include "titanic/core/background.h" +#include "titanic/messages/messages.h" namespace Titanic { @@ -44,7 +45,7 @@ struct CSGTStateRoomStatics { int _v14; }; -class CSGTStateRoom : public CBackground { +class CSGTStateRoom : public CBackground, CEnterRoomMsgTarget { private: static CSGTStateRoomStatics *_statics; private: @@ -53,6 +54,8 @@ private: int _fieldE8; int _fieldEC; int _fieldF0; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CSGTStateRoom(); diff --git a/engines/titanic/game/ship_setting.cpp b/engines/titanic/game/ship_setting.cpp index d53c5289e6..7a3951df71 100644 --- a/engines/titanic/game/ship_setting.cpp +++ b/engines/titanic/game/ship_setting.cpp @@ -48,4 +48,9 @@ void CShipSetting::load(SimpleFile *file) { CBackground::load(file); } +bool CShipSetting::handleEvent(const CEnterRoomMsg &msg) { + warning("CShipSetting::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/ship_setting.h b/engines/titanic/game/ship_setting.h index a3b5d5f511..30780fd3d7 100644 --- a/engines/titanic/game/ship_setting.h +++ b/engines/titanic/game/ship_setting.h @@ -24,15 +24,18 @@ #define TITANIC_SHIP_SETTING_H #include "titanic/core/background.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CShipSetting : public CBackground { -public: +class CShipSetting : public CBackground, CEnterRoomMsgTarget { +private: CString _string3; Common::Point _pos1; CString _string4; CString _string5; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CShipSetting(); diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp index 1e21b9f582..22201291aa 100644 --- a/engines/titanic/game/transport/lift.cpp +++ b/engines/titanic/game/transport/lift.cpp @@ -57,4 +57,9 @@ void CLift::load(SimpleFile *file) { CTransport::load(file); } +bool CLift::handleEvent(const CEnterRoomMsg &msg) { + warning("CLift::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h index b1cd48960e..42a340c61f 100644 --- a/engines/titanic/game/transport/lift.h +++ b/engines/titanic/game/transport/lift.h @@ -24,10 +24,11 @@ #define TITANIC_LIFT_H #include "titanic/game/transport/transport.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CLift : public CTransport { +class CLift : public CTransport, CEnterRoomMsgTarget { private: static int _v1; static int _v2; @@ -37,6 +38,8 @@ private: static int _v6; int _fieldF8; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CLift() : CTransport(), _fieldF8(1) {} diff --git a/engines/titanic/game/transport/lift_indicator.h b/engines/titanic/game/transport/lift_indicator.h index 2fe6e1a61e..de913c56a5 100644 --- a/engines/titanic/game/transport/lift_indicator.h +++ b/engines/titanic/game/transport/lift_indicator.h @@ -24,15 +24,18 @@ #define TITANIC_LIFT_INDICATOR_H #include "titanic/game/transport/lift.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CLiftindicator : public CLift { +class CLiftindicator : public CLift, CEnterRoomMsgTarget { private: int _fieldFC; Common::Point _pos2; int _field108; int _field10C; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg) { return true; } public: CLASSDEF CLiftindicator(); diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp index 400214a140..99c4db3160 100644 --- a/engines/titanic/game/transport/pellerator.cpp +++ b/engines/titanic/game/transport/pellerator.cpp @@ -43,4 +43,9 @@ void CPellerator::load(SimpleFile *file) { CTransport::load(file); } +bool CPellerator::handleEvent(const CEnterRoomMsg &msg) { + warning("CPellerator::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/transport/pellerator.h b/engines/titanic/game/transport/pellerator.h index e72cbb4b9d..502af2430a 100644 --- a/engines/titanic/game/transport/pellerator.h +++ b/engines/titanic/game/transport/pellerator.h @@ -24,13 +24,16 @@ #define TITANIC_PELLERATOR_H #include "titanic/game/transport/transport.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CPellerator : public CTransport { +class CPellerator : public CTransport, CEnterRoomMsgTarget { private: static int _v1; static int _v2; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/up_lighter.cpp b/engines/titanic/game/up_lighter.cpp index 0e6c4d88cc..beb159f967 100644 --- a/engines/titanic/game/up_lighter.cpp +++ b/engines/titanic/game/up_lighter.cpp @@ -48,4 +48,9 @@ void CUpLighter::load(SimpleFile *file) { CDropTarget::load(file); } +bool CUpLighter::handleEvent(const CEnterRoomMsg &msg) { + warning("CUpLighter::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/up_lighter.h b/engines/titanic/game/up_lighter.h index e24e712c1c..15fa14c16a 100644 --- a/engines/titanic/game/up_lighter.h +++ b/engines/titanic/game/up_lighter.h @@ -24,15 +24,18 @@ #define TITANIC_UP_LIGHTER_H #include "titanic/core/drop_target.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CUpLighter : public CDropTarget { +class CUpLighter : public CDropTarget, CEnterRoomMsgTarget { private: int _field118; int _field11C; int _field120; int _field124; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CUpLighter(); diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index ec55392833..23ac75056d 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -403,6 +403,7 @@ MODULE_OBJS := \ sound/node_auto_sound_player.o \ sound/restricted_auto_music_player.o \ sound/room_auto_sound_player.o \ + sound/room_trigger_auto_music_player.o \ sound/season_noises.o \ sound/seasonal_music_player.o \ sound/sound.o \ diff --git a/engines/titanic/npcs/liftbot.cpp b/engines/titanic/npcs/liftbot.cpp index 3a0040ddca..76a48f07d1 100644 --- a/engines/titanic/npcs/liftbot.cpp +++ b/engines/titanic/npcs/liftbot.cpp @@ -48,4 +48,9 @@ void CLiftBot::load(SimpleFile *file) { CTrueTalkNPC::load(file); } +bool CLiftBot::handleEvent(const CEnterRoomMsg &msg) { + warning("CLiftBot::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/npcs/liftbot.h b/engines/titanic/npcs/liftbot.h index 27556ed942..81c5399e7f 100644 --- a/engines/titanic/npcs/liftbot.h +++ b/engines/titanic/npcs/liftbot.h @@ -24,15 +24,18 @@ #define TITANIC_LIFTBOT_H #include "titanic/npcs/true_talk_npc.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CLiftBot : public CTrueTalkNPC { +class CLiftBot : public CTrueTalkNPC, CEnterRoomMsgTarget { private: static int _v1; static int _v2; private: int _field108; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CLiftBot(); diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp index 6bab2d91dc..e2299e6297 100644 --- a/engines/titanic/sound/music_player.cpp +++ b/engines/titanic/sound/music_player.cpp @@ -44,4 +44,9 @@ void CMusicPlayer::load(SimpleFile *file) { CGameObject::load(file); } +bool CMusicPlayer::handleEvent(const CEnterRoomMsg &msg) { + warning("TODO: CMusicPlayer::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/sound/music_player.h b/engines/titanic/sound/music_player.h index 0a750cc538..1796a25d4b 100644 --- a/engines/titanic/sound/music_player.h +++ b/engines/titanic/sound/music_player.h @@ -24,15 +24,18 @@ #define TITANIC_MUSIC_PLAYER_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CMusicPlayer : public CGameObject { -public: +class CMusicPlayer : public CGameObject, CEnterRoomMsgTarget { +protected: int _fieldBC; CString _string1; int _fieldCC; int _fieldD0; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CMusicPlayer() : CGameObject(), diff --git a/engines/titanic/sound/restricted_auto_music_player.cpp b/engines/titanic/sound/restricted_auto_music_player.cpp index 442dc90ce2..a57769bf25 100644 --- a/engines/titanic/sound/restricted_auto_music_player.cpp +++ b/engines/titanic/sound/restricted_auto_music_player.cpp @@ -44,4 +44,9 @@ void CRestrictedAutoMusicPlayer::load(SimpleFile *file) { CAutoMusicPlayer::load(file); } +bool CRestrictedAutoMusicPlayer::handleEvent(const CEnterRoomMsg &msg) { + warning("CRestrictedAutoMusicPlayer::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/sound/restricted_auto_music_player.h b/engines/titanic/sound/restricted_auto_music_player.h index cb6220cbc7..60dcc6809d 100644 --- a/engines/titanic/sound/restricted_auto_music_player.h +++ b/engines/titanic/sound/restricted_auto_music_player.h @@ -24,15 +24,18 @@ #define TITANIC_RESTRICTED_AUTO_MUSIC_PLAYER_H #include "titanic/sound/auto_music_player.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer { +class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer, CEnterRoomMsgTarget { private: CString _string3; CString _string4; CString _string5; CString _string6; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/sound/room_auto_sound_player.cpp b/engines/titanic/sound/room_auto_sound_player.cpp index 8c54726afc..b8557aaa81 100644 --- a/engines/titanic/sound/room_auto_sound_player.cpp +++ b/engines/titanic/sound/room_auto_sound_player.cpp @@ -34,4 +34,9 @@ void CRoomAutoSoundPlayer::load(SimpleFile *file) { CAutoSoundPlayer::load(file); } +bool CRoomAutoSoundPlayer::handleEvent(const CEnterRoomMsg &msg) { + warning("CRoomAutoSoundPlayer::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/sound/room_auto_sound_player.h b/engines/titanic/sound/room_auto_sound_player.h index ebee0165f6..bda9727a0f 100644 --- a/engines/titanic/sound/room_auto_sound_player.h +++ b/engines/titanic/sound/room_auto_sound_player.h @@ -24,10 +24,13 @@ #define TITANIC_ROOM_AUTO_SOUND_PLAYER_H #include "titanic/sound/auto_sound_player.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CRoomAutoSoundPlayer : public CAutoSoundPlayer { +class CRoomAutoSoundPlayer : public CAutoSoundPlayer, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/sound/room_trigger_auto_music_player.cpp b/engines/titanic/sound/room_trigger_auto_music_player.cpp new file mode 100644 index 0000000000..9e4da684d9 --- /dev/null +++ b/engines/titanic/sound/room_trigger_auto_music_player.cpp @@ -0,0 +1,42 @@ +/* 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_trigger_auto_music_player.h" + +namespace Titanic { + +void CRoomTriggerAutoMusicPlayer::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CTriggerAutoMusicPlayer::save(file, indent); +} + +void CRoomTriggerAutoMusicPlayer::load(SimpleFile *file) { + file->readNumber(); + CTriggerAutoMusicPlayer::load(file); +} + +bool CRoomTriggerAutoMusicPlayer::handleEvent(const CEnterRoomMsg &msg) { + warning("CRoomTriggerAutoMusicPlayer::handleEvent"); + return true; +} + +} // End of namespace Titanic diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h new file mode 100644 index 0000000000..1915f92de1 --- /dev/null +++ b/engines/titanic/sound/room_trigger_auto_music_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_TRIGGER_AUTO_MUSIC_PLAYER_H +#define TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H + +#include "titanic/sound/trigger_auto_music_player.h" +#include "titanic/messages/messages.h" + +namespace Titanic { + +class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer, CEnterRoomMsgTarget { +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); +public: + CLASSDEF + + /** + * 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_TRIGGER_AUTO_MUSIC_PLAYER_H */ diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp index fac166901f..87ab18a2cb 100644 --- a/engines/titanic/sound/titania_speech.cpp +++ b/engines/titanic/sound/titania_speech.cpp @@ -40,4 +40,9 @@ void CTitaniaSpeech::load(SimpleFile *file) { CGameObject::load(file); } +bool CTitaniaSpeech::handleEvent(const CEnterRoomMsg &msg) { + warning("CTitaniaSpeech::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/sound/titania_speech.h b/engines/titanic/sound/titania_speech.h index fc55c20af5..a981029c7d 100644 --- a/engines/titanic/sound/titania_speech.h +++ b/engines/titanic/sound/titania_speech.h @@ -24,12 +24,15 @@ #define TITANIC_TITANIA_SPEECH_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { class CTitaniaSpeech : public CGameObject { -public: +private: int _value1, _value2; +protected: + virtual bool handleEvent(const CEnterRoomMsg &msg); public: CLASSDEF CTitaniaSpeech() : CGameObject(), _value1(1), _value2(0) {} -- cgit v1.2.3