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