aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-09 18:33:18 -0400
committerPaul Gilbert2016-07-10 16:38:57 -0400
commitb7e4ed8744c815b687ce0e4b89df2d204dd28a2a (patch)
tree9f18e182cfd2e67fc1decd0ea4c53bba5944571d /engines/titanic/true_talk
parent88dcfebebc183a11729e8dca8768e3a9251533eb (diff)
downloadscummvm-rg350-b7e4ed8744c815b687ce0e4b89df2d204dd28a2a.tar.gz
scummvm-rg350-b7e4ed8744c815b687ce0e4b89df2d204dd28a2a.tar.bz2
scummvm-rg350-b7e4ed8744c815b687ce0e4b89df2d204dd28a2a.zip
TITANIC: Further fleshing out of vocab loading
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r--engines/titanic/true_talk/st_vocab.cpp4
-rw-r--r--engines/titanic/true_talk/tt_word.cpp13
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/titanic/true_talk/st_vocab.cpp b/engines/titanic/true_talk/st_vocab.cpp
index 578ffe569a..2a3beff3d6 100644
--- a/engines/titanic/true_talk/st_vocab.cpp
+++ b/engines/titanic/true_talk/st_vocab.cpp
@@ -34,13 +34,11 @@ STVocab::STVocab(int val): _field0(0), _field4(0), _word(nullptr),
int STVocab::load(const CString &name) {
SimpleFile *file = g_vm->_fileReader._owner->openResource(name);
int result = 0;
- int param = -1;
- int mode = 0;
bool skipFlag;
while (!result && !file->eos()) {
skipFlag = false;
- int param = file->readNumber();
+ int mode = file->readNumber();
TTString space(" ");
switch (mode) {
diff --git a/engines/titanic/true_talk/tt_word.cpp b/engines/titanic/true_talk/tt_word.cpp
index 0bc3611589..3d0aae5f67 100644
--- a/engines/titanic/true_talk/tt_word.cpp
+++ b/engines/titanic/true_talk/tt_word.cpp
@@ -93,8 +93,17 @@ TTWord3::TTWord3(TTString &str, int val1, int val2, int val3, int val4, int val5
}
int TTWord3::load(SimpleFile *file) {
- // TODO
- return 0;
+ CString str;
+ int val1, val2;
+
+ if (!TTWord::load(file, 2) && file->scanf("%d %d %d", &str, &val1, &val2)) {
+ _field34 = readNumber(str.c_str());
+ _field30 = val1;
+ _field3C = val2;
+ return 0;
+ } else {
+ return 3;
+ }
}
/*------------------------------------------------------------------------*/