aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-17 13:52:11 -0400
committerPaul Gilbert2016-07-15 19:12:46 -0400
commitaead3a0083edd7ac5e1f748f422ee25695676a4a (patch)
tree11c8960b0e6719253921882b3e48a184d6207f5a
parent39b85d845b008613c0c5ce5eb614159362ab1797 (diff)
downloadscummvm-rg350-aead3a0083edd7ac5e1f748f422ee25695676a4a.tar.gz
scummvm-rg350-aead3a0083edd7ac5e1f748f422ee25695676a4a.tar.bz2
scummvm-rg350-aead3a0083edd7ac5e1f748f422ee25695676a4a.zip
TITANIC: Beginnings of TThist class
-rw-r--r--engines/titanic/module.mk1
-rw-r--r--engines/titanic/true_talk/tt_hist.cpp32
-rw-r--r--engines/titanic/true_talk/tt_hist.h45
-rw-r--r--engines/titanic/true_talk/tt_npc_script.h1
-rw-r--r--engines/titanic/true_talk/tt_script_base.cpp10
-rw-r--r--engines/titanic/true_talk/tt_script_base.h3
6 files changed, 86 insertions, 6 deletions
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index f8fe8f50b1..7972fa1c4f 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -462,6 +462,7 @@ MODULE_OBJS := \
true_talk/true_talk_manager.o \
true_talk/tt_action.o \
true_talk/tt_adj.o \
+ true_talk/tt_hist.o \
true_talk/tt_input.o \
true_talk/tt_major_word.o \
true_talk/tt_npc_script.o \
diff --git a/engines/titanic/true_talk/tt_hist.cpp b/engines/titanic/true_talk/tt_hist.cpp
new file mode 100644
index 0000000000..8c9aeb3684
--- /dev/null
+++ b/engines/titanic/true_talk/tt_hist.cpp
@@ -0,0 +1,32 @@
+/* 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/true_talk/tt_hist.h"
+#include "titanic/true_talk/tt_input.h"
+
+namespace Titanic {
+
+TThist::TThist(TTinput *input) {
+ // TODO
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/true_talk/tt_hist.h b/engines/titanic/true_talk/tt_hist.h
new file mode 100644
index 0000000000..f910e6eb5a
--- /dev/null
+++ b/engines/titanic/true_talk/tt_hist.h
@@ -0,0 +1,45 @@
+/* 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_TT_HIST_H
+#define TITANIC_TT_HIST_H
+
+namespace Titanic {
+
+class TTinput;
+
+class TThist {
+protected:
+ int _field0;
+ TTinput *_input;
+public:
+ TThist(TTinput *input);
+};
+
+class TTscriptHist : public TThist {
+public:
+ TTscriptHist(TTinput *input) : TThist(input) {}
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_TT_HIST_H */
diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h
index 58c1d346f5..29ab08f458 100644
--- a/engines/titanic/true_talk/tt_npc_script.h
+++ b/engines/titanic/true_talk/tt_npc_script.h
@@ -28,7 +28,6 @@
namespace Titanic {
-
class TTnpcScriptBase : public TTscriptBase {
protected:
int _field54;
diff --git a/engines/titanic/true_talk/tt_script_base.cpp b/engines/titanic/true_talk/tt_script_base.cpp
index 0a14107974..092e5bb6ea 100644
--- a/engines/titanic/true_talk/tt_script_base.cpp
+++ b/engines/titanic/true_talk/tt_script_base.cpp
@@ -28,7 +28,7 @@ namespace Titanic {
TTscriptBase::TTscriptBase(int v1, const char *charClass, int v2,
const char *charName, int v3, int v4, int v5, int v6, int v7) :
_charName(charName), _charClass(charClass),
- _field4(0), _field8(0), _fieldC(0),
+ _field4(0), _field8(0), _hist(nullptr),
_field20(0), _field24(0), _field28(0), _field2C(0),
_field30(0), _field34(0), _field38(0), _field3C(0),
_field40(0), _field44(0), _field48(0), _status(0) {
@@ -59,7 +59,7 @@ bool TTscriptBase::areNamesValid() {
void TTscriptBase::reset() {
_field4 = 0;
_field8 = 4;
- _fieldC = 0;
+ _hist = nullptr;
_field20 = 0;
_field24 = -1;
_field28 = -1;
@@ -74,8 +74,10 @@ void TTscriptBase::reset() {
}
int TTscriptBase::preprocess(TTinput *input) {
- warning("TODO: TTscriptBase::preprocess");
- return 0;
+ delete _hist;
+ _hist = new TTscriptHist(input);
+
+ return _hist ? SS_VALID : SS_7;
}
void TTscriptBase::proc2(int v) {
diff --git a/engines/titanic/true_talk/tt_script_base.h b/engines/titanic/true_talk/tt_script_base.h
index 820d2691e4..f55d06c799 100644
--- a/engines/titanic/true_talk/tt_script_base.h
+++ b/engines/titanic/true_talk/tt_script_base.h
@@ -24,6 +24,7 @@
#define TITANIC_TT_SCRIPT_BASE_H
#include "titanic/true_talk/tt_string.h"
+#include "titanic/true_talk/tt_hist.h"
namespace Titanic {
@@ -39,7 +40,7 @@ private:
protected:
int _field4;
int _field8;
- int _fieldC;
+ TThist *_hist;
TTstring _charName, _charClass;
int _field20;
int _field24;