1 /***************************************************************************
2 						enum.h  -  description
3 							-------------------
4 	begin                : may 8th, 2006
5 	copyright            : (C) 2003-2007 by Duong Khang NGUYEN
6 	email                : neoneurone @ gmail com
7 
8 	$Id: enum.h 375 2008-10-28 14:47:15Z neoneurone $
9  ***************************************************************************/
10 
11 /***************************************************************************
12  *                                                                         *
13  *   This program is free software; you can redistribute it and/or modify  *
14  *   it under the terms of the GNU General Public License as published by  *
15  *   the Free Software Foundation; either version 2 of the License, or     *
16  *   any later version.                                                    *
17  *                                                                         *
18  ***************************************************************************/
19 
20 #ifndef _OPENCITY_ENUM_H_
21 #define _OPENCITY_ENUM_H_ 1
22 
23 /** OpenCity's error codes
24 */
25 	enum OPENCITY_ERR_CODE {
26 		OC_ERR_FREE = 0,		///< No error
27 		OC_ERR_SOMETHING,		///< Something went wrong ?
28 		OC_ERR_INVALID,			///< Invalid value on conversion / invalid method argument
29 		OC_ERR_FILE				///< File error: read/open/write
30 	};
31 
32 	enum OPENCITY_MAP_VARIATION {
33 		OC_MAP_UP = 1,
34 		OC_MAP_DOWN = -1
35 	};
36 
37 /** The different layers of OpenCity's city
38 */
39 	enum OPENCITY_CITY_LAYER {
40 		OC_LAYER_BUILDING = 0,		///< The building layer contains buildings :)
41 		OC_LAYER_WATER,				///< The water layer shows the water pipes
42 		OC_LAYER_GAS,				///< ?
43 		OC_LAYER_SUBWAY				///< ?
44 	};
45 
46 	enum OPENCITY_CITY_SPEED {
47 		OC_SPEED_PAUSE = 0,
48 		OC_SPEED_NORMAL,
49 		OC_SPEED_FAST
50 	};
51 
52 	enum OPENCITY_CITY_KEY {
53 		KEY_UP = 0,
54 		KEY_DOWN,
55 		KEY_LEFT,
56 		KEY_RIGHT,
57 		KEY_PAGEUP,
58 		KEY_PAGEDOWN,
59 		KEY_ALT,
60 		KEY_INSERT,
61 		KEY_DELETE,
62 
63 		KEY_NUMBER			// Total number of keys
64 	};
65 
66 // OpenCity's code for tool
67 	enum OPENCITY_TOOL_CODE {
68 		OC_TOOL_NONE = 0,
69 		OC_TOOL_DESTROY,
70 
71 		OC_TOOL_ZONE_RES,
72 		OC_TOOL_ZONE_COM,
73 		OC_TOOL_ZONE_IND,
74 
75 		OC_TOOL_HEIGHT_UP,
76 		OC_TOOL_HEIGHT_DOWN,
77 
78 		OC_TOOL_ROAD,
79 
80 		OC_TOOL_ELINE,
81 		OC_TOOL_EPLANT_COAL,
82 //		OC_TOOL_EPLANT_GAS,
83 //		OC_TOOL_EPLANT_OIL,
84 		OC_TOOL_EPLANT_NUCLEAR,
85 
86 		OC_TOOL_PARK,
87 		OC_TOOL_FLORA,
88 
89 		OC_TOOL_FIRE,
90 		OC_TOOL_POLICE,
91 		OC_TOOL_HOSPITAL,
92 //		OC_TOOL_MILITARY,
93 		OC_TOOL_EDUCATION,
94 
95 		OC_TOOL_AGENT_POLICE,
96 		OC_TOOL_AGENT_DEMONSTRATOR,
97 		OC_TOOL_AGENT_ROBBER,
98 
99 		OC_TOOL_TEST_BUILDING,
100 		OC_TOOL_QUERY,
101 
102 		OC_TOOL_NUMBER			// Total number of tools
103 	};
104 
105 // OpenCity's codes for structures
106 // See the notes above the GRAPHIC_CODE
107 	enum OPENCITY_STRUCTURE_CODE {
108 		OC_STRUCTURE_UNDEFINED = 0,
109 		OC_STRUCTURE_TEST,
110 		OC_STRUCTURE_ANY,
111 		OC_STRUCTURE_PART,
112 
113 		OC_STRUCTURE_RES = 10,
114 		OC_STRUCTURE_COM,
115 		OC_STRUCTURE_IND,
116 
117 		OC_STRUCTURE_PARK,
118 		OC_STRUCTURE_FLORA,
119 
120 		OC_STRUCTURE_ROAD = 20,
121 
122 		OC_STRUCTURE_ELECTRIC = 30,
123 		OC_STRUCTURE_ELINE,
124 		OC_STRUCTURE_EPLANT_COAL,
125 		OC_STRUCTURE_EPLANT_GAS,
126 		OC_STRUCTURE_EPLANT_OIL,
127 		OC_STRUCTURE_EPLANT_NUCLEAR,
128 
129 		OC_STRUCTURE_FIREDEPT,
130 		OC_STRUCTURE_POLICEDEPT,
131 		OC_STRUCTURE_HOSPITALDEPT,
132 		OC_STRUCTURE_MILITARYDEPT,
133 		OC_STRUCTURE_EDUCATIONDEPT
134 	};
135 
136 /** Opencity's graphic codes ( model internal code )
137 	These codes are different from structure codes in the following ways:
138 	a) The same structure code can have more than 1 associated graphic code.
139 	b) The same graphic code can have more than 1 associated models.
140 	c) For eg. RES_ZONE0 is used for residential zone level 0. However, the
141 		associated model can have up to 10 internal graphic levels. They are
142 		represented by the groups contained in the models.
143 */
144 	enum OPENCITY_GRAPHIC_CODE {
145 		OC_EMPTY = 0,
146 		OC_TEST_BUILDING = 1,			// Used by the graphists for testing their works
147 
148 		OC_RES_ZONE0 = 10,
149 		OC_RES_ZONE1,
150 		OC_RES_ZONE2,
151 		OC_RES_ZONE3,
152 		OC_RES_ZONE4,
153 		OC_RES_ZONE5,
154 		OC_RES_ZONE6,
155 		OC_RES_ZONE7,
156 		OC_RES_ZONE8,
157 		OC_RES_ZONE9,
158 
159 		OC_COM_ZONE0 = 20,
160 		OC_COM_ZONE1,
161 		OC_COM_ZONE2,
162 		OC_COM_ZONE3,
163 		OC_COM_ZONE4,
164 		OC_COM_ZONE5,
165 		OC_COM_ZONE6,
166 		OC_COM_ZONE7,
167 		OC_COM_ZONE8,
168 		OC_COM_ZONE9,
169 
170 		OC_IND_ZONE0 = 30,
171 		OC_IND_ZONE1,
172 		OC_IND_ZONE2,
173 		OC_IND_ZONE3,
174 		OC_IND_ZONE4,
175 		OC_IND_ZONE5,
176 		OC_IND_ZONE6,
177 		OC_IND_ZONE7,
178 		OC_IND_ZONE8,
179 		OC_IND_ZONE9,
180 
181 		OC_TERRAIN_PLANE = 100,
182 /*not used
183 		OC_TERRAIN_N,
184 		OC_TERRAIN_NE,
185 		OC_TERRAIN_E,
186 		OC_TERRAIN_SE,
187 		OC_TERRAIN_S,
188 		OC_TERRAIN_SW,
189 		OC_TERRAIN_W,
190 		OC_TERRAIN_NW,
191 		OC_TERRAIN_SE3,
192 		OC_TERRAIN_NW3,
193 		OC_TERRAIN_SW3,
194 		OC_TERRAIN_NE3,
195 */
196 
197 	// The order of the following enumerations are important
198 	// See pathstructure.cpp for more information
199 		OC_ROAD_O_N = 150,
200 		OC_ROAD_O_E,     // +1
201 		OC_ROAD_O_S,
202 		OC_ROAD_O_W,
203 		OC_ROAD_S_N,
204 		OC_ROAD_W_E,     // +5
205 		OC_ROAD_N_E,
206 		OC_ROAD_N_W,
207 		OC_ROAD_S_E,
208 		OC_ROAD_S_W,
209 		OC_ROAD_S_N_E,   // +10
210 		OC_ROAD_S_W_E,
211 		OC_ROAD_S_N_W,
212 		OC_ROAD_N_W_E,
213 		OC_ROAD_S_N_W_E,
214 
215 	// The order of the following enumerations are important
216 	// See pathstructure.cpp for more information
217 		OC_ELINE_O_N = 170,
218 		OC_ELINE_O_E,
219 		OC_ELINE_O_S,
220 		OC_ELINE_O_W,
221 		OC_ELINE_S_N,
222 		OC_ELINE_W_E,
223 		OC_ELINE_N_E,
224 		OC_ELINE_N_W,
225 		OC_ELINE_S_E,
226 		OC_ELINE_S_W,
227 		OC_ELINE_S_N_E,
228 		OC_ELINE_S_W_E,
229 		OC_ELINE_S_N_W,
230 		OC_ELINE_N_W_E,
231 		OC_ELINE_S_N_W_E,
232 
233 		OC_WPIPE_O_N = 190,
234 		OC_WPIPE_O_E,     // +1
235 		OC_WPIPE_O_S,
236 		OC_WPIPE_O_W,
237 		OC_WPIPE_S_N,
238 		OC_WPIPE_W_E,     // +5
239 		OC_WPIPE_N_E,
240 		OC_WPIPE_N_W,
241 		OC_WPIPE_S_E,
242 		OC_WPIPE_S_W,
243 		OC_WPIPE_S_N_E,   // +10
244 		OC_WPIPE_S_W_E,
245 		OC_WPIPE_S_N_W,
246 		OC_WPIPE_N_W_E,
247 		OC_WPIPE_S_N_W_E,
248 
249 		OC_GPIPE_O_N = 210,
250 		OC_GPIPE_O_E,     // +1
251 		OC_GPIPE_O_S,
252 		OC_GPIPE_O_W,
253 		OC_GPIPE_S_N,
254 		OC_GPIPE_W_E,     // +5
255 		OC_GPIPE_N_E,
256 		OC_GPIPE_N_W,
257 		OC_GPIPE_S_E,
258 		OC_GPIPE_S_W,
259 		OC_GPIPE_S_N_E,   // +10
260 		OC_GPIPE_S_W_E,
261 		OC_GPIPE_S_N_W,
262 		OC_GPIPE_N_W_E,
263 		OC_GPIPE_S_N_W_E,
264 
265 		OC_EPLANT_COAL = 300,	// to 319
266 		OC_EPLANT_GAS,
267 		OC_EPLANT_OIL,
268 		OC_EPLANT_NUCLEAR,
269 
270 		OC_PARK0 = 320,
271 //		OC_PARK_MEDIUM = 330,
272 //		OC_PARK_BIG = 340,
273 
274 		OC_TREE_BEGIN = 330,
275 		OC_TREE_FIR = 330,
276 		OC_TREE_007,
277 		OC_TREE_PEKINGWILLOW,
278 		OC_TREE_PINE1,
279 		OC_TREE_PINE2,
280 		OC_TREE_END = 334,
281 
282 		OC_FIRE_DEPT = 350,
283 		OC_POLICE_DEPT = 360,
284 		OC_HOSPITAL_DEPT = 370,
285 		OC_MILITARY_DEPT = 380,
286 		OC_EDUCATION_DEPT = 390,
287 
288 		OC_VEHICLE_STD = 400,
289 		OC_VEHICLE_FX = 430,
290 		OC_VEHICLE_PICKUP = 440,
291 		OC_VEHICLE_ROBBER = 441,
292 		OC_VEHICLE_FIRE = 450,
293 		OC_VEHICLE_POLICE = 460,
294 		OC_VEHICLE_HOSPITAL = 470,
295 		OC_VEHICLE_MILITARY = 480,
296 		OC_VEHICLE_EDUCATION = 490,
297 
298 		OC_GRAPHIC_CODE_MAX
299 	};
300 
301 /** In game home made sound effects
302 */
303 	enum OPENCITY_SOUND_EFFECT {
304 		OC_SOUND_DESTROY,
305 		OC_SOUND_ELINE,
306 		OC_SOUND_EPLANT,
307 		OC_SOUND_PARK,
308 		OC_SOUND_RCI,
309 		OC_SOUND_ROAD,
310 		OC_SOUND_TERRAIN
311 	};
312 
313 /** Code for getting structure's properties
314 */
315 	enum OPENCITY_PROPERTY_CODE {
316 		OC_TOOL_COST,				///< Get the build cost
317 		OC_DESTROY_COST,			///< Get the destroy cost
318 		OC_MAINTENANCE_COST,		///< Get the maintenance cost
319 		OC_INCOME,					///< Get the income generated by one structure
320 		OC_CODE_TO_TYPE				///< Get the type of a structure from its code
321 	};
322 
323 #endif
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 
360