#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; }