aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-25 22:08:30 -0500
committerPaul Gilbert2016-02-25 22:08:30 -0500
commitf2cb4a6d98d914aa0557f35c84d3052d9739c5d5 (patch)
treef556e61d87a40a3f3e4d3f6def184a170be12fa8
parent06ce0dbfddb016dc18ac38bbd938b8b5c71f454a (diff)
downloadscummvm-rg350-f2cb4a6d98d914aa0557f35c84d3052d9739c5d5.tar.gz
scummvm-rg350-f2cb4a6d98d914aa0557f35c84d3052d9739c5d5.tar.bz2
scummvm-rg350-f2cb4a6d98d914aa0557f35c84d3052d9739c5d5.zip
TITANIC: Implement non-TrueTalk character classes
-rw-r--r--engines/titanic/core/saveable_object.cpp9
-rw-r--r--engines/titanic/module.mk3
-rw-r--r--engines/titanic/npcs/mobile.cpp46
-rw-r--r--engines/titanic/npcs/mobile.h55
-rw-r--r--engines/titanic/npcs/starlings.cpp46
-rw-r--r--engines/titanic/npcs/starlings.h54
-rw-r--r--engines/titanic/npcs/titania.cpp77
-rw-r--r--engines/titanic/npcs/titania.h65
8 files changed, 355 insertions, 0 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index 8f7c38692f..758c56cfa5 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -42,8 +42,11 @@
#include "titanic/npcs/doorbot.h"
#include "titanic/npcs/liftbot.h"
#include "titanic/npcs/maitre_d.h"
+#include "titanic/npcs/mobile.h"
#include "titanic/npcs/parrot.h"
+#include "titanic/npcs/starlings.h"
#include "titanic/npcs/succubus.h"
+#include "titanic/npcs/titania.h"
namespace Titanic {
@@ -64,6 +67,7 @@ DEFFN(CLiftBot);
DEFFN(CLinkItem);
DEFFN(CMaitreD);
DEFFN(CMessageTarget);
+DEFFN(CMobile);
DEFFN(CMovieClip);
DEFFN(CMovieClipList);
DEFFN(CNodeItem);
@@ -72,8 +76,10 @@ DEFFN(CPETPosition);
DEFFN(CProjectItem);
DEFFN(CRoomItem);
DEFFN(CServiceElevatorDoor);
+DEFFN(CStarlings);
DEFFN(CSUBGlass);
DEFFN(CSuccUBus);
+DEFFN(CTitania);
DEFFN(CTreeItem);
DEFFN(CViewItem);
@@ -90,6 +96,7 @@ void CSaveableObject::initClassList() {
ADDFN(CLinkItem);
ADDFN(CMaitreD);
ADDFN(CMessageTarget);
+ ADDFN(CMobile);
ADDFN(CMovieClip);
ADDFN(CMovieClipList);
ADDFN(CNodeItem);
@@ -98,8 +105,10 @@ void CSaveableObject::initClassList() {
ADDFN(CProjectItem);
ADDFN(CRoomItem);
ADDFN(CServiceElevatorDoor);
+ ADDFN(CStarlings);
ADDFN(CSUBGlass);
ADDFN(CSuccUBus);
+ ADDFN(CTitania);
ADDFN(CTreeItem);
ADDFN(CViewItem);
}
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 1d94289315..3fadf67fd4 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -44,8 +44,11 @@ MODULE_OBJS := \
npcs/doorbot.o \
npcs/liftbot.o \
npcs/maitre_d.o \
+ npcs/mobile.o \
npcs/parrot.o \
+ npcs/starlings.o \
npcs/succubus.o \
+ npcs/titania.o \
npcs/true_talk_npc.o
# This module can be built as a plugin
diff --git a/engines/titanic/npcs/mobile.cpp b/engines/titanic/npcs/mobile.cpp
new file mode 100644
index 0000000000..37c1d13fee
--- /dev/null
+++ b/engines/titanic/npcs/mobile.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/mobile.h"
+
+namespace Titanic {
+
+CMobile::CMobile() : CCharacter(), _fieldDC(0) {
+}
+
+void CMobile::save(SimpleFile *file, int indent) const {
+ 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..9c74170ac0
--- /dev/null
+++ b/engines/titanic/npcs/mobile.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_MOBILE_H
+#define TITANIC_MOBILE_H
+
+#include "titanic/npcs/character.h"
+
+namespace Titanic {
+
+class CMobile : public CCharacter {
+private:
+ Common::Point _pos1;
+ int _fieldDC;
+public:
+ CMobile();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CMobile"; }
+
+ /**
+ * 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_MOBILE_H */
diff --git a/engines/titanic/npcs/starlings.cpp b/engines/titanic/npcs/starlings.cpp
new file mode 100644
index 0000000000..dcb9fbda81
--- /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) const {
+ 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..472d0f58fb
--- /dev/null
+++ b/engines/titanic/npcs/starlings.h
@@ -0,0 +1,54 @@
+/* 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:
+ CStarlings();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CStarlings"; }
+
+ /**
+ * 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_STARLING_H */
diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp
new file mode 100644
index 0000000000..3a71d7fea1
--- /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) const {
+ 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..ee61222be4
--- /dev/null
+++ b/engines/titanic/npcs/titania.h
@@ -0,0 +1,65 @@
+/* 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:
+ CTitania();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CTitania"; }
+
+ /**
+ * 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_TITANIA_H */