summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2PlaceParamDef.h
blob: 99d541c91e2ec58192ff34a6820ea614a9769691 (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
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef T2DLL_T2PLACEPARAMDEF_H
#define T2DLL_T2PLACEPARAMDEF_H
#include "../common.h"

class AFX_CLASS_EXPORT T2PlaceParamDef {
public:
	enum EPlace {
		Place_0, // pool
		Place_1, // tenant
		Place_2, // floor
		kMaxPlace
	};

	T2PlaceParamDef(CResFile& resFile);
	virtual ~T2PlaceParamDef();

public:
    unsigned int GetPercent(EPlace place) const;
    float GetRate(EPlace place) const;
    short GetScore(EPlace place) const;

protected:
	struct {
		unsigned int mPercent;
		short mScore;
		float mRate;
	} mEntries[kMaxPlace];
};

inline unsigned int T2PlaceParamDef::GetPercent(EPlace place) const {
    return mEntries[place].mPercent;
}

inline float T2PlaceParamDef::GetRate(EPlace place) const {
    return mEntries[place].mRate;
}

inline short T2PlaceParamDef::GetScore(EPlace place) const {
    return mEntries[place].mScore;
}
#endif