From 06ce0dbfddb016dc18ac38bbd938b8b5c71f454a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 25 Feb 2016 21:42:10 -0500 Subject: TITANIC: Implement TrueTalk NPC classes --- engines/titanic/npcs/deskbot.h | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 engines/titanic/npcs/deskbot.h (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h new file mode 100644 index 0000000000..2826b01660 --- /dev/null +++ b/engines/titanic/npcs/deskbot.h @@ -0,0 +1,58 @@ +/* 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_DESKBOT_H +#define TITANIC_DESKBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CDeskbot : public CTrueTalkNPC { +private: + static int _v1; + static int _v2; +private: + int _field108; + int _field10C; +public: + CDeskbot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CDeskbot"; } + + /** + * 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_DESKBOT_H */ -- cgit v1.2.3 From 7375394b810f3503f168d5770555aa1932d7892d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 6 Mar 2016 19:12:49 -0500 Subject: TITANIC: Converting saveable objects hierarchy to have type data This is necessary for at least message sending, and probably other areas, that needs to be able to pass class filtering for message targets. And I could figure out a clean way to use the built-in RTTI --- engines/titanic/npcs/deskbot.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 2826b01660..cb977e416d 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -35,13 +35,9 @@ private: int _field108; int _field10C; public: + CLASSDEF CDeskbot(); - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CDeskbot"; } - /** * Save the data for the class to file */ -- cgit v1.2.3 From a6d03a15c9b305afab75d5b89b9c818249031ec7 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 14 Apr 2016 07:51:23 -0400 Subject: TITANIC: More CMagazine message handlers --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index cb977e416d..50c3e3fb46 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -31,7 +31,7 @@ class CDeskbot : public CTrueTalkNPC { private: static int _v1; static int _v2; -private: +public: int _field108; int _field10C; public: -- cgit v1.2.3 From 1f4eca3d061d85cdc11a8e20834c14de082baedc Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 May 2016 18:50:54 -0400 Subject: TITANIC: Message handler stubs for CDeskbot --- engines/titanic/npcs/deskbot.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 50c3e3fb46..2711e9cc43 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -28,6 +28,18 @@ namespace Titanic { class CDeskbot : public CTrueTalkNPC { + DECLARE_MESSAGE_MAP + bool TurnOn(CTurnOn *msg); + bool EnterViewMsg(CEnterViewMsg *msg); + bool ActMsg(CActMsg *msg); + bool MovieEndMsg(CMovieEndMsg *msg); + bool LeaveViewMsg(CLeaveViewMsg *msg); + bool TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg); + bool NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg); + bool NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg); + bool TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg); + bool TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg); + bool TurnOff(CTurnOff *msg); private: static int _v1; static int _v2; -- cgit v1.2.3 From a7ecc6d601f1beabd0f5538d5e1cd7d6e983d2b9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 May 2016 19:52:48 -0400 Subject: TITANIC: Adding CDeskbot message handlers --- engines/titanic/npcs/deskbot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 2711e9cc43..607255be57 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -44,8 +44,8 @@ private: static int _v1; static int _v2; public: - int _field108; - int _field10C; + bool _deskbotActive; + bool _field10C; public: CLASSDEF CDeskbot(); -- cgit v1.2.3 From 421812f27c59e53e68dfbaa777284c74a8fb7938 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 May 2016 21:42:18 -0400 Subject: TITANIC: More implementing deskbot message handlers --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 607255be57..8425f58f95 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -45,7 +45,7 @@ private: static int _v2; public: bool _deskbotActive; - bool _field10C; + int _field10C; public: CLASSDEF CDeskbot(); -- cgit v1.2.3 From 703bb288c17e207f083e75facc750f5c8c30a09e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 May 2016 23:30:43 -0400 Subject: TITANIC: Finished Deskbot message handlers --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 8425f58f95..3e155f6788 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -45,7 +45,7 @@ private: static int _v2; public: bool _deskbotActive; - int _field10C; + int _classNum; public: CLASSDEF CDeskbot(); -- cgit v1.2.3 From 5ccc0a66da38d23520234e7060efaf966d3345b9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 29 Jun 2016 19:53:16 -0400 Subject: TITANIC: Removed const modifier from all saveable objects Turns out that CGameObject::save regenerates the _movieRangeInfo list. So the const suffix can no longer be used for the entire hierarchy --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index 3e155f6788..ff5459910b 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -53,7 +53,7 @@ public: /** * Save the data for the class to file */ - virtual void save(SimpleFile *file, int indent) const; + virtual void save(SimpleFile *file, int indent); /** * Load the data for the class from file -- cgit v1.2.3 From 4d79ee16c07e2398e9058fe93947b4704cd6048a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 24 Jul 2016 20:30:56 -0400 Subject: TITANIC: Add semicolon after CLASSDEF macro usage --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index ff5459910b..e900781ea6 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -47,7 +47,7 @@ public: bool _deskbotActive; int _classNum; public: - CLASSDEF + CLASSDEF; CDeskbot(); /** -- cgit v1.2.3 From 875002daea7a007c2727685a767eaaf3709a5252 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 24 Jul 2016 20:52:21 -0400 Subject: TITANIC: Add semicolon to DECLARE_MESSAGE_MAP usage --- engines/titanic/npcs/deskbot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/npcs/deskbot.h') diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h index e900781ea6..ab48d63546 100644 --- a/engines/titanic/npcs/deskbot.h +++ b/engines/titanic/npcs/deskbot.h @@ -28,7 +28,7 @@ namespace Titanic { class CDeskbot : public CTrueTalkNPC { - DECLARE_MESSAGE_MAP + DECLARE_MESSAGE_MAP; bool TurnOn(CTurnOn *msg); bool EnterViewMsg(CEnterViewMsg *msg); bool ActMsg(CActMsg *msg); -- cgit v1.2.3