aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-27 23:22:38 -0500
committerPaul Gilbert2016-02-27 23:22:38 -0500
commit9080781b08830449e3f762ab45924a15446435ef (patch)
tree5638ac13d65254d8d1c1aca32c7d7bec6c35905b /engines/titanic
parentdef2a92ebfad1d7ff6b23ca5e82aa2148a7ade45 (diff)
downloadscummvm-rg350-9080781b08830449e3f762ab45924a15446435ef.tar.gz
scummvm-rg350-9080781b08830449e3f762ab45924a15446435ef.tar.bz2
scummvm-rg350-9080781b08830449e3f762ab45924a15446435ef.zip
TITANIC: Add mouse events, cleanup of existing events
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/saveable_object.cpp29
-rw-r--r--engines/titanic/game/service_elevator_door.h2
-rw-r--r--engines/titanic/messages/auto_sound_event.h55
-rw-r--r--engines/titanic/messages/door_auto_sound_event.h57
-rw-r--r--engines/titanic/messages/edit_control_msg.h50
-rw-r--r--engines/titanic/messages/is_hooked_on_msg.h50
-rw-r--r--engines/titanic/messages/lights_msg.h48
-rw-r--r--engines/titanic/messages/message.cpp39
-rw-r--r--engines/titanic/messages/messages.cpp (renamed from engines/titanic/messages/door_auto_sound_event.cpp)40
-rw-r--r--engines/titanic/messages/messages.h (renamed from engines/titanic/messages/message.h)148
-rw-r--r--engines/titanic/messages/mouse_messages.h96
-rw-r--r--engines/titanic/messages/pet_messages.h (renamed from engines/titanic/messages/auto_sound_event.cpp)39
-rw-r--r--engines/titanic/messages/sub_accept_ccarry_msg.h45
-rw-r--r--engines/titanic/messages/transport_msg.h45
-rw-r--r--engines/titanic/module.mk2
15 files changed, 311 insertions, 434 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index fdb8df6955..dbbf8aa205 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -114,12 +114,9 @@
#include "titanic/gfx/st_button.h"
#include "titanic/gfx/toggle_switch.h"
-#include "titanic/messages/message.h"
-#include "titanic/messages/edit_control_msg.h"
-#include "titanic/messages/is_hooked_on_msg.h"
-#include "titanic/messages/lights_msg.h"
-#include "titanic/messages/sub_accept_ccarry_msg.h"
-#include "titanic/messages/transport_msg.h"
+#include "titanic/messages/messages.h"
+#include "titanic/messages/mouse_messages.h"
+#include "titanic/messages/pet_messages.h"
#include "titanic/moves/enter_bomb_room.h"
#include "titanic/moves/exit_arboretum.h"
@@ -301,6 +298,16 @@ DEFFN(CLockPhonographMsg);
DEFFN(CMaitreDDefeatedMsg);
DEFFN(CMaitreDHappyMsg);
DEFFN(CMissiveOMatActionMsg);
+DEFFN(CMouseMsg);
+DEFFN(CMouseMoveMsg);
+DEFFN(CMouseButtonMsg);
+DEFFN(CMouseButtonDownMsg);
+DEFFN(CMouseButtonUpMsg);
+DEFFN(CMouseButtonDoubleClickMsg);
+DEFFN(CMouseDragMsg);
+DEFFN(CMouseDragStartMsg);
+DEFFN(CMouseDragMoveMsg);
+DEFFN(CMouseDragEndMsg);
DEFFN(CMoveToStartPosMsg);
DEFFN(CMovieEndMsg);
DEFFN(CMovieFrameMsg);
@@ -583,6 +590,16 @@ void CSaveableObject::initClassList() {
ADDFN(CMaitreDDefeatedMsg);
ADDFN(CMaitreDHappyMsg);
ADDFN(CMissiveOMatActionMsg);
+ ADDFN(CMouseMsg);
+ ADDFN(CMouseMoveMsg);
+ ADDFN(CMouseButtonMsg);
+ ADDFN(CMouseButtonDownMsg);
+ ADDFN(CMouseButtonUpMsg);
+ ADDFN(CMouseButtonDoubleClickMsg);
+ ADDFN(CMouseDragMsg);
+ ADDFN(CMouseDragStartMsg);
+ ADDFN(CMouseDragMoveMsg);
+ ADDFN(CMouseDragEndMsg);
ADDFN(CMoveToStartPosMsg);
ADDFN(CMovieEndMsg);
ADDFN(CMovieFrameMsg);
diff --git a/engines/titanic/game/service_elevator_door.h b/engines/titanic/game/service_elevator_door.h
index a3a8388405..616601d196 100644
--- a/engines/titanic/game/service_elevator_door.h
+++ b/engines/titanic/game/service_elevator_door.h
@@ -23,7 +23,7 @@
#ifndef TITANIC_SERVICE_ELEVATOR_DOOR_H
#define TITANIC_SERVICE_ELEVATOR_DOOR_H
-#include "titanic/messages/door_auto_sound_event.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
diff --git a/engines/titanic/messages/auto_sound_event.h b/engines/titanic/messages/auto_sound_event.h
deleted file mode 100644
index f3a805c1e1..0000000000
--- a/engines/titanic/messages/auto_sound_event.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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_AUTO_SOUND_EVENT_H
-#define TITANIC_AUTO_SOUND_EVENT_H
-
-#include "titanic/core/game_object.h"
-
-namespace Titanic {
-
-class CAutoSoundEvent : public CGameObject {
-protected:
- int _fieldBC;
- int _fieldC0;
-public:
- CAutoSoundEvent();
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CAutoSoundEvent"; }
-
- /**
- * 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_AUTO_SOUND_EVENT_H */
diff --git a/engines/titanic/messages/door_auto_sound_event.h b/engines/titanic/messages/door_auto_sound_event.h
deleted file mode 100644
index 9bba304daa..0000000000
--- a/engines/titanic/messages/door_auto_sound_event.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* 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_DOOR_AUTO_SOUND_EVENT_H
-#define TITANIC_DOOR_AUTO_SOUND_EVENT_H
-
-#include "titanic/messages/auto_sound_event.h"
-
-namespace Titanic {
-
-class CDoorAutoSoundEvent : public CAutoSoundEvent {
-protected:
- CString _string1;
- CString _string2;
- int _fieldDC;
- int _fieldE0;
-public:
- CDoorAutoSoundEvent();
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CDoorAutoSoundEvent"; }
-
- /**
- * 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_DOOR_AUTO_SOUND_EVENT_H */
diff --git a/engines/titanic/messages/edit_control_msg.h b/engines/titanic/messages/edit_control_msg.h
deleted file mode 100644
index b44035a02a..0000000000
--- a/engines/titanic/messages/edit_control_msg.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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_EDIT_CONTROL_MSG_H
-#define TITANIC_EDIT_CONTROL_MSG_H
-
-#include "titanic/messages/message.h"
-
-namespace Titanic {
-
-class CEditControlMsg : public CMessage {
-private:
- int _field4;
- int _field8;
- CString _string1;
- int _field18;
- int _field1C;
- int _field20;
-public:
- CEditControlMsg() : _field4(0), _field8(0), _field18(0),
- _field1C(0), _field20(0) {}
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CEditControlMsg"; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_EDIT_CONTROL_MSG_H */
diff --git a/engines/titanic/messages/is_hooked_on_msg.h b/engines/titanic/messages/is_hooked_on_msg.h
deleted file mode 100644
index f8a5062fbb..0000000000
--- a/engines/titanic/messages/is_hooked_on_msg.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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_IS_HOOKED_ON_MSG_H
-#define TITANIC_IS_HOOKED_ON_MSG_H
-
-#include "titanic/messages/message.h"
-
-namespace Titanic {
-
-class CIsHookedOnMsg : public CMessage {
-private:
- int _field4;
- int _field8;
- CString _string1;
- int _field18;
- int _field1C;
- int _field20;
-public:
- CIsHookedOnMsg() : CMessage(), _field4(0), _field8(0),
- _field18(0), _field1C(0), _field20(0) {}
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CIsHookedOnMsg"; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_IS_HOOKED_ON_MSG_H */
diff --git a/engines/titanic/messages/lights_msg.h b/engines/titanic/messages/lights_msg.h
deleted file mode 100644
index 1cd82ca8f2..0000000000
--- a/engines/titanic/messages/lights_msg.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 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_LIGHTS_MSG_H
-#define TITANIC_LIGHTS_MSG_H
-
-#include "titanic/messages/message.h"
-
-namespace Titanic {
-
-class CLightsMsg : public CMessage {
-public:
- int _field4;
- int _field8;
- int _fieldC;
- int _field10;
-public:
- CLightsMsg() : CMessage(), _field4(0), _field8(0),
- _fieldC(0), _field10(0) {}
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CLightsMsg"; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_LIGHTS_MSG_H */
diff --git a/engines/titanic/messages/message.cpp b/engines/titanic/messages/message.cpp
deleted file mode 100644
index 08df20e6a8..0000000000
--- a/engines/titanic/messages/message.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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/messages/message.h"
-
-namespace Titanic {
-
-CMessage::CMessage() : CSaveableObject() {
-}
-
-void CMessage::save(SimpleFile *file, int indent) const {
- file->writeNumberLine(0, indent);
-}
-
-void CMessage::load(SimpleFile *file) {
- file->readNumber();
- CSaveableObject::load(file);
-}
-
-} // End of namespace Titanic
diff --git a/engines/titanic/messages/door_auto_sound_event.cpp b/engines/titanic/messages/messages.cpp
index 69191a6576..f60ad12cd7 100644
--- a/engines/titanic/messages/door_auto_sound_event.cpp
+++ b/engines/titanic/messages/messages.cpp
@@ -20,12 +20,48 @@
*
*/
-#include "titanic/messages/door_auto_sound_event.h"
+#include "titanic/messages/messages.h"
+#include "titanic/core/game_object.h"
namespace Titanic {
+CMessage::CMessage() : CSaveableObject() {
+}
+
+void CMessage::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(0, indent);
+}
+
+void CMessage::load(SimpleFile *file) {
+ file->readNumber();
+ CSaveableObject::load(file);
+}
+
+/*------------------------------------------------------------------------*/
+
+CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
+}
+
+void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_fieldC0, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CAutoSoundEvent::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldBC = file->readNumber();
+ _fieldC0 = file->readNumber();
+
+ CGameObject::load(file);
+}
+
+/*------------------------------------------------------------------------*/
+
CDoorAutoSoundEvent::CDoorAutoSoundEvent() : CAutoSoundEvent(),
- _string1("z#44.wav"), _string2("z#43.wav"), _fieldDC(25), _fieldE0(25) {
+_string1("z#44.wav"), _string2("z#43.wav"), _fieldDC(25), _fieldE0(25) {
}
void CDoorAutoSoundEvent::save(SimpleFile *file, int indent) const {
diff --git a/engines/titanic/messages/message.h b/engines/titanic/messages/messages.h
index 9f10a7ed4a..e9490a8cb5 100644
--- a/engines/titanic/messages/message.h
+++ b/engines/titanic/messages/messages.h
@@ -20,10 +20,11 @@
*
*/
-#ifndef TITANIC_MESSAGE_H
-#define TITANIC_MESSAGE_H
+#ifndef TITANIC_MESSAGES_H
+#define TITANIC_MESSAGES_H
#include "titanic/core/saveable_object.h"
+#include "titanic/core/game_object.h"
namespace Titanic {
@@ -47,6 +48,135 @@ public:
virtual void load(SimpleFile *file);
};
+class CAutoSoundEvent : public CGameObject {
+protected:
+ int _fieldBC;
+ int _fieldC0;
+public:
+ CAutoSoundEvent();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CAutoSoundEvent"; }
+
+ /**
+ * 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);
+};
+
+
+class CDoorAutoSoundEvent : public CAutoSoundEvent {
+protected:
+ CString _string1;
+ CString _string2;
+ int _fieldDC;
+ int _fieldE0;
+public:
+ CDoorAutoSoundEvent();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CDoorAutoSoundEvent"; }
+
+ /**
+ * 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);
+};
+
+
+class CEditControlMsg : public CMessage {
+private:
+ int _field4;
+ int _field8;
+ CString _string1;
+ int _field18;
+ int _field1C;
+ int _field20;
+public:
+ CEditControlMsg() : _field4(0), _field8(0), _field18(0),
+ _field1C(0), _field20(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CEditControlMsg"; }
+};
+
+class CLightsMsg : public CMessage {
+public:
+ int _field4;
+ int _field8;
+ int _fieldC;
+ int _field10;
+public:
+ CLightsMsg() : CMessage(), _field4(0), _field8(0),
+ _fieldC(0), _field10(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CLightsMsg"; }
+};
+
+class CIsHookedOnMsg : public CMessage {
+private:
+ int _field4;
+ int _field8;
+ CString _string1;
+ int _field18;
+ int _field1C;
+ int _field20;
+public:
+ CIsHookedOnMsg() : CMessage(), _field4(0), _field8(0),
+ _field18(0), _field1C(0), _field20(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CIsHookedOnMsg"; }
+};
+
+
+class CSubAcceptCCarryMsg : public CMessage {
+public:
+ CString _string1;
+ int _value1, _value2, _value3;
+public:
+ CSubAcceptCCarryMsg() : _value1(0), _value2(0), _value3(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CSubAcceptCCarryMsg"; }
+};
+
+class CTransportMsg : public CMessage {
+public:
+ CString _string;
+ int _value1, _value2;
+public:
+ CTransportMsg() : _value1(0), _value2(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CTransportMsg"; }
+};
+
#define RAW_MESSAGE(NAME) class NAME: public CMessage { \
virtual const char *getClassName() const { return #NAME; } \
}
@@ -171,20 +301,6 @@ RAW_MESSAGE(CNPCQueueIdleAnimMsg);
STR_MESSAGE(CNutPuzzleMsg, _value);
NUM_MESSAGE(COnSummonBotMsg, _value);
RAW_MESSAGE(COpeningCreditsMsg);
-RAW_MESSAGE(CPETDeliverMsg);
-RAW_MESSAGE(CPETGainedObjectMsg);
-RAW_MESSAGE(CPETHelmetOnOffMsg);
-RAW_MESSAGE(CPETKeyboardOnOffMsg);
-RAW_MESSAGE(CPETLostObjectMsg);
-RAW_MESSAGE(CPETObjectSelectedMsg);
-NUM_MESSAGE(CPETObjectStateMsg, _value);
-RAW_MESSAGE(CPETPhotoOnOffMsg);
-NUM_MESSAGE(CPETPlaySoundMsg, _value);
-RAW_MESSAGE(CPETReceiveMsg);
-RAW_MESSAGE(CPETSetStarDestinationMsg);
-NUM_MESSAGE(CPETStarFieldLockMsg, _value);
-RAW_MESSAGE(CPETStereoFieldOnOffMsg);
-SNUM_MESSAGE_VAL(CPETTargetMsg, _strValue, _numValue, nullptr, -1);
NUM_MESSAGE(CPanningAwayFromParrotMsg, _value);
STR2_MESSAGE(CParrotSpeakMsg, _value1, _value2);
NUM2_MESSAGE(CParrotTriesChickenMsg, _value1, _value2);
diff --git a/engines/titanic/messages/mouse_messages.h b/engines/titanic/messages/mouse_messages.h
new file mode 100644
index 0000000000..6b466038db
--- /dev/null
+++ b/engines/titanic/messages/mouse_messages.h
@@ -0,0 +1,96 @@
+/* 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_MOUSE_MESSAGES_H
+#define TITANIC_MOUSE_MESSAGES_H
+
+#include "titanic/messages/messages.h"
+
+namespace Titanic {
+
+class CMouseMsg : public CMessage {
+public:
+ int _buttons;
+ Common::Point _mousePos;
+public:
+ CMouseMsg() : _buttons(0) {}
+ virtual const char *getClassName() const { return "CMouseMsg"; }
+};
+
+class CMouseMoveMsg : public CMouseMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseMoveMsg"; }
+};
+
+class CMouseButtonMsg : public CMouseMsg {
+public:
+ int _field10;
+public:
+ CMouseButtonMsg() : CMouseMsg(), _field10(0) {}
+ virtual const char *getClassName() const { return "CMouseButtonMsg"; }
+};
+
+class CMouseButtonDownMsg : public CMouseButtonMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseButtonDownMsg"; }
+};
+
+class CMouseButtonUpMsg : public CMouseButtonMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseButtonUpMsg"; }
+};
+
+class CMouseButtonDoubleClickMsg : public CMouseButtonMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseButtonDoubleClickMsg"; }
+};
+
+class CMouseDragMsg : public CMouseMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseDragMsg"; }
+};
+
+class CMouseDragMoveMsg : public CMouseDragMsg {
+public:
+ virtual const char *getClassName() const { return "CMouseDragMoveMsg"; }
+};
+
+class CMouseDragStartMsg : public CMouseDragMsg {
+public:
+ int _field10;
+ int _field14;
+public:
+ CMouseDragStartMsg() : CMouseDragMsg(), _field10(0), _field14(0) {}
+ virtual const char *getClassName() const { return "CMouseDragStartMsg"; }
+};
+
+class CMouseDragEndMsg : public CMouseDragMsg {
+public:
+ int _field10;
+public:
+ CMouseDragEndMsg() : CMouseDragMsg(), _field10(0) {}
+ virtual const char *getClassName() const { return "CMouseDragEndMsg"; }
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_MOUSE_MESSAGES_H */
diff --git a/engines/titanic/messages/auto_sound_event.cpp b/engines/titanic/messages/pet_messages.h
index a9c8fc3dcd..1aeaec0d0d 100644
--- a/engines/titanic/messages/auto_sound_event.cpp
+++ b/engines/titanic/messages/pet_messages.h
@@ -20,27 +20,28 @@
*
*/
-#include "titanic/messages/auto_sound_event.h"
+#ifndef TITANIC_PET_MESSAGES_H
+#define TITANIC_PET_MESSAGES_H
-namespace Titanic {
-
-CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
-}
-
-void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
- file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldBC, indent);
- file->writeNumberLine(_fieldC0, indent);
+#include "titanic/messages/messages.h"
- CGameObject::save(file, indent);
-}
-
-void CAutoSoundEvent::load(SimpleFile *file) {
- file->readNumber();
- _fieldBC = file->readNumber();
- _fieldC0 = file->readNumber();
+namespace Titanic {
- CGameObject::load(file);
-}
+RAW_MESSAGE(CPETDeliverMsg);
+RAW_MESSAGE(CPETGainedObjectMsg);
+RAW_MESSAGE(CPETHelmetOnOffMsg);
+RAW_MESSAGE(CPETKeyboardOnOffMsg);
+RAW_MESSAGE(CPETLostObjectMsg);
+RAW_MESSAGE(CPETObjectSelectedMsg);
+NUM_MESSAGE(CPETObjectStateMsg, _value);
+RAW_MESSAGE(CPETPhotoOnOffMsg);
+NUM_MESSAGE(CPETPlaySoundMsg, _value);
+RAW_MESSAGE(CPETReceiveMsg);
+RAW_MESSAGE(CPETSetStarDestinationMsg);
+NUM_MESSAGE(CPETStarFieldLockMsg, _value);
+RAW_MESSAGE(CPETStereoFieldOnOffMsg);
+SNUM_MESSAGE_VAL(CPETTargetMsg, _strValue, _numValue, nullptr, -1);
} // End of namespace Titanic
+
+#endif /* TITANIC_PET_MESSAGES_H */
diff --git a/engines/titanic/messages/sub_accept_ccarry_msg.h b/engines/titanic/messages/sub_accept_ccarry_msg.h
deleted file mode 100644
index b7c48ae81e..0000000000
--- a/engines/titanic/messages/sub_accept_ccarry_msg.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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_SUB_ACCEPT_CCARRY_MSG_H
-#define TITANIC_SUB_ACCEPT_CCARRY_MSG_H
-
-#include "titanic/messages/message.h"
-
-namespace Titanic {
-
-class CSubAcceptCCarryMsg : public CMessage {
-public:
- CString _string1;
- int _value1, _value2, _value3;
-public:
- CSubAcceptCCarryMsg() : _value1(0), _value2(0), _value3(0) {}
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CSubAcceptCCarryMsg"; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_SUB_ACCEPT_CCARRY_MSG_H */
diff --git a/engines/titanic/messages/transport_msg.h b/engines/titanic/messages/transport_msg.h
deleted file mode 100644
index 513a2504bc..0000000000
--- a/engines/titanic/messages/transport_msg.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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_TRANSPORT_MSG_H
-#define TITANIC_TRANSPORT_MSG_H
-
-#include "titanic/messages/message.h"
-
-namespace Titanic {
-
-class CTransportMsg : public CMessage {
-public:
- CString _string;
- int _value1, _value2;
-public:
- CTransportMsg() : _value1(0), _value2(0) {}
-
- /**
- * Return the class name
- */
- virtual const char *getClassName() const { return "CTransportMsg"; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_TRANSPORT_MSG_H */
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index c20afb299b..d8fdbebc73 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -111,7 +111,7 @@ MODULE_OBJS := \
gfx/toggle_switch.o \
messages/auto_sound_event.o \
messages/door_auto_sound_event.o \
- messages/message.o \
+ messages/messages.o \
moves/enter_bomb_room.o \
moves/exit_arboretum.o \
moves/exit_bridge.o \