diff options
author | Paul Gilbert | 2016-09-02 23:00:17 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-02 23:00:17 -0400 |
commit | 375fb60ff812b9d0dd9bd9f435613fab54907bc0 (patch) | |
tree | e46030b698d13b61027fe589e90e8db2b88f78eb | |
parent | 9e437d46a8b95589263aa1185983d9c20d2f2879 (diff) | |
download | scummvm-rg350-375fb60ff812b9d0dd9bd9f435613fab54907bc0.tar.gz scummvm-rg350-375fb60ff812b9d0dd9bd9f435613fab54907bc0.tar.bz2 scummvm-rg350-375fb60ff812b9d0dd9bd9f435613fab54907bc0.zip |
TITANIC: Cleanup of True Talk classes
-rw-r--r-- | engines/titanic/true_talk/bellbot_script.cpp | 11 | ||||
-rw-r--r-- | engines/titanic/true_talk/bellbot_script.h | 5 | ||||
-rw-r--r-- | engines/titanic/true_talk/script_handler.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/true_talk/script_handler.h | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_sentence.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_vocab.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_vocab.h | 2 |
7 files changed, 11 insertions, 20 deletions
diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp index 7da2ab6201..b773e8af30 100644 --- a/engines/titanic/true_talk/bellbot_script.cpp +++ b/engines/titanic/true_talk/bellbot_script.cpp @@ -44,8 +44,7 @@ static const RoomDialogueId ROOM_DIALOGUE_IDS[] = { BellbotScript::BellbotScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2) : TTnpcScript(val1, charClass, v2, charName, v3, val2, -1, -1, -1, 0), - _field2D0(0), _field2D4(0), _field2D8(0), _field2DC(0), - _room107First(false) { + _responseFlag(false), _room107First(false) { CTrueTalkManager::setFlags(25, 0); CTrueTalkManager::setFlags(24, 0); CTrueTalkManager::setFlags(40, 0); @@ -72,7 +71,7 @@ void BellbotScript::setupSentences() { for (int idx = 1; idx < 20; ++idx) _sentences[idx].load(CString::format("Sentences/Bellbot/%d", idx)); - _field2DC = 0; + _responseFlag = false; _field68 = 0; _entryCount = 0; } @@ -370,7 +369,7 @@ ScriptChangedResult BellbotScript::scriptChanged(const TTroomScript *roomScript, break; case 157: - _field2DC = 1; + _responseFlag = true; break; case 158: @@ -378,7 +377,7 @@ ScriptChangedResult BellbotScript::scriptChanged(const TTroomScript *roomScript, break; case 3: - if (_field2DC) { + if (_responseFlag) { if (randomResponse0(roomScript, id)) return SCR_2; } else { @@ -386,7 +385,7 @@ ScriptChangedResult BellbotScript::scriptChanged(const TTroomScript *roomScript, applyResponse(); } - _field2DC = 0; + _responseFlag = false; CTrueTalkManager::_v9 = 0; // Deliberate fall-through default: diff --git a/engines/titanic/true_talk/bellbot_script.h b/engines/titanic/true_talk/bellbot_script.h index 3080b56902..6f57ee718f 100644 --- a/engines/titanic/true_talk/bellbot_script.h +++ b/engines/titanic/true_talk/bellbot_script.h @@ -35,10 +35,7 @@ private: TTsentenceEntries _sentences[20]; TTcommonPhraseArray _phrases; int _array[150]; - int _field2D0; - int _field2D4; - int _field2D8; - int _field2DC; + bool _responseFlag; bool _room107First; private: /** diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index f434822870..2741e6b640 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -33,9 +33,8 @@ namespace Titanic { CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) : _owner(owner), _script(owner->_script), _resources(g_vm->_exeResources), - _parser(this), _field10(0), _inputCtr(0), - _concept1P(nullptr), _concept2P(nullptr), _concept3P(nullptr), - _concept4P(nullptr), _field30(0) { + _parser(this), _inputCtr(0), _concept1P(nullptr), + _concept2P(nullptr), _concept3P(nullptr), _concept4P(nullptr) { g_vm->_scriptHandler = this; g_vm->_script = _script; g_vm->_exeResources.reset(this, val1, val2); diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h index 193c60f719..01aa2ef1c5 100644 --- a/engines/titanic/true_talk/script_handler.h +++ b/engines/titanic/true_talk/script_handler.h @@ -39,9 +39,7 @@ class CScriptHandler { private: CTitleEngine *_owner; CExeResources &_resources; - int _field10; int _inputCtr; - int _field30; private: void handleWord1(const TTstring *str); void handleWord2(const TTstring *str); diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp index f187710de7..3fae527770 100644 --- a/engines/titanic/true_talk/tt_sentence.cpp +++ b/engines/titanic/true_talk/tt_sentence.cpp @@ -28,7 +28,7 @@ namespace Titanic { TTsentenceConcept *TTsentenceConcept::addSibling() { - if (this == nullptr || _nextP != nullptr) + if (_nextP != nullptr) // This should never happen return nullptr; diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp index 1d4d2ebbf2..414bf8561c 100644 --- a/engines/titanic/true_talk/tt_vocab.cpp +++ b/engines/titanic/true_talk/tt_vocab.cpp @@ -32,8 +32,8 @@ namespace Titanic {
-TTvocab::TTvocab(int val): _headP(nullptr), _tailP(nullptr), _word(nullptr),
- _fieldC(0), _field10(0), _vocabMode(val) {
+TTvocab::TTvocab(int val): _headP(nullptr), _tailP(nullptr),
+ _word(nullptr), _vocabMode(val) {
load("STVOCAB.TXT");
}
diff --git a/engines/titanic/true_talk/tt_vocab.h b/engines/titanic/true_talk/tt_vocab.h index fc7ee2e102..614d1bbf02 100644 --- a/engines/titanic/true_talk/tt_vocab.h +++ b/engines/titanic/true_talk/tt_vocab.h @@ -34,8 +34,6 @@ private: TTword *_headP; TTword *_tailP; TTword *_word; - int _fieldC; - int _field10; int _vocabMode; private: /** |