blob: 328b35fbf7c5fd17fc4166f2bdebeb9994faa817 (
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
|
#pragma once
#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;
}
|