diff options
author | Paul Gilbert | 2017-09-18 18:16:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-18 18:16:03 -0400 |
commit | 5af8ed228d729dd9ef71f5f6cea7adb254dff7a4 (patch) | |
tree | 042295fae00eb651b35f3702408e60944462ae88 /engines/titanic/support | |
parent | 1d4e2c67fa20d962b0755cbe6a9c653f3bec76e5 (diff) | |
download | scummvm-rg350-5af8ed228d729dd9ef71f5f6cea7adb254dff7a4.tar.gz scummvm-rg350-5af8ed228d729dd9ef71f5f6cea7adb254dff7a4.tar.bz2 scummvm-rg350-5af8ed228d729dd9ef71f5f6cea7adb254dff7a4.zip |
TITANIC: Add VocabMode enum, fix German vocab loading
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/exe_resources.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/support/exe_resources.h | 17 |
2 files changed, 16 insertions, 7 deletions
diff --git a/engines/titanic/support/exe_resources.cpp b/engines/titanic/support/exe_resources.cpp index 2b2c9c7635..b216ea5c26 100644 --- a/engines/titanic/support/exe_resources.cpp +++ b/engines/titanic/support/exe_resources.cpp @@ -27,12 +27,12 @@ namespace Titanic { CExeResources::CExeResources() : _owner(nullptr), _field4(0), _field8(0), - _fieldC(0), _field10(0), _field14(0), _field18(0) { + _fieldC(0), _field10(0), _field14(0), _vocabMode(VOCAB_MODE_NONE) { } -void CExeResources::reset(CScriptHandler *owner, int val1, int val2) { +void CExeResources::reset(CScriptHandler *owner, int val1, VocabMode vocabMode) { _owner = owner; - _field18 = val2; + _vocabMode = vocabMode; } } // End of namespace Titanic diff --git a/engines/titanic/support/exe_resources.h b/engines/titanic/support/exe_resources.h index 993c34db97..382df39984 100644 --- a/engines/titanic/support/exe_resources.h +++ b/engines/titanic/support/exe_resources.h @@ -29,6 +29,8 @@ class CScriptHandler; enum FileHandle { HANDLE_STDIN = 0, HANDLE_STDOUT = 1, HANDLE_STDERR = 2 }; +enum VocabMode { VOCAB_MODE_NONE = 0, VOCAB_MODE_EN = 3, VOCAB_MODE_DE = 5 }; + class CExeResources { public: CScriptHandler *_owner; @@ -37,14 +39,21 @@ public: int _fieldC; int _field10; int _field14; - int _field18; + VocabMode _vocabMode; public: CExeResources(); - void reset(CScriptHandler *owner, int val1, int val2); + void reset(CScriptHandler *owner, int val1, VocabMode vocabMode); + + /** + * Tests whether the vocab mode equals the passed mode + */ + bool isVocabMode(int mode) const { return _vocabMode == mode; } - bool is18Equals(int val) const { return _field18 == val; } - int get18() const { return _field18; } + /** + * Returns the vocab mode + */ + VocabMode getVocabMode() const { return _vocabMode; } }; } // End of namespace Titanic |