-
Notifications
You must be signed in to change notification settings - Fork 3
/
constants.h
216 lines (165 loc) · 4.29 KB
/
constants.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#ifndef _CONSTANTS_H_
#define _CONSTANTS_H_
#include <string>
#include <SDL/SDL.h>
using namespace std;
#define GAME_VERSION "2011-09-06"
#define MAX_PLAYER_NAME_SIZE 30
#define MAX_BUILDING_LEVELS 6
#define MAX_PLANET_TILES (20*24)
#define MAX_ANGLE_TYPES 8
#define HUD_WIDTH 100
#define HUD_HEIGHT 36
#define MAX_STORED_CANNONS 4
#define DEFAULT_MAX_UNITS_PER_TEAM 70
#define ROAD_SPEED 1.689
#define WATER_SPEED 0.7
#define TAN1 1.55740772
#define LIFE_AFTER_DEATH_TIME 0
#define MAX_BOT_BYPASS_SIZE 512
#define MAX_BOT_BYPASS_RANDOM_SIZE_OFFSET 64
#define REGISTRATION_COST 1
//#define COLLECT_TEAM_COLORS
#define USE_TEAM_COLORS
//#define ONLY_TWO_TEAMS
//#define BUILDING_AUTO_REPAIR_TIME (5 * 60)
//health
#define MAX_UNIT_HEALTH 10000
#define VEHICLE_MOVE_ANIM_SPEED 0.1
#define PI 3.14159
enum planet_type
{
DESERT, VOLCANIC, ARCTIC, JUNGLE, CITY, MAX_PLANET_TYPES
};
const string planet_type_string[MAX_PLANET_TYPES] =
{
"desert", "volcanic", "arctic", "jungle", "city"
};
enum robot_type
{
GRUNT, PSYCHO, SNIPER, TOUGH, PYRO, LASER, MAX_ROBOT_TYPES
};
const string robot_type_string[MAX_ROBOT_TYPES] =
{
"grunt", "psycho", "sniper", "tough", "pyro", "laser"
};
const string robot_production_string[MAX_ROBOT_TYPES] =
{
"Grunt", "Psycho", "Sniper", "Tough", "Pyro", "Laser"
};
enum cannon_type
{
GATLING, GUN, HOWITZER, MISSILE_CANNON, MAX_CANNON_TYPES
};
const string cannon_type_string[MAX_CANNON_TYPES] =
{
"gatling", "gun", "howitzer", "missile_cannon"
};
const string cannon_production_string[MAX_CANNON_TYPES] =
{
"Gatling", "Gun", "Howitzer", "Missile"
};
enum vehicle_type
{
JEEP, LIGHT, MEDIUM, HEAVY, APC, MISSILE_LAUNCHER, CRANE, MAX_VEHICLE_TYPES
};
const string vehicle_type_string[MAX_VEHICLE_TYPES] =
{
"jeep", "light", "medium", "heavy", "apc", "missile_launcher", "crane"
};
const string vehicle_production_string[MAX_VEHICLE_TYPES] =
{
"Jeep", "Light", "Medium", "Heavy", "APC", "M Missile", "Crane"
};
enum building_type
{
FORT_FRONT, FORT_BACK, RADAR, REPAIR, ROBOT_FACTORY, VEHICLE_FACTORY,
BRIDGE_VERT, BRIDGE_HORZ, MAX_BUILDING_TYPES
};
const string building_type_string[MAX_BUILDING_TYPES] =
{
"fort_front", "fort_back", "radar", "repair", "robot_factory", "vehicle_factory",
"bridge_vert", "bridge_horz"
};
enum item_type
{
FLAG_ITEM, ROCK_ITEM, GRENADES_ITEM, ROCKETS_ITEM, HUT_ITEM,
MAP0_ITEM, MAP1_ITEM, MAP2_ITEM, MAP3_ITEM, MAP4_ITEM, MAP5_ITEM,
MAP6_ITEM, MAP7_ITEM, MAP8_ITEM, MAP9_ITEM, MAP10_ITEM, MA11_ITEM,
MAP12_ITEM, MAP13_ITEM, MAP14_ITEM, MAP15_ITEM, MAP16_ITEM, MAP17_ITEM,
MAP18_ITEM, MAP19_ITEM, MAP20_ITEM, MAP21_ITEM,
MAX_ITEM_TYPES
};
#define MAP_ITEMS_AMOUNT 22
const string item_type_string[MAX_ITEM_TYPES] =
{
"flag", "rock", "grenades", "rockets", "hut", "map_object0"
};
#ifdef ONLY_TWO_TEAMS
enum team_type
{
NULL_TEAM, RED_TEAM, BLUE_TEAM, MAX_TEAM_TYPES
};
const string team_type_string[MAX_TEAM_TYPES] =
{
"null", "red", "blue"
};
#else
#ifdef USE_TEAM_COLORS
enum team_type
{
NULL_TEAM, RED_TEAM, BLUE_TEAM, GREEN_TEAM, YELLOW_TEAM,
PURPLE_TEAM, TEAL_TEAM, WHITE_TEAM, BLACK_TEAM, MAX_TEAM_TYPES
};
const string team_type_string[MAX_TEAM_TYPES] =
{
"null", "red", "blue", "green", "yellow",
"purple", "teal", "white", "black"
};
#else
enum team_type
{
NULL_TEAM, RED_TEAM, BLUE_TEAM, GREEN_TEAM, YELLOW_TEAM, MAX_TEAM_TYPES
};
const string team_type_string[MAX_TEAM_TYPES] =
{
"null", "red", "blue", "green", "yellow"
};
#endif
#endif
enum player_mode
{
NOBODY_MODE, PLAYER_MODE, BOT_MODE, SPECTATOR_MODE, TRAY_MODE, MAX_PLAYER_MODES
};
const string player_mode_string[MAX_PLAYER_MODES] =
{
"nobody_mode", "player_mode", "bot_mode", "spectator_mode", "tray_mode"
};
enum cursor_type
{
CURSOR_C, PLACE_C, PLACED_C, ATTACK_C,
ATTACKED_C, GRAB_C, GRABBED_C, GRENADE_C, GRENADED_C,
REPAIR_C, REPAIRED_C, NONO_C, CANNON_C, CANNONED_C,
ENTER_C, ENTERED_C, EXIT_C, EXITED_C, MAX_CURSOR_TYPES
};
//const SDL_Color team_color[MAX_TEAM_TYPES] =
//{
// {115, 115, 115, 0},
// {233, 0, 0, 0},
// {19, 55, 251, 0},
// {23, 143, 19, 0},
// {203, 99, 47, 0}
//};
enum rotation_enum
{
R0, R45, R90, R135, R180, R225, R270, R315
};
const int ROTATION[MAX_ANGLE_TYPES] =
{
0, 45, 90, 135, 180, 225, 270, 315
};
const int ROTATION_INVERTED[MAX_ANGLE_TYPES] =
{
180, 225, 270, 315, 0, 45, 90, 135
};
#endif