CSCommon: MMatchMap.h 소스 파일

MAIET

MMatchMap.h

00001 #ifndef _MMATCHMAP_H
00002 #define _MMATCHMAP_H
00003 
00004 
00005 #define MAPNAME_LENGTH      32
00006 
00007 
00008 
00009 enum MMATCH_MAP 
00010 {
00011     MMATCH_MAP_MANSION          = 0,
00012     MMATCH_MAP_PRISON           = 1,
00013     MMATCH_MAP_STATION          = 2,
00014     MMATCH_MAP_PRISON_II        = 3,
00015     MMATCH_MAP_BATTLE_ARENA     = 4,
00016     MMATCH_MAP_TOWN             = 5,
00017     MMATCH_MAP_DUNGEON          = 6,
00018     MMATCH_MAP_RUIN             = 7,
00019     MMATCH_MAP_ISLAND           = 8,
00020     MMATCH_MAP_GARDEN           = 9,
00021     MMATCH_MAP_CASTLE           = 10,
00022     MMATCH_MAP_FACTORY          = 11,
00023 
00024     MMATCH_MAP_MAX
00025 };
00026 
00027 #define MMATCH_MAP_COUNT    MMATCH_MAP_MAX          // 전체 맵 갯수
00028 
00029 
00030 const struct MMatchMapDesc
00031 {
00032     int         nMapID;                         // map id
00033     char        szMapName[MAPNAME_LENGTH];      // 맵 이름
00034     float       fExpRatio;                      // 경험치 습득률
00035     int         nMaxPlayers;                    // 최대 인원
00036 
00037 } g_MapDesc[MMATCH_MAP_COUNT] = 
00038 { 
00039     {MMATCH_MAP_MANSION,        "Mansion",      1.0f,   16}, 
00040     {MMATCH_MAP_PRISON,         "Prison",       1.0f,   16}, 
00041     {MMATCH_MAP_STATION,        "Station",      1.0f,   16}, 
00042     {MMATCH_MAP_PRISON_II,      "Prison II",    1.0f,   16},
00043     {MMATCH_MAP_BATTLE_ARENA,   "Battle Arena", 1.0f,   16},
00044     {MMATCH_MAP_TOWN,           "Town",         1.0f,   16},
00045     {MMATCH_MAP_DUNGEON,        "Dungeon",      1.0f,   16},
00046     {MMATCH_MAP_RUIN,           "Ruin",         1.0f,   16},
00047     {MMATCH_MAP_ISLAND,         "Island",       1.0f,   16},
00048     {MMATCH_MAP_GARDEN,         "Garden",       1.0f,   16},
00049     {MMATCH_MAP_CASTLE,         "Castle",       1.0f,   16},
00050     {MMATCH_MAP_FACTORY,        "Factory",      0.8f,   8},
00051 };
00052 
00053 
00054 inline bool MIsCorrectMap(const int nMapID)
00055 {
00056     if ((nMapID < 0) || (nMapID >= MMATCH_MAP_MAX)) return false;
00057     return true;
00058 }
00059 
00060 inline const char* MGetMapName(const int nMapID)
00061 {
00062     if (MIsCorrectMap(nMapID))
00063         return g_MapDesc[nMapID].szMapName;
00064     else
00065         return 0;
00066 }
00067 
00068 
00069 
00070 
00071 #endif


MAIET entertainment