1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
17 #include <sys/types.h>
23 #include "libgame/libgame.h"
24 #include "game_em/game_em.h"
25 #include "game_sp/game_sp.h"
26 #include "game_mm/game_mm.h"
28 #include "conf_gfx.h" /* include auto-generated data structure definitions */
29 #include "conf_snd.h" /* include auto-generated data structure definitions */
30 #include "conf_mus.h" /* include auto-generated data structure definitions */
33 #define IMG_UNDEFINED (-1)
34 #define IMG_EMPTY IMG_EMPTY_SPACE
35 #define IMG_SP_EMPTY IMG_EMPTY_SPACE
36 #define IMG_SP_EMPTY_SPACE IMG_EMPTY_SPACE
37 #define IMG_EXPLOSION IMG_DEFAULT_EXPLODING
38 #define IMG_CHAR_START IMG_CHAR_SPACE
39 #define IMG_STEEL_CHAR_START IMG_STEEL_CHAR_SPACE
40 #define IMG_CUSTOM_START IMG_CUSTOM_1
42 #define SND_UNDEFINED (-1)
43 #define MUS_UNDEFINED (-1)
45 #define WIN_XSIZE_DEFAULT 672
46 #define WIN_YSIZE_DEFAULT 560
48 #define SCR_FIELDX_DEFAULT 17
49 #define SCR_FIELDY_DEFAULT 17
51 #define SXSIZE_DEFAULT (SCR_FIELDX_DEFAULT * TILEX)
52 #define SYSIZE_DEFAULT (SCR_FIELDY_DEFAULT * TILEY)
54 #define MAX_BUF_XSIZE (SCR_FIELDX + 2)
55 #define MAX_BUF_YSIZE (SCR_FIELDY + 2)
56 #define MIN_LEV_FIELDX 3
57 #define MIN_LEV_FIELDY 3
58 #define STD_LEV_FIELDX 64
59 #define STD_LEV_FIELDY 32
60 #define MAX_LEV_FIELDX MAX_PLAYFIELD_WIDTH
61 #define MAX_LEV_FIELDY MAX_PLAYFIELD_HEIGHT
63 #define MIN_SCROLL_DELAY 0
64 #define STD_SCROLL_DELAY 3
65 #define MAX_SCROLL_DELAY 8
67 #define SCREENX(a) ((a) - scroll_x)
68 #define SCREENY(a) ((a) - scroll_y)
69 #define LEVELX(a) ((a) + scroll_x)
70 #define LEVELY(a) ((a) + scroll_y)
72 #define IN_FIELD(x, y, xsize, ysize) ((x) >= 0 && (x) < (xsize) && \
73 (y) >= 0 && (y) < (ysize))
74 #define IN_FIELD_MINMAX(x, y, xmin, ymin, xmax, ymax) \
75 ((x) >= (xmin) && (x) <= (xmax) && \
76 (y) >= (ymin) && (y) <= (ymax))
78 #define IN_VIS_FIELD(x, y) IN_FIELD(x, y, SCR_FIELDX, SCR_FIELDY)
79 #define IN_LEV_FIELD(x, y) IN_FIELD(x, y, lev_fieldx, lev_fieldy)
80 #define IN_SCR_FIELD(x, y) IN_FIELD_MINMAX(x,y, BX1,BY1, BX2,BY2)
82 /* values for configurable properties (custom elem's only, else pre-defined) */
83 /* (never change these values, as they are stored in level files!) */
85 #define EP_COLLECTIBLE_ONLY 1
86 #define EP_DONT_RUN_INTO 2
87 #define EP_DONT_COLLIDE_WITH 3
88 #define EP_DONT_TOUCH 4
89 #define EP_INDESTRUCTIBLE 5
91 #define EP_CAN_CHANGE 7
94 #define EP_CAN_SMASH_PLAYER 10
95 #define EP_CAN_SMASH_ENEMIES 11
96 #define EP_CAN_SMASH_EVERYTHING 12
97 #define EP_EXPLODES_BY_FIRE 13
98 #define EP_EXPLODES_SMASHED 14
99 #define EP_EXPLODES_IMPACT 15
100 #define EP_WALKABLE_OVER 16
101 #define EP_WALKABLE_INSIDE 17
102 #define EP_WALKABLE_UNDER 18
103 #define EP_PASSABLE_OVER 19
104 #define EP_PASSABLE_INSIDE 20
105 #define EP_PASSABLE_UNDER 21
106 #define EP_DROPPABLE 22
107 #define EP_EXPLODES_1X1_OLD 23
108 #define EP_PUSHABLE 24
109 #define EP_EXPLODES_CROSS_OLD 25
110 #define EP_PROTECTED 26
111 #define EP_CAN_MOVE_INTO_ACID 27
112 #define EP_THROWABLE 28
113 #define EP_CAN_EXPLODE 29
114 #define EP_GRAVITY_REACHABLE 30
115 #define EP_DONT_GET_HIT_BY 31
117 /* values for pre-defined properties */
118 /* (from here on, values can be changed by inserting new values) */
120 #define EP_CAN_PASS_MAGIC_WALL 33
121 #define EP_CAN_PASS_DC_MAGIC_WALL 34
122 #define EP_SWITCHABLE 35
123 #define EP_BD_ELEMENT 36
124 #define EP_SP_ELEMENT 37
125 #define EP_SB_ELEMENT 38
127 #define EP_FOOD_DARK_YAMYAM 40
128 #define EP_FOOD_PENGUIN 41
129 #define EP_FOOD_PIG 42
130 #define EP_HISTORIC_WALL 43
131 #define EP_HISTORIC_SOLID 44
132 #define EP_CLASSIC_ENEMY 45
134 #define EP_BELT_ACTIVE 47
135 #define EP_BELT_SWITCH 48
137 #define EP_ACID_POOL 50
138 #define EP_KEYGATE 51
139 #define EP_AMOEBOID 52
140 #define EP_AMOEBALIVE 53
141 #define EP_HAS_EDITOR_CONTENT 54
142 #define EP_CAN_TURN_EACH_MOVE 55
143 #define EP_CAN_GROW 56
144 #define EP_ACTIVE_BOMB 57
145 #define EP_INACTIVE 58
147 /* values for special configurable properties (depending on level settings) */
148 #define EP_EM_SLIPPERY_WALL 59
150 /* values for special graphics properties (no effect on game engine) */
151 #define EP_GFX_CRUMBLED 60
153 /* values for derived properties (determined from properties above) */
154 #define EP_ACCESSIBLE_OVER 61
155 #define EP_ACCESSIBLE_INSIDE 62
156 #define EP_ACCESSIBLE_UNDER 63
157 #define EP_WALKABLE 64
158 #define EP_PASSABLE 65
159 #define EP_ACCESSIBLE 66
160 #define EP_COLLECTIBLE 67
161 #define EP_SNAPPABLE 68
163 #define EP_SOLID_FOR_PUSHING 70
164 #define EP_DRAGONFIRE_PROOF 71
165 #define EP_EXPLOSION_PROOF 72
166 #define EP_CAN_SMASH 73
167 #define EP_EXPLODES_3X3_OLD 74
168 #define EP_CAN_EXPLODE_BY_FIRE 75
169 #define EP_CAN_EXPLODE_SMASHED 76
170 #define EP_CAN_EXPLODE_IMPACT 77
171 #define EP_SP_PORT 78
172 #define EP_CAN_EXPLODE_BY_DRAGONFIRE 79
173 #define EP_CAN_EXPLODE_BY_EXPLOSION 80
174 #define EP_COULD_MOVE_INTO_ACID 81
175 #define EP_MAYBE_DONT_COLLIDE_WITH 82
176 #define EP_CAN_BE_CLONED_BY_ANDROID 83
178 /* values for internal purpose only (level editor) */
179 #define EP_WALK_TO_OBJECT 84
181 #define EP_EDITOR_CASCADE 86
182 #define EP_EDITOR_CASCADE_ACTIVE 87
183 #define EP_EDITOR_CASCADE_INACTIVE 88
185 /* values for internal purpose only (game engine) */
186 #define EP_HAS_ACTION 89
187 #define EP_CAN_CHANGE_OR_HAS_ACTION 90
189 /* values for internal purpose only (other) */
190 #define EP_OBSOLETE 91
192 #define NUM_ELEMENT_PROPERTIES 92
194 #define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32)
195 #define EP_BITFIELD_BASE_NR 0
197 #define EP_BITMASK_BASE_DEFAULT (1 << EP_CAN_MOVE_INTO_ACID)
198 #define EP_BITMASK_DEFAULT 0
200 #define PROPERTY_BIT(p) (1 << ((p) % 32))
201 #define PROPERTY_VAR(e,p) (element_info[e].properties[(p) / 32])
202 #define HAS_PROPERTY(e,p) ((PROPERTY_VAR(e, p) & PROPERTY_BIT(p)) != 0)
203 #define SET_PROPERTY(e,p,v) ((v) ? \
204 (PROPERTY_VAR(e,p) |= PROPERTY_BIT(p)) : \
205 (PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p)))
208 /* values for change events for custom elements (stored in level file) */
210 #define CE_TOUCHED_BY_PLAYER 1
211 #define CE_PRESSED_BY_PLAYER 2
212 #define CE_PUSHED_BY_PLAYER 3
213 #define CE_DROPPED_BY_PLAYER 4
214 #define CE_HITTING_SOMETHING 5
217 #define CE_TOUCHING_X 8
218 #define CE_CHANGE_OF_X 9
219 #define CE_EXPLOSION_OF_X 10
220 #define CE_PLAYER_TOUCHES_X 11
221 #define CE_PLAYER_PRESSES_X 12
222 #define CE_PLAYER_PUSHES_X 13
223 #define CE_PLAYER_COLLECTS_X 14
224 #define CE_PLAYER_DROPS_X 15
225 #define CE_VALUE_GETS_ZERO 16
226 #define CE_VALUE_GETS_ZERO_OF_X 17
227 #define CE_BY_OTHER_ACTION 18
228 #define CE_BY_DIRECT_ACTION 19
229 #define CE_PLAYER_DIGS_X 20
230 #define CE_ENTERED_BY_PLAYER 21
231 #define CE_LEFT_BY_PLAYER 22
232 #define CE_PLAYER_ENTERS_X 23
233 #define CE_PLAYER_LEAVES_X 24
234 #define CE_SWITCHED 25
235 #define CE_SWITCH_OF_X 26
236 #define CE_HIT_BY_SOMETHING 27
237 #define CE_HITTING_X 28
238 #define CE_HIT_BY_X 29
239 #define CE_BLOCKED 30
240 #define CE_SWITCHED_BY_PLAYER 31
241 #define CE_PLAYER_SWITCHES_X 32
242 #define CE_SNAPPED_BY_PLAYER 33
243 #define CE_PLAYER_SNAPS_X 34
244 #define CE_MOVE_OF_X 35
245 #define CE_DIGGING_X 36
246 #define CE_CREATION_OF_X 37
247 #define CE_SCORE_GETS_ZERO 38
248 #define CE_SCORE_GETS_ZERO_OF_X 39
249 #define CE_VALUE_CHANGES 40
250 #define CE_VALUE_CHANGES_OF_X 41
251 #define CE_SCORE_CHANGES 42
252 #define CE_SCORE_CHANGES_OF_X 43
254 #define NUM_CHANGE_EVENTS 44
256 #define NUM_CE_BITFIELDS ((NUM_CHANGE_EVENTS + 31) / 32)
258 #define CE_BITMASK_DEFAULT 0
260 #define CH_EVENT_BITFIELD_NR(e) (e / 32)
261 #define CH_EVENT_BIT(e) (1 << ((e) % 32))
263 #define CH_EVENT_VAR(e,c) (element_info[e].change->has_event[c])
264 #define CH_ANY_EVENT_VAR(e,c) (element_info[e].has_change_event[c])
266 #define PAGE_HAS_CHANGE_EVENT(p,c) ((p)->has_event[c])
267 #define HAS_CHANGE_EVENT(e,c) (IS_CUSTOM_ELEMENT(e) && \
269 #define HAS_ANY_CHANGE_EVENT(e,c) (IS_CUSTOM_ELEMENT(e) && \
270 CH_ANY_EVENT_VAR(e,c))
272 #define SET_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ? \
273 CH_EVENT_VAR(e,c) = (v) : 0)
274 #define SET_ANY_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ? \
275 CH_ANY_EVENT_VAR(e,c) = (v) : 0)
277 /* values for player bitmasks */
278 #define PLAYER_BITS_NONE 0
279 #define PLAYER_BITS_1 (1 << 0)
280 #define PLAYER_BITS_2 (1 << 1)
281 #define PLAYER_BITS_3 (1 << 2)
282 #define PLAYER_BITS_4 (1 << 3)
283 #define PLAYER_BITS_ANY (PLAYER_BITS_1 | \
287 #define PLAYER_BITS_TRIGGER (1 << 4)
288 #define PLAYER_BITS_ACTION (1 << 5)
290 /* values for move directions (bits 0 - 3: basic move directions) */
291 #define MV_BIT_PREVIOUS 4
292 #define MV_BIT_TRIGGER 5
293 #define MV_BIT_TRIGGER_BACK 6
294 #define MV_BIT_NORMAL MV_BIT_TRIGGER
295 #define MV_BIT_REVERSE MV_BIT_TRIGGER_BACK
297 #define MV_PREVIOUS (1 << MV_BIT_PREVIOUS)
298 #define MV_TRIGGER (1 << MV_BIT_TRIGGER)
299 #define MV_TRIGGER_BACK (1 << MV_BIT_TRIGGER_BACK)
300 #define MV_NORMAL (1 << MV_BIT_NORMAL)
301 #define MV_REVERSE (1 << MV_BIT_REVERSE)
303 /* values for move stepsize */
304 #define STEPSIZE_NOT_MOVING 0
305 #define STEPSIZE_VERY_SLOW 1
306 #define STEPSIZE_SLOW 2
307 #define STEPSIZE_NORMAL 4
308 #define STEPSIZE_FAST 8
309 #define STEPSIZE_VERY_FAST 16
310 #define STEPSIZE_EVEN_FASTER 32
311 #define STEPSIZE_SLOWER 50 /* (symbolic value only) */
312 #define STEPSIZE_FASTER 200 /* (symbolic value only) */
313 #define STEPSIZE_RESET 100 /* (symbolic value only) */
315 /* values for change side for custom elements */
316 #define CH_SIDE_NONE MV_NONE
317 #define CH_SIDE_LEFT MV_LEFT
318 #define CH_SIDE_RIGHT MV_RIGHT
319 #define CH_SIDE_TOP MV_UP
320 #define CH_SIDE_BOTTOM MV_DOWN
321 #define CH_SIDE_LEFT_RIGHT MV_HORIZONTAL
322 #define CH_SIDE_TOP_BOTTOM MV_VERTICAL
323 #define CH_SIDE_ANY MV_ANY_DIRECTION
325 /* values for change player for custom elements */
326 #define CH_PLAYER_NONE PLAYER_BITS_NONE
327 #define CH_PLAYER_1 PLAYER_BITS_1
328 #define CH_PLAYER_2 PLAYER_BITS_2
329 #define CH_PLAYER_3 PLAYER_BITS_3
330 #define CH_PLAYER_4 PLAYER_BITS_4
331 #define CH_PLAYER_ANY PLAYER_BITS_ANY
333 /* values for change page for custom elements */
334 #define CH_PAGE_ANY_FILE (0xff)
335 #define CH_PAGE_ANY (0xffffffff)
337 /* values for change power for custom elements */
338 #define CP_WHEN_EMPTY 0
339 #define CP_WHEN_DIGGABLE 1
340 #define CP_WHEN_DESTRUCTIBLE 2
341 #define CP_WHEN_COLLECTIBLE 3
342 #define CP_WHEN_REMOVABLE 4
343 #define CP_WHEN_WALKABLE 5
345 /* values for change actions for custom elements (stored in level file) */
346 #define CA_NO_ACTION 0
347 #define CA_EXIT_PLAYER 1
348 #define CA_KILL_PLAYER 2
349 #define CA_MOVE_PLAYER 3
350 #define CA_RESTART_LEVEL 4
351 #define CA_SHOW_ENVELOPE 5
352 #define CA_SET_LEVEL_TIME 6
353 #define CA_SET_LEVEL_GEMS 7
354 #define CA_SET_LEVEL_SCORE 8
355 #define CA_SET_LEVEL_WIND 9
356 #define CA_SET_PLAYER_GRAVITY 10
357 #define CA_SET_PLAYER_KEYS 11
358 #define CA_SET_PLAYER_SPEED 12
359 #define CA_SET_PLAYER_SHIELD 13
360 #define CA_SET_PLAYER_ARTWORK 14
361 #define CA_SET_CE_SCORE 15
362 #define CA_SET_CE_VALUE 16
363 #define CA_SET_ENGINE_SCAN_MODE 17
364 #define CA_SET_PLAYER_INVENTORY 18
365 #define CA_SET_CE_ARTWORK 19
366 #define CA_SET_LEVEL_RANDOM_SEED 20
368 #define CA_HEADLINE_LEVEL_ACTIONS 250
369 #define CA_HEADLINE_PLAYER_ACTIONS 251
370 #define CA_HEADLINE_CE_ACTIONS 252
371 #define CA_HEADLINE_ENGINE_ACTIONS 253
372 #define CA_UNDEFINED 255
374 /* values for change action mode for custom elements */
375 #define CA_MODE_UNDEFINED 0
376 #define CA_MODE_SET 1
377 #define CA_MODE_ADD 2
378 #define CA_MODE_SUBTRACT 3
379 #define CA_MODE_MULTIPLY 4
380 #define CA_MODE_DIVIDE 5
381 #define CA_MODE_MODULO 6
383 /* values for change action parameters for custom elements */
396 #define CA_ARG_100 100
397 #define CA_ARG_1000 1000
398 #define CA_ARG_MAX 9999
399 #define CA_ARG_PLAYER 10000
400 #define CA_ARG_PLAYER_1 (CA_ARG_PLAYER + PLAYER_BITS_1)
401 #define CA_ARG_PLAYER_2 (CA_ARG_PLAYER + PLAYER_BITS_2)
402 #define CA_ARG_PLAYER_3 (CA_ARG_PLAYER + PLAYER_BITS_3)
403 #define CA_ARG_PLAYER_4 (CA_ARG_PLAYER + PLAYER_BITS_4)
404 #define CA_ARG_PLAYER_ANY (CA_ARG_PLAYER + PLAYER_BITS_ANY)
405 #define CA_ARG_PLAYER_TRIGGER (CA_ARG_PLAYER + PLAYER_BITS_TRIGGER)
406 #define CA_ARG_PLAYER_ACTION (CA_ARG_PLAYER + PLAYER_BITS_ACTION)
407 #define CA_ARG_PLAYER_HEADLINE (CA_ARG_PLAYER + 999)
408 #define CA_ARG_NUMBER 11000
409 #define CA_ARG_NUMBER_MIN (CA_ARG_NUMBER + 0)
410 #define CA_ARG_NUMBER_MAX (CA_ARG_NUMBER + 1)
411 #define CA_ARG_NUMBER_RESET (CA_ARG_NUMBER + 2)
412 #define CA_ARG_NUMBER_CE_SCORE (CA_ARG_NUMBER + 3)
413 #define CA_ARG_NUMBER_CE_VALUE (CA_ARG_NUMBER + 4)
414 #define CA_ARG_NUMBER_CE_DELAY (CA_ARG_NUMBER + 5)
415 #define CA_ARG_NUMBER_LEVEL_TIME (CA_ARG_NUMBER + 6)
416 #define CA_ARG_NUMBER_LEVEL_GEMS (CA_ARG_NUMBER + 7)
417 #define CA_ARG_NUMBER_LEVEL_SCORE (CA_ARG_NUMBER + 8)
418 #define CA_ARG_NUMBER_HEADLINE (CA_ARG_NUMBER + 999)
419 #define CA_ARG_ELEMENT 12000
420 #define CA_ARG_ELEMENT_RESET (CA_ARG_ELEMENT + 0)
421 #define CA_ARG_ELEMENT_TARGET (CA_ARG_ELEMENT + 1)
422 #define CA_ARG_ELEMENT_TRIGGER (CA_ARG_ELEMENT + 2)
423 #define CA_ARG_ELEMENT_ACTION (CA_ARG_ELEMENT + 7)
424 #define CA_ARG_ELEMENT_HEADLINE (CA_ARG_ELEMENT + 997)
425 #define CA_ARG_ELEMENT_CV_TARGET (CA_ARG_ELEMENT_TARGET)
426 #define CA_ARG_ELEMENT_CV_TRIGGER (CA_ARG_ELEMENT_TRIGGER)
427 #define CA_ARG_ELEMENT_CV_ACTION (CA_ARG_ELEMENT_ACTION)
428 #define CA_ARG_ELEMENT_CV_HEADLINE (CA_ARG_ELEMENT_HEADLINE)
429 #define CA_ARG_ELEMENT_NR_TARGET (CA_ARG_ELEMENT + 3)
430 #define CA_ARG_ELEMENT_NR_TRIGGER (CA_ARG_ELEMENT + 4)
431 #define CA_ARG_ELEMENT_NR_ACTION (CA_ARG_ELEMENT + 8)
432 #define CA_ARG_ELEMENT_NR_HEADLINE (CA_ARG_ELEMENT + 998)
433 #define CA_ARG_ELEMENT_CS_TARGET (CA_ARG_ELEMENT + 5)
434 #define CA_ARG_ELEMENT_CS_TRIGGER (CA_ARG_ELEMENT + 6)
435 #define CA_ARG_ELEMENT_CS_ACTION (CA_ARG_ELEMENT + 9)
436 #define CA_ARG_ELEMENT_CS_HEADLINE (CA_ARG_ELEMENT + 999)
437 #define CA_ARG_SPEED 13000
438 #define CA_ARG_SPEED_NOT_MOVING (CA_ARG_SPEED + STEPSIZE_NOT_MOVING)
439 #define CA_ARG_SPEED_VERY_SLOW (CA_ARG_SPEED + STEPSIZE_VERY_SLOW)
440 #define CA_ARG_SPEED_SLOW (CA_ARG_SPEED + STEPSIZE_SLOW)
441 #define CA_ARG_SPEED_NORMAL (CA_ARG_SPEED + STEPSIZE_NORMAL)
442 #define CA_ARG_SPEED_FAST (CA_ARG_SPEED + STEPSIZE_FAST)
443 #define CA_ARG_SPEED_VERY_FAST (CA_ARG_SPEED + STEPSIZE_VERY_FAST)
444 #define CA_ARG_SPEED_EVEN_FASTER (CA_ARG_SPEED + STEPSIZE_EVEN_FASTER)
445 #define CA_ARG_SPEED_SLOWER (CA_ARG_SPEED + STEPSIZE_SLOWER)
446 #define CA_ARG_SPEED_FASTER (CA_ARG_SPEED + STEPSIZE_FASTER)
447 #define CA_ARG_SPEED_RESET (CA_ARG_SPEED + STEPSIZE_RESET)
448 #define CA_ARG_SPEED_HEADLINE (CA_ARG_SPEED + 999)
449 #define CA_ARG_GRAVITY 14000
450 #define CA_ARG_GRAVITY_OFF (CA_ARG_GRAVITY + 0)
451 #define CA_ARG_GRAVITY_ON (CA_ARG_GRAVITY + 1)
452 #define CA_ARG_GRAVITY_TOGGLE (CA_ARG_GRAVITY + 2)
453 #define CA_ARG_GRAVITY_HEADLINE (CA_ARG_GRAVITY + 999)
454 #define CA_ARG_DIRECTION 15000
455 #define CA_ARG_DIRECTION_NONE (CA_ARG_DIRECTION + MV_NONE)
456 #define CA_ARG_DIRECTION_LEFT (CA_ARG_DIRECTION + MV_LEFT)
457 #define CA_ARG_DIRECTION_RIGHT (CA_ARG_DIRECTION + MV_RIGHT)
458 #define CA_ARG_DIRECTION_UP (CA_ARG_DIRECTION + MV_UP)
459 #define CA_ARG_DIRECTION_DOWN (CA_ARG_DIRECTION + MV_DOWN)
460 #define CA_ARG_DIRECTION_TRIGGER (CA_ARG_DIRECTION + MV_TRIGGER)
461 #define CA_ARG_DIRECTION_TRIGGER_BACK (CA_ARG_DIRECTION + MV_TRIGGER_BACK)
462 #define CA_ARG_DIRECTION_HEADLINE (CA_ARG_DIRECTION + 999)
463 #define CA_ARG_SHIELD 16000
464 #define CA_ARG_SHIELD_OFF (CA_ARG_SHIELD + 0)
465 #define CA_ARG_SHIELD_NORMAL (CA_ARG_SHIELD + 1)
466 #define CA_ARG_SHIELD_DEADLY (CA_ARG_SHIELD + 2)
467 #define CA_ARG_SHIELD_HEADLINE (CA_ARG_SHIELD + 999)
468 #define CA_ARG_SCAN_MODE 17000
469 #define CA_ARG_SCAN_MODE_NORMAL (CA_ARG_SCAN_MODE + MV_NORMAL)
470 #define CA_ARG_SCAN_MODE_REVERSE (CA_ARG_SCAN_MODE + MV_REVERSE)
471 #define CA_ARG_SCAN_MODE_HEADLINE (CA_ARG_SCAN_MODE + 999)
472 #define CA_ARG_INVENTORY 18000
473 #define CA_ARG_INVENTORY_RESET (CA_ARG_INVENTORY + 0)
474 #define CA_ARG_INVENTORY_RM_TARGET (CA_ARG_INVENTORY + 1)
475 #define CA_ARG_INVENTORY_RM_TRIGGER (CA_ARG_INVENTORY + 2)
476 #define CA_ARG_INVENTORY_RM_ACTION (CA_ARG_INVENTORY + 3)
477 #define CA_ARG_INVENTORY_RM_FIRST (CA_ARG_INVENTORY + 4)
478 #define CA_ARG_INVENTORY_RM_LAST (CA_ARG_INVENTORY + 5)
479 #define CA_ARG_INVENTORY_RM_ALL (CA_ARG_INVENTORY + 6)
480 #define CA_ARG_INVENTORY_HEADLINE (CA_ARG_INVENTORY + 998)
481 #define CA_ARG_INVENTORY_RM_HEADLINE (CA_ARG_INVENTORY + 999)
482 #define CA_ARG_UNDEFINED 65535
484 /* values for custom move patterns (bits 0 - 3: basic move directions) */
485 #define MV_BIT_TOWARDS_PLAYER 4
486 #define MV_BIT_AWAY_FROM_PLAYER 5
487 #define MV_BIT_ALONG_LEFT_SIDE 6
488 #define MV_BIT_ALONG_RIGHT_SIDE 7
489 #define MV_BIT_TURNING_LEFT 8
490 #define MV_BIT_TURNING_RIGHT 9
491 #define MV_BIT_WHEN_PUSHED 10
492 #define MV_BIT_MAZE_RUNNER 11
493 #define MV_BIT_MAZE_HUNTER 12
494 #define MV_BIT_WHEN_DROPPED 13
495 #define MV_BIT_TURNING_LEFT_RIGHT 14
496 #define MV_BIT_TURNING_RIGHT_LEFT 15
497 #define MV_BIT_TURNING_RANDOM 16
498 #define MV_BIT_WIND_DIRECTION 17
500 /* values for custom move patterns */
501 #define MV_TOWARDS_PLAYER (1 << MV_BIT_TOWARDS_PLAYER)
502 #define MV_AWAY_FROM_PLAYER (1 << MV_BIT_AWAY_FROM_PLAYER)
503 #define MV_ALONG_LEFT_SIDE (1 << MV_BIT_ALONG_LEFT_SIDE)
504 #define MV_ALONG_RIGHT_SIDE (1 << MV_BIT_ALONG_RIGHT_SIDE)
505 #define MV_TURNING_LEFT (1 << MV_BIT_TURNING_LEFT)
506 #define MV_TURNING_RIGHT (1 << MV_BIT_TURNING_RIGHT)
507 #define MV_WHEN_PUSHED (1 << MV_BIT_WHEN_PUSHED)
508 #define MV_MAZE_RUNNER (1 << MV_BIT_MAZE_RUNNER)
509 #define MV_MAZE_HUNTER (1 << MV_BIT_MAZE_HUNTER)
510 #define MV_MAZE_RUNNER_STYLE (MV_MAZE_RUNNER | MV_MAZE_HUNTER)
511 #define MV_WHEN_DROPPED (1 << MV_BIT_WHEN_DROPPED)
512 #define MV_TURNING_LEFT_RIGHT (1 << MV_BIT_TURNING_LEFT_RIGHT)
513 #define MV_TURNING_RIGHT_LEFT (1 << MV_BIT_TURNING_RIGHT_LEFT)
514 #define MV_TURNING_RANDOM (1 << MV_BIT_TURNING_RANDOM)
515 #define MV_WIND_DIRECTION (1 << MV_BIT_WIND_DIRECTION)
517 /* values for initial move direction */
518 #define MV_START_NONE (MV_NONE)
519 #define MV_START_AUTOMATIC (MV_NONE)
520 #define MV_START_LEFT (MV_LEFT)
521 #define MV_START_RIGHT (MV_RIGHT)
522 #define MV_START_UP (MV_UP)
523 #define MV_START_DOWN (MV_DOWN)
524 #define MV_START_RANDOM (MV_ALL_DIRECTIONS)
525 #define MV_START_PREVIOUS (MV_PREVIOUS)
527 /* values for elements left behind by custom elements */
528 #define LEAVE_TYPE_UNLIMITED 0
529 #define LEAVE_TYPE_LIMITED 1
531 /* values for slippery property for custom elements */
532 #define SLIPPERY_ANY_RANDOM 0
533 #define SLIPPERY_ANY_LEFT_RIGHT 1
534 #define SLIPPERY_ANY_RIGHT_LEFT 2
535 #define SLIPPERY_ONLY_LEFT 3
536 #define SLIPPERY_ONLY_RIGHT 4
538 /* values for explosion type for custom elements */
539 #define EXPLODES_3X3 0
540 #define EXPLODES_1X1 1
541 #define EXPLODES_CROSS 2
543 /* macros for configurable properties */
544 #define IS_DIGGABLE(e) HAS_PROPERTY(e, EP_DIGGABLE)
545 #define IS_COLLECTIBLE_ONLY(e) HAS_PROPERTY(e, EP_COLLECTIBLE_ONLY)
546 #define DONT_RUN_INTO(e) HAS_PROPERTY(e, EP_DONT_RUN_INTO)
547 #define DONT_COLLIDE_WITH(e) HAS_PROPERTY(e, EP_DONT_COLLIDE_WITH)
548 #define DONT_TOUCH(e) HAS_PROPERTY(e, EP_DONT_TOUCH)
549 #define IS_INDESTRUCTIBLE(e) HAS_PROPERTY(e, EP_INDESTRUCTIBLE)
550 #define IS_SLIPPERY(e) HAS_PROPERTY(e, EP_SLIPPERY)
551 #define CAN_CHANGE(e) HAS_PROPERTY(e, EP_CAN_CHANGE)
552 #define CAN_MOVE(e) HAS_PROPERTY(e, EP_CAN_MOVE)
553 #define CAN_FALL(e) HAS_PROPERTY(e, EP_CAN_FALL)
554 #define CAN_SMASH_PLAYER(e) HAS_PROPERTY(e, EP_CAN_SMASH_PLAYER)
555 #define CAN_SMASH_ENEMIES(e) HAS_PROPERTY(e, EP_CAN_SMASH_ENEMIES)
556 #define CAN_SMASH_EVERYTHING(e) HAS_PROPERTY(e, EP_CAN_SMASH_EVERYTHING)
557 #define EXPLODES_BY_FIRE(e) HAS_PROPERTY(e, EP_EXPLODES_BY_FIRE)
558 #define EXPLODES_SMASHED(e) HAS_PROPERTY(e, EP_EXPLODES_SMASHED)
559 #define EXPLODES_IMPACT(e) HAS_PROPERTY(e, EP_EXPLODES_IMPACT)
560 #define IS_WALKABLE_OVER(e) HAS_PROPERTY(e, EP_WALKABLE_OVER)
561 #define IS_WALKABLE_INSIDE(e) HAS_PROPERTY(e, EP_WALKABLE_INSIDE)
562 #define IS_WALKABLE_UNDER(e) HAS_PROPERTY(e, EP_WALKABLE_UNDER)
563 #define IS_PASSABLE_OVER(e) HAS_PROPERTY(e, EP_PASSABLE_OVER)
564 #define IS_PASSABLE_INSIDE(e) HAS_PROPERTY(e, EP_PASSABLE_INSIDE)
565 #define IS_PASSABLE_UNDER(e) HAS_PROPERTY(e, EP_PASSABLE_UNDER)
566 #define IS_DROPPABLE(e) HAS_PROPERTY(e, EP_DROPPABLE)
567 #define EXPLODES_1X1_OLD(e) HAS_PROPERTY(e, EP_EXPLODES_1X1_OLD)
568 #define IS_PUSHABLE(e) HAS_PROPERTY(e, EP_PUSHABLE)
569 #define EXPLODES_CROSS_OLD(e) HAS_PROPERTY(e, EP_EXPLODES_CROSS_OLD)
570 #define IS_PROTECTED(e) HAS_PROPERTY(e, EP_PROTECTED)
571 #define CAN_MOVE_INTO_ACID(e) HAS_PROPERTY(e, EP_CAN_MOVE_INTO_ACID)
572 #define IS_THROWABLE(e) HAS_PROPERTY(e, EP_THROWABLE)
573 #define CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE)
574 #define IS_GRAVITY_REACHABLE(e) HAS_PROPERTY(e, EP_GRAVITY_REACHABLE)
575 #define DONT_GET_HIT_BY(e) HAS_PROPERTY(e, EP_DONT_GET_HIT_BY)
577 /* macros for special configurable properties */
578 #define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
580 /* macros for special graphics properties */
581 #define GFX_CRUMBLED(e) HAS_PROPERTY(GFX_ELEMENT(e), EP_GFX_CRUMBLED)
583 /* macros for pre-defined properties */
584 #define ELEM_IS_PLAYER(e) HAS_PROPERTY(e, EP_PLAYER)
585 #define CAN_PASS_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_MAGIC_WALL)
586 #define CAN_PASS_DC_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_DC_MAGIC_WALL)
587 #define IS_SWITCHABLE(e) HAS_PROPERTY(e, EP_SWITCHABLE)
588 #define IS_BD_ELEMENT(e) HAS_PROPERTY(e, EP_BD_ELEMENT)
589 #define IS_SP_ELEMENT(e) HAS_PROPERTY(e, EP_SP_ELEMENT)
590 #define IS_SB_ELEMENT(e) HAS_PROPERTY(e, EP_SB_ELEMENT)
591 #define IS_GEM(e) HAS_PROPERTY(e, EP_GEM)
592 #define IS_FOOD_DARK_YAMYAM(e) HAS_PROPERTY(e, EP_FOOD_DARK_YAMYAM)
593 #define IS_FOOD_PENGUIN(e) HAS_PROPERTY(e, EP_FOOD_PENGUIN)
594 #define IS_FOOD_PIG(e) HAS_PROPERTY(e, EP_FOOD_PIG)
595 #define IS_HISTORIC_WALL(e) HAS_PROPERTY(e, EP_HISTORIC_WALL)
596 #define IS_HISTORIC_SOLID(e) HAS_PROPERTY(e, EP_HISTORIC_SOLID)
597 #define IS_CLASSIC_ENEMY(e) HAS_PROPERTY(e, EP_CLASSIC_ENEMY)
598 #define IS_BELT(e) HAS_PROPERTY(e, EP_BELT)
599 #define IS_BELT_ACTIVE(e) HAS_PROPERTY(e, EP_BELT_ACTIVE)
600 #define IS_BELT_SWITCH(e) HAS_PROPERTY(e, EP_BELT_SWITCH)
601 #define IS_TUBE(e) HAS_PROPERTY(e, EP_TUBE)
602 #define IS_ACID_POOL(e) HAS_PROPERTY(e, EP_ACID_POOL)
603 #define IS_KEYGATE(e) HAS_PROPERTY(e, EP_KEYGATE)
604 #define IS_AMOEBOID(e) HAS_PROPERTY(e, EP_AMOEBOID)
605 #define IS_AMOEBALIVE(e) HAS_PROPERTY(e, EP_AMOEBALIVE)
606 #define HAS_EDITOR_CONTENT(e) HAS_PROPERTY(e, EP_HAS_EDITOR_CONTENT)
607 #define CAN_TURN_EACH_MOVE(e) HAS_PROPERTY(e, EP_CAN_TURN_EACH_MOVE)
608 #define CAN_GROW(e) HAS_PROPERTY(e, EP_CAN_GROW)
609 #define IS_ACTIVE_BOMB(e) HAS_PROPERTY(e, EP_ACTIVE_BOMB)
610 #define IS_INACTIVE(e) HAS_PROPERTY(e, EP_INACTIVE)
612 /* macros for derived properties */
613 #define IS_ACCESSIBLE_OVER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_OVER)
614 #define IS_ACCESSIBLE_INSIDE(e) HAS_PROPERTY(e, EP_ACCESSIBLE_INSIDE)
615 #define IS_ACCESSIBLE_UNDER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_UNDER)
616 #define IS_WALKABLE(e) HAS_PROPERTY(e, EP_WALKABLE)
617 #define IS_PASSABLE(e) HAS_PROPERTY(e, EP_PASSABLE)
618 #define IS_ACCESSIBLE(e) HAS_PROPERTY(e, EP_ACCESSIBLE)
619 #define IS_COLLECTIBLE(e) HAS_PROPERTY(e, EP_COLLECTIBLE)
620 #define IS_SNAPPABLE(e) HAS_PROPERTY(e, EP_SNAPPABLE)
621 #define IS_WALL(e) HAS_PROPERTY(e, EP_WALL)
622 #define IS_SOLID_FOR_PUSHING(e) HAS_PROPERTY(e, EP_SOLID_FOR_PUSHING)
623 #define IS_DRAGONFIRE_PROOF(e) HAS_PROPERTY(e, EP_DRAGONFIRE_PROOF)
624 #define IS_EXPLOSION_PROOF(e) HAS_PROPERTY(e, EP_EXPLOSION_PROOF)
625 #define CAN_SMASH(e) HAS_PROPERTY(e, EP_CAN_SMASH)
626 #define EXPLODES_3X3_OLD(e) HAS_PROPERTY(e, EP_EXPLODES_3X3_OLD)
627 #define CAN_EXPLODE_BY_FIRE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_FIRE)
628 #define CAN_EXPLODE_SMASHED(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_SMASHED)
629 #define CAN_EXPLODE_IMPACT(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_IMPACT)
630 #define IS_SP_PORT(e) HAS_PROPERTY(e, EP_SP_PORT)
631 #define CAN_EXPLODE_BY_DRAGONFIRE(e) \
632 HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_DRAGONFIRE)
633 #define CAN_EXPLODE_BY_EXPLOSION(e) \
634 HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_EXPLOSION)
635 #define COULD_MOVE_INTO_ACID(e) HAS_PROPERTY(e, EP_COULD_MOVE_INTO_ACID)
636 #define MAYBE_DONT_COLLIDE_WITH(e) HAS_PROPERTY(e, EP_MAYBE_DONT_COLLIDE_WITH)
637 #define CAN_BE_CLONED_BY_ANDROID(e) \
638 HAS_PROPERTY(e, EP_CAN_BE_CLONED_BY_ANDROID)
640 #define IS_EDITOR_CASCADE(e) HAS_PROPERTY(e, EP_EDITOR_CASCADE)
641 #define IS_EDITOR_CASCADE_ACTIVE(e) \
642 HAS_PROPERTY(e, EP_EDITOR_CASCADE_ACTIVE)
643 #define IS_EDITOR_CASCADE_INACTIVE(e) \
644 HAS_PROPERTY(e, EP_EDITOR_CASCADE_INACTIVE)
646 #define HAS_ACTION(e) HAS_PROPERTY(e, EP_HAS_ACTION)
647 #define CAN_CHANGE_OR_HAS_ACTION(e) \
648 HAS_PROPERTY(e, EP_CAN_CHANGE_OR_HAS_ACTION)
650 #define IS_OBSOLETE(e) HAS_PROPERTY(e, EP_OBSOLETE)
652 /* special macros used in game engine */
653 #define IS_FILE_ELEMENT(e) ((e) >= 0 && \
654 (e) <= NUM_FILE_ELEMENTS)
656 #define IS_DRAWABLE_ELEMENT(e) ((e) >= 0 && \
657 (e) <= NUM_DRAWABLE_ELEMENTS)
659 #define IS_RUNTIME_ELEMENT(e) ((e) >= 0 && \
660 (e) <= NUM_RUNTIME_ELEMENTS)
662 #define IS_VALID_ELEMENT(e) ((e) >= 0 && \
663 (e) <= MAX_NUM_ELEMENTS)
665 #define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \
666 (e) <= EL_CUSTOM_END)
668 #define IS_GROUP_ELEMENT(e) ((e) >= EL_GROUP_START && \
671 #define IS_CLIPBOARD_ELEMENT(e) ((e) >= EL_INTERNAL_CLIPBOARD_START && \
672 (e) <= EL_INTERNAL_CLIPBOARD_END)
674 #define IS_INTERNAL_ELEMENT(e) ((e) >= EL_INTERNAL_START && \
675 (e) <= EL_INTERNAL_END)
677 #define IS_MM_ELEMENT(e) ((e) >= EL_MM_START && \
680 #define IS_DF_ELEMENT(e) ((e) >= EL_DF_START && \
683 #define IS_MM_MCDUFFIN(e) ((e) >= EL_MM_MCDUFFIN_START && \
684 (e) <= EL_MM_MCDUFFIN_END)
686 #define IS_DF_LASER(e) ((e) >= EL_DF_LASER_START && \
687 (e) <= EL_DF_LASER_END)
689 #define IS_MM_WALL(e) (((e) >= EL_MM_WALL_START && \
690 (e) <= EL_MM_WALL_END) || \
691 ((e) >= EL_DF_WALL_START && \
692 (e) <= EL_DF_WALL_END))
694 #define IS_DF_WALL(e) ((e) >= EL_DF_WALL_START && \
695 (e) <= EL_DF_WALL_END)
697 #define IS_MM_WALL_EDITOR(e) ((e) == EL_MM_STEEL_WALL || \
698 (e) == EL_MM_WOODEN_WALL || \
699 (e) == EL_MM_ICE_WALL || \
700 (e) == EL_MM_AMOEBA_WALL || \
701 (e) == EL_DF_STEEL_WALL || \
702 (e) == EL_DF_WOODEN_WALL)
704 #define IS_ENVELOPE(e) ((e) >= EL_ENVELOPE_1 && \
705 (e) <= EL_ENVELOPE_4)
707 #define IS_BALLOON_ELEMENT(e) ((e) == EL_BALLOON || \
708 (e) == EL_BALLOON_SWITCH_LEFT || \
709 (e) == EL_BALLOON_SWITCH_RIGHT || \
710 (e) == EL_BALLOON_SWITCH_UP || \
711 (e) == EL_BALLOON_SWITCH_DOWN || \
712 (e) == EL_BALLOON_SWITCH_ANY || \
713 (e) == EL_BALLOON_SWITCH_NONE)
715 #define IS_RND_KEY(e) ((e) >= EL_KEY_1 && \
717 #define IS_EM_KEY(e) ((e) >= EL_EM_KEY_1 && \
719 #define IS_EMC_KEY(e) ((e) >= EL_EMC_KEY_5 && \
721 #define IS_KEY(e) (IS_RND_KEY(e) || \
724 #define RND_KEY_NR(e) ((e) - EL_KEY_1)
725 #define EM_KEY_NR(e) ((e) - EL_EM_KEY_1)
726 #define EMC_KEY_NR(e) ((e) - EL_EMC_KEY_5 + 4)
727 #define KEY_NR(e) (IS_RND_KEY(e) ? RND_KEY_NR(e) : \
728 IS_EM_KEY(e) ? EM_KEY_NR(e) : \
729 IS_EMC_KEY(e) ? EMC_KEY_NR(e) : 0)
731 #define IS_RND_GATE(e) ((e) >= EL_GATE_1 && \
733 #define IS_EM_GATE(e) ((e) >= EL_EM_GATE_1 && \
735 #define IS_EMC_GATE(e) ((e) >= EL_EMC_GATE_5 && \
736 (e) <= EL_EMC_GATE_8)
737 #define IS_DC_GATE(e) ((e) == EL_DC_GATE_WHITE)
738 #define IS_GATE(e) (IS_RND_GATE(e) || \
742 #define RND_GATE_NR(e) ((e) - EL_GATE_1)
743 #define EM_GATE_NR(e) ((e) - EL_EM_GATE_1)
744 #define EMC_GATE_NR(e) ((e) - EL_EMC_GATE_5 + 4)
745 #define GATE_NR(e) (IS_RND_GATE(e) ? RND_GATE_NR(e) : \
746 IS_EM_GATE(e) ? EM_GATE_NR(e) : \
747 IS_EMC_GATE(e) ? EMC_GATE_NR(e) : 0)
749 #define IS_RND_GATE_GRAY(e) ((e) >= EL_GATE_1_GRAY && \
750 (e) <= EL_GATE_4_GRAY)
751 #define IS_RND_GATE_GRAY_ACTIVE(e) ((e) >= EL_GATE_1_GRAY_ACTIVE && \
752 (e) <= EL_GATE_4_GRAY_ACTIVE)
753 #define IS_EM_GATE_GRAY(e) ((e) >= EL_EM_GATE_1_GRAY && \
754 (e) <= EL_EM_GATE_4_GRAY)
755 #define IS_EM_GATE_GRAY_ACTIVE(e) ((e) >= EL_EM_GATE_1_GRAY_ACTIVE && \
756 (e) <= EL_EM_GATE_4_GRAY_ACTIVE)
757 #define IS_EMC_GATE_GRAY(e) ((e) >= EL_EMC_GATE_5_GRAY && \
758 (e) <= EL_EMC_GATE_8_GRAY)
759 #define IS_EMC_GATE_GRAY_ACTIVE(e) ((e) >= EL_EMC_GATE_5_GRAY_ACTIVE && \
760 (e) <= EL_EMC_GATE_8_GRAY_ACTIVE)
761 #define IS_DC_GATE_GRAY(e) ((e) == EL_DC_GATE_WHITE_GRAY)
762 #define IS_DC_GATE_GRAY_ACTIVE(e) ((e) == EL_DC_GATE_WHITE_GRAY_ACTIVE)
764 #define IS_GATE_GRAY(e) (IS_RND_GATE_GRAY(e) || \
765 IS_EM_GATE_GRAY(e) || \
766 IS_EMC_GATE_GRAY(e) || \
768 #define IS_GATE_GRAY_ACTIVE(e) (IS_RND_GATE_GRAY_ACTIVE(e) || \
769 IS_EM_GATE_GRAY_ACTIVE(e) || \
770 IS_EMC_GATE_GRAY_ACTIVE(e) || \
771 IS_DC_GATE_GRAY_ACTIVE(e))
772 #define RND_GATE_GRAY_NR(e) ((e) - EL_GATE_1_GRAY)
773 #define RND_GATE_GRAY_ACTIVE_NR(e) ((e) - EL_GATE_1_GRAY_ACTIVE)
774 #define EM_GATE_GRAY_NR(e) ((e) - EL_EM_GATE_1_GRAY)
775 #define EM_GATE_GRAY_ACTIVE_NR(e) ((e) - EL_EM_GATE_1_GRAY_ACTIVE)
776 #define EMC_GATE_GRAY_NR(e) ((e) - EL_EMC_GATE_5_GRAY + 4)
777 #define EMC_GATE_GRAY_ACTIVE_NR(e) ((e) - EL_EMC_GATE_5_GRAY_ACTIVE + 4)
778 #define GATE_GRAY_NR(e) (IS_RND_GATE_GRAY(e) ? RND_GATE_GRAY_NR(e) : \
779 IS_EM_GATE_GRAY(e) ? EM_GATE_GRAY_NR(e) : \
780 IS_EMC_GATE_GRAY(e) ? EMC_GATE_GRAY_NR(e) : 0)
782 #define IS_ACID_POOL_OR_ACID(e) (IS_ACID_POOL(e) || (e) == EL_ACID)
784 #define IS_EMC_PILLAR(e) ((e) >= EL_EMC_WALL_1 && \
785 (e) <= EL_EMC_WALL_3)
786 #define IS_SP_CHIP(e) ((e) == EL_SP_CHIP_SINGLE || \
787 (e) == EL_SP_CHIP_LEFT || \
788 (e) == EL_SP_CHIP_RIGHT || \
789 (e) == EL_SP_CHIP_TOP || \
790 (e) == EL_SP_CHIP_BOTTOM)
791 #define IS_SP_HARDWARE_BASE(e) ((e) == EL_SP_HARDWARE_BASE_1 || \
792 (e) == EL_SP_HARDWARE_BASE_2 || \
793 (e) == EL_SP_HARDWARE_BASE_3 || \
794 (e) == EL_SP_HARDWARE_BASE_4 || \
795 (e) == EL_SP_HARDWARE_BASE_5 || \
796 (e) == EL_SP_HARDWARE_BASE_6)
798 #define IS_DC_STEELWALL_2(e) ((e) >= EL_DC_STEELWALL_2_LEFT && \
799 (e) <= EL_DC_STEELWALL_2_SINGLE)
801 #define MM_WALL_BASE(e) ((e) & 0xfff0)
802 #define MM_WALL_BITS(e) ((e) & 0x000f)
804 #define GFX_ELEMENT(e) (element_info[e].gfx_element)
806 /* !!! CHECK THIS !!! */
808 #define TILE_GFX_ELEMENT(x, y) \
809 (GfxElement[x][y] != EL_UNDEFINED && \
810 Feld[x][y] != EL_EXPLOSION ? \
811 GfxElement[x][y] : Feld[x][y])
813 #define TILE_GFX_ELEMENT(x, y) \
814 GFX_ELEMENT(GfxElement[x][y] != EL_UNDEFINED && \
815 Feld[x][y] != EL_EXPLOSION ? \
816 GfxElement[x][y] : Feld[x][y])
819 /* !!! "use sound" deactivated due to problems with level "bug machine" !!! */
820 /* (solution: add separate "use sound of element" to level file and editor) */
822 #define SND_ELEMENT(e) GFX_ELEMENT(e)
824 #define SND_ELEMENT(e) (e)
827 #define GROUP_NR(e) ((e) - EL_GROUP_START)
828 #define IS_IN_GROUP(e, nr) (element_info[e].in_group[nr] == TRUE)
829 #define IS_IN_GROUP_EL(e, ge) (IS_IN_GROUP(e, (ge) - EL_GROUP_START))
831 #define IS_EQUAL_OR_IN_GROUP(e, ge) \
832 (ge == EL_ANY_ELEMENT ? TRUE : \
833 IS_GROUP_ELEMENT(ge) ? IS_IN_GROUP(e, GROUP_NR(ge)) : (e) == (ge))
835 #define IS_PLAYER(x, y) (ELEM_IS_PLAYER(StorePlayer[x][y]))
837 #define IS_FREE(x, y) (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x, y))
838 #define IS_FREE_OR_PLAYER(x, y) (Feld[x][y] == EL_EMPTY)
840 #define IS_MOVING(x,y) (MovPos[x][y] != 0)
841 #define IS_FALLING(x,y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
842 #define IS_BLOCKED(x,y) (Feld[x][y] == EL_BLOCKED)
844 #define IS_MV_DIAGONAL(x) ((x) & MV_HORIZONTAL && (x) & MV_VERTICAL)
846 #define EL_CHANGED(e) ((e) == EL_ROCK ? EL_EMERALD : \
847 (e) == EL_BD_ROCK ? EL_BD_DIAMOND : \
848 (e) == EL_EMERALD ? EL_DIAMOND : \
849 (e) == EL_EMERALD_YELLOW ? EL_DIAMOND : \
850 (e) == EL_EMERALD_RED ? EL_DIAMOND : \
851 (e) == EL_EMERALD_PURPLE ? EL_DIAMOND : \
853 #define EL_CHANGED_BD(e) ((e) == EL_ROCK ? EL_BD_DIAMOND : \
854 (e) == EL_BD_ROCK ? EL_BD_DIAMOND : \
856 #define EL_CHANGED_DC(e) ((e) == EL_ROCK ? EL_EMERALD : \
857 (e) == EL_BD_ROCK ? EL_BD_DIAMOND : \
858 (e) == EL_EMERALD ? EL_DIAMOND : \
859 (e) == EL_EMERALD_YELLOW ? EL_DIAMOND : \
860 (e) == EL_EMERALD_RED ? EL_DIAMOND : \
861 (e) == EL_EMERALD_PURPLE ? EL_DIAMOND : \
862 (e) == EL_PEARL ? EL_BOMB : \
863 (e) == EL_CRYSTAL ? EL_CRYSTAL : \
865 #define IS_DRAWABLE(e) ((e) < EL_BLOCKED)
866 #define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED)
867 #define TAPE_IS_EMPTY(x) ((x).length == 0)
868 #define TAPE_IS_STOPPED(x) (!(x).recording && !(x).playing)
870 #define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_PLAYER_1])
871 #define SHIELD_ON(p) ((p)->shield_normal_time_left > 0)
873 #define ENEMY_PROTECTED_FIELD(x,y) (IS_PROTECTED(Feld[x][y]) || \
874 IS_PROTECTED(Back[x][y]))
875 #define EXPLOSION_PROTECTED_FIELD(x,y) (IS_EXPLOSION_PROOF(Feld[x][y]))
876 #define PLAYER_ENEMY_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
877 ENEMY_PROTECTED_FIELD(x, y))
878 #define PLAYER_EXPLOSION_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
879 EXPLOSION_PROTECTED_FIELD(x, y))
881 #define PLAYER_SWITCHING(p,x,y) ((p)->is_switching && \
882 (p)->switch_x == (x) && (p)->switch_y == (y))
884 #define PLAYER_DROPPING(p,x,y) ((p)->is_dropping && \
885 (p)->drop_x == (x) && (p)->drop_y == (y))
887 #define PLAYER_NR_GFX(g,i) ((g) + i * (IMG_PLAYER_2 - IMG_PLAYER_1))
889 #define GET_PLAYER_ELEMENT(e) ((e) >= EL_PLAYER_1 && (e) <= EL_PLAYER_4 ? \
892 #define GET_PLAYER_NR(e) (GET_PLAYER_ELEMENT(e) - EL_PLAYER_1)
894 #define ANIM_FRAMES(g) (graphic_info[g].anim_frames)
895 #define ANIM_DELAY(g) (graphic_info[g].anim_delay)
896 #define ANIM_MODE(g) (graphic_info[g].anim_mode)
898 #define IS_ANIM_MODE_CE(g) (graphic_info[g].anim_mode & (ANIM_CE_VALUE | \
901 #define IS_ANIMATED(g) (ANIM_FRAMES(g) > 1)
902 #define IS_NEW_DELAY(f, g) ((f) % ANIM_DELAY(g) == 0)
903 #define IS_NEW_FRAME(f, g) (IS_ANIMATED(g) && IS_NEW_DELAY(f, g))
904 #define IS_NEXT_FRAME(f, g) (IS_NEW_FRAME(f, g) && (f) > 0)
906 #define IS_LOOP_SOUND(s) (sound_info[s].loop)
908 #define IS_SPECIAL_GFX_ARG(a) ((a) >= 0 && (a) < NUM_SPECIAL_GFX_ARGS)
910 #define IS_GLOBAL_ANIM_PART(a) ((a) >= 0 && (a) < NUM_GLOBAL_ANIM_PARTS)
912 #define EL_CASCADE_ACTIVE(e) (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : (e))
913 #define EL_CASCADE_INACTIVE(e) (IS_EDITOR_CASCADE_ACTIVE(e) ? (e) - 1 : (e))
914 #define EL_CASCADE_TOGGLE(e) (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : \
915 IS_EDITOR_CASCADE_ACTIVE(e) ? (e) - 1 : (e))
917 #define EL_NAME(e) ((e) >= 0 ? element_info[e].token_name : "(?)")
918 #define MV_TEXT(d) ((d) == MV_NONE ? "MV_NONE" : \
919 (d) == MV_LEFT ? "MV_LEFT" : \
920 (d) == MV_RIGHT ? "MV_RIGHT" : \
921 (d) == MV_UP ? "MV_UP" : \
922 (d) == MV_DOWN ? "MV_DOWN" : "(various)")
924 #define ELEMENT_ACTIVE(e) (ActiveElement[e])
925 #define BUTTON_ACTIVE(b) (ActiveButton[b])
926 #define FONT_ACTIVE(f) (ActiveFont[f])
928 /* fundamental game speed values */
929 #define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */
930 #define MICROLEVEL_LABEL_DELAY 250 /* delay for micro level label */
932 /* boundaries of arrays etc. */
933 #define MAX_LEVEL_NAME_LEN 32
934 #define MAX_LEVEL_AUTHOR_LEN 32
935 #define MAX_ELEMENT_NAME_LEN 32
936 #define MAX_TAPES_PER_SET 1024
937 #define MAX_SCORE_ENTRIES 100
938 #define MAX_NUM_TITLE_IMAGES 5
939 #define MAX_NUM_TITLE_MESSAGES 5
941 #define MAX_NUM_AMOEBA 100
943 #define NUM_ENVELOPES 4
944 #define MIN_ENVELOPE_XSIZE 1
945 #define MIN_ENVELOPE_YSIZE 1
946 #define MAX_ENVELOPE_XSIZE 30
947 #define MAX_ENVELOPE_YSIZE 20
948 #define MAX_ENVELOPE_TEXT_LEN (MAX_ENVELOPE_XSIZE * MAX_ENVELOPE_YSIZE)
949 #define MIN_CHANGE_PAGES 1
950 #define MAX_CHANGE_PAGES 32
951 #define MIN_ELEMENTS_IN_GROUP 1
952 #define MAX_ELEMENTS_IN_GROUP 16
953 #define MIN_ANDROID_ELEMENTS 1
954 #define MAX_ANDROID_ELEMENTS 16
956 /* values for elements with content */
957 #define MIN_ELEMENT_CONTENTS 1
958 #define STD_ELEMENT_CONTENTS 4
959 #define MAX_ELEMENT_CONTENTS 8
961 /* values for initial player inventory */
962 #define MIN_INITIAL_INVENTORY_SIZE 1
963 #define MAX_INITIAL_INVENTORY_SIZE 8
965 /* often used screen positions */
967 #define TILEX TILESIZE
968 #define TILEY TILESIZE
969 #define TILEX_VAR TILESIZE_VAR
970 #define TILEY_VAR TILESIZE_VAR
971 #define MINI_TILESIZE (TILESIZE / 2)
972 #define MINI_TILEX MINI_TILESIZE
973 #define MINI_TILEY MINI_TILESIZE
974 #define MICRO_TILESIZE (TILESIZE / 8)
975 #define MICRO_TILEX MICRO_TILESIZE
976 #define MICRO_TILEY MICRO_TILESIZE
977 #define MIDPOSX (SCR_FIELDX / 2)
978 #define MIDPOSY (SCR_FIELDY / 2)
979 #define FXSIZE ((2 + SCR_FIELDX + 2) * TILEX_VAR)
980 #define FYSIZE ((2 + SCR_FIELDY + 2) * TILEY_VAR)
982 #define MICROLEVEL_XSIZE ((STD_LEV_FIELDX + 2) * MICRO_TILEX)
983 #define MICROLEVEL_YSIZE ((STD_LEV_FIELDY + 2) * MICRO_TILEY)
984 #define MICROLEVEL_XPOS (SX + (SXSIZE - MICROLEVEL_XSIZE) / 2)
985 #define MICROLEVEL_YPOS (SY + 12 * TILEY - MICRO_TILEY)
986 #define MICROLABEL1_YPOS (MICROLEVEL_YPOS - 36)
987 #define MICROLABEL2_YPOS (MICROLEVEL_YPOS + MICROLEVEL_YSIZE + 7)
989 /* values for GfxRedraw */
990 #define GFX_REDRAW_NONE (0)
991 #define GFX_REDRAW_TILE (1 << 0)
992 #define GFX_REDRAW_TILE_CRUMBLED (1 << 1)
993 #define GFX_REDRAW_TILE_CRUMBLED_NEIGHBOURS (1 << 2)
994 #define GFX_REDRAW_TILE_TWINKLED (1 << 3)
996 /* score for elements */
1000 #define SC_SPACESHIP 3
1005 #define SC_DYNAMITE 8
1007 #define SC_TIME_BONUS 10
1008 #define SC_CRYSTAL 11
1010 #define SC_SHIELD 13
1011 #define SC_ELEM_BONUS 14
1012 #define SC_UNKNOWN_15 15
1014 #define LEVEL_SCORE_ELEMENTS 16 /* level elements with score */
1017 /* "real" level file elements */
1018 #define EL_UNDEFINED -1
1020 #define EL_EMPTY_SPACE 0
1021 #define EL_EMPTY EL_EMPTY_SPACE
1024 #define EL_WALL_SLIPPERY 3
1026 #define EL_KEY_OBSOLETE 5 /* obsolete; now EL_KEY_1 */
1027 #define EL_EMERALD 6
1028 #define EL_EXIT_CLOSED 7
1029 #define EL_PLAYER_OBSOLETE 8 /* obsolete; now EL_PLAYER_1 */
1031 #define EL_SPACESHIP 10
1032 #define EL_YAMYAM 11
1034 #define EL_STEELWALL 13
1035 #define EL_DIAMOND 14
1036 #define EL_AMOEBA_DEAD 15
1037 #define EL_QUICKSAND_EMPTY 16
1038 #define EL_QUICKSAND_FULL 17
1039 #define EL_AMOEBA_DROP 18
1041 #define EL_MAGIC_WALL 20
1042 #define EL_SPEED_PILL 21
1044 #define EL_AMOEBA_WET 23
1045 #define EL_AMOEBA_DRY 24
1047 #define EL_GAME_OF_LIFE 26
1048 #define EL_BIOMAZE 27
1049 #define EL_DYNAMITE_ACTIVE 28
1050 #define EL_STONEBLOCK 29
1051 #define EL_ROBOT_WHEEL 30
1052 #define EL_ROBOT_WHEEL_ACTIVE 31
1057 #define EL_GATE_1 36
1058 #define EL_GATE_2 37
1059 #define EL_GATE_3 38
1060 #define EL_GATE_4 39
1061 #define EL_GATE_1_GRAY 40
1062 #define EL_GATE_2_GRAY 41
1063 #define EL_GATE_3_GRAY 42
1064 #define EL_GATE_4_GRAY 43
1065 #define EL_DYNAMITE 44
1066 #define EL_PACMAN 45
1067 #define EL_INVISIBLE_WALL 46
1069 #define EL_LAMP_ACTIVE 48
1070 #define EL_WALL_EMERALD 49
1071 #define EL_WALL_DIAMOND 50
1072 #define EL_AMOEBA_FULL 51
1073 #define EL_BD_AMOEBA 52
1074 #define EL_TIME_ORB_FULL 53
1075 #define EL_TIME_ORB_EMPTY 54
1076 #define EL_EXPANDABLE_WALL 55
1077 #define EL_BD_DIAMOND 56
1078 #define EL_EMERALD_YELLOW 57
1079 #define EL_WALL_BD_DIAMOND 58
1080 #define EL_WALL_EMERALD_YELLOW 59
1081 #define EL_DARK_YAMYAM 60
1082 #define EL_BD_MAGIC_WALL 61
1083 #define EL_INVISIBLE_STEELWALL 62
1084 #define EL_SOKOBAN_FIELD_PLAYER 63
1085 #define EL_DYNABOMB_INCREASE_NUMBER 64
1086 #define EL_DYNABOMB_INCREASE_SIZE 65
1087 #define EL_DYNABOMB_INCREASE_POWER 66
1088 #define EL_SOKOBAN_OBJECT 67
1089 #define EL_SOKOBAN_FIELD_EMPTY 68
1090 #define EL_SOKOBAN_FIELD_FULL 69
1091 #define EL_BD_BUTTERFLY_RIGHT 70
1092 #define EL_BD_BUTTERFLY_UP 71
1093 #define EL_BD_BUTTERFLY_LEFT 72
1094 #define EL_BD_BUTTERFLY_DOWN 73
1095 #define EL_BD_FIREFLY_RIGHT 74
1096 #define EL_BD_FIREFLY_UP 75
1097 #define EL_BD_FIREFLY_LEFT 76
1098 #define EL_BD_FIREFLY_DOWN 77
1099 #define EL_BD_BUTTERFLY_1 EL_BD_BUTTERFLY_DOWN
1100 #define EL_BD_BUTTERFLY_2 EL_BD_BUTTERFLY_LEFT
1101 #define EL_BD_BUTTERFLY_3 EL_BD_BUTTERFLY_UP
1102 #define EL_BD_BUTTERFLY_4 EL_BD_BUTTERFLY_RIGHT
1103 #define EL_BD_FIREFLY_1 EL_BD_FIREFLY_LEFT
1104 #define EL_BD_FIREFLY_2 EL_BD_FIREFLY_DOWN
1105 #define EL_BD_FIREFLY_3 EL_BD_FIREFLY_RIGHT
1106 #define EL_BD_FIREFLY_4 EL_BD_FIREFLY_UP
1107 #define EL_BD_BUTTERFLY 78
1108 #define EL_BD_FIREFLY 79
1109 #define EL_PLAYER_1 80
1110 #define EL_PLAYER_2 81
1111 #define EL_PLAYER_3 82
1112 #define EL_PLAYER_4 83
1113 #define EL_BUG_RIGHT 84
1114 #define EL_BUG_UP 85
1115 #define EL_BUG_LEFT 86
1116 #define EL_BUG_DOWN 87
1117 #define EL_SPACESHIP_RIGHT 88
1118 #define EL_SPACESHIP_UP 89
1119 #define EL_SPACESHIP_LEFT 90
1120 #define EL_SPACESHIP_DOWN 91
1121 #define EL_PACMAN_RIGHT 92
1122 #define EL_PACMAN_UP 93
1123 #define EL_PACMAN_LEFT 94
1124 #define EL_PACMAN_DOWN 95
1125 #define EL_EMERALD_RED 96
1126 #define EL_EMERALD_PURPLE 97
1127 #define EL_WALL_EMERALD_RED 98
1128 #define EL_WALL_EMERALD_PURPLE 99
1129 #define EL_ACID_POOL_TOPLEFT 100
1130 #define EL_ACID_POOL_TOPRIGHT 101
1131 #define EL_ACID_POOL_BOTTOMLEFT 102
1132 #define EL_ACID_POOL_BOTTOM 103
1133 #define EL_ACID_POOL_BOTTOMRIGHT 104
1134 #define EL_BD_WALL 105
1135 #define EL_BD_ROCK 106
1136 #define EL_EXIT_OPEN 107
1137 #define EL_BLACK_ORB 108
1138 #define EL_AMOEBA_TO_DIAMOND 109
1140 #define EL_PENGUIN 111
1141 #define EL_SATELLITE 112
1142 #define EL_ARROW_LEFT 113
1143 #define EL_ARROW_RIGHT 114
1144 #define EL_ARROW_UP 115
1145 #define EL_ARROW_DOWN 116
1147 #define EL_DRAGON 118
1149 #define EL_EM_KEY_1_FILE_OBSOLETE 119 /* obsolete; now EL_EM_KEY_1 */
1151 #define EL_CHAR_START 120
1152 #define EL_CHAR_ASCII0 (EL_CHAR_START - 32)
1153 #define EL_CHAR_ASCII0_START (EL_CHAR_ASCII0 + 32)
1155 #include "conf_chr.h" /* include auto-generated data structure definitions */
1157 #define EL_CHAR_ASCII0_END (EL_CHAR_ASCII0 + 111)
1158 #define EL_CHAR_END (EL_CHAR_START + 79)
1160 #define EL_CHAR(c) (EL_CHAR_ASCII0 + MAP_FONT_ASCII(c))
1162 #define EL_EXPANDABLE_WALL_HORIZONTAL 200
1163 #define EL_EXPANDABLE_WALL_VERTICAL 201
1164 #define EL_EXPANDABLE_WALL_ANY 202
1166 #define EL_EM_GATE_1 203
1167 #define EL_EM_GATE_2 204
1168 #define EL_EM_GATE_3 205
1169 #define EL_EM_GATE_4 206
1171 #define EL_EM_KEY_2_FILE_OBSOLETE 207 /* obsolete; now EL_EM_KEY_2 */
1172 #define EL_EM_KEY_3_FILE_OBSOLETE 208 /* obsolete; now EL_EM_KEY_3 */
1173 #define EL_EM_KEY_4_FILE_OBSOLETE 209 /* obsolete; now EL_EM_KEY_4 */
1175 #define EL_SP_START 210
1176 #define EL_SP_EMPTY_SPACE (EL_SP_START + 0)
1177 #define EL_SP_EMPTY EL_SP_EMPTY_SPACE
1178 #define EL_SP_ZONK (EL_SP_START + 1)
1179 #define EL_SP_BASE (EL_SP_START + 2)
1180 #define EL_SP_MURPHY (EL_SP_START + 3)
1181 #define EL_SP_INFOTRON (EL_SP_START + 4)
1182 #define EL_SP_CHIP_SINGLE (EL_SP_START + 5)
1183 #define EL_SP_HARDWARE_GRAY (EL_SP_START + 6)
1184 #define EL_SP_EXIT_CLOSED (EL_SP_START + 7)
1185 #define EL_SP_DISK_ORANGE (EL_SP_START + 8)
1186 #define EL_SP_PORT_RIGHT (EL_SP_START + 9)
1187 #define EL_SP_PORT_DOWN (EL_SP_START + 10)
1188 #define EL_SP_PORT_LEFT (EL_SP_START + 11)
1189 #define EL_SP_PORT_UP (EL_SP_START + 12)
1190 #define EL_SP_GRAVITY_PORT_RIGHT (EL_SP_START + 13)
1191 #define EL_SP_GRAVITY_PORT_DOWN (EL_SP_START + 14)
1192 #define EL_SP_GRAVITY_PORT_LEFT (EL_SP_START + 15)
1193 #define EL_SP_GRAVITY_PORT_UP (EL_SP_START + 16)
1194 #define EL_SP_SNIKSNAK (EL_SP_START + 17)
1195 #define EL_SP_DISK_YELLOW (EL_SP_START + 18)
1196 #define EL_SP_TERMINAL (EL_SP_START + 19)
1197 #define EL_SP_DISK_RED (EL_SP_START + 20)
1198 #define EL_SP_PORT_VERTICAL (EL_SP_START + 21)
1199 #define EL_SP_PORT_HORIZONTAL (EL_SP_START + 22)
1200 #define EL_SP_PORT_ANY (EL_SP_START + 23)
1201 #define EL_SP_ELECTRON (EL_SP_START + 24)
1202 #define EL_SP_BUGGY_BASE (EL_SP_START + 25)
1203 #define EL_SP_CHIP_LEFT (EL_SP_START + 26)
1204 #define EL_SP_CHIP_RIGHT (EL_SP_START + 27)
1205 #define EL_SP_HARDWARE_BASE_1 (EL_SP_START + 28)
1206 #define EL_SP_HARDWARE_GREEN (EL_SP_START + 29)
1207 #define EL_SP_HARDWARE_BLUE (EL_SP_START + 30)
1208 #define EL_SP_HARDWARE_RED (EL_SP_START + 31)
1209 #define EL_SP_HARDWARE_YELLOW (EL_SP_START + 32)
1210 #define EL_SP_HARDWARE_BASE_2 (EL_SP_START + 33)
1211 #define EL_SP_HARDWARE_BASE_3 (EL_SP_START + 34)
1212 #define EL_SP_HARDWARE_BASE_4 (EL_SP_START + 35)
1213 #define EL_SP_HARDWARE_BASE_5 (EL_SP_START + 36)
1214 #define EL_SP_HARDWARE_BASE_6 (EL_SP_START + 37)
1215 #define EL_SP_CHIP_TOP (EL_SP_START + 38)
1216 #define EL_SP_CHIP_BOTTOM (EL_SP_START + 39)
1217 #define EL_SP_END (EL_SP_START + 39)
1219 #define EL_EM_GATE_1_GRAY 250
1220 #define EL_EM_GATE_2_GRAY 251
1221 #define EL_EM_GATE_3_GRAY 252
1222 #define EL_EM_GATE_4_GRAY 253
1224 #define EL_EM_DYNAMITE 254
1225 #define EL_EM_DYNAMITE_ACTIVE 255
1227 #define EL_PEARL 256
1228 #define EL_CRYSTAL 257
1229 #define EL_WALL_PEARL 258
1230 #define EL_WALL_CRYSTAL 259
1231 #define EL_DC_GATE_WHITE 260
1232 #define EL_DC_GATE_WHITE_GRAY 261
1233 #define EL_DC_KEY_WHITE 262
1234 #define EL_SHIELD_NORMAL 263
1235 #define EL_EXTRA_TIME 264
1236 #define EL_SWITCHGATE_OPEN 265
1237 #define EL_SWITCHGATE_CLOSED 266
1238 #define EL_SWITCHGATE_SWITCH_UP 267
1239 #define EL_SWITCHGATE_SWITCH_DOWN 268
1241 #define EL_UNUSED_269 269
1242 #define EL_UNUSED_270 270
1244 #define EL_CONVEYOR_BELT_1_LEFT 271
1245 #define EL_CONVEYOR_BELT_1_MIDDLE 272
1246 #define EL_CONVEYOR_BELT_1_RIGHT 273
1247 #define EL_CONVEYOR_BELT_1_SWITCH_LEFT 274
1248 #define EL_CONVEYOR_BELT_1_SWITCH_MIDDLE 275
1249 #define EL_CONVEYOR_BELT_1_SWITCH_RIGHT 276
1250 #define EL_CONVEYOR_BELT_2_LEFT 277
1251 #define EL_CONVEYOR_BELT_2_MIDDLE 278
1252 #define EL_CONVEYOR_BELT_2_RIGHT 279
1253 #define EL_CONVEYOR_BELT_2_SWITCH_LEFT 280
1254 #define EL_CONVEYOR_BELT_2_SWITCH_MIDDLE 281
1255 #define EL_CONVEYOR_BELT_2_SWITCH_RIGHT 282
1256 #define EL_CONVEYOR_BELT_3_LEFT 283
1257 #define EL_CONVEYOR_BELT_3_MIDDLE 284
1258 #define EL_CONVEYOR_BELT_3_RIGHT 285
1259 #define EL_CONVEYOR_BELT_3_SWITCH_LEFT 286
1260 #define EL_CONVEYOR_BELT_3_SWITCH_MIDDLE 287
1261 #define EL_CONVEYOR_BELT_3_SWITCH_RIGHT 288
1262 #define EL_CONVEYOR_BELT_4_LEFT 289
1263 #define EL_CONVEYOR_BELT_4_MIDDLE 290
1264 #define EL_CONVEYOR_BELT_4_RIGHT 291
1265 #define EL_CONVEYOR_BELT_4_SWITCH_LEFT 292
1266 #define EL_CONVEYOR_BELT_4_SWITCH_MIDDLE 293
1267 #define EL_CONVEYOR_BELT_4_SWITCH_RIGHT 294
1268 #define EL_LANDMINE 295
1269 #define EL_ENVELOPE_OBSOLETE 296 /* obsolete; now EL_ENVELOPE_1 */
1270 #define EL_LIGHT_SWITCH 297
1271 #define EL_LIGHT_SWITCH_ACTIVE 298
1272 #define EL_SIGN_EXCLAMATION 299
1273 #define EL_SIGN_RADIOACTIVITY 300
1274 #define EL_SIGN_STOP 301
1275 #define EL_SIGN_WHEELCHAIR 302
1276 #define EL_SIGN_PARKING 303
1277 #define EL_SIGN_NO_ENTRY 304
1278 #define EL_SIGN_UNUSED_1 305
1279 #define EL_SIGN_GIVE_WAY 306
1280 #define EL_SIGN_ENTRY_FORBIDDEN 307
1281 #define EL_SIGN_EMERGENCY_EXIT 308
1282 #define EL_SIGN_YIN_YANG 309
1283 #define EL_SIGN_UNUSED_2 310
1284 #define EL_MOLE_LEFT 311
1285 #define EL_MOLE_RIGHT 312
1286 #define EL_MOLE_UP 313
1287 #define EL_MOLE_DOWN 314
1288 #define EL_STEELWALL_SLIPPERY 315
1289 #define EL_INVISIBLE_SAND 316
1290 #define EL_DX_UNKNOWN_15 317
1291 #define EL_DX_UNKNOWN_42 318
1293 #define EL_UNUSED_319 319
1294 #define EL_UNUSED_320 320
1296 #define EL_SHIELD_DEADLY 321
1297 #define EL_TIMEGATE_OPEN 322
1298 #define EL_TIMEGATE_CLOSED 323
1299 #define EL_TIMEGATE_SWITCH_ACTIVE 324
1300 #define EL_TIMEGATE_SWITCH 325
1302 #define EL_BALLOON 326
1303 #define EL_BALLOON_SWITCH_LEFT 327
1304 #define EL_BALLOON_SWITCH_RIGHT 328
1305 #define EL_BALLOON_SWITCH_UP 329
1306 #define EL_BALLOON_SWITCH_DOWN 330
1307 #define EL_BALLOON_SWITCH_ANY 331
1309 #define EL_EMC_STEELWALL_1 332
1310 #define EL_EMC_STEELWALL_2 333
1311 #define EL_EMC_STEELWALL_3 334
1312 #define EL_EMC_STEELWALL_4 335
1313 #define EL_EMC_WALL_1 336
1314 #define EL_EMC_WALL_2 337
1315 #define EL_EMC_WALL_3 338
1316 #define EL_EMC_WALL_4 339
1317 #define EL_EMC_WALL_5 340
1318 #define EL_EMC_WALL_6 341
1319 #define EL_EMC_WALL_7 342
1320 #define EL_EMC_WALL_8 343
1322 #define EL_TUBE_ANY 344
1323 #define EL_TUBE_VERTICAL 345
1324 #define EL_TUBE_HORIZONTAL 346
1325 #define EL_TUBE_VERTICAL_LEFT 347
1326 #define EL_TUBE_VERTICAL_RIGHT 348
1327 #define EL_TUBE_HORIZONTAL_UP 349
1328 #define EL_TUBE_HORIZONTAL_DOWN 350
1329 #define EL_TUBE_LEFT_UP 351
1330 #define EL_TUBE_LEFT_DOWN 352
1331 #define EL_TUBE_RIGHT_UP 353
1332 #define EL_TUBE_RIGHT_DOWN 354
1333 #define EL_SPRING 355
1335 #define EL_DX_SUPABOMB 357
1337 #define EL_UNUSED_358 358
1338 #define EL_UNUSED_359 359
1340 /* ---------- begin of custom elements section ----------------------------- */
1341 #define EL_CUSTOM_START 360
1343 #include "conf_cus.h" /* include auto-generated data structure definitions */
1345 #define NUM_CUSTOM_ELEMENTS 256
1346 #define EL_CUSTOM_END 615
1347 /* ---------- end of custom elements section ------------------------------- */
1349 #define EL_EM_KEY_1 616
1350 #define EL_EM_KEY_2 617
1351 #define EL_EM_KEY_3 618
1352 #define EL_EM_KEY_4 619
1353 #define EL_ENVELOPE_1 620
1354 #define EL_ENVELOPE_2 621
1355 #define EL_ENVELOPE_3 622
1356 #define EL_ENVELOPE_4 623
1358 /* ---------- begin of group elements section ------------------------------ */
1359 #define EL_GROUP_START 624
1361 #include "conf_grp.h" /* include auto-generated data structure definitions */
1363 #define NUM_GROUP_ELEMENTS 32
1364 #define EL_GROUP_END 655
1365 /* ---------- end of custom elements section ------------------------------- */
1367 #define EL_UNKNOWN 656
1368 #define EL_TRIGGER_ELEMENT 657
1369 #define EL_TRIGGER_PLAYER 658
1371 /* SP style elements */
1372 #define EL_SP_GRAVITY_ON_PORT_RIGHT 659
1373 #define EL_SP_GRAVITY_ON_PORT_DOWN 660
1374 #define EL_SP_GRAVITY_ON_PORT_LEFT 661
1375 #define EL_SP_GRAVITY_ON_PORT_UP 662
1376 #define EL_SP_GRAVITY_OFF_PORT_RIGHT 663
1377 #define EL_SP_GRAVITY_OFF_PORT_DOWN 664
1378 #define EL_SP_GRAVITY_OFF_PORT_LEFT 665
1379 #define EL_SP_GRAVITY_OFF_PORT_UP 666
1381 /* EMC style elements */
1382 #define EL_BALLOON_SWITCH_NONE 667
1383 #define EL_EMC_GATE_5 668
1384 #define EL_EMC_GATE_6 669
1385 #define EL_EMC_GATE_7 670
1386 #define EL_EMC_GATE_8 671
1387 #define EL_EMC_GATE_5_GRAY 672
1388 #define EL_EMC_GATE_6_GRAY 673
1389 #define EL_EMC_GATE_7_GRAY 674
1390 #define EL_EMC_GATE_8_GRAY 675
1391 #define EL_EMC_KEY_5 676
1392 #define EL_EMC_KEY_6 677
1393 #define EL_EMC_KEY_7 678
1394 #define EL_EMC_KEY_8 679
1395 #define EL_EMC_ANDROID 680
1396 #define EL_EMC_GRASS 681
1397 #define EL_EMC_MAGIC_BALL 682
1398 #define EL_EMC_MAGIC_BALL_ACTIVE 683
1399 #define EL_EMC_MAGIC_BALL_SWITCH 684
1400 #define EL_EMC_MAGIC_BALL_SWITCH_ACTIVE 685
1401 #define EL_EMC_SPRING_BUMPER 686
1402 #define EL_EMC_PLANT 687
1403 #define EL_EMC_LENSES 688
1404 #define EL_EMC_MAGNIFIER 689
1405 #define EL_EMC_WALL_9 690
1406 #define EL_EMC_WALL_10 691
1407 #define EL_EMC_WALL_11 692
1408 #define EL_EMC_WALL_12 693
1409 #define EL_EMC_WALL_13 694
1410 #define EL_EMC_WALL_14 695
1411 #define EL_EMC_WALL_15 696
1412 #define EL_EMC_WALL_16 697
1413 #define EL_EMC_WALL_SLIPPERY_1 698
1414 #define EL_EMC_WALL_SLIPPERY_2 699
1415 #define EL_EMC_WALL_SLIPPERY_3 700
1416 #define EL_EMC_WALL_SLIPPERY_4 701
1417 #define EL_EMC_FAKE_GRASS 702
1418 #define EL_EMC_FAKE_ACID 703
1419 #define EL_EMC_DRIPPER 704
1421 #define EL_TRIGGER_CE_VALUE 705
1422 #define EL_TRIGGER_CE_SCORE 706
1423 #define EL_CURRENT_CE_VALUE 707
1424 #define EL_CURRENT_CE_SCORE 708
1426 #define EL_YAMYAM_LEFT 709
1427 #define EL_YAMYAM_RIGHT 710
1428 #define EL_YAMYAM_UP 711
1429 #define EL_YAMYAM_DOWN 712
1431 #define EL_BD_EXPANDABLE_WALL 713
1433 #define EL_PREV_CE_8 714
1434 #define EL_PREV_CE_7 715
1435 #define EL_PREV_CE_6 716
1436 #define EL_PREV_CE_5 717
1437 #define EL_PREV_CE_4 718
1438 #define EL_PREV_CE_3 719
1439 #define EL_PREV_CE_2 720
1440 #define EL_PREV_CE_1 721
1442 #define EL_NEXT_CE_1 723
1443 #define EL_NEXT_CE_2 724
1444 #define EL_NEXT_CE_3 725
1445 #define EL_NEXT_CE_4 726
1446 #define EL_NEXT_CE_5 727
1447 #define EL_NEXT_CE_6 728
1448 #define EL_NEXT_CE_7 729
1449 #define EL_NEXT_CE_8 730
1450 #define EL_ANY_ELEMENT 731
1452 #define EL_STEEL_CHAR_START 732
1453 #define EL_STEEL_CHAR_ASCII0 (EL_STEEL_CHAR_START - 32)
1454 #define EL_STEEL_CHAR_ASCII0_START (EL_STEEL_CHAR_ASCII0 + 32)
1456 /* (auto-generated data structure definitions included with normal chars) */
1458 #define EL_STEEL_CHAR_ASCII0_END (EL_STEEL_CHAR_ASCII0 + 111)
1459 #define EL_STEEL_CHAR_END (EL_STEEL_CHAR_START + 79)
1461 #define EL_STEEL_CHAR(c) (EL_STEEL_CHAR_ASCII0+MAP_FONT_ASCII(c))
1463 #define EL_SPERMS 812
1464 #define EL_BULLET 813
1465 #define EL_HEART 814
1466 #define EL_CROSS 815
1467 #define EL_FRANKIE 816
1468 #define EL_SIGN_SPERMS 817
1469 #define EL_SIGN_BULLET 818
1470 #define EL_SIGN_HEART 819
1471 #define EL_SIGN_CROSS 820
1472 #define EL_SIGN_FRANKIE 821
1474 #define EL_STEEL_EXIT_CLOSED 822
1475 #define EL_STEEL_EXIT_OPEN 823
1477 #define EL_DC_STEELWALL_1_LEFT 824
1478 #define EL_DC_STEELWALL_1_RIGHT 825
1479 #define EL_DC_STEELWALL_1_TOP 826
1480 #define EL_DC_STEELWALL_1_BOTTOM 827
1481 #define EL_DC_STEELWALL_1_HORIZONTAL 828
1482 #define EL_DC_STEELWALL_1_VERTICAL 829
1483 #define EL_DC_STEELWALL_1_TOPLEFT 830
1484 #define EL_DC_STEELWALL_1_TOPRIGHT 831
1485 #define EL_DC_STEELWALL_1_BOTTOMLEFT 832
1486 #define EL_DC_STEELWALL_1_BOTTOMRIGHT 833
1487 #define EL_DC_STEELWALL_1_TOPLEFT_2 834
1488 #define EL_DC_STEELWALL_1_TOPRIGHT_2 835
1489 #define EL_DC_STEELWALL_1_BOTTOMLEFT_2 836
1490 #define EL_DC_STEELWALL_1_BOTTOMRIGHT_2 837
1492 #define EL_DC_STEELWALL_2_LEFT 838
1493 #define EL_DC_STEELWALL_2_RIGHT 839
1494 #define EL_DC_STEELWALL_2_TOP 840
1495 #define EL_DC_STEELWALL_2_BOTTOM 841
1496 #define EL_DC_STEELWALL_2_HORIZONTAL 842
1497 #define EL_DC_STEELWALL_2_VERTICAL 843
1498 #define EL_DC_STEELWALL_2_MIDDLE 844
1499 #define EL_DC_STEELWALL_2_SINGLE 845
1501 #define EL_DC_SWITCHGATE_SWITCH_UP 846
1502 #define EL_DC_SWITCHGATE_SWITCH_DOWN 847
1503 #define EL_DC_TIMEGATE_SWITCH 848
1504 #define EL_DC_TIMEGATE_SWITCH_ACTIVE 849
1506 #define EL_DC_LANDMINE 850
1508 #define EL_EXPANDABLE_STEELWALL 851
1509 #define EL_EXPANDABLE_STEELWALL_HORIZONTAL 852
1510 #define EL_EXPANDABLE_STEELWALL_VERTICAL 853
1511 #define EL_EXPANDABLE_STEELWALL_ANY 854
1513 #define EL_EM_EXIT_CLOSED 855
1514 #define EL_EM_EXIT_OPEN 856
1515 #define EL_EM_STEEL_EXIT_CLOSED 857
1516 #define EL_EM_STEEL_EXIT_OPEN 858
1518 #define EL_DC_GATE_FAKE_GRAY 859
1520 #define EL_DC_MAGIC_WALL 860
1522 #define EL_QUICKSAND_FAST_EMPTY 861
1523 #define EL_QUICKSAND_FAST_FULL 862
1525 #define EL_FROM_LEVEL_TEMPLATE 863
1527 #define EL_MM_START 864
1528 #define EL_MM_START_1 EL_MM_START
1530 #define EL_MM_EMPTY_SPACE (EL_MM_START + 0)
1531 #define EL_MM_EMPTY EL_MM_EMPTY_SPACE
1532 #define EL_MM_MIRROR_START (EL_MM_START + 1)
1533 #define EL_MM_MIRROR_1 (EL_MM_MIRROR_START + 0)
1534 #define EL_MM_MIRROR_2 (EL_MM_MIRROR_START + 1)
1535 #define EL_MM_MIRROR_3 (EL_MM_MIRROR_START + 2)
1536 #define EL_MM_MIRROR_4 (EL_MM_MIRROR_START + 3)
1537 #define EL_MM_MIRROR_5 (EL_MM_MIRROR_START + 4)
1538 #define EL_MM_MIRROR_6 (EL_MM_MIRROR_START + 5)
1539 #define EL_MM_MIRROR_7 (EL_MM_MIRROR_START + 6)
1540 #define EL_MM_MIRROR_8 (EL_MM_MIRROR_START + 7)
1541 #define EL_MM_MIRROR_9 (EL_MM_MIRROR_START + 8)
1542 #define EL_MM_MIRROR_10 (EL_MM_MIRROR_START + 9)
1543 #define EL_MM_MIRROR_11 (EL_MM_MIRROR_START + 10)
1544 #define EL_MM_MIRROR_12 (EL_MM_MIRROR_START + 11)
1545 #define EL_MM_MIRROR_13 (EL_MM_MIRROR_START + 12)
1546 #define EL_MM_MIRROR_14 (EL_MM_MIRROR_START + 13)
1547 #define EL_MM_MIRROR_15 (EL_MM_MIRROR_START + 14)
1548 #define EL_MM_MIRROR_16 (EL_MM_MIRROR_START + 15)
1549 #define EL_MM_MIRROR_END EL_MM_MIRROR_15
1550 #define EL_MM_STEEL_GRID_FIXED_START (EL_MM_START + 17)
1551 #define EL_MM_STEEL_GRID_FIXED_1 (EL_MM_STEEL_GRID_FIXED_START + 0)
1552 #define EL_MM_STEEL_GRID_FIXED_2 (EL_MM_STEEL_GRID_FIXED_START + 1)
1553 #define EL_MM_STEEL_GRID_FIXED_3 (EL_MM_STEEL_GRID_FIXED_START + 2)
1554 #define EL_MM_STEEL_GRID_FIXED_4 (EL_MM_STEEL_GRID_FIXED_START + 3)
1555 #define EL_MM_STEEL_GRID_FIXED_END EL_MM_STEEL_GRID_FIXED_03
1556 #define EL_MM_MCDUFFIN_START (EL_MM_START + 21)
1557 #define EL_MM_MCDUFFIN_RIGHT (EL_MM_MCDUFFIN_START + 0)
1558 #define EL_MM_MCDUFFIN_UP (EL_MM_MCDUFFIN_START + 1)
1559 #define EL_MM_MCDUFFIN_LEFT (EL_MM_MCDUFFIN_START + 2)
1560 #define EL_MM_MCDUFFIN_DOWN (EL_MM_MCDUFFIN_START + 3)
1561 #define EL_MM_MCDUFFIN_END EL_MM_MCDUFFIN_DOWN
1562 #define EL_MM_EXIT_CLOSED (EL_MM_START + 25)
1563 #define EL_MM_EXIT_OPENING_1 (EL_MM_START + 26)
1564 #define EL_MM_EXIT_OPENING_2 (EL_MM_START + 27)
1565 #define EL_MM_EXIT_OPEN (EL_MM_START + 28)
1566 #define EL_MM_KETTLE (EL_MM_START + 29)
1567 #define EL_MM_BOMB (EL_MM_START + 30)
1568 #define EL_MM_PRISM (EL_MM_START + 31)
1569 #define EL_MM_WALL_START (EL_MM_START + 32)
1570 #define EL_MM_WALL_EMPTY EL_MM_WALL_START
1571 #define EL_MM_WALL_00 EL_MM_WALL_START
1572 #define EL_MM_STEEL_WALL_START EL_MM_WALL_00
1573 #define EL_MM_STEEL_WALL_1 EL_MM_STEEL_WALL_START
1574 #define EL_MM_WALL_15 (EL_MM_START + 47)
1575 #define EL_MM_STEEL_WALL_END EL_MM_WALL_15
1576 #define EL_MM_WALL_16 (EL_MM_START + 48)
1577 #define EL_MM_WOODEN_WALL_START EL_MM_WALL_16
1578 #define EL_MM_WOODEN_WALL_1 EL_MM_WOODEN_WALL_START
1579 #define EL_MM_WALL_31 (EL_MM_START + 63)
1580 #define EL_MM_WOODEN_WALL_END EL_MM_WALL_31
1581 #define EL_MM_WALL_32 (EL_MM_START + 64)
1582 #define EL_MM_ICE_WALL_START EL_MM_WALL_32
1583 #define EL_MM_ICE_WALL_1 EL_MM_ICE_WALL_START
1584 #define EL_MM_WALL_47 (EL_MM_START + 79)
1585 #define EL_MM_ICE_WALL_END EL_MM_WALL_47
1586 #define EL_MM_WALL_48 (EL_MM_START + 80)
1587 #define EL_MM_AMOEBA_WALL_START EL_MM_WALL_48
1588 #define EL_MM_AMOEBA_WALL_1 EL_MM_AMOEBA_WALL_START
1589 #define EL_MM_WALL_63 (EL_MM_START + 95)
1590 #define EL_MM_AMOEBA_WALL_END EL_MM_WALL_63
1591 #define EL_MM_WALL_END EL_MM_WALL_63
1592 #define EL_MM_WOODEN_BLOCK (EL_MM_START + 96)
1593 #define EL_MM_GRAY_BALL (EL_MM_START + 97)
1594 #define EL_MM_BEAMER_START (EL_MM_START + 98)
1595 #define EL_MM_BEAMER_1 (EL_MM_BEAMER_START + 0)
1596 #define EL_MM_BEAMER_2 (EL_MM_BEAMER_START + 1)
1597 #define EL_MM_BEAMER_3 (EL_MM_BEAMER_START + 2)
1598 #define EL_MM_BEAMER_4 (EL_MM_BEAMER_START + 3)
1599 #define EL_MM_BEAMER_5 (EL_MM_BEAMER_START + 4)
1600 #define EL_MM_BEAMER_6 (EL_MM_BEAMER_START + 5)
1601 #define EL_MM_BEAMER_7 (EL_MM_BEAMER_START + 6)
1602 #define EL_MM_BEAMER_8 (EL_MM_BEAMER_START + 7)
1603 #define EL_MM_BEAMER_9 (EL_MM_BEAMER_START + 8)
1604 #define EL_MM_BEAMER_10 (EL_MM_BEAMER_START + 9)
1605 #define EL_MM_BEAMER_11 (EL_MM_BEAMER_START + 10)
1606 #define EL_MM_BEAMER_12 (EL_MM_BEAMER_START + 11)
1607 #define EL_MM_BEAMER_13 (EL_MM_BEAMER_START + 12)
1608 #define EL_MM_BEAMER_14 (EL_MM_BEAMER_START + 13)
1609 #define EL_MM_BEAMER_15 (EL_MM_BEAMER_START + 14)
1610 #define EL_MM_BEAMER_16 (EL_MM_BEAMER_START + 15)
1611 #define EL_MM_BEAMER_END EL_MM_BEAMER_15
1612 #define EL_MM_FUSE_ACTIVE (EL_MM_START + 114)
1613 #define EL_MM_PACMAN_START (EL_MM_START + 115)
1614 #define EL_MM_PACMAN_RIGHT (EL_MM_PACMAN_START + 0)
1615 #define EL_MM_PACMAN_UP (EL_MM_PACMAN_START + 1)
1616 #define EL_MM_PACMAN_LEFT (EL_MM_PACMAN_START + 2)
1617 #define EL_MM_PACMAN_DOWN (EL_MM_PACMAN_START + 3)
1618 #define EL_MM_PACMAN_END EL_MM_PACMAN_DOWN
1619 #define EL_MM_POLARISATOR_START (EL_MM_START + 119)
1620 #define EL_MM_POLARISATOR_1 (EL_MM_POLARISATOR_START + 0)
1621 #define EL_MM_POLARISATOR_2 (EL_MM_POLARISATOR_START + 1)
1622 #define EL_MM_POLARISATOR_3 (EL_MM_POLARISATOR_START + 2)
1623 #define EL_MM_POLARISATOR_4 (EL_MM_POLARISATOR_START + 3)
1624 #define EL_MM_POLARISATOR_5 (EL_MM_POLARISATOR_START + 4)
1625 #define EL_MM_POLARISATOR_6 (EL_MM_POLARISATOR_START + 5)
1626 #define EL_MM_POLARISATOR_7 (EL_MM_POLARISATOR_START + 6)
1627 #define EL_MM_POLARISATOR_8 (EL_MM_POLARISATOR_START + 7)
1628 #define EL_MM_POLARISATOR_9 (EL_MM_POLARISATOR_START + 8)
1629 #define EL_MM_POLARISATOR_10 (EL_MM_POLARISATOR_START + 9)
1630 #define EL_MM_POLARISATOR_11 (EL_MM_POLARISATOR_START + 10)
1631 #define EL_MM_POLARISATOR_12 (EL_MM_POLARISATOR_START + 11)
1632 #define EL_MM_POLARISATOR_13 (EL_MM_POLARISATOR_START + 12)
1633 #define EL_MM_POLARISATOR_14 (EL_MM_POLARISATOR_START + 13)
1634 #define EL_MM_POLARISATOR_15 (EL_MM_POLARISATOR_START + 14)
1635 #define EL_MM_POLARISATOR_16 (EL_MM_POLARISATOR_START + 15)
1636 #define EL_MM_POLARISATOR_END EL_MM_POLARISATOR_15
1637 #define EL_MM_POLARISATOR_CROSS_START (EL_MM_START + 135)
1638 #define EL_MM_POLARISATOR_CROSS_1 (EL_MM_POLARISATOR_CROSS_START + 0)
1639 #define EL_MM_POLARISATOR_CROSS_2 (EL_MM_POLARISATOR_CROSS_START + 1)
1640 #define EL_MM_POLARISATOR_CROSS_3 (EL_MM_POLARISATOR_CROSS_START + 2)
1641 #define EL_MM_POLARISATOR_CROSS_4 (EL_MM_POLARISATOR_CROSS_START + 3)
1642 #define EL_MM_POLARISATOR_CROSS_END EL_MM_POLARISATOR_CROSS_03
1643 #define EL_MM_MIRROR_FIXED_START (EL_MM_START + 139)
1644 #define EL_MM_MIRROR_FIXED_1 (EL_MM_MIRROR_FIXED_START + 0)
1645 #define EL_MM_MIRROR_FIXED_2 (EL_MM_MIRROR_FIXED_START + 1)
1646 #define EL_MM_MIRROR_FIXED_3 (EL_MM_MIRROR_FIXED_START + 2)
1647 #define EL_MM_MIRROR_FIXED_4 (EL_MM_MIRROR_FIXED_START + 3)
1648 #define EL_MM_MIRROR_FIXED_END EL_MM_MIRROR_FIXED_03
1649 #define EL_MM_STEEL_LOCK (EL_MM_START + 143)
1650 #define EL_MM_KEY (EL_MM_START + 144)
1651 #define EL_MM_LIGHTBULB (EL_MM_START + 145)
1652 #define EL_MM_LIGHTBULB_ACTIVE (EL_MM_START + 146)
1653 #define EL_MM_LIGHTBALL (EL_MM_START + 147)
1654 #define EL_MM_STEEL_BLOCK (EL_MM_START + 148)
1655 #define EL_MM_WOODEN_LOCK (EL_MM_START + 149)
1656 #define EL_MM_FUEL_FULL (EL_MM_START + 150)
1657 #define EL_MM_WOODEN_GRID_FIXED_START (EL_MM_START + 151)
1658 #define EL_MM_WOODEN_GRID_FIXED_1 (EL_MM_WOODEN_GRID_FIXED_START + 0)
1659 #define EL_MM_WOODEN_GRID_FIXED_2 (EL_MM_WOODEN_GRID_FIXED_START + 1)
1660 #define EL_MM_WOODEN_GRID_FIXED_3 (EL_MM_WOODEN_GRID_FIXED_START + 2)
1661 #define EL_MM_WOODEN_GRID_FIXED_4 (EL_MM_WOODEN_GRID_FIXED_START + 3)
1662 #define EL_MM_WOODEN_GRID_FIXED_END EL_MM_WOODEN_GRID_FIXED_03
1663 #define EL_MM_FUEL_EMPTY (EL_MM_START + 155)
1665 #define EL_MM_UNUSED_156 (EL_MM_START + 156)
1666 #define EL_MM_UNUSED_157 (EL_MM_START + 157)
1667 #define EL_MM_UNUSED_158 (EL_MM_START + 158)
1668 #define EL_MM_UNUSED_159 (EL_MM_START + 159)
1670 #define EL_MM_END_1 (EL_MM_START + 159)
1671 #define EL_MM_START_2 (EL_MM_START + 160)
1673 #define EL_DF_START EL_MM_START_2
1674 #define EL_DF_START2 (EL_DF_START - 240)
1676 #define EL_DF_MIRROR_START EL_DF_START
1677 #define EL_DF_MIRROR_1 (EL_DF_MIRROR_START + 0)
1678 #define EL_DF_MIRROR_2 (EL_DF_MIRROR_START + 1)
1679 #define EL_DF_MIRROR_3 (EL_DF_MIRROR_START + 2)
1680 #define EL_DF_MIRROR_4 (EL_DF_MIRROR_START + 3)
1681 #define EL_DF_MIRROR_5 (EL_DF_MIRROR_START + 4)
1682 #define EL_DF_MIRROR_6 (EL_DF_MIRROR_START + 5)
1683 #define EL_DF_MIRROR_7 (EL_DF_MIRROR_START + 6)
1684 #define EL_DF_MIRROR_8 (EL_DF_MIRROR_START + 7)
1685 #define EL_DF_MIRROR_9 (EL_DF_MIRROR_START + 8)
1686 #define EL_DF_MIRROR_10 (EL_DF_MIRROR_START + 9)
1687 #define EL_DF_MIRROR_11 (EL_DF_MIRROR_START + 10)
1688 #define EL_DF_MIRROR_12 (EL_DF_MIRROR_START + 11)
1689 #define EL_DF_MIRROR_13 (EL_DF_MIRROR_START + 12)
1690 #define EL_DF_MIRROR_14 (EL_DF_MIRROR_START + 13)
1691 #define EL_DF_MIRROR_15 (EL_DF_MIRROR_START + 14)
1692 #define EL_DF_MIRROR_16 (EL_DF_MIRROR_START + 15)
1693 #define EL_DF_MIRROR_END EL_DF_MIRROR_15
1695 #define EL_DF_WOODEN_GRID_FIXED_START (EL_DF_START2 + 256)
1696 #define EL_DF_WOODEN_GRID_FIXED_1 (EL_DF_WOODEN_GRID_FIXED_START + 0)
1697 #define EL_DF_WOODEN_GRID_FIXED_2 (EL_DF_WOODEN_GRID_FIXED_START + 1)
1698 #define EL_DF_WOODEN_GRID_FIXED_3 (EL_DF_WOODEN_GRID_FIXED_START + 2)
1699 #define EL_DF_WOODEN_GRID_FIXED_4 (EL_DF_WOODEN_GRID_FIXED_START + 3)
1700 #define EL_DF_WOODEN_GRID_FIXED_5 (EL_DF_WOODEN_GRID_FIXED_START + 4)
1701 #define EL_DF_WOODEN_GRID_FIXED_6 (EL_DF_WOODEN_GRID_FIXED_START + 5)
1702 #define EL_DF_WOODEN_GRID_FIXED_7 (EL_DF_WOODEN_GRID_FIXED_START + 6)
1703 #define EL_DF_WOODEN_GRID_FIXED_8 (EL_DF_WOODEN_GRID_FIXED_START + 7)
1704 #define EL_DF_WOODEN_GRID_FIXED_END EL_DF_WOODEN_GRID_FIXED_07
1706 #define EL_DF_STEEL_GRID_FIXED_START (EL_DF_START2 + 264)
1707 #define EL_DF_STEEL_GRID_FIXED_1 (EL_DF_STEEL_GRID_FIXED_START + 0)
1708 #define EL_DF_STEEL_GRID_FIXED_2 (EL_DF_STEEL_GRID_FIXED_START + 1)
1709 #define EL_DF_STEEL_GRID_FIXED_3 (EL_DF_STEEL_GRID_FIXED_START + 2)
1710 #define EL_DF_STEEL_GRID_FIXED_4 (EL_DF_STEEL_GRID_FIXED_START + 3)
1711 #define EL_DF_STEEL_GRID_FIXED_5 (EL_DF_STEEL_GRID_FIXED_START + 4)
1712 #define EL_DF_STEEL_GRID_FIXED_6 (EL_DF_STEEL_GRID_FIXED_START + 5)
1713 #define EL_DF_STEEL_GRID_FIXED_7 (EL_DF_STEEL_GRID_FIXED_START + 6)
1714 #define EL_DF_STEEL_GRID_FIXED_8 (EL_DF_STEEL_GRID_FIXED_START + 7)
1715 #define EL_DF_STEEL_GRID_FIXED_END EL_DF_STEEL_GRID_FIXED_07
1717 #define EL_DF_WOODEN_WALL_START (EL_DF_START2 + 272)
1718 #define EL_DF_WOODEN_WALL_1 (EL_DF_WOODEN_WALL_START + 0)
1719 #define EL_DF_WOODEN_WALL_END (EL_DF_WOODEN_WALL_START + 15)
1721 #define EL_DF_STEEL_WALL_START (EL_DF_START2 + 288)
1722 #define EL_DF_STEEL_WALL_1 (EL_DF_STEEL_WALL_START + 0)
1723 #define EL_DF_STEEL_WALL_END (EL_DF_STEEL_WALL_START + 15)
1725 #define EL_DF_WALL_START EL_DF_WOODEN_WALL_START
1726 #define EL_DF_WALL_END EL_DF_STEEL_WALL_END
1728 #define EL_DF_EMPTY (EL_DF_START2 + 304)
1729 #define EL_DF_CELL (EL_DF_START2 + 305)
1730 #define EL_DF_MINE (EL_DF_START2 + 306)
1731 #define EL_DF_REFRACTOR (EL_DF_START2 + 307)
1733 #define EL_DF_LASER_START (EL_DF_START2 + 308)
1734 #define EL_DF_LASER_RIGHT (EL_DF_LASER_START + 0)
1735 #define EL_DF_LASER_UP (EL_DF_LASER_START + 1)
1736 #define EL_DF_LASER_LEFT (EL_DF_LASER_START + 2)
1737 #define EL_DF_LASER_DOWN (EL_DF_LASER_START + 3)
1738 #define EL_DF_LASER_END EL_DF_LASER_DOWN
1740 #define EL_DF_RECEIVER_START (EL_DF_START2 + 312)
1741 #define EL_DF_RECEIVER_RIGHT (EL_DF_RECEIVER_START + 0)
1742 #define EL_DF_RECEIVER_UP (EL_DF_RECEIVER_START + 1)
1743 #define EL_DF_RECEIVER_LEFT (EL_DF_RECEIVER_START + 2)
1744 #define EL_DF_RECEIVER_DOWN (EL_DF_RECEIVER_START + 3)
1745 #define EL_DF_RECEIVER_END EL_DF_RECEIVER_DOWN
1747 #define EL_DF_FIBRE_OPTIC_START (EL_DF_START2 + 316)
1748 #define EL_DF_FIBRE_OPTIC_RED_1 (EL_DF_FIBRE_OPTIC_START + 0)
1749 #define EL_DF_FIBRE_OPTIC_RED_2 (EL_DF_FIBRE_OPTIC_START + 1)
1750 #define EL_DF_FIBRE_OPTIC_YELLOW_1 (EL_DF_FIBRE_OPTIC_START + 2)
1751 #define EL_DF_FIBRE_OPTIC_YELLOW_2 (EL_DF_FIBRE_OPTIC_START + 3)
1752 #define EL_DF_FIBRE_OPTIC_GREEN_1 (EL_DF_FIBRE_OPTIC_START + 4)
1753 #define EL_DF_FIBRE_OPTIC_GREEN_2 (EL_DF_FIBRE_OPTIC_START + 5)
1754 #define EL_DF_FIBRE_OPTIC_BLUE_1 (EL_DF_FIBRE_OPTIC_START + 6)
1755 #define EL_DF_FIBRE_OPTIC_BLUE_2 (EL_DF_FIBRE_OPTIC_START + 7)
1756 #define EL_DF_FIBRE_OPTIC_END EL_DF_FIBRE_OPTIC_07
1758 #define EL_DF_MIRROR_ROTATING_START (EL_DF_START2 + 324)
1759 #define EL_DF_MIRROR_ROTATING_1 (EL_DF_MIRROR_ROTATING_START + 0)
1760 #define EL_DF_MIRROR_ROTATING_2 (EL_DF_MIRROR_ROTATING_START + 1)
1761 #define EL_DF_MIRROR_ROTATING_3 (EL_DF_MIRROR_ROTATING_START + 2)
1762 #define EL_DF_MIRROR_ROTATING_4 (EL_DF_MIRROR_ROTATING_START + 3)
1763 #define EL_DF_MIRROR_ROTATING_5 (EL_DF_MIRROR_ROTATING_START + 4)
1764 #define EL_DF_MIRROR_ROTATING_6 (EL_DF_MIRROR_ROTATING_START + 5)
1765 #define EL_DF_MIRROR_ROTATING_7 (EL_DF_MIRROR_ROTATING_START + 6)
1766 #define EL_DF_MIRROR_ROTATING_8 (EL_DF_MIRROR_ROTATING_START + 7)
1767 #define EL_DF_MIRROR_ROTATING_9 (EL_DF_MIRROR_ROTATING_START + 8)
1768 #define EL_DF_MIRROR_ROTATING_10 (EL_DF_MIRROR_ROTATING_START + 9)
1769 #define EL_DF_MIRROR_ROTATING_11 (EL_DF_MIRROR_ROTATING_START + 10)
1770 #define EL_DF_MIRROR_ROTATING_12 (EL_DF_MIRROR_ROTATING_START + 11)
1771 #define EL_DF_MIRROR_ROTATING_13 (EL_DF_MIRROR_ROTATING_START + 12)
1772 #define EL_DF_MIRROR_ROTATING_14 (EL_DF_MIRROR_ROTATING_START + 13)
1773 #define EL_DF_MIRROR_ROTATING_15 (EL_DF_MIRROR_ROTATING_START + 14)
1774 #define EL_DF_MIRROR_ROTATING_16 (EL_DF_MIRROR_ROTATING_START + 15)
1775 #define EL_DF_MIRROR_ROTATING_END EL_DF_MIRROR_ROTATING_15
1777 #define EL_DF_WOODEN_GRID_ROTATING_START (EL_DF_START2 + 340)
1778 #define EL_DF_WOODEN_GRID_ROTATING_1 (EL_DF_WOODEN_GRID_ROTATING_START + 0)
1779 #define EL_DF_WOODEN_GRID_ROTATING_2 (EL_DF_WOODEN_GRID_ROTATING_START + 1)
1780 #define EL_DF_WOODEN_GRID_ROTATING_3 (EL_DF_WOODEN_GRID_ROTATING_START + 2)
1781 #define EL_DF_WOODEN_GRID_ROTATING_4 (EL_DF_WOODEN_GRID_ROTATING_START + 3)
1782 #define EL_DF_WOODEN_GRID_ROTATING_5 (EL_DF_WOODEN_GRID_ROTATING_START + 4)
1783 #define EL_DF_WOODEN_GRID_ROTATING_6 (EL_DF_WOODEN_GRID_ROTATING_START + 5)
1784 #define EL_DF_WOODEN_GRID_ROTATING_7 (EL_DF_WOODEN_GRID_ROTATING_START + 6)
1785 #define EL_DF_WOODEN_GRID_ROTATING_8 (EL_DF_WOODEN_GRID_ROTATING_START + 7)
1786 #define EL_DF_WOODEN_GRID_ROTATING_END EL_DF_WOODEN_GRID_ROTATING_07
1788 #define EL_DF_STEEL_GRID_ROTATING_START (EL_DF_START2 + 348)
1789 #define EL_DF_STEEL_GRID_ROTATING_1 (EL_DF_STEEL_GRID_ROTATING_START + 0)
1790 #define EL_DF_STEEL_GRID_ROTATING_2 (EL_DF_STEEL_GRID_ROTATING_START + 1)
1791 #define EL_DF_STEEL_GRID_ROTATING_3 (EL_DF_STEEL_GRID_ROTATING_START + 2)
1792 #define EL_DF_STEEL_GRID_ROTATING_4 (EL_DF_STEEL_GRID_ROTATING_START + 3)
1793 #define EL_DF_STEEL_GRID_ROTATING_5 (EL_DF_STEEL_GRID_ROTATING_START + 4)
1794 #define EL_DF_STEEL_GRID_ROTATING_6 (EL_DF_STEEL_GRID_ROTATING_START + 5)
1795 #define EL_DF_STEEL_GRID_ROTATING_7 (EL_DF_STEEL_GRID_ROTATING_START + 6)
1796 #define EL_DF_STEEL_GRID_ROTATING_8 (EL_DF_STEEL_GRID_ROTATING_START + 7)
1797 #define EL_DF_STEEL_GRID_ROTATING_END EL_DF_STEEL_GRID_ROTATING_07
1799 #define EL_DF_END (EL_DF_START2 + 355)
1801 #define EL_MM_BEAMER_RED_START (EL_DF_START2 + 356)
1802 #define EL_MM_BEAMER_RED_1 (EL_MM_BEAMER_RED_START + 0)
1803 #define EL_MM_BEAMER_RED_2 (EL_MM_BEAMER_RED_START + 1)
1804 #define EL_MM_BEAMER_RED_3 (EL_MM_BEAMER_RED_START + 2)
1805 #define EL_MM_BEAMER_RED_4 (EL_MM_BEAMER_RED_START + 3)
1806 #define EL_MM_BEAMER_RED_5 (EL_MM_BEAMER_RED_START + 4)
1807 #define EL_MM_BEAMER_RED_6 (EL_MM_BEAMER_RED_START + 5)
1808 #define EL_MM_BEAMER_RED_7 (EL_MM_BEAMER_RED_START + 6)
1809 #define EL_MM_BEAMER_RED_8 (EL_MM_BEAMER_RED_START + 7)
1810 #define EL_MM_BEAMER_RED_9 (EL_MM_BEAMER_RED_START + 8)
1811 #define EL_MM_BEAMER_RED_10 (EL_MM_BEAMER_RED_START + 9)
1812 #define EL_MM_BEAMER_RED_11 (EL_MM_BEAMER_RED_START + 10)
1813 #define EL_MM_BEAMER_RED_12 (EL_MM_BEAMER_RED_START + 11)
1814 #define EL_MM_BEAMER_RED_13 (EL_MM_BEAMER_RED_START + 12)
1815 #define EL_MM_BEAMER_RED_14 (EL_MM_BEAMER_RED_START + 13)
1816 #define EL_MM_BEAMER_RED_15 (EL_MM_BEAMER_RED_START + 14)
1817 #define EL_MM_BEAMER_RED_16 (EL_MM_BEAMER_RED_START + 15)
1818 #define EL_MM_BEAMER_RED_END EL_MM_BEAMER_RED_16
1819 #define EL_MM_BEAMER_YELLOW_START (EL_DF_START2 + 372)
1820 #define EL_MM_BEAMER_YELLOW_1 (EL_MM_BEAMER_YELLOW_START + 0)
1821 #define EL_MM_BEAMER_YELLOW_2 (EL_MM_BEAMER_YELLOW_START + 1)
1822 #define EL_MM_BEAMER_YELLOW_3 (EL_MM_BEAMER_YELLOW_START + 2)
1823 #define EL_MM_BEAMER_YELLOW_4 (EL_MM_BEAMER_YELLOW_START + 3)
1824 #define EL_MM_BEAMER_YELLOW_5 (EL_MM_BEAMER_YELLOW_START + 4)
1825 #define EL_MM_BEAMER_YELLOW_6 (EL_MM_BEAMER_YELLOW_START + 5)
1826 #define EL_MM_BEAMER_YELLOW_7 (EL_MM_BEAMER_YELLOW_START + 6)
1827 #define EL_MM_BEAMER_YELLOW_8 (EL_MM_BEAMER_YELLOW_START + 7)
1828 #define EL_MM_BEAMER_YELLOW_9 (EL_MM_BEAMER_YELLOW_START + 8)
1829 #define EL_MM_BEAMER_YELLOW_10 (EL_MM_BEAMER_YELLOW_START + 9)
1830 #define EL_MM_BEAMER_YELLOW_11 (EL_MM_BEAMER_YELLOW_START + 10)
1831 #define EL_MM_BEAMER_YELLOW_12 (EL_MM_BEAMER_YELLOW_START + 11)
1832 #define EL_MM_BEAMER_YELLOW_13 (EL_MM_BEAMER_YELLOW_START + 12)
1833 #define EL_MM_BEAMER_YELLOW_14 (EL_MM_BEAMER_YELLOW_START + 13)
1834 #define EL_MM_BEAMER_YELLOW_15 (EL_MM_BEAMER_YELLOW_START + 14)
1835 #define EL_MM_BEAMER_YELLOW_16 (EL_MM_BEAMER_YELLOW_START + 15)
1836 #define EL_MM_BEAMER_YELLOW_END EL_MM_BEAMER_YELLOW_16
1837 #define EL_MM_BEAMER_GREEN_START (EL_DF_START2 + 388)
1838 #define EL_MM_BEAMER_GREEN_1 (EL_MM_BEAMER_GREEN_START + 0)
1839 #define EL_MM_BEAMER_GREEN_2 (EL_MM_BEAMER_GREEN_START + 1)
1840 #define EL_MM_BEAMER_GREEN_3 (EL_MM_BEAMER_GREEN_START + 2)
1841 #define EL_MM_BEAMER_GREEN_4 (EL_MM_BEAMER_GREEN_START + 3)
1842 #define EL_MM_BEAMER_GREEN_5 (EL_MM_BEAMER_GREEN_START + 4)
1843 #define EL_MM_BEAMER_GREEN_6 (EL_MM_BEAMER_GREEN_START + 5)
1844 #define EL_MM_BEAMER_GREEN_7 (EL_MM_BEAMER_GREEN_START + 6)
1845 #define EL_MM_BEAMER_GREEN_8 (EL_MM_BEAMER_GREEN_START + 7)
1846 #define EL_MM_BEAMER_GREEN_9 (EL_MM_BEAMER_GREEN_START + 8)
1847 #define EL_MM_BEAMER_GREEN_10 (EL_MM_BEAMER_GREEN_START + 9)
1848 #define EL_MM_BEAMER_GREEN_11 (EL_MM_BEAMER_GREEN_START + 10)
1849 #define EL_MM_BEAMER_GREEN_12 (EL_MM_BEAMER_GREEN_START + 11)
1850 #define EL_MM_BEAMER_GREEN_13 (EL_MM_BEAMER_GREEN_START + 12)
1851 #define EL_MM_BEAMER_GREEN_14 (EL_MM_BEAMER_GREEN_START + 13)
1852 #define EL_MM_BEAMER_GREEN_15 (EL_MM_BEAMER_GREEN_START + 14)
1853 #define EL_MM_BEAMER_GREEN_16 (EL_MM_BEAMER_GREEN_START + 15)
1854 #define EL_MM_BEAMER_GREEN_END EL_MM_BEAMER_GREEN_16
1855 #define EL_MM_BEAMER_BLUE_START (EL_DF_START2 + 404)
1856 #define EL_MM_BEAMER_BLUE_1 (EL_MM_BEAMER_BLUE_START + 0)
1857 #define EL_MM_BEAMER_BLUE_2 (EL_MM_BEAMER_BLUE_START + 1)
1858 #define EL_MM_BEAMER_BLUE_3 (EL_MM_BEAMER_BLUE_START + 2)
1859 #define EL_MM_BEAMER_BLUE_4 (EL_MM_BEAMER_BLUE_START + 3)
1860 #define EL_MM_BEAMER_BLUE_5 (EL_MM_BEAMER_BLUE_START + 4)
1861 #define EL_MM_BEAMER_BLUE_6 (EL_MM_BEAMER_BLUE_START + 5)
1862 #define EL_MM_BEAMER_BLUE_7 (EL_MM_BEAMER_BLUE_START + 6)
1863 #define EL_MM_BEAMER_BLUE_8 (EL_MM_BEAMER_BLUE_START + 7)
1864 #define EL_MM_BEAMER_BLUE_9 (EL_MM_BEAMER_BLUE_START + 8)
1865 #define EL_MM_BEAMER_BLUE_10 (EL_MM_BEAMER_BLUE_START + 9)
1866 #define EL_MM_BEAMER_BLUE_11 (EL_MM_BEAMER_BLUE_START + 10)
1867 #define EL_MM_BEAMER_BLUE_12 (EL_MM_BEAMER_BLUE_START + 11)
1868 #define EL_MM_BEAMER_BLUE_13 (EL_MM_BEAMER_BLUE_START + 12)
1869 #define EL_MM_BEAMER_BLUE_14 (EL_MM_BEAMER_BLUE_START + 13)
1870 #define EL_MM_BEAMER_BLUE_15 (EL_MM_BEAMER_BLUE_START + 14)
1871 #define EL_MM_BEAMER_BLUE_16 (EL_MM_BEAMER_BLUE_START + 15)
1872 #define EL_MM_BEAMER_BLUE_END EL_MM_BEAMER_BLUE_16
1874 #define EL_MM_MCDUFFIN 1204
1875 #define EL_MM_PACMAN 1205
1876 #define EL_MM_FUSE 1206
1877 #define EL_MM_STEEL_WALL 1207
1878 #define EL_MM_WOODEN_WALL 1208
1879 #define EL_MM_ICE_WALL 1209
1880 #define EL_MM_AMOEBA_WALL 1210
1881 #define EL_DF_LASER 1211
1882 #define EL_DF_RECEIVER 1212
1883 #define EL_DF_STEEL_WALL 1213
1884 #define EL_DF_WOODEN_WALL 1214
1886 #define EL_MM_END_2 (EL_DF_START2 + 430)
1887 #define EL_MM_END EL_MM_END_2
1889 #define NUM_FILE_ELEMENTS 1215
1892 /* "real" (and therefore drawable) runtime elements */
1893 #define EL_FIRST_RUNTIME_REAL NUM_FILE_ELEMENTS
1895 #define EL_DYNABOMB_PLAYER_1_ACTIVE (EL_FIRST_RUNTIME_REAL + 0)
1896 #define EL_DYNABOMB_PLAYER_2_ACTIVE (EL_FIRST_RUNTIME_REAL + 1)
1897 #define EL_DYNABOMB_PLAYER_3_ACTIVE (EL_FIRST_RUNTIME_REAL + 2)
1898 #define EL_DYNABOMB_PLAYER_4_ACTIVE (EL_FIRST_RUNTIME_REAL + 3)
1899 #define EL_SP_DISK_RED_ACTIVE (EL_FIRST_RUNTIME_REAL + 4)
1900 #define EL_SWITCHGATE_OPENING (EL_FIRST_RUNTIME_REAL + 5)
1901 #define EL_SWITCHGATE_CLOSING (EL_FIRST_RUNTIME_REAL + 6)
1902 #define EL_TIMEGATE_OPENING (EL_FIRST_RUNTIME_REAL + 7)
1903 #define EL_TIMEGATE_CLOSING (EL_FIRST_RUNTIME_REAL + 8)
1904 #define EL_PEARL_BREAKING (EL_FIRST_RUNTIME_REAL + 9)
1905 #define EL_TRAP_ACTIVE (EL_FIRST_RUNTIME_REAL + 10)
1906 #define EL_INVISIBLE_STEELWALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 11)
1907 #define EL_INVISIBLE_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 12)
1908 #define EL_INVISIBLE_SAND_ACTIVE (EL_FIRST_RUNTIME_REAL + 13)
1909 #define EL_CONVEYOR_BELT_1_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 14)
1910 #define EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 15)
1911 #define EL_CONVEYOR_BELT_1_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 16)
1912 #define EL_CONVEYOR_BELT_2_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 17)
1913 #define EL_CONVEYOR_BELT_2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 18)
1914 #define EL_CONVEYOR_BELT_2_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 19)
1915 #define EL_CONVEYOR_BELT_3_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 20)
1916 #define EL_CONVEYOR_BELT_3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 21)
1917 #define EL_CONVEYOR_BELT_3_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 22)
1918 #define EL_CONVEYOR_BELT_4_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 23)
1919 #define EL_CONVEYOR_BELT_4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 24)
1920 #define EL_CONVEYOR_BELT_4_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 25)
1921 #define EL_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 26)
1922 #define EL_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 27)
1923 #define EL_STEEL_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 28)
1924 #define EL_STEEL_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 29)
1925 #define EL_EM_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 30)
1926 #define EL_EM_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 31)
1927 #define EL_EM_STEEL_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 32)
1928 #define EL_EM_STEEL_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 33)
1929 #define EL_SP_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 34)
1930 #define EL_SP_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 35)
1931 #define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME_REAL + 36)
1932 #define EL_SP_TERMINAL_ACTIVE (EL_FIRST_RUNTIME_REAL + 37)
1933 #define EL_SP_BUGGY_BASE_ACTIVATING (EL_FIRST_RUNTIME_REAL + 38)
1934 #define EL_SP_BUGGY_BASE_ACTIVE (EL_FIRST_RUNTIME_REAL + 39)
1935 #define EL_SP_MURPHY_CLONE (EL_FIRST_RUNTIME_REAL + 40)
1936 #define EL_AMOEBA_DROPPING (EL_FIRST_RUNTIME_REAL + 41)
1937 #define EL_QUICKSAND_EMPTYING (EL_FIRST_RUNTIME_REAL + 42)
1938 #define EL_QUICKSAND_FAST_EMPTYING (EL_FIRST_RUNTIME_REAL + 43)
1939 #define EL_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 44)
1940 #define EL_BD_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 45)
1941 #define EL_DC_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 46)
1942 #define EL_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 47)
1943 #define EL_BD_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 48)
1944 #define EL_DC_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 49)
1945 #define EL_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 50)
1946 #define EL_BD_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 51)
1947 #define EL_DC_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 52)
1948 #define EL_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 53)
1949 #define EL_BD_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 54)
1950 #define EL_DC_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 55)
1951 #define EL_EMC_FAKE_GRASS_ACTIVE (EL_FIRST_RUNTIME_REAL + 56)
1952 #define EL_GATE_1_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 57)
1953 #define EL_GATE_2_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 58)
1954 #define EL_GATE_3_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 59)
1955 #define EL_GATE_4_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 60)
1956 #define EL_EM_GATE_1_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 61)
1957 #define EL_EM_GATE_2_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 62)
1958 #define EL_EM_GATE_3_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 63)
1959 #define EL_EM_GATE_4_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 64)
1960 #define EL_EMC_GATE_5_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 65)
1961 #define EL_EMC_GATE_6_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 66)
1962 #define EL_EMC_GATE_7_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 67)
1963 #define EL_EMC_GATE_8_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 68)
1964 #define EL_DC_GATE_WHITE_GRAY_ACTIVE (EL_FIRST_RUNTIME_REAL + 69)
1965 #define EL_EMC_DRIPPER_ACTIVE (EL_FIRST_RUNTIME_REAL + 70)
1966 #define EL_EMC_SPRING_BUMPER_ACTIVE (EL_FIRST_RUNTIME_REAL + 71)
1967 #define EL_MM_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 72)
1968 #define EL_MM_EXIT_CLOSING (EL_FIRST_RUNTIME_REAL + 73)
1969 #define EL_MM_GRAY_BALL_OPENING (EL_FIRST_RUNTIME_REAL + 74)
1970 #define EL_MM_ICE_WALL_SHRINKING (EL_FIRST_RUNTIME_REAL + 75)
1971 #define EL_MM_AMOEBA_WALL_GROWING (EL_FIRST_RUNTIME_REAL + 76)
1972 #define EL_MM_PACMAN_EATING_RIGHT (EL_FIRST_RUNTIME_REAL + 77)
1973 #define EL_MM_PACMAN_EATING_UP (EL_FIRST_RUNTIME_REAL + 78)
1974 #define EL_MM_PACMAN_EATING_LEFT (EL_FIRST_RUNTIME_REAL + 79)
1975 #define EL_MM_PACMAN_EATING_DOWN (EL_FIRST_RUNTIME_REAL + 80)
1977 #define NUM_DRAWABLE_ELEMENTS (EL_FIRST_RUNTIME_REAL + 81)
1979 #define EL_MM_RUNTIME_START EL_MM_EXIT_OPENING
1980 #define EL_MM_RUNTIME_END EL_MM_AMOEBA_WALL_GROWING
1982 /* "unreal" (and therefore not drawable) runtime elements */
1983 #define EL_FIRST_RUNTIME_UNREAL (NUM_DRAWABLE_ELEMENTS)
1985 #define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0)
1986 #define EL_EXPLOSION (EL_FIRST_RUNTIME_UNREAL + 1)
1987 #define EL_NUT_BREAKING (EL_FIRST_RUNTIME_UNREAL + 2)
1988 #define EL_DIAMOND_BREAKING (EL_FIRST_RUNTIME_UNREAL + 3)
1989 #define EL_ACID_SPLASH_LEFT (EL_FIRST_RUNTIME_UNREAL + 4)
1990 #define EL_ACID_SPLASH_RIGHT (EL_FIRST_RUNTIME_UNREAL + 5)
1991 #define EL_AMOEBA_GROWING (EL_FIRST_RUNTIME_UNREAL + 6)
1992 #define EL_AMOEBA_SHRINKING (EL_FIRST_RUNTIME_UNREAL + 7)
1993 #define EL_EXPANDABLE_WALL_GROWING (EL_FIRST_RUNTIME_UNREAL + 8)
1994 #define EL_EXPANDABLE_STEELWALL_GROWING (EL_FIRST_RUNTIME_UNREAL + 9)
1995 #define EL_FLAMES (EL_FIRST_RUNTIME_UNREAL + 10)
1996 #define EL_PLAYER_IS_LEAVING (EL_FIRST_RUNTIME_UNREAL + 11)
1997 #define EL_PLAYER_IS_EXPLODING_1 (EL_FIRST_RUNTIME_UNREAL + 12)
1998 #define EL_PLAYER_IS_EXPLODING_2 (EL_FIRST_RUNTIME_UNREAL + 13)
1999 #define EL_PLAYER_IS_EXPLODING_3 (EL_FIRST_RUNTIME_UNREAL + 14)
2000 #define EL_PLAYER_IS_EXPLODING_4 (EL_FIRST_RUNTIME_UNREAL + 15)
2001 #define EL_QUICKSAND_FILLING (EL_FIRST_RUNTIME_UNREAL + 16)
2002 #define EL_QUICKSAND_FAST_FILLING (EL_FIRST_RUNTIME_UNREAL + 17)
2003 #define EL_MAGIC_WALL_FILLING (EL_FIRST_RUNTIME_UNREAL + 18)
2004 #define EL_BD_MAGIC_WALL_FILLING (EL_FIRST_RUNTIME_UNREAL + 19)
2005 #define EL_DC_MAGIC_WALL_FILLING (EL_FIRST_RUNTIME_UNREAL + 20)
2006 #define EL_ELEMENT_SNAPPING (EL_FIRST_RUNTIME_UNREAL + 21)
2007 #define EL_DIAGONAL_SHRINKING (EL_FIRST_RUNTIME_UNREAL + 22)
2008 #define EL_DIAGONAL_GROWING (EL_FIRST_RUNTIME_UNREAL + 23)
2010 #define NUM_RUNTIME_ELEMENTS (EL_FIRST_RUNTIME_UNREAL + 24)
2012 /* dummy elements (never used as game elements, only used as graphics) */
2013 #define EL_FIRST_DUMMY NUM_RUNTIME_ELEMENTS
2015 #define EL_STEELWALL_TOPLEFT (EL_FIRST_DUMMY + 0)
2016 #define EL_STEELWALL_TOPRIGHT (EL_FIRST_DUMMY + 1)
2017 #define EL_STEELWALL_BOTTOMLEFT (EL_FIRST_DUMMY + 2)
2018 #define EL_STEELWALL_BOTTOMRIGHT (EL_FIRST_DUMMY + 3)
2019 #define EL_STEELWALL_HORIZONTAL (EL_FIRST_DUMMY + 4)
2020 #define EL_STEELWALL_VERTICAL (EL_FIRST_DUMMY + 5)
2021 #define EL_INVISIBLE_STEELWALL_TOPLEFT (EL_FIRST_DUMMY + 6)
2022 #define EL_INVISIBLE_STEELWALL_TOPRIGHT (EL_FIRST_DUMMY + 7)
2023 #define EL_INVISIBLE_STEELWALL_BOTTOMLEFT (EL_FIRST_DUMMY + 8)
2024 #define EL_INVISIBLE_STEELWALL_BOTTOMRIGHT (EL_FIRST_DUMMY + 9)
2025 #define EL_INVISIBLE_STEELWALL_HORIZONTAL (EL_FIRST_DUMMY + 10)
2026 #define EL_INVISIBLE_STEELWALL_VERTICAL (EL_FIRST_DUMMY + 11)
2027 #define EL_DYNABOMB (EL_FIRST_DUMMY + 12)
2028 #define EL_DYNABOMB_ACTIVE (EL_FIRST_DUMMY + 13)
2029 #define EL_DYNABOMB_PLAYER_1 (EL_FIRST_DUMMY + 14)
2030 #define EL_DYNABOMB_PLAYER_2 (EL_FIRST_DUMMY + 15)
2031 #define EL_DYNABOMB_PLAYER_3 (EL_FIRST_DUMMY + 16)
2032 #define EL_DYNABOMB_PLAYER_4 (EL_FIRST_DUMMY + 17)
2033 #define EL_SHIELD_NORMAL_ACTIVE (EL_FIRST_DUMMY + 18)
2034 #define EL_SHIELD_DEADLY_ACTIVE (EL_FIRST_DUMMY + 19)
2035 #define EL_AMOEBA (EL_FIRST_DUMMY + 20)
2036 #define EL_MM_LIGHTBALL_RED (EL_FIRST_DUMMY + 21)
2037 #define EL_MM_LIGHTBALL_BLUE (EL_FIRST_DUMMY + 22)
2038 #define EL_MM_LIGHTBALL_YELLOW (EL_FIRST_DUMMY + 23)
2039 #define EL_MM_MASK_MCDUFFIN_RIGHT (EL_FIRST_DUMMY + 24)
2040 #define EL_MM_MASK_MCDUFFIN_UP (EL_FIRST_DUMMY + 25)
2041 #define EL_MM_MASK_MCDUFFIN_LEFT (EL_FIRST_DUMMY + 26)
2042 #define EL_MM_MASK_MCDUFFIN_DOWN (EL_FIRST_DUMMY + 27)
2043 #define EL_MM_MASK_GRID_1 (EL_FIRST_DUMMY + 28)
2044 #define EL_MM_MASK_GRID_2 (EL_FIRST_DUMMY + 29)
2045 #define EL_MM_MASK_GRID_3 (EL_FIRST_DUMMY + 30)
2046 #define EL_MM_MASK_GRID_4 (EL_FIRST_DUMMY + 31)
2047 #define EL_MM_MASK_RECTANGLE (EL_FIRST_DUMMY + 32)
2048 #define EL_MM_MASK_CIRCLE (EL_FIRST_DUMMY + 33)
2049 #define EL_DEFAULT (EL_FIRST_DUMMY + 34)
2050 #define EL_BD_DEFAULT (EL_FIRST_DUMMY + 35)
2051 #define EL_SP_DEFAULT (EL_FIRST_DUMMY + 36)
2052 #define EL_SB_DEFAULT (EL_FIRST_DUMMY + 37)
2053 #define EL_MM_DEFAULT (EL_FIRST_DUMMY + 38)
2054 #define EL_GRAPHIC_1 (EL_FIRST_DUMMY + 39)
2055 #define EL_GRAPHIC_2 (EL_FIRST_DUMMY + 40)
2056 #define EL_GRAPHIC_3 (EL_FIRST_DUMMY + 41)
2057 #define EL_GRAPHIC_4 (EL_FIRST_DUMMY + 42)
2058 #define EL_GRAPHIC_5 (EL_FIRST_DUMMY + 43)
2059 #define EL_GRAPHIC_6 (EL_FIRST_DUMMY + 44)
2060 #define EL_GRAPHIC_7 (EL_FIRST_DUMMY + 45)
2061 #define EL_GRAPHIC_8 (EL_FIRST_DUMMY + 46)
2063 #define EL_MM_DUMMY_START EL_MM_MASK_MCDUFFIN_RIGHT
2064 #define EL_MM_DUMMY_END EL_MM_MASK_CIRCLE
2066 /* internal elements (only used for internal purposes like copying) */
2067 #define EL_FIRST_INTERNAL (EL_FIRST_DUMMY + 47)
2069 #define EL_INTERNAL_CLIPBOARD_CUSTOM (EL_FIRST_INTERNAL + 0)
2070 #define EL_INTERNAL_CLIPBOARD_CHANGE (EL_FIRST_INTERNAL + 1)
2071 #define EL_INTERNAL_CLIPBOARD_GROUP (EL_FIRST_INTERNAL + 2)
2072 #define EL_INTERNAL_DUMMY (EL_FIRST_INTERNAL + 3)
2074 #define EL_INTERNAL_CASCADE_BD (EL_FIRST_INTERNAL + 4)
2075 #define EL_INTERNAL_CASCADE_BD_ACTIVE (EL_FIRST_INTERNAL + 5)
2076 #define EL_INTERNAL_CASCADE_EM (EL_FIRST_INTERNAL + 6)
2077 #define EL_INTERNAL_CASCADE_EM_ACTIVE (EL_FIRST_INTERNAL + 7)
2078 #define EL_INTERNAL_CASCADE_EMC (EL_FIRST_INTERNAL + 8)
2079 #define EL_INTERNAL_CASCADE_EMC_ACTIVE (EL_FIRST_INTERNAL + 9)
2080 #define EL_INTERNAL_CASCADE_RND (EL_FIRST_INTERNAL + 10)
2081 #define EL_INTERNAL_CASCADE_RND_ACTIVE (EL_FIRST_INTERNAL + 11)
2082 #define EL_INTERNAL_CASCADE_SB (EL_FIRST_INTERNAL + 12)
2083 #define EL_INTERNAL_CASCADE_SB_ACTIVE (EL_FIRST_INTERNAL + 13)
2084 #define EL_INTERNAL_CASCADE_SP (EL_FIRST_INTERNAL + 14)
2085 #define EL_INTERNAL_CASCADE_SP_ACTIVE (EL_FIRST_INTERNAL + 15)
2086 #define EL_INTERNAL_CASCADE_DC (EL_FIRST_INTERNAL + 16)
2087 #define EL_INTERNAL_CASCADE_DC_ACTIVE (EL_FIRST_INTERNAL + 17)
2088 #define EL_INTERNAL_CASCADE_DX (EL_FIRST_INTERNAL + 18)
2089 #define EL_INTERNAL_CASCADE_DX_ACTIVE (EL_FIRST_INTERNAL + 19)
2090 #define EL_INTERNAL_CASCADE_MM (EL_FIRST_INTERNAL + 20)
2091 #define EL_INTERNAL_CASCADE_MM_ACTIVE (EL_FIRST_INTERNAL + 21)
2092 #define EL_INTERNAL_CASCADE_DF (EL_FIRST_INTERNAL + 22)
2093 #define EL_INTERNAL_CASCADE_DF_ACTIVE (EL_FIRST_INTERNAL + 23)
2094 #define EL_INTERNAL_CASCADE_CHARS (EL_FIRST_INTERNAL + 24)
2095 #define EL_INTERNAL_CASCADE_CHARS_ACTIVE (EL_FIRST_INTERNAL + 25)
2096 #define EL_INTERNAL_CASCADE_STEEL_CHARS (EL_FIRST_INTERNAL + 26)
2097 #define EL_INTERNAL_CASCADE_STEEL_CHARS_ACTIVE (EL_FIRST_INTERNAL + 27)
2098 #define EL_INTERNAL_CASCADE_CE (EL_FIRST_INTERNAL + 28)
2099 #define EL_INTERNAL_CASCADE_CE_ACTIVE (EL_FIRST_INTERNAL + 29)
2100 #define EL_INTERNAL_CASCADE_GE (EL_FIRST_INTERNAL + 30)
2101 #define EL_INTERNAL_CASCADE_GE_ACTIVE (EL_FIRST_INTERNAL + 31)
2102 #define EL_INTERNAL_CASCADE_REF (EL_FIRST_INTERNAL + 32)
2103 #define EL_INTERNAL_CASCADE_REF_ACTIVE (EL_FIRST_INTERNAL + 33)
2104 #define EL_INTERNAL_CASCADE_USER (EL_FIRST_INTERNAL + 34)
2105 #define EL_INTERNAL_CASCADE_USER_ACTIVE (EL_FIRST_INTERNAL + 35)
2106 #define EL_INTERNAL_CASCADE_DYNAMIC (EL_FIRST_INTERNAL + 36)
2107 #define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE (EL_FIRST_INTERNAL + 37)
2109 #define EL_INTERNAL_CLIPBOARD_START (EL_FIRST_INTERNAL + 0)
2110 #define EL_INTERNAL_CLIPBOARD_END (EL_FIRST_INTERNAL + 2)
2111 #define EL_INTERNAL_START (EL_FIRST_INTERNAL + 0)
2112 #define EL_INTERNAL_END (EL_FIRST_INTERNAL + 37)
2114 #define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 38)
2117 /* values for graphics/sounds action types */
2118 #define ACTION_DEFAULT 0
2119 #define ACTION_WAITING 1
2120 #define ACTION_FALLING 2
2121 #define ACTION_MOVING 3
2122 #define ACTION_DIGGING 4
2123 #define ACTION_SNAPPING 5
2124 #define ACTION_COLLECTING 6
2125 #define ACTION_DROPPING 7
2126 #define ACTION_PUSHING 8
2127 #define ACTION_WALKING 9
2128 #define ACTION_PASSING 10
2129 #define ACTION_IMPACT 11
2130 #define ACTION_BREAKING 12
2131 #define ACTION_ACTIVATING 13
2132 #define ACTION_DEACTIVATING 14
2133 #define ACTION_OPENING 15
2134 #define ACTION_CLOSING 16
2135 #define ACTION_ATTACKING 17
2136 #define ACTION_GROWING 18
2137 #define ACTION_SHRINKING 19
2138 #define ACTION_ACTIVE 20
2139 #define ACTION_FILLING 21
2140 #define ACTION_EMPTYING 22
2141 #define ACTION_CHANGING 23
2142 #define ACTION_EXPLODING 24
2143 #define ACTION_BORING 25
2144 #define ACTION_BORING_1 26
2145 #define ACTION_BORING_2 27
2146 #define ACTION_BORING_3 28
2147 #define ACTION_BORING_4 29
2148 #define ACTION_BORING_5 30
2149 #define ACTION_BORING_6 31
2150 #define ACTION_BORING_7 32
2151 #define ACTION_BORING_8 33
2152 #define ACTION_BORING_9 34
2153 #define ACTION_BORING_10 35
2154 #define ACTION_SLEEPING 36
2155 #define ACTION_SLEEPING_1 37
2156 #define ACTION_SLEEPING_2 38
2157 #define ACTION_SLEEPING_3 39
2158 #define ACTION_AWAKENING 40
2159 #define ACTION_DYING 41
2160 #define ACTION_TURNING 42
2161 #define ACTION_TURNING_FROM_LEFT 43
2162 #define ACTION_TURNING_FROM_RIGHT 44
2163 #define ACTION_TURNING_FROM_UP 45
2164 #define ACTION_TURNING_FROM_DOWN 46
2165 #define ACTION_SMASHED_BY_ROCK 47
2166 #define ACTION_SMASHED_BY_SPRING 48
2167 #define ACTION_EATING 49
2168 #define ACTION_TWINKLING 50
2169 #define ACTION_SPLASHING 51
2170 #define ACTION_HITTING 52
2171 #define ACTION_PAGE_1 53
2172 #define ACTION_PAGE_2 54
2173 #define ACTION_PAGE_3 55
2174 #define ACTION_PAGE_4 56
2175 #define ACTION_PAGE_5 57
2176 #define ACTION_PAGE_6 58
2177 #define ACTION_PAGE_7 59
2178 #define ACTION_PAGE_8 60
2179 #define ACTION_PAGE_9 61
2180 #define ACTION_PAGE_10 62
2181 #define ACTION_PAGE_11 63
2182 #define ACTION_PAGE_12 64
2183 #define ACTION_PAGE_13 65
2184 #define ACTION_PAGE_14 66
2185 #define ACTION_PAGE_15 67
2186 #define ACTION_PAGE_16 68
2187 #define ACTION_PAGE_17 69
2188 #define ACTION_PAGE_18 70
2189 #define ACTION_PAGE_19 71
2190 #define ACTION_PAGE_20 72
2191 #define ACTION_PAGE_21 73
2192 #define ACTION_PAGE_22 74
2193 #define ACTION_PAGE_23 75
2194 #define ACTION_PAGE_24 76
2195 #define ACTION_PAGE_25 77
2196 #define ACTION_PAGE_26 78
2197 #define ACTION_PAGE_27 79
2198 #define ACTION_PAGE_28 80
2199 #define ACTION_PAGE_29 81
2200 #define ACTION_PAGE_30 82
2201 #define ACTION_PAGE_31 83
2202 #define ACTION_PAGE_32 84
2203 #define ACTION_PART_1 85
2204 #define ACTION_PART_2 86
2205 #define ACTION_PART_3 87
2206 #define ACTION_PART_4 88
2207 #define ACTION_PART_5 89
2208 #define ACTION_PART_6 90
2209 #define ACTION_PART_7 91
2210 #define ACTION_PART_8 92
2211 #define ACTION_PART_9 93
2212 #define ACTION_PART_10 94
2213 #define ACTION_PART_11 95
2214 #define ACTION_PART_12 96
2215 #define ACTION_PART_13 97
2216 #define ACTION_PART_14 98
2217 #define ACTION_PART_15 99
2218 #define ACTION_PART_16 100
2219 #define ACTION_PART_17 101
2220 #define ACTION_PART_18 102
2221 #define ACTION_PART_19 103
2222 #define ACTION_PART_20 104
2223 #define ACTION_PART_21 105
2224 #define ACTION_PART_22 106
2225 #define ACTION_PART_23 107
2226 #define ACTION_PART_24 108
2227 #define ACTION_PART_25 109
2228 #define ACTION_PART_26 110
2229 #define ACTION_PART_27 111
2230 #define ACTION_PART_28 112
2231 #define ACTION_PART_29 113
2232 #define ACTION_PART_30 114
2233 #define ACTION_PART_31 115
2234 #define ACTION_PART_32 116
2235 #define ACTION_OTHER 117
2237 #define NUM_ACTIONS 118
2239 #define ACTION_BORING_LAST ACTION_BORING_10
2240 #define ACTION_SLEEPING_LAST ACTION_SLEEPING_3
2243 /* values for special image configuration suffixes (must match game mode) */
2244 #define GFX_SPECIAL_ARG_DEFAULT 0
2245 #define GFX_SPECIAL_ARG_LOADING 1
2246 #define GFX_SPECIAL_ARG_TITLE_INITIAL 2
2247 #define GFX_SPECIAL_ARG_TITLE_INITIAL_1 3
2248 #define GFX_SPECIAL_ARG_TITLE_INITIAL_2 4
2249 #define GFX_SPECIAL_ARG_TITLE_INITIAL_3 5
2250 #define GFX_SPECIAL_ARG_TITLE_INITIAL_4 6
2251 #define GFX_SPECIAL_ARG_TITLE_INITIAL_5 7
2252 #define GFX_SPECIAL_ARG_TITLE 8
2253 #define GFX_SPECIAL_ARG_TITLE_1 9
2254 #define GFX_SPECIAL_ARG_TITLE_2 10
2255 #define GFX_SPECIAL_ARG_TITLE_3 11
2256 #define GFX_SPECIAL_ARG_TITLE_4 12
2257 #define GFX_SPECIAL_ARG_TITLE_5 13
2258 #define GFX_SPECIAL_ARG_MAIN 14
2259 #define GFX_SPECIAL_ARG_LEVELS 15
2260 #define GFX_SPECIAL_ARG_LEVELNR 16
2261 #define GFX_SPECIAL_ARG_SCORES 17
2262 #define GFX_SPECIAL_ARG_EDITOR 18
2263 #define GFX_SPECIAL_ARG_INFO 19
2264 #define GFX_SPECIAL_ARG_SETUP 20
2265 #define GFX_SPECIAL_ARG_PLAYING 21
2266 #define GFX_SPECIAL_ARG_DOOR 22
2267 #define GFX_SPECIAL_ARG_TAPE 23
2268 #define GFX_SPECIAL_ARG_PANEL 24
2269 #define GFX_SPECIAL_ARG_PREVIEW 25
2270 #define GFX_SPECIAL_ARG_CRUMBLED 26
2271 #define GFX_SPECIAL_ARG_MAINONLY 27
2272 #define GFX_SPECIAL_ARG_TYPENAME 28
2273 #define GFX_SPECIAL_ARG_SUBMENU 29
2274 #define GFX_SPECIAL_ARG_MENU 30
2275 #define GFX_SPECIAL_ARG_TOONS 31
2276 #define GFX_SPECIAL_ARG_SCORESOLD 32
2277 #define GFX_SPECIAL_ARG_SCORESNEW 33
2278 #define GFX_SPECIAL_ARG_FADING 34
2279 #define GFX_SPECIAL_ARG_QUIT 35
2281 #define NUM_SPECIAL_GFX_ARGS 36
2283 /* these additional definitions are currently only used for draw offsets */
2284 #define GFX_SPECIAL_ARG_INFO_MAIN 0
2285 #define GFX_SPECIAL_ARG_INFO_TITLE 1
2286 #define GFX_SPECIAL_ARG_INFO_ELEMENTS 2
2287 #define GFX_SPECIAL_ARG_INFO_MUSIC 3
2288 #define GFX_SPECIAL_ARG_INFO_CREDITS 4
2289 #define GFX_SPECIAL_ARG_INFO_PROGRAM 5
2290 #define GFX_SPECIAL_ARG_INFO_VERSION 6
2291 #define GFX_SPECIAL_ARG_INFO_LEVELSET 7
2293 #define NUM_SPECIAL_GFX_INFO_ARGS 8
2295 /* these additional definitions are currently only used for draw offsets */
2296 /* (must match SETUP_MODE_* values as defined in src/screens.c) */
2297 /* (should also match corresponding entries in src/conf_gfx.c) */
2298 #define GFX_SPECIAL_ARG_SETUP_MAIN 0
2299 #define GFX_SPECIAL_ARG_SETUP_GAME 1
2300 #define GFX_SPECIAL_ARG_SETUP_EDITOR 2
2301 #define GFX_SPECIAL_ARG_SETUP_GRAPHICS 3
2302 #define GFX_SPECIAL_ARG_SETUP_SOUND 4
2303 #define GFX_SPECIAL_ARG_SETUP_ARTWORK 5
2304 #define GFX_SPECIAL_ARG_SETUP_INPUT 6
2305 #define GFX_SPECIAL_ARG_SETUP_TOUCH 7
2306 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS 8
2307 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_1 9
2308 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2 10
2309 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3 11
2310 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4 12
2311 #define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5 13
2312 #define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK 14
2313 #define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER 15
2315 #define NUM_SPECIAL_GFX_SETUP_ARGS 16
2318 /* values for image configuration suffixes */
2321 #define GFX_ARG_XPOS 2
2322 #define GFX_ARG_YPOS 3
2323 #define GFX_ARG_WIDTH 4
2324 #define GFX_ARG_HEIGHT 5
2325 #define GFX_ARG_VERTICAL 6
2326 #define GFX_ARG_OFFSET 7
2327 #define GFX_ARG_XOFFSET 8
2328 #define GFX_ARG_YOFFSET 9
2329 #define GFX_ARG_2ND_MOVEMENT_TILE 10
2330 #define GFX_ARG_2ND_VERTICAL 11
2331 #define GFX_ARG_2ND_OFFSET 12
2332 #define GFX_ARG_2ND_XOFFSET 13
2333 #define GFX_ARG_2ND_YOFFSET 14
2334 #define GFX_ARG_2ND_SWAP_TILES 15
2335 #define GFX_ARG_FRAMES 16
2336 #define GFX_ARG_FRAMES_PER_LINE 17
2337 #define GFX_ARG_START_FRAME 18
2338 #define GFX_ARG_DELAY 19
2339 #define GFX_ARG_ANIM_MODE 20
2340 #define GFX_ARG_GLOBAL_SYNC 21
2341 #define GFX_ARG_CRUMBLED_LIKE 22
2342 #define GFX_ARG_DIGGABLE_LIKE 23
2343 #define GFX_ARG_BORDER_SIZE 24
2344 #define GFX_ARG_STEP_OFFSET 25
2345 #define GFX_ARG_STEP_XOFFSET 26
2346 #define GFX_ARG_STEP_YOFFSET 27
2347 #define GFX_ARG_STEP_DELAY 28
2348 #define GFX_ARG_DIRECTION 29
2349 #define GFX_ARG_POSITION 30
2350 #define GFX_ARG_DRAW_XOFFSET 31
2351 #define GFX_ARG_DRAW_YOFFSET 32
2352 #define GFX_ARG_DRAW_MASKED 33
2353 #define GFX_ARG_DRAW_ORDER 34
2354 #define GFX_ARG_INIT_DELAY_FIXED 35
2355 #define GFX_ARG_INIT_DELAY_RANDOM 36
2356 #define GFX_ARG_ANIM_DELAY_FIXED 37
2357 #define GFX_ARG_ANIM_DELAY_RANDOM 38
2358 #define GFX_ARG_POST_DELAY_FIXED 39
2359 #define GFX_ARG_POST_DELAY_RANDOM 40
2360 #define GFX_ARG_INIT_EVENT 41
2361 #define GFX_ARG_ANIM_EVENT 42
2362 #define GFX_ARG_NAME 43
2363 #define GFX_ARG_SCALE_UP_FACTOR 44
2364 #define GFX_ARG_TILE_SIZE 45
2365 #define GFX_ARG_CLONE_FROM 46
2366 #define GFX_ARG_FADE_MODE 47
2367 #define GFX_ARG_FADE_DELAY 48
2368 #define GFX_ARG_POST_DELAY 49
2369 #define GFX_ARG_AUTO_DELAY 50
2370 #define GFX_ARG_ALIGN 51
2371 #define GFX_ARG_VALIGN 52
2372 #define GFX_ARG_SORT_PRIORITY 53
2373 #define GFX_ARG_CLASS 54
2374 #define GFX_ARG_STYLE 55
2375 #define GFX_ARG_ACTIVE_XOFFSET 56
2376 #define GFX_ARG_ACTIVE_YOFFSET 57
2377 #define GFX_ARG_PRESSED_XOFFSET 58
2378 #define GFX_ARG_PRESSED_YOFFSET 59
2380 #define NUM_GFX_ARGS 60
2383 /* values for sound configuration suffixes */
2384 #define SND_ARG_MODE_LOOP 0
2385 #define SND_ARG_VOLUME 1
2386 #define SND_ARG_PRIORITY 2
2388 #define NUM_SND_ARGS 3
2391 /* values for music configuration suffixes */
2392 #define MUS_ARG_MODE_LOOP 0
2394 #define NUM_MUS_ARGS 1
2397 /* values for font configuration (definitions must match those from main.c) */
2398 #define FONT_INITIAL_1 0
2399 #define FONT_INITIAL_2 1
2400 #define FONT_INITIAL_3 2
2401 #define FONT_INITIAL_4 3
2402 #define FONT_TITLE_1 4
2403 #define FONT_TITLE_2 5
2404 #define FONT_MENU_1_ACTIVE 6
2405 #define FONT_MENU_2_ACTIVE 7
2406 #define FONT_MENU_1 8
2407 #define FONT_MENU_2 9
2408 #define FONT_TEXT_1_ACTIVE 10
2409 #define FONT_TEXT_2_ACTIVE 11
2410 #define FONT_TEXT_3_ACTIVE 12
2411 #define FONT_TEXT_4_ACTIVE 13
2412 #define FONT_TEXT_1 14
2413 #define FONT_TEXT_2 15
2414 #define FONT_TEXT_3 16
2415 #define FONT_TEXT_4 17
2416 #define FONT_ENVELOPE_1 18
2417 #define FONT_ENVELOPE_2 19
2418 #define FONT_ENVELOPE_3 20
2419 #define FONT_ENVELOPE_4 21
2420 #define FONT_REQUEST 22
2421 #define FONT_INPUT_1_ACTIVE 23
2422 #define FONT_INPUT_2_ACTIVE 24
2423 #define FONT_INPUT_1 25
2424 #define FONT_INPUT_2 26
2425 #define FONT_OPTION_OFF_NARROW 27
2426 #define FONT_OPTION_OFF 28
2427 #define FONT_OPTION_ON_NARROW 29
2428 #define FONT_OPTION_ON 30
2429 #define FONT_VALUE_1 31
2430 #define FONT_VALUE_2 32
2431 #define FONT_VALUE_OLD 33
2432 #define FONT_VALUE_NARROW 34
2433 #define FONT_LEVEL_NUMBER_ACTIVE 35
2434 #define FONT_LEVEL_NUMBER 36
2435 #define FONT_TAPE_RECORDER 37
2436 #define FONT_GAME_INFO 38
2437 #define FONT_INFO_ELEMENTS 39
2438 #define FONT_INFO_LEVELSET 40
2440 #define NUM_FONTS 41
2441 #define NUM_INITIAL_FONTS 4
2443 /* values for toon animation configuration */
2444 #define MAX_NUM_TOONS 20
2446 /* values for global animation configuration (must match those from main.c) */
2447 #define NUM_GLOBAL_ANIMS MAX_GLOBAL_ANIMS
2448 #define NUM_GLOBAL_ANIM_PARTS MAX_GLOBAL_ANIM_PARTS
2449 #define NUM_GLOBAL_ANIM_PARTS_ALL (NUM_GLOBAL_ANIM_PARTS + 1)
2450 #define NUM_GLOBAL_ANIM_TOKENS (2 * NUM_GLOBAL_ANIMS)
2452 #define GLOBAL_ANIM_ID_GRAPHIC_FIRST 0
2453 #define GLOBAL_ANIM_ID_GRAPHIC_LAST (NUM_GLOBAL_ANIMS - 1)
2454 #define GLOBAL_ANIM_ID_CONTROL_FIRST (NUM_GLOBAL_ANIMS)
2455 #define GLOBAL_ANIM_ID_CONTROL_LAST (2 * NUM_GLOBAL_ANIMS - 1)
2457 #define GLOBAL_ANIM_ID_PART_FIRST 0
2458 #define GLOBAL_ANIM_ID_PART_LAST (NUM_GLOBAL_ANIM_PARTS - 1)
2459 #define GLOBAL_ANIM_ID_PART_BASE (NUM_GLOBAL_ANIM_PARTS)
2461 /* values for global border graphics */
2462 #define IMG_GLOBAL_BORDER_FIRST IMG_GLOBAL_BORDER
2463 #define IMG_GLOBAL_BORDER_LAST IMG_GLOBAL_BORDER_PLAYING
2465 /* values for game_status (must match special image configuration suffixes) */
2466 #define GAME_MODE_DEFAULT 0
2467 #define GAME_MODE_LOADING 1
2468 #define GAME_MODE_TITLE_INITIAL 2
2469 #define GAME_MODE_TITLE_INITIAL_1 3
2470 #define GAME_MODE_TITLE_INITIAL_2 4
2471 #define GAME_MODE_TITLE_INITIAL_3 5
2472 #define GAME_MODE_TITLE_INITIAL_4 6
2473 #define GAME_MODE_TITLE_INITIAL_5 7
2474 #define GAME_MODE_TITLE 8
2475 #define GAME_MODE_TITLE_1 9
2476 #define GAME_MODE_TITLE_2 10
2477 #define GAME_MODE_TITLE_3 11
2478 #define GAME_MODE_TITLE_4 12
2479 #define GAME_MODE_TITLE_5 13
2480 #define GAME_MODE_MAIN 14
2481 #define GAME_MODE_LEVELS 15
2482 #define GAME_MODE_LEVELNR 16
2483 #define GAME_MODE_SCORES 17
2484 #define GAME_MODE_EDITOR 18
2485 #define GAME_MODE_INFO 19
2486 #define GAME_MODE_SETUP 20
2487 #define GAME_MODE_PLAYING 21
2488 #define GAME_MODE_PSEUDO_DOOR 22
2489 #define GAME_MODE_PSEUDO_TAPE 23
2490 #define GAME_MODE_PSEUDO_PANEL 24
2491 #define GAME_MODE_PSEUDO_PREVIEW 25
2492 #define GAME_MODE_PSEUDO_CRUMBLED 26
2493 #define GAME_MODE_PSEUDO_MAINONLY 27
2494 #define GAME_MODE_PSEUDO_TYPENAME 28
2495 #define GAME_MODE_PSEUDO_SUBMENU 29
2496 #define GAME_MODE_PSEUDO_MENU 30
2497 #define GAME_MODE_PSEUDO_TOONS 31
2498 #define GAME_MODE_PSEUDO_SCORESOLD 32
2499 #define GAME_MODE_PSEUDO_SCORESNEW 33
2500 #define GAME_MODE_PSEUDO_FADING 34
2501 #define GAME_MODE_QUIT 35
2503 #define NUM_GAME_MODES 36
2505 /* special definitions currently only used for custom artwork configuration */
2506 #define MUSIC_PREFIX_BACKGROUND 0
2507 #define NUM_MUSIC_PREFIXES 1
2509 /* definitions for demo animation lists */
2510 #define HELPANIM_LIST_NEXT -1
2511 #define HELPANIM_LIST_END -999
2514 /* program information and versioning definitions */
2515 #define PROGRAM_VERSION_MAJOR 4
2516 #define PROGRAM_VERSION_MINOR 0
2517 #define PROGRAM_VERSION_PATCH 1
2518 #define PROGRAM_VERSION_BUILD 5
2519 #define PROGRAM_VERSION_EXTRA ""
2521 #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
2522 #define PROGRAM_AUTHOR_STRING "Holger Schemel"
2523 #define PROGRAM_EMAIL_STRING "info@artsoft.org"
2524 #define PROGRAM_WEBSITE_STRING "http://www.artsoft.org/"
2525 #define PROGRAM_COPYRIGHT_STRING "Copyright \xa9""1995-2018 by Holger Schemel"
2526 #define PROGRAM_COMPANY_STRING "A Game by Artsoft Entertainment"
2528 #define PROGRAM_ICON_FILENAME "RocksIcon32x32.png"
2530 #define COOKIE_PREFIX "ROCKSNDIAMONDS"
2532 #define USERDATA_DIRECTORY_OTHER "userdata"
2534 /* file version numbers for resource files (levels, tapes, score, setup, etc.)
2535 ** currently supported/known file version numbers:
2537 ** 1.2 (still in use)
2538 ** 1.4 (still in use)
2541 #define FILE_VERSION_1_0 VERSION_IDENT(1,0,0,0)
2542 #define FILE_VERSION_1_2 VERSION_IDENT(1,2,0,0)
2543 #define FILE_VERSION_1_4 VERSION_IDENT(1,4,0,0)
2544 #define FILE_VERSION_2_0 VERSION_IDENT(2,0,0,0)
2545 #define FILE_VERSION_3_0 VERSION_IDENT(3,0,0,0)
2547 /* file version does not change for every program version, but is changed
2548 when new features are introduced that are incompatible with older file
2549 versions, so that they can be treated accordingly */
2550 #define FILE_VERSION_ACTUAL FILE_VERSION_3_0
2552 #define GAME_VERSION_1_0 FILE_VERSION_1_0
2553 #define GAME_VERSION_1_2 FILE_VERSION_1_2
2554 #define GAME_VERSION_1_4 FILE_VERSION_1_4
2555 #define GAME_VERSION_2_0 FILE_VERSION_2_0
2556 #define GAME_VERSION_3_0 FILE_VERSION_3_0
2558 #define GAME_VERSION_ACTUAL VERSION_IDENT(PROGRAM_VERSION_MAJOR, \
2559 PROGRAM_VERSION_MINOR, \
2560 PROGRAM_VERSION_PATCH, \
2561 PROGRAM_VERSION_BUILD)
2563 /* values for game_emulation */
2565 #define EMU_BOULDERDASH 1
2566 #define EMU_SOKOBAN 2
2567 #define EMU_SUPAPLEX 3
2569 /* values for level file type identifier */
2570 #define LEVEL_FILE_TYPE_UNKNOWN 0
2571 #define LEVEL_FILE_TYPE_RND 1
2572 #define LEVEL_FILE_TYPE_BD 2
2573 #define LEVEL_FILE_TYPE_EM 3
2574 #define LEVEL_FILE_TYPE_SP 4
2575 #define LEVEL_FILE_TYPE_DX 5
2576 #define LEVEL_FILE_TYPE_SB 6
2577 #define LEVEL_FILE_TYPE_DC 7
2578 #define LEVEL_FILE_TYPE_MM 8
2580 #define NUM_LEVEL_FILE_TYPES 9
2582 /* values for game engine type identifier */
2583 #define GAME_ENGINE_TYPE_UNKNOWN LEVEL_FILE_TYPE_UNKNOWN
2584 #define GAME_ENGINE_TYPE_RND LEVEL_FILE_TYPE_RND
2585 #define GAME_ENGINE_TYPE_EM LEVEL_FILE_TYPE_EM
2586 #define GAME_ENGINE_TYPE_SP LEVEL_FILE_TYPE_SP
2587 #define GAME_ENGINE_TYPE_MM LEVEL_FILE_TYPE_MM
2589 #define NUM_ENGINE_TYPES 4
2591 /* values for automatically playing tapes */
2592 #define AUTOPLAY_NONE 0
2593 #define AUTOPLAY_PLAY (1 << 0)
2594 #define AUTOPLAY_FFWD (1 << 1)
2595 #define AUTOPLAY_WARP (1 << 2)
2596 #define AUTOPLAY_TEST (1 << 3)
2597 #define AUTOPLAY_WARP_NO_DISPLAY AUTOPLAY_TEST
2599 #define AUTOPLAY_MODE_NONE 0
2600 #define AUTOPLAY_MODE_PLAY (AUTOPLAY_MODE_NONE | AUTOPLAY_PLAY)
2601 #define AUTOPLAY_MODE_FFWD (AUTOPLAY_MODE_PLAY | AUTOPLAY_FFWD)
2602 #define AUTOPLAY_MODE_WARP (AUTOPLAY_MODE_FFWD | AUTOPLAY_WARP)
2603 #define AUTOPLAY_MODE_TEST (AUTOPLAY_MODE_WARP | AUTOPLAY_TEST)
2604 #define AUTOPLAY_MODE_WARP_NO_DISPLAY AUTOPLAY_MODE_TEST
2609 boolean draw_masked[NUM_SPECIAL_GFX_ARGS];
2610 boolean draw_masked_when_fading;
2613 struct RequestButtonInfo
2615 struct TextPosInfo yes;
2616 struct TextPosInfo no;
2617 struct TextPosInfo confirm;
2618 struct TextPosInfo player_1;
2619 struct TextPosInfo player_2;
2620 struct TextPosInfo player_3;
2621 struct TextPosInfo player_4;
2624 struct MenuMainButtonInfo
2626 struct MenuPosInfo name;
2627 struct MenuPosInfo levels;
2628 struct MenuPosInfo scores;
2629 struct MenuPosInfo editor;
2630 struct MenuPosInfo info;
2631 struct MenuPosInfo game;
2632 struct MenuPosInfo setup;
2633 struct MenuPosInfo quit;
2635 struct MenuPosInfo prev_level;
2636 struct MenuPosInfo next_level;
2639 struct MenuMainTextInfo
2641 struct TextPosInfo name;
2642 struct TextPosInfo levels;
2643 struct TextPosInfo scores;
2644 struct TextPosInfo editor;
2645 struct TextPosInfo info;
2646 struct TextPosInfo game;
2647 struct TextPosInfo setup;
2648 struct TextPosInfo quit;
2650 struct TextPosInfo first_level;
2651 struct TextPosInfo last_level;
2652 struct TextPosInfo level_number;
2653 struct TextPosInfo level_info_1;
2654 struct TextPosInfo level_info_2;
2655 struct TextPosInfo level_name;
2656 struct TextPosInfo level_author;
2657 struct TextPosInfo level_year;
2658 struct TextPosInfo level_imported_from;
2659 struct TextPosInfo level_imported_by;
2660 struct TextPosInfo level_tested_by;
2661 struct TextPosInfo title_1;
2662 struct TextPosInfo title_2;
2663 struct TextPosInfo title_3;
2666 struct MenuMainInputInfo
2668 struct TextPosInfo name;
2673 struct MenuMainButtonInfo button;
2674 struct MenuMainTextInfo text;
2675 struct MenuMainInputInfo input;
2678 struct TitleFadingInfo
2686 struct TitleMessageInfo
2695 boolean parse_comments;
2706 struct MenuPosInfo busy;
2711 int draw_xoffset[NUM_SPECIAL_GFX_ARGS];
2712 int draw_yoffset[NUM_SPECIAL_GFX_ARGS];
2713 int draw_xoffset_info[NUM_SPECIAL_GFX_INFO_ARGS];
2714 int draw_yoffset_info[NUM_SPECIAL_GFX_INFO_ARGS];
2715 int draw_xoffset_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
2716 int draw_yoffset_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
2718 int scrollbar_xoffset;
2720 int list_size[NUM_SPECIAL_GFX_ARGS];
2721 int list_size_info[NUM_SPECIAL_GFX_INFO_ARGS];
2723 int paragraph_spacing[NUM_SPECIAL_GFX_INFO_ARGS];
2724 int paragraph_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
2725 int paragraph_spacing_setup[NUM_SPECIAL_GFX_INFO_ARGS];
2726 int headline1_spacing[NUM_SPECIAL_GFX_INFO_ARGS];
2727 int headline1_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
2728 int headline1_spacing_setup[NUM_SPECIAL_GFX_INFO_ARGS];
2729 int headline2_spacing[NUM_SPECIAL_GFX_INFO_ARGS];
2730 int headline2_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
2731 int headline2_spacing_setup[NUM_SPECIAL_GFX_INFO_ARGS];
2732 int line_spacing[NUM_SPECIAL_GFX_INFO_ARGS];
2733 int line_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
2734 int line_spacing_setup[NUM_SPECIAL_GFX_INFO_ARGS];
2737 struct TitleFadingInfo enter_menu;
2738 struct TitleFadingInfo leave_menu;
2739 struct TitleFadingInfo enter_screen[NUM_SPECIAL_GFX_ARGS];
2740 struct TitleFadingInfo leave_screen[NUM_SPECIAL_GFX_ARGS];
2741 struct TitleFadingInfo next_screen[NUM_SPECIAL_GFX_ARGS];
2743 int sound[NUM_SPECIAL_GFX_ARGS];
2744 int music[NUM_SPECIAL_GFX_ARGS];
2746 struct MenuMainInfo main;
2751 struct DoorPartPosInfo part_1;
2752 struct DoorPartPosInfo part_2;
2753 struct DoorPartPosInfo part_3;
2754 struct DoorPartPosInfo part_4;
2755 struct DoorPartPosInfo part_5;
2756 struct DoorPartPosInfo part_6;
2757 struct DoorPartPosInfo part_7;
2758 struct DoorPartPosInfo part_8;
2760 struct DoorPartPosInfo panel;
2771 struct RequestButtonInfo button;
2783 boolean wrap_single_words;
2791 int xoffset, yoffset;
2798 struct EditorTabsInfo
2809 struct EditorSettingsInfo
2811 struct MenuPosInfo headline;
2813 struct XY element_graphic;
2814 struct XY element_name;
2816 struct EditorTabsInfo tabs;
2819 struct EditorGadgetInfo
2828 struct Rect separator_line;
2831 struct EditorButtonInfo
2833 struct XYTileSize prev_level;
2834 struct XYTileSize next_level;
2836 struct XYTileSize properties;
2837 struct XYTileSize element_left;
2838 struct XYTileSize element_middle;
2839 struct XYTileSize element_right;
2840 struct XYTileSize palette;
2842 struct XYTileSize draw_single;
2843 struct XYTileSize draw_connected;
2844 struct XYTileSize draw_line;
2845 struct XYTileSize draw_arc;
2846 struct XYTileSize draw_rectangle;
2847 struct XYTileSize draw_filled_box;
2848 struct XYTileSize rotate_up;
2849 struct XYTileSize draw_text;
2850 struct XYTileSize flood_fill;
2851 struct XYTileSize rotate_left;
2852 struct XYTileSize zoom_level;
2853 struct XYTileSize rotate_right;
2854 struct XYTileSize draw_random;
2855 struct XYTileSize grab_brush;
2856 struct XYTileSize rotate_down;
2857 struct XYTileSize pick_element;
2859 struct XYTileSize ce_copy_from;
2860 struct XYTileSize ce_copy_to;
2861 struct XYTileSize ce_swap;
2862 struct XYTileSize ce_copy;
2863 struct XYTileSize ce_paste;
2865 struct XYTileSize undo;
2866 struct XYTileSize conf;
2867 struct XYTileSize save;
2868 struct XYTileSize clear;
2869 struct XYTileSize test;
2870 struct XYTileSize exit;
2873 struct EditorInputInfo
2875 struct XY level_number;
2878 struct EditorPaletteInfo
2883 boolean show_as_separate_screen;
2884 boolean show_on_element_buttons;
2886 struct XYTileSize element_left;
2887 struct XYTileSize element_middle;
2888 struct XYTileSize element_right;
2891 struct EditorDrawingAreaInfo
2898 struct EditorSettingsInfo settings;
2899 struct EditorGadgetInfo gadget;
2900 struct EditorButtonInfo button;
2901 struct EditorInputInfo input;
2902 struct EditorPaletteInfo palette;
2903 struct EditorDrawingAreaInfo drawingarea;
2908 struct RectWithBorder window[NUM_SPECIAL_GFX_ARGS];
2909 struct RectWithBorder playfield[NUM_SPECIAL_GFX_ARGS];
2910 struct RectWithBorder door_1[NUM_SPECIAL_GFX_ARGS];
2911 struct RectWithBorder door_2[NUM_SPECIAL_GFX_ARGS];
2916 char Name[MAX_PLAYER_NAME_LEN + 1];
2933 char text[MAX_ENVELOPE_TEXT_LEN + 1];
2938 int music[MAX_LEVELS];
2941 struct LevelFileInfo
2965 struct LevelFileInfo file_info;
2967 int game_engine_type;
2969 /* level stored in native format for the alternative native game engines */
2970 struct LevelInfo_EM *native_em_level;
2971 struct LevelInfo_SP *native_sp_level;
2972 struct LevelInfo_MM *native_mm_level;
2974 int file_version; /* file format version the level is stored with */
2975 int game_version; /* game release version the level was created with */
2977 struct DateInfo creation_date;
2979 boolean encoding_16bit_field; /* level contains 16-bit elements */
2980 boolean encoding_16bit_yamyam; /* yamyam contains 16-bit elements */
2981 boolean encoding_16bit_amoeba; /* amoeba contains 16-bit elements */
2985 int time; /* available time (seconds) */
2987 boolean auto_count_gems;
2989 char name[MAX_LEVEL_NAME_LEN + 1];
2990 char author[MAX_LEVEL_AUTHOR_LEN + 1];
2994 struct EnvelopeInfo envelope[NUM_ENVELOPES];
2996 int score[LEVEL_SCORE_ELEMENTS];
2998 struct Content yamyam_content[MAX_ELEMENT_CONTENTS];
2999 int num_yamyam_contents;
3004 int game_of_life[4];
3007 int time_magic_wall;
3012 int shield_normal_time;
3013 int shield_deadly_time;
3018 int extra_time_score;
3020 int start_element[MAX_PLAYERS];
3021 boolean use_start_element[MAX_PLAYERS];
3023 int artwork_element[MAX_PLAYERS];
3024 boolean use_artwork_element[MAX_PLAYERS];
3026 int explosion_element[MAX_PLAYERS];
3027 boolean use_explosion_element[MAX_PLAYERS];
3029 /* values for the new EMC elements */
3030 int android_move_time;
3031 int android_clone_time;
3032 boolean ball_random;
3033 boolean ball_state_initial;
3040 int wind_direction_initial;
3042 struct Content ball_content[MAX_ELEMENT_CONTENTS];
3043 int num_ball_contents;
3045 int num_android_clone_elements;
3046 int android_clone_element[MAX_ANDROID_ELEMENTS];
3048 int can_move_into_acid_bits; /* bitfield to store property for elements */
3049 int dont_collide_with_bits; /* bitfield to store property for elements */
3051 int initial_player_stepsize[MAX_PLAYERS]; /* initial player speed */
3052 boolean initial_player_gravity[MAX_PLAYERS];
3054 boolean use_initial_inventory[MAX_PLAYERS];
3055 int initial_inventory_size[MAX_PLAYERS];
3056 int initial_inventory_content[MAX_PLAYERS][MAX_INITIAL_INVENTORY_SIZE];
3058 boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */
3059 boolean em_explodes_by_fire; /* EM style chain explosion behaviour */
3060 boolean use_spring_bug; /* for compatibility with old levels */
3061 boolean use_time_orb_bug; /* for compatibility with old levels */
3062 boolean instant_relocation; /* no visual delay when relocating player */
3063 boolean shifted_relocation; /* no level centering when relocating player */
3064 boolean lazy_relocation; /* only redraw off-screen player relocation */
3065 boolean can_pass_to_walkable; /* player can pass to empty or walkable tile */
3066 boolean grow_into_diggable; /* amoeba can grow into anything diggable */
3067 boolean auto_exit_sokoban; /* automatically finish solved Sokoban levels */
3069 boolean continuous_snapping; /* repeated snapping without releasing key */
3070 boolean block_snap_field; /* snapping blocks field to show animation */
3071 boolean block_last_field; /* player blocks previous field while moving */
3072 boolean sp_block_last_field; /* player blocks previous field while moving */
3074 /* values for MM/DF elements */
3075 boolean mm_laser_red, mm_laser_green, mm_laser_blue;
3076 boolean df_laser_red, df_laser_green, df_laser_blue;
3082 /* ('int' instead of 'boolean' because used as selectbox value in editor) */
3083 int use_step_counter; /* count steps instead of seconds for level */
3085 short field[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3087 boolean use_custom_template; /* use custom properties from template file */
3089 boolean file_has_custom_elements; /* set when level file contains CEs */
3091 boolean no_valid_file; /* set when level file missing or invalid */
3092 boolean no_level_file; /* set when falling back to level template */
3094 boolean changed; /* set when level was changed in the editor */
3096 /* runtime flags to handle bugs in old levels (not stored in level file) */
3097 boolean use_action_after_change_bug;
3102 char *autoplay_leveldir;
3103 int autoplay_level[MAX_TAPES_PER_SET];
3104 boolean autoplay_all;
3105 boolean autoplay_mode;
3107 char *convert_leveldir;
3108 int convert_level_nr;
3110 char *create_images_dir;
3114 float frames_per_second;
3115 boolean show_frames_per_second;
3117 /* global values for fading screens and masking borders */
3120 /* values for global animations */
3122 int anim_status_next;
3124 boolean use_envelope_request;
3127 struct ElementChangeInfo
3129 boolean can_change; /* use or ignore this change info */
3131 boolean has_event[NUM_CHANGE_EVENTS]; /* change events */
3133 int trigger_player; /* player triggering change */
3134 int trigger_side; /* side triggering change */
3135 int trigger_page; /* page triggering change */
3137 int target_element; /* target element after change */
3139 int delay_fixed; /* added frame delay before changed (fixed) */
3140 int delay_random; /* added frame delay before changed (random) */
3141 int delay_frames; /* either 1 (frames) or 50 (seconds; 50 fps) */
3143 int initial_trigger_element; /* initial element triggering change */
3145 struct Content target_content;/* elements for extended change target */
3146 boolean use_target_content; /* use extended change target */
3147 boolean only_if_complete; /* only use complete target content */
3148 boolean use_random_replace; /* use random value for replacing elements */
3149 int random_percentage; /* random value for replacing elements */
3150 int replace_when; /* type of elements that can be replaced */
3152 boolean explode; /* explode instead of change */
3154 boolean has_action; /* execute action on specified condition */
3155 int action_type; /* type of action */
3156 int action_mode; /* mode of action */
3157 int action_arg; /* parameter of action */
3158 int action_element; /* element related to action */
3160 /* ---------- internal values used at runtime when playing ---------- */
3162 int trigger_element; /* element triggering change */
3164 /* functions that are called before, while and after the change of an
3165 element -- currently only used for non-custom elements */
3166 void (*pre_change_function)(int x, int y);
3167 void (*change_function)(int x, int y);
3168 void (*post_change_function)(int x, int y);
3170 short actual_trigger_element; /* element that actually triggered change */
3171 int actual_trigger_side; /* element side that triggered the change */
3172 int actual_trigger_player; /* player which actually triggered change */
3173 int actual_trigger_player_bits; /* player bits of triggering players */
3174 int actual_trigger_ce_value; /* CE value of element that triggered change */
3175 int actual_trigger_ce_score; /* CE score of element that triggered change */
3177 boolean can_change_or_has_action; /* can_change | has_action */
3179 /* ---------- internal values used in level editor ---------- */
3181 int direct_action; /* change triggered by actions on element */
3182 int other_action; /* change triggered by other element actions */
3185 struct ElementGroupInfo
3187 int num_elements; /* number of elements in this group */
3188 int element[MAX_ELEMENTS_IN_GROUP]; /* list of elements in this group */
3190 int choice_mode; /* how to choose element from group */
3192 /* ---------- internal values used at runtime when playing ---------- */
3194 /* the following is the same as above, but with recursively resolved group
3195 elements (group elements may also contain further group elements!) */
3196 int num_elements_resolved;
3197 short element_resolved[NUM_FILE_ELEMENTS];
3199 int choice_pos; /* current element choice position */
3202 struct ElementNameInfo
3204 /* ---------- token and description strings ---------- */
3206 char *token_name; /* element token used in config files */
3207 char *class_name; /* element class used in config files */
3208 char *editor_description; /* pre-defined description for level editor */
3213 /* ---------- token and description strings ---------- */
3215 char *token_name; /* element token used in config files */
3216 char *class_name; /* element class used in config files */
3217 char *editor_description; /* pre-defined description for level editor */
3218 char *custom_description; /* alternative description from config file */
3219 char description[MAX_ELEMENT_NAME_LEN + 1]; /* for custom/group elements */
3221 /* ---------- graphic and sound definitions ---------- */
3223 int graphic[NUM_ACTIONS]; /* default graphics for several actions */
3224 int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS_FULL];
3225 /* special graphics for left/right/up/down */
3227 int crumbled[NUM_ACTIONS]; /* crumbled graphics for several actions */
3228 int direction_crumbled[NUM_ACTIONS][NUM_DIRECTIONS_FULL];
3229 /* crumbled graphics for left/right/up/down */
3231 int special_graphic[NUM_SPECIAL_GFX_ARGS];
3232 /* special graphics for certain screens */
3234 int sound[NUM_ACTIONS]; /* default sounds for several actions */
3236 /* ---------- special element property values ---------- */
3238 unsigned int properties[NUM_EP_BITFIELDS]; /* element base properties */
3240 boolean use_gfx_element; /* use custom graphic element */
3241 int gfx_element_initial; /* initial optional custom graphic element */
3243 int access_direction; /* accessible from which direction */
3245 int collect_score_initial; /* initial score value for collecting */
3246 int collect_count_initial; /* initial count value for collecting */
3248 int ce_value_fixed_initial; /* initial value for custom variable (fix) */
3249 int ce_value_random_initial; /* initial value for custom variable (rnd) */
3250 boolean use_last_ce_value; /* use value from element before change */
3252 int push_delay_fixed; /* constant delay before pushing */
3253 int push_delay_random; /* additional random delay before pushing */
3254 int drop_delay_fixed; /* constant delay after dropping */
3255 int drop_delay_random; /* additional random delay after dropping */
3256 int move_delay_fixed; /* constant delay after moving */
3257 int move_delay_random; /* additional random delay after moving */
3259 int move_pattern; /* direction movable element moves to */
3260 int move_direction_initial; /* initial direction element moves to */
3261 int move_stepsize; /* step size element moves with */
3263 int move_enter_element; /* element that can be entered (and removed) */
3264 int move_leave_element; /* element that can be left behind */
3265 int move_leave_type; /* change (limited) or leave (unlimited) */
3267 int slippery_type; /* how/where other elements slip away */
3269 struct Content content; /* new elements after explosion */
3271 int explosion_type; /* type of explosion, like 3x3, 3+3 or 1x1 */
3272 int explosion_delay; /* duration of explosion of this element */
3273 int ignition_delay; /* delay for explosion by other explosion */
3275 struct ElementChangeInfo *change_page; /* actual list of change pages */
3276 struct ElementChangeInfo *change; /* pointer to current change page */
3278 int num_change_pages; /* actual number of change pages */
3279 int current_change_page; /* currently edited change page */
3281 struct ElementGroupInfo *group; /* pointer to element group info */
3283 /* ---------- internal values used at runtime when playing ---------- */
3285 boolean has_change_event[NUM_CHANGE_EVENTS];
3287 int event_page_nr[NUM_CHANGE_EVENTS]; /* page number for each event */
3288 struct ElementChangeInfo *event_page[NUM_CHANGE_EVENTS]; /* page for event */
3290 boolean in_group[NUM_GROUP_ELEMENTS];
3292 int gfx_element; /* runtime optional custom graphic element */
3294 int collect_score; /* runtime score value for collecting */
3296 /* count of this element on playfield, calculated after each frame */
3299 /* ---------- internal values used in level editor ---------- */
3301 int access_type; /* walkable or passable */
3302 int access_layer; /* accessible over/inside/under */
3303 int access_protected; /* protection against deadly elements */
3304 int walk_to_action; /* diggable/collectible/pushable */
3305 int smash_targets; /* can smash player/enemies/everything */
3306 int deadliness; /* deadly when running/colliding/touching */
3308 boolean can_explode_by_fire; /* element explodes by fire */
3309 boolean can_explode_smashed; /* element explodes when smashed */
3310 boolean can_explode_impact; /* element explodes on impact */
3312 boolean modified_settings; /* set for all modified custom elements */
3317 char *token_name; /* font token used in config files */
3319 int graphic; /* default graphic for this font */
3320 int special_graphic[NUM_SPECIAL_GFX_ARGS];
3321 /* special graphics for certain screens */
3322 int special_bitmap_id[NUM_SPECIAL_GFX_ARGS];
3323 /* internal bitmap ID for special graphics */
3326 struct GlobalAnimNameInfo
3328 char *token_name; /* global animation token in config files */
3331 struct GlobalAnimInfo
3333 char *token_name; /* global animation token in config files */
3335 /* global animation graphic and control definitions */
3336 int graphic[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
3338 /* global animation sound and music definitions */
3339 int sound[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
3340 int music[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
3345 Bitmap **bitmaps; /* bitmaps in all required sizes */
3346 Bitmap *bitmap; /* bitmap in default size */
3348 int src_image_width; /* scaled bitmap size, but w/o small images */
3349 int src_image_height; /* scaled bitmap size, but w/o small images */
3351 int src_x, src_y; /* start position of animation frames */
3352 int width, height; /* width/height of each animation frame */
3354 int offset_x, offset_y; /* x/y offset to next animation frame */
3355 int offset2_x, offset2_y; /* x/y offset to second movement tile */
3357 boolean double_movement; /* animation has second movement tile */
3358 int swap_double_tiles; /* explicitely force or forbid tile swapping */
3361 int anim_frames_per_line;
3362 int anim_start_frame;
3363 int anim_delay; /* important: delay of 1 means "no delay"! */
3366 boolean anim_global_sync;
3368 int crumbled_like; /* element for cloning crumble graphics */
3369 int diggable_like; /* element for cloning digging graphics */
3371 int border_size; /* border size for "crumbled" graphics */
3373 int scale_up_factor; /* optional factor for scaling image up */
3374 int tile_size; /* optional explicitly defined tile size */
3376 int clone_from; /* graphic for cloning *all* settings */
3378 int init_delay_fixed; /* optional initial delay values for global */
3379 int init_delay_random; /* animations (pause interval before start) */
3380 int anim_delay_fixed; /* optional delay values for bored/sleeping */
3381 int anim_delay_random; /* and global animations (animation length) */
3382 int post_delay_fixed; /* optional delay values after bored/global */
3383 int post_delay_random; /* animations (pause before next animation) */
3385 int init_event; /* optional event triggering animation start */
3386 int anim_event; /* optional event triggering animation end */
3388 int step_offset; /* optional step offset of toon animations */
3389 int step_xoffset; /* optional step offset of toon animations */
3390 int step_yoffset; /* optional step offset of toon animations */
3391 int step_delay; /* optional step delay of toon animations */
3392 int direction; /* optional move direction of toon animations */
3393 int position; /* optional draw position of toon animations */
3394 int x; /* optional draw position of toon animations */
3395 int y; /* optional draw position of toon animations */
3397 int draw_xoffset; /* optional offset for drawing font chars */
3398 int draw_yoffset; /* optional offset for drawing font chars */
3400 int draw_masked; /* optional setting for drawing envelope gfx */
3401 int draw_order; /* optional draw order for global animations */
3403 int fade_mode; /* optional setting for drawing title screens */
3404 int fade_delay; /* optional setting for drawing title screens */
3405 int post_delay; /* optional setting for drawing title screens */
3406 int auto_delay; /* optional setting for drawing title screens */
3407 int align, valign; /* optional setting for drawing title screens */
3408 int sort_priority; /* optional setting for drawing title screens */
3415 int pressed_xoffset;
3416 int pressed_yoffset;
3418 boolean use_image_size; /* use image size as default width and height */
3433 struct MusicPrefixInfo
3436 boolean is_loop_music;
3439 struct MusicFileInfo
3444 char *artist_header;
3457 struct MusicFileInfo *next;
3460 struct ElementActionInfo
3464 boolean is_loop_sound;
3467 struct ElementDirectionInfo
3473 struct SpecialSuffixInfo
3489 extern Bitmap *bitmap_db_field;
3490 extern Bitmap *bitmap_db_panel;
3491 extern Bitmap *bitmap_db_door_1;
3492 extern Bitmap *bitmap_db_door_2;
3493 extern Bitmap *bitmap_db_store_1;
3494 extern Bitmap *bitmap_db_store_2;
3495 extern DrawBuffer *fieldbuffer;
3496 extern DrawBuffer *drawto_field;
3498 extern int game_status;
3499 extern boolean game_status_last_screen;
3500 extern boolean level_editor_test_game;
3501 extern boolean network_playing;
3503 #if defined(TARGET_SDL)
3504 extern boolean network_server;
3505 extern SDL_Thread *server_thread;
3508 extern int key_joystick_mapping;
3510 extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3511 extern short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3512 extern short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3513 extern short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3514 extern short ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3515 extern short ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3516 extern short CustomValue[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3517 extern short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3518 extern short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3519 extern short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3520 extern short Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3521 extern boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3522 extern boolean Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3523 extern short ChangeCount[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3524 extern short ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3525 extern short WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3526 extern short WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3527 extern short CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3528 extern short CheckImpact[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3529 extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3530 extern short AmoebaCnt[MAX_NUM_AMOEBA];
3531 extern short AmoebaCnt2[MAX_NUM_AMOEBA];
3532 extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3533 extern short ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3534 extern short ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3535 extern int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3536 extern int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3538 extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3539 extern int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3540 extern int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3541 extern int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3542 extern int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3543 extern int GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
3545 extern int ActiveElement[MAX_NUM_ELEMENTS];
3546 extern int ActiveButton[NUM_IMAGE_FILES];
3547 extern int ActiveFont[NUM_FONTS];
3549 extern int lev_fieldx, lev_fieldy;
3550 extern int scroll_x, scroll_y;
3552 extern int WIN_XSIZE, WIN_YSIZE;
3553 extern int SCR_FIELDX, SCR_FIELDY;
3554 extern int REAL_SX, REAL_SY;
3559 extern int dDX, dDY;
3560 extern int FULL_SXSIZE, FULL_SYSIZE;
3561 extern int SXSIZE, SYSIZE;
3562 extern int DXSIZE, DYSIZE;
3563 extern int VXSIZE, VYSIZE;
3564 extern int EXSIZE, EYSIZE;
3565 extern int TILESIZE_VAR;
3567 extern int FADE_SX, FADE_SY;
3568 extern int FADE_SXSIZE, FADE_SYSIZE;
3571 extern int ScrollStepSize;
3572 extern int ScreenMovDir, ScreenMovPos, ScreenGfxPos;
3573 extern int BorderElement;
3574 extern int MenuFrameDelay;
3575 extern int GameFrameDelay;
3576 extern int FfwdFrameDelay;
3577 extern int BX1, BY1;
3578 extern int BX2, BY2;
3579 extern int SBX_Left, SBX_Right;
3580 extern int SBY_Upper, SBY_Lower;
3582 extern int ExitX, ExitY;
3583 extern int AllPlayersGone;
3585 extern int TimeFrames, TimePlayed, TimeLeft, TapeTime;
3587 extern boolean network_player_action_received;
3589 extern int graphics_action_mapping[];
3591 extern struct LevelSetInfo levelset;
3592 extern struct LevelInfo level, level_template;
3593 extern struct HiScore highscore[];
3594 extern struct TapeInfo tape;
3595 extern struct GlobalInfo global;
3596 extern struct BorderInfo border;
3597 extern struct ViewportInfo viewport;
3598 extern struct TitleFadingInfo fading;
3599 extern struct TitleFadingInfo fading_none;
3600 extern struct TitleFadingInfo title_initial_first_default;
3601 extern struct TitleFadingInfo title_initial_default;
3602 extern struct TitleFadingInfo title_first_default;
3603 extern struct TitleFadingInfo title_default;
3604 extern struct TitleMessageInfo titlescreen_initial_first_default;
3605 extern struct TitleMessageInfo titlescreen_initial_first[];
3606 extern struct TitleMessageInfo titlescreen_initial_default;
3607 extern struct TitleMessageInfo titlescreen_initial[];
3608 extern struct TitleMessageInfo titlescreen_first_default;
3609 extern struct TitleMessageInfo titlescreen_first[];
3610 extern struct TitleMessageInfo titlescreen_default;
3611 extern struct TitleMessageInfo titlescreen[];
3612 extern struct TitleMessageInfo titlemessage_initial_first_default;
3613 extern struct TitleMessageInfo titlemessage_initial_first[];
3614 extern struct TitleMessageInfo titlemessage_initial_default;
3615 extern struct TitleMessageInfo titlemessage_initial[];
3616 extern struct TitleMessageInfo titlemessage_first_default;
3617 extern struct TitleMessageInfo titlemessage_first[];
3618 extern struct TitleMessageInfo titlemessage_default;
3619 extern struct TitleMessageInfo titlemessage[];
3620 extern struct TitleMessageInfo readme;
3621 extern struct InitInfo init, init_last;
3622 extern struct MenuInfo menu;
3623 extern struct DoorInfo door_1, door_2;
3624 extern struct RequestInfo request;
3625 extern struct PreviewInfo preview;
3626 extern struct EditorInfo editor;
3627 extern struct ElementInfo element_info[];
3628 extern struct ElementNameInfo element_name_info[];
3629 extern struct ElementActionInfo element_action_info[];
3630 extern struct ElementDirectionInfo element_direction_info[];
3631 extern struct SpecialSuffixInfo special_suffix_info[];
3632 extern struct TokenIntPtrInfo image_config_vars[];
3633 extern struct FontInfo font_info[];
3634 extern struct GlobalAnimInfo global_anim_info[];
3635 extern struct GlobalAnimNameInfo global_anim_name_info[];
3636 extern struct MusicPrefixInfo music_prefix_info[];
3637 extern struct GraphicInfo *graphic_info;
3638 extern struct SoundInfo *sound_info;
3639 extern struct MusicInfo *music_info;
3640 extern struct MusicFileInfo *music_file_info;
3641 extern struct HelpAnimInfo *helpanim_info;
3642 extern SetupFileHash *helptext_info;
3643 extern SetupFileHash *image_config_hash;
3644 extern SetupFileHash *element_token_hash;
3645 extern SetupFileHash *graphic_token_hash;
3646 extern SetupFileHash *font_token_hash;
3647 extern SetupFileHash *hide_setup_hash;
3648 extern struct ConfigTypeInfo image_config_suffix[];
3649 extern struct ConfigTypeInfo sound_config_suffix[];
3650 extern struct ConfigTypeInfo music_config_suffix[];
3651 extern struct ConfigInfo image_config[];
3652 extern struct ConfigInfo sound_config[];
3653 extern struct ConfigInfo music_config[];
3654 extern struct ConfigInfo helpanim_config[];
3655 extern struct ConfigInfo helptext_config[];