From 04b8c75a9371d0ad353cbf4cc86da6087e94c7df Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 17 Mar 2016 22:51:29 -0400 Subject: [PATCH] TITANIC: Add stubs for CEnterNodeMsg message handlers --- engines/titanic/core/saveable_object.cpp | 6 +++--- engines/titanic/game/doorbot_elevator_handler.cpp | 5 +++++ engines/titanic/game/doorbot_elevator_handler.h | 5 ++++- engines/titanic/game/phonograph.h | 2 +- engines/titanic/game/transport/lift_indicator.h | 2 +- engines/titanic/{gfx => game}/volume_control.cpp | 7 ++++++- engines/titanic/{gfx => game}/volume_control.h | 5 ++++- engines/titanic/module.mk | 2 +- engines/titanic/sound/node_auto_sound_player.cpp | 5 +++++ engines/titanic/sound/node_auto_sound_player.h | 5 ++++- engines/titanic/sound/restricted_auto_music_player.h | 2 +- 11 files changed, 35 insertions(+), 11 deletions(-) rename engines/titanic/{gfx => game}/volume_control.cpp (90%) rename engines/titanic/{gfx => game}/volume_control.h (89%) diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index e833a056ace..3e9dad369eb 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -206,6 +206,7 @@ #include "titanic/game/tow_parrot_nav.h" #include "titanic/game/up_lighter.h" #include "titanic/game/useless_lever.h" +#include "titanic/game/volume_control.h" #include "titanic/game/wheel_button.h" #include "titanic/game/wheel_hotspot.h" #include "titanic/game/wheel_spin.h" @@ -332,7 +333,6 @@ #include "titanic/gfx/text_skrew.h" #include "titanic/gfx/text_up.h" #include "titanic/gfx/toggle_switch.h" -#include "titanic/gfx/volume_control.h" #include "titanic/messages/messages.h" #include "titanic/messages/auto_sound_event.h" @@ -613,6 +613,7 @@ DEFFN(CTitaniaStillControl) DEFFN(CTOWParrotNav) DEFFN(CUpLighter) DEFFN(CUselessLever) +DEFFN(CVolumeControl) DEFFN(CWheelButton) DEFFN(CWheelHotSpot) DEFFN(CWheelSpin) @@ -743,7 +744,6 @@ DEFFN(CTextSkrew) DEFFN(CTextUp) DEFFN(CToggleButton) DEFFN(CToggleSwitch) -DEFFN(CVolumeControl) DEFFN(CActMsg) DEFFN(CActivationmsg) @@ -1183,6 +1183,7 @@ void CSaveableObject::initClassList() { ADDFN(CTOWParrotNav, CGameObject); ADDFN(CUpLighter, CDropTarget); ADDFN(CUselessLever, CToggleButton); + ADDFN(CVolumeControl, CGameObject); ADDFN(CWheelButton, CBackground); ADDFN(CWheelHotSpot, CBackground); ADDFN(CWheelSpin, CBackground); @@ -1313,7 +1314,6 @@ void CSaveableObject::initClassList() { ADDFN(CTextUp, CPetGraphic); ADDFN(CToggleButton, CBackground); ADDFN(CToggleSwitch, CGameObject); - ADDFN(CVolumeControl, CGameObject); ADDFN(CActMsg, CMessage); ADDFN(CActivationmsg, CMessage); diff --git a/engines/titanic/game/doorbot_elevator_handler.cpp b/engines/titanic/game/doorbot_elevator_handler.cpp index e4232c087b2..b8cec40e1a3 100644 --- a/engines/titanic/game/doorbot_elevator_handler.cpp +++ b/engines/titanic/game/doorbot_elevator_handler.cpp @@ -40,4 +40,9 @@ void CDoorbotElevatorHandler::load(SimpleFile *file) { CGameObject::load(file); } +bool CDoorbotElevatorHandler::handleEvent(const CEnterNodeMsg &msg) { + warning("CDoorbotElevatorHandler::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/doorbot_elevator_handler.h b/engines/titanic/game/doorbot_elevator_handler.h index e46929dfed0..4c34248a71e 100644 --- a/engines/titanic/game/doorbot_elevator_handler.h +++ b/engines/titanic/game/doorbot_elevator_handler.h @@ -24,13 +24,16 @@ #define TITANIC_DOORBOT_ELEVATOR_HANDLER_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CDoorbotElevatorHandler : public CGameObject { +class CDoorbotElevatorHandler : public CGameObject, CEnterNodeMsgTarget { private: static int _v1; int _value; +protected: + virtual bool handleEvent(const CEnterNodeMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/phonograph.h b/engines/titanic/game/phonograph.h index 3ba2d1ce87d..157bd440525 100644 --- a/engines/titanic/game/phonograph.h +++ b/engines/titanic/game/phonograph.h @@ -28,7 +28,7 @@ namespace Titanic { -class CPhonograph : public CMusicPlayer, CEnterRoomMsgTarget { +class CPhonograph : public CMusicPlayer { protected: CString _string2; int _fieldE0; diff --git a/engines/titanic/game/transport/lift_indicator.h b/engines/titanic/game/transport/lift_indicator.h index de913c56a5f..b707fbbed9e 100644 --- a/engines/titanic/game/transport/lift_indicator.h +++ b/engines/titanic/game/transport/lift_indicator.h @@ -28,7 +28,7 @@ namespace Titanic { -class CLiftindicator : public CLift, CEnterRoomMsgTarget { +class CLiftindicator : public CLift { private: int _fieldFC; Common::Point _pos2; diff --git a/engines/titanic/gfx/volume_control.cpp b/engines/titanic/game/volume_control.cpp similarity index 90% rename from engines/titanic/gfx/volume_control.cpp rename to engines/titanic/game/volume_control.cpp index 7c829169bb0..26f89a7b55d 100644 --- a/engines/titanic/gfx/volume_control.cpp +++ b/engines/titanic/game/volume_control.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/gfx/volume_control.h" +#include "titanic/game/volume_control.h" namespace Titanic { @@ -45,4 +45,9 @@ void CVolumeControl::load(SimpleFile *file) { CGameObject::load(file); } +bool CVolumeControl::handleEvent(const CEnterNodeMsg &msg) { + warning("CVolumeControl::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/gfx/volume_control.h b/engines/titanic/game/volume_control.h similarity index 89% rename from engines/titanic/gfx/volume_control.h rename to engines/titanic/game/volume_control.h index 7778bb8c520..8fa7d01a773 100644 --- a/engines/titanic/gfx/volume_control.h +++ b/engines/titanic/game/volume_control.h @@ -24,14 +24,17 @@ #define TITANIC_VOLUME_CONTROL_H #include "titanic/core/game_object.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CVolumeControl : public CGameObject { +class CVolumeControl : public CGameObject, CEnterNodeMsgTarget { private: int _fieldBC; CString _string1; int _fieldCC; +protected: + virtual bool handleEvent(const CEnterNodeMsg &msg); public: CLASSDEF CVolumeControl(); diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 7f9adaa0b4b..0fc6d3b7dd3 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -208,6 +208,7 @@ MODULE_OBJS := \ game/titania_still_control.o \ game/up_lighter.o \ game/useless_lever.o \ + game/volume_control.o \ game/wheel_button.o \ game/wheel_hotspot.o \ game/wheel_spin.o \ @@ -328,7 +329,6 @@ MODULE_OBJS := \ gfx/text_up.o \ gfx/toggle_button.o \ gfx/toggle_switch.o \ - gfx/volume_control.o \ messages/auto_sound_event.o \ messages/bilge_auto_sound_event.o \ messages/bilge_dispensor_event.o \ diff --git a/engines/titanic/sound/node_auto_sound_player.cpp b/engines/titanic/sound/node_auto_sound_player.cpp index 3a69535bd72..5709cf5e819 100644 --- a/engines/titanic/sound/node_auto_sound_player.cpp +++ b/engines/titanic/sound/node_auto_sound_player.cpp @@ -36,4 +36,9 @@ void CNodeAutoSoundPlayer::load(SimpleFile *file) { CAutoSoundPlayer::load(file); } +bool CNodeAutoSoundPlayer::handleEvent(const CEnterNodeMsg &msg) { + warning("CNodeAutoSoundPlayer::handleEvent"); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/sound/node_auto_sound_player.h b/engines/titanic/sound/node_auto_sound_player.h index 6fc56098f8a..c635d7e3e97 100644 --- a/engines/titanic/sound/node_auto_sound_player.h +++ b/engines/titanic/sound/node_auto_sound_player.h @@ -24,12 +24,15 @@ #define TITANIC_NODE_AUTO_SOUND_PLAYER_H #include "titanic/sound/auto_sound_player.h" +#include "titanic/messages/messages.h" namespace Titanic { -class CNodeAutoSoundPlayer : public CAutoSoundPlayer { +class CNodeAutoSoundPlayer : public CAutoSoundPlayer, CEnterNodeMsgTarget { private: int _fieldEC; +protected: + virtual bool handleEvent(const CEnterNodeMsg &msg); public: CLASSDEF CNodeAutoSoundPlayer() : CAutoSoundPlayer(), _fieldEC(1) {} diff --git a/engines/titanic/sound/restricted_auto_music_player.h b/engines/titanic/sound/restricted_auto_music_player.h index 60dcc6809da..a9f17d8729d 100644 --- a/engines/titanic/sound/restricted_auto_music_player.h +++ b/engines/titanic/sound/restricted_auto_music_player.h @@ -28,7 +28,7 @@ namespace Titanic { -class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer, CEnterRoomMsgTarget { +class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer { private: CString _string3; CString _string4;