1108cbf76d19aa265912e6e10eb17313e9f81b10
[rocksndiamonds.git] / src / main.h
1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
3 *----------------------------------------------------------*
4 * (c) 1995-2002 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * main.h                                                   *
12 ***********************************************************/
13
14 #ifndef MAIN_H
15 #define MAIN_H
16
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <string.h>
20 #include <time.h>
21 #include <sys/time.h>
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <errno.h>
25 #include <unistd.h>
26 #include <fcntl.h>
27
28 #include "libgame/libgame.h"
29
30 #include "conf_gfx.h"   /* include auto-generated data structure definitions */
31 #include "conf_snd.h"   /* include auto-generated data structure definitions */
32
33 #define IMG_UNDEFINED           (-1)
34 #define IMG_EMPTY               IMG_EMPTY_SPACE
35 #define IMG_SP_EMPTY            IMG_SP_EMPTY_SPACE
36 #define IMG_EXPLOSION           IMG_DEFAULT_EXPLODING
37 #define IMG_CHAR_START          IMG_CHAR_SPACE
38 #define IMG_CUSTOM_START        IMG_CUSTOM_1
39
40 #define SND_UNDEFINED           (-1)
41
42 #define WIN_XSIZE               672
43 #define WIN_YSIZE               560
44
45 #define SCR_FIELDX              17
46 #define SCR_FIELDY              17
47 #define MAX_BUF_XSIZE           (SCR_FIELDX + 2)
48 #define MAX_BUF_YSIZE           (SCR_FIELDY + 2)
49 #define MIN_LEV_FIELDX          3
50 #define MIN_LEV_FIELDY          3
51 #define STD_LEV_FIELDX          64
52 #define STD_LEV_FIELDY          32
53 #define MAX_LEV_FIELDX          128
54 #define MAX_LEV_FIELDY          128
55
56 #define SCREENX(a)              ((a) - scroll_x)
57 #define SCREENY(a)              ((a) - scroll_y)
58 #define LEVELX(a)               ((a) + scroll_x)
59 #define LEVELY(a)               ((a) + scroll_y)
60 #define IN_VIS_FIELD(x,y) ((x)>=0 && (x)<SCR_FIELDX && (y)>=0 &&(y)<SCR_FIELDY)
61 #define IN_SCR_FIELD(x,y) ((x)>=BX1 && (x)<=BX2 && (y)>=BY1 &&(y)<=BY2)
62 #define IN_LEV_FIELD(x,y) ((x)>=0 && (x)<lev_fieldx && (y)>=0 &&(y)<lev_fieldy)
63
64 /* values for configurable properties (custom elem's only, else pre-defined) */
65 #define EP_DIGGABLE             0
66 #define EP_COLLECTIBLE          1
67 #define EP_DONT_RUN_INTO        2
68 #define EP_DONT_COLLIDE_WITH    3
69 #define EP_DONT_TOUCH           4
70 #define EP_INDESTRUCTIBLE       5
71 #define EP_SLIPPERY             6
72 #define EP_CAN_CHANGE           7
73 #define EP_CAN_MOVE             8
74 #define EP_CAN_FALL             9
75 #define EP_CAN_SMASH_PLAYER     10
76 #define EP_CAN_SMASH_ENEMIES    11
77 #define EP_CAN_SMASH_EVERYTHING 12
78 #define EP_CAN_EXPLODE_BY_FIRE  13
79 #define EP_CAN_EXPLODE_SMASHED  14
80 #define EP_CAN_EXPLODE_IMPACT   15
81 #define EP_WALKABLE_OVER        16
82 #define EP_WALKABLE_INSIDE      17
83 #define EP_WALKABLE_UNDER       18
84 #define EP_PASSABLE_OVER        19
85 #define EP_PASSABLE_INSIDE      20
86 #define EP_PASSABLE_UNDER       21
87 #define EP_UNUSED_22            22
88 #define EP_UNUSED_23            23
89 #define EP_PUSHABLE             24
90
91 /* values for special configurable properties (depending on level settings) */
92 #define EP_EM_SLIPPERY_WALL     32
93
94 /* values for special graphics properties (no effect on game engine) */
95 #define EP_CAN_BE_CRUMBLED      33
96
97 /* values for pre-defined properties */
98 #define EP_PLAYER               34
99 #define EP_CAN_PASS_MAGIC_WALL  35
100 #define EP_SWITCHABLE           36
101 #define EP_BD_ELEMENT           37
102 #define EP_SP_ELEMENT           38
103 #define EP_SB_ELEMENT           39
104 #define EP_GEM                  40
105 #define EP_FOOD_DARK_YAMYAM     41
106 #define EP_FOOD_PENGUIN         42
107 #define EP_FOOD_PIG             43
108 #define EP_HISTORIC_WALL        44
109 #define EP_HISTORIC_SOLID       45
110 #define EP_CLASSIC_ENEMY        46
111 #define EP_BELT                 47
112 #define EP_BELT_ACTIVE          48
113 #define EP_BELT_SWITCH          49
114 #define EP_TUBE                 50
115 #define EP_KEYGATE              51
116 #define EP_AMOEBOID             52
117 #define EP_AMOEBALIVE           53
118 #define EP_HAS_CONTENT          54
119 #define EP_ACTIVE_BOMB          55
120 #define EP_INACTIVE             56
121
122 /* values for derived properties (determined from properties above) */
123 #define EP_ACCESSIBLE_OVER      57
124 #define EP_ACCESSIBLE_INSIDE    58
125 #define EP_ACCESSIBLE_UNDER     59
126 #define EP_WALKABLE             60
127 #define EP_PASSABLE             61
128 #define EP_ACCESSIBLE           62
129 #define EP_SNAPPABLE            63
130 #define EP_WALL                 64
131 #define EP_SOLID_FOR_PUSHING    65
132 #define EP_DRAGONFIRE_PROOF     66
133 #define EP_EXPLOSION_PROOF      67
134 #define EP_CAN_SMASH            68
135 #define EP_CAN_EXPLODE          69
136
137 /* values for internal purpose only (level editor) */
138 #define EP_EXPLODE_RESULT       70
139 #define EP_WALK_TO_OBJECT       71
140 #define EP_DEADLY               72
141
142 #define NUM_ELEMENT_PROPERTIES  73
143
144 #define NUM_EP_BITFIELDS        ((NUM_ELEMENT_PROPERTIES + 31) / 32)
145 #define EP_BITFIELD_BASE        0
146
147 #define EP_BITMASK_DEFAULT      0
148
149 #define PROPERTY_BIT(p)         (1 << ((p) % 32))
150 #define PROPERTY_VAR(e,p)       (Properties[e][(p) / 32])
151 #define HAS_PROPERTY(e,p)       ((PROPERTY_VAR(e, p) & PROPERTY_BIT(p)) != 0)
152 #define SET_PROPERTY(e,p,v)     ((v) ?                                     \
153                                  (PROPERTY_VAR(e,p) |=  PROPERTY_BIT(p)) : \
154                                  (PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p)))
155
156
157 /* values for change events for custom elements */
158 #define CE_DELAY                0
159 #define CE_TOUCHED_BY_PLAYER    1
160 #define CE_PRESSED_BY_PLAYER    2
161 #define CE_PUSHED_BY_PLAYER     3
162 #define CE_IMPACT               4
163 #define CE_SMASHED              5
164 #define CE_OTHER_COLLECTING     6
165 #define CE_OTHER_PUSHING        7
166 #define CE_OTHER_CHANGING       8
167 #define CE_OTHER_EXPLODING      9
168
169 /* values for internal purpose only (level editor) */
170 #define CE_BY_PLAYER            10
171 #define CE_IMPACT_SMASHED       11
172 #define CE_BY_OTHER             12
173
174 #define NUM_CHANGE_EVENTS       13
175
176 #define CE_BITMASK_DEFAULT      0
177
178 #define CH_EVENT_BIT(c)         (1 << (c))
179 #define CH_EVENT_VAR(e)         (element_info[e].change.events)
180
181 #define HAS_CHANGE_EVENT(e,c)   (IS_CUSTOM_ELEMENT(e) &&                  \
182                                  (CH_EVENT_VAR(e) & CH_EVENT_BIT(c)) != 0)
183 #define SET_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ?                   \
184                                  ((v) ?                                   \
185                                   (CH_EVENT_VAR(e) |=  CH_EVENT_BIT(c)) : \
186                                   (CH_EVENT_VAR(e) &= ~CH_EVENT_BIT(c))) : 0)
187
188 /* values for change power for custom elements */
189 #define CP_NON_DESTRUCTIVE      0
190 #define CP_HALF_DESTRUCTIVE     1
191 #define CP_FULL_DESTRUCTIVE     2
192
193
194 /* macros for configurable properties */
195 #define IS_DIGGABLE(e)          HAS_PROPERTY(e, EP_DIGGABLE)
196 #define IS_COLLECTIBLE(e)       HAS_PROPERTY(e, EP_COLLECTIBLE)
197 #define DONT_RUN_INTO(e)        HAS_PROPERTY(e, EP_DONT_RUN_INTO)
198 #define DONT_COLLIDE_WITH(e)    HAS_PROPERTY(e, EP_DONT_COLLIDE_WITH)
199 #define DONT_TOUCH(e)           HAS_PROPERTY(e, EP_DONT_TOUCH)
200 #define IS_INDESTRUCTIBLE(e)    HAS_PROPERTY(e, EP_INDESTRUCTIBLE)
201 #define IS_SLIPPERY(e)          HAS_PROPERTY(e, EP_SLIPPERY)
202 #define CAN_CHANGE(e)           HAS_PROPERTY(e, EP_CAN_CHANGE)
203 #define CAN_MOVE(e)             HAS_PROPERTY(e, EP_CAN_MOVE)
204 #define CAN_FALL(e)             HAS_PROPERTY(e, EP_CAN_FALL)
205 #define CAN_SMASH_PLAYER(e)     HAS_PROPERTY(e, EP_CAN_SMASH_PLAYER)
206 #define CAN_SMASH_ENEMIES(e)    HAS_PROPERTY(e, EP_CAN_SMASH_ENEMIES)
207 #define CAN_SMASH_EVERYTHING(e) HAS_PROPERTY(e, EP_CAN_SMASH_EVERYTHING)
208 #define CAN_EXPLODE_BY_FIRE(e)  HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_FIRE)
209 #define CAN_EXPLODE_SMASHED(e)  HAS_PROPERTY(e, EP_CAN_EXPLODE_SMASHED)
210 #define CAN_EXPLODE_IMPACT(e)   HAS_PROPERTY(e, EP_CAN_EXPLODE_IMPACT)
211 #define IS_WALKABLE_OVER(e)     HAS_PROPERTY(e, EP_WALKABLE_OVER)
212 #define IS_WALKABLE_INSIDE(e)   HAS_PROPERTY(e, EP_WALKABLE_INSIDE)
213 #define IS_WALKABLE_UNDER(e)    HAS_PROPERTY(e, EP_WALKABLE_UNDER)
214 #define IS_PASSABLE_OVER(e)     HAS_PROPERTY(e, EP_PASSABLE_OVER)
215 #define IS_PASSABLE_INSIDE(e)   HAS_PROPERTY(e, EP_PASSABLE_INSIDE)
216 #define IS_PASSABLE_UNDER(e)    HAS_PROPERTY(e, EP_PASSABLE_UNDER)
217 #define IS_PUSHABLE(e)          HAS_PROPERTY(e, EP_PUSHABLE)
218
219 /* macros for special configurable properties */
220 #define IS_EM_SLIPPERY_WALL(e)  HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
221
222 /* macros for special graphics properties */
223 #define CAN_BE_CRUMBLED(e)      HAS_PROPERTY(GFX_ELEMENT(e),EP_CAN_BE_CRUMBLED)
224
225 /* macros for pre-defined properties */
226 #define ELEM_IS_PLAYER(e)       HAS_PROPERTY(e, EP_PLAYER)
227 #define CAN_PASS_MAGIC_WALL(e)  HAS_PROPERTY(e, EP_CAN_PASS_MAGIC_WALL)
228 #define IS_SWITCHABLE(e)        HAS_PROPERTY(e, EP_SWITCHABLE)
229 #define IS_BD_ELEMENT(e)        HAS_PROPERTY(e, EP_BD_ELEMENT)
230 #define IS_SP_ELEMENT(e)        HAS_PROPERTY(e, EP_SP_ELEMENT)
231 #define IS_SB_ELEMENT(e)        HAS_PROPERTY(e, EP_SB_ELEMENT)
232 #define IS_GEM(e)               HAS_PROPERTY(e, EP_GEM)
233 #define IS_FOOD_DARK_YAMYAM(e)  HAS_PROPERTY(e, EP_FOOD_DARK_YAMYAM)
234 #define IS_FOOD_PENGUIN(e)      HAS_PROPERTY(e, EP_FOOD_PENGUIN)
235 #define IS_FOOD_PIG(e)          HAS_PROPERTY(e, EP_FOOD_PIG)
236 #define IS_HISTORIC_WALL(e)     HAS_PROPERTY(e, EP_HISTORIC_WALL)
237 #define IS_HISTORIC_SOLID(e)    HAS_PROPERTY(e, EP_HISTORIC_SOLID)
238 #define IS_CLASSIC_ENEMY(e)     HAS_PROPERTY(e, EP_CLASSIC_ENEMY)
239 #define IS_BELT(e)              HAS_PROPERTY(e, EP_BELT)
240 #define IS_BELT_ACTIVE(e)       HAS_PROPERTY(e, EP_BELT_ACTIVE)
241 #define IS_BELT_SWITCH(e)       HAS_PROPERTY(e, EP_BELT_SWITCH)
242 #define IS_TUBE(e)              HAS_PROPERTY(e, EP_TUBE)
243 #define IS_KEYGATE(e)           HAS_PROPERTY(e, EP_KEYGATE)
244 #define IS_AMOEBOID(e)          HAS_PROPERTY(e, EP_AMOEBOID)
245 #define IS_AMOEBALIVE(e)        HAS_PROPERTY(e, EP_AMOEBALIVE)
246 #define HAS_CONTENT(e)          HAS_PROPERTY(e, EP_HAS_CONTENT)
247 #define IS_ACTIVE_BOMB(e)       HAS_PROPERTY(e, EP_ACTIVE_BOMB)
248 #define IS_INACTIVE(e)          HAS_PROPERTY(e, EP_INACTIVE)
249
250 /* macros for derived properties */
251 #define IS_ACCESSIBLE_OVER(e)   HAS_PROPERTY(e, EP_ACCESSIBLE_OVER)
252 #define IS_ACCESSIBLE_INSIDE(e) HAS_PROPERTY(e, EP_ACCESSIBLE_INSIDE)
253 #define IS_ACCESSIBLE_UNDER(e)  HAS_PROPERTY(e, EP_ACCESSIBLE_UNDER)
254 #define IS_SNAPPABLE(e)         HAS_PROPERTY(e, EP_SNAPPABLE)
255 #define IS_WALKABLE(e)          HAS_PROPERTY(e, EP_WALKABLE)
256 #define IS_PASSABLE(e)          HAS_PROPERTY(e, EP_PASSABLE)
257 #define IS_ACCESSIBLE(e)        HAS_PROPERTY(e, EP_ACCESSIBLE)
258 #define IS_WALL(e)              HAS_PROPERTY(e, EP_WALL)
259 #define IS_SOLID_FOR_PUSHING(e) HAS_PROPERTY(e, EP_SOLID_FOR_PUSHING)
260 #define IS_DRAGONFIRE_PROOF(e)  HAS_PROPERTY(e, EP_DRAGONFIRE_PROOF)
261 #define IS_EXPLOSION_PROOF(e)   HAS_PROPERTY(e, EP_EXPLOSION_PROOF)
262 #define CAN_SMASH(e)            HAS_PROPERTY(e, EP_CAN_SMASH)
263 #define CAN_EXPLODE(e)          HAS_PROPERTY(e, EP_CAN_EXPLODE)
264
265 /* special macros used in game engine */
266 #define IS_CUSTOM_ELEMENT(e)    ((e) >= EL_CUSTOM_START &&              \
267                                  (e) <= EL_CUSTOM_END)
268
269 #define GFX_ELEMENT(e)          (element_info[e].use_gfx_element ?      \
270                                  element_info[e].gfx_element : e)
271
272 #define IS_PLAYER(x,y)          (ELEM_IS_PLAYER(StorePlayer[x][y]))
273
274 #define IS_FREE(x,y)            (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x,y))
275 #define IS_FREE_OR_PLAYER(x,y)  (Feld[x][y] == EL_EMPTY)
276
277 #define IS_MOVING(x,y)          (MovPos[x][y] != 0)
278 #define IS_FALLING(x,y)         (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
279 #define IS_BLOCKED(x,y)         (Feld[x][y] == EL_BLOCKED)
280
281 #define EL_CHANGED(e)           ((e) == EL_ROCK           ? EL_EMERALD :    \
282                                  (e) == EL_BD_ROCK        ? EL_BD_DIAMOND : \
283                                  (e) == EL_EMERALD        ? EL_DIAMOND :    \
284                                  (e) == EL_EMERALD_YELLOW ? EL_DIAMOND :    \
285                                  (e) == EL_EMERALD_RED    ? EL_DIAMOND :    \
286                                  (e) == EL_EMERALD_PURPLE ? EL_DIAMOND :    \
287                                  EL_ROCK)
288 #define EL_CHANGED2(e)          ((e) == EL_ROCK           ? EL_BD_DIAMOND : \
289                                  (e) == EL_BD_ROCK        ? EL_BD_DIAMOND : \
290                                  EL_BD_ROCK)
291 #define IS_DRAWABLE(e)          ((e) < EL_BLOCKED)
292 #define IS_NOT_DRAWABLE(e)      ((e) >= EL_BLOCKED)
293 #define TAPE_IS_EMPTY(x)        ((x).length == 0)
294 #define TAPE_IS_STOPPED(x)      (!(x).recording && !(x).playing)
295
296 #define PLAYERINFO(x,y)         (&stored_player[StorePlayer[x][y]-EL_PLAYER_1])
297 #define SHIELD_ON(p)            ((p)->shield_normal_time_left > 0)
298 #define PROTECTED_FIELD(x,y)    (IS_ACCESSIBLE_INSIDE(Feld[x][y]) &&    \
299                                  IS_INDESTRUCTIBLE(Feld[x][y]))
300 #define PLAYER_PROTECTED(x,y)   (SHIELD_ON(PLAYERINFO(x, y)) ||         \
301                                  PROTECTED_FIELD(x, y))
302
303 #define PLAYER_NR_GFX(g,i)      ((g) + i * (IMG_PLAYER_2 - IMG_PLAYER_1))
304
305 #define ANIM_FRAMES(g)          (graphic_info[g].anim_frames)
306 #define ANIM_DELAY(g)           (graphic_info[g].anim_delay)
307 #define ANIM_MODE(g)            (graphic_info[g].anim_mode)
308
309 #define IS_ANIMATED(g)          (ANIM_FRAMES(g) > 1)
310 #define IS_NEW_DELAY(f, g)      ((f) % ANIM_DELAY(g) == 0)
311 #define IS_NEW_FRAME(f, g)      (IS_ANIMATED(g) && IS_NEW_DELAY(f, g))
312 #define IS_NEXT_FRAME(f, g)     (IS_NEW_FRAME(f, g) && (f) > 0)
313
314 #define IS_LOOP_SOUND(s)        (sound_info[s].loop)
315
316
317 /* boundaries of arrays etc. */
318 #define MAX_LEVEL_NAME_LEN      32
319 #define MAX_LEVEL_AUTHOR_LEN    32
320 #define MAX_TAPELEN             (1000 * 50)     /* max. time * framerate */
321 #define MAX_SCORE_ENTRIES       100
322 #define MAX_NUM_AMOEBA          100
323
324 /* values for elements with content */
325 #define MIN_ELEMENT_CONTENTS    1
326 #define STD_ELEMENT_CONTENTS    4
327 #define MAX_ELEMENT_CONTENTS    8
328
329 #define LEVEL_SCORE_ELEMENTS    16      /* level elements with score */
330
331 /* fundamental game speed values */
332 #define GAME_FRAME_DELAY        20      /* frame delay in milliseconds */
333 #define FFWD_FRAME_DELAY        10      /* 200% speed for fast forward */
334 #define FRAMES_PER_SECOND       (1000 / GAME_FRAME_DELAY)
335 #define MICROLEVEL_SCROLL_DELAY 50      /* delay for scrolling micro level */
336 #define MICROLEVEL_LABEL_DELAY  250     /* delay for micro level label */
337
338 /* often used screen positions */
339 #define SX                      8
340 #define SY                      8
341 #define REAL_SX                 (SX - 2)
342 #define REAL_SY                 (SY - 2)
343 #define DX                      566
344 #define DY                      60
345 #define VX                      DX
346 #define VY                      400
347 #define EX                      DX
348 #define EY                      (VY - 44)
349 #define TILEX                   32
350 #define TILEY                   32
351 #define MINI_TILEX              (TILEX / 2)
352 #define MINI_TILEY              (TILEY / 2)
353 #define MICRO_TILEX             (TILEX / 8)
354 #define MICRO_TILEY             (TILEY / 8)
355 #define MIDPOSX                 (SCR_FIELDX / 2)
356 #define MIDPOSY                 (SCR_FIELDY / 2)
357 #define SXSIZE                  (SCR_FIELDX * TILEX)
358 #define SYSIZE                  (SCR_FIELDY * TILEY)
359 #define FXSIZE                  ((SCR_FIELDX + 2) * TILEX)
360 #define FYSIZE                  ((SCR_FIELDY + 2) * TILEY)
361 #define DXSIZE                  100
362 #define DYSIZE                  280
363 #define VXSIZE                  DXSIZE
364 #define VYSIZE                  100
365 #define EXSIZE                  DXSIZE
366 #define EYSIZE                  (VYSIZE + 44)
367 #define FULL_SXSIZE             (2 + SXSIZE + 2)
368 #define FULL_SYSIZE             (2 + SYSIZE + 2)
369 #define MICROLEV_XSIZE          ((STD_LEV_FIELDX + 2) * MICRO_TILEX)
370 #define MICROLEV_YSIZE          ((STD_LEV_FIELDY + 2) * MICRO_TILEY)
371 #define MICROLEV_XPOS           (SX + (SXSIZE - MICROLEV_XSIZE) / 2)
372 #define MICROLEV_YPOS           (SX + 12 * TILEY - MICRO_TILEY)
373 #define MICROLABEL_YPOS         (MICROLEV_YPOS + MICROLEV_YSIZE + 7)
374
375
376 /* "real" level file elements */
377 #define EL_UNDEFINED                    -1
378
379 #define EL_EMPTY_SPACE                  0
380 #define EL_EMPTY                        EL_EMPTY_SPACE
381 #define EL_SAND                         1
382 #define EL_WALL                         2
383 #define EL_WALL_CRUMBLED                3
384 #define EL_ROCK                         4
385 #define EL_KEY_OBSOLETE                 5 /* obsolete; mapped to EL_KEY_1 */
386 #define EL_EMERALD                      6
387 #define EL_EXIT_CLOSED                  7
388 #define EL_PLAYER_OBSOLETE              8 /* obsolete; mapped to EL_PLAYER_1 */
389 #define EL_BUG                          9
390 #define EL_SPACESHIP                    10
391 #define EL_YAMYAM                       11
392 #define EL_ROBOT                        12
393 #define EL_STEELWALL                    13
394 #define EL_DIAMOND                      14
395 #define EL_AMOEBA_DEAD                  15
396 #define EL_QUICKSAND_EMPTY              16
397 #define EL_QUICKSAND_FULL               17
398 #define EL_AMOEBA_DROP                  18
399 #define EL_BOMB                         19
400 #define EL_MAGIC_WALL                   20
401 #define EL_SPEED_PILL                   21
402 #define EL_ACID                         22
403 #define EL_AMOEBA_WET                   23
404 #define EL_AMOEBA_DRY                   24
405 #define EL_NUT                          25
406 #define EL_GAME_OF_LIFE                 26
407 #define EL_BIOMAZE                      27
408 #define EL_DYNAMITE_ACTIVE              28
409 #define EL_STONEBLOCK                   29
410 #define EL_ROBOT_WHEEL                  30
411 #define EL_ROBOT_WHEEL_ACTIVE           31
412 #define EL_KEY_1                        32
413 #define EL_KEY_2                        33
414 #define EL_KEY_3                        34
415 #define EL_KEY_4                        35
416 #define EL_GATE_1                       36
417 #define EL_GATE_2                       37
418 #define EL_GATE_3                       38
419 #define EL_GATE_4                       39
420 #define EL_GATE_1_GRAY                  40
421 #define EL_GATE_2_GRAY                  41
422 #define EL_GATE_3_GRAY                  42
423 #define EL_GATE_4_GRAY                  43
424 #define EL_DYNAMITE                     44
425 #define EL_PACMAN                       45
426 #define EL_INVISIBLE_WALL               46
427 #define EL_LAMP                         47
428 #define EL_LAMP_ACTIVE                  48
429 #define EL_WALL_EMERALD                 49
430 #define EL_WALL_DIAMOND                 50
431 #define EL_AMOEBA_FULL                  51
432 #define EL_BD_AMOEBA                    52
433 #define EL_TIME_ORB_FULL                53
434 #define EL_TIME_ORB_EMPTY               54
435 #define EL_EXPANDABLE_WALL              55
436 #define EL_BD_DIAMOND                   56
437 #define EL_EMERALD_YELLOW               57
438 #define EL_WALL_BD_DIAMOND              58
439 #define EL_WALL_EMERALD_YELLOW          59
440 #define EL_DARK_YAMYAM                  60
441 #define EL_BD_MAGIC_WALL                61
442 #define EL_INVISIBLE_STEELWALL          62
443
444 #define EL_UNUSED_63                    63
445
446 #define EL_DYNABOMB_INCREASE_NUMBER     64
447 #define EL_DYNABOMB_INCREASE_SIZE       65
448 #define EL_DYNABOMB_INCREASE_POWER      66
449 #define EL_SOKOBAN_OBJECT               67
450 #define EL_SOKOBAN_FIELD_EMPTY          68
451 #define EL_SOKOBAN_FIELD_FULL           69
452 #define EL_BD_BUTTERFLY_RIGHT           70
453 #define EL_BD_BUTTERFLY_UP              71
454 #define EL_BD_BUTTERFLY_LEFT            72
455 #define EL_BD_BUTTERFLY_DOWN            73
456 #define EL_BD_FIREFLY_RIGHT             74
457 #define EL_BD_FIREFLY_UP                75
458 #define EL_BD_FIREFLY_LEFT              76
459 #define EL_BD_FIREFLY_DOWN              77
460 #define EL_BD_BUTTERFLY_1               EL_BD_BUTTERFLY_DOWN
461 #define EL_BD_BUTTERFLY_2               EL_BD_BUTTERFLY_LEFT
462 #define EL_BD_BUTTERFLY_3               EL_BD_BUTTERFLY_UP
463 #define EL_BD_BUTTERFLY_4               EL_BD_BUTTERFLY_RIGHT
464 #define EL_BD_FIREFLY_1                 EL_BD_FIREFLY_LEFT
465 #define EL_BD_FIREFLY_2                 EL_BD_FIREFLY_DOWN
466 #define EL_BD_FIREFLY_3                 EL_BD_FIREFLY_RIGHT
467 #define EL_BD_FIREFLY_4                 EL_BD_FIREFLY_UP
468 #define EL_BD_BUTTERFLY                 78
469 #define EL_BD_FIREFLY                   79
470 #define EL_PLAYER_1                     80
471 #define EL_PLAYER_2                     81
472 #define EL_PLAYER_3                     82
473 #define EL_PLAYER_4                     83
474 #define EL_BUG_RIGHT                    84
475 #define EL_BUG_UP                       85
476 #define EL_BUG_LEFT                     86
477 #define EL_BUG_DOWN                     87
478 #define EL_SPACESHIP_RIGHT              88
479 #define EL_SPACESHIP_UP                 89
480 #define EL_SPACESHIP_LEFT               90
481 #define EL_SPACESHIP_DOWN               91
482 #define EL_PACMAN_RIGHT                 92
483 #define EL_PACMAN_UP                    93
484 #define EL_PACMAN_LEFT                  94
485 #define EL_PACMAN_DOWN                  95
486 #define EL_EMERALD_RED                  96
487 #define EL_EMERALD_PURPLE               97
488 #define EL_WALL_EMERALD_RED             98
489 #define EL_WALL_EMERALD_PURPLE          99
490 #define EL_ACID_POOL_TOPLEFT            100
491 #define EL_ACID_POOL_TOPRIGHT           101
492 #define EL_ACID_POOL_BOTTOMLEFT         102
493 #define EL_ACID_POOL_BOTTOM             103
494 #define EL_ACID_POOL_BOTTOMRIGHT        104
495 #define EL_BD_WALL                      105
496 #define EL_BD_ROCK                      106
497 #define EL_EXIT_OPEN                    107
498 #define EL_BLACK_ORB                    108
499 #define EL_AMOEBA_TO_DIAMOND            109
500 #define EL_MOLE                         110
501 #define EL_PENGUIN                      111
502 #define EL_SATELLITE                    112
503 #define EL_ARROW_LEFT                   113
504 #define EL_ARROW_RIGHT                  114
505 #define EL_ARROW_UP                     115
506 #define EL_ARROW_DOWN                   116
507 #define EL_PIG                          117
508 #define EL_DRAGON                       118
509
510 #define EL_EM_KEY_1_FILE                119
511
512 #define EL_CHAR_START                   120
513 #define EL_CHAR_ASCII0                  (EL_CHAR_START  - 32)
514 #define EL_CHAR_ASCII0_START            (EL_CHAR_ASCII0 + 32)
515
516 #include "conf_chr.h"   /* include auto-generated data structure definitions */
517
518 #define EL_CHAR_ASCII0_END              (EL_CHAR_ASCII0 + 111)
519 #define EL_CHAR_END                     (EL_CHAR_START  + 79)
520
521 #define EL_CHAR(c)                      (EL_CHAR_ASCII0 + MAP_FONT_ASCII(c))
522
523 #define EL_EXPANDABLE_WALL_HORIZONTAL   200
524 #define EL_EXPANDABLE_WALL_VERTICAL     201
525 #define EL_EXPANDABLE_WALL_ANY          202
526
527 #define EL_EM_GATE_1                    203
528 #define EL_EM_GATE_2                    204
529 #define EL_EM_GATE_3                    205
530 #define EL_EM_GATE_4                    206
531
532 #define EL_EM_KEY_2_FILE                        207
533 #define EL_EM_KEY_3_FILE                        208
534 #define EL_EM_KEY_4_FILE                        209
535
536 #define EL_SP_START                     210
537 #define EL_SP_EMPTY_SPACE               (EL_SP_START + 0)
538 #define EL_SP_EMPTY                     EL_SP_EMPTY_SPACE
539 #define EL_SP_ZONK                      (EL_SP_START + 1)
540 #define EL_SP_BASE                      (EL_SP_START + 2)
541 #define EL_SP_MURPHY                    (EL_SP_START + 3)
542 #define EL_SP_INFOTRON                  (EL_SP_START + 4)
543 #define EL_SP_CHIP_SINGLE               (EL_SP_START + 5)
544 #define EL_SP_HARDWARE_GRAY             (EL_SP_START + 6)
545 #define EL_SP_EXIT_CLOSED               (EL_SP_START + 7)
546 #define EL_SP_DISK_ORANGE               (EL_SP_START + 8)
547 #define EL_SP_PORT_RIGHT                (EL_SP_START + 9)
548 #define EL_SP_PORT_DOWN                 (EL_SP_START + 10)
549 #define EL_SP_PORT_LEFT                 (EL_SP_START + 11)
550 #define EL_SP_PORT_UP                   (EL_SP_START + 12)
551 #define EL_SP_GRAVITY_PORT_RIGHT        (EL_SP_START + 13)
552 #define EL_SP_GRAVITY_PORT_DOWN         (EL_SP_START + 14)
553 #define EL_SP_GRAVITY_PORT_LEFT         (EL_SP_START + 15)
554 #define EL_SP_GRAVITY_PORT_UP           (EL_SP_START + 16)
555 #define EL_SP_SNIKSNAK                  (EL_SP_START + 17)
556 #define EL_SP_DISK_YELLOW               (EL_SP_START + 18)
557 #define EL_SP_TERMINAL                  (EL_SP_START + 19)
558 #define EL_SP_DISK_RED                  (EL_SP_START + 20)
559 #define EL_SP_PORT_VERTICAL             (EL_SP_START + 21)
560 #define EL_SP_PORT_HORIZONTAL           (EL_SP_START + 22)
561 #define EL_SP_PORT_ANY                  (EL_SP_START + 23)
562 #define EL_SP_ELECTRON                  (EL_SP_START + 24)
563 #define EL_SP_BUGGY_BASE                (EL_SP_START + 25)
564 #define EL_SP_CHIP_LEFT                 (EL_SP_START + 26)
565 #define EL_SP_CHIP_RIGHT                (EL_SP_START + 27)
566 #define EL_SP_HARDWARE_BASE_1           (EL_SP_START + 28)
567 #define EL_SP_HARDWARE_GREEN            (EL_SP_START + 29)
568 #define EL_SP_HARDWARE_BLUE             (EL_SP_START + 30)
569 #define EL_SP_HARDWARE_RED              (EL_SP_START + 31)
570 #define EL_SP_HARDWARE_YELLOW           (EL_SP_START + 32)
571 #define EL_SP_HARDWARE_BASE_2           (EL_SP_START + 33)
572 #define EL_SP_HARDWARE_BASE_3           (EL_SP_START + 34)
573 #define EL_SP_HARDWARE_BASE_4           (EL_SP_START + 35)
574 #define EL_SP_HARDWARE_BASE_5           (EL_SP_START + 36)
575 #define EL_SP_HARDWARE_BASE_6           (EL_SP_START + 37)
576 #define EL_SP_CHIP_TOP                  (EL_SP_START + 38)
577 #define EL_SP_CHIP_BOTTOM               (EL_SP_START + 39)
578 #define EL_SP_END                       (EL_SP_START + 39)
579
580 #define EL_EM_GATE_1_GRAY               250
581 #define EL_EM_GATE_2_GRAY               251
582 #define EL_EM_GATE_3_GRAY               252
583 #define EL_EM_GATE_4_GRAY               253
584
585 #define EL_UNUSED_254                   254
586 #define EL_UNUSED_255                   255
587
588 #define EL_PEARL                        256
589 #define EL_CRYSTAL                      257
590 #define EL_WALL_PEARL                   258
591 #define EL_WALL_CRYSTAL                 259
592 #define EL_DOOR_WHITE                   260
593 #define EL_DOOR_WHITE_GRAY              261
594 #define EL_KEY_WHITE                    262
595 #define EL_SHIELD_NORMAL                263
596 #define EL_EXTRA_TIME                   264
597 #define EL_SWITCHGATE_OPEN              265
598 #define EL_SWITCHGATE_CLOSED            266
599 #define EL_SWITCHGATE_SWITCH_UP         267
600 #define EL_SWITCHGATE_SWITCH_DOWN       268
601
602 #define EL_UNUSED_269                   269
603 #define EL_UNUSED_270                   270
604
605 #define EL_CONVEYOR_BELT_1_LEFT          271
606 #define EL_CONVEYOR_BELT_1_MIDDLE        272
607 #define EL_CONVEYOR_BELT_1_RIGHT         273
608 #define EL_CONVEYOR_BELT_1_SWITCH_LEFT   274
609 #define EL_CONVEYOR_BELT_1_SWITCH_MIDDLE 275
610 #define EL_CONVEYOR_BELT_1_SWITCH_RIGHT  276
611 #define EL_CONVEYOR_BELT_2_LEFT          277
612 #define EL_CONVEYOR_BELT_2_MIDDLE        278
613 #define EL_CONVEYOR_BELT_2_RIGHT         279
614 #define EL_CONVEYOR_BELT_2_SWITCH_LEFT   280
615 #define EL_CONVEYOR_BELT_2_SWITCH_MIDDLE 281
616 #define EL_CONVEYOR_BELT_2_SWITCH_RIGHT  282
617 #define EL_CONVEYOR_BELT_3_LEFT          283
618 #define EL_CONVEYOR_BELT_3_MIDDLE        284
619 #define EL_CONVEYOR_BELT_3_RIGHT         285
620 #define EL_CONVEYOR_BELT_3_SWITCH_LEFT   286
621 #define EL_CONVEYOR_BELT_3_SWITCH_MIDDLE 287
622 #define EL_CONVEYOR_BELT_3_SWITCH_RIGHT  288
623 #define EL_CONVEYOR_BELT_4_LEFT          289
624 #define EL_CONVEYOR_BELT_4_MIDDLE        290
625 #define EL_CONVEYOR_BELT_4_RIGHT         291
626 #define EL_CONVEYOR_BELT_4_SWITCH_LEFT   292
627 #define EL_CONVEYOR_BELT_4_SWITCH_MIDDLE 293
628 #define EL_CONVEYOR_BELT_4_SWITCH_RIGHT  294
629 #define EL_LANDMINE                     295
630 #define EL_ENVELOPE                     296
631 #define EL_LIGHT_SWITCH                 297
632 #define EL_LIGHT_SWITCH_ACTIVE          298
633 #define EL_SIGN_EXCLAMATION             299
634 #define EL_SIGN_RADIOACTIVITY           300
635 #define EL_SIGN_STOP                    301
636 #define EL_SIGN_WHEELCHAIR              302
637 #define EL_SIGN_PARKING                 303
638 #define EL_SIGN_ONEWAY                  304
639 #define EL_SIGN_HEART                   305
640 #define EL_SIGN_TRIANGLE                306
641 #define EL_SIGN_ROUND                   307
642 #define EL_SIGN_EXIT                    308
643 #define EL_SIGN_YINYANG                 309
644 #define EL_SIGN_OTHER                   310
645 #define EL_MOLE_LEFT                    311
646 #define EL_MOLE_RIGHT                   312
647 #define EL_MOLE_UP                      313
648 #define EL_MOLE_DOWN                    314
649 #define EL_STEELWALL_SLANTED            315
650 #define EL_INVISIBLE_SAND               316
651 #define EL_DX_UNKNOWN_15                317
652 #define EL_DX_UNKNOWN_42                318
653
654 #define EL_UNUSED_319                   319
655 #define EL_UNUSED_320                   320
656
657 #define EL_SHIELD_DEADLY                321
658 #define EL_TIMEGATE_OPEN                322
659 #define EL_TIMEGATE_CLOSED              323
660 #define EL_TIMEGATE_SWITCH_ACTIVE       324
661 #define EL_TIMEGATE_SWITCH              325
662
663 #define EL_BALLOON                      326
664 #define EL_BALLOON_SWITCH_LEFT          327
665 #define EL_BALLOON_SWITCH_RIGHT         328
666 #define EL_BALLOON_SWITCH_UP            329
667 #define EL_BALLOON_SWITCH_DOWN          330
668 #define EL_BALLOON_SWITCH_ANY           331
669
670 #define EL_EMC_STEELWALL_1              332
671 #define EL_EMC_STEELWALL_2              333
672 #define EL_EMC_STEELWALL_3              334
673 #define EL_EMC_STEELWALL_4              335
674 #define EL_EMC_WALL_1                   336
675 #define EL_EMC_WALL_2                   337
676 #define EL_EMC_WALL_3                   338
677 #define EL_EMC_WALL_4                   339
678 #define EL_EMC_WALL_5                   340
679 #define EL_EMC_WALL_6                   341
680 #define EL_EMC_WALL_7                   342
681 #define EL_EMC_WALL_8                   343
682
683 #define EL_TUBE_ANY                     344
684 #define EL_TUBE_VERTICAL                345
685 #define EL_TUBE_HORIZONTAL              346
686 #define EL_TUBE_VERTICAL_LEFT           347
687 #define EL_TUBE_VERTICAL_RIGHT          348
688 #define EL_TUBE_HORIZONTAL_UP           349
689 #define EL_TUBE_HORIZONTAL_DOWN         350
690 #define EL_TUBE_LEFT_UP                 351
691 #define EL_TUBE_LEFT_DOWN               352
692 #define EL_TUBE_RIGHT_UP                353
693 #define EL_TUBE_RIGHT_DOWN              354
694 #define EL_SPRING                       355
695 #define EL_TRAP                         356
696 #define EL_DX_SUPABOMB                  357
697
698 #define EL_UNUSED_358                   358
699 #define EL_UNUSED_359                   359
700
701 #define EL_CUSTOM_START                 360
702
703 #include "conf_cus.h"   /* include auto-generated data structure definitions */
704
705 #define EL_CUSTOM_END                   (EL_CUSTOM_START + 127)
706
707 #define NUM_CUSTOM_ELEMENTS             128
708 #define NUM_FILE_ELEMENTS               488
709
710
711 /* "real" (and therefore drawable) runtime elements */
712 #define EL_FIRST_RUNTIME_REAL           NUM_FILE_ELEMENTS
713
714 #define EL_EM_KEY_1                     (EL_FIRST_RUNTIME_REAL + 0)
715 #define EL_EM_KEY_2                     (EL_FIRST_RUNTIME_REAL + 1)
716 #define EL_EM_KEY_3                     (EL_FIRST_RUNTIME_REAL + 2)
717 #define EL_EM_KEY_4                     (EL_FIRST_RUNTIME_REAL + 3)
718 #define EL_DYNABOMB_PLAYER_1_ACTIVE     (EL_FIRST_RUNTIME_REAL + 4)
719 #define EL_DYNABOMB_PLAYER_2_ACTIVE     (EL_FIRST_RUNTIME_REAL + 5)
720 #define EL_DYNABOMB_PLAYER_3_ACTIVE     (EL_FIRST_RUNTIME_REAL + 6)
721 #define EL_DYNABOMB_PLAYER_4_ACTIVE     (EL_FIRST_RUNTIME_REAL + 7)
722 #define EL_SP_DISK_RED_ACTIVE           (EL_FIRST_RUNTIME_REAL + 8)
723 #define EL_SWITCHGATE_OPENING           (EL_FIRST_RUNTIME_REAL + 9)
724 #define EL_SWITCHGATE_CLOSING           (EL_FIRST_RUNTIME_REAL + 10)
725 #define EL_TIMEGATE_OPENING             (EL_FIRST_RUNTIME_REAL + 11)
726 #define EL_TIMEGATE_CLOSING             (EL_FIRST_RUNTIME_REAL + 12)
727 #define EL_PEARL_BREAKING               (EL_FIRST_RUNTIME_REAL + 13)
728 #define EL_TRAP_ACTIVE                  (EL_FIRST_RUNTIME_REAL + 14)
729 #define EL_INVISIBLE_STEELWALL_ACTIVE   (EL_FIRST_RUNTIME_REAL + 15)
730 #define EL_INVISIBLE_WALL_ACTIVE        (EL_FIRST_RUNTIME_REAL + 16)
731 #define EL_INVISIBLE_SAND_ACTIVE        (EL_FIRST_RUNTIME_REAL + 17)
732 #define EL_CONVEYOR_BELT_1_LEFT_ACTIVE   (EL_FIRST_RUNTIME_REAL + 18)
733 #define EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 19)
734 #define EL_CONVEYOR_BELT_1_RIGHT_ACTIVE  (EL_FIRST_RUNTIME_REAL + 20)
735 #define EL_CONVEYOR_BELT_2_LEFT_ACTIVE   (EL_FIRST_RUNTIME_REAL + 21)
736 #define EL_CONVEYOR_BELT_2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 22)
737 #define EL_CONVEYOR_BELT_2_RIGHT_ACTIVE  (EL_FIRST_RUNTIME_REAL + 23)
738 #define EL_CONVEYOR_BELT_3_LEFT_ACTIVE   (EL_FIRST_RUNTIME_REAL + 24)
739 #define EL_CONVEYOR_BELT_3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 25)
740 #define EL_CONVEYOR_BELT_3_RIGHT_ACTIVE  (EL_FIRST_RUNTIME_REAL + 26)
741 #define EL_CONVEYOR_BELT_4_LEFT_ACTIVE   (EL_FIRST_RUNTIME_REAL + 27)
742 #define EL_CONVEYOR_BELT_4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 28)
743 #define EL_CONVEYOR_BELT_4_RIGHT_ACTIVE  (EL_FIRST_RUNTIME_REAL + 29)
744 #define EL_EXIT_OPENING                 (EL_FIRST_RUNTIME_REAL + 30)
745 #define EL_SP_EXIT_OPEN                 (EL_FIRST_RUNTIME_REAL + 31)
746 #define EL_SP_TERMINAL_ACTIVE           (EL_FIRST_RUNTIME_REAL + 32)
747 #define EL_SP_BUGGY_BASE_ACTIVATING     (EL_FIRST_RUNTIME_REAL + 33)
748 #define EL_SP_BUGGY_BASE_ACTIVE         (EL_FIRST_RUNTIME_REAL + 34)
749 #define EL_SP_MURPHY_CLONE              (EL_FIRST_RUNTIME_REAL + 35)
750 #define EL_AMOEBA_DROPPING              (EL_FIRST_RUNTIME_REAL + 36)
751 #define EL_QUICKSAND_EMPTYING           (EL_FIRST_RUNTIME_REAL + 37)
752 #define EL_MAGIC_WALL_ACTIVE            (EL_FIRST_RUNTIME_REAL + 38)
753 #define EL_BD_MAGIC_WALL_ACTIVE         (EL_FIRST_RUNTIME_REAL + 39)
754 #define EL_MAGIC_WALL_FULL              (EL_FIRST_RUNTIME_REAL + 40)
755 #define EL_BD_MAGIC_WALL_FULL           (EL_FIRST_RUNTIME_REAL + 41)
756 #define EL_MAGIC_WALL_EMPTYING          (EL_FIRST_RUNTIME_REAL + 42)
757 #define EL_BD_MAGIC_WALL_EMPTYING       (EL_FIRST_RUNTIME_REAL + 43)
758 #define EL_MAGIC_WALL_DEAD              (EL_FIRST_RUNTIME_REAL + 44)
759 #define EL_BD_MAGIC_WALL_DEAD           (EL_FIRST_RUNTIME_REAL + 45)
760
761 /* "unreal" (and therefore not drawable) runtime elements */
762 #define EL_FIRST_RUNTIME_UNREAL         (EL_FIRST_RUNTIME_REAL + 46)
763
764 #define EL_BLOCKED                      (EL_FIRST_RUNTIME_UNREAL + 0)
765 #define EL_EXPLOSION                    (EL_FIRST_RUNTIME_UNREAL + 1)
766 #define EL_NUT_BREAKING                 (EL_FIRST_RUNTIME_UNREAL + 2)
767 #define EL_DIAMOND_BREAKING             (EL_FIRST_RUNTIME_UNREAL + 3)
768 #define EL_ACID_SPLASH_LEFT             (EL_FIRST_RUNTIME_UNREAL + 4)
769 #define EL_ACID_SPLASH_RIGHT            (EL_FIRST_RUNTIME_UNREAL + 5)
770 #define EL_AMOEBA_GROWING               (EL_FIRST_RUNTIME_UNREAL + 6)
771 #define EL_AMOEBA_SHRINKING             (EL_FIRST_RUNTIME_UNREAL + 7)
772 #define EL_EXPANDABLE_WALL_GROWING      (EL_FIRST_RUNTIME_UNREAL + 8)
773 #define EL_FLAMES                       (EL_FIRST_RUNTIME_UNREAL + 9)
774 #define EL_PLAYER_IS_LEAVING            (EL_FIRST_RUNTIME_UNREAL + 10)
775 #define EL_QUICKSAND_FILLING            (EL_FIRST_RUNTIME_UNREAL + 11)
776 #define EL_MAGIC_WALL_FILLING           (EL_FIRST_RUNTIME_UNREAL + 12)
777 #define EL_BD_MAGIC_WALL_FILLING        (EL_FIRST_RUNTIME_UNREAL + 13)
778
779 /* dummy elements (never used as game elements, only used as graphics) */
780 #define EL_FIRST_DUMMY                  (EL_FIRST_RUNTIME_UNREAL + 14)
781
782 #define EL_STEELWALL_TOPLEFT                    (EL_FIRST_DUMMY + 0)
783 #define EL_STEELWALL_TOPRIGHT                   (EL_FIRST_DUMMY + 1)
784 #define EL_STEELWALL_BOTTOMLEFT                 (EL_FIRST_DUMMY + 2)
785 #define EL_STEELWALL_BOTTOMRIGHT                (EL_FIRST_DUMMY + 3)
786 #define EL_STEELWALL_HORIZONTAL                 (EL_FIRST_DUMMY + 4)
787 #define EL_STEELWALL_VERTICAL                   (EL_FIRST_DUMMY + 5)
788 #define EL_INVISIBLE_STEELWALL_TOPLEFT          (EL_FIRST_DUMMY + 6)
789 #define EL_INVISIBLE_STEELWALL_TOPRIGHT         (EL_FIRST_DUMMY + 7)
790 #define EL_INVISIBLE_STEELWALL_BOTTOMLEFT       (EL_FIRST_DUMMY + 8)
791 #define EL_INVISIBLE_STEELWALL_BOTTOMRIGHT      (EL_FIRST_DUMMY + 9)
792 #define EL_INVISIBLE_STEELWALL_HORIZONTAL       (EL_FIRST_DUMMY + 10)
793 #define EL_INVISIBLE_STEELWALL_VERTICAL         (EL_FIRST_DUMMY + 11)
794 #define EL_SAND_CRUMBLED                        (EL_FIRST_DUMMY + 12)
795 #define EL_DYNABOMB_ACTIVE                      (EL_FIRST_DUMMY + 13)
796 #define EL_SHIELD_NORMAL_ACTIVE                 (EL_FIRST_DUMMY + 14)
797 #define EL_SHIELD_DEADLY_ACTIVE                 (EL_FIRST_DUMMY + 15)
798 #define EL_DEFAULT                              (EL_FIRST_DUMMY + 16)
799 #define EL_BD_DEFAULT                           (EL_FIRST_DUMMY + 17)
800 #define EL_SP_DEFAULT                           (EL_FIRST_DUMMY + 18)
801 #define EL_SB_DEFAULT                           (EL_FIRST_DUMMY + 19)
802
803 #define MAX_NUM_ELEMENTS                        (EL_FIRST_DUMMY + 20)
804
805
806 /* values for graphics/sounds action types */
807 #define ACTION_DEFAULT                          0
808 #define ACTION_WAITING                          1
809 #define ACTION_FALLING                          2
810 #define ACTION_MOVING                           3
811 #define ACTION_DIGGING                          4
812 #define ACTION_SNAPPING                         5
813 #define ACTION_COLLECTING                       6
814 #define ACTION_DROPPING                         7
815 #define ACTION_PUSHING                          8
816 #define ACTION_WALKING                          9
817 #define ACTION_PASSING                          10
818 #define ACTION_IMPACT                           11
819 #define ACTION_BREAKING                         12
820 #define ACTION_ACTIVATING                       13
821 #define ACTION_DEACTIVATING                     14
822 #define ACTION_OPENING                          15
823 #define ACTION_CLOSING                          16
824 #define ACTION_ATTACKING                        17
825 #define ACTION_GROWING                          18
826 #define ACTION_SHRINKING                        19
827 #define ACTION_ACTIVE                           20
828 #define ACTION_FILLING                          21
829 #define ACTION_EMPTYING                         22
830 #define ACTION_CHANGING                         23
831 #define ACTION_EXPLODING                        24
832 #define ACTION_DYING                            25
833 #define ACTION_OTHER                            26
834
835 #define NUM_ACTIONS                             27
836
837 /* values for special image configuration suffixes (must match game mode) */
838 #define GFX_SPECIAL_ARG_MAIN                    0
839 #define GFX_SPECIAL_ARG_LEVELS                  1
840 #define GFX_SPECIAL_ARG_SCORES                  2
841 #define GFX_SPECIAL_ARG_EDITOR                  3
842 #define GFX_SPECIAL_ARG_INFO                    4
843 #define GFX_SPECIAL_ARG_SETUP                   5
844 #define GFX_SPECIAL_ARG_DOOR                    6
845 #define GFX_SPECIAL_ARG_PREVIEW                 7
846
847 #define NUM_SPECIAL_GFX_ARGS                    8
848
849
850 /* values for image configuration suffixes */
851 #define GFX_ARG_X                               0
852 #define GFX_ARG_Y                               1
853 #define GFX_ARG_XPOS                            2
854 #define GFX_ARG_YPOS                            3
855 #define GFX_ARG_WIDTH                           4
856 #define GFX_ARG_HEIGHT                          5
857 #define GFX_ARG_OFFSET                          6
858 #define GFX_ARG_VERTICAL                        7
859 #define GFX_ARG_XOFFSET                         8
860 #define GFX_ARG_YOFFSET                         9
861 #define GFX_ARG_FRAMES                          10
862 #define GFX_ARG_FRAMES_PER_LINE                 11
863 #define GFX_ARG_START_FRAME                     12
864 #define GFX_ARG_DELAY                           13
865 #define GFX_ARG_ANIM_MODE                       14
866 #define GFX_ARG_GLOBAL_SYNC                     15
867 #define GFX_ARG_STEP_OFFSET                     16
868 #define GFX_ARG_STEP_DELAY                      17
869 #define GFX_ARG_DIRECTION                       18
870 #define GFX_ARG_POSITION                        19
871 #define GFX_ARG_DRAW_XOFFSET                    20
872 #define GFX_ARG_DRAW_YOFFSET                    21
873 #define GFX_ARG_NAME                            22
874
875 #define NUM_GFX_ARGS                            23
876
877
878 /* values for sound configuration suffixes */
879 #define SND_ARG_MODE_LOOP                       0
880
881 #define NUM_SND_ARGS                            1
882
883
884 /* values for font configuration */
885
886 #define FONT_INITIAL_1                          0
887 #define FONT_INITIAL_2                          1
888 #define FONT_INITIAL_3                          2
889 #define FONT_INITIAL_4                          3
890 #define FONT_TITLE_1                            4
891 #define FONT_TITLE_2                            5
892 #define FONT_MENU_1                             6
893 #define FONT_MENU_2                             7
894 #define FONT_TEXT_1_ACTIVE                      8
895 #define FONT_TEXT_2_ACTIVE                      9
896 #define FONT_TEXT_3_ACTIVE                      10
897 #define FONT_TEXT_4_ACTIVE                      11
898 #define FONT_TEXT_1                             12
899 #define FONT_TEXT_2                             13
900 #define FONT_TEXT_3                             14
901 #define FONT_TEXT_4                             15
902 #define FONT_INPUT_1_ACTIVE                     16
903 #define FONT_INPUT_2_ACTIVE                     17
904 #define FONT_INPUT_1                            18
905 #define FONT_INPUT_2                            19
906 #define FONT_OPTION_OFF                         20
907 #define FONT_OPTION_ON                          21
908 #define FONT_VALUE_1                            22
909 #define FONT_VALUE_2                            23
910 #define FONT_VALUE_OLD                          24
911 #define FONT_LEVEL_NUMBER                       25
912 #define FONT_TAPE_RECORDER                      26
913 #define FONT_GAME_INFO                          27
914
915 #define NUM_FONTS                               28
916 #define NUM_INITIAL_FONTS                       4
917
918 /* values for game_status (must match special image configuration suffixes) */
919 #define GAME_MODE_MAIN                          0
920 #define GAME_MODE_LEVELS                        1
921 #define GAME_MODE_SCORES                        2
922 #define GAME_MODE_EDITOR                        3
923 #define GAME_MODE_INFO                          4
924 #define GAME_MODE_SETUP                         5
925 #define GAME_MODE_PSEUDO_DOOR                   6
926 #define GAME_MODE_PSEUDO_PREVIEW                7
927
928 /* there are no special config file suffixes for these modes */
929 #define GAME_MODE_PLAYING                       8
930 #define GAME_MODE_PSEUDO_TYPENAME               9
931 #define GAME_MODE_QUIT                          10
932
933 #define PROGRAM_VERSION_MAJOR   2
934 #define PROGRAM_VERSION_MINOR   2
935 #define PROGRAM_VERSION_PATCH   0
936 #define PROGRAM_VERSION_RELEASE 7
937 #define PROGRAM_VERSION_STRING  "2.2.0rc7"
938
939 #define PROGRAM_TITLE_STRING    "Rocks'n'Diamonds"
940 #define PROGRAM_AUTHOR_STRING   "Holger Schemel"
941 #define PROGRAM_RIGHTS_STRING   "Copyright Â©1995-2003 by"
942 #define PROGRAM_DOS_PORT_STRING "DOS port done by Guido Schulz"
943 #define PROGRAM_IDENT_STRING    PROGRAM_VERSION_STRING " " TARGET_STRING
944 #define WINDOW_TITLE_STRING     PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING
945 #define WINDOW_SUBTITLE_STRING  PROGRAM_RIGHTS_STRING " " PROGRAM_AUTHOR_STRING
946 #define ICON_TITLE_STRING       PROGRAM_TITLE_STRING
947 #define COOKIE_PREFIX           "ROCKSNDIAMONDS"
948 #define FILENAME_PREFIX         "Rocks"
949
950 #if defined(PLATFORM_UNIX)
951 #define USERDATA_DIRECTORY      ".rocksndiamonds"
952 #elif defined(PLATFORM_WIN32)
953 #define USERDATA_DIRECTORY      PROGRAM_TITLE_STRING
954 #else
955 #define USERDATA_DIRECTORY      "userdata"
956 #endif
957
958 #define X11_ICON_FILENAME       "rocks_icon.xbm"
959 #define X11_ICONMASK_FILENAME   "rocks_iconmask.xbm"
960 #define MSDOS_POINTER_FILENAME  "mouse.pcx"
961
962 /* file version numbers for resource files (levels, tapes, score, setup, etc.)
963 ** currently supported/known file version numbers:
964 **      1.0 (old)
965 **      1.2 (still in use)
966 **      1.4 (still in use)
967 **      2.0 (actual)
968 */
969 #define FILE_VERSION_1_0        VERSION_IDENT(1,0,0)
970 #define FILE_VERSION_1_2        VERSION_IDENT(1,2,0)
971 #define FILE_VERSION_1_4        VERSION_IDENT(1,4,0)
972 #define FILE_VERSION_2_0        VERSION_IDENT(2,0,0)
973
974 /* file version does not change for every program version, but is changed
975    when new features are introduced that are incompatible with older file
976    versions, so that they can be treated accordingly */
977 #define FILE_VERSION_ACTUAL     FILE_VERSION_2_0
978
979 #define GAME_VERSION_1_0        FILE_VERSION_1_0
980 #define GAME_VERSION_1_2        FILE_VERSION_1_2
981 #define GAME_VERSION_1_4        FILE_VERSION_1_4
982 #define GAME_VERSION_2_0        FILE_VERSION_2_0
983
984 #define GAME_VERSION_ACTUAL     RELEASE_IDENT(PROGRAM_VERSION_MAJOR, \
985                                               PROGRAM_VERSION_MINOR, \
986                                               PROGRAM_VERSION_PATCH, \
987                                               PROGRAM_VERSION_RELEASE)
988
989 /* values for game_emulation */
990 #define EMU_NONE                0
991 #define EMU_BOULDERDASH         1
992 #define EMU_SOKOBAN             2
993 #define EMU_SUPAPLEX            3
994
995 struct HiScore
996 {
997   char Name[MAX_PLAYER_NAME_LEN + 1];
998   int Score;
999 };
1000
1001 struct PlayerInfo
1002 {
1003   boolean present;              /* player present in level playfield */
1004   boolean connected;            /* player connected (locally or via network) */
1005   boolean active;               /* player (present && connected) */
1006
1007   int index_nr, client_nr, element_nr;
1008
1009   byte action;                  /* action from local input device */
1010   byte effective_action;        /* action acknowledged from network server
1011                                    or summarized over all configured input
1012                                    devices when in single player mode */
1013   byte programmed_action;       /* action forced by game itself (like moving
1014                                    through doors); overrides other actions */
1015
1016   int jx,jy, last_jx,last_jy;
1017   int MovDir, MovPos, GfxDir, GfxPos;
1018   int Frame, StepFrame;
1019
1020   int GfxAction;
1021
1022   boolean use_murphy_graphic;
1023   boolean use_disk_red_graphic;
1024
1025   boolean Pushing;
1026   boolean Switching;
1027   boolean LevelSolved, GameOver;
1028   boolean snapped;
1029
1030   int last_move_dir;
1031   boolean is_moving;
1032   boolean is_waiting;
1033   boolean is_digging;
1034   boolean is_collecting;
1035
1036   unsigned long move_delay;
1037   int move_delay_value;
1038
1039   unsigned long push_delay;
1040   unsigned long push_delay_value;
1041
1042   unsigned long actual_frame_counter;
1043
1044   int score;
1045   int gems_still_needed;
1046   int sokobanfields_still_needed;
1047   int lights_still_needed;
1048   int friends_still_needed;
1049   int key[4];
1050   int dynamite;
1051   int dynabomb_count, dynabomb_size, dynabombs_left, dynabomb_xl;
1052   int shield_normal_time_left;
1053   int shield_deadly_time_left;
1054 };
1055
1056 struct LevelInfo
1057 {
1058   int file_version;     /* file format version the level is stored with    */
1059   int game_version;     /* game release version the level was created with */
1060
1061   boolean encoding_16bit_field;         /* level contains 16-bit elements  */
1062   boolean encoding_16bit_yamyam;        /* yamyam contains 16-bit elements */
1063   boolean encoding_16bit_amoeba;        /* amoeba contains 16-bit elements */
1064
1065   int fieldx;
1066   int fieldy;
1067   int time;
1068   int gems_needed;
1069   char name[MAX_LEVEL_NAME_LEN + 1];
1070   char author[MAX_LEVEL_AUTHOR_LEN + 1];
1071   int score[LEVEL_SCORE_ELEMENTS];
1072   int yamyam_content[MAX_ELEMENT_CONTENTS][3][3];
1073   int num_yamyam_contents;
1074   int amoeba_speed;
1075   int amoeba_content;
1076   int time_magic_wall;
1077   int time_wheel;
1078   int time_light;
1079   int time_timegate;
1080   boolean double_speed;
1081   boolean gravity;
1082   boolean em_slippery_gems;     /* EM style "gems slip from wall" behaviour */
1083
1084   boolean no_level_file;
1085 };
1086
1087 struct TapeInfo
1088 {
1089   int file_version;     /* file format version the tape is stored with    */
1090   int game_version;     /* game release version the tape was created with */
1091   int engine_version;   /* game engine version the tape was recorded with */
1092
1093   char *level_identifier;
1094   int level_nr;
1095   unsigned long random_seed;
1096   unsigned long date;
1097   unsigned long counter;
1098   unsigned long length;
1099   unsigned long length_seconds;
1100   unsigned int delay_played;
1101   boolean pause_before_death;
1102   boolean recording, playing, pausing;
1103   boolean fast_forward;
1104   boolean index_search;
1105   boolean auto_play;
1106   boolean auto_play_level_solved;
1107   boolean quick_resume;
1108   boolean single_step;
1109   boolean changed;
1110   boolean player_participates[MAX_PLAYERS];
1111   int num_participating_players;
1112
1113   struct
1114   {
1115     byte action[MAX_PLAYERS];
1116     byte delay;
1117   } pos[MAX_TAPELEN];
1118 };
1119
1120 struct GameInfo
1121 {
1122   /* constant within running game */
1123   int engine_version;
1124   int emulation;
1125   int initial_move_delay;
1126   int initial_move_delay_value;
1127
1128   /* variable within running game */
1129   int yamyam_content_nr;
1130   boolean magic_wall_active;
1131   int magic_wall_time_left;
1132   int light_time_left;
1133   int timegate_time_left;
1134   int belt_dir[4];
1135   int belt_dir_nr[4];
1136   int switchgate_pos;
1137   int balloon_dir;
1138   boolean explosions_delayed;
1139 };
1140
1141 struct GlobalInfo
1142 {
1143   char *autoplay_leveldir;
1144   int autoplay_level_nr;
1145
1146   int num_toons;
1147
1148   float frames_per_second;
1149   boolean fps_slowdown;
1150   int fps_slowdown_factor;
1151 };
1152
1153 struct MenuInfo
1154 {
1155   int draw_xoffset_default;
1156   int draw_yoffset_default;
1157   int draw_xoffset[NUM_SPECIAL_GFX_ARGS];
1158   int draw_yoffset[NUM_SPECIAL_GFX_ARGS];
1159
1160   int list_size_default;
1161   int list_size[NUM_SPECIAL_GFX_ARGS];
1162 };
1163
1164 struct DoorInfo
1165 {
1166   int step_offset;
1167   int step_delay;
1168 };
1169
1170 struct ElementChangeInfo
1171 {
1172   unsigned long events;         /* bitfield for change events */
1173
1174   int delay_fixed;              /* added frame delay before changed (fixed) */
1175   int delay_random;             /* added frame delay before changed (random) */
1176   int delay_frames;             /* either 1 (frames) or 50 (seconds; 50 fps) */
1177
1178   short trigger;                /* custom element triggering change */
1179
1180   short target_element;         /* target element after change */
1181
1182   int content[3][3];            /* new elements after extended change */
1183   boolean use_content;          /* use extended change content */
1184   boolean only_complete;        /* only use complete content */
1185   int power;                    /* power of extended change */
1186
1187   boolean explode;              /* explode instead of change */
1188
1189   /* functions that are called before, while and after the change of an
1190      element -- currently only used for non-custom elements */
1191   void (*pre_change_function)(int x, int y);
1192   void (*change_function)(int x, int y);
1193   void (*post_change_function)(int x, int y);
1194 };
1195
1196 struct ElementInfo
1197 {
1198   /* ---------- token and description strings ---------- */
1199
1200   char *token_name;             /* element token used in config files */
1201   char *class_name;             /* element class used in config files */
1202   char *editor_description;     /* short description for level editor */
1203   char *custom_description;     /* custom description for level editor */
1204
1205   /* ---------- graphic and sound definitions ---------- */
1206
1207   int graphic[NUM_ACTIONS];     /* default graphics for several actions */
1208   int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS];
1209                                 /* special graphics for left/right/up/down */
1210   int special_graphic[NUM_SPECIAL_GFX_ARGS];
1211                                 /* special graphics for certain screens */
1212
1213   int sound[NUM_ACTIONS];       /* default sounds for several actions */
1214
1215   /* ---------- special element property values ---------- */
1216
1217   boolean use_template;         /* use all properties from template file */
1218
1219   boolean use_gfx_element;
1220   short gfx_element;            /* optional custom graphic element */
1221
1222   int score;                    /* score value for collecting */
1223   int gem_count;                /* gem count value for collecting */
1224
1225   int push_delay_fixed;         /* constant frame delay for pushing */
1226   int push_delay_random;        /* additional random frame delay for pushing */
1227   int move_delay_fixed;         /* constant frame delay for moving */
1228   int move_delay_random;        /* additional random frame delay for moving */
1229
1230   int move_pattern;             /* direction movable element moves to */
1231   int move_direction_initial;   /* initial direction element moves to */
1232   int move_stepsize;            /* step size element moves with */
1233
1234   int content[3][3];            /* new elements after explosion */
1235
1236   struct ElementChangeInfo change;
1237 };
1238
1239 struct FontInfo
1240 {
1241   char *token_name;             /* font token used in config files */
1242
1243   int graphic;                  /* default graphic for this font */
1244   int special_graphic[NUM_SPECIAL_GFX_ARGS];
1245                                 /* special graphics for certain screens */
1246   int special_bitmap_id[NUM_SPECIAL_GFX_ARGS];
1247                                 /* internal bitmap ID for special graphics */
1248 };
1249
1250 struct GraphicInfo
1251 {
1252   Bitmap *bitmap;
1253   int src_x, src_y;             /* start position of animation frames */
1254   int width, height;            /* width/height of each animation frame */
1255   int offset_x, offset_y;       /* x/y offset to next animation frame */
1256   int anim_frames;
1257   int anim_frames_per_line;
1258   int anim_start_frame;
1259   int anim_delay;               /* important: delay of 1 means "no delay"! */
1260   int anim_mode;
1261   boolean anim_global_sync;
1262
1263   int step_offset;              /* optional step offset of toon animations */
1264   int step_delay;               /* optional step delay of toon animations */
1265
1266   int draw_x, draw_y;           /* optional offset for drawing fonts chars */
1267
1268 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
1269   Pixmap clip_mask;             /* single-graphic-only clip mask for X11 */
1270   GC clip_gc;                   /* single-graphic-only clip gc for X11 */
1271 #endif
1272 };
1273
1274 struct SoundInfo
1275 {
1276   boolean loop;
1277 };
1278
1279 struct ElementActionInfo
1280 {
1281   char *suffix;
1282   int value;
1283   boolean is_loop_sound;
1284 };
1285
1286 struct ElementDirectionInfo
1287 {
1288   char *suffix;
1289   int value;
1290 };
1291
1292 struct SpecialSuffixInfo
1293 {
1294   char *suffix;
1295   int value;
1296 };
1297
1298
1299 #if 0
1300 extern GC                       tile_clip_gc;
1301 extern Bitmap                  *pix[];
1302 #endif
1303 extern Bitmap                  *bitmap_db_field, *bitmap_db_door;
1304 extern Pixmap                   tile_clipmask[];
1305 extern DrawBuffer             *fieldbuffer;
1306 extern DrawBuffer             *drawto_field;
1307
1308 extern int                      game_status;
1309 extern boolean                  level_editor_test_game;
1310 extern boolean                  network_playing;
1311
1312 extern int                      key_joystick_mapping;
1313
1314 extern boolean                  redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
1315 extern int                      redraw_x1, redraw_y1;
1316
1317 extern short                    Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1318 extern short                    Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1319 extern short                    MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1320 extern short                    MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1321 extern short                    MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1322 extern short                    ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1323 extern short                    Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1324 extern short                    Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1325 extern short                    StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1326 extern short                    Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1327 extern boolean                  Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1328 extern boolean                  Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1329 extern short                    JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1330 extern short                    AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1331 extern short                    AmoebaCnt[MAX_NUM_AMOEBA];
1332 extern short                    AmoebaCnt2[MAX_NUM_AMOEBA];
1333 extern short                    ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1334 extern short                    ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1335
1336 extern unsigned long            Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];
1337
1338 extern int                      GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1339 extern int                      GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1340 extern int                      GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1341 extern int                      GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
1342
1343 extern int                      lev_fieldx, lev_fieldy;
1344 extern int                      scroll_x, scroll_y;
1345
1346 extern int                      FX, FY;
1347 extern int                      ScrollStepSize;
1348 extern int                      ScreenMovDir, ScreenMovPos, ScreenGfxPos;
1349 extern int                      BorderElement;
1350 extern int                      GameFrameDelay;
1351 extern int                      FfwdFrameDelay;
1352 extern int                      BX1, BY1;
1353 extern int                      BX2, BY2;
1354 extern int                      SBX_Left, SBX_Right;
1355 extern int                      SBY_Upper, SBY_Lower;
1356 extern int                      ZX, ZY;
1357 extern int                      ExitX, ExitY;
1358 extern int                      AllPlayersGone;
1359
1360 extern int                      TimeFrames, TimePlayed, TimeLeft;
1361 extern boolean                  SiebAktiv;
1362 extern int                      SiebCount;
1363
1364 extern boolean                  network_player_action_received;
1365
1366 extern int                      graphics_action_mapping[];
1367
1368 extern struct LevelInfo         level;
1369 extern struct PlayerInfo        stored_player[], *local_player;
1370 extern struct HiScore           highscore[];
1371 extern struct TapeInfo          tape;
1372 extern struct GameInfo          game;
1373 extern struct GlobalInfo        global;
1374 extern struct MenuInfo          menu;
1375 extern struct DoorInfo          door;
1376 extern struct ElementInfo       element_info[];
1377 extern struct ElementActionInfo element_action_info[];
1378 extern struct ElementDirectionInfo element_direction_info[];
1379 extern struct SpecialSuffixInfo special_suffix_info[];
1380 extern struct TokenIntPtrInfo   image_config_vars[];
1381 extern struct FontInfo          font_info[];
1382 extern struct GraphicInfo      *graphic_info;
1383 extern struct SoundInfo        *sound_info;
1384 extern struct ConfigInfo        image_config[], sound_config[];
1385 extern struct ConfigInfo        image_config_suffix[], sound_config_suffix[];
1386
1387 #endif  /* MAIN_H */