Mania++
 All Classes Functions Variables Pages
GameMode.h
1 #ifndef GAMEMODE_H_
2 #define GAMEMODE_H_
3 
4 //* GameMode
8 enum GameMode
9 {
10  Script = 0,
11  Rounds = 1,
12  TimeAttack = 2,
13  Team = 3,
14  Laps = 4,
15  Cup = 5,
16  Stunts = 6
17 };
18 
19 
20 //* GameModeConverter
25 {
26 public:
32  static std::string GetName(GameMode mode)
33  {
34  switch(mode)
35  {
36  case GameMode::Rounds:
37  return "Rounds";
38  case GameMode::TimeAttack:
39  return "TimeAttack";
40  case GameMode::Team:
41  return "Team";
42  case GameMode::Laps:
43  return "Laps";
44  case GameMode::Cup:
45  return "Cup";
46  case GameMode::Stunts:
47  return "Stunts";
48 
49  default:
50  return "Script";
51  }
52  }
53 
59  static std::string GetDediName(GameMode mode)
60  {
61  switch(mode)
62  {
63  case GameMode::TimeAttack:
64  return "TA";
65  case GameMode::Rounds:
66  case GameMode::Team:
67  case GameMode::Cup:
68  return "Rounds";
69 
70  default:
71  return "n/a";
72  }
73  }
74 };
75 
76 #endif // GAMEMODE_H_
Converts enum values into usable strings.
Definition: GameMode.h:24
static std::string GetDediName(GameMode mode)
Converts enum value into usable Dedimania-accepted string (so only TA or Rounds - n/a if not Dedi-acc...
Definition: GameMode.h:59
static std::string GetName(GameMode mode)
Converts enum value into usable string.
Definition: GameMode.h:32