File: enum.h

package info (click to toggle)
opencity 0.0.6.5stable-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,348 kB
  • sloc: cpp: 26,622; sh: 11,267; xml: 4,453; ansic: 587; makefile: 521
file content (359 lines) | stat: -rw-r--r-- 7,202 bytes parent folder | download | duplicates (6)
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
/***************************************************************************
						enum.h  -  description
							-------------------
	begin                : may 8th, 2006
	copyright            : (C) 2003-2007 by Duong Khang NGUYEN
	email                : neoneurone @ gmail com

	$Id: enum.h 375 2008-10-28 14:47:15Z neoneurone $
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   any later version.                                                    *
 *                                                                         *
 ***************************************************************************/

#ifndef _OPENCITY_ENUM_H_
#define _OPENCITY_ENUM_H_ 1

/** OpenCity's error codes
*/
	enum OPENCITY_ERR_CODE {
		OC_ERR_FREE = 0,		///< No error
		OC_ERR_SOMETHING,		///< Something went wrong ?
		OC_ERR_INVALID,			///< Invalid value on conversion / invalid method argument
		OC_ERR_FILE				///< File error: read/open/write
	};

	enum OPENCITY_MAP_VARIATION {
		OC_MAP_UP = 1,
		OC_MAP_DOWN = -1
	};

/** The different layers of OpenCity's city
*/
	enum OPENCITY_CITY_LAYER {
		OC_LAYER_BUILDING = 0,		///< The building layer contains buildings :)
		OC_LAYER_WATER,				///< The water layer shows the water pipes
		OC_LAYER_GAS,				///< ?
		OC_LAYER_SUBWAY				///< ?
	};

	enum OPENCITY_CITY_SPEED {
		OC_SPEED_PAUSE = 0,
		OC_SPEED_NORMAL,
		OC_SPEED_FAST
	};

	enum OPENCITY_CITY_KEY {
		KEY_UP = 0,
		KEY_DOWN,
		KEY_LEFT,
		KEY_RIGHT,
		KEY_PAGEUP,
		KEY_PAGEDOWN,
		KEY_ALT,
		KEY_INSERT,
		KEY_DELETE,

		KEY_NUMBER			// Total number of keys
	};

// OpenCity's code for tool
	enum OPENCITY_TOOL_CODE {
		OC_TOOL_NONE = 0,
		OC_TOOL_DESTROY,

		OC_TOOL_ZONE_RES,
		OC_TOOL_ZONE_COM,
		OC_TOOL_ZONE_IND,

		OC_TOOL_HEIGHT_UP,
		OC_TOOL_HEIGHT_DOWN,

		OC_TOOL_ROAD,

		OC_TOOL_ELINE,
		OC_TOOL_EPLANT_COAL,
//		OC_TOOL_EPLANT_GAS,
//		OC_TOOL_EPLANT_OIL,
		OC_TOOL_EPLANT_NUCLEAR,

		OC_TOOL_PARK,
		OC_TOOL_FLORA,

		OC_TOOL_FIRE,
		OC_TOOL_POLICE,
		OC_TOOL_HOSPITAL,
//		OC_TOOL_MILITARY,
		OC_TOOL_EDUCATION,

		OC_TOOL_AGENT_POLICE,
		OC_TOOL_AGENT_DEMONSTRATOR,
		OC_TOOL_AGENT_ROBBER,

		OC_TOOL_TEST_BUILDING,
		OC_TOOL_QUERY,

		OC_TOOL_NUMBER			// Total number of tools
	};

// OpenCity's codes for structures
// See the notes above the GRAPHIC_CODE
	enum OPENCITY_STRUCTURE_CODE {
		OC_STRUCTURE_UNDEFINED = 0,
		OC_STRUCTURE_TEST,
		OC_STRUCTURE_ANY,
		OC_STRUCTURE_PART,

		OC_STRUCTURE_RES = 10,
		OC_STRUCTURE_COM,
		OC_STRUCTURE_IND,

		OC_STRUCTURE_PARK,
		OC_STRUCTURE_FLORA,

		OC_STRUCTURE_ROAD = 20,

		OC_STRUCTURE_ELECTRIC = 30,
		OC_STRUCTURE_ELINE,
		OC_STRUCTURE_EPLANT_COAL,
		OC_STRUCTURE_EPLANT_GAS,
		OC_STRUCTURE_EPLANT_OIL,
		OC_STRUCTURE_EPLANT_NUCLEAR,

		OC_STRUCTURE_FIREDEPT,
		OC_STRUCTURE_POLICEDEPT,
		OC_STRUCTURE_HOSPITALDEPT,
		OC_STRUCTURE_MILITARYDEPT,
		OC_STRUCTURE_EDUCATIONDEPT
	};

/** Opencity's graphic codes ( model internal code )
	These codes are different from structure codes in the following ways:
	a) The same structure code can have more than 1 associated graphic code.
	b) The same graphic code can have more than 1 associated models.
	c) For eg. RES_ZONE0 is used for residential zone level 0. However, the
		associated model can have up to 10 internal graphic levels. They are
		represented by the groups contained in the models.
*/
	enum OPENCITY_GRAPHIC_CODE {
		OC_EMPTY = 0,
		OC_TEST_BUILDING = 1,			// Used by the graphists for testing their works

		OC_RES_ZONE0 = 10,
		OC_RES_ZONE1,
		OC_RES_ZONE2,
		OC_RES_ZONE3,
		OC_RES_ZONE4,
		OC_RES_ZONE5,
		OC_RES_ZONE6,
		OC_RES_ZONE7,
		OC_RES_ZONE8,
		OC_RES_ZONE9,

		OC_COM_ZONE0 = 20,
		OC_COM_ZONE1,
		OC_COM_ZONE2,
		OC_COM_ZONE3,
		OC_COM_ZONE4,
		OC_COM_ZONE5,
		OC_COM_ZONE6,
		OC_COM_ZONE7,
		OC_COM_ZONE8,
		OC_COM_ZONE9,

		OC_IND_ZONE0 = 30,
		OC_IND_ZONE1,
		OC_IND_ZONE2,
		OC_IND_ZONE3,
		OC_IND_ZONE4,
		OC_IND_ZONE5,
		OC_IND_ZONE6,
		OC_IND_ZONE7,
		OC_IND_ZONE8,
		OC_IND_ZONE9,

		OC_TERRAIN_PLANE = 100,
/*not used
		OC_TERRAIN_N,
		OC_TERRAIN_NE,
		OC_TERRAIN_E,
		OC_TERRAIN_SE,
		OC_TERRAIN_S,
		OC_TERRAIN_SW,
		OC_TERRAIN_W,
		OC_TERRAIN_NW,
		OC_TERRAIN_SE3,
		OC_TERRAIN_NW3,
		OC_TERRAIN_SW3,
		OC_TERRAIN_NE3,
*/

	// The order of the following enumerations are important
	// See pathstructure.cpp for more information
		OC_ROAD_O_N = 150,
		OC_ROAD_O_E,     // +1
		OC_ROAD_O_S,
		OC_ROAD_O_W,
		OC_ROAD_S_N,
		OC_ROAD_W_E,     // +5
		OC_ROAD_N_E,
		OC_ROAD_N_W,
		OC_ROAD_S_E,
		OC_ROAD_S_W,
		OC_ROAD_S_N_E,   // +10
		OC_ROAD_S_W_E,
		OC_ROAD_S_N_W,
		OC_ROAD_N_W_E,
		OC_ROAD_S_N_W_E,

	// The order of the following enumerations are important
	// See pathstructure.cpp for more information
		OC_ELINE_O_N = 170,
		OC_ELINE_O_E,
		OC_ELINE_O_S,
		OC_ELINE_O_W,
		OC_ELINE_S_N,
		OC_ELINE_W_E,
		OC_ELINE_N_E,
		OC_ELINE_N_W,
		OC_ELINE_S_E,
		OC_ELINE_S_W,
		OC_ELINE_S_N_E,
		OC_ELINE_S_W_E,
		OC_ELINE_S_N_W,
		OC_ELINE_N_W_E,
		OC_ELINE_S_N_W_E,

		OC_WPIPE_O_N = 190,
		OC_WPIPE_O_E,     // +1
		OC_WPIPE_O_S,
		OC_WPIPE_O_W,
		OC_WPIPE_S_N,
		OC_WPIPE_W_E,     // +5
		OC_WPIPE_N_E,
		OC_WPIPE_N_W,
		OC_WPIPE_S_E,
		OC_WPIPE_S_W,
		OC_WPIPE_S_N_E,   // +10
		OC_WPIPE_S_W_E,
		OC_WPIPE_S_N_W,
		OC_WPIPE_N_W_E,
		OC_WPIPE_S_N_W_E,

		OC_GPIPE_O_N = 210,
		OC_GPIPE_O_E,     // +1
		OC_GPIPE_O_S,
		OC_GPIPE_O_W,
		OC_GPIPE_S_N,
		OC_GPIPE_W_E,     // +5
		OC_GPIPE_N_E,
		OC_GPIPE_N_W,
		OC_GPIPE_S_E,
		OC_GPIPE_S_W,
		OC_GPIPE_S_N_E,   // +10
		OC_GPIPE_S_W_E,
		OC_GPIPE_S_N_W,
		OC_GPIPE_N_W_E,
		OC_GPIPE_S_N_W_E,

		OC_EPLANT_COAL = 300,	// to 319
		OC_EPLANT_GAS,
		OC_EPLANT_OIL,
		OC_EPLANT_NUCLEAR,

		OC_PARK0 = 320,
//		OC_PARK_MEDIUM = 330,
//		OC_PARK_BIG = 340,

		OC_TREE_BEGIN = 330,
		OC_TREE_FIR = 330,
		OC_TREE_007,
		OC_TREE_PEKINGWILLOW,
		OC_TREE_PINE1,
		OC_TREE_PINE2,
		OC_TREE_END = 334,

		OC_FIRE_DEPT = 350,
		OC_POLICE_DEPT = 360,
		OC_HOSPITAL_DEPT = 370,
		OC_MILITARY_DEPT = 380,
		OC_EDUCATION_DEPT = 390,

		OC_VEHICLE_STD = 400,
		OC_VEHICLE_FX = 430,
		OC_VEHICLE_PICKUP = 440,
		OC_VEHICLE_ROBBER = 441,
		OC_VEHICLE_FIRE = 450,
		OC_VEHICLE_POLICE = 460,
		OC_VEHICLE_HOSPITAL = 470,
		OC_VEHICLE_MILITARY = 480,
		OC_VEHICLE_EDUCATION = 490,

		OC_GRAPHIC_CODE_MAX
	};

/** In game home made sound effects
*/
	enum OPENCITY_SOUND_EFFECT {
		OC_SOUND_DESTROY,
		OC_SOUND_ELINE,
		OC_SOUND_EPLANT,
		OC_SOUND_PARK,
		OC_SOUND_RCI,
		OC_SOUND_ROAD,
		OC_SOUND_TERRAIN
	};

/** Code for getting structure's properties
*/
	enum OPENCITY_PROPERTY_CODE {
		OC_TOOL_COST,				///< Get the build cost
		OC_DESTROY_COST,			///< Get the destroy cost
		OC_MAINTENANCE_COST,		///< Get the maintenance cost
		OC_INCOME,					///< Get the income generated by one structure
		OC_CODE_TO_TYPE				///< Get the type of a structure from its code
	};

#endif