summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2WordDef.cpp
blob: 87d201597be6b967414320b6df88e9cbb2087b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "StdAfx.h"
#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;
	}
}