diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
commit | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (patch) | |
tree | eaf6e857382eef16c2dd940eb4125536fbe068bd /src/T2DLL/T2WordDef.cpp | |
download | t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.tar.gz t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.zip |
initial commit
Diffstat (limited to 'src/T2DLL/T2WordDef.cpp')
-rw-r--r-- | src/T2DLL/T2WordDef.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/T2DLL/T2WordDef.cpp b/src/T2DLL/T2WordDef.cpp new file mode 100644 index 0000000..3b92484 --- /dev/null +++ b/src/T2DLL/T2WordDef.cpp @@ -0,0 +1,28 @@ +#include "CResFile.h" +#include "T2WordDef.h" + +T2WordDef::T2WordDef() { +} + +void T2WordDef::Read(CResFile& resFile) { + resFile >> mSexMask; + resFile >> mAgeMask; + resFile >> mFlags; + resFile >> mLevel; + resFile >> mStr; +} + +/*virtual*/ T2WordDef::~T2WordDef() { +} + +void T2WordDef::GetWords(unsigned int sex, unsigned int age, unsigned int flags, unsigned int level, CString& outStr) const { + if ( + (mSexMask & (1 << sex)) && + (mAgeMask & (1 << age)) && + (mFlags == flags) && + (mLevel == level) + ) + { + outStr = mStr; + } +} |