aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-01 00:27:28 +0300
committerGitHub2016-08-01 00:27:28 +0300
commit9d3a2c1c7f9365f65908f583e62047830f60693d (patch)
treed7ba49593a1e3d79f17b350e700b1fbcf71f5b22 /engines/titanic/npcs
parent567054d8298a013f93dd9e0e332e2a08402b10a6 (diff)
parent19f8a0965be832a71a101054748cf000adf16add (diff)
downloadscummvm-rg350-9d3a2c1c7f9365f65908f583e62047830f60693d.tar.gz
scummvm-rg350-9d3a2c1c7f9365f65908f583e62047830f60693d.tar.bz2
scummvm-rg350-9d3a2c1c7f9365f65908f583e62047830f60693d.zip
Merge pull request #786 from dreammaster/titanic
TITANIC: Starship Titanic engine
Diffstat (limited to 'engines/titanic/npcs')
-rw-r--r--engines/titanic/npcs/barbot.cpp241
-rw-r--r--engines/titanic/npcs/barbot.h194
-rw-r--r--engines/titanic/npcs/bellbot.cpp44
-rw-r--r--engines/titanic/npcs/bellbot.h50
-rw-r--r--engines/titanic/npcs/callbot.cpp46
-rw-r--r--engines/titanic/npcs/callbot.h51
-rw-r--r--engines/titanic/npcs/character.cpp79
-rw-r--r--engines/titanic/npcs/character.h57
-rw-r--r--engines/titanic/npcs/deskbot.cpp310
-rw-r--r--engines/titanic/npcs/deskbot.h66
-rw-r--r--engines/titanic/npcs/doorbot.cpp63
-rw-r--r--engines/titanic/npcs/doorbot.h56
-rw-r--r--engines/titanic/npcs/liftbot.cpp56
-rw-r--r--engines/titanic/npcs/liftbot.h55
-rw-r--r--engines/titanic/npcs/maitre_d.cpp68
-rw-r--r--engines/titanic/npcs/maitre_d.h60
-rw-r--r--engines/titanic/npcs/mobile.cpp48
-rw-r--r--engines/titanic/npcs/mobile.h52
-rw-r--r--engines/titanic/npcs/parrot.cpp143
-rw-r--r--engines/titanic/npcs/parrot.h111
-rw-r--r--engines/titanic/npcs/robot_controller.cpp44
-rw-r--r--engines/titanic/npcs/robot_controller.h50
-rw-r--r--engines/titanic/npcs/starlings.cpp46
-rw-r--r--engines/titanic/npcs/starlings.h50
-rw-r--r--engines/titanic/npcs/succubus.cpp215
-rw-r--r--engines/titanic/npcs/succubus.h106
-rw-r--r--engines/titanic/npcs/summon_bots.cpp49
-rw-r--r--engines/titanic/npcs/summon_bots.h52
-rw-r--r--engines/titanic/npcs/titania.cpp77
-rw-r--r--engines/titanic/npcs/titania.h61
-rw-r--r--engines/titanic/npcs/true_talk_npc.cpp237
-rw-r--r--engines/titanic/npcs/true_talk_npc.h107
32 files changed, 2944 insertions, 0 deletions
diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp
new file mode 100644
index 0000000000..8f1c5e6ab3
--- /dev/null
+++ b/engines/titanic/npcs/barbot.cpp
@@ -0,0 +1,241 @@
+/* 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/npcs/barbot.h"
+
+namespace Titanic {
+
+int CBarbot::_v0;
+
+CBarbot::CBarbot() : CTrueTalkNPC() {
+ _field108 = 0;
+ _field10C = 0;
+ _field110 = 0;
+ _field114 = 0;
+ _field118 = 0;
+ _field11C = 0;
+ _field120 = 0;
+ _field124 = 0;
+ _field128 = 0;
+ _field12C = 0;
+ _field130 = 0;
+ _field134 = 0;
+ _field138 = 0;
+ _field13C = -1;
+ _field140 = 30;
+ _field144 = -1;
+ _field148 = -1;
+ _field14C = 0;
+ _field150 = 0;
+ _field154 = 0;
+ _field158 = -1;
+ _field15C = 0;
+ _field160 = 0;
+ _field164 = 558;
+ _field168 = 585;
+ _field16C = 659;
+ _field170 = 692;
+ _field174 = 802;
+ _field178 = 816;
+ _field17C = 1941;
+ _field180 = 1977;
+ _field184 = 1901;
+ _field188 = 1941;
+ _field18C = 810;
+ _field190 = 816;
+ _field194 = 857;
+ _field198 = 865;
+ _field19C = 842;
+ _field1A0 = 857;
+ _field1A4 = 821;
+ _field1A8 = 842;
+ _field1AC = 682;
+ _field1B0 = 692;
+ _field1B4 = 1977;
+ _field1B8 = 2018;
+ _field1BC = 2140;
+ _field1C0 = 2170;
+ _field1C4 = 2101;
+ _field1C8 = 2139;
+ _field1CC = 2018;
+ _field1D0 = 2099;
+ _field1D4 = 1902;
+ _field1D8 = 2015;
+ _field1E0 = 1811;
+ _field1E4 = 1901;
+ _field1E8 = 1810;
+ _field1EC = 1703;
+ _field1F0 = 1750;
+ _field1F4 = 1681;
+ _field1F8 = 1702;
+ _field1FC = 1642;
+
+ _field200 = 1702;
+ _field204 = 1571;
+ _field208 = 1641;
+ _field20C = 1499;
+ _field210 = 1570;
+ _field214 = 1403;
+ _field218 = 1463;
+ _field21C = 1464;
+ _field220 = 1499;
+ _field224 = 1288;
+ _field228 = 1295;
+ _field22C = 1266;
+ _field230 = 1287;
+ _field234 = 1245;
+ _field238 = 1265;
+ _field23C = 1208;
+ _field240 = 1244;
+ _field244 = 1171;
+ _field248 = 1207;
+ _field24C = 1120;
+ _field250 = 1170;
+ _field254 = 1092;
+ _field258 = 1120;
+ _field25C = 1092;
+ _field260 = 1092;
+ _field264 = 1044;
+ _field268 = 1091;
+ _field26C = 1011;
+ _field270 = 1043;
+ _field274 = 1001;
+ _field278 = 1010;
+ _field27C = 985;
+ _field280 = 1001;
+ _field284 = 927;
+ _field288 = 984;
+ _field28C = 912;
+ _field290 = 926;
+ _field294 = 898;
+ _field298 = 906;
+ _field29C = 802;
+ _field2A0 = 896;
+ _field2A4 = 865;
+ _field2A8 = 896;
+ _field2AC = 842;
+ _field2B0 = 865;
+ _field2B4 = 816;
+ _field2B8 = 842;
+ _field2BC = 802;
+ _field2C0 = 842;
+ _field2C4 = 740;
+ _field2C8 = 740;
+ _field2CC = 740;
+ _field2D0 = 692;
+ _field2D4 = 610;
+ _field2D8 = 558;
+ _field2E0 = 610;
+ _field2E4 = 500;
+ _field2E8 = 558;
+ _field2EC = 467;
+ _field2F0 = 500;
+ _field2F4 = 421;
+ _field2F8 = 466;
+ _field2FC = 349;
+ _field300 = 306;
+ _field304 = 306;
+ _field308 = 348;
+ _field30C = 305;
+ _field310 = 306;
+ _field314 = 281;
+ _field318 = 305;
+ _field31C = 202;
+ _field320 = 281;
+ _field324 = 182;
+ _field328 = 202;
+ _field32C = 165;
+ _field330 = 182;
+ _field334 = 96;
+ _field338 = 165;
+ _field33C = 0;
+ _field340 = 95;
+}
+
+void CBarbot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_field10C, indent);
+ file->writeNumberLine(_field110, indent);
+ file->writeNumberLine(_field114, indent);
+ file->writeNumberLine(_field118, indent);
+ file->writeNumberLine(_field11C, indent);
+ file->writeNumberLine(_field120, indent);
+ file->writeNumberLine(_field124, indent);
+ file->writeNumberLine(_field128, indent);
+
+ file->writeNumberLine(_v0, indent);
+ file->writeNumberLine(_field12C, indent);
+ file->writeNumberLine(_field130, indent);
+ file->writeNumberLine(_field134, indent);
+ file->writeNumberLine(_field138, indent);
+ file->writeNumberLine(_field13C, indent);
+ file->writeNumberLine(_field140, indent);
+ file->writeNumberLine(_field144, indent);
+ file->writeNumberLine(_field148, indent);
+ file->writeNumberLine(_field14C, indent);
+ file->writeNumberLine(_field150, indent);
+ file->writeNumberLine(_field154, indent);
+ file->writeNumberLine(_field158, indent);
+ file->writeNumberLine(_field15C, indent);
+ file->writeNumberLine(_field160, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CBarbot::load(SimpleFile *file) {
+ file->readNumber();
+ _field108 = file->readNumber();
+ _field10C = file->readNumber();
+ _field110 = file->readNumber();
+ _field114 = file->readNumber();
+ _field118 = file->readNumber();
+ _field11C = file->readNumber();
+ _field120 = file->readNumber();
+ _field124 = file->readNumber();
+ _field128 = file->readNumber();
+
+ _v0 = file->readNumber();
+ _field12C = file->readNumber();
+ _field130 = file->readNumber();
+ _field134 = file->readNumber();
+ _field138 = file->readNumber();
+ _field13C = file->readNumber();
+ _field140 = file->readNumber();
+ _field144 = file->readNumber();
+ _field148 = file->readNumber();
+ _field14C = file->readNumber();
+ _field150 = file->readNumber();
+ _field154 = file->readNumber();
+ _field158 = file->readNumber();
+ _field15C = file->readNumber();
+ _field160 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+bool CBarbot::EnterRoomMsg(CEnterRoomMsg *msg) {
+ warning("TODO: Barbot::CEnterRoomMsg");
+ return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/barbot.h b/engines/titanic/npcs/barbot.h
new file mode 100644
index 0000000000..7557fdd2c6
--- /dev/null
+++ b/engines/titanic/npcs/barbot.h
@@ -0,0 +1,194 @@
+/* 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_BARBOT_H
+#define TITANIC_BARBOT_H
+
+#include "titanic/npcs/true_talk_npc.h"
+#include "titanic/messages/messages.h"
+
+namespace Titanic {
+
+class CBarbot : public CTrueTalkNPC {
+ bool EnterRoomMsg(CEnterRoomMsg *msg);
+private:
+ static int _v0;
+private:
+ int _field108;
+ int _field10C;
+ int _field110;
+ int _field114;
+ int _field118;
+ int _field11C;
+ int _field120;
+ int _field124;
+ int _field128;
+ int _field12C;
+ int _field130;
+ int _field134;
+ int _field138;
+ int _field13C;
+ int _field140;
+ int _field144;
+ int _field148;
+ int _field14C;
+ int _field150;
+ int _field154;
+ int _field158;
+ int _field15C;
+ int _field160;
+ int _field164;
+ int _field168;
+ int _field16C;
+ int _field170;
+ int _field174;
+ int _field178;
+ int _field17C;
+ int _field180;
+ int _field184;
+ int _field188;
+ int _field18C;
+ int _field190;
+ int _field194;
+ int _field198;
+ int _field19C;
+ int _field1A0;
+ int _field1A4;
+ int _field1A8;
+ int _field1AC;
+ int _field1B0;
+ int _field1B4;
+ int _field1B8;
+ int _field1BC;
+ int _field1C0;
+ int _field1C4;
+ int _field1C8;
+ int _field1CC;
+ int _field1D0;
+ int _field1D4;
+ int _field1D8;
+ int _field1E0;
+ int _field1E4;
+ int _field1E8;
+ int _field1EC;
+ int _field1F0;
+ int _field1F4;
+ int _field1F8;
+ int _field1FC;
+ int _field200;
+ int _field204;
+ int _field208;
+ int _field20C;
+ int _field210;
+ int _field214;
+ int _field218;
+ int _field21C;
+ int _field220;
+ int _field224;
+ int _field228;
+ int _field22C;
+ int _field230;
+ int _field234;
+ int _field238;
+ int _field23C;
+ int _field240;
+ int _field244;
+ int _field248;
+ int _field24C;
+ int _field250;
+ int _field254;
+ int _field258;
+ int _field25C;
+ int _field260;
+ int _field264;
+ int _field268;
+ int _field26C;
+ int _field270;
+ int _field274;
+ int _field278;
+ int _field27C;
+ int _field280;
+ int _field284;
+ int _field288;
+ int _field28C;
+ int _field290;
+ int _field294;
+ int _field298;
+ int _field29C;
+ int _field2A0;
+ int _field2A4;
+ int _field2A8;
+ int _field2AC;
+ int _field2B0;
+ int _field2B4;
+ int _field2B8;
+ int _field2BC;
+ int _field2C0;
+ int _field2C4;
+ int _field2C8;
+ int _field2CC;
+ int _field2D0;
+ int _field2D4;
+ int _field2D8;
+ int _field2E0;
+ int _field2E4;
+ int _field2E8;
+ int _field2EC;
+ int _field2F0;
+ int _field2F4;
+ int _field2F8;
+ int _field2FC;
+ int _field300;
+ int _field304;
+ int _field308;
+ int _field30C;
+ int _field310;
+ int _field314;
+ int _field318;
+ int _field31C;
+ int _field320;
+ int _field324;
+ int _field328;
+ int _field32C;
+ int _field330;
+ int _field334;
+ int _field338;
+ int _field33C;
+ int _field340;
+public:
+ CLASSDEF;
+ CBarbot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_BARBOT_H */
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp
new file mode 100644
index 0000000000..7ee0128a1e
--- /dev/null
+++ b/engines/titanic/npcs/bellbot.cpp
@@ -0,0 +1,44 @@
+/* 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/npcs/bellbot.h"
+
+namespace Titanic {
+
+CBellBot::CBellBot() : CTrueTalkNPC(), _field108(0) {
+}
+
+void CBellBot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_field108, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CBellBot::load(SimpleFile *file) {
+ file->readNumber();
+ _field108 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/bellbot.h b/engines/titanic/npcs/bellbot.h
new file mode 100644
index 0000000000..93c4a2857d
--- /dev/null
+++ b/engines/titanic/npcs/bellbot.h
@@ -0,0 +1,50 @@
+/* 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_BELLBOT_H
+#define TITANIC_BELLBOT_H
+
+#include "titanic/npcs/true_talk_npc.h"
+
+namespace Titanic {
+
+class CBellBot : public CTrueTalkNPC {
+private:
+ int _field108;
+public:
+ CLASSDEF;
+ CBellBot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_BELLBOT_H */
diff --git a/engines/titanic/npcs/callbot.cpp b/engines/titanic/npcs/callbot.cpp
new file mode 100644
index 0000000000..eb0d4b71d5
--- /dev/null
+++ b/engines/titanic/npcs/callbot.cpp
@@ -0,0 +1,46 @@
+/* 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/npcs/callbot.h"
+
+namespace Titanic {
+
+CCallBot::CCallBot() : CGameObject(), _fieldC8(0) {
+}
+
+void CCallBot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeQuotedLine(_string1, indent);
+ file->writeNumberLine(_fieldC8, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CCallBot::load(SimpleFile *file) {
+ file->readNumber();
+ _string1 = file->readString();
+ _fieldC8 = file->readNumber();
+
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/callbot.h b/engines/titanic/npcs/callbot.h
new file mode 100644
index 0000000000..9b89d59d3f
--- /dev/null
+++ b/engines/titanic/npcs/callbot.h
@@ -0,0 +1,51 @@
+/* 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_CALLBOT_H
+#define TITANIC_CALLBOT_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CCallBot : public CGameObject {
+protected:
+ CString _string1;
+ int _fieldC8;
+public:
+ CLASSDEF;
+ CCallBot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_CALLBOT_H */
diff --git a/engines/titanic/npcs/character.cpp b/engines/titanic/npcs/character.cpp
new file mode 100644
index 0000000000..ed36db16d3
--- /dev/null
+++ b/engines/titanic/npcs/character.cpp
@@ -0,0 +1,79 @@
+/* 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/npcs/character.h"
+
+namespace Titanic {
+
+BEGIN_MESSAGE_MAP(CCharacter, CGameObject)
+ ON_MESSAGE(LeaveViewMsg)
+ ON_MESSAGE(TurnOn)
+ ON_MESSAGE(TurnOff)
+END_MESSAGE_MAP()
+
+CCharacter::CCharacter() : CGameObject(), _fieldBC(0), _fieldC0(0), _fieldC4(1) {
+}
+
+void CCharacter::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_fieldC0, indent);
+ file->writeNumberLine(_fieldC4, indent);
+ file->writeQuotedLine(_charName, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CCharacter::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldBC = file->readNumber();
+ _fieldC0 = file->readNumber();
+ _fieldC4 = file->readNumber();
+ _charName = file->readString();
+
+ CGameObject::load(file);
+}
+
+bool CCharacter::LeaveViewMsg(CLeaveViewMsg *msg) {
+ CTurnOff offMsg;
+ offMsg.execute(this);
+
+ return true;
+}
+
+bool CCharacter::TurnOn(CTurnOn *msg) {
+ if (!_fieldC4)
+ _fieldC4 = 1;
+
+ return true;
+}
+
+bool CCharacter::TurnOff(CTurnOff *msg) {
+ CString charName = getName();
+ if (charName == "Deskbot" || charName == "Barbot" || charName == "SuccUBus") {
+ _fieldC4 = 0;
+ }
+
+ return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/character.h b/engines/titanic/npcs/character.h
new file mode 100644
index 0000000000..4912740189
--- /dev/null
+++ b/engines/titanic/npcs/character.h
@@ -0,0 +1,57 @@
+/* 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_CHARACTER_H
+#define TITANIC_CHARACTER_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CCharacter : public CGameObject {
+ DECLARE_MESSAGE_MAP;
+ bool LeaveViewMsg(CLeaveViewMsg *msg);
+ bool TurnOn(CTurnOn *msg);
+ bool TurnOff(CTurnOff *msg);
+protected:
+ int _fieldBC;
+ int _fieldC0;
+ int _fieldC4;
+ CString _charName;
+public:
+ CLASSDEF;
+ CCharacter();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_CHARACTER_H */
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
new file mode 100644
index 0000000000..d11b135983
--- /dev/null
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -0,0 +1,310 @@
+/* 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/npcs/deskbot.h"
+#include "titanic/pet_control/pet_control.h"
+
+namespace Titanic {
+
+static const char *const TALKING_NAMES[] = {
+ "NeutralTalking", "HandFidget1", "HandFidget2", "LookingAround",
+ "FriendlyTalking", "MoreRudeness", "HandUp", "TapFingers",
+ "WaveOn", "WaveArmsAround", "HandsOverEdge"
+};
+
+static const char *const IDLE_NAMES[] = {
+ "WaveOn", "HandFidget1", "HandFidget2", "TapFingers", "HandsOverEdge"
+};
+
+BEGIN_MESSAGE_MAP(CDeskbot, CTrueTalkNPC)
+ ON_MESSAGE(TurnOn)
+ ON_MESSAGE(EnterViewMsg)
+ ON_MESSAGE(ActMsg)
+ ON_MESSAGE(MovieEndMsg)
+ ON_MESSAGE(LeaveViewMsg)
+ ON_MESSAGE(TrueTalkTriggerActionMsg)
+ ON_MESSAGE(NPCPlayTalkingAnimationMsg)
+ ON_MESSAGE(NPCPlayIdleAnimationMsg)
+ ON_MESSAGE(TrueTalkNotifySpeechStartedMsg)
+ ON_MESSAGE(TrueTalkNotifySpeechEndedMsg)
+ ON_MESSAGE(TurnOff)
+END_MESSAGE_MAP()
+
+int CDeskbot::_v1;
+int CDeskbot::_v2;
+
+CDeskbot::CDeskbot() : CTrueTalkNPC(), _deskbotActive(false), _classNum(0) {
+}
+
+void CDeskbot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_v2, indent);
+ file->writeNumberLine(_deskbotActive, indent);
+ file->writeNumberLine(_classNum, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CDeskbot::load(SimpleFile *file) {
+ file->readNumber();
+ _v1 = file->readNumber();
+ _v2 = file->readNumber();
+ _deskbotActive = file->readNumber();
+ _classNum = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+bool CDeskbot::TurnOn(CTurnOn *msg) {
+ if (!_deskbotActive) {
+ setVisible(true);
+ playClip("BellRinging", 4);
+ playSound("b#69.wav");
+ petSetArea(PET_CONVERSATION);
+
+ _npcFlags |= NPCFLAG_20000;
+ _deskbotActive = true;
+ }
+
+ return true;
+}
+
+bool CDeskbot::EnterViewMsg(CEnterViewMsg *msg) {
+ setVisible(false);
+ _deskbotActive = false;
+ _fieldC4 = 0;
+ loadFrame(625);
+
+ return true;
+}
+
+bool CDeskbot::ActMsg(CActMsg *msg) {
+ if (msg->_action == "2ndClassUpgrade" && getPassengerClass() > 2) {
+ startTalking(this, 140, findView());
+ }
+
+ return true;
+}
+
+bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) {
+ bool flag = false;
+ if (_npcFlags & NPCFLAG_10000) {
+ if (_classNum) {
+ petSetArea(PET_ROOMS);
+ dec54();
+ unlockMouse();
+ playSound("z#47.wav", 100, 0, 0);
+ _classNum = false;
+ }
+
+ _npcFlags &= ~NPCFLAG_10000;
+ flag = true;
+ }
+
+ if (_npcFlags & NPCFLAG_40000) {
+ _deskbotActive = false;
+ _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000);
+
+ if (_npcFlags & NPCFLAG_80000) {
+ CTurnOn turnOn;
+ turnOn.execute("EmbBellbotTrigger");
+ unlockMouse();
+ changeView("EmbLobby.Node 4.N", "");
+ } else if (_npcFlags & NPCFLAG_100000) {
+ CTurnOn turnOn;
+ turnOn.execute("EmbDoorBotTrigger");
+ unlockMouse();
+ changeView("EmbLobby.Node 4.N", "");
+ }
+
+ _npcFlags &= ~(NPCFLAG_80000 | NPCFLAG_100000);
+ flag = true;
+ }
+
+ if (_npcFlags & NPCFLAG_20000) {
+ _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000);
+ endTalking(this, 1, findView());
+
+ _npcFlags |= NPCFLAG_4;
+ flag = true;
+ }
+
+ if (!flag)
+ CTrueTalkNPC::MovieEndMsg(msg);
+
+ return true;
+}
+
+bool CDeskbot::LeaveViewMsg(CLeaveViewMsg *msg) {
+ if (_deskbotActive) {
+ CTurnOff turnOff;
+ turnOff.execute(this);
+ }
+
+ return true;
+}
+
+bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
+ switch (msg->_action) {
+ case 19:
+ inc54();
+ lockMouse();
+ petSetArea(PET_CONVERSATION);
+ playClip("ReprogramPETInHand", 4);
+ _npcFlags |= NPCFLAG_10000;
+ _classNum = msg->_param1;
+
+ switch (_classNum) {
+ case 1:
+ petDisplayMessage("You have been upgraded to 1st Class status. Enjoy hugely.");
+ setPassengerClass(_classNum);
+ petReassignRoom(_classNum);
+ break;
+ case 2:
+ petDisplayMessage("You have been upgraded to 2nd Class status. Enjoy.");
+ setPassengerClass(_classNum);
+ petReassignRoom(_classNum);
+ break;
+ case 3:
+ setPassengerClass(3);
+ petReassignRoom(_classNum);
+ break;
+ default:
+ break;
+ }
+
+ case 20:
+ if (getPassengerClass() == 1) {
+ CPetControl *petControl = getPetControl();
+ if (petControl)
+ petControl->changeLocationClass(4);
+ }
+ break;
+
+ case 21:
+ if (getPassengerClass() == 1) {
+ CPetControl *petControl = getPetControl();
+ if (petControl)
+ petControl->changeLocationClass(3);
+ }
+ break;
+
+ case 22:
+ if (getPassengerClass() == 1) {
+ CPetControl *petControl = getPetControl();
+ if (petControl)
+ petControl->changeLocationClass(2);
+ }
+ break;
+
+ case 23:
+ if (getPassengerClass() == 1) {
+ CPetControl *petControl = getPetControl();
+ if (petControl)
+ petControl->changeLocationClass(1);
+ }
+ break;
+
+ case 26:
+ _npcFlags |= NPCFLAG_80000;
+ CTurnOff turnOff;
+ turnOff.execute(this);
+ lockMouse();
+ break;
+ }
+
+ return true;
+}
+
+bool CDeskbot::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) {
+ if (msg->_value2 != 2)
+ msg->_names = TALKING_NAMES;
+
+ return true;
+}
+
+bool CDeskbot::NPCPlayIdleAnimationMsg(CNPCPlayIdleAnimationMsg *msg) {
+ msg->_names = IDLE_NAMES;
+ return true;
+}
+
+bool CDeskbot::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) {
+ if (_npcFlags & NPCFLAG_40000)
+ return true;
+
+ CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(msg);
+ switch (msg->_dialogueId) {
+ case 41684:
+ case 41686:
+ case 41787:
+ case 41788:
+ case 41789:
+ lockMouse();
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}
+
+bool CDeskbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
+ if (_npcFlags & NPCFLAG_40000)
+ return true;
+
+ CTurnOff turnOff;
+ CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(msg);
+
+ switch (msg->_dialogueId) {
+ case 41684:
+ case 41787:
+ case 41788:
+ case 41789:
+ _npcFlags |= NPCFLAG_80000;
+ turnOff.execute(this);
+
+ case 41686:
+ _npcFlags |= NPCFLAG_100000;
+ turnOff.execute(this);
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
+bool CDeskbot::TurnOff(CTurnOff *msg) {
+ if (_deskbotActive) {
+ stopMovie();
+ performAction(1, findView());
+
+ _npcFlags = (_npcFlags & ~(NPCFLAG_SPEAKING | NPCFLAG_2 | NPCFLAG_4)) | NPCFLAG_40000;
+ playClip("Closing", 0x14);
+ }
+
+ return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h
new file mode 100644
index 0000000000..ab48d63546
--- /dev/null
+++ b/engines/titanic/npcs/deskbot.h
@@ -0,0 +1,66 @@
+/* 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 {
+ 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;
+public:
+ bool _deskbotActive;
+ int _classNum;
+public:
+ CLASSDEF;
+ CDeskbot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_DESKBOT_H */
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
new file mode 100644
index 0000000000..76db55f92c
--- /dev/null
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -0,0 +1,63 @@
+/* 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/npcs/doorbot.h"
+
+namespace Titanic {
+
+int CDoorbot::_v1;
+int CDoorbot::_v2;
+
+CDoorbot::CDoorbot() : CTrueTalkNPC() {
+ _field108 = 0;
+ _field10C = 0;
+ _field110 = 0;
+ _field114 = 0;
+}
+
+void CDoorbot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_v2, indent);
+
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_field10C, indent);
+ file->writeNumberLine(_field110, indent);
+ file->writeNumberLine(_field114, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CDoorbot::load(SimpleFile *file) {
+ file->readNumber();
+ _v1 = file->readNumber();
+ _v2 = file->readNumber();
+
+ _field108 = file->readNumber();
+ _field10C = file->readNumber();
+ _field110 = file->readNumber();
+ _field114 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/doorbot.h b/engines/titanic/npcs/doorbot.h
new file mode 100644
index 0000000000..b62026c7d9
--- /dev/null
+++ b/engines/titanic/npcs/doorbot.h
@@ -0,0 +1,56 @@
+/* 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_DOORBOT_H
+#define TITANIC_DOORBOT_H
+
+#include "titanic/npcs/true_talk_npc.h"
+
+namespace Titanic {
+
+class CDoorbot : public CTrueTalkNPC {
+private:
+ static int _v1;
+ static int _v2;
+private:
+ int _field108;
+ int _field10C;
+ int _field110;
+ int _field114;
+public:
+ CLASSDEF;
+ CDoorbot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_DOORBOT_H */
diff --git a/engines/titanic/npcs/liftbot.cpp b/engines/titanic/npcs/liftbot.cpp
new file mode 100644
index 0000000000..43daa017c1
--- /dev/null
+++ b/engines/titanic/npcs/liftbot.cpp
@@ -0,0 +1,56 @@
+/* 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/npcs/liftbot.h"
+
+namespace Titanic {
+
+int CLiftBot::_v1;
+int CLiftBot::_v2;
+
+CLiftBot::CLiftBot() : CTrueTalkNPC(), _field108(1) {
+}
+
+void CLiftBot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_v2, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CLiftBot::load(SimpleFile *file) {
+ file->readNumber();
+ _v1 = file->readNumber();
+ _field108 = file->readNumber();
+ _v2 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+bool CLiftBot::EnterRoomMsg(CEnterRoomMsg *msg) {
+ warning("CLiftBot::handleEvent");
+ return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/liftbot.h b/engines/titanic/npcs/liftbot.h
new file mode 100644
index 0000000000..7550a8a6f0
--- /dev/null
+++ b/engines/titanic/npcs/liftbot.h
@@ -0,0 +1,55 @@
+/* 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_LIFTBOT_H
+#define TITANIC_LIFTBOT_H
+
+#include "titanic/npcs/true_talk_npc.h"
+#include "titanic/messages/messages.h"
+
+namespace Titanic {
+
+class CLiftBot : public CTrueTalkNPC {
+ bool EnterRoomMsg(CEnterRoomMsg *msg);
+private:
+ static int _v1;
+ static int _v2;
+private:
+ int _field108;
+public:
+ CLASSDEF;
+ CLiftBot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_LIFTBOT_H */
diff --git a/engines/titanic/npcs/maitre_d.cpp b/engines/titanic/npcs/maitre_d.cpp
new file mode 100644
index 0000000000..903f3a49c9
--- /dev/null
+++ b/engines/titanic/npcs/maitre_d.cpp
@@ -0,0 +1,68 @@
+/* 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/npcs/maitre_d.h"
+
+namespace Titanic {
+
+int CMaitreD::_v1;
+
+CMaitreD::CMaitreD() : CTrueTalkNPC(),
+ _string2("z#40.wav"), _string3("z#40.wav"), _field108(0), _field118(1),
+ _field11C(0), _field12C(0), _field130(1), _field134(0), _field138(0) {
+}
+
+void CMaitreD::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeQuotedLine(_string2, indent);
+ file->writeNumberLine(_field118, indent);
+ file->writeNumberLine(_field11C, indent);
+ file->writeQuotedLine(_string3, indent);
+ file->writeNumberLine(_field12C, indent);
+ file->writeNumberLine(_field130, indent);
+
+ file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_field134, indent);
+ file->writeNumberLine(_field138, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CMaitreD::load(SimpleFile *file) {
+ file->readNumber();
+ _field108 = file->readNumber();
+ _string2 = file->readString();
+ _field118 = file->readNumber();
+ _field11C = file->readNumber();
+ _string3 = file->readString();
+ _field12C = file->readNumber();
+ _field130 = file->readNumber();
+
+ _v1 = file->readNumber();
+ _field134 = file->readNumber();
+ _field138 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/maitre_d.h b/engines/titanic/npcs/maitre_d.h
new file mode 100644
index 0000000000..af73f02a9a
--- /dev/null
+++ b/engines/titanic/npcs/maitre_d.h
@@ -0,0 +1,60 @@
+/* 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_MAITRED_H
+#define TITANIC_MAITRED_H
+
+#include "titanic/npcs/true_talk_npc.h"
+
+namespace Titanic {
+
+class CMaitreD : public CTrueTalkNPC {
+private:
+ static int _v1;
+private:
+ int _field108;
+ CString _string2;
+ int _field118;
+ int _field11C;
+ CString _string3;
+ int _field12C;
+ int _field130;
+ int _field134;
+ int _field138;
+public:
+ CLASSDEF;
+ CMaitreD();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_MAITRED_H */
diff --git a/engines/titanic/npcs/mobile.cpp b/engines/titanic/npcs/mobile.cpp
new file mode 100644
index 0000000000..8a45f9e3cf
--- /dev/null
+++ b/engines/titanic/npcs/mobile.cpp
@@ -0,0 +1,48 @@
+/* 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/npcs/mobile.h"
+
+namespace Titanic {
+
+EMPTY_MESSAGE_MAP(CMobile, CCharacter);
+
+CMobile::CMobile() : CCharacter(), _fieldDC(0) {
+}
+
+void CMobile::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writePoint(_pos1, indent);
+ file->writeNumberLine(_fieldDC, indent);
+
+ CCharacter::save(file, indent);
+}
+
+void CMobile::load(SimpleFile *file) {
+ file->readNumber();
+ _pos1 = file->readPoint();
+ _fieldDC = file->readNumber();
+
+ CCharacter::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/mobile.h b/engines/titanic/npcs/mobile.h
new file mode 100644
index 0000000000..68e74a5afe
--- /dev/null
+++ b/engines/titanic/npcs/mobile.h
@@ -0,0 +1,52 @@
+/* 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_MOBILE_H
+#define TITANIC_MOBILE_H
+
+#include "titanic/npcs/character.h"
+
+namespace Titanic {
+
+class CMobile : public CCharacter {
+ DECLARE_MESSAGE_MAP;
+private:
+ Point _pos1;
+ int _fieldDC;
+public:
+ CLASSDEF;
+ CMobile();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_MOBILE_H */
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
new file mode 100644
index 0000000000..49e4f4066e
--- /dev/null
+++ b/engines/titanic/npcs/parrot.cpp
@@ -0,0 +1,143 @@
+/* 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/npcs/parrot.h"
+
+namespace Titanic {
+
+int CParrot::_v1;
+int CParrot::_v2;
+int CParrot::_v3;
+int CParrot::_v4;
+int CParrot::_v5;
+
+CParrot::CParrot() : CTrueTalkNPC() {
+ _field108 = 0;
+ _string2 = "CarryParrot";
+ _field118 = 1;
+ _field11C = 25;
+ _field120 = 0;
+ _field124 = 73;
+ _field128 = 58;
+ _field12C = 0;
+ _field130 = 0;
+ _field134 = 0;
+ _field138 = 851;
+ _field13C = 851;
+ _field140 = 265;
+ _field144 = 274;
+ _field148 = 726;
+ _field14C = 730;
+ _field150 = 510;
+ _field154 = 570;
+ _field158 = 569;
+ _field15C = 689;
+ _field160 = 690;
+ _field164 = 725;
+ _field168 = 375;
+ _field16C = 508;
+ _field170 = 363;
+ _field174 = 375;
+ _field178 = 303;
+ _field17C = 313;
+ _field180 = 279;
+ _field184 = 302;
+ _field188 = 260;
+ _field18C = 264;
+ _field190 = 315;
+ _field194 = 327;
+ _field198 = 330;
+ _field19C = 360;
+ _field1A0 = 175;
+ _field1A4 = 259;
+ _field1A8 = 175;
+ _field1AC = 175;
+ _field1B0 = 162;
+ _field1B4 = 175;
+ _field1B8 = 150;
+ _field1BC = 162;
+ _field1C0 = 135;
+ _field1C4 = 150;
+ _field1C8 = 95;
+ _field1CC = 135;
+ _field1D0 = 76;
+ _field1D4 = 95;
+ _field1D8 = 55;
+ _field1DC = 76;
+ _field1E0 = 30;
+ _field1E4 = 55;
+ _field1E8 = 0;
+ _field1EC = 30;
+
+ _assetName = "z454.dlg";
+ _assetNumber = 0x13880;
+}
+
+void CParrot::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_assetNumber, indent);
+
+ file->writeQuotedLine(_assetName, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_v2, indent);
+ file->writeNumberLine(_v3, indent);
+
+ file->writeQuotedLine(_string2, indent);
+ file->writeNumberLine(_field118, indent);
+ file->writeNumberLine(_field11C, indent);
+ file->writeNumberLine(_field120, indent);
+ file->writeNumberLine(_field124, indent);
+ file->writeNumberLine(_field128, indent);
+ file->writeNumberLine(_field12C, indent);
+ file->writeNumberLine(_field130, indent);
+ file->writeNumberLine(_v4, indent);
+ file->writeNumberLine(_v5, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CParrot::load(SimpleFile *file) {
+ file->readNumber();
+ _assetNumber = file->readNumber();
+
+ _assetName = file->readString();
+ _field108 = file->readNumber();
+ _v1 = file->readNumber();
+ _v2 = file->readNumber();
+ _v3 = file->readNumber();
+
+ _string2 = file->readString();
+ _field118 = file->readNumber();
+ _field11C = file->readNumber();
+ _field120 = file->readNumber();
+ _field124 = file->readNumber();
+ _field128 = file->readNumber();
+ _field12C = file->readNumber();
+ _field130 = file->readNumber();
+ _v4 = file->readNumber();
+ _v5 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/parrot.h b/engines/titanic/npcs/parrot.h
new file mode 100644
index 0000000000..a3c8540f0e
--- /dev/null
+++ b/engines/titanic/npcs/parrot.h
@@ -0,0 +1,111 @@
+/* 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_PARROT_H
+#define TITANIC_PARROT_H
+
+#include "titanic/npcs/true_talk_npc.h"
+
+namespace Titanic {
+
+class CParrot : public CTrueTalkNPC {
+public:
+ static int _v1;
+ static int _v2;
+ static int _v3;
+ static int _v4;
+ static int _v5;
+private:
+ int _field108;
+ CString _string2;
+ int _field118;
+ int _field11C;
+ int _field120;
+ int _field124;
+ int _field128;
+ int _field12C;
+ int _field130;
+ int _field134;
+ int _field138;
+ int _field13C;
+ int _field140;
+ int _field144;
+ int _field148;
+ int _field14C;
+ int _field150;
+ int _field154;
+ int _field158;
+ int _field15C;
+ int _field160;
+ int _field164;
+ int _field168;
+ int _field16C;
+ int _field170;
+ int _field174;
+ int _field178;
+ int _field17C;
+ int _field180;
+ int _field184;
+ int _field188;
+ int _field18C;
+ int _field190;
+ int _field194;
+ int _field198;
+ int _field19C;
+ int _field1A0;
+ int _field1A4;
+ int _field1A8;
+ int _field1AC;
+ int _field1B0;
+ int _field1B4;
+ int _field1B8;
+ int _field1BC;
+ int _field1C0;
+ int _field1C4;
+ int _field1C8;
+ int _field1CC;
+ int _field1D0;
+ int _field1D4;
+ int _field1D8;
+ int _field1DC;
+ int _field1E0;
+ int _field1E4;
+ int _field1E8;
+ int _field1EC;
+public:
+ CLASSDEF;
+ CParrot();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_PARROT_H */
diff --git a/engines/titanic/npcs/robot_controller.cpp b/engines/titanic/npcs/robot_controller.cpp
new file mode 100644
index 0000000000..98866e4505
--- /dev/null
+++ b/engines/titanic/npcs/robot_controller.cpp
@@ -0,0 +1,44 @@
+/* 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/npcs/robot_controller.h"
+
+namespace Titanic {
+
+CRobotController::CRobotController() : CGameObject(), _string1("BellBot") {
+}
+
+void CRobotController::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeQuotedLine(_string1, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CRobotController::load(SimpleFile *file) {
+ file->readNumber();
+ _string1 = file->readString();
+
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/robot_controller.h b/engines/titanic/npcs/robot_controller.h
new file mode 100644
index 0000000000..6cbf57aef2
--- /dev/null
+++ b/engines/titanic/npcs/robot_controller.h
@@ -0,0 +1,50 @@
+/* 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_ROBOT_CONTROLLER_H
+#define TITANIC_ROBOT_CONTROLLER_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CRobotController : public CGameObject {
+protected:
+ CString _string1;
+public:
+ CLASSDEF;
+ CRobotController();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_ROBOT_CONTROLLER_H */
diff --git a/engines/titanic/npcs/starlings.cpp b/engines/titanic/npcs/starlings.cpp
new file mode 100644
index 0000000000..333f4c4b7a
--- /dev/null
+++ b/engines/titanic/npcs/starlings.cpp
@@ -0,0 +1,46 @@
+/* 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/npcs/starlings.h"
+
+namespace Titanic {
+
+int CStarlings::_v1;
+
+CStarlings::CStarlings() : CCharacter() {
+}
+
+void CStarlings::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_v1, indent);
+
+ CCharacter::save(file, indent);
+}
+
+void CStarlings::load(SimpleFile *file) {
+ file->readNumber();
+ _v1 = file->readNumber();
+
+ CCharacter::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/starlings.h b/engines/titanic/npcs/starlings.h
new file mode 100644
index 0000000000..4d96e5c77f
--- /dev/null
+++ b/engines/titanic/npcs/starlings.h
@@ -0,0 +1,50 @@
+/* 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_STARLINGS_H
+#define TITANIC_STARLINGS_H
+
+#include "titanic/npcs/character.h"
+
+namespace Titanic {
+
+class CStarlings : public CCharacter {
+private:
+ static int _v1;
+public:
+ CLASSDEF;
+ CStarlings();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_STARLING_H */
diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp
new file mode 100644
index 0000000000..f66a59cb84
--- /dev/null
+++ b/engines/titanic/npcs/succubus.cpp
@@ -0,0 +1,215 @@
+/* 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/npcs/succubus.h"
+
+namespace Titanic {
+
+int CSuccUBus::_v0;
+int CSuccUBus::_v1;
+int CSuccUBus::_v2;
+int CSuccUBus::_v3;
+int CSuccUBus::_v4;
+
+CSuccUBus::CSuccUBus() : CTrueTalkNPC() {
+ _field108 = -1;
+ _field10C = -1;
+ _field110 = -1;
+ _field114 = -1;
+ _field118 = 0x44;
+ _field11C = 0xA8;
+ _field120 = 0xA8;
+ _field124 = 0xF8;
+ _field128 = 0;
+ _field12C = 0x0E;
+ _field130 = 0x0E;
+ _field134 = 27;
+ _field138 = 40;
+ _field13C = 0x44;
+ _field140 = 1;
+ _field144 = 0;
+ _field148 = 0;
+ _field14C = 0;
+ _field150 = 0xE0;
+ _field154 = 0;
+ _field158 = 0;
+ _field15C = 0;
+ _string2 = "NULL";
+ _field16C = 28;
+ _field170 = 40;
+ _field174 = 82;
+ _field178 = 284;
+ _field17C = 148;
+ _field180 = 339;
+ _field184 = 15;
+ _field188 = 0;
+ _field18C = 0;
+ _field190 = 0;
+ _field194 = 240;
+ _field198 = 340;
+ _field19C = 0;
+ _field1A0 = -1;
+ _field1A4 = 0;
+ _field1A8 = 0;
+ _field1AC = 0;
+ _field1B0 = 0;
+ _field1B4 = 303;
+ _field1B8 = 312;
+ _field1BC = 313;
+ _field1C0 = 325;
+ _field1C4 = 326;
+ _field1C8 = 347;
+ _field1CC = 348;
+ _field1D0 = 375;
+ _field1D4 = 1;
+ _field1D8 = 0;
+}
+
+void CSuccUBus::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+
+ file->writeNumberLine(_v0, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_field10C, indent);
+ file->writeNumberLine(_field110, indent);
+ file->writeNumberLine(_field114, indent);
+ file->writeNumberLine(_field118, indent);
+ file->writeNumberLine(_field11C, indent);
+ file->writeNumberLine(_field120, indent);
+ file->writeNumberLine(_field124, indent);
+ file->writeNumberLine(_field128, indent);
+ file->writeNumberLine(_field12C, indent);
+ file->writeNumberLine(_field130, indent);
+ file->writeNumberLine(_field134, indent);
+ file->writeNumberLine(_field138, indent);
+ file->writeNumberLine(_field13C, indent);
+ file->writeNumberLine(_field140, indent);
+
+ file->writeNumberLine(_v2, indent);
+ file->writeNumberLine(_field148, indent);
+ file->writeNumberLine(_field14C, indent);
+ file->writeNumberLine(_field150, indent);
+ file->writeNumberLine(_field154, indent);
+ file->writeNumberLine(_field158, indent);
+ file->writeNumberLine(_field15C, indent);
+
+ file->writeQuotedLine(_string2, indent);
+ file->writeNumberLine(_field16C, indent);
+ file->writeNumberLine(_field170, indent);
+ file->writeNumberLine(_field174, indent);
+ file->writeNumberLine(_field178, indent);
+ file->writeNumberLine(_field17C, indent);
+ file->writeNumberLine(_field180, indent);
+ file->writeNumberLine(_field184, indent);
+ file->writeNumberLine(_field188, indent);
+ file->writeNumberLine(_field18C, indent);
+ file->writeNumberLine(_field190, indent);
+ file->writeNumberLine(_field194, indent);
+ file->writeNumberLine(_field198, indent);
+ file->writeNumberLine(_field19C, indent);
+ file->writeNumberLine(_field1A0, indent);
+ file->writeNumberLine(_field1A4, indent);
+ file->writeNumberLine(_field1A8, indent);
+ file->writeNumberLine(_field1AC, indent);
+ file->writeNumberLine(_field1B0, indent);
+ file->writeNumberLine(_field1B4, indent);
+ file->writeNumberLine(_field1B8, indent);
+ file->writeNumberLine(_field1BC, indent);
+ file->writeNumberLine(_field1C0, indent);
+ file->writeNumberLine(_field1C4, indent);
+ file->writeNumberLine(_field1C8, indent);
+ file->writeNumberLine(_field1CC, indent);
+ file->writeNumberLine(_field1D0, indent);
+ file->writeNumberLine(_field1D4, indent);
+
+ file->writeNumberLine(_v3, indent);
+ file->writeNumberLine(_field1D8, indent);
+ file->writeNumberLine(_field104, indent);
+
+ CTrueTalkNPC::save(file, indent);
+}
+
+void CSuccUBus::load(SimpleFile *file) {
+ file->readNumber();
+
+ _v0 = file->readNumber();
+ _field108 = file->readNumber();
+ _field10C = file->readNumber();
+ _field110 = file->readNumber();
+ _field114 = file->readNumber();
+ _field118 = file->readNumber();
+ _field11C = file->readNumber();
+ _field120 = file->readNumber();
+ _field124 = file->readNumber();
+ _field128 = file->readNumber();
+ _field12C = file->readNumber();
+ _field130 = file->readNumber();
+ _field134 = file->readNumber();
+ _field138 = file->readNumber();
+ _field13C = file->readNumber();
+ _field140 = file->readNumber();
+
+ _v2 = file->readNumber();
+ _field148 = file->readNumber();
+ _field14C = file->readNumber();
+ _field150 = file->readNumber();
+ _field154 = file->readNumber();
+ _field158 = file->readNumber();
+ _field15C = file->readNumber();
+
+ _string2 = file->readString();
+ _field16C = file->readNumber();
+ _field170 = file->readNumber();
+ _field174 = file->readNumber();
+ _field178 = file->readNumber();
+ _field17C = file->readNumber();
+ _field180 = file->readNumber();
+ _field184 = file->readNumber();
+ _field188 = file->readNumber();
+ _field18C = file->readNumber();
+ _field190 = file->readNumber();
+ _field194 = file->readNumber();
+ _field198 = file->readNumber();
+ _field19C = file->readNumber();
+ _field1A0 = file->readNumber();
+ _field1A4 = file->readNumber();
+ _field1A8 = file->readNumber();
+ _field1AC = file->readNumber();
+ _field1B0 = file->readNumber();
+ _field1B4 = file->readNumber();
+ _field1B8 = file->readNumber();
+ _field1BC = file->readNumber();
+ _field1C0 = file->readNumber();
+ _field1C4 = file->readNumber();
+ _field1C8 = file->readNumber();
+ _field1CC = file->readNumber();
+ _field1D0 = file->readNumber();
+ _field1D4 = file->readNumber();
+
+ _v3 = file->readNumber();
+ _field1D8 = file->readNumber();
+ _field104 = file->readNumber();
+
+ CTrueTalkNPC::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/succubus.h b/engines/titanic/npcs/succubus.h
new file mode 100644
index 0000000000..f6f5a6b9e9
--- /dev/null
+++ b/engines/titanic/npcs/succubus.h
@@ -0,0 +1,106 @@
+/* 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_SUCCUBUS_H
+#define TITANIC_SUCCUBUS_H
+
+#include "titanic/npcs/true_talk_npc.h"
+
+namespace Titanic {
+
+class CSuccUBus : public CTrueTalkNPC {
+private:
+ static int _v0;
+ static int _v1;
+ static int _v2;
+ static int _v3;
+ static int _v4;
+private:
+ int _field108;
+ int _field10C;
+ int _field110;
+ int _field114;
+ int _field118;
+ int _field11C;
+ int _field120;
+ int _field124;
+ int _field128;
+ int _field12C;
+ int _field130;
+ int _field134;
+ int _field138;
+ int _field13C;
+ int _field140;
+ int _field144;
+ int _field148;
+ int _field14C;
+ int _field150;
+ int _field154;
+ int _field158;
+ int _field15C;
+ CString _string2;
+ int _field16C;
+ int _field170;
+ int _field174;
+ int _field178;
+ int _field17C;
+ int _field180;
+ int _field184;
+ int _field188;
+ int _field18C;
+ int _field190;
+ int _field194;
+ int _field198;
+ int _field19C;
+ int _field1A0;
+ int _field1A4;
+ int _field1A8;
+ int _field1AC;
+ int _field1B0;
+ int _field1B4;
+ int _field1B8;
+ int _field1BC;
+ int _field1C0;
+ int _field1C4;
+ int _field1C8;
+ int _field1CC;
+ int _field1D0;
+ int _field1D4;
+ int _field1D8;
+public:
+ CLASSDEF;
+ CSuccUBus();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_SUCCUBUS_H */
diff --git a/engines/titanic/npcs/summon_bots.cpp b/engines/titanic/npcs/summon_bots.cpp
new file mode 100644
index 0000000000..8796e5ffda
--- /dev/null
+++ b/engines/titanic/npcs/summon_bots.cpp
@@ -0,0 +1,49 @@
+/* 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/npcs/summon_bots.h"
+
+namespace Titanic {
+
+CSummonBots::CSummonBots() : CRobotController(), _string2("NULL"),
+ _fieldC8(0), _fieldCC(0) {
+}
+
+void CSummonBots::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldC8, indent);
+ file->writeNumberLine(_fieldCC, indent);
+ file->writeQuotedLine(_string2, indent);
+
+ CRobotController::save(file, indent);
+}
+
+void CSummonBots::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldC8 = file->readNumber();
+ _fieldCC = file->readNumber();
+ _string2 = file->readString();
+
+ CRobotController::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/summon_bots.h b/engines/titanic/npcs/summon_bots.h
new file mode 100644
index 0000000000..ee537fee76
--- /dev/null
+++ b/engines/titanic/npcs/summon_bots.h
@@ -0,0 +1,52 @@
+/* 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_SUMMON_BOTS_H
+#define TITANIC_SUMMON_BOTS_H
+
+#include "titanic/npcs/robot_controller.h"
+
+namespace Titanic {
+
+class CSummonBots : public CRobotController {
+protected:
+ CString _string2;
+ int _fieldC8;
+ int _fieldCC;
+public:
+ CLASSDEF;
+ CSummonBots();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_SUMMON_BOTS_H */
diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp
new file mode 100644
index 0000000000..34c21d0efe
--- /dev/null
+++ b/engines/titanic/npcs/titania.cpp
@@ -0,0 +1,77 @@
+/* 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/npcs/titania.h"
+
+namespace Titanic {
+
+CTitania::CTitania() : CCharacter() {
+ _fieldD4 = 0;
+ _fieldD8 = 0;
+ _fieldE0 = 0;
+ _fieldE4 = 0;
+ _fieldE8 = 0;
+ _fieldEC = 0;
+ _fieldF0 = 0;
+ _fieldF4 = 0;
+ _fieldF8 = 0;
+ _fieldFC = 0;
+ _field100 = 1;
+}
+
+void CTitania::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldD4, indent);
+ file->writeNumberLine(_fieldD8, indent);
+ file->writeNumberLine(_fieldDC, indent);
+ file->writeNumberLine(_fieldE0, indent);
+ file->writeNumberLine(_fieldE4, indent);
+ file->writeNumberLine(_fieldE8, indent);
+ file->writeNumberLine(_fieldEC, indent);
+ file->writeNumberLine(_fieldF0, indent);
+ file->writeNumberLine(_fieldF4, indent);
+ file->writeNumberLine(_fieldF8, indent);
+ file->writeNumberLine(_fieldFC, indent);
+ file->writeNumberLine(_field100, indent);
+
+ CCharacter::save(file, indent);
+}
+
+void CTitania::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldD4 = file->readNumber();
+ _fieldD8 = file->readNumber();
+ _fieldDC = file->readNumber();
+ _fieldE0 = file->readNumber();
+ _fieldE4 = file->readNumber();
+ _fieldE8 = file->readNumber();
+ _fieldEC = file->readNumber();
+ _fieldF0 = file->readNumber();
+ _fieldF4 = file->readNumber();
+ _fieldF8 = file->readNumber();
+ _fieldFC = file->readNumber();
+ _field100 = file->readNumber();
+
+ CCharacter::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/titania.h b/engines/titanic/npcs/titania.h
new file mode 100644
index 0000000000..4edd626ab6
--- /dev/null
+++ b/engines/titanic/npcs/titania.h
@@ -0,0 +1,61 @@
+/* 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_TITANIA_H
+#define TITANIC_TITANIA_H
+
+#include "titanic/npcs/character.h"
+
+namespace Titanic {
+
+class CTitania : public CCharacter {
+private:
+ int _fieldD4;
+ int _fieldD8;
+ int _fieldDC;
+ int _fieldE0;
+ int _fieldE4;
+ int _fieldE8;
+ int _fieldEC;
+ int _fieldF0;
+ int _fieldF4;
+ int _fieldF8;
+ int _fieldFC;
+ int _field100;
+public:
+ CLASSDEF;
+ CTitania();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_TITANIA_H */
diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
new file mode 100644
index 0000000000..51d7c2e003
--- /dev/null
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -0,0 +1,237 @@
+/* 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/npcs/true_talk_npc.h"
+#include "titanic/core/view_item.h"
+#include "titanic/pet_control/pet_control.h"
+#include "titanic/titanic.h"
+
+namespace Titanic {
+
+BEGIN_MESSAGE_MAP(CTrueTalkNPC, CCharacter)
+ ON_MESSAGE(TextInputMsg)
+ ON_MESSAGE(TrueTalkGetAssetDetailsMsg)
+ ON_MESSAGE(DismissBotMsg)
+ ON_MESSAGE(TrueTalkNotifySpeechStartedMsg)
+ ON_MESSAGE(TrueTalkNotifySpeechEndedMsg)
+ ON_MESSAGE(MovieEndMsg)
+ ON_MESSAGE(NPCQueueIdleAnimMsg)
+ ON_MESSAGE(TimerMsg)
+ ON_MESSAGE(NPCPlayAnimationMsg)
+END_MESSAGE_MAP()
+
+CTrueTalkNPC::CTrueTalkNPC() : _assetName("z451.dlg"),
+ _assetNumber(0x11170), _fieldE4(0), _npcFlags(0), _soundId(0), _fieldF0(0),
+ _fieldF4(0), _fieldF8(0), _speechTimerId(0), _field100(0), _field104(0) {
+}
+
+void CTrueTalkNPC::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_assetNumber, indent);
+ file->writeQuotedLine(_assetName, indent);
+ file->writeNumberLine(_fieldE4, indent);
+ file->writeNumberLine(_npcFlags, indent);
+ file->writeNumberLine(_soundId, indent);
+ file->writeNumberLine(_fieldF0, indent);
+ file->writeNumberLine(_fieldF4, indent);
+ file->writeNumberLine(_fieldF8, indent);
+ file->writeNumberLine(_speechTimerId, indent);
+ file->writeNumberLine(_field100, indent);
+ file->writeNumberLine(_field104, indent);
+
+ CCharacter::save(file, indent);
+}
+
+void CTrueTalkNPC::load(SimpleFile *file) {
+ file->readNumber();
+ _assetNumber = file->readNumber();
+ _assetName = file->readString();
+ _fieldE4 = file->readNumber();
+ _npcFlags = file->readNumber();
+ _soundId = file->readNumber();
+ _fieldF0 = file->readNumber();
+ _fieldF4 = file->readNumber();
+ _fieldF8 = file->readNumber();
+ _speechTimerId = file->readNumber();
+ _field100 = file->readNumber();
+ _field104 = file->readNumber();
+
+ CCharacter::load(file);
+}
+
+bool CTrueTalkNPC::TextInputMsg(CTextInputMsg *msg) {
+ processInput(msg, _field104 ? findView() : nullptr);
+ return true;
+}
+
+bool CTrueTalkNPC::TrueTalkGetAssetDetailsMsg(CTrueTalkGetAssetDetailsMsg *msg) {
+ msg->_filename = _assetName;
+ msg->_numValue = _assetNumber;
+ return true;
+}
+
+bool CTrueTalkNPC::DismissBotMsg(CDismissBotMsg *msg) {
+ performAction(1, 0);
+ return true;
+}
+
+bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) {
+ _npcFlags |= NPCFLAG_SPEAKING;
+ ++_field100;
+
+ if (!(_npcFlags & NPCFLAG_8)) {
+ if (_speechTimerId)
+ stopTimer(_speechTimerId);
+
+ _soundId = msg->_soundId;
+ _fieldF0 = g_vm->_events->getTicksCount();
+
+ if (hasActiveMovie() || (_npcFlags & NPCFLAG_2)) {
+ _npcFlags &= ~NPCFLAG_2;
+ stopMovie();
+
+ CNPCPlayTalkingAnimationMsg msg1(_soundId, 0, 0);
+ msg1.execute(this);
+
+ if (msg1._names) {
+ CNPCPlayAnimationMsg msg2(msg1._names, msg1._value1);
+ msg2.execute(this);
+ }
+ }
+ }
+
+ return true;
+}
+
+bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
+ _npcFlags &= ~NPCFLAG_SPEAKING;
+ --_field100;
+ _soundId = 0;
+
+ if (!(_npcFlags & NPCFLAG_8)) {
+ CNPCPlayTalkingAnimationMsg msg1(0, 2, 0);
+ msg1.execute(this);
+ CNPCQueueIdleAnimMsg msg2;
+ msg2.execute(this);
+ }
+
+ return true;
+}
+
+bool CTrueTalkNPC::MovieEndMsg(CMovieEndMsg *msg) {
+ if (_npcFlags & NPCFLAG_2) {
+ _npcFlags &= ~NPCFLAG_2;
+ CNPCQueueIdleAnimMsg idleMsg;
+ idleMsg.execute(this);
+ return true;
+ } else if (!(_npcFlags & NPCFLAG_SPEAKING)) {
+ return false;
+ }
+
+ int diff = g_vm->_events->getTicksCount() - _fieldF0;
+ int ticks = MAX((int)_soundId - diff, 0);
+ CNPCPlayTalkingAnimationMsg msg1(ticks, ticks > 1000 ? 2 : 1, 0);
+ msg1.execute(this);
+
+ if (msg1._names) {
+ CNPCPlayAnimationMsg msg2(msg1._names, msg1._value1);
+ msg2.execute(this);
+ }
+
+ return true;
+}
+
+bool CTrueTalkNPC::NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg) {
+ int rndVal = g_vm->getRandomNumber(_fieldF8 - 1) - (_fieldF8 / 2);
+ _speechTimerId = startAnimTimer("NPCIdleAnim", _fieldF4 + rndVal, 0);
+
+ return true;
+}
+
+bool CTrueTalkNPC::TimerMsg(CTimerMsg *msg) {
+ if (_npcFlags & NPCFLAG_4) {
+ if (_field100 > 0)
+ return false;
+
+ CNPCPlayIdleAnimationMsg idleMsg;
+ if (idleMsg.execute(this)) {
+ if (idleMsg._names) {
+ CNPCPlayAnimationMsg animMsg(idleMsg._names, 0);
+ animMsg.execute(this);
+ }
+
+ _npcFlags &= ~NPCFLAG_2;
+ }
+ }
+
+ _speechTimerId = 0;
+ return true;
+}
+
+bool CTrueTalkNPC::NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg) {
+ warning("CTrueTalkNPC::NPCPlayAnimationMsg");
+ return true;
+}
+
+void CTrueTalkNPC::processInput(CTextInputMsg *msg, CViewItem *view) {
+ CTrueTalkManager *talkManager = getGameManager()->getTalkManager();
+ if (talkManager)
+ talkManager->processInput(this, msg, view);
+}
+
+int CTrueTalkNPC::startAnimTimer(const CString &action, uint firstDuration, uint duration) {
+ CTimeEventInfo *timer = new CTimeEventInfo(g_vm->_events->getTicksCount(),
+ duration > 0, firstDuration, duration, this, 0, action);
+ getGameManager()->addTimer(timer);
+
+ return timer->_id;
+}
+
+void CTrueTalkNPC::stopAnimTimer(int id) {
+ getGameManager()->stopTimer(id);
+}
+
+void CTrueTalkNPC::setView(CViewItem *view) {
+ CTrueTalkManager *talkManager = getGameManager()->getTalkManager();
+ if (talkManager)
+ talkManager->start3(this, view);
+}
+
+void CTrueTalkNPC::startTalker(CViewItem *view) {
+ CGameManager *gameManager = getGameManager();
+ if (gameManager)
+ gameManager->getTalkManager()->start4(this, view);
+}
+
+void CTrueTalkNPC::performAction(bool startTalking, CViewItem *view) {
+ CPetControl *pet = getPetControl();
+ if (pet)
+ pet->resetActiveNPC();
+
+ if (startTalking)
+ startTalker(view);
+
+ if (pet)
+ pet->convResetNPC();
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/npcs/true_talk_npc.h b/engines/titanic/npcs/true_talk_npc.h
new file mode 100644
index 0000000000..0deb832c82
--- /dev/null
+++ b/engines/titanic/npcs/true_talk_npc.h
@@ -0,0 +1,107 @@
+/* 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_TRUE_TALK_NPC_H
+#define TITANIC_TRUE_TALK_NPC_H
+
+#include "titanic/npcs/character.h"
+#include "titanic/messages/messages.h"
+#include "titanic/true_talk/tt_talker.h"
+
+namespace Titanic {
+
+enum NpcFlag {
+ NPCFLAG_SPEAKING = 1, NPCFLAG_2 = 2, NPCFLAG_4 = 4, NPCFLAG_8 = 8,
+ NPCFLAG_10000 = 0x10000, NPCFLAG_20000 = 0x20000, NPCFLAG_40000 = 0x40000,
+ NPCFLAG_80000 = 0x80000, NPCFLAG_100000 = 0x100000
+};
+
+class CViewItem;
+
+class CTrueTalkNPC : public CCharacter {
+ DECLARE_MESSAGE_MAP;
+ bool TextInputMsg(CTextInputMsg *msg);
+ bool TrueTalkGetAssetDetailsMsg(CTrueTalkGetAssetDetailsMsg *msg);
+ bool DismissBotMsg(CDismissBotMsg *msg);
+ bool TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg);
+ bool TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg);
+ bool MovieEndMsg(CMovieEndMsg *msg);
+ bool NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg);
+ bool TimerMsg(CTimerMsg *msg);
+ bool NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg);
+protected:
+ int _assetNumber;
+ CString _assetName;
+ int _fieldE4;
+ uint _npcFlags;
+ uint _soundId;
+ int _fieldF0;
+ int _fieldF4;
+ int _fieldF8;
+ int _speechTimerId;
+ int _field100;
+ int _field104;
+protected:
+ void processInput(CTextInputMsg *msg, CViewItem *view);
+
+ /**
+ * Start an animation timer
+ */
+ int startAnimTimer(const CString &action, uint firstDuration, uint duration);
+
+ /**
+ * Stop an animation timer
+ */
+ void stopAnimTimer(int id);
+
+ /**
+ * Perform an action
+ */
+ void performAction(bool startTalking, CViewItem *view);
+public:
+ CLASSDEF;
+ CTrueTalkNPC();
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent);
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+
+ /**
+ * Set the view for the NPC
+ */
+ void setView(CViewItem *view);
+
+ /**
+ * Start the talker in the given view
+ */
+ void startTalker(CViewItem *view);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_TRUE_TALK_NPC_H */