forked from Whales/Cataclysm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gamemode.cpp
39 lines (36 loc) · 821 Bytes
/
gamemode.cpp
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
39
#include "gamemode.h"
#include "output.h"
std::string special_game_name(special_game_id id)
{
switch (id) {
case SGAME_NULL:
case NUM_SPECIAL_GAMES: return "nethack (this is a bug)";
case SGAME_TUTORIAL: return "Tutorial";
case SGAME_DEFENSE: return "Defense";
// case SGAME_WEST: return "Journey to the West";
default: return "Uncoded (this is a bug)";
}
}
special_game* get_special_game(special_game_id id)
{
special_game* ret;
switch (id) {
case SGAME_NULL:
ret = new special_game;
break;
case SGAME_TUTORIAL:
ret = new tutorial_game;
break;
case SGAME_DEFENSE:
ret = new defense_game;
break;
/* case SGAME_WEST:
ret = new west_game;
break;*/
default:
debugmsg("Missing something in get_special_game()?");
ret = new special_game;
break;
}
return ret;
}