From 9f1bab55972b8a6f88b83c2391c40a038ffb509d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 7 Apr 2016 22:03:35 -0400 Subject: TITANIC: Converting other message stubs to new format --- engines/titanic/core/background.h | 10 ++++---- engines/titanic/core/view_item.h | 9 ++++---- engines/titanic/game/arboretum_gate.h | 15 ++++++------ engines/titanic/game/auto_animate.cpp | 2 +- engines/titanic/game/auto_animate.h | 3 +-- engines/titanic/game/bar_bell.cpp | 2 +- engines/titanic/game/bar_bell.h | 3 +-- engines/titanic/game/bomb.cpp | 2 +- engines/titanic/game/bomb.h | 3 +-- engines/titanic/game/cdrom.cpp | 27 ++++++++++++++-------- engines/titanic/game/cdrom.h | 10 ++++---- engines/titanic/game/cdrom_tray.h | 7 +++--- engines/titanic/game/chicken_cooler.cpp | 2 +- engines/titanic/game/chicken_cooler.h | 3 +-- engines/titanic/game/dead_area.h | 5 ++-- engines/titanic/game/doorbot_elevator_handler.cpp | 2 +- engines/titanic/game/doorbot_elevator_handler.h | 3 +-- engines/titanic/game/end_sequence_control.cpp | 2 +- engines/titanic/game/end_sequence_control.h | 3 +-- engines/titanic/game/fan_noises.cpp | 2 +- engines/titanic/game/fan_noises.h | 3 +-- engines/titanic/game/get_lift_eye2.cpp | 2 +- engines/titanic/game/get_lift_eye2.h | 3 +-- engines/titanic/game/gondolier/gondolier_mixer.cpp | 6 ++--- engines/titanic/game/gondolier/gondolier_mixer.h | 3 +-- engines/titanic/game/light.cpp | 2 +- engines/titanic/game/light.h | 3 +-- engines/titanic/game/light_switch.cpp | 2 +- engines/titanic/game/light_switch.h | 3 +-- engines/titanic/game/long_stick_dispenser.cpp | 2 +- engines/titanic/game/long_stick_dispenser.h | 3 +-- .../titanic/game/parrot/player_meets_parrot.cpp | 2 +- engines/titanic/game/parrot/player_meets_parrot.h | 2 +- engines/titanic/game/pet/pet_monitor.cpp | 6 ++++- engines/titanic/game/pet/pet_monitor.h | 4 ++-- engines/titanic/game/pet/pet_position.cpp | 6 ++++- engines/titanic/game/pet/pet_position.h | 4 ++-- engines/titanic/game/pet/pet_transport.cpp | 6 ++++- engines/titanic/game/pet/pet_transport.h | 4 ++-- engines/titanic/game/phonograph.cpp | 2 +- engines/titanic/game/phonograph.h | 3 +-- engines/titanic/game/sgt/sgt_state_room.cpp | 6 ++++- engines/titanic/game/sgt/sgt_state_room.h | 4 ++-- engines/titanic/game/ship_setting.cpp | 2 +- engines/titanic/game/ship_setting.h | 3 +-- engines/titanic/game/start_action.cpp | 9 ++++++-- engines/titanic/game/start_action.h | 6 ++--- engines/titanic/game/television.h | 27 +++++++++++----------- engines/titanic/game/transport/lift.cpp | 6 ++++- engines/titanic/game/transport/lift.h | 4 ++-- engines/titanic/game/transport/lift_indicator.cpp | 4 ++++ engines/titanic/game/transport/lift_indicator.h | 4 ++-- engines/titanic/game/transport/pellerator.cpp | 6 ++++- engines/titanic/game/transport/pellerator.h | 4 ++-- engines/titanic/game/up_lighter.cpp | 2 +- engines/titanic/game/up_lighter.h | 3 +-- engines/titanic/game/volume_control.cpp | 2 +- engines/titanic/game/volume_control.h | 3 +-- engines/titanic/gfx/st_button.h | 7 +++--- engines/titanic/messages/bilge_dispensor_event.cpp | 2 +- engines/titanic/messages/bilge_dispensor_event.h | 3 +-- engines/titanic/moves/enter_bridge.cpp | 2 +- engines/titanic/moves/enter_bridge.h | 3 +-- engines/titanic/npcs/barbot.cpp | 2 +- engines/titanic/npcs/barbot.h | 3 +-- engines/titanic/npcs/liftbot.cpp | 2 +- engines/titanic/npcs/liftbot.h | 3 +-- engines/titanic/sound/auto_music_player.cpp | 2 +- engines/titanic/sound/auto_music_player.h | 3 +-- engines/titanic/sound/music_player.cpp | 2 +- engines/titanic/sound/music_player.h | 3 +-- engines/titanic/sound/node_auto_sound_player.cpp | 2 +- engines/titanic/sound/node_auto_sound_player.h | 3 +-- .../titanic/sound/restricted_auto_music_player.cpp | 2 +- .../titanic/sound/restricted_auto_music_player.h | 3 +-- engines/titanic/sound/room_auto_sound_player.cpp | 2 +- engines/titanic/sound/room_auto_sound_player.h | 3 +-- .../sound/room_trigger_auto_music_player.cpp | 2 +- .../titanic/sound/room_trigger_auto_music_player.h | 3 +-- engines/titanic/sound/titania_speech.cpp | 2 +- engines/titanic/sound/titania_speech.h | 3 +-- 81 files changed, 174 insertions(+), 169 deletions(-) (limited to 'engines') diff --git a/engines/titanic/core/background.h b/engines/titanic/core/background.h index 91c34073cd..f4969d4454 100644 --- a/engines/titanic/core/background.h +++ b/engines/titanic/core/background.h @@ -29,18 +29,16 @@ namespace Titanic { class CBackground : public CGameObject { + DECLARE_MESSAGE_MAP + bool StatusChangeMsg(CStatusChangeMsg *msg); + bool SetFrameMsg(CSetFrameMsg *msg); + bool VisibleMsg(CVisibleMsg *msg); protected: int _fieldBC; int _fieldC0; CString _string1; CString _string2; int _fieldDC; -protected: - DECLARE_MESSAGE_MAP - - virtual bool StatusChangeMsg(CStatusChangeMsg *msg); - virtual bool SetFrameMsg(CSetFrameMsg *msg); - virtual bool VisibleMsg(CVisibleMsg *msg); public: CLASSDEF CBackground(); diff --git a/engines/titanic/core/view_item.h b/engines/titanic/core/view_item.h index 95edc7a49a..5abcf1d012 100644 --- a/engines/titanic/core/view_item.h +++ b/engines/titanic/core/view_item.h @@ -31,6 +31,10 @@ namespace Titanic { class CViewItem : public CNamedItem { DECLARE_MESSAGE_MAP + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); + bool MouseMoveMsg(CMouseMoveMsg *msg); + bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg); private: CTreeItem *_buttonUpTargets[4]; private: @@ -51,11 +55,6 @@ protected: CResourceKey _resourceKey; int _field50; int _field54; -protected: - virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); - virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); - virtual bool MouseMoveMsg(CMouseMoveMsg *msg); - virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg); public: int _viewNumber; public: diff --git a/engines/titanic/game/arboretum_gate.h b/engines/titanic/game/arboretum_gate.h index 9b0674fe75..736f67bd7b 100644 --- a/engines/titanic/game/arboretum_gate.h +++ b/engines/titanic/game/arboretum_gate.h @@ -31,6 +31,13 @@ namespace Titanic { class CArboretumGate : public CBackground { DECLARE_MESSAGE_MAP + bool ActMsg(CActMsg *msg); + bool LeaveViewMsg(CLeaveViewMsg *msg); + bool TurnOff(CTurnOff *msg); + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool EnterViewMsg(CEnterViewMsg *msg); + bool TurnOn(CTurnOn *msg); + bool MovieEndMsg(CMovieEndMsg *msg); private: static int _v1; static int _v2; @@ -66,14 +73,6 @@ private: int _field14C; int _field150; CString _string2; -protected: - virtual bool ActMsg(CActMsg *msg); - virtual bool LeaveViewMsg(CLeaveViewMsg *msg); - virtual bool TurnOff(CTurnOff *msg); - virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); - virtual bool EnterViewMsg(CEnterViewMsg *msg); - virtual bool TurnOn(CTurnOn *msg); - virtual bool MovieEndMsg(CMovieEndMsg *msg); public: CLASSDEF CArboretumGate(); diff --git a/engines/titanic/game/auto_animate.cpp b/engines/titanic/game/auto_animate.cpp index 2a3f3719e6..8bd332a550 100644 --- a/engines/titanic/game/auto_animate.cpp +++ b/engines/titanic/game/auto_animate.cpp @@ -40,7 +40,7 @@ void CAutoAnimate::load(SimpleFile *file) { CBackground::load(file); } -bool CAutoAnimate::handleMessage(CEnterViewMsg &msg) { +bool CAutoAnimate::EnterViewMsg(CEnterViewMsg *msg) { warning("CAutoAnimate::handleEvent"); return true; } diff --git a/engines/titanic/game/auto_animate.h b/engines/titanic/game/auto_animate.h index 6fb85117ee..7130d6a5cf 100644 --- a/engines/titanic/game/auto_animate.h +++ b/engines/titanic/game/auto_animate.h @@ -29,12 +29,11 @@ namespace Titanic { class CAutoAnimate : public CBackground { + bool EnterViewMsg(CEnterViewMsg *msg); private: int _fieldE0; int _fieldE4; int _fieldE8; -protected: - virtual bool handleMessage(CEnterViewMsg &msg); public: CLASSDEF CAutoAnimate() : CBackground(), _fieldE0(1), _fieldE4(1), _fieldE8(0) {} diff --git a/engines/titanic/game/bar_bell.cpp b/engines/titanic/game/bar_bell.cpp index 84a4d04b49..adb563cfde 100644 --- a/engines/titanic/game/bar_bell.cpp +++ b/engines/titanic/game/bar_bell.cpp @@ -50,7 +50,7 @@ void CBarBell::load(SimpleFile *file) { CGameObject::load(file); } -bool CBarBell::handleMessage(CEnterRoomMsg &msg) { +bool CBarBell::EnterRoomMsg(CEnterRoomMsg *msg) { _fieldBC = 0; return true; } diff --git a/engines/titanic/game/bar_bell.h b/engines/titanic/game/bar_bell.h index 2d8a36b61a..b17d8089bc 100644 --- a/engines/titanic/game/bar_bell.h +++ b/engines/titanic/game/bar_bell.h @@ -29,14 +29,13 @@ namespace Titanic { class CBarBell : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); public: int _fieldBC; int _fieldC0; int _fieldC4; int _fieldC8; int _fieldCC; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CBarBell(); diff --git a/engines/titanic/game/bomb.cpp b/engines/titanic/game/bomb.cpp index 390ac2cd4e..a6086a2bca 100644 --- a/engines/titanic/game/bomb.cpp +++ b/engines/titanic/game/bomb.cpp @@ -70,7 +70,7 @@ void CBomb::load(SimpleFile *file) { CBackground::load(file); } -bool CBomb::handleMessage(CEnterRoomMsg &msg) { +bool CBomb::EnterRoomMsg(CEnterRoomMsg *msg) { _fieldE8 = 12; _fieldEC = 9; _fieldF0 = 0; diff --git a/engines/titanic/game/bomb.h b/engines/titanic/game/bomb.h index bd3852ef17..76799da323 100644 --- a/engines/titanic/game/bomb.h +++ b/engines/titanic/game/bomb.h @@ -29,6 +29,7 @@ namespace Titanic { class CBomb : public CBackground { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldE0; int _fieldE4; @@ -40,8 +41,6 @@ private: int _fieldFC; int _startingTicks; int _field104; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CBomb(); diff --git a/engines/titanic/game/cdrom.cpp b/engines/titanic/game/cdrom.cpp index 4f4089de73..0d89319a86 100644 --- a/engines/titanic/game/cdrom.cpp +++ b/engines/titanic/game/cdrom.cpp @@ -26,6 +26,13 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CCDROM, CGameObject) + ON_MESSAGE(MouseDragStartMsg) + ON_MESSAGE(MouseDragEndMsg) + ON_MESSAGE(MouseDragMoveMsg) + ON_MESSAGE(ActMsg) +END_MESSAGE_MAP() + CCDROM::CCDROM() : CGameObject() { } @@ -41,18 +48,18 @@ void CCDROM::load(SimpleFile *file) { CGameObject::load(file); } -bool CCDROM::handleMessage(CMouseDragStartMsg &msg) { - if (checkStartDragging(&msg)) { - _tempPos = msg._mousePos - _bounds; - setPosition(msg._mousePos - _tempPos); +bool CCDROM::MouseDragStartMsg(CMouseDragStartMsg *msg) { + if (checkStartDragging(msg)) { + _tempPos = msg->_mousePos - _bounds; + setPosition(msg->_mousePos - _tempPos); return true; } else { return false; } } -bool CCDROM::handleMessage(CMouseDragEndMsg &msg) { - if (msg._dropTarget && msg._dropTarget->getName() == "newComputer") { +bool CCDROM::MouseDragEndMsg(CMouseDragEndMsg *msg) { + if (msg->_dropTarget && msg->_dropTarget->getName() == "newComputer") { CCDROMTray *newTray = dynamic_cast(getRoom()->findByName("newTray")); if (newTray->_state && newTray->_insertedCD == "None") { @@ -65,13 +72,13 @@ bool CCDROM::handleMessage(CMouseDragEndMsg &msg) { return true; } -bool CCDROM::handleMessage(CMouseDragMoveMsg &msg) { - setPosition(msg._mousePos - _tempPos); +bool CCDROM::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { + setPosition(msg->_mousePos - _tempPos); return true; } -bool CCDROM::handleMessage(CActMsg &msg) { - if (msg._action == "Ejected") +bool CCDROM::ActMsg(CActMsg *msg) { + if (msg->_action == "Ejected") setVisible(true); return true; diff --git a/engines/titanic/game/cdrom.h b/engines/titanic/game/cdrom.h index fa1c80335a..44e1e82216 100644 --- a/engines/titanic/game/cdrom.h +++ b/engines/titanic/game/cdrom.h @@ -30,13 +30,13 @@ namespace Titanic { class CCDROM : public CGameObject { + DECLARE_MESSAGE_MAP + bool MouseDragStartMsg(CMouseDragStartMsg *msg); + bool MouseDragEndMsg(CMouseDragEndMsg *msg); + bool MouseDragMoveMsg(CMouseDragMoveMsg *msg); + bool ActMsg(CActMsg *msg); private: Point _tempPos; -protected: - virtual bool handleMessage(CMouseDragStartMsg &msg); - virtual bool handleMessage(CMouseDragEndMsg &msg); - virtual bool handleMessage(CMouseDragMoveMsg &msg); - virtual bool handleMessage(CActMsg &msg); public: CLASSDEF CCDROM(); diff --git a/engines/titanic/game/cdrom_tray.h b/engines/titanic/game/cdrom_tray.h index 728471c654..96faf64600 100644 --- a/engines/titanic/game/cdrom_tray.h +++ b/engines/titanic/game/cdrom_tray.h @@ -30,13 +30,12 @@ namespace Titanic { class CCDROMTray : public CGameObject { DECLARE_MESSAGE_MAP + bool ActMsg(CActMsg *msg); + bool MovieEndMsg(CMovieEndMsg *msg); + bool StatusChangeMsg(CStatusChangeMsg *msg); public: int _state; CString _insertedCD; -protected: - virtual bool ActMsg(CActMsg *msg); - virtual bool MovieEndMsg(CMovieEndMsg *msg); - virtual bool StatusChangeMsg(CStatusChangeMsg *msg); public: CLASSDEF CCDROMTray(); diff --git a/engines/titanic/game/chicken_cooler.cpp b/engines/titanic/game/chicken_cooler.cpp index ff7aae7323..aa39f041a4 100644 --- a/engines/titanic/game/chicken_cooler.cpp +++ b/engines/titanic/game/chicken_cooler.cpp @@ -40,7 +40,7 @@ void CChickenCooler::load(SimpleFile *file) { CGameObject::load(file); } -bool CChickenCooler::handleMessage(CEnterRoomMsg &msg) { +bool CChickenCooler::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CChickenCoolor::handlEvent"); return true; } diff --git a/engines/titanic/game/chicken_cooler.h b/engines/titanic/game/chicken_cooler.h index f15bba4983..220dba081b 100644 --- a/engines/titanic/game/chicken_cooler.h +++ b/engines/titanic/game/chicken_cooler.h @@ -29,11 +29,10 @@ namespace Titanic { class CChickenCooler : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldBC; int _fieldC0; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CChickenCooler() : CGameObject(), _fieldBC(0), _fieldC0(0) {} diff --git a/engines/titanic/game/dead_area.h b/engines/titanic/game/dead_area.h index 9a9de3ad92..367308e5b5 100644 --- a/engines/titanic/game/dead_area.h +++ b/engines/titanic/game/dead_area.h @@ -33,9 +33,8 @@ namespace Titanic { */ class CDeadArea : public CGameObject { DECLARE_MESSAGE_MAP -protected: - virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) { return true; } - virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return true; } + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) { return true; } + bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return true; } public: CLASSDEF CDeadArea(); diff --git a/engines/titanic/game/doorbot_elevator_handler.cpp b/engines/titanic/game/doorbot_elevator_handler.cpp index 257b663246..ae1894da53 100644 --- a/engines/titanic/game/doorbot_elevator_handler.cpp +++ b/engines/titanic/game/doorbot_elevator_handler.cpp @@ -40,7 +40,7 @@ void CDoorbotElevatorHandler::load(SimpleFile *file) { CGameObject::load(file); } -bool CDoorbotElevatorHandler::handleMessage(CEnterNodeMsg &msg) { +bool CDoorbotElevatorHandler::EnterNodeMsg(CEnterNodeMsg *msg) { warning("CDoorbotElevatorHandler::handleEvent"); return true; } diff --git a/engines/titanic/game/doorbot_elevator_handler.h b/engines/titanic/game/doorbot_elevator_handler.h index 351fb1f13b..2bbfab906b 100644 --- a/engines/titanic/game/doorbot_elevator_handler.h +++ b/engines/titanic/game/doorbot_elevator_handler.h @@ -29,11 +29,10 @@ namespace Titanic { class CDoorbotElevatorHandler : public CGameObject { + bool EnterNodeMsg(CEnterNodeMsg *msg); private: static int _v1; int _value; -protected: - virtual bool handleMessage(CEnterNodeMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/end_sequence_control.cpp b/engines/titanic/game/end_sequence_control.cpp index 41bbc9d93c..2417214f16 100644 --- a/engines/titanic/game/end_sequence_control.cpp +++ b/engines/titanic/game/end_sequence_control.cpp @@ -34,7 +34,7 @@ void CEndSequenceControl::load(SimpleFile *file) { CGameObject::load(file); } -bool CEndSequenceControl::handleMessage(CEnterRoomMsg &msg) { +bool CEndSequenceControl::EnterRoomMsg(CEnterRoomMsg *msg) { warning("TODO: CEndSequenceControl::handleEvent"); return true; } diff --git a/engines/titanic/game/end_sequence_control.h b/engines/titanic/game/end_sequence_control.h index 61165e3ba5..64bafcbd0b 100644 --- a/engines/titanic/game/end_sequence_control.h +++ b/engines/titanic/game/end_sequence_control.h @@ -29,8 +29,7 @@ namespace Titanic { class CEndSequenceControl : public CGameObject { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp index d7dd4e28b3..18a6ef76ce 100644 --- a/engines/titanic/game/fan_noises.cpp +++ b/engines/titanic/game/fan_noises.cpp @@ -55,7 +55,7 @@ void CFanNoises::load(SimpleFile *file) { CGameObject::load(file); } -bool CFanNoises::handleMessage(CEnterRoomMsg &msg) { +bool CFanNoises::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CFanNoises::handleEvent"); return true; } diff --git a/engines/titanic/game/fan_noises.h b/engines/titanic/game/fan_noises.h index 778891e6e1..a78b3ca897 100644 --- a/engines/titanic/game/fan_noises.h +++ b/engines/titanic/game/fan_noises.h @@ -29,6 +29,7 @@ namespace Titanic { class CFanNoises : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldBC; int _fieldC0; @@ -37,8 +38,6 @@ private: int _fieldCC; int _fieldD0; int _fieldD4; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CFanNoises(); diff --git a/engines/titanic/game/get_lift_eye2.cpp b/engines/titanic/game/get_lift_eye2.cpp index 5f3fac315d..76e6d2aa64 100644 --- a/engines/titanic/game/get_lift_eye2.cpp +++ b/engines/titanic/game/get_lift_eye2.cpp @@ -46,7 +46,7 @@ void CGetLiftEye2::load(SimpleFile *file) { CGameObject::load(file); } -bool CGetLiftEye2::handleMessage(CEnterRoomMsg &msg) { +bool CGetLiftEye2::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CGetLiftEye2::handleEvent"); return true; } diff --git a/engines/titanic/game/get_lift_eye2.h b/engines/titanic/game/get_lift_eye2.h index f7195878e0..16ccf83f2a 100644 --- a/engines/titanic/game/get_lift_eye2.h +++ b/engines/titanic/game/get_lift_eye2.h @@ -28,10 +28,9 @@ namespace Titanic { class CGetLiftEye2 : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static CString *_v1; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF static void init(); diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp index 2bd3313d47..76bf2597d9 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.cpp +++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp @@ -57,10 +57,10 @@ void CGondolierMixer::load(SimpleFile *file) { CGondolierBase::load(file); } -bool CGondolierMixer::handleMessage(CEnterRoomMsg &msg) { +bool CGondolierMixer::EnterRoomMsg(CEnterRoomMsg *msg) { CRoomItem *parentRoom = dynamic_cast(getParent()); - if (parentRoom == msg._newRoom) - msg.execute(parentRoom); + if (parentRoom == msg->_newRoom) + msg->execute(parentRoom); return true; } diff --git a/engines/titanic/game/gondolier/gondolier_mixer.h b/engines/titanic/game/gondolier/gondolier_mixer.h index 1186393d04..2202d24d5f 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.h +++ b/engines/titanic/game/gondolier/gondolier_mixer.h @@ -29,6 +29,7 @@ namespace Titanic { class CGondolierMixer : public CGondolierBase { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldBC; int _fieldC0; @@ -37,8 +38,6 @@ private: CString _string1; CString _string2; int _fieldE4; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CGondolierMixer(); diff --git a/engines/titanic/game/light.cpp b/engines/titanic/game/light.cpp index c0b7df300f..6b5ff51f28 100644 --- a/engines/titanic/game/light.cpp +++ b/engines/titanic/game/light.cpp @@ -57,7 +57,7 @@ void CLight::load(SimpleFile *file) { CBackground::load(file); } -bool CLight::handleMessage(CEnterRoomMsg &msg) { +bool CLight::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CLight::handleEvent"); return true; } diff --git a/engines/titanic/game/light.h b/engines/titanic/game/light.h index e419a3bcd6..625e256b5c 100644 --- a/engines/titanic/game/light.h +++ b/engines/titanic/game/light.h @@ -29,6 +29,7 @@ namespace Titanic { class CLight : public CBackground { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldE0; int _fieldE4; @@ -38,8 +39,6 @@ private: int _fieldF4; int _fieldF8; int _fieldFC; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CLight(); diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 0e68dda0dc..78a0548f41 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -50,7 +50,7 @@ void CLightSwitch::load(SimpleFile *file) { CBackground::load(file); } -bool CLightSwitch::handleMessage(CEnterRoomMsg &msg) { +bool CLightSwitch::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CLightSwitch::handleEvent"); return true; } diff --git a/engines/titanic/game/light_switch.h b/engines/titanic/game/light_switch.h index f2132c9bdf..80adf81582 100644 --- a/engines/titanic/game/light_switch.h +++ b/engines/titanic/game/light_switch.h @@ -29,14 +29,13 @@ namespace Titanic { class CLightSwitch : public CBackground { + bool EnterRoomMsg(CEnterRoomMsg *msg); public: static int _v1; private: int _fieldE0; int _fieldE4; int _fieldE8; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CLightSwitch(); diff --git a/engines/titanic/game/long_stick_dispenser.cpp b/engines/titanic/game/long_stick_dispenser.cpp index 9511d7b017..cf1109604f 100644 --- a/engines/titanic/game/long_stick_dispenser.cpp +++ b/engines/titanic/game/long_stick_dispenser.cpp @@ -42,7 +42,7 @@ void CLongStickDispenser::load(SimpleFile *file) { CGameObject::load(file); } -bool CLongStickDispenser::handleMessage(CEnterRoomMsg &msg) { +bool CLongStickDispenser::EnterRoomMsg(CEnterRoomMsg *msg) { _fieldC0 = 0; _fieldC4 = 1; return true; diff --git a/engines/titanic/game/long_stick_dispenser.h b/engines/titanic/game/long_stick_dispenser.h index 5e43bfa62f..bf5db20e1d 100644 --- a/engines/titanic/game/long_stick_dispenser.h +++ b/engines/titanic/game/long_stick_dispenser.h @@ -29,12 +29,11 @@ namespace Titanic { class CLongStickDispenser : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _fieldBC; int _fieldC0; int _fieldC4; -protected: - virtual bool handleMessage(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 16c8f480dd..15dd29009a 100644 --- a/engines/titanic/game/parrot/player_meets_parrot.cpp +++ b/engines/titanic/game/parrot/player_meets_parrot.cpp @@ -34,7 +34,7 @@ void CPlayerMeetsParrot::load(SimpleFile *file) { CGameObject::load(file); } -bool CPlayerMeetsParrot::handleMessage(CEnterRoomMsg &msg) { +bool CPlayerMeetsParrot::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPlayerMeetsParrot::handleEvent"); return true; } diff --git a/engines/titanic/game/parrot/player_meets_parrot.h b/engines/titanic/game/parrot/player_meets_parrot.h index bc96cb84f7..53fa63a95c 100644 --- a/engines/titanic/game/parrot/player_meets_parrot.h +++ b/engines/titanic/game/parrot/player_meets_parrot.h @@ -30,7 +30,7 @@ namespace Titanic { class CPlayerMeetsParrot : public CGameObject { protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_monitor.cpp b/engines/titanic/game/pet/pet_monitor.cpp index afe0836e65..ebbddd8587 100644 --- a/engines/titanic/game/pet/pet_monitor.cpp +++ b/engines/titanic/game/pet/pet_monitor.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPETMonitor, CGameObject) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + void CPETMonitor::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); CGameObject::save(file, indent); @@ -34,7 +38,7 @@ void CPETMonitor::load(SimpleFile *file) { CGameObject::load(file); } -bool CPETMonitor::handleMessage(CEnterRoomMsg &msg) { +bool CPETMonitor::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPETMonitor::handleEvent"); return true; } diff --git a/engines/titanic/game/pet/pet_monitor.h b/engines/titanic/game/pet/pet_monitor.h index 56116d8313..a53f360ed1 100644 --- a/engines/titanic/game/pet/pet_monitor.h +++ b/engines/titanic/game/pet/pet_monitor.h @@ -29,8 +29,8 @@ namespace Titanic { class CPETMonitor : public CGameObject { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_position.cpp b/engines/titanic/game/pet/pet_position.cpp index e1dab2218f..66e8e36231 100644 --- a/engines/titanic/game/pet/pet_position.cpp +++ b/engines/titanic/game/pet/pet_position.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPETPosition, CGameObject) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + void CPETPosition::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); CGameObject::save(file, indent); @@ -34,7 +38,7 @@ void CPETPosition::load(SimpleFile *file) { CGameObject::load(file); } -bool CPETPosition::handleMessage(CEnterRoomMsg &msg) { +bool CPETPosition::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPETPosition::handleEvent"); return true; } diff --git a/engines/titanic/game/pet/pet_position.h b/engines/titanic/game/pet/pet_position.h index 589f2b60b1..f4f0fd5299 100644 --- a/engines/titanic/game/pet/pet_position.h +++ b/engines/titanic/game/pet/pet_position.h @@ -29,8 +29,8 @@ namespace Titanic { class CPETPosition : public CGameObject { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/game/pet/pet_transport.cpp b/engines/titanic/game/pet/pet_transport.cpp index 36685676ac..bcbf319fd0 100644 --- a/engines/titanic/game/pet/pet_transport.cpp +++ b/engines/titanic/game/pet/pet_transport.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPETTransport, CGameObject) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + void CPETTransport::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); CGameObject::save(file, indent); @@ -34,7 +38,7 @@ void CPETTransport::load(SimpleFile *file) { CGameObject::load(file); } -bool CPETTransport::handleMessage(CEnterRoomMsg &msg) { +bool CPETTransport::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPETTransport::handleEvent"); return true; } diff --git a/engines/titanic/game/pet/pet_transport.h b/engines/titanic/game/pet/pet_transport.h index 2c94bb6fe7..052fd7bda0 100644 --- a/engines/titanic/game/pet/pet_transport.h +++ b/engines/titanic/game/pet/pet_transport.h @@ -29,8 +29,8 @@ namespace Titanic { class CPETTransport : public CGameObject { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + DECLARE_MESSAGE_MAP + virtual bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/game/phonograph.cpp b/engines/titanic/game/phonograph.cpp index 749bf33b24..f086376651 100644 --- a/engines/titanic/game/phonograph.cpp +++ b/engines/titanic/game/phonograph.cpp @@ -55,7 +55,7 @@ void CPhonograph::load(SimpleFile *file) { CMusicPlayer::load(file); } -bool CPhonograph::handleMessage(CEnterRoomMsg &msg) { +bool CPhonograph::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPhonograph::handleEvent"); return true; } diff --git a/engines/titanic/game/phonograph.h b/engines/titanic/game/phonograph.h index 102edd2ace..c5f5a90c9c 100644 --- a/engines/titanic/game/phonograph.h +++ b/engines/titanic/game/phonograph.h @@ -29,6 +29,7 @@ namespace Titanic { class CPhonograph : public CMusicPlayer { + bool EnterRoomMsg(CEnterRoomMsg *msg); protected: CString _string2; int _fieldE0; @@ -37,8 +38,6 @@ protected: int _fieldEC; int _fieldF0; int _fieldF4; -protected: - virtual bool handleMessage(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 9baae69afb..1a68131589 100644 --- a/engines/titanic/game/sgt/sgt_state_room.cpp +++ b/engines/titanic/game/sgt/sgt_state_room.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CSGTStateRoom, CBackground) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + CSGTStateRoomStatics *CSGTStateRoom::_statics; void CSGTStateRoom::init() { @@ -90,7 +94,7 @@ void CSGTStateRoom::load(SimpleFile *file) { CBackground::load(file); } -bool CSGTStateRoom::handleMessage(CEnterRoomMsg &msg) { +bool CSGTStateRoom::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CSGTStateRoom::handleEvent"); return true; } diff --git a/engines/titanic/game/sgt/sgt_state_room.h b/engines/titanic/game/sgt/sgt_state_room.h index 7ae961145f..7b2b5a81f0 100644 --- a/engines/titanic/game/sgt/sgt_state_room.h +++ b/engines/titanic/game/sgt/sgt_state_room.h @@ -46,6 +46,8 @@ struct CSGTStateRoomStatics { }; class CSGTStateRoom : public CBackground { + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static CSGTStateRoomStatics *_statics; private: @@ -54,8 +56,6 @@ private: int _fieldE8; int _fieldEC; int _fieldF0; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CSGTStateRoom(); diff --git a/engines/titanic/game/ship_setting.cpp b/engines/titanic/game/ship_setting.cpp index 1da27923c5..037a199816 100644 --- a/engines/titanic/game/ship_setting.cpp +++ b/engines/titanic/game/ship_setting.cpp @@ -48,7 +48,7 @@ void CShipSetting::load(SimpleFile *file) { CBackground::load(file); } -bool CShipSetting::handleMessage(CEnterRoomMsg &msg) { +bool CShipSetting::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CShipSetting::handleEvent"); return true; } diff --git a/engines/titanic/game/ship_setting.h b/engines/titanic/game/ship_setting.h index 5b5ea68719..9783e69461 100644 --- a/engines/titanic/game/ship_setting.h +++ b/engines/titanic/game/ship_setting.h @@ -29,13 +29,12 @@ namespace Titanic { class CShipSetting : public CBackground { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: CString _string3; Point _pos1; CString _string4; CString _string5; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CShipSetting(); diff --git a/engines/titanic/game/start_action.cpp b/engines/titanic/game/start_action.cpp index 05ceb9d0b0..e41b7df4bf 100644 --- a/engines/titanic/game/start_action.cpp +++ b/engines/titanic/game/start_action.cpp @@ -25,6 +25,11 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CStartAction, CBackground) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(MouseButtonUpMsg) +END_MESSAGE_MAP() + CStartAction::CStartAction() : CBackground() { } @@ -44,7 +49,7 @@ void CStartAction::load(SimpleFile *file) { CBackground::load(file); } -bool CStartAction::handleMessage(CMouseButtonDownMsg &msg) { +bool CStartAction::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { // Dispatch the desired action to the desired target CActMsg actMsg(_msgAction); actMsg.execute(_msgTarget); @@ -52,7 +57,7 @@ bool CStartAction::handleMessage(CMouseButtonDownMsg &msg) { return true; } -bool CStartAction::handleMessage(CMouseButtonUpMsg &msg) { +bool CStartAction::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return true; } diff --git a/engines/titanic/game/start_action.h b/engines/titanic/game/start_action.h index ebdc4abf25..de3c488c14 100644 --- a/engines/titanic/game/start_action.h +++ b/engines/titanic/game/start_action.h @@ -29,12 +29,12 @@ namespace Titanic { class CStartAction : public CBackground { + DECLARE_MESSAGE_MAP + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); protected: CString _msgTarget; CString _msgAction; -protected: - virtual bool handleMessage(CMouseButtonDownMsg &msg); - virtual bool handleMessage(CMouseButtonUpMsg &msg); public: CLASSDEF CStartAction(); diff --git a/engines/titanic/game/television.h b/engines/titanic/game/television.h index 54e86636d0..4c16a320ab 100644 --- a/engines/titanic/game/television.h +++ b/engines/titanic/game/television.h @@ -31,6 +31,19 @@ namespace Titanic { class CTelevision : public CBackground { DECLARE_MESSAGE_MAP + bool LeaveViewMsg(CLeaveViewMsg *msg); + bool ChangeSeasonMsg(CChangeSeasonMsg *msg); + bool EnterViewMsg(CEnterViewMsg *msg); + bool PETUpMsg(CPETUpMsg *msg); + bool PETDownMsg(CPETDownMsg *msg); + bool StatusChangeMsg(CStatusChangeMsg *msg); + bool ActMsg(CActMsg *msg); + bool PETActivateMsg(CPETActivateMsg *msg); + bool MovieEndMsg(CMovieEndMsg *msg); + bool ShipSettingMsg(CShipSettingMsg *msg); + bool TurnOff(CTurnOff *msg); + bool TurnOn(CTurnOn *msg); + bool LightsMsg(CLightsMsg *msg); private: static int _v1; static bool _turnOn; @@ -44,20 +57,6 @@ private: bool _isOn; int _fieldEC; int _fieldF0; -protected: - virtual bool LeaveViewMsg(CLeaveViewMsg *msg); - virtual bool ChangeSeasonMsg(CChangeSeasonMsg *msg); - virtual bool EnterViewMsg(CEnterViewMsg *msg); - virtual bool PETUpMsg(CPETUpMsg *msg); - virtual bool PETDownMsg(CPETDownMsg *msg); - virtual bool StatusChangeMsg(CStatusChangeMsg *msg); - virtual bool ActMsg(CActMsg *msg); - virtual bool PETActivateMsg(CPETActivateMsg *msg); - virtual bool MovieEndMsg(CMovieEndMsg *msg); - virtual bool ShipSettingMsg(CShipSettingMsg *msg); - virtual bool TurnOff(CTurnOff *msg); - virtual bool TurnOn(CTurnOn *msg); - virtual bool LightsMsg(CLightsMsg *msg); public: CLASSDEF CTelevision(); diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp index a795a15a16..e978762528 100644 --- a/engines/titanic/game/transport/lift.cpp +++ b/engines/titanic/game/transport/lift.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CLift, CTransport) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + int CLift::_v1; int CLift::_v2; int CLift::_v3; @@ -57,7 +61,7 @@ void CLift::load(SimpleFile *file) { CTransport::load(file); } -bool CLift::handleMessage(CEnterRoomMsg &msg) { +bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CLift::handleEvent"); return true; } diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h index dc324e10c0..161061c042 100644 --- a/engines/titanic/game/transport/lift.h +++ b/engines/titanic/game/transport/lift.h @@ -29,6 +29,8 @@ namespace Titanic { class CLift : public CTransport { + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static int _v1; static int _v2; @@ -38,8 +40,6 @@ private: static int _v6; int _fieldF8; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CLift() : CTransport(), _fieldF8(1) {} diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp index ebeaf55e2e..eb7f6bfa1c 100644 --- a/engines/titanic/game/transport/lift_indicator.cpp +++ b/engines/titanic/game/transport/lift_indicator.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CLiftindicator, CLift) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + CLiftindicator::CLiftindicator() : CLift(), _fieldFC(0), _field108(0), _field10C(0) { } diff --git a/engines/titanic/game/transport/lift_indicator.h b/engines/titanic/game/transport/lift_indicator.h index 7cc5585d3b..c73d1f46d4 100644 --- a/engines/titanic/game/transport/lift_indicator.h +++ b/engines/titanic/game/transport/lift_indicator.h @@ -29,13 +29,13 @@ namespace Titanic { class CLiftindicator : public CLift { + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg) { return true; } private: int _fieldFC; Point _pos2; int _field108; int _field10C; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg) { return true; } public: CLASSDEF CLiftindicator(); diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp index eca1037128..ed82aa9c3d 100644 --- a/engines/titanic/game/transport/pellerator.cpp +++ b/engines/titanic/game/transport/pellerator.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPellerator, CTransport) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + int CPellerator::_v1; int CPellerator::_v2; @@ -43,7 +47,7 @@ void CPellerator::load(SimpleFile *file) { CTransport::load(file); } -bool CPellerator::handleMessage(CEnterRoomMsg &msg) { +bool CPellerator::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CPellerator::handleEvent"); return true; } diff --git a/engines/titanic/game/transport/pellerator.h b/engines/titanic/game/transport/pellerator.h index 82809a0717..0539b5ceac 100644 --- a/engines/titanic/game/transport/pellerator.h +++ b/engines/titanic/game/transport/pellerator.h @@ -29,11 +29,11 @@ namespace Titanic { class CPellerator : public CTransport { + DECLARE_MESSAGE_MAP + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static int _v1; static int _v2; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF diff --git a/engines/titanic/game/up_lighter.cpp b/engines/titanic/game/up_lighter.cpp index 819dc9435a..50cd1d426f 100644 --- a/engines/titanic/game/up_lighter.cpp +++ b/engines/titanic/game/up_lighter.cpp @@ -48,7 +48,7 @@ void CUpLighter::load(SimpleFile *file) { CDropTarget::load(file); } -bool CUpLighter::handleMessage(CEnterRoomMsg &msg) { +bool CUpLighter::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CUpLighter::handleEvent"); return true; } diff --git a/engines/titanic/game/up_lighter.h b/engines/titanic/game/up_lighter.h index 27b1d7b8fd..a3f8b2a7f2 100644 --- a/engines/titanic/game/up_lighter.h +++ b/engines/titanic/game/up_lighter.h @@ -29,13 +29,12 @@ namespace Titanic { class CUpLighter : public CDropTarget { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _field118; int _field11C; int _field120; int _field124; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CUpLighter(); diff --git a/engines/titanic/game/volume_control.cpp b/engines/titanic/game/volume_control.cpp index bb58deebce..e9b66c769e 100644 --- a/engines/titanic/game/volume_control.cpp +++ b/engines/titanic/game/volume_control.cpp @@ -45,7 +45,7 @@ void CVolumeControl::load(SimpleFile *file) { CGameObject::load(file); } -bool CVolumeControl::handleMessage(CEnterNodeMsg &msg) { +bool CVolumeControl::EnterNodeMsg(CEnterNodeMsg *msg) { warning("CVolumeControl::handleEvent"); return true; } diff --git a/engines/titanic/game/volume_control.h b/engines/titanic/game/volume_control.h index ae10d975e2..cef5ac492f 100644 --- a/engines/titanic/game/volume_control.h +++ b/engines/titanic/game/volume_control.h @@ -29,12 +29,11 @@ namespace Titanic { class CVolumeControl : public CGameObject { + bool EnterNodeMsg(CEnterNodeMsg *msg); private: int _fieldBC; CString _string1; int _fieldCC; -protected: - virtual bool handleMessage(CEnterNodeMsg &msg); public: CLASSDEF CVolumeControl(); diff --git a/engines/titanic/gfx/st_button.h b/engines/titanic/gfx/st_button.h index fd2b0fa401..d3dd5c4e76 100644 --- a/engines/titanic/gfx/st_button.h +++ b/engines/titanic/gfx/st_button.h @@ -31,6 +31,9 @@ namespace Titanic { class CSTButton : public CBackground { DECLARE_MESSAGE_MAP + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); + bool EnterViewMsg(CEnterViewMsg *msg); private: int _statusInc; CString _statusTarget; @@ -39,10 +42,6 @@ private: CString _string4; CString _string5; int _buttonFrame; -protected: - virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); - virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); - virtual bool EnterViewMsg(CEnterViewMsg *msg); public: CLASSDEF CSTButton(); diff --git a/engines/titanic/messages/bilge_dispensor_event.cpp b/engines/titanic/messages/bilge_dispensor_event.cpp index e17494c5e2..f0daa7aa5e 100644 --- a/engines/titanic/messages/bilge_dispensor_event.cpp +++ b/engines/titanic/messages/bilge_dispensor_event.cpp @@ -34,7 +34,7 @@ void CBilgeDispensorEvent::load(SimpleFile *file) { CAutoSoundEvent::load(file); } -bool CBilgeDispensorEvent::handleMessage(CEnterRoomMsg &msg) { +bool CBilgeDispensorEvent::EnterRoomMsg(CEnterRoomMsg *msg) { _value1 = 0; return true; } diff --git a/engines/titanic/messages/bilge_dispensor_event.h b/engines/titanic/messages/bilge_dispensor_event.h index de8705f604..df6e1127c1 100644 --- a/engines/titanic/messages/bilge_dispensor_event.h +++ b/engines/titanic/messages/bilge_dispensor_event.h @@ -29,8 +29,7 @@ namespace Titanic { class CBilgeDispensorEvent : public CAutoSoundEvent { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/moves/enter_bridge.cpp b/engines/titanic/moves/enter_bridge.cpp index 8916fa90e7..f5269348a9 100644 --- a/engines/titanic/moves/enter_bridge.cpp +++ b/engines/titanic/moves/enter_bridge.cpp @@ -36,7 +36,7 @@ void CEnterBridge::load(SimpleFile *file) { CGameObject::load(file); } -bool CEnterBridge::handleMessage(CEnterRoomMsg &msg) { +bool CEnterBridge::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CEnterBridge::handlEvent"); return true; } diff --git a/engines/titanic/moves/enter_bridge.h b/engines/titanic/moves/enter_bridge.h index 0920443e1d..fee299adf0 100644 --- a/engines/titanic/moves/enter_bridge.h +++ b/engines/titanic/moves/enter_bridge.h @@ -29,10 +29,9 @@ namespace Titanic { class CEnterBridge : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _value; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CEnterBridge() : CGameObject(), _value(1) {} diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp index e487dc1ecb..8abf41d426 100644 --- a/engines/titanic/npcs/barbot.cpp +++ b/engines/titanic/npcs/barbot.cpp @@ -233,7 +233,7 @@ void CBarbot::load(SimpleFile *file) { CTrueTalkNPC::load(file); } -bool CBarbot::handleMessage(CEnterRoomMsg &msg) { +bool CBarbot::EnterRoomMsg(CEnterRoomMsg *msg) { warning("TODO: Barbot::CEnterRoomMsg"); return true; } diff --git a/engines/titanic/npcs/barbot.h b/engines/titanic/npcs/barbot.h index 158db10f7a..fa06f8f638 100644 --- a/engines/titanic/npcs/barbot.h +++ b/engines/titanic/npcs/barbot.h @@ -29,6 +29,7 @@ namespace Titanic { class CBarbot : public CTrueTalkNPC { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static int _v0; private: @@ -173,8 +174,6 @@ private: int _field338; int _field33C; int _field340; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CBarbot(); diff --git a/engines/titanic/npcs/liftbot.cpp b/engines/titanic/npcs/liftbot.cpp index a412d43ff1..0125406d6a 100644 --- a/engines/titanic/npcs/liftbot.cpp +++ b/engines/titanic/npcs/liftbot.cpp @@ -48,7 +48,7 @@ void CLiftBot::load(SimpleFile *file) { CTrueTalkNPC::load(file); } -bool CLiftBot::handleMessage(CEnterRoomMsg &msg) { +bool CLiftBot::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CLiftBot::handleEvent"); return true; } diff --git a/engines/titanic/npcs/liftbot.h b/engines/titanic/npcs/liftbot.h index a984ea8ffb..d0db94e95d 100644 --- a/engines/titanic/npcs/liftbot.h +++ b/engines/titanic/npcs/liftbot.h @@ -29,13 +29,12 @@ namespace Titanic { class CLiftBot : public CTrueTalkNPC { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: static int _v1; static int _v2; private: int _field108; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CLiftBot(); diff --git a/engines/titanic/sound/auto_music_player.cpp b/engines/titanic/sound/auto_music_player.cpp index 5981a707bd..309c57b1d5 100644 --- a/engines/titanic/sound/auto_music_player.cpp +++ b/engines/titanic/sound/auto_music_player.cpp @@ -41,7 +41,7 @@ void CAutoMusicPlayer::load(SimpleFile *file) { CAutoMusicPlayerBase::load(file); } -bool CAutoMusicPlayer::handleMessage(CEnterRoomMsg &msg) { +bool CAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { if (!_fieldCC) { warning("TODO"); } diff --git a/engines/titanic/sound/auto_music_player.h b/engines/titanic/sound/auto_music_player.h index 0848439d49..063778c02a 100644 --- a/engines/titanic/sound/auto_music_player.h +++ b/engines/titanic/sound/auto_music_player.h @@ -29,10 +29,9 @@ namespace Titanic { class CAutoMusicPlayer : public CAutoMusicPlayerBase { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: CString _string2; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CAutoMusicPlayer(); diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp index eaad635dd3..193527b3d8 100644 --- a/engines/titanic/sound/music_player.cpp +++ b/engines/titanic/sound/music_player.cpp @@ -44,7 +44,7 @@ void CMusicPlayer::load(SimpleFile *file) { CGameObject::load(file); } -bool CMusicPlayer::handleMessage(CEnterRoomMsg &msg) { +bool CMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { warning("TODO: CMusicPlayer::handleEvent"); return true; } diff --git a/engines/titanic/sound/music_player.h b/engines/titanic/sound/music_player.h index 614fa375cd..1b928fa652 100644 --- a/engines/titanic/sound/music_player.h +++ b/engines/titanic/sound/music_player.h @@ -29,13 +29,12 @@ namespace Titanic { class CMusicPlayer : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); protected: int _fieldBC; CString _string1; int _fieldCC; int _fieldD0; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CMusicPlayer() : CGameObject(), diff --git a/engines/titanic/sound/node_auto_sound_player.cpp b/engines/titanic/sound/node_auto_sound_player.cpp index 5af8ca25d3..ee403bae20 100644 --- a/engines/titanic/sound/node_auto_sound_player.cpp +++ b/engines/titanic/sound/node_auto_sound_player.cpp @@ -36,7 +36,7 @@ void CNodeAutoSoundPlayer::load(SimpleFile *file) { CAutoSoundPlayer::load(file); } -bool CNodeAutoSoundPlayer::handleMessage(CEnterNodeMsg &msg) { +bool CNodeAutoSoundPlayer::EnterNodeMsg(CEnterNodeMsg *msg) { warning("CNodeAutoSoundPlayer::handleEvent"); return true; } diff --git a/engines/titanic/sound/node_auto_sound_player.h b/engines/titanic/sound/node_auto_sound_player.h index 451b94688d..2f961ddcd9 100644 --- a/engines/titanic/sound/node_auto_sound_player.h +++ b/engines/titanic/sound/node_auto_sound_player.h @@ -29,10 +29,9 @@ namespace Titanic { class CNodeAutoSoundPlayer : public CAutoSoundPlayer { + bool EnterNodeMsg(CEnterNodeMsg *msg); private: int _fieldEC; -protected: - virtual bool handleMessage(CEnterNodeMsg &msg); public: CLASSDEF CNodeAutoSoundPlayer() : CAutoSoundPlayer(), _fieldEC(1) {} diff --git a/engines/titanic/sound/restricted_auto_music_player.cpp b/engines/titanic/sound/restricted_auto_music_player.cpp index 7b5ba707c2..cd1b1930e7 100644 --- a/engines/titanic/sound/restricted_auto_music_player.cpp +++ b/engines/titanic/sound/restricted_auto_music_player.cpp @@ -44,7 +44,7 @@ void CRestrictedAutoMusicPlayer::load(SimpleFile *file) { CAutoMusicPlayer::load(file); } -bool CRestrictedAutoMusicPlayer::handleMessage(CEnterRoomMsg &msg) { +bool CRestrictedAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CRestrictedAutoMusicPlayer::handleEvent"); return true; } diff --git a/engines/titanic/sound/restricted_auto_music_player.h b/engines/titanic/sound/restricted_auto_music_player.h index 3553d1c63b..b2882964aa 100644 --- a/engines/titanic/sound/restricted_auto_music_player.h +++ b/engines/titanic/sound/restricted_auto_music_player.h @@ -29,13 +29,12 @@ namespace Titanic { class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: CString _string3; CString _string4; CString _string5; CString _string6; -protected: - virtual bool handleMessage(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 c24ef2a211..4393d411fc 100644 --- a/engines/titanic/sound/room_auto_sound_player.cpp +++ b/engines/titanic/sound/room_auto_sound_player.cpp @@ -34,7 +34,7 @@ void CRoomAutoSoundPlayer::load(SimpleFile *file) { CAutoSoundPlayer::load(file); } -bool CRoomAutoSoundPlayer::handleMessage(CEnterRoomMsg &msg) { +bool CRoomAutoSoundPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CRoomAutoSoundPlayer::handleEvent"); return true; } diff --git a/engines/titanic/sound/room_auto_sound_player.h b/engines/titanic/sound/room_auto_sound_player.h index 70d3dfee88..c17d983ee1 100644 --- a/engines/titanic/sound/room_auto_sound_player.h +++ b/engines/titanic/sound/room_auto_sound_player.h @@ -29,8 +29,7 @@ namespace Titanic { class CRoomAutoSoundPlayer : public CAutoSoundPlayer { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + bool EnterRoomMsg(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 index 5ec35c3903..8c20097927 100644 --- a/engines/titanic/sound/room_trigger_auto_music_player.cpp +++ b/engines/titanic/sound/room_trigger_auto_music_player.cpp @@ -34,7 +34,7 @@ void CRoomTriggerAutoMusicPlayer::load(SimpleFile *file) { CTriggerAutoMusicPlayer::load(file); } -bool CRoomTriggerAutoMusicPlayer::handleMessage(CEnterRoomMsg &msg) { +bool CRoomTriggerAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CRoomTriggerAutoMusicPlayer::handleEvent"); return true; } diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h index c3e4d0f6a4..26823ced38 100644 --- a/engines/titanic/sound/room_trigger_auto_music_player.h +++ b/engines/titanic/sound/room_trigger_auto_music_player.h @@ -29,8 +29,7 @@ namespace Titanic { class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer { -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp index c530a9ac70..8c6062666d 100644 --- a/engines/titanic/sound/titania_speech.cpp +++ b/engines/titanic/sound/titania_speech.cpp @@ -40,7 +40,7 @@ void CTitaniaSpeech::load(SimpleFile *file) { CGameObject::load(file); } -bool CTitaniaSpeech::handleMessage(CEnterRoomMsg &msg) { +bool CTitaniaSpeech::EnterRoomMsg(CEnterRoomMsg *msg) { warning("CTitaniaSpeech::handleEvent"); return true; } diff --git a/engines/titanic/sound/titania_speech.h b/engines/titanic/sound/titania_speech.h index b894eeead1..78c4098d69 100644 --- a/engines/titanic/sound/titania_speech.h +++ b/engines/titanic/sound/titania_speech.h @@ -29,10 +29,9 @@ namespace Titanic { class CTitaniaSpeech : public CGameObject { + bool EnterRoomMsg(CEnterRoomMsg *msg); private: int _value1, _value2; -protected: - virtual bool handleMessage(CEnterRoomMsg &msg); public: CLASSDEF CTitaniaSpeech() : CGameObject(), _value1(1), _value2(0) {} -- cgit v1.2.3