diff options
Diffstat (limited to 'engines/titanic/messages')
| -rw-r--r-- | engines/titanic/messages/auto_sound_event.cpp | 13 | ||||
| -rw-r--r-- | engines/titanic/messages/auto_sound_event.h | 2 | ||||
| -rw-r--r-- | engines/titanic/messages/bilge_dispensor_event.cpp | 35 | ||||
| -rw-r--r-- | engines/titanic/messages/bilge_dispensor_event.h | 5 | ||||
| -rw-r--r-- | engines/titanic/messages/door_auto_sound_event.cpp | 18 | ||||
| -rw-r--r-- | engines/titanic/messages/door_auto_sound_event.h | 4 | ||||
| -rw-r--r-- | engines/titanic/messages/messages.h | 98 | ||||
| -rw-r--r-- | engines/titanic/messages/mouse_messages.cpp | 1 | ||||
| -rw-r--r-- | engines/titanic/messages/mouse_messages.h | 26 | ||||
| -rw-r--r-- | engines/titanic/messages/pet_messages.h | 2 | ||||
| -rw-r--r-- | engines/titanic/messages/service_elevator_door.cpp | 10 | ||||
| -rw-r--r-- | engines/titanic/messages/service_elevator_door.h | 2 |
12 files changed, 155 insertions, 61 deletions
diff --git a/engines/titanic/messages/auto_sound_event.cpp b/engines/titanic/messages/auto_sound_event.cpp index baa11c7d41..bc2cd7d074 100644 --- a/engines/titanic/messages/auto_sound_event.cpp +++ b/engines/titanic/messages/auto_sound_event.cpp @@ -24,7 +24,11 @@ namespace Titanic { -CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _value1(0), _value2(70) { +BEGIN_MESSAGE_MAP(CAutoSoundEvent, CGameObject) + ON_MESSAGE(FrameMsg) +END_MESSAGE_MAP() + +CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _value1(0), _value2(0xFFFFFF) { } void CAutoSoundEvent::save(SimpleFile *file, int indent) { @@ -43,4 +47,11 @@ void CAutoSoundEvent::load(SimpleFile *file) { CGameObject::load(file); } +bool CAutoSoundEvent::FrameMsg(CFrameMsg *msg) { + if (_value1 >= 0) + _value1 = (_value1 + 1) & _value2; + + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/messages/auto_sound_event.h b/engines/titanic/messages/auto_sound_event.h index eb1c11c4ff..d88976708e 100644 --- a/engines/titanic/messages/auto_sound_event.h +++ b/engines/titanic/messages/auto_sound_event.h @@ -28,6 +28,8 @@ namespace Titanic { class CAutoSoundEvent : public CGameObject { + DECLARE_MESSAGE_MAP; + bool FrameMsg(CFrameMsg *msg); public: int _value1; int _value2; diff --git a/engines/titanic/messages/bilge_dispensor_event.cpp b/engines/titanic/messages/bilge_dispensor_event.cpp index 043ffe75d3..584da00a6f 100644 --- a/engines/titanic/messages/bilge_dispensor_event.cpp +++ b/engines/titanic/messages/bilge_dispensor_event.cpp @@ -24,6 +24,13 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CBilgeDispensorEvent, CAutoSoundEvent) + ON_MESSAGE(EnterRoomMsg) + ON_MESSAGE(LeaveRoomMsg) + ON_MESSAGE(FrameMsg) + ON_MESSAGE(StatusChangeMsg) +END_MESSAGE_MAP() + void CBilgeDispensorEvent::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CAutoSoundEvent::save(file, indent); @@ -39,4 +46,32 @@ bool CBilgeDispensorEvent::EnterRoomMsg(CEnterRoomMsg *msg) { return true; } +bool CBilgeDispensorEvent::LeaveRoomMsg(CLeaveRoomMsg *msg) { + _value1 = -1; + return true; +} + +bool CBilgeDispensorEvent::FrameMsg(CFrameMsg *msg) { + if (_value1 >= 0 && (_value1 & 0xffff) == 0x4000) { + int volume = 20 + getRandomNumber(30); + int val3 = getRandomNumber(20) - 10; + + if (getRandomNumber(2) == 0) { + playSound("b#18.wav", volume, val3); + } + } + + CAutoSoundEvent::FrameMsg(msg); + return true; +} + +bool CBilgeDispensorEvent::StatusChangeMsg(CStatusChangeMsg *msg) { + if (msg->_newStatus == 1) + _value1 = -1; + else if (msg->_newStatus == 2) + _value1 = 0; + + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/messages/bilge_dispensor_event.h b/engines/titanic/messages/bilge_dispensor_event.h index 96ef92a54e..61d3116db4 100644 --- a/engines/titanic/messages/bilge_dispensor_event.h +++ b/engines/titanic/messages/bilge_dispensor_event.h @@ -29,9 +29,14 @@ namespace Titanic { class CBilgeDispensorEvent : public CAutoSoundEvent { + DECLARE_MESSAGE_MAP; bool EnterRoomMsg(CEnterRoomMsg *msg); + bool LeaveRoomMsg(CLeaveRoomMsg *msg); + bool FrameMsg(CFrameMsg *msg); + bool StatusChangeMsg(CStatusChangeMsg *msg); public: CLASSDEF; + CBilgeDispensorEvent() : CAutoSoundEvent() {} /** * Save the data for the class to file diff --git a/engines/titanic/messages/door_auto_sound_event.cpp b/engines/titanic/messages/door_auto_sound_event.cpp index b9cedae6de..7618577e50 100644 --- a/engines/titanic/messages/door_auto_sound_event.cpp +++ b/engines/titanic/messages/door_auto_sound_event.cpp @@ -24,6 +24,12 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CDoorAutoSoundEvent, CAutoSoundEvent) + ON_MESSAGE(PreEnterNodeMsg) + ON_MESSAGE(LeaveNodeMsg) + ON_MESSAGE(TimerMsg) +END_MESSAGE_MAP() + void CDoorAutoSoundEvent::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeQuotedLine(_string1, indent); @@ -44,4 +50,16 @@ void CDoorAutoSoundEvent::load(SimpleFile *file) { CAutoSoundEvent::load(file); } +bool CDoorAutoSoundEvent::PreEnterNodeMsg(CPreEnterNodeMsg *msg) { + return true; +} + +bool CDoorAutoSoundEvent::LeaveNodeMsg(CLeaveNodeMsg *msg) { + return true; +} + +bool CDoorAutoSoundEvent::TimerMsg(CTimerMsg *msg) { + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/messages/door_auto_sound_event.h b/engines/titanic/messages/door_auto_sound_event.h index e6ea1b0f98..8b064a7221 100644 --- a/engines/titanic/messages/door_auto_sound_event.h +++ b/engines/titanic/messages/door_auto_sound_event.h @@ -28,6 +28,10 @@ namespace Titanic { class CDoorAutoSoundEvent : public CAutoSoundEvent { + DECLARE_MESSAGE_MAP; + bool PreEnterNodeMsg(CPreEnterNodeMsg *msg); + bool LeaveNodeMsg(CLeaveNodeMsg *msg); + bool TimerMsg(CTimerMsg *msg); public: CString _string1; CString _string2; diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h index c1d962f656..b70bc5e16c 100644 --- a/engines/titanic/messages/messages.h +++ b/engines/titanic/messages/messages.h @@ -149,38 +149,21 @@ public: class CEditControlMsg : public CMessage { public: - int _field4; - int _field8; - CString _string1; - int _field18; - int _field1C; - int _field20; + int _mode; + int _param; + CString _text; + byte _textR; + byte _textG; + byte _textB; public: CLASSDEF; - CEditControlMsg() : _field4(0), _field8(0), _field18(0), - _field1C(0), _field20(0) {} + CEditControlMsg() : _mode(0), _param(0), _textR(0), _textG(0), _textB(0) {} static bool isSupportedBy(const CTreeItem *item) { return CMessage::supports(item, _type); } }; -class CLightsMsg : public CMessage { -public: - int _field4; - int _field8; - int _fieldC; - int _field10; -public: - CLASSDEF; - CLightsMsg() : CMessage(), _field4(0), _field8(0), - _fieldC(0), _field10(0) {} - - static bool isSupportedBy(const CTreeItem *item) { - return supports(item, _type); - } -}; - MESSAGE1(CTimeMsg, uint, _ticks, 0); class CTimerMsg : public CTimeMsg { @@ -206,15 +189,13 @@ MESSAGE1(CAnimateMaitreDMsg, int, value, 0); MESSAGE1(CArboretumGateMsg, int, value, 0); MESSAGE0(CArmPickedUpFromTableMsg); MESSAGE0(CBodyInBilgeRoomMsg); -MESSAGE1(CBowlStateChange, int, value, 0); +MESSAGE1(CBowlStateChangeMsg, int, state, 0); MESSAGE2(CCarryObjectArrivedMsg, CString, strValue, "", int, numValue, 0); MESSAGE2(CChangeMusicMsg, CString, filename, "", int, flags, 0); MESSAGE1(CChangeSeasonMsg, CString, season, "Summer"); MESSAGE0(CCheckAllPossibleCodes); -MESSAGE2(CCheckChevCode, int, value1, 0, int, value2, 0); +MESSAGE2(CCheckChevCode, int, classNum, 0, uint, chevCode, 0); MESSAGE1(CChildDragEndMsg, int, value, 0); -MESSAGE2(CChildDragMoveMsg, int, value1, 0, int, value2, 0); -MESSAGE2(CChildDragStartMsg, int, value1, 0, int, value2, 0); MESSAGE0(CClearChevPanelBits); MESSAGE0(CCorrectMusicPlayedMsg); MESSAGE0(CCreateMusicPlayerMsg); @@ -228,8 +209,8 @@ MESSAGE0(CDonNavHelmet); MESSAGE1(CDoorbotNeededInElevatorMsg, int, value, 0); MESSAGE0(CDoorbotNeededInHomeMsg); MESSAGE1(CDropObjectMsg, CCarry *, item, nullptr); -MESSAGE1(CDropZoneGotObjectMsg, int, value, 0); -MESSAGE1(CDropZoneLostObjectMsg, int, value, 0); +MESSAGE1(CDropZoneGotObjectMsg, CGameObject *, object, nullptr); +MESSAGE1(CDropZoneLostObjectMsg, CGameObject *, object, nullptr); MESSAGE1(CEjectCylinderMsg, int, value, 0); MESSAGE2(CPreEnterNodeMsg, CNodeItem *, oldNode, nullptr, CNodeItem *, newNode, nullptr); MESSAGE2(CPreEnterRoomMsg, CRoomItem *, oldRoom, nullptr, CRoomItem *, newRoom, nullptr); @@ -239,17 +220,17 @@ MESSAGE2(CEnterRoomMsg, CRoomItem *, oldRoom, nullptr, CRoomItem *, newRoom, nul MESSAGE2(CEnterViewMsg, CViewItem *, oldView, nullptr, CViewItem *, newView, nullptr); MESSAGE0(CErasePhonographCylinderMsg); MESSAGE1(CFrameMsg, uint, ticks, 0); -MESSAGE2(CFreshenCookieMsg, int, value1, 0, int, value2, 0); -MESSAGE1(CGetChevClassBits, int, value, 0); -MESSAGE1(CGetChevClassNum, int, value, 0); -MESSAGE2(CGetChevCodeFromRoomNameMsg, CString, strValue, "", int, numValue, 0); -MESSAGE1(CGetChevFloorBits, int, value, 0); -MESSAGE1(CGetChevFloorNum, int, value, 0); -MESSAGE1(CGetChevLiftBits, int, value, 0); -MESSAGE1(CGetChevLiftNum, int, value, 0); -MESSAGE1(CGetChevRoomBits, int, value, 0); -MESSAGE1(CGetChevRoomNum, int, value, 0); -MESSAGE2(CHoseConnectedMsg, int, value1, 1, int, value2, 0); +MESSAGE2(CFreshenCookieMsg, int, value1, 0, int, value2, 1); +MESSAGE1(CGetChevClassBits, int, classBits, 0); +MESSAGE1(CGetChevClassNum, int, classNum, 0); +MESSAGE2(CGetChevCodeFromRoomNameMsg, CString, roomName, "", uint, chevCode, 0); +MESSAGE1(CGetChevFloorBits, int, floorBits, 0); +MESSAGE1(CGetChevFloorNum, int, floorNum, 0); +MESSAGE1(CGetChevLiftBits, int, liftBits, 0); +MESSAGE1(CGetChevLiftNum, int, liftNum, 0); +MESSAGE1(CGetChevRoomBits, int, roomNum, 0); +MESSAGE1(CGetChevRoomNum, int, roomNum, 0); +MESSAGE2(CHoseConnectedMsg, int, value, 1, CGameObject *, object, nullptr); MESSAGE0(CInitializeAnimMsg); MESSAGE1(CIsEarBowlPuzzleDone, int, value, 0); MESSAGE3(CIsHookedOnMsg, Rect, rect, Rect(), bool, result, false, CString, string1, ""); @@ -258,41 +239,42 @@ MESSAGE1(CKeyCharMsg, int, key, 32); MESSAGE2(CLeaveNodeMsg, CNodeItem *, oldNode, nullptr, CNodeItem *, newNode, nullptr); MESSAGE2(CLeaveRoomMsg, CRoomItem *, oldRoom, nullptr, CRoomItem *, newRoom, nullptr); MESSAGE2(CLeaveViewMsg, CViewItem *, oldView, nullptr, CViewItem *, newView, nullptr); -MESSAGE2(CLemonFallsFromTreeMsg, int, value1, 0, int, value2, 0); +MESSAGE1(CLemonFallsFromTreeMsg, Point, pt, Point()); +MESSAGE4(CLightsMsg, bool, flag1, false, bool, flag2, false, bool, flag3, false, bool, flag4, false); MESSAGE1(CLoadSuccessMsg, int, ticks, 0); MESSAGE1(CLockPhonographMsg, int, value, 0); MESSAGE0(CMaitreDDefeatedMsg); MESSAGE0(CMaitreDHappyMsg); -MESSAGE1(CMissiveOMatActionMsg, int, value, 0); +MESSAGE1(CMissiveOMatActionMsg, int, action, 0); MESSAGE0(CMoveToStartPosMsg); MESSAGE2(CMovieEndMsg, int, startFrame, 0, int, endFrame, 0); MESSAGE2(CMovieFrameMsg, int, frameNumber, 0, int, value2, 0); MESSAGE0(CMusicHasStartedMsg); MESSAGE0(CMusicHasStoppedMsg); MESSAGE0(CMusicSettingChangedMsg); -MESSAGE2(CNPCPlayAnimationMsg, const char *const *, names, nullptr, int, value2, 0); +MESSAGE2(CNPCPlayAnimationMsg, const char *const *, names, nullptr, int, maxDuration, 0); MESSAGE1(CNPCPlayIdleAnimationMsg, const char *const *, names, 0); MESSAGE3(CNPCPlayTalkingAnimationMsg, int, value1, 0, int, value2, 0, const char *const *, names, nullptr); MESSAGE0(CNPCQueueIdleAnimMsg); MESSAGE1(CNutPuzzleMsg, CString, value, ""); MESSAGE1(COnSummonBotMsg, int, value, 0); MESSAGE0(COpeningCreditsMsg); -MESSAGE1(CPanningAwayFromParrotMsg, int, value, 0); -MESSAGE2(CParrotSpeakMsg, CString, value1, "", CString, value2, ""); +MESSAGE1(CPanningAwayFromParrotMsg, CTreeItem *, target, nullptr); +MESSAGE2(CParrotSpeakMsg, CString, target, "", CString, action, ""); MESSAGE2(CParrotTriesChickenMsg, int, value1, 0, int, value2, 0); MESSAGE1(CPhonographPlayMsg, int, value, 0); MESSAGE0(CPhonographReadyToPlayMsg); MESSAGE1(CPhonographRecordMsg, int, value, 0); MESSAGE3(CPhonographStopMsg, int, value1, 0, int, value2, 0, int, value3, 0); MESSAGE2(CPlayRangeMsg, int, value1, 0, int, value2, 0); -MESSAGE2(CPlayerTriesRestaurantTableMsg, int, value1, 0, int, value2, 0); +MESSAGE2(CPlayerTriesRestaurantTableMsg, int, tableId, 0, bool, result, false); MESSAGE1(CPreSaveMsg, int, value, 0); MESSAGE1(CProdMaitreDMsg, int, value, 0); -MESSAGE2(CPumpingMsg, int, value1, 0, int, value2, 0); +MESSAGE2(CPumpingMsg, int, value, 0, CGameObject *, object, nullptr); MESSAGE1(CPutBotBackInHisBoxMsg, int, value, 0); MESSAGE1(CPutParrotBackMsg, int, value, 0); MESSAGE0(CPuzzleSolvedMsg); -MESSAGE3(CQueryCylinderHolderMsg, int, value1, 0, int, value2, 0, int, value3, 0); +MESSAGE3(CQueryCylinderHolderMsg, int, value1, 0, int, value2, 0, CTreeItem *, target, (CTreeItem *)nullptr); MESSAGE1(CQueryCylinderMsg, CString, name, ""); MESSAGE1(CQueryCylinderNameMsg, CString, name, ""); MESSAGE3(CQueryCylinderTypeMsg, int, value1, 0, int, value2, 0, int, value3, 0); @@ -308,12 +290,12 @@ MESSAGE2(CServiceElevatorFloorChangeMsg, int, value1, 0, int, value2, 0); MESSAGE0(CServiceElevatorFloorRequestMsg); MESSAGE1(CServiceElevatorMsg, int, value, 4); MESSAGE2(CSetChevButtonImageMsg, int, value1, 0, int, value2, 0); -MESSAGE1(CSetChevClassBits, int, value, 0); -MESSAGE1(CSetChevFloorBits, int, value, 0); -MESSAGE1(CSetChevLiftBits, int, value, 0); +MESSAGE1(CSetChevClassBits, int, classNum, 0); +MESSAGE1(CSetChevFloorBits, int, floorNum, 0); +MESSAGE1(CSetChevLiftBits, int, liftNum, 0); MESSAGE2(CSetChevPanelBitMsg, int, value1, 0, int, value2, 0); -MESSAGE1(CSetChevPanelButtonsMsg, int, value, 0); -MESSAGE1(CSetChevRoomBits, int, value, 0); +MESSAGE1(CSetChevPanelButtonsMsg, int, chevCode, 0); +MESSAGE1(CSetChevRoomBits, int, roomNum, 0); MESSAGE1(CSetFrameMsg, int, frameNumber, 0); MESSAGE0(CSetMusicControlsMsg); MESSAGE2(CSetVarMsg, CString, varName, "", int, value, 0); @@ -321,17 +303,17 @@ MESSAGE2(CSetVolumeMsg, int, volume, 70, int, secondsTransition, 0); MESSAGE2(CShipSettingMsg, int, value, 0, CString, name, ""); MESSAGE1(CShowTextMsg, CString, value, "NO TEXT INCLUDED!!!"); MESSAGE2(CSignalObject, CString, strValue, "", int, numValue, 0); -MESSAGE2(CSpeechFallsFromTreeMsg, int, value1, 0, int, value2, 0); +MESSAGE1(CSpeechFallsFromTreeMsg, Point, pos, Point()); MESSAGE1(CStartMusicMsg, CMusicPlayer *, musicPlayer, (CMusicPlayer *)nullptr); MESSAGE3(CStatusChangeMsg, int, oldStatus, 0, int, newStatus, 0, bool, success, false); -MESSAGE1(CStopMusicMsg, int, value, 0); +MESSAGE1(CStopMusicMsg, CMusicPlayer *, musicPlayer, (CMusicPlayer *)nullptr); MESSAGE4(CSubAcceptCCarryMsg, CString, string1, "", int, value1, 0, int, value2, 0, CCarry *, item, nullptr); MESSAGE0(CSubDeliverCCarryMsg); MESSAGE0(CSubSendCCarryMsg); MESSAGE0(CSUBTransition); MESSAGE0(CSubTurnOffMsg); MESSAGE0(CSubTurnOnMsg); -MESSAGE2(CSummonBotMsg, CString, strValue, "", int, numValue, 0); +MESSAGE2(CSummonBotMsg, CString, npcName, "", int, value, 0); MESSAGE1(CSummonBotQueryMsg, CString, npcName, ""); MESSAGE1(CTakeHeadPieceMsg, CString, value, "NULL"); MESSAGE2(CTextInputMsg, CString, input, "", CString, response, ""); @@ -352,7 +334,7 @@ MESSAGE0(CTrueTalkSelfQueueAnimSetMsg); MESSAGE3(CTrueTalkTriggerActionMsg, int, action, 0, int, param1, 0, int, param2, 0); MESSAGE0(CTurnOff); MESSAGE0(CTurnOn); -MESSAGE1(CUse, CCarry *, item, nullptr); +MESSAGE1(CUse, CGameObject *, item, nullptr); MESSAGE1(CUseWithCharMsg, CCharacter *, character, nullptr); MESSAGE1(CUseWithOtherMsg, CGameObject *, other, 0); MESSAGE1(CVirtualKeyCharMsg, Common::KeyState, keyState, Common::KeyState()); diff --git a/engines/titanic/messages/mouse_messages.cpp b/engines/titanic/messages/mouse_messages.cpp index 8ef7f38fd3..18fa625c1c 100644 --- a/engines/titanic/messages/mouse_messages.cpp +++ b/engines/titanic/messages/mouse_messages.cpp @@ -23,7 +23,6 @@ #include "titanic/messages/mouse_messages.h" #include "titanic/support/mouse_cursor.h" #include "titanic/support/screen_manager.h" -#include "titanic/titanic.h" namespace Titanic { diff --git a/engines/titanic/messages/mouse_messages.h b/engines/titanic/messages/mouse_messages.h index d17bd51c78..e7c419bbdc 100644 --- a/engines/titanic/messages/mouse_messages.h +++ b/engines/titanic/messages/mouse_messages.h @@ -179,6 +179,32 @@ public: } }; +class CChildDragMoveMsg : public CMessage { +public: + Point _mousePos; +public: + CLASSDEF; + CChildDragMoveMsg() : CMessage() {} + CChildDragMoveMsg(const Point &pt) : CMessage(), _mousePos(pt) {} + + static bool isSupportedBy(const CTreeItem *item) { + return supports(item, _type); + } +}; + +class CChildDragStartMsg : public CMessage { +public: + Point _mousePos; +public: + CLASSDEF; + CChildDragStartMsg() : CMessage() {} + CChildDragStartMsg(const Point &pt) : CMessage(), _mousePos(pt) {} + + static bool isSupportedBy(const CTreeItem *item) { + return supports(item, _type); + } +}; + } // End of namespace Titanic #endif /* TITANIC_MOUSE_MESSAGES_H */ diff --git a/engines/titanic/messages/pet_messages.h b/engines/titanic/messages/pet_messages.h index 48e5bab64c..60981726ed 100644 --- a/engines/titanic/messages/pet_messages.h +++ b/engines/titanic/messages/pet_messages.h @@ -35,7 +35,7 @@ MESSAGE0(CPETLostObjectMsg); MESSAGE0(CPETObjectSelectedMsg); MESSAGE1(CPETObjectStateMsg, int, value, 0); MESSAGE0(CPETPhotoOnOffMsg); -MESSAGE1(CPETPlaySoundMsg, int, value, 0); +MESSAGE1(CPETPlaySoundMsg, int, soundNum, 0); MESSAGE0(CPETReceiveMsg); MESSAGE0(CPETSetStarDestinationMsg); MESSAGE1(CPETStarFieldLockMsg, int, value, 0); diff --git a/engines/titanic/messages/service_elevator_door.cpp b/engines/titanic/messages/service_elevator_door.cpp index 748790e4aa..7011b1ad44 100644 --- a/engines/titanic/messages/service_elevator_door.cpp +++ b/engines/titanic/messages/service_elevator_door.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CServiceElevatorDoor, CDoorAutoSoundEvent) + ON_MESSAGE(PreEnterNodeMsg) +END_MESSAGE_MAP() + CServiceElevatorDoor::CServiceElevatorDoor() : CDoorAutoSoundEvent() { _string1 = "z#31.wav"; _string2 = "z#32.wav"; @@ -45,4 +49,10 @@ void CServiceElevatorDoor::load(SimpleFile *file) { CDoorAutoSoundEvent::load(file); } +bool CServiceElevatorDoor::PreEnterNodeMsg(CPreEnterNodeMsg *msg) { + if (!findRoom()->isEquals("BilgeRoomWith")) + CDoorAutoSoundEvent::PreEnterNodeMsg(msg); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/messages/service_elevator_door.h b/engines/titanic/messages/service_elevator_door.h index cc8da0917d..69ad1e15b9 100644 --- a/engines/titanic/messages/service_elevator_door.h +++ b/engines/titanic/messages/service_elevator_door.h @@ -28,6 +28,8 @@ namespace Titanic { class CServiceElevatorDoor : public CDoorAutoSoundEvent { + DECLARE_MESSAGE_MAP; + bool PreEnterNodeMsg(CPreEnterNodeMsg *msg); public: CLASSDEF; CServiceElevatorDoor(); |
