white space changes
[rocksndiamonds.git] / src / game_bd / bd_elements.h
1 /*
2  * Copyright (c) 2007, 2008, 2009, Czirkos Zoltan <cirix@fw.hu>
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #ifndef BD_ELEMENTS_H
18 #define BD_ELEMENTS_H
19
20
21 // These are the objects in caves.
22 typedef enum _element
23 {
24   O_SPACE,
25   O_DIRT,
26   O_DIRT_SLOPED_UP_RIGHT,
27   O_DIRT_SLOPED_UP_LEFT,
28   O_DIRT_SLOPED_DOWN_LEFT,
29   O_DIRT_SLOPED_DOWN_RIGHT,
30   O_DIRT_BALL,
31   O_DIRT_BALL_F,
32   O_DIRT_LOOSE,
33   O_DIRT_LOOSE_F,
34   O_DIRT2,
35   O_BRICK,
36   O_BRICK_SLOPED_UP_RIGHT,
37   O_BRICK_SLOPED_UP_LEFT,
38   O_BRICK_SLOPED_DOWN_LEFT,
39   O_BRICK_SLOPED_DOWN_RIGHT,
40   O_BRICK_NON_SLOPED,
41   O_MAGIC_WALL,
42   O_PRE_OUTBOX,
43   O_OUTBOX,
44   O_PRE_INVIS_OUTBOX,
45   O_INVIS_OUTBOX,
46   O_STEEL,
47   O_STEEL_SLOPED_UP_RIGHT,
48   O_STEEL_SLOPED_UP_LEFT,
49   O_STEEL_SLOPED_DOWN_LEFT,
50   O_STEEL_SLOPED_DOWN_RIGHT,
51   O_STEEL_EXPLODABLE,
52   O_STEEL_EATABLE,
53   O_BRICK_EATABLE,
54   O_STONE,
55   O_STONE_F,
56   O_FLYING_STONE,
57   O_FLYING_STONE_F,
58   O_MEGA_STONE,
59   O_MEGA_STONE_F,
60   O_DIAMOND,
61   O_DIAMOND_F,
62   O_FLYING_DIAMOND,
63   O_FLYING_DIAMOND_F,
64   O_NUT,
65   O_NUT_F,
66   O_BLADDER_SPENDER,
67   O_INBOX,
68   O_H_EXPANDING_WALL,
69   O_V_EXPANDING_WALL,
70   O_EXPANDING_WALL,
71   O_H_EXPANDING_STEEL_WALL,
72   O_V_EXPANDING_STEEL_WALL,
73   O_EXPANDING_STEEL_WALL,
74   O_EXPANDING_WALL_SWITCH,
75   O_CREATURE_SWITCH,
76   O_BITER_SWITCH,
77   O_REPLICATOR_SWITCH,
78   O_CONVEYOR_SWITCH,
79   O_CONVEYOR_DIR_SWITCH,
80   O_ACID,
81   O_FALLING_WALL,
82   O_FALLING_WALL_F,
83   O_BOX,
84   O_TIME_PENALTY,
85   O_GRAVESTONE,
86   O_STONE_GLUED,
87   O_DIAMOND_GLUED,
88   O_DIAMOND_KEY,
89   O_TRAPPED_DIAMOND,
90   O_CLOCK,
91   O_DIRT_GLUED,
92   O_KEY_1,
93   O_KEY_2,
94   O_KEY_3,
95   O_DOOR_1,
96   O_DOOR_2,
97   O_DOOR_3,
98
99   O_POT,
100   O_GRAVITY_SWITCH,
101   O_PNEUMATIC_HAMMER,
102   O_TELEPORTER,
103   O_SKELETON,
104   O_WATER,
105   O_WATER_1,
106   O_WATER_2,
107   O_WATER_3,
108   O_WATER_4,
109   O_WATER_5,
110   O_WATER_6,
111   O_WATER_7,
112   O_WATER_8,
113   O_WATER_9,
114   O_WATER_10,
115   O_WATER_11,
116   O_WATER_12,
117   O_WATER_13,
118   O_WATER_14,
119   O_WATER_15,
120   O_WATER_16,
121   O_COW_1,
122   O_COW_2,
123   O_COW_3,
124   O_COW_4,
125   O_COW_ENCLOSED_1,
126   O_COW_ENCLOSED_2,
127   O_COW_ENCLOSED_3,
128   O_COW_ENCLOSED_4,
129   O_COW_ENCLOSED_5,
130   O_COW_ENCLOSED_6,
131   O_COW_ENCLOSED_7,
132   O_WALLED_DIAMOND,
133   O_WALLED_KEY_1,
134   O_WALLED_KEY_2,
135   O_WALLED_KEY_3,
136
137   O_AMOEBA,
138   O_AMOEBA_2,
139   O_REPLICATOR,
140   O_CONVEYOR_LEFT,
141   O_CONVEYOR_RIGHT,
142   O_LAVA,
143   O_SWEET,
144   O_VOODOO,
145   O_SLIME,
146   O_BLADDER,
147   O_BLADDER_1,
148   O_BLADDER_2,
149   O_BLADDER_3,
150   O_BLADDER_4,
151   O_BLADDER_5,
152   O_BLADDER_6,
153   O_BLADDER_7,
154   O_BLADDER_8,
155
156   O_WAITING_STONE,
157   O_CHASING_STONE,
158   O_GHOST,
159   O_FIREFLY_1,
160   O_FIREFLY_2,
161   O_FIREFLY_3,
162   O_FIREFLY_4,
163   O_ALT_FIREFLY_1,
164   O_ALT_FIREFLY_2,
165   O_ALT_FIREFLY_3,
166   O_ALT_FIREFLY_4,
167   O_BUTTER_1,
168   O_BUTTER_2,
169   O_BUTTER_3,
170   O_BUTTER_4,
171   O_ALT_BUTTER_1,
172   O_ALT_BUTTER_2,
173   O_ALT_BUTTER_3,
174   O_ALT_BUTTER_4,
175   O_STONEFLY_1,
176   O_STONEFLY_2,
177   O_STONEFLY_3,
178   O_STONEFLY_4,
179   O_BITER_1,
180   O_BITER_2,
181   O_BITER_3,
182   O_BITER_4,
183   O_DRAGONFLY_1,
184   O_DRAGONFLY_2,
185   O_DRAGONFLY_3,
186   O_DRAGONFLY_4,
187
188   O_PRE_PL_1,
189   O_PRE_PL_2,
190   O_PRE_PL_3,
191   O_PLAYER,
192   O_PLAYER_BOMB,
193   O_PLAYER_GLUED,
194   O_PLAYER_STIRRING,
195
196   O_BOMB,
197   O_BOMB_TICK_1,
198   O_BOMB_TICK_2,
199   O_BOMB_TICK_3,
200   O_BOMB_TICK_4,
201   O_BOMB_TICK_5,
202   O_BOMB_TICK_6,
203   O_BOMB_TICK_7,
204
205   O_NITRO_PACK,
206   O_NITRO_PACK_F,
207   O_NITRO_PACK_EXPLODE,
208
209   O_PRE_CLOCK_1,
210   O_PRE_CLOCK_2,
211   O_PRE_CLOCK_3,
212   O_PRE_CLOCK_4,
213   O_PRE_DIA_1,
214   O_PRE_DIA_2,
215   O_PRE_DIA_3,
216   O_PRE_DIA_4,
217   O_PRE_DIA_5,
218   O_EXPLODE_1,
219   O_EXPLODE_2,
220   O_EXPLODE_3,
221   O_EXPLODE_4,
222   O_EXPLODE_5,
223   O_PRE_STONE_1,
224   O_PRE_STONE_2,
225   O_PRE_STONE_3,
226   O_PRE_STONE_4,
227   O_PRE_STEEL_1,
228   O_PRE_STEEL_2,
229   O_PRE_STEEL_3,
230   O_PRE_STEEL_4,
231   O_GHOST_EXPL_1,
232   O_GHOST_EXPL_2,
233   O_GHOST_EXPL_3,
234   O_GHOST_EXPL_4,
235   O_BOMB_EXPL_1,
236   O_BOMB_EXPL_2,
237   O_BOMB_EXPL_3,
238   O_BOMB_EXPL_4,
239   O_NITRO_EXPL_1,
240   O_NITRO_EXPL_2,
241   O_NITRO_EXPL_3,
242   O_NITRO_EXPL_4,
243   O_AMOEBA_2_EXPL_1,
244   O_AMOEBA_2_EXPL_2,
245   O_AMOEBA_2_EXPL_3,
246   O_AMOEBA_2_EXPL_4,
247   O_NUT_EXPL_1,
248   O_NUT_EXPL_2,
249   O_NUT_EXPL_3,
250   O_NUT_EXPL_4,
251
252   // these are used internally for the pneumatic hammer, and should not be used in the editor!
253   // (not even as an effect destination or something like that)
254   O_PLAYER_PNEUMATIC_LEFT,
255   O_PLAYER_PNEUMATIC_RIGHT,
256   O_PNEUMATIC_ACTIVE_LEFT,
257   O_PNEUMATIC_ACTIVE_RIGHT,
258
259   O_UNKNOWN,    // unknown element imported or read from bdcff
260   O_NONE,       // do not draw this element when creating cave; can be used,
261                 // for example, to skip drawing a maze's path
262
263   O_MAX,        // remembering last index: this should get an integer value
264                 // which is 1 more than the one above.
265
266   // fake elements to help drawing
267   O_FAKE_BONUS,
268   O_INBOX_CLOSED,
269   O_INBOX_OPEN,
270   O_OUTBOX_CLOSED,
271   O_OUTBOX_OPEN,
272   O_COVERED,
273   O_PLAYER_LEFT,
274   O_PLAYER_RIGHT,
275   O_PLAYER_TAP,
276   O_PLAYER_BLINK,
277   O_PLAYER_TAP_BLINK,
278   O_CREATURE_SWITCH_ON,
279   O_EXPANDING_WALL_SWITCH_HORIZ,
280   O_EXPANDING_WALL_SWITCH_VERT,
281   O_GRAVITY_SWITCH_ACTIVE,
282   O_REPLICATOR_SWITCH_ON,
283   O_REPLICATOR_SWITCH_OFF,
284   O_CONVEYOR_DIR_NORMAL,
285   O_CONVEYOR_DIR_CHANGED,
286   O_CONVEYOR_SWITCH_OFF,
287   O_CONVEYOR_SWITCH_ON,
288
289   O_MAGIC_WALL_ACTIVE,
290   O_REPLICATOR_ACTIVE,
291   O_CONVEYOR_LEFT_ACTIVE,
292   O_CONVEYOR_RIGHT_ACTIVE,
293   O_BITER_SWITCH_1,
294   O_BITER_SWITCH_2,
295   O_BITER_SWITCH_3,
296   O_BITER_SWITCH_4,
297
298   O_QUESTION_MARK,
299   O_EATABLE,
300   O_DOWN_ARROW,
301   O_LEFTRIGHT_ARROW,
302   O_EVERYDIR_ARROW,
303   O_GLUED,
304   O_OUT,
305   O_EXCLAMATION_MARK,
306
307   O_MAX_ALL,
308
309   SCANNED = 0x100,
310   COVERED = 0x200,
311   SKIPPED = 0x400,
312
313   // binary AND this to elements to get rid of properties above.
314   O_MASK = ~(SCANNED | COVERED | SKIPPED)
315 } GdElement;
316
317 typedef enum _sound
318 {
319   GD_S_NONE,
320
321   GD_S_STONE_PUSHING,
322   GD_S_STONE_FALLING,
323   GD_S_STONE_IMPACT,
324   GD_S_MEGA_STONE_PUSHING,
325   GD_S_MEGA_STONE_FALLING,
326   GD_S_MEGA_STONE_IMPACT,
327   GD_S_FLYING_STONE_PUSHING,
328   GD_S_FLYING_STONE_FALLING,
329   GD_S_FLYING_STONE_IMPACT,
330   GD_S_WAITING_STONE_PUSHING,
331   GD_S_CHASING_STONE_PUSHING,
332   GD_S_NUT_PUSHING,
333   GD_S_NUT_FALLING,
334   GD_S_NUT_IMPACT,
335   GD_S_NUT_CRACKING,
336   GD_S_DIRT_BALL_FALLING,
337   GD_S_DIRT_BALL_IMPACT,
338   GD_S_DIRT_LOOSE_FALLING,
339   GD_S_DIRT_LOOSE_IMPACT,
340   GD_S_NITRO_PACK_PUSHING,
341   GD_S_NITRO_PACK_FALLING,
342   GD_S_NITRO_PACK_IMPACT,
343   GD_S_FALLING_WALL_FALLING,
344   GD_S_FALLING_WALL_IMPACT,
345   GD_S_EXPANDING_WALL,
346   GD_S_WALL_REAPPEARING,
347   GD_S_DIAMOND_FALLING_RANDOM,          // randomly select a diamond falling sound
348   GD_S_DIAMOND_FALLING_1,
349   GD_S_DIAMOND_FALLING_2,
350   GD_S_DIAMOND_FALLING_3,
351   GD_S_DIAMOND_FALLING_4,
352   GD_S_DIAMOND_FALLING_5,
353   GD_S_DIAMOND_FALLING_6,
354   GD_S_DIAMOND_FALLING_7,
355   GD_S_DIAMOND_FALLING_8,
356   GD_S_DIAMOND_IMPACT_RANDOM,           // randomly select a diamond impact sound
357   GD_S_DIAMOND_IMPACT_1,
358   GD_S_DIAMOND_IMPACT_2,
359   GD_S_DIAMOND_IMPACT_3,
360   GD_S_DIAMOND_IMPACT_4,
361   GD_S_DIAMOND_IMPACT_5,
362   GD_S_DIAMOND_IMPACT_6,
363   GD_S_DIAMOND_IMPACT_7,
364   GD_S_DIAMOND_IMPACT_8,
365   GD_S_FLYING_DIAMOND_FALLING_RANDOM,   // randomly select a flying diamond falling sound
366   GD_S_FLYING_DIAMOND_FALLING_1,
367   GD_S_FLYING_DIAMOND_FALLING_2,
368   GD_S_FLYING_DIAMOND_FALLING_3,
369   GD_S_FLYING_DIAMOND_FALLING_4,
370   GD_S_FLYING_DIAMOND_FALLING_5,
371   GD_S_FLYING_DIAMOND_FALLING_6,
372   GD_S_FLYING_DIAMOND_FALLING_7,
373   GD_S_FLYING_DIAMOND_FALLING_8,
374   GD_S_FLYING_DIAMOND_IMPACT_RANDOM,    // randomly select a flying diamond impact sound
375   GD_S_FLYING_DIAMOND_IMPACT_1,
376   GD_S_FLYING_DIAMOND_IMPACT_2,
377   GD_S_FLYING_DIAMOND_IMPACT_3,
378   GD_S_FLYING_DIAMOND_IMPACT_4,
379   GD_S_FLYING_DIAMOND_IMPACT_5,
380   GD_S_FLYING_DIAMOND_IMPACT_6,
381   GD_S_FLYING_DIAMOND_IMPACT_7,
382   GD_S_FLYING_DIAMOND_IMPACT_8,
383   GD_S_DIAMOND_COLLECTING,
384   GD_S_FLYING_DIAMOND_COLLECTING,
385   GD_S_SKELETON_COLLECTING,
386   GD_S_PNEUMATIC_COLLECTING,
387   GD_S_BOMB_COLLECTING,
388   GD_S_CLOCK_COLLECTING,
389   GD_S_SWEET_COLLECTING,
390   GD_S_KEY_COLLECTING,
391   GD_S_DIAMOND_KEY_COLLECTING,
392   GD_S_SLIME,
393   GD_S_LAVA,
394   GD_S_REPLICATOR,
395   GD_S_ACID_SPREADING,
396   GD_S_BLADDER_MOVING,
397   GD_S_BLADDER_PUSHING,
398   GD_S_BLADDER_CONVERTING,
399   GD_S_BLADDER_SPENDER,
400   GD_S_BITER_EATING,
401
402   GD_S_DOOR_OPENING,
403   GD_S_DIRT_WALKING,
404   GD_S_EMPTY_WALKING,
405   GD_S_STIRRING,
406   GD_S_BOX_PUSHING,
407   GD_S_TELEPORTER,
408   GD_S_TIMEOUT_10,
409   GD_S_TIMEOUT_9,
410   GD_S_TIMEOUT_8,
411   GD_S_TIMEOUT_7,
412   GD_S_TIMEOUT_6,
413   GD_S_TIMEOUT_5,
414   GD_S_TIMEOUT_4,
415   GD_S_TIMEOUT_3,
416   GD_S_TIMEOUT_2,
417   GD_S_TIMEOUT_1,
418   GD_S_TIMEOUT_0,
419   GD_S_EXPLODING,
420   GD_S_BOMB_EXPLODING,
421   GD_S_GHOST_EXPLODING,
422   GD_S_VOODOO_EXPLODING,
423   GD_S_NITRO_PACK_EXPLODING,
424   GD_S_BOMB_PLACING,
425   GD_S_FINISHED,                // loop
426   GD_S_SWITCH_BITER,
427   GD_S_SWITCH_CREATURES,
428   GD_S_SWITCH_GRAVITY,
429   GD_S_SWITCH_EXPANDING,
430   GD_S_SWITCH_CONVEYOR,
431   GD_S_SWITCH_REPLICATOR,
432
433   GD_S_AMOEBA,                  // loop
434   GD_S_AMOEBA_MAGIC,            // loop
435   GD_S_MAGIC_WALL,              // loop
436   GD_S_COVERING,                // loop
437   GD_S_PNEUMATIC_HAMMER,        // loop
438   GD_S_WATER,                   // loop
439
440   GD_S_CRACKING,
441   GD_S_GRAVITY_CHANGING,
442   GD_S_BONUS_LIFE,
443
444   GD_S_MAX,
445 } GdSound;
446
447 #endif  // BD_ELEMENTS_H