blob: 4f4674b3362daa2efe6c9ad379c14e7844d7a295 (
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
|
#ifndef T2DLL_T2DAYPARAMDEF_H
#define T2DLL_T2DAYPARAMDEF_H
#include "../common.h"
class AFX_CLASS_EXPORT T2DayParamDef {
public:
enum EDay {
Day_0,
Day_1,
kMaxDay
};
enum EWhether {
Whether_0,
Whether_1,
kMaxWhether
};
T2DayParamDef(CResFile&);
virtual ~T2DayParamDef();
unsigned int GetPercent(EDay day, EWhether whether) const;
float GetRate(EDay day, EWhether whether) const;
protected:
struct {
unsigned int mPercent;
float mRate;
} mEntries[kMaxDay][kMaxWhether];
};
inline unsigned int T2DayParamDef::GetPercent(EDay day, EWhether whether) const {
return mEntries[day][whether].mPercent;
}
inline float T2DayParamDef::GetRate(EDay day, EWhether whether) const {
return mEntries[day][whether].mRate;
}
#endif
|