aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-21 21:33:35 -0400
committerPaul Gilbert2016-07-15 19:13:59 -0400
commit59796e03e4d2d366a3a6f4d00738fe9795b4fce3 (patch)
tree6acdca53170068285c67dc28553e3d69a8d37a3d /engines/titanic/true_talk
parent39a12288bb8343c25f244162a32e744a4fed9f6e (diff)
downloadscummvm-rg350-59796e03e4d2d366a3a6f4d00738fe9795b4fce3.tar.gz
scummvm-rg350-59796e03e4d2d366a3a6f4d00738fe9795b4fce3.tar.bz2
scummvm-rg350-59796e03e4d2d366a3a6f4d00738fe9795b4fce3.zip
TITANIC: Change WordMode to WordClass and flesh it out
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r--engines/titanic/true_talk/tt_action.cpp6
-rw-r--r--engines/titanic/true_talk/tt_action.h2
-rw-r--r--engines/titanic/true_talk/tt_adj.cpp6
-rw-r--r--engines/titanic/true_talk/tt_adj.h2
-rw-r--r--engines/titanic/true_talk/tt_major_word.cpp4
-rw-r--r--engines/titanic/true_talk/tt_major_word.h2
-rw-r--r--engines/titanic/true_talk/tt_parser.cpp26
-rw-r--r--engines/titanic/true_talk/tt_picture.cpp6
-rw-r--r--engines/titanic/true_talk/tt_picture.h2
-rw-r--r--engines/titanic/true_talk/tt_pronoun.cpp6
-rw-r--r--engines/titanic/true_talk/tt_pronoun.h2
-rw-r--r--engines/titanic/true_talk/tt_vocab.cpp88
-rw-r--r--engines/titanic/true_talk/tt_word.cpp10
-rw-r--r--engines/titanic/true_talk/tt_word.h22
14 files changed, 96 insertions, 88 deletions
diff --git a/engines/titanic/true_talk/tt_action.cpp b/engines/titanic/true_talk/tt_action.cpp
index e0c7284b7a..bb30e9c996 100644
--- a/engines/titanic/true_talk/tt_action.cpp
+++ b/engines/titanic/true_talk/tt_action.cpp
@@ -26,8 +26,8 @@ namespace Titanic {
bool TTaction::_staticFlag;
-TTaction::TTaction(TTstring &str, WordMode mode, int val2, int val3, int val4) :
- TTmajorWord(str, mode, val2, val3), _field30(val4) {
+TTaction::TTaction(TTstring &str, WordClass wordClass, int val2, int val3, int val4) :
+ TTmajorWord(str, wordClass, val2, val3), _field30(val4) {
}
TTaction::TTaction(TTaction *src) : TTmajorWord(src) {
@@ -42,7 +42,7 @@ TTaction::TTaction(TTaction *src) : TTmajorWord(src) {
int TTaction::load(SimpleFile *file) {
int val;
- if (!TTword::load(file, WMODE_ACTION) && file->scanf("%d", &val)) {
+ if (!TTword::load(file, WC_ACTION) && file->scanf("%d", &val)) {
_field30 = val;
return 0;
} else {
diff --git a/engines/titanic/true_talk/tt_action.h b/engines/titanic/true_talk/tt_action.h
index 213bdab8e4..0bd104977d 100644
--- a/engines/titanic/true_talk/tt_action.h
+++ b/engines/titanic/true_talk/tt_action.h
@@ -33,7 +33,7 @@ private:
protected:
int _field30;
public:
- TTaction(TTstring &str, WordMode mode, int val2, int val3, int val4);
+ TTaction(TTstring &str, WordClass wordClass, int val2, int val3, int val4);
TTaction(TTaction *src);
/**
diff --git a/engines/titanic/true_talk/tt_adj.cpp b/engines/titanic/true_talk/tt_adj.cpp
index 850692f69c..5659ed2276 100644
--- a/engines/titanic/true_talk/tt_adj.cpp
+++ b/engines/titanic/true_talk/tt_adj.cpp
@@ -26,8 +26,8 @@ namespace Titanic {
bool TTadj::_staticFlag;
-TTadj::TTadj(TTstring &str, WordMode mode, int val2, int val3, int val4) :
- TTmajorWord(str, mode, val2, val3) {
+TTadj::TTadj(TTstring &str, WordClass wordClass, int val2, int val3, int val4) :
+ TTmajorWord(str, wordClass, val2, val3) {
if (val4 >= 0 && val4 <= 9) {
_field30 = val4;
} else {
@@ -48,7 +48,7 @@ TTadj::TTadj(TTadj *src) : TTmajorWord(src) {
int TTadj::load(SimpleFile *file) {
int val;
- if (!TTword::load(file, WMODE_8) && file->scanf("%d", &val)) {
+ if (!TTword::load(file, WC_ADJECTIVE) && file->scanf("%d", &val)) {
_field30 = val;
return 0;
} else {
diff --git a/engines/titanic/true_talk/tt_adj.h b/engines/titanic/true_talk/tt_adj.h
index f18d249a99..7dab02d3d1 100644
--- a/engines/titanic/true_talk/tt_adj.h
+++ b/engines/titanic/true_talk/tt_adj.h
@@ -33,7 +33,7 @@ private:
protected:
int _field30;
public:
- TTadj(TTstring &str, WordMode mode, int val2, int val3, int val4);
+ TTadj(TTstring &str, WordClass wordClass, int val2, int val3, int val4);
TTadj(TTadj *src);
/**
diff --git a/engines/titanic/true_talk/tt_major_word.cpp b/engines/titanic/true_talk/tt_major_word.cpp
index b81ada4de1..28b9434026 100644
--- a/engines/titanic/true_talk/tt_major_word.cpp
+++ b/engines/titanic/true_talk/tt_major_word.cpp
@@ -26,8 +26,8 @@ namespace Titanic {
bool TTmajorWord::_staticFlag;
-TTmajorWord::TTmajorWord(TTstring &str, WordMode mode, int val2, int val3) :
- TTword(str, mode, val2), _field2C(val3) {
+TTmajorWord::TTmajorWord(TTstring &str, WordClass wordClass, int val2, int val3) :
+ TTword(str, wordClass, val2), _field2C(val3) {
}
TTmajorWord::TTmajorWord(TTmajorWord *src) : TTword(src) {
diff --git a/engines/titanic/true_talk/tt_major_word.h b/engines/titanic/true_talk/tt_major_word.h
index 55eb882c8e..716ccf152f 100644
--- a/engines/titanic/true_talk/tt_major_word.h
+++ b/engines/titanic/true_talk/tt_major_word.h
@@ -38,7 +38,7 @@ protected:
*/
int saveData(SimpleFile *file, int val) const;
public:
- TTmajorWord(TTstring &str, WordMode mode, int val2, int val3);
+ TTmajorWord(TTstring &str, WordClass wordClass, int val2, int val3);
TTmajorWord(TTmajorWord *src);
/**
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index 9316a907a6..1a2944d890 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -512,11 +512,11 @@ int TTparser::loadRequests(TTword *word) {
if (word->_tag != MKTAG('Z', 'Z', 'Z', 'T'))
addNode(word->_tag);
- switch (word->_wordMode) {
- case WMODE_NONE:
+ switch (word->_wordClass) {
+ case WC_UNKNOWN:
break;
- case WMODE_ACTION:
+ case WC_ACTION:
if (word->_id != 0x70 && word->_id != 0x71)
addNode(1);
addNode(17);
@@ -576,13 +576,13 @@ int TTparser::loadRequests(TTword *word) {
}
break;
- case WMODE_2:
+ case WC_THING:
if (word->checkTag() && _sentence->_field58 > 0)
_sentence->_field58--;
addNode(14);
break;
- case WMODE_3:
+ case WC_ABSTRACT:
switch (word->_id) {
case 300:
addNode(14);
@@ -609,12 +609,12 @@ int TTparser::loadRequests(TTword *word) {
}
break;
- case WMODE_4:
+ case WC_ARTICLE:
addNode(2);
status = 1;
break;
- case WMODE_5:
+ case WC_CONJUNCTION:
if (_sentence->check2C()) {
_sentenceSub->_field1C = 1;
_sentenceSub = _sentenceSub->addSibling();
@@ -624,11 +624,11 @@ int TTparser::loadRequests(TTword *word) {
}
break;
- case WMODE_6:
+ case WC_PRONOUN:
status = fn2(word);
break;
- case WMODE_7:
+ case WC_PREPOSITION:
switch (word->_id) {
case 700:
addNode(6);
@@ -650,7 +650,7 @@ int TTparser::loadRequests(TTword *word) {
break;
}
- case WMODE_8:
+ case WC_ADJECTIVE:
if (word->_id == 304) {
// Nothing
} else if (word->_id == 801) {
@@ -663,7 +663,7 @@ int TTparser::loadRequests(TTword *word) {
}
break;
- case WMODE_9:
+ case WC_ADVERB:
switch (word->_id) {
case 900:
case 901:
@@ -771,8 +771,8 @@ int TTparser::considerRequests(TTword *word) {
break;
case 2:
- if (!word->_wordMode) {
- word->_wordMode = WMODE_2;
+ if (!word->_wordClass) {
+ word->_wordClass = WC_THING;
addToConceptList(word);
addNode(14);
}
diff --git a/engines/titanic/true_talk/tt_picture.cpp b/engines/titanic/true_talk/tt_picture.cpp
index aab9c5d7aa..59ff6c746b 100644
--- a/engines/titanic/true_talk/tt_picture.cpp
+++ b/engines/titanic/true_talk/tt_picture.cpp
@@ -26,8 +26,8 @@ namespace Titanic {
bool TTpicture::_staticFlag;
-TTpicture::TTpicture(TTstring &str, WordMode mode, int val2, int val3, int val4, int val5, int val6) :
- TTmajorWord(str, mode, val2, val4), _tag(val3), _field30(val5), _field3C(val6),
+TTpicture::TTpicture(TTstring &str, WordClass wordClass, int val2, int val3, int val4, int val5, int val6) :
+ TTmajorWord(str, wordClass, val2, val4), _tag(val3), _field30(val5), _field3C(val6),
_field38(0) {
}
@@ -50,7 +50,7 @@ int TTpicture::load(SimpleFile *file) {
CString str;
int val1, val2;
- if (!TTword::load(file, WMODE_2) && file->scanf("%s %d %d", &str, &val1, &val2)) {
+ if (!TTword::load(file, WC_THING) && file->scanf("%s %d %d", &str, &val1, &val2)) {
_tag = readNumber(str.c_str());
_field30 = val1;
_field3C = val2;
diff --git a/engines/titanic/true_talk/tt_picture.h b/engines/titanic/true_talk/tt_picture.h
index 404d9c4b03..71beefe19c 100644
--- a/engines/titanic/true_talk/tt_picture.h
+++ b/engines/titanic/true_talk/tt_picture.h
@@ -36,7 +36,7 @@ protected:
int _field38;
int _field3C;
public:
- TTpicture(TTstring &str, WordMode mode, int val2, int val3, int val4, int val5, int val6);
+ TTpicture(TTstring &str, WordClass wordClass, int val2, int val3, int val4, int val5, int val6);
TTpicture(TTpicture *src);
/**
diff --git a/engines/titanic/true_talk/tt_pronoun.cpp b/engines/titanic/true_talk/tt_pronoun.cpp
index 68fcef02a3..9b6692e60e 100644
--- a/engines/titanic/true_talk/tt_pronoun.cpp
+++ b/engines/titanic/true_talk/tt_pronoun.cpp
@@ -26,8 +26,8 @@ namespace Titanic {
bool TTpronoun::_staticFlag;
-TTpronoun::TTpronoun(TTstring &str, WordMode mode, int val2, int val3, int val4) :
- TTmajorWord(str, mode, val2, val3), _field30(val4) {
+TTpronoun::TTpronoun(TTstring &str, WordClass wordClass, int val2, int val3, int val4) :
+ TTmajorWord(str, wordClass, val2, val3), _field30(val4) {
}
TTpronoun::TTpronoun(TTpronoun *src) : TTmajorWord(src) {
@@ -42,7 +42,7 @@ TTpronoun::TTpronoun(TTpronoun *src) : TTmajorWord(src) {
int TTpronoun::load(SimpleFile *file) {
int val;
- if (!TTword::load(file, WMODE_6) && file->scanf("%d", &val)) {
+ if (!TTword::load(file, WC_PRONOUN) && file->scanf("%d", &val)) {
if (val >= 0 && val <= 12) {
_field30 = val;
return 0;
diff --git a/engines/titanic/true_talk/tt_pronoun.h b/engines/titanic/true_talk/tt_pronoun.h
index bd80852a8f..0d9466c29c 100644
--- a/engines/titanic/true_talk/tt_pronoun.h
+++ b/engines/titanic/true_talk/tt_pronoun.h
@@ -33,7 +33,7 @@ private:
protected:
int _field30;
public:
- TTpronoun(TTstring &str, WordMode mode, int val2, int val3, int val4);
+ TTpronoun(TTstring &str, WordClass wordClass, int val2, int val3, int val4);
TTpronoun(TTpronoun *src);
/**
diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp
index 1ae7e1cdf1..eb3d52331f 100644
--- a/engines/titanic/true_talk/tt_vocab.cpp
+++ b/engines/titanic/true_talk/tt_vocab.cpp
@@ -52,57 +52,57 @@ int TTvocab::load(const CString &name) {
while (!result && !file->eos()) {
skipFlag = false;
- WordMode mode = (WordMode)file->readNumber();
+ WordClass wordClass = (WordClass)file->readNumber();
TTstring space(" ");
- switch (mode) {
- case 0: {
+ switch (wordClass) {
+ case WC_UNKNOWN: {
if (_word)
result = _word->readSyn(file);
skipFlag = true;
break;
}
- case 1: {
- TTaction *word = new TTaction(space, WMODE_NONE, 0, 0, 0);
+ case WC_ACTION: {
+ TTaction *word = new TTaction(space, WC_UNKNOWN, 0, 0, 0);
result = word->load(file);
_word = word;
break;
}
- case 2: {
- TTpicture *word = new TTpicture(space, WMODE_NONE, 0, 0, 0, 0, 0);
+ case WC_THING: {
+ TTpicture *word = new TTpicture(space, WC_UNKNOWN, 0, 0, 0, 0, 0);
result = word->load(file);
_word = word;
break;
}
- case 3:
- case 9: {
- TTmajorWord *word = new TTmajorWord(space, WMODE_NONE, 0, 0);
- result = word->load(file, mode);
+ case WC_ABSTRACT:
+ case WC_ADVERB: {
+ TTmajorWord *word = new TTmajorWord(space, WC_UNKNOWN, 0, 0);
+ result = word->load(file, wordClass);
_word = word;
break;
}
- case 4:
- case 5:
- case 7: {
- TTword *word = new TTword(space, WMODE_NONE, 0);
- result = word->load(file, mode);
+ case WC_ARTICLE:
+ case WC_CONJUNCTION:
+ case WC_PREPOSITION: {
+ TTword *word = new TTword(space, WC_UNKNOWN, 0);
+ result = word->load(file, wordClass);
_word = word;
break;
}
- case 8: {
- TTadj *word = new TTadj(space, WMODE_NONE, 0, 0, 0);
+ case WC_ADJECTIVE: {
+ TTadj *word = new TTadj(space, WC_UNKNOWN, 0, 0, 0);
result = word->load(file);
_word = word;
break;
}
- case 6: {
- TTpronoun *word = new TTpronoun(space, WMODE_NONE, 0, 0, 0);
+ case WC_PRONOUN: {
+ TTpronoun *word = new TTpronoun(space, WC_UNKNOWN, 0, 0, 0);
result = word->load(file);
_word = word;
break;
@@ -198,7 +198,7 @@ TTword *TTvocab::getPrimeWord(TTstring &str, TTword **srcWord) const {
if (!Common::isDigit(c)) {
vocabP = _headP;
- newWord = new TTword(str, WMODE_3, 300);
+ newWord = new TTword(str, WC_ABSTRACT, 300);
} else {
for (vocabP = _headP; vocabP && !newWord; vocabP = vocabP->_nextP) {
if (_vocabMode == 3 && !strcmp(str.c_str(), vocabP->c_str())) {
@@ -246,30 +246,30 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == 1) {
+ if (word->_wordClass == 1) {
delete word;
word = nullptr;
} else {
delete word;
- word = new TTadj(str, WMODE_8, 0, 0, 0);
+ word = new TTadj(str, WC_ADJECTIVE, 0, 0, 0);
}
} else {
tempStr += "e";
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode != 1) {
+ if (word->_wordClass != 1) {
delete word;
- word = new TTadj(str, WMODE_8, 0, 0, 0);
+ word = new TTadj(str, WC_ADJECTIVE, 0, 0, 0);
}
} else {
tempStr.deleteSuffix(2);
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode != 1) {
+ if (word->_wordClass != 1) {
delete word;
- word = new TTadj(str, WMODE_8, 0, 0, 0);
+ word = new TTadj(str, WC_ADJECTIVE, 0, 0, 0);
}
} else {
tempStr = str;
@@ -287,7 +287,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
}
if (word) {
- if (word->_wordMode == WMODE_ACTION) {
+ if (word->_wordClass == WC_ACTION) {
static_cast<TTaction *>(word)->setVal(1);
}
} else {
@@ -300,7 +300,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
if (word) {
delete word;
- word = new TTword(str, WMODE_9, 0);
+ word = new TTword(str, WC_ADVERB, 0);
} else {
tempStr = str;
}
@@ -310,7 +310,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == WMODE_8) {
+ if (word->_wordClass == WC_ADJECTIVE) {
int val1 = word->proc15();
int val2 = word->proc15();
@@ -329,7 +329,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == WMODE_8) {
+ if (word->_wordClass == WC_ADJECTIVE) {
int val1 = word->proc15();
int val2 = word->proc15();
@@ -347,7 +347,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
tempStr.deleteSuffix(1);
word = getPrimeWord(tempStr);
- if (word && word->_wordMode == WMODE_8) {
+ if (word && word->_wordClass == WC_ADJECTIVE) {
int val1 = word->proc15();
int val2 = word->proc15();
@@ -369,7 +369,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == WMODE_8) {
+ if (word->_wordClass == WC_ADJECTIVE) {
int val1 = word->proc15();
int val2 = word->proc15();
@@ -388,7 +388,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == WMODE_8) {
+ if (word->_wordClass == WC_ADJECTIVE) {
int val1 = word->proc15();
int val2 = word->proc15();
@@ -428,7 +428,7 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (word) {
- if (word->_wordMode == WMODE_6 || word->_wordMode == WMODE_9) {
+ if (word->_wordClass == WC_PRONOUN || word->_wordClass == WC_ADVERB) {
delete word;
TTstring isStr("is");
word = getPrimeWord(isStr);
@@ -437,38 +437,38 @@ TTword *TTvocab::getSuffixedWord(TTstring &str) const {
case 200:
if (word->proc10() == 2) {
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 5);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 5);
} else if (word->proc10() == 1) {
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 4);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 4);
}
break;
case 201:
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 5);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 5);
break;
case 202:
case 203:
if (word->proc10() == 2) {
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 5);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 5);
} else {
int val = word->proc10() == 1 ? 0 : 4;
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, val);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, val);
}
break;
case 204:
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 6);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 6);
break;
default:
delete word;
- word = new TTpronoun(tempStr, WMODE_6, 601, 0, 0);
+ word = new TTpronoun(tempStr, WC_PRONOUN, 601, 0, 0);
break;
}
}
@@ -510,7 +510,7 @@ TTword *TTvocab::getPrefixedWord(TTstring &str) const {
word = getPrimeWord(tempStr);
if (!word)
tempStr = str;
- else if (word->_wordMode == 8) {
+ else if (word->_wordClass == 8) {
delete word;
word = nullptr;
}
@@ -522,7 +522,7 @@ TTword *TTvocab::getPrefixedWord(TTstring &str) const {
if (!word)
tempStr = str;
- else if (word->_wordMode == 8) {
+ else if (word->_wordClass == 8) {
int val1 = word->proc15();
int val2 = word->proc15();
diff --git a/engines/titanic/true_talk/tt_word.cpp b/engines/titanic/true_talk/tt_word.cpp
index a0cb5dfd94..028ee81008 100644
--- a/engines/titanic/true_talk/tt_word.cpp
+++ b/engines/titanic/true_talk/tt_word.cpp
@@ -26,8 +26,8 @@
namespace Titanic {
-TTword::TTword(TTstring &str, WordMode mode, int id) : _string(str),
- _wordMode(mode), _id(id), _tag(0), _field24(0),
+TTword::TTword(TTstring &str, WordClass wordClass, int id) : _string(str),
+ _wordClass(wordClass), _id(id), _tag(0), _field24(0),
_field28(0), _synP(nullptr), _nextP(nullptr) {
_status = str.getStatus() == SS_VALID ? SS_VALID : SS_5;
}
@@ -39,7 +39,7 @@ TTword::TTword(TTword *src) {
}
_string = src->_string;
- _wordMode = src->_wordMode;
+ _wordClass = src->_wordClass;
_id = src->_id;
_tag = src->_tag;
_synP = nullptr;
@@ -133,7 +133,7 @@ void TTword::appendNode(TTsynonym *node) {
_synP = node;
}
-int TTword::load(SimpleFile *file, WordMode mode) {
+int TTword::load(SimpleFile *file, WordClass wordClass) {
CString str1, str2;
int id;
@@ -141,7 +141,7 @@ int TTword::load(SimpleFile *file, WordMode mode) {
_string = str1;
_id = id;
_tag = readNumber(str2.c_str());
- _wordMode = mode;
+ _wordClass = wordClass;
return 0;
} else {
return 3;
diff --git a/engines/titanic/true_talk/tt_word.h b/engines/titanic/true_talk/tt_word.h
index 010aa66196..fa7f31ef75 100644
--- a/engines/titanic/true_talk/tt_word.h
+++ b/engines/titanic/true_talk/tt_word.h
@@ -29,10 +29,18 @@
namespace Titanic {
-enum WordMode {
- WMODE_NONE = 0, WMODE_ACTION = 1, WMODE_2 = 2, WMODE_3 = 3,
- WMODE_4 = 4, WMODE_5 = 5, WMODE_6 = 6, WMODE_7 = 7,
- WMODE_8 = 8, WMODE_9 = 9
+enum WordClass {
+ WC_UNKNOWN = 0, WC_ACTION = 1, WC_THING = 2, WC_ABSTRACT = 3,
+ WC_ARTICLE = 4, WC_CONJUNCTION = 5, WC_PRONOUN = 6,
+ WC_PREPOSITION = 7, WC_ADJECTIVE = 8, WC_ADVERB = 9,
+ WC_UNK_ACTION = 10,
+ WC_ATRANS = 11, // transfer possession, eg: give/take
+ WC_PTRANS = 12, // physical transfer, eg: go
+ WC_PROPEL = 13, // act of applying a force, eg: hit
+ WC_MTRANS = 14, // mental transfer, eg: see, hear
+ WC_BUILD = 15, WC_ATTEND = 16, WC_SPEAK = 17, WC_GRASP = 18,
+ WC_MOVE = 19, WC_INGEST = 20, WC_EXPEL = 21, WC_STRANS = 22,
+ WC_ISA = 23
};
class TTword {
@@ -52,11 +60,11 @@ public:
TTword *_nextP;
TTsynonym *_synP;
TTstring _string;
- WordMode _wordMode;
+ WordClass _wordClass;
int _id;
uint _tag;
public:
- TTword(TTstring &str, WordMode mode, int val2);
+ TTword(TTstring &str, WordClass wordClass, int val2);
TTword(TTword *src);
~TTword();
@@ -93,7 +101,7 @@ public:
/**
* Load the word
*/
- int load(SimpleFile *file, WordMode mode);
+ int load(SimpleFile *file, WordClass wordClass);
/**
* Finds a synonym in the word by name, if one exists