fixed bug with CE actions "show envelope" and "exit player" when moving
[rocksndiamonds.git] / src / game_mm / mm_main.h
1 // ============================================================================
2 // Mirror Magic -- McDuffin's Revenge
3 // ----------------------------------------------------------------------------
4 // (c) 1994-2017 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // mm_main.h
10 // ============================================================================
11
12 #ifndef MM_MAIN_H
13 #define MM_MAIN_H
14
15 #define STD_LEV_FIELDX  MM_STD_PLAYFIELD_WIDTH
16 #define STD_LEV_FIELDY  MM_STD_PLAYFIELD_HEIGHT
17 #define MAX_LEV_FIELDX  MM_MAX_PLAYFIELD_WIDTH
18 #define MAX_LEV_FIELDY  MM_MAX_PLAYFIELD_HEIGHT
19
20 #define SCREENX(a)      (a)
21 #define SCREENY(a)      (a)
22 #define LEVELX(a)       (a)
23 #define LEVELY(a)       (a)
24
25 #define IN_FIELD(x, y, xsize, ysize)    ((x) >= 0 && (x) < (xsize) &&      \
26                                          (y) >= 0 && (y) < (ysize))
27 #define IN_FIELD_MINMAX(x, y, xmin, ymin, xmax, ymax)                      \
28                                         ((x) >= (xmin) && (x) <= (xmax) && \
29                                          (y) >= (ymin) && (y) <= (ymax))
30
31 #define IN_PIX_FIELD(x, y)      IN_FIELD(x, y, SXSIZE, SYSIZE)
32 #define IN_VIS_FIELD(x, y)      IN_FIELD(x, y, SCR_FIELDX, SCR_FIELDY)
33 #define IN_LEV_FIELD(x, y)      IN_FIELD(x, y, lev_fieldx, lev_fieldy)
34 #define IN_SCR_FIELD(x, y)      IN_FIELD_MINMAX(x, y, BX1, BY1, BX2, BY2)
35
36 // values for 'Elementeigenschaften'
37 #define EP_BIT_GRID             (1 << 0)
38 #define EP_BIT_MCDUFFIN         (1 << 1)
39 #define EP_BIT_RECTANGLE        (1 << 2)
40 #define EP_BIT_MIRROR           (1 << 3)
41 #define EP_BIT_MIRROR_FIXED     (1 << 4)
42 #define EP_BIT_POLAR            (1 << 5)
43 #define EP_BIT_POLAR_CROSS      (1 << 6)
44 #define EP_BIT_BEAMER           (1 << 7)
45 #define EP_BIT_CHAR             (1 << 8)
46 #define EP_BIT_REFLECTING       (1 << 9)
47 #define EP_BIT_ABSORBING        (1 << 10)
48 #define EP_BIT_INACTIVE         (1 << 11)
49 #define EP_BIT_WALL             (1 << 12)
50 #define EP_BIT_PACMAN           (1 << 13)
51
52 #define IS_GRID(e)              (Elementeigenschaften[e] & EP_BIT_GRID)
53 #define IS_MCDUFFIN(e)          (Elementeigenschaften[e] & EP_BIT_MCDUFFIN)
54 #define IS_RECTANGLE(e)         (Elementeigenschaften[e] & EP_BIT_RECTANGLE)
55 #define IS_MIRROR(e)            (Elementeigenschaften[e] & EP_BIT_MIRROR)
56 #define IS_MIRROR_FIXED(e)      (Elementeigenschaften[e] & EP_BIT_MIRROR_FIXED)
57 #define IS_POLAR(e)             (Elementeigenschaften[e] & EP_BIT_POLAR)
58 #define IS_POLAR_CROSS(e)       (Elementeigenschaften[e] & EP_BIT_POLAR_CROSS)
59 #define IS_BEAMER_OLD(e)        (Elementeigenschaften[e] & EP_BIT_BEAMER)
60 #define IS_CHAR(e)              (Elementeigenschaften[e] & EP_BIT_CHAR)
61 #define IS_REFLECTING(e)        (Elementeigenschaften[e] & EP_BIT_REFLECTING)
62 #define IS_ABSORBING(e)         (Elementeigenschaften[e] & EP_BIT_ABSORBING)
63 #define IS_INACTIVE(e)          (Elementeigenschaften[e] & EP_BIT_INACTIVE)
64 #define IS_MM_WALL(e)           (Elementeigenschaften[e] & EP_BIT_WALL)
65 #define IS_PACMAN(e)            (Elementeigenschaften[e] & EP_BIT_PACMAN)
66
67 #define IS_WALL_STEEL(e)        ((e) >= EL_WALL_STEEL_START &&          \
68                                  (e) <= EL_WALL_STEEL_END)
69 #define IS_WALL_WOOD(e)         ((e) >= EL_WALL_WOOD_START &&           \
70                                  (e) <= EL_WALL_WOOD_END)
71 #define IS_WALL_ICE(e)          ((e) >= EL_WALL_ICE_START &&            \
72                                  (e) <= EL_WALL_ICE_END)
73 #define IS_WALL_AMOEBA(e)       ((e) >= EL_WALL_AMOEBA_START &&         \
74                                  (e) <= EL_WALL_AMOEBA_END)
75 #define IS_DF_WALL_STEEL(e)     ((e) >= EL_DF_WALL_STEEL_START &&       \
76                                  (e) <= EL_DF_WALL_STEEL_END)
77 #define IS_DF_WALL_WOOD(e)      ((e) >= EL_DF_WALL_WOOD_START &&        \
78                                  (e) <= EL_DF_WALL_WOOD_END)
79 #define IS_DF_WALL(e)           ((e) >= EL_DF_WALL_START &&             \
80                                  (e) <= EL_DF_WALL_END)
81 #define IS_WALL(e)              (IS_MM_WALL(e) || IS_DF_WALL(e))
82 #define IS_WALL_CHANGING(e)     ((e) >= EL_WALL_CHANGING_START &&       \
83                                  (e) <= EL_WALL_CHANGING_END)
84 #define IS_GRID_STEEL(e)        ((e) >= EL_GRID_STEEL_START &&          \
85                                  (e) <= EL_GRID_STEEL_END)
86 #define IS_GRID_WOOD(e)         ((e) >= EL_GRID_WOOD_START &&           \
87                                  (e) <= EL_GRID_WOOD_END)
88 #define IS_GRID_WOOD_FIXED(e)   ((e) >= EL_GRID_WOOD_FIXED_START &&     \
89                                  (e) <= EL_GRID_WOOD_FIXED_END)
90 #define IS_GRID_STEEL_FIXED(e)  ((e) >= EL_GRID_STEEL_FIXED_START &&    \
91                                  (e) <= EL_GRID_STEEL_FIXED_END)
92 #define IS_GRID_WOOD_AUTO(e)    ((e) >= EL_GRID_WOOD_AUTO_START &&      \
93                                  (e) <= EL_GRID_WOOD_AUTO_END)
94 #define IS_GRID_STEEL_AUTO(e)   ((e) >= EL_GRID_STEEL_AUTO_START &&     \
95                                  (e) <= EL_GRID_STEEL_AUTO_END)
96 #define IS_DF_GRID(e)           (IS_GRID_WOOD_FIXED(e) ||               \
97                                  IS_GRID_STEEL_FIXED(e) ||              \
98                                  IS_GRID_WOOD_AUTO(e) ||                \
99                                  IS_GRID_STEEL_AUTO(e))
100 #define IS_DF_MIRROR(e)         ((e) >= EL_DF_MIRROR_START &&           \
101                                  (e) <= EL_DF_MIRROR_END)
102 #define IS_DF_MIRROR_AUTO(e)    ((e) >= EL_DF_MIRROR_AUTO_START &&      \
103                                  (e) <= EL_DF_MIRROR_AUTO_END)
104 #define IS_LASER(e)             ((e) >= EL_LASER_START &&               \
105                                  (e) <= EL_LASER_END)
106 #define IS_RECEIVER(e)          ((e) >= EL_RECEIVER_START &&            \
107                                  (e) <= EL_RECEIVER_END)
108 #define IS_FIBRE_OPTIC(e)       ((e) >= EL_FIBRE_OPTIC_START &&         \
109                                  (e) <= EL_FIBRE_OPTIC_END)
110 #define FIBRE_OPTIC_NR(e)       (((e) - EL_FIBRE_OPTIC_START) / 2)
111 #define IS_BEAMER(e)            ((e) >= EL_BEAMER_RED_START &&          \
112                                  (e) <= EL_BEAMER_BLUE_END)
113 #define BEAMER_CLASSIC_NR(e)    (((e) - EL_BEAMER_RED_START) / 16)
114 #define BEAMER_NR(e)            (IS_BEAMER(e) ? BEAMER_CLASSIC_NR(e) :  \
115                                  IS_FIBRE_OPTIC(e) ? (FIBRE_OPTIC_NR(e)+4) : 0)
116 #define IS_EXPLODING(e)         ((e) == EL_EXPLODING_OPAQUE ||          \
117                                  (e) == EL_EXPLODING_TRANSP)
118
119 #define IS_EATABLE4PACMAN(e)    ((e) == EL_EMPTY ||                     \
120                                  (e) == EL_KETTLE ||                    \
121                                  (e) == EL_CELL ||                      \
122                                  (e) == EL_BOMB ||                      \
123                                  IS_WALL_AMOEBA(e))
124
125 #define CAN_MOVE(e)             ((e) == EL_PACMAN)
126 #define IS_FREE(x,y)            (Feld[x][y] == EL_EMPTY)
127
128 #define IS_MOVING(x,y)          (MovPos[x][y] != 0)
129 #define IS_BLOCKED(x,y)         (Feld[x][y] == EL_BLOCKED)
130 #define IS_DRAWABLE(e)          ((e) < EL_BLOCKED)
131 #define IS_NOT_DRAWABLE(e)      ((e) >= EL_BLOCKED)
132
133 #define PLAYERINFO(x,y)         (&stored_player[StorePlayer[x][y]-EL_SPIELER1])
134
135 #define WALL_BASE(e)            ((e) & 0xfff0)
136 #define WALL_BITS(e)            ((e) & 0x000f)
137
138 // Bitmaps with graphic file
139 #define PIX_BACK                0
140 #define PIX_DOOR                1
141 #define PIX_TOONS               2
142 #define PIX_DF                  3
143 #define PIX_BIGFONT             4
144 #define PIX_SMALLFONT           5
145 #define PIX_MEDIUMFONT          6
146 // Bitmaps without graphic file
147 #define PIX_DB_DOOR             7
148
149 #define NUM_PICTURES            7
150 #define NUM_BITMAPS             8
151
152 // boundaries of arrays etc.
153 #define MAX_PLAYER_NAME_LEN     10
154 #define MAX_LEVEL_NAME_LEN      32
155 #define MAX_LEVEL_AUTHOR_LEN    32
156 #define MAX_SCORE_ENTRIES       100
157 #define MAX_ELEMENTS            700             // 500 static + 200 runtime
158
159 #define MICROLEVEL_SCROLL_DELAY 50      // delay for scrolling micro level
160 #define MICROLEVEL_LABEL_DELAY  250     // delay for micro level label
161
162 // score for elements
163 #define SC_COLLECTIBLE          0
164 #define SC_UNUSED_1             1
165 #define SC_UNUSED_2             2
166 #define SC_UNUSED_3             3
167 #define SC_UNUSED_4             4
168 #define SC_UNUSED_5             5
169 #define SC_PACMAN               6
170 #define SC_UNUSED_7             7
171 #define SC_UNUSED_8             8
172 #define SC_KEY                  9
173 #define SC_TIME_BONUS           10
174 #define SC_UNUSED_11            11
175 #define SC_UNUSED_12            12
176 #define SC_UNUSED_13            13
177 #define SC_LIGHTBALL            14
178 #define SC_UNUSED_15            15
179
180 #define LEVEL_SCORE_ELEMENTS    16      // level elements with score
181
182
183 struct HiScore_MM
184 {
185   char Name[MAX_PLAYER_NAME_LEN + 1];
186   int Score;
187 };
188
189 extern DrawBuffer      *drawto_field;
190
191 extern int              game_status;
192 extern boolean          level_editor_test_game;
193
194 extern boolean          redraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
195 extern int              redraw_x1, redraw_y1;
196
197 extern short            Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
198 extern short            Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
199 extern short            Hit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
200 extern short            Box[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
201 extern short            Angle[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
202
203 extern short            MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
204 extern short            MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
205 extern short            MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
206 extern short            Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
207 extern short            Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
208 extern short            StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
209 extern short            Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
210 extern boolean          Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
211 extern short            AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
212 extern short            AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
213 extern unsigned int     Elementeigenschaften[MAX_ELEMENTS];
214
215 extern int              level_nr;
216 extern int              lev_fieldx, lev_fieldy, scroll_x, scroll_y;
217
218 extern int              FX, FY, ScrollStepSize;
219 extern int              ScreenMovDir, ScreenMovPos, ScreenGfxPos;
220 extern int              GameFrameDelay;
221 extern int              FfwdFrameDelay;
222 extern int              BX1, BY1, BX2, BY2;
223 extern int              SBX_Left, SBX_Right;
224 extern int              SBY_Upper, SBY_Lower;
225 extern int              TimeFrames, TimePlayed, TimeLeft;
226
227 extern struct LevelInfo_MM      native_mm_level;
228 extern struct HiScore_MM        highscore[];
229 extern struct TapeInfo          tape;
230 extern struct SetupInfo         setup;
231 extern struct GameInfo_MM       game_mm;
232 extern struct LaserInfo         laser;
233 extern struct GlobalInfo        global;
234
235 extern short            LX, LY, XS, YS, ELX, ELY;
236 extern short            CT, Ct;
237
238 extern int              dSX, dSY;
239 extern int              cSX, cSY;
240 extern int              cSX2, cSY2;
241 extern int              cFX, cFY;
242
243 extern Pixel            pen_fg, pen_bg, pen_ray, pen_magicolor[2];
244 extern int              color_status;
245
246 extern struct XY        Step[];
247 extern short            Sign[16];
248
249 extern char            *element_info[];
250 extern int              num_element_info;
251
252 // often used screen positions
253 #define DX                      534
254 #define DY                      60
255 #define EX                      DX
256 #define EY                      (DY + 178)
257 #define TILEX                   TILESIZE
258 #define TILEY                   TILESIZE
259 #define MINI_TILESIZE           (TILESIZE / 2)
260 #define MINI_TILEX              (TILEX / 2)
261 #define MINI_TILEY              (TILEY / 2)
262 #define MICRO_TILEX             (TILEX / 4)
263 #define MICRO_TILEY             (TILEY / 4)
264 #define MICRO_WALLX             (TILEX / 8)
265 #define MICRO_WALLY             (TILEY / 8)
266 #define MIDPOSX                 (SCR_FIELDX / 2)
267 #define MIDPOSY                 (SCR_FIELDY / 2)
268 #define DXSIZE                  100
269 #define DYSIZE                  280
270 #define VXSIZE                  DXSIZE
271 #define VYSIZE                  100
272 #define EXSIZE                  DXSIZE
273 #define EYSIZE                  (VXSIZE + 44)
274 #define FULL_SXSIZE             (2 + SXSIZE + 2)
275 #define FULL_SYSIZE             (2 + SYSIZE + 2)
276 #define MICROLEV_XPOS           (SX + 12 * TILEX)
277 #define MICROLEV_YPOS           (SY +  6 * TILEY)
278 #define MICROLEV_XSIZE          (STD_LEV_FIELDX * MICRO_TILEX)
279 #define MICROLEV_YSIZE          (STD_LEV_FIELDY * MICRO_TILEY)
280 #define MICROLABEL_XPOS         (SY)
281 #define MICROLABEL_YPOS         (SY + 352)
282 #define MICROLABEL_XSIZE        (SXSIZE)
283 #define MICROLABEL_YSIZE        (FONT4_YSIZE)
284
285 #define GFX_STARTX              SX
286 #define GFX_STARTY              SY
287 #define MINI_GFX_STARTX         (SX + 8 * TILEX)
288 #define MINI_GFX_STARTY         (SY + 6 * TILEY)
289 #define MICRO_GFX_STARTX        (MINI_GFX_STARTX + 8 * MINI_TILEX)
290 #define MICRO_GFX_STARTY        (MINI_GFX_STARTY + 6 * MINI_TILEY)
291 #define GFX_PER_LINE            16
292 #define MINI_GFX_PER_LINE       GFX_PER_LINE
293 #define MICRO_GFX_PER_LINE      GFX_PER_LINE
294
295 #define MINI_DF_STARTX          (8 * TILEX)
296 #define MINI_DF_STARTY          (8 * TILEY)
297 #define MICRO_DF_STARTX         (MINI_DF_STARTX + 8 * MINI_TILEX)
298 #define MICRO_DF_STARTY         (MINI_DF_STARTY + 8 * MINI_TILEY)
299 #define DF_PER_LINE             16
300 #define MINI_DF_PER_LINE        DF_PER_LINE
301 #define MICRO_DF_PER_LINE       DF_PER_LINE
302
303 #define MICRO_FONT_STARTX       (MICRO_DF_STARTX + 8 * MICRO_TILEX)
304 #define MICRO_FONT_STARTY       (MICRO_DF_STARTY + 8 * MICRO_TILEY)
305 #define MICRO_FONT_PER_LINE     8
306
307 // wall positions (that can be OR'ed together)
308 #define WALL_TOPLEFT            1
309 #define WALL_TOPRIGHT           2
310 #define WALL_BOTTOMLEFT         4
311 #define WALL_BOTTOMRIGHT        8
312 #define WALL_LEFT               (WALL_TOPLEFT    | WALL_BOTTOMLEFT)
313 #define WALL_RIGHT              (WALL_TOPRIGHT   | WALL_BOTTOMRIGHT)
314 #define WALL_TOP                (WALL_TOPLEFT    | WALL_TOPRIGHT)
315 #define WALL_BOTTOM             (WALL_BOTTOMLEFT | WALL_BOTTOMRIGHT)
316
317 // game elements:
318 //        0 - 499: real elements, stored in level file
319 //      500 - 699: flag elements, only used at runtime
320
321 // "real" level elements
322 #define EL_MM_START             0
323 #define EL_MM_START_1           EL_MM_START
324
325 #define EL_EMPTY                0
326 #define EL_MIRROR_START         1
327 #define EL_MIRROR_00            (EL_MIRROR_START + 0)
328 #define EL_MIRROR_01            (EL_MIRROR_START + 1)
329 #define EL_MIRROR_02            (EL_MIRROR_START + 2)
330 #define EL_MIRROR_03            (EL_MIRROR_START + 3)
331 #define EL_MIRROR_04            (EL_MIRROR_START + 4)
332 #define EL_MIRROR_05            (EL_MIRROR_START + 5)
333 #define EL_MIRROR_06            (EL_MIRROR_START + 6)
334 #define EL_MIRROR_07            (EL_MIRROR_START + 7)
335 #define EL_MIRROR_08            (EL_MIRROR_START + 8)
336 #define EL_MIRROR_09            (EL_MIRROR_START + 9)
337 #define EL_MIRROR_10            (EL_MIRROR_START + 10)
338 #define EL_MIRROR_11            (EL_MIRROR_START + 11)
339 #define EL_MIRROR_12            (EL_MIRROR_START + 12)
340 #define EL_MIRROR_13            (EL_MIRROR_START + 13)
341 #define EL_MIRROR_14            (EL_MIRROR_START + 14)
342 #define EL_MIRROR_15            (EL_MIRROR_START + 15)
343 #define EL_MIRROR_END           EL_MIRROR_15
344 #define EL_GRID_STEEL_START     17
345 #define EL_GRID_STEEL_00        (EL_GRID_STEEL_START + 0)
346 #define EL_GRID_STEEL_01        (EL_GRID_STEEL_START + 1)
347 #define EL_GRID_STEEL_02        (EL_GRID_STEEL_START + 2)
348 #define EL_GRID_STEEL_03        (EL_GRID_STEEL_START + 3)
349 #define EL_GRID_STEEL_END       EL_GRID_STEEL_03
350 #define EL_MCDUFFIN_START       21
351 #define EL_MCDUFFIN_RIGHT       (EL_MCDUFFIN_START + 0)
352 #define EL_MCDUFFIN_UP          (EL_MCDUFFIN_START + 1)
353 #define EL_MCDUFFIN_LEFT        (EL_MCDUFFIN_START + 2)
354 #define EL_MCDUFFIN_DOWN        (EL_MCDUFFIN_START + 3)
355 #define EL_MCDUFFIN_END         EL_MCDUFFIN_DOWN
356 #define EL_EXIT_CLOSED          25
357 #define EL_EXIT_OPENING_1       26
358 #define EL_EXIT_OPENING_2       27
359 #define EL_EXIT_OPEN            28
360 #define EL_KETTLE               29
361 #define EL_BOMB                 30
362 #define EL_PRISM                31
363 #define EL_WALL_START           32
364 #define EL_WALL_EMPTY           EL_WALL_START
365 #define EL_WALL_00              EL_WALL_START
366 #define EL_WALL_STEEL           EL_WALL_00
367 #define EL_WALL_STEEL_START     EL_WALL_00
368 #define EL_WALL_15              47
369 #define EL_WALL_STEEL_END       EL_WALL_15
370 #define EL_WALL_16              48
371 #define EL_WALL_WOOD            EL_WALL_16
372 #define EL_WALL_WOOD_START      EL_WALL_16
373 #define EL_WALL_31              63
374 #define EL_WALL_WOOD_END        EL_WALL_31
375 #define EL_WALL_32              64
376 #define EL_WALL_ICE             EL_WALL_32
377 #define EL_WALL_ICE_START       EL_WALL_32
378 #define EL_WALL_47              79
379 #define EL_WALL_ICE_END         EL_WALL_47
380 #define EL_WALL_48              80
381 #define EL_WALL_AMOEBA          EL_WALL_48
382 #define EL_WALL_AMOEBA_START    EL_WALL_48
383 #define EL_WALL_63              95
384 #define EL_WALL_AMOEBA_END      EL_WALL_63
385 #define EL_WALL_END             EL_WALL_63
386 #define EL_BLOCK_WOOD           96
387 #define EL_BALL_GRAY            97
388 #define EL_BEAMER_START         98
389 #define EL_BEAMER_00            (EL_BEAMER_START + 0)
390 #define EL_BEAMER_01            (EL_BEAMER_START + 1)
391 #define EL_BEAMER_02            (EL_BEAMER_START + 2)
392 #define EL_BEAMER_03            (EL_BEAMER_START + 3)
393 #define EL_BEAMER_04            (EL_BEAMER_START + 4)
394 #define EL_BEAMER_05            (EL_BEAMER_START + 5)
395 #define EL_BEAMER_06            (EL_BEAMER_START + 6)
396 #define EL_BEAMER_07            (EL_BEAMER_START + 7)
397 #define EL_BEAMER_08            (EL_BEAMER_START + 8)
398 #define EL_BEAMER_09            (EL_BEAMER_START + 9)
399 #define EL_BEAMER_10            (EL_BEAMER_START + 10)
400 #define EL_BEAMER_11            (EL_BEAMER_START + 11)
401 #define EL_BEAMER_12            (EL_BEAMER_START + 12)
402 #define EL_BEAMER_13            (EL_BEAMER_START + 13)
403 #define EL_BEAMER_14            (EL_BEAMER_START + 14)
404 #define EL_BEAMER_15            (EL_BEAMER_START + 15)
405 #define EL_BEAMER_END           EL_BEAMER_15
406 #define EL_FUSE_ON              114
407 #define EL_PACMAN_START         115
408 #define EL_PACMAN_RIGHT         (EL_PACMAN_START + 0)
409 #define EL_PACMAN_UP            (EL_PACMAN_START + 1)
410 #define EL_PACMAN_LEFT          (EL_PACMAN_START + 2)
411 #define EL_PACMAN_DOWN          (EL_PACMAN_START + 3)
412 #define EL_PACMAN_END           EL_PACMAN_DOWN
413 #define EL_POLAR_START          119
414 #define EL_POLAR_00             (EL_POLAR_START + 0)
415 #define EL_POLAR_01             (EL_POLAR_START + 1)
416 #define EL_POLAR_02             (EL_POLAR_START + 2)
417 #define EL_POLAR_03             (EL_POLAR_START + 3)
418 #define EL_POLAR_04             (EL_POLAR_START + 4)
419 #define EL_POLAR_05             (EL_POLAR_START + 5)
420 #define EL_POLAR_06             (EL_POLAR_START + 6)
421 #define EL_POLAR_07             (EL_POLAR_START + 7)
422 #define EL_POLAR_08             (EL_POLAR_START + 8)
423 #define EL_POLAR_09             (EL_POLAR_START + 9)
424 #define EL_POLAR_10             (EL_POLAR_START + 10)
425 #define EL_POLAR_11             (EL_POLAR_START + 11)
426 #define EL_POLAR_12             (EL_POLAR_START + 12)
427 #define EL_POLAR_13             (EL_POLAR_START + 13)
428 #define EL_POLAR_14             (EL_POLAR_START + 14)
429 #define EL_POLAR_15             (EL_POLAR_START + 15)
430 #define EL_POLAR_END            EL_POLAR_15
431 #define EL_POLAR_CROSS_START    135
432 #define EL_POLAR_CROSS_00       (EL_POLAR_CROSS_START + 0)
433 #define EL_POLAR_CROSS_01       (EL_POLAR_CROSS_START + 1)
434 #define EL_POLAR_CROSS_02       (EL_POLAR_CROSS_START + 2)
435 #define EL_POLAR_CROSS_03       (EL_POLAR_CROSS_START + 3)
436 #define EL_POLAR_CROSS_END      EL_POLAR_CROSS_03
437 #define EL_MIRROR_FIXED_START   139
438 #define EL_MIRROR_FIXED_00      (EL_MIRROR_FIXED_START + 0)
439 #define EL_MIRROR_FIXED_01      (EL_MIRROR_FIXED_START + 1)
440 #define EL_MIRROR_FIXED_02      (EL_MIRROR_FIXED_START + 2)
441 #define EL_MIRROR_FIXED_03      (EL_MIRROR_FIXED_START + 3)
442 #define EL_MIRROR_FIXED_END     EL_MIRROR_FIXED_03
443 #define EL_GATE_STONE           143
444 #define EL_KEY                  144
445 #define EL_LIGHTBULB_OFF        145
446 #define EL_LIGHTBULB_ON         146
447 #define EL_LIGHTBALL            147
448 #define EL_BLOCK_STONE          148
449 #define EL_GATE_WOOD            149
450 #define EL_FUEL_FULL            150
451 #define EL_GRID_WOOD_START      151
452 #define EL_GRID_WOOD_00         (EL_GRID_WOOD_START + 0)
453 #define EL_GRID_WOOD_01         (EL_GRID_WOOD_START + 1)
454 #define EL_GRID_WOOD_02         (EL_GRID_WOOD_START + 2)
455 #define EL_GRID_WOOD_03         (EL_GRID_WOOD_START + 3)
456 #define EL_GRID_WOOD_END        EL_GRID_WOOD_03
457 #define EL_FUEL_EMPTY           155
458
459 #define EL_MM_END_1             155
460
461 #define EL_CHAR_START           160
462 #define EL_CHAR_ASCII0          (EL_CHAR_START - 32)
463 #define EL_CHAR_AUSRUF          (EL_CHAR_ASCII0 + 33)
464 #define EL_CHAR_ZOLL            (EL_CHAR_ASCII0 + 34)
465 #define EL_CHAR_RAUTE           (EL_CHAR_ASCII0 + 35)
466 #define EL_CHAR_DOLLAR          (EL_CHAR_ASCII0 + 36)
467 #define EL_CHAR_PROZ            (EL_CHAR_ASCII0 + 37)
468 #define EL_CHAR_AMPERSAND       (EL_CHAR_ASCII0 + 38)
469 #define EL_CHAR_APOSTR          (EL_CHAR_ASCII0 + 39)
470 #define EL_CHAR_KLAMM1          (EL_CHAR_ASCII0 + 40)
471 #define EL_CHAR_KLAMM2          (EL_CHAR_ASCII0 + 41)
472 #define EL_CHAR_MULT            (EL_CHAR_ASCII0 + 42)
473 #define EL_CHAR_PLUS            (EL_CHAR_ASCII0 + 43)
474 #define EL_CHAR_KOMMA           (EL_CHAR_ASCII0 + 44)
475 #define EL_CHAR_MINUS           (EL_CHAR_ASCII0 + 45)
476 #define EL_CHAR_PUNKT           (EL_CHAR_ASCII0 + 46)
477 #define EL_CHAR_SLASH           (EL_CHAR_ASCII0 + 47)
478 #define EL_CHAR_0               (EL_CHAR_ASCII0 + 48)
479 #define EL_CHAR_9               (EL_CHAR_ASCII0 + 57)
480 #define EL_CHAR_DOPPEL          (EL_CHAR_ASCII0 + 58)
481 #define EL_CHAR_SEMIKL          (EL_CHAR_ASCII0 + 59)
482 #define EL_CHAR_LT              (EL_CHAR_ASCII0 + 60)
483 #define EL_CHAR_GLEICH          (EL_CHAR_ASCII0 + 61)
484 #define EL_CHAR_GT              (EL_CHAR_ASCII0 + 62)
485 #define EL_CHAR_FRAGE           (EL_CHAR_ASCII0 + 63)
486 #define EL_CHAR_AT              (EL_CHAR_ASCII0 + 64)
487 #define EL_CHAR_A               (EL_CHAR_ASCII0 + 65)
488 #define EL_CHAR_Z               (EL_CHAR_ASCII0 + 90)
489 #define EL_CHAR_AE              (EL_CHAR_ASCII0 + 91)
490 #define EL_CHAR_OE              (EL_CHAR_ASCII0 + 92)
491 #define EL_CHAR_UE              (EL_CHAR_ASCII0 + 93)
492 #define EL_CHAR_COPY            (EL_CHAR_ASCII0 + 94)
493 #define EL_CHAR_END             (EL_CHAR_START + 79)
494
495 #define EL_CHAR(x)              ((x) == CHAR_BYTE_UMLAUT_A ? EL_CHAR_AE : \
496                                  (x) == CHAR_BYTE_UMLAUT_O ? EL_CHAR_OE : \
497                                  (x) == CHAR_BYTE_UMLAUT_U ? EL_CHAR_UE : \
498                                  EL_CHAR_A + (x) - 'A')
499
500 #define EL_MM_START_2           240
501
502 // elements for "Deflektor" style levels
503 #define EL_DF_START             EL_MM_START_2
504
505 #define EL_DF_MIRROR_START      EL_DF_START
506 #define EL_DF_MIRROR_00         (EL_DF_MIRROR_START + 0)
507 #define EL_DF_MIRROR_01         (EL_DF_MIRROR_START + 1)
508 #define EL_DF_MIRROR_02         (EL_DF_MIRROR_START + 2)
509 #define EL_DF_MIRROR_03         (EL_DF_MIRROR_START + 3)
510 #define EL_DF_MIRROR_04         (EL_DF_MIRROR_START + 4)
511 #define EL_DF_MIRROR_05         (EL_DF_MIRROR_START + 5)
512 #define EL_DF_MIRROR_06         (EL_DF_MIRROR_START + 6)
513 #define EL_DF_MIRROR_07         (EL_DF_MIRROR_START + 7)
514 #define EL_DF_MIRROR_08         (EL_DF_MIRROR_START + 8)
515 #define EL_DF_MIRROR_09         (EL_DF_MIRROR_START + 9)
516 #define EL_DF_MIRROR_10         (EL_DF_MIRROR_START + 10)
517 #define EL_DF_MIRROR_11         (EL_DF_MIRROR_START + 11)
518 #define EL_DF_MIRROR_12         (EL_DF_MIRROR_START + 12)
519 #define EL_DF_MIRROR_13         (EL_DF_MIRROR_START + 13)
520 #define EL_DF_MIRROR_14         (EL_DF_MIRROR_START + 14)
521 #define EL_DF_MIRROR_15         (EL_DF_MIRROR_START + 15)
522 #define EL_DF_MIRROR_END        EL_DF_MIRROR_15
523
524 #define EL_GRID_WOOD_FIXED_START 256
525 #define EL_GRID_WOOD_FIXED_00   (EL_GRID_WOOD_FIXED_START + 0)  //   0.0°
526 #define EL_GRID_WOOD_FIXED_01   (EL_GRID_WOOD_FIXED_START + 1)  //  22.5°
527 #define EL_GRID_WOOD_FIXED_02   (EL_GRID_WOOD_FIXED_START + 2)  //  45.0°
528 #define EL_GRID_WOOD_FIXED_03   (EL_GRID_WOOD_FIXED_START + 3)  //  67.5°
529 #define EL_GRID_WOOD_FIXED_04   (EL_GRID_WOOD_FIXED_START + 4)  //  90.0°
530 #define EL_GRID_WOOD_FIXED_05   (EL_GRID_WOOD_FIXED_START + 5)  // 112.5°
531 #define EL_GRID_WOOD_FIXED_06   (EL_GRID_WOOD_FIXED_START + 6)  // 135.0°
532 #define EL_GRID_WOOD_FIXED_07   (EL_GRID_WOOD_FIXED_START + 7)  // 157.5°
533 #define EL_GRID_WOOD_FIXED_END  EL_GRID_WOOD_FIXED_07
534
535 #define EL_GRID_STEEL_FIXED_START 264
536 #define EL_GRID_STEEL_FIXED_00  (EL_GRID_STEEL_FIXED_START + 0) //   0.0°
537 #define EL_GRID_STEEL_FIXED_01  (EL_GRID_STEEL_FIXED_START + 1) //  22.5°
538 #define EL_GRID_STEEL_FIXED_02  (EL_GRID_STEEL_FIXED_START + 2) //  45.0°
539 #define EL_GRID_STEEL_FIXED_03  (EL_GRID_STEEL_FIXED_START + 3) //  67.5°
540 #define EL_GRID_STEEL_FIXED_04  (EL_GRID_STEEL_FIXED_START + 4) //  90.0°
541 #define EL_GRID_STEEL_FIXED_05  (EL_GRID_STEEL_FIXED_START + 5) // 112.5°
542 #define EL_GRID_STEEL_FIXED_06  (EL_GRID_STEEL_FIXED_START + 6) // 135.0°
543 #define EL_GRID_STEEL_FIXED_07  (EL_GRID_STEEL_FIXED_START + 7) // 157.5°
544 #define EL_GRID_STEEL_FIXED_END EL_GRID_STEEL_FIXED_07
545
546 #define EL_DF_WALL_WOOD         272
547 #define EL_DF_WALL_START        EL_DF_WALL_WOOD_START
548 #define EL_DF_WALL_WOOD_START   (EL_DF_WALL_WOOD + 0)
549 #define EL_DF_WALL_WOOD_END     (EL_DF_WALL_WOOD + 15)
550
551 #define EL_DF_WALL_STEEL        288
552 #define EL_DF_WALL_STEEL_START  (EL_DF_WALL_STEEL + 0)
553 #define EL_DF_WALL_STEEL_END    (EL_DF_WALL_STEEL + 15)
554 #define EL_DF_WALL_END          EL_DF_WALL_STEEL_END
555
556 #define EL_DF_EMPTY             304
557 #define EL_CELL                 305
558 #define EL_MINE                 306
559 #define EL_REFRACTOR            307
560
561 #define EL_LASER_START          308
562 #define EL_LASER_RIGHT          (EL_LASER_START + 0)
563 #define EL_LASER_UP             (EL_LASER_START + 1)
564 #define EL_LASER_LEFT           (EL_LASER_START + 2)
565 #define EL_LASER_DOWN           (EL_LASER_START + 3)
566 #define EL_LASER_END            EL_LASER_DOWN
567
568 #define EL_RECEIVER_START       312
569 #define EL_RECEIVER_RIGHT       (EL_RECEIVER_START + 0)
570 #define EL_RECEIVER_UP          (EL_RECEIVER_START + 1)
571 #define EL_RECEIVER_LEFT        (EL_RECEIVER_START + 2)
572 #define EL_RECEIVER_DOWN        (EL_RECEIVER_START + 3)
573 #define EL_RECEIVER_END         EL_RECEIVER_DOWN
574
575 #define EL_FIBRE_OPTIC_START    316
576 #define EL_FIBRE_OPTIC_00       (EL_FIBRE_OPTIC_START + 0)
577 #define EL_FIBRE_OPTIC_01       (EL_FIBRE_OPTIC_START + 1)
578 #define EL_FIBRE_OPTIC_02       (EL_FIBRE_OPTIC_START + 2)
579 #define EL_FIBRE_OPTIC_03       (EL_FIBRE_OPTIC_START + 3)
580 #define EL_FIBRE_OPTIC_04       (EL_FIBRE_OPTIC_START + 4)
581 #define EL_FIBRE_OPTIC_05       (EL_FIBRE_OPTIC_START + 5)
582 #define EL_FIBRE_OPTIC_06       (EL_FIBRE_OPTIC_START + 6)
583 #define EL_FIBRE_OPTIC_07       (EL_FIBRE_OPTIC_START + 7)
584 #define EL_FIBRE_OPTIC_END      EL_FIBRE_OPTIC_07
585
586 #define EL_DF_MIRROR_AUTO_START 324
587 #define EL_DF_MIRROR_AUTO_00    (EL_DF_MIRROR_AUTO_START + 0)
588 #define EL_DF_MIRROR_AUTO_01    (EL_DF_MIRROR_AUTO_START + 1)
589 #define EL_DF_MIRROR_AUTO_02    (EL_DF_MIRROR_AUTO_START + 2)
590 #define EL_DF_MIRROR_AUTO_03    (EL_DF_MIRROR_AUTO_START + 3)
591 #define EL_DF_MIRROR_AUTO_04    (EL_DF_MIRROR_AUTO_START + 4)
592 #define EL_DF_MIRROR_AUTO_05    (EL_DF_MIRROR_AUTO_START + 5)
593 #define EL_DF_MIRROR_AUTO_06    (EL_DF_MIRROR_AUTO_START + 6)
594 #define EL_DF_MIRROR_AUTO_07    (EL_DF_MIRROR_AUTO_START + 7)
595 #define EL_DF_MIRROR_AUTO_08    (EL_DF_MIRROR_AUTO_START + 8)
596 #define EL_DF_MIRROR_AUTO_09    (EL_DF_MIRROR_AUTO_START + 9)
597 #define EL_DF_MIRROR_AUTO_10    (EL_DF_MIRROR_AUTO_START + 10)
598 #define EL_DF_MIRROR_AUTO_11    (EL_DF_MIRROR_AUTO_START + 11)
599 #define EL_DF_MIRROR_AUTO_12    (EL_DF_MIRROR_AUTO_START + 12)
600 #define EL_DF_MIRROR_AUTO_13    (EL_DF_MIRROR_AUTO_START + 13)
601 #define EL_DF_MIRROR_AUTO_14    (EL_DF_MIRROR_AUTO_START + 14)
602 #define EL_DF_MIRROR_AUTO_15    (EL_DF_MIRROR_AUTO_START + 15)
603 #define EL_DF_MIRROR_AUTO_END   EL_DF_MIRROR_AUTO_15
604
605 #define EL_GRID_WOOD_AUTO_START 340
606 #define EL_GRID_WOOD_AUTO_00    (EL_GRID_WOOD_AUTO_START + 0)
607 #define EL_GRID_WOOD_AUTO_01    (EL_GRID_WOOD_AUTO_START + 1)
608 #define EL_GRID_WOOD_AUTO_02    (EL_GRID_WOOD_AUTO_START + 2)
609 #define EL_GRID_WOOD_AUTO_03    (EL_GRID_WOOD_AUTO_START + 3)
610 #define EL_GRID_WOOD_AUTO_04    (EL_GRID_WOOD_AUTO_START + 4)
611 #define EL_GRID_WOOD_AUTO_05    (EL_GRID_WOOD_AUTO_START + 5)
612 #define EL_GRID_WOOD_AUTO_06    (EL_GRID_WOOD_AUTO_START + 6)
613 #define EL_GRID_WOOD_AUTO_07    (EL_GRID_WOOD_AUTO_START + 7)
614 #define EL_GRID_WOOD_AUTO_END   EL_GRID_WOOD_AUTO_07
615
616 #define EL_GRID_STEEL_AUTO_START 348
617 #define EL_GRID_STEEL_AUTO_00   (EL_GRID_STEEL_AUTO_START + 0)
618 #define EL_GRID_STEEL_AUTO_01   (EL_GRID_STEEL_AUTO_START + 1)
619 #define EL_GRID_STEEL_AUTO_02   (EL_GRID_STEEL_AUTO_START + 2)
620 #define EL_GRID_STEEL_AUTO_03   (EL_GRID_STEEL_AUTO_START + 3)
621 #define EL_GRID_STEEL_AUTO_04   (EL_GRID_STEEL_AUTO_START + 4)
622 #define EL_GRID_STEEL_AUTO_05   (EL_GRID_STEEL_AUTO_START + 5)
623 #define EL_GRID_STEEL_AUTO_06   (EL_GRID_STEEL_AUTO_START + 6)
624 #define EL_GRID_STEEL_AUTO_07   (EL_GRID_STEEL_AUTO_START + 7)
625 #define EL_GRID_STEEL_AUTO_END  EL_GRID_STEEL_AUTO_07
626
627 #define EL_DF_END               355
628
629 #define EL_BEAMER_RED_START     356
630 #define EL_BEAMER_RED_END       (EL_BEAMER_RED_START + 15)
631 #define EL_BEAMER_YELLOW_START  372
632 #define EL_BEAMER_YELLOW_END    (EL_BEAMER_YELLOW_START + 15)
633 #define EL_BEAMER_GREEN_START   388
634 #define EL_BEAMER_GREEN_END     (EL_BEAMER_GREEN_START + 15)
635 #define EL_BEAMER_BLUE_START    404
636 #define EL_BEAMER_BLUE_END      (EL_BEAMER_BLUE_START + 15)
637
638 // element definitions partially used for drawing graphics
639 #define EL_MCDUFFIN             420
640 #define EL_PACMAN               421
641 #define EL_FUSE_OFF             422
642 #define EL_STEEL_WALL           423
643 #define EL_WOODEN_WALL          424
644 #define EL_ICE_WALL             425
645 #define EL_AMOEBA_WALL          426
646 #define EL_LASER                427
647 #define EL_RECEIVER             428
648 #define EL_DF_STEEL_WALL        429
649 #define EL_DF_WOODEN_WALL       430
650
651 #define EL_MM_END_2             430
652 #define EL_MM_END               EL_MM_END_2
653
654 // "real" (and therefore drawable) runtime elements
655 #define EL_EXIT_OPENING         500
656 #define EL_EXIT_CLOSING         501
657 #define EL_GRAY_BALL_OPENING    502
658 #define EL_ICE_WALL_SHRINKING   503
659 #define EL_AMOEBA_WALL_GROWING  504
660
661 #define EL_WALL_CHANGING        512
662 #define EL_WALL_CHANGING_START  (EL_WALL_CHANGING + 0)
663 #define EL_WALL_CHANGING_END    (EL_WALL_CHANGING + 15)
664
665 #define EL_FIRST_RUNTIME_EL     EL_EXIT_OPENING
666
667 // "unreal" (and therefore not drawable) runtime elements
668 #define EL_BLOCKED              600
669 #define EL_EXPLODING_OPAQUE     601
670 #define EL_EXPLODING_TRANSP     602
671
672 // dummy elements (never used as game elements, only used as graphics)
673 #define EL_MM_MASK_MCDUFFIN_RIGHT       700
674 #define EL_MM_MASK_MCDUFFIN_UP          701
675 #define EL_MM_MASK_MCDUFFIN_LEFT        702
676 #define EL_MM_MASK_MCDUFFIN_DOWN        703
677 #define EL_MM_MASK_GRID_1               704
678 #define EL_MM_MASK_GRID_2               705
679 #define EL_MM_MASK_GRID_3               706
680 #define EL_MM_MASK_GRID_4               707
681 #define EL_MM_MASK_RECTANGE             708
682 #define EL_MM_MASK_CIRCLE               709
683
684
685 // game graphics:
686 //        0 -  191: graphics from "MirrorScreen"
687 //      192 -  255: pseudo graphics mapped to "MirrorScreen"
688 //      256 -  511: graphics from "MirrorFont"
689 //      512 -  767: graphics from "MirrorDF"
690
691 #define IMG_EMPTY               IMG_EMPTY_SPACE
692
693 #define GFX_START_MIRRORSCREEN  0
694 #define GFX_END_MIRRORSCREEN    191
695 #define GFX_START_PSEUDO        192
696 #define GFX_END_PSEUDO          255
697 #define GFX_START_MIRRORFONT    256
698 #define GFX_END_MIRRORFONT      511
699 #define GFX_START_MIRRORDF      512
700 #define GFX_END_MIRRORDF        767
701
702 #define NUM_TILES               512
703
704 // graphics from "MirrorScreen"
705 #define GFX_EMPTY               (-1)
706 // row 0 (0)
707 #define GFX_MIRROR_START        0
708 #define GFX_MIRROR              GFX_MIRROR_START
709 #define GFX_MIRROR_00           (GFX_MIRROR_START + 0)
710 #define GFX_MIRROR_01           (GFX_MIRROR_START + 1)
711 #define GFX_MIRROR_02           (GFX_MIRROR_START + 2)
712 #define GFX_MIRROR_03           (GFX_MIRROR_START + 3)
713 #define GFX_MIRROR_04           (GFX_MIRROR_START + 4)
714 #define GFX_MIRROR_05           (GFX_MIRROR_START + 5)
715 #define GFX_MIRROR_06           (GFX_MIRROR_START + 6)
716 #define GFX_MIRROR_07           (GFX_MIRROR_START + 7)
717 #define GFX_MIRROR_08           (GFX_MIRROR_START + 8)
718 #define GFX_MIRROR_09           (GFX_MIRROR_START + 9)
719 #define GFX_MIRROR_10           (GFX_MIRROR_START + 10)
720 #define GFX_MIRROR_11           (GFX_MIRROR_START + 11)
721 #define GFX_MIRROR_12           (GFX_MIRROR_START + 12)
722 #define GFX_MIRROR_13           (GFX_MIRROR_START + 13)
723 #define GFX_MIRROR_14           (GFX_MIRROR_START + 14)
724 #define GFX_MIRROR_15           (GFX_MIRROR_START + 15)
725 #define GFX_MIRROR_END          GFX_MIRROR_15
726 // row 1 (16)
727 #define GFX_GRID_STEEL_START    16
728 #define GFX_GRID_STEEL          GFX_GRID_STEEL_START
729 #define GFX_GRID_STEEL_00       (GFX_GRID_STEEL_START + 0)
730 #define GFX_GRID_STEEL_01       (GFX_GRID_STEEL_START + 1)
731 #define GFX_GRID_STEEL_02       (GFX_GRID_STEEL_START + 2)
732 #define GFX_GRID_STEEL_03       (GFX_GRID_STEEL_START + 3)
733 #define GFX_MCDUFFIN_START      20
734 #define GFX_MCDUFFIN            GFX_MCDUFFIN_START
735 #define GFX_MCDUFFIN_RIGHT      (GFX_MCDUFFIN_START + 0)
736 #define GFX_MCDUFFIN_UP         (GFX_MCDUFFIN_START + 1)
737 #define GFX_MCDUFFIN_LEFT       (GFX_MCDUFFIN_START + 2)
738 #define GFX_MCDUFFIN_DOWN       (GFX_MCDUFFIN_START + 3)
739 #define GFX_EXIT_CLOSED         24
740 #define GFX_EXIT_OPENING_1      25
741 #define GFX_EXIT_OPENING_2      26
742 #define GFX_EXIT_OPEN           27
743 #define GFX_KETTLE              28
744 #define GFX_EXPLOSION_KETTLE    29
745 // row 2 (32)
746 #define GFX_PRISM               32
747 #define GFX_WALL_SEVERAL        33
748 #define GFX_WALL_ANIMATION      34
749 #define GFX_BLOCK_WOOD          36
750 #define GFX_BOMB                37
751 #define GFX_FUSE_ON             38
752 #define GFX_FUSE_OFF            39
753 #define GFX_GATE_STONE          40
754 #define GFX_KEY                 41
755 #define GFX_LIGHTBULB_OFF       42
756 #define GFX_LIGHTBULB_ON        43
757 #define GFX_BALL_RED            44
758 #define GFX_BALL_BLUE           45
759 #define GFX_BALL_YELLOW         46
760 #define GFX_BALL_GRAY           47
761 // row 3 (48)
762 #define GFX_BEAMER_START        48
763 #define GFX_BEAMER_END          63
764 // row 4 (64)
765 #define GFX_PACMAN_START        64
766 #define GFX_PACMAN              GFX_PACMAN_START
767 #define GFX_PACMAN_RIGHT        (GFX_PACMAN_START + 0)
768 #define GFX_PACMAN_UP           (GFX_PACMAN_START + 1)
769 #define GFX_PACMAN_LEFT         (GFX_PACMAN_START + 2)
770 #define GFX_PACMAN_DOWN         (GFX_PACMAN_START + 3)
771 #define GFX_EXPLOSION_START     72
772 #define GFX_EXPLOSION_SHORT     76
773 #define GFX_EXPLOSION_LAST      78
774 // row 5 (80)
775 #define GFX_POLAR_START         80
776 #define GFX_POLAR_END           95
777 // row 6 (96)
778 #define GFX_POLAR_CROSS_START   96
779 #define GFX_POLAR_CROSS         GFX_POLAR_CROSS_START
780 #define GFX_POLAR_CROSS_00      (GFX_POLAR_CROSS_START + 0)
781 #define GFX_POLAR_CROSS_01      (GFX_POLAR_CROSS_START + 1)
782 #define GFX_POLAR_CROSS_02      (GFX_POLAR_CROSS_START + 2)
783 #define GFX_POLAR_CROSS_03      (GFX_POLAR_CROSS_START + 3)
784 #define GFX_MIRROR_FIXED_START  100
785 #define GFX_MIRROR_FIXED        GFX_MIRROR_FIXED_START
786 #define GFX_MIRROR_FIXED_00     (GFX_MIRROR_FIXED_START + 0)
787 #define GFX_MIRROR_FIXED_01     (GFX_MIRROR_FIXED_START + 1)
788 #define GFX_MIRROR_FIXED_02     (GFX_MIRROR_FIXED_START + 2)
789 #define GFX_MIRROR_FIXED_03     (GFX_MIRROR_FIXED_START + 3)
790 // row 7 (112)
791 #define GFX_BLOCK_STONE         112
792 #define GFX_GATE_WOOD           113
793 #define GFX_FUEL_FULL           114
794 #define GFX_FUEL_EMPTY          115
795 #define GFX_GRID_WOOD_00        116
796 #define GFX_GRID_WOOD_01        117
797 #define GFX_GRID_WOOD_02        118
798 #define GFX_GRID_WOOD_03        119
799 // row 8 (128)
800 #define GFX_ARROW_BLUE_LEFT     128
801 #define GFX_ARROW_BLUE_RIGHT    129
802 #define GFX_ARROW_BLUE_UP       130
803 #define GFX_ARROW_BLUE_DOWN     131
804 #define GFX_ARROW_RED_LEFT      132
805 #define GFX_ARROW_RED_RIGHT     133
806 #define GFX_ARROW_RED_UP        134
807 #define GFX_ARROW_RED_DOWN      135
808 // row 9 (144)
809 #define GFX_SCROLLBAR_BLUE      144
810 #define GFX_SCROLLBAR_RED       145
811 // row 10 (160)
812 #define GFX_MASK_CIRCLE         160
813 #define GFX_MASK_RECTANGLE      161
814 #define GFX_MASK_RECTANGLE2     162
815 #define GFX_MASK_RECTANGLE3     163
816 #define GFX_MASK_GRID_00        164
817 #define GFX_MASK_GRID_01        165
818 #define GFX_MASK_GRID_02        166
819 #define GFX_MASK_GRID_03        167
820 // row 11 (176)
821 #define GFX_MASK_MCDUFFIN_00    176
822 #define GFX_MASK_MCDUFFIN_01    177
823 #define GFX_MASK_MCDUFFIN_02    178
824 #define GFX_MASK_MCDUFFIN_03    179
825
826 // pseudo-graphics; will be mapped to other graphics
827 #define GFX_WALL_STEEL          192
828 #define GFX_WALL_WOOD           193
829 #define GFX_WALL_ICE            194
830 #define GFX_WALL_AMOEBA         195
831 #define GFX_DF_WALL_STEEL       196
832 #define GFX_DF_WALL_WOOD        197
833
834 #define GFX_KUGEL_ROT           GFX_BALL_RED
835 #define GFX_KUGEL_BLAU          GFX_BALL_BLUE
836 #define GFX_KUGEL_GELB          GFX_BALL_YELLOW
837 #define GFX_KUGEL_GRAU          GFX_BALL_GRAY
838
839 // graphics from "MirrorFont"
840 #define GFX_CHAR_START          (GFX_START_MIRRORFONT)
841 #define GFX_CHAR_ASCII0         (GFX_CHAR_START - 32)
842 #define GFX_CHAR_AUSRUF         (GFX_CHAR_ASCII0 + 33)
843 #define GFX_CHAR_ZOLL           (GFX_CHAR_ASCII0 + 34)
844 #define GFX_CHAR_DOLLAR         (GFX_CHAR_ASCII0 + 36)
845 #define GFX_CHAR_PROZ           (GFX_CHAR_ASCII0 + 37)
846 #define GFX_CHAR_APOSTR         (GFX_CHAR_ASCII0 + 39)
847 #define GFX_CHAR_KLAMM1         (GFX_CHAR_ASCII0 + 40)
848 #define GFX_CHAR_KLAMM2         (GFX_CHAR_ASCII0 + 41)
849 #define GFX_CHAR_PLUS           (GFX_CHAR_ASCII0 + 43)
850 #define GFX_CHAR_KOMMA          (GFX_CHAR_ASCII0 + 44)
851 #define GFX_CHAR_MINUS          (GFX_CHAR_ASCII0 + 45)
852 #define GFX_CHAR_PUNKT          (GFX_CHAR_ASCII0 + 46)
853 #define GFX_CHAR_SLASH          (GFX_CHAR_ASCII0 + 47)
854 #define GFX_CHAR_0              (GFX_CHAR_ASCII0 + 48)
855 #define GFX_CHAR_9              (GFX_CHAR_ASCII0 + 57)
856 #define GFX_CHAR_DOPPEL         (GFX_CHAR_ASCII0 + 58)
857 #define GFX_CHAR_SEMIKL         (GFX_CHAR_ASCII0 + 59)
858 #define GFX_CHAR_LT             (GFX_CHAR_ASCII0 + 60)
859 #define GFX_CHAR_GLEICH         (GFX_CHAR_ASCII0 + 61)
860 #define GFX_CHAR_GT             (GFX_CHAR_ASCII0 + 62)
861 #define GFX_CHAR_FRAGE          (GFX_CHAR_ASCII0 + 63)
862 #define GFX_CHAR_AT             (GFX_CHAR_ASCII0 + 64)
863 #define GFX_CHAR_A              (GFX_CHAR_ASCII0 + 65)
864 #define GFX_CHAR_Z              (GFX_CHAR_ASCII0 + 90)
865 #define GFX_CHAR_AE             (GFX_CHAR_ASCII0 + 91)
866 #define GFX_CHAR_OE             (GFX_CHAR_ASCII0 + 92)
867 #define GFX_CHAR_UE             (GFX_CHAR_ASCII0 + 93)
868 #define GFX_CHAR_COPY           (GFX_CHAR_ASCII0 + 94)
869 #define GFX_CHAR_END            (GFX_CHAR_START + 79)
870
871 // graphics from "MirrorDF"
872 #define GFX_DF_MIRROR_00        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  0)
873 #define GFX_DF_MIRROR_01        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  1)
874 #define GFX_DF_MIRROR_02        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  2)
875 #define GFX_DF_MIRROR_03        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  3)
876 #define GFX_DF_MIRROR_04        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  4)
877 #define GFX_DF_MIRROR_05        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  5)
878 #define GFX_DF_MIRROR_06        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  6)
879 #define GFX_DF_MIRROR_07        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  7)
880 #define GFX_DF_MIRROR_08        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  8)
881 #define GFX_DF_MIRROR_09        (GFX_START_MIRRORDF +  0 * DF_PER_LINE +  9)
882 #define GFX_DF_MIRROR_10        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 10)
883 #define GFX_DF_MIRROR_11        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 11)
884 #define GFX_DF_MIRROR_12        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 12)
885 #define GFX_DF_MIRROR_13        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 13)
886 #define GFX_DF_MIRROR_14        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 14)
887 #define GFX_DF_MIRROR_15        (GFX_START_MIRRORDF +  0 * DF_PER_LINE + 15)
888
889 #define GFX_DF_MIRROR_AUTO_00   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  0)
890 #define GFX_DF_MIRROR_AUTO_01   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  1)
891 #define GFX_DF_MIRROR_AUTO_02   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  2)
892 #define GFX_DF_MIRROR_AUTO_03   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  3)
893 #define GFX_DF_MIRROR_AUTO_04   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  4)
894 #define GFX_DF_MIRROR_AUTO_05   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  5)
895 #define GFX_DF_MIRROR_AUTO_06   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  6)
896 #define GFX_DF_MIRROR_AUTO_07   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  7)
897 #define GFX_DF_MIRROR_AUTO_08   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  8)
898 #define GFX_DF_MIRROR_AUTO_09   (GFX_START_MIRRORDF +  1 * DF_PER_LINE +  9)
899 #define GFX_DF_MIRROR_AUTO_10   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 10)
900 #define GFX_DF_MIRROR_AUTO_11   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 11)
901 #define GFX_DF_MIRROR_AUTO_12   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 12)
902 #define GFX_DF_MIRROR_AUTO_13   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 13)
903 #define GFX_DF_MIRROR_AUTO_14   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 14)
904 #define GFX_DF_MIRROR_AUTO_15   (GFX_START_MIRRORDF +  1 * DF_PER_LINE + 15)
905
906 #define GFX_GRID_STEEL_FIXED_00 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  0)
907 #define GFX_GRID_STEEL_FIXED_01 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  1)
908 #define GFX_GRID_STEEL_FIXED_02 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  2)
909 #define GFX_GRID_STEEL_FIXED_03 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  3)
910 #define GFX_GRID_STEEL_FIXED_04 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  4)
911 #define GFX_GRID_STEEL_FIXED_05 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  5)
912 #define GFX_GRID_STEEL_FIXED_06 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  6)
913 #define GFX_GRID_STEEL_FIXED_07 (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  7)
914 #define GFX_GRID_STEEL_FIXED    GFX_GRID_STEEL_FIXED_00
915
916 #define GFX_GRID_WOOD_FIXED_00  (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  8)
917 #define GFX_GRID_WOOD_FIXED_01  (GFX_START_MIRRORDF +  2 * DF_PER_LINE +  9)
918 #define GFX_GRID_WOOD_FIXED_02  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 10)
919 #define GFX_GRID_WOOD_FIXED_03  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 11)
920 #define GFX_GRID_WOOD_FIXED_04  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 12)
921 #define GFX_GRID_WOOD_FIXED_05  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 13)
922 #define GFX_GRID_WOOD_FIXED_06  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 14)
923 #define GFX_GRID_WOOD_FIXED_07  (GFX_START_MIRRORDF +  2 * DF_PER_LINE + 15)
924 #define GFX_GRID_WOOD_FIXED     GFX_GRID_WOOD_FIXED_00
925
926 #define GFX_GRID_STEEL_AUTO_00  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  0)
927 #define GFX_GRID_STEEL_AUTO_01  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  1)
928 #define GFX_GRID_STEEL_AUTO_02  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  2)
929 #define GFX_GRID_STEEL_AUTO_03  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  3)
930 #define GFX_GRID_STEEL_AUTO_04  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  4)
931 #define GFX_GRID_STEEL_AUTO_05  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  5)
932 #define GFX_GRID_STEEL_AUTO_06  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  6)
933 #define GFX_GRID_STEEL_AUTO_07  (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  7)
934 #define GFX_GRID_STEEL_AUTO     GFX_GRID_STEEL_AUTO_00
935
936 #define GFX_GRID_WOOD_AUTO_00   (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  8)
937 #define GFX_GRID_WOOD_AUTO_01   (GFX_START_MIRRORDF +  3 * DF_PER_LINE +  9)
938 #define GFX_GRID_WOOD_AUTO_02   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 10)
939 #define GFX_GRID_WOOD_AUTO_03   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 11)
940 #define GFX_GRID_WOOD_AUTO_04   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 12)
941 #define GFX_GRID_WOOD_AUTO_05   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 13)
942 #define GFX_GRID_WOOD_AUTO_06   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 14)
943 #define GFX_GRID_WOOD_AUTO_07   (GFX_START_MIRRORDF +  3 * DF_PER_LINE + 15)
944 #define GFX_GRID_WOOD_AUTO      GFX_GRID_WOOD_AUTO_00
945
946 #define GFX_BEAMER_RED_START    (GFX_START_MIRRORDF +  4 * DF_PER_LINE +  0)
947 #define GFX_BEAMER_RED_END      (GFX_START_MIRRORDF +  4 * DF_PER_LINE + 15)
948 #define GFX_BEAMER_YELLOW_START (GFX_START_MIRRORDF +  5 * DF_PER_LINE +  0)
949 #define GFX_BEAMER_YELLOW_END   (GFX_START_MIRRORDF +  5 * DF_PER_LINE + 15)
950 #define GFX_BEAMER_GREEN_START  (GFX_START_MIRRORDF +  6 * DF_PER_LINE +  0)
951 #define GFX_BEAMER_GREEN_END    (GFX_START_MIRRORDF +  6 * DF_PER_LINE + 15)
952 #define GFX_BEAMER_BLUE_START   (GFX_START_MIRRORDF +  7 * DF_PER_LINE +  0)
953 #define GFX_BEAMER_BLUE_END     (GFX_START_MIRRORDF +  7 * DF_PER_LINE + 15)
954
955 #define GFX_DF_WALL_SEVERAL     (GFX_START_MIRRORDF +  8 * DF_PER_LINE +  0)
956 #define GFX_REFRACTOR           (GFX_START_MIRRORDF +  8 * DF_PER_LINE +  1)
957 #define GFX_CELL                (GFX_START_MIRRORDF +  8 * DF_PER_LINE +  2)
958 #define GFX_MINE                (GFX_START_MIRRORDF +  8 * DF_PER_LINE +  4)
959
960 #define GFX_LASER_RIGHT         (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  0)
961 #define GFX_LASER_UP            (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  1)
962 #define GFX_LASER_LEFT          (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  2)
963 #define GFX_LASER_DOWN          (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  3)
964 #define GFX_RECEIVER_RIGHT      (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  4)
965 #define GFX_RECEIVER_UP         (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  5)
966 #define GFX_RECEIVER_LEFT       (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  6)
967 #define GFX_RECEIVER_DOWN       (GFX_START_MIRRORDF +  9 * DF_PER_LINE +  7)
968
969 #define GFX_FIBRE_OPTIC_00      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  0)
970 #define GFX_FIBRE_OPTIC_01      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  1)
971 #define GFX_FIBRE_OPTIC_02      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  2)
972 #define GFX_FIBRE_OPTIC_03      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  3)
973 #define GFX_FIBRE_OPTIC_04      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  4)
974 #define GFX_FIBRE_OPTIC_05      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  5)
975 #define GFX_FIBRE_OPTIC_06      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  6)
976 #define GFX_FIBRE_OPTIC_07      (GFX_START_MIRRORDF + 10 * DF_PER_LINE +  7)
977
978 #define GFX_FIBRE_OPTIC_ED_00   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  0)
979 #define GFX_FIBRE_OPTIC_ED_01   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  1)
980 #define GFX_FIBRE_OPTIC_ED_02   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  2)
981 #define GFX_FIBRE_OPTIC_ED_03   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  3)
982 #define GFX_FIBRE_OPTIC_ED_04   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  4)
983 #define GFX_FIBRE_OPTIC_ED_05   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  5)
984 #define GFX_FIBRE_OPTIC_ED_06   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  6)
985 #define GFX_FIBRE_OPTIC_ED_07   (GFX_START_MIRRORDF + 11 * DF_PER_LINE +  7)
986
987 // the names of the sounds
988 #define SND_AMOEBE              0
989 #define SND_ANTIGRAV            1
990 #define SND_AUTSCH              2
991 #define SND_BONG                3
992 #define SND_FUEL                4
993 #define SND_HALLOFFAME          5
994 #define SND_HOLZ                6
995 #define SND_HUI                 7
996 #define SND_KABUMM              8
997 #define SND_KINK                9
998 #define SND_KLING               10
999 #define SND_LASER               11
1000 #define SND_OEFFNEN             12
1001 #define SND_QUIEK               13
1002 #define SND_RHYTHMLOOP          14
1003 #define SND_ROAAAR              15
1004 #define SND_SIRR                16
1005 #define SND_SLURP               17
1006 #define SND_WARNTON             18
1007 #define SND_WHOOSH              19
1008
1009 #define NUM_SOUNDS              20
1010
1011 // values for graphics/sounds action types
1012 #define MM_ACTION_DEFAULT       0
1013 #define MM_ACTION_WAITING       1
1014 #define MM_ACTION_FALLING       2
1015 #define MM_ACTION_MOVING        3
1016 #define MM_ACTION_DIGGING       4
1017 #define MM_ACTION_SNAPPING      5
1018 #define MM_ACTION_COLLECTING    6
1019 #define MM_ACTION_DROPPING      7
1020 #define MM_ACTION_PUSHING       8
1021 #define MM_ACTION_WALKING       9
1022 #define MM_ACTION_PASSING       10
1023 #define MM_ACTION_IMPACT        11
1024 #define MM_ACTION_BREAKING      12
1025 #define MM_ACTION_ACTIVATING    13
1026 #define MM_ACTION_DEACTIVATING  14
1027 #define MM_ACTION_OPENING       15
1028 #define MM_ACTION_CLOSING       16
1029 #define MM_ACTION_ATTACKING     17
1030 #define MM_ACTION_GROWING       18
1031 #define MM_ACTION_SHRINKING     19
1032 #define MM_ACTION_ACTIVE        20
1033 #define MM_ACTION_FILLING       21
1034 #define MM_ACTION_EMPTYING      22
1035 #define MM_ACTION_CHANGING      23
1036 #define MM_ACTION_EXPLODING     24
1037 #define MM_ACTION_BORING        25
1038 #define MM_ACTION_BORING_1      26
1039 #define MM_ACTION_BORING_2      27
1040 #define MM_ACTION_BORING_3      28
1041 #define MM_ACTION_BORING_4      29
1042 #define MM_ACTION_BORING_5      30
1043 #define MM_ACTION_BORING_6      31
1044 #define MM_ACTION_BORING_7      32
1045 #define MM_ACTION_BORING_8      33
1046 #define MM_ACTION_BORING_9      34
1047 #define MM_ACTION_BORING_10     35
1048 #define MM_ACTION_SLEEPING      36
1049 #define MM_ACTION_SLEEPING_1    37
1050 #define MM_ACTION_SLEEPING_2    38
1051 #define MM_ACTION_SLEEPING_3    39
1052 #define MM_ACTION_AWAKENING     40
1053 #define MM_ACTION_DYING         41
1054 #define MM_ACTION_TURNING               42
1055 #define MM_ACTION_TURNING_FROM_LEFT     43
1056 #define MM_ACTION_TURNING_FROM_RIGHT    44
1057 #define MM_ACTION_TURNING_FROM_UP       45
1058 #define MM_ACTION_TURNING_FROM_DOWN     46
1059 #define MM_ACTION_SMASHED_BY_ROCK       47
1060 #define MM_ACTION_SMASHED_BY_SPRING     48
1061 #define MM_ACTION_EATING                49
1062 #define MM_ACTION_TWINKLING             50
1063 #define MM_ACTION_SPLASHING             51
1064 #define MM_ACTION_HITTING               52
1065
1066 // laser angles (directions)
1067 #define ANG_RAY_RIGHT           0
1068 #define ANG_RAY_UP              4
1069 #define ANG_RAY_LEFT            8
1070 #define ANG_RAY_DOWN            12
1071
1072 // laser angles (degree)
1073 #define ANG_RAY_0               0
1074 #define ANG_RAY_90              4
1075 #define ANG_RAY_180             8
1076 #define ANG_RAY_270             12
1077 #define IS_22_5_ANGLE(angle)    ((angle) % 2)
1078 #define IS_90_ANGLE(angle)      (!((angle) % 4))
1079 #define IS_HORIZ_ANGLE(angle)   (!((angle) % 8))
1080 #define IS_VERT_ANGLE(angle)    ((angle) % 8)
1081
1082 // mirror angles
1083 #define ANG_MIRROR_0            0
1084 #define ANG_MIRROR_45           4
1085 #define ANG_MIRROR_90           8
1086 #define ANG_MIRROR_135          12
1087
1088 // positions for checking where laser already hits element
1089 #define HIT_POS_CENTER          1
1090 #define HIT_POS_EDGE            2
1091 #define HIT_POS_BETWEEN         4
1092
1093 // masks for scanning elements
1094 #define HIT_MASK_NO_HIT         0
1095 #define HIT_MASK_TOPLEFT        1
1096 #define HIT_MASK_TOPRIGHT       2
1097 #define HIT_MASK_BOTTOMLEFT     4
1098 #define HIT_MASK_BOTTOMRIGHT    8
1099 #define HIT_MASK_LEFT           (HIT_MASK_TOPLEFT | HIT_MASK_BOTTOMLEFT)
1100 #define HIT_MASK_RIGHT          (HIT_MASK_TOPRIGHT | HIT_MASK_BOTTOMRIGHT)
1101 #define HIT_MASK_TOP            (HIT_MASK_TOPLEFT | HIT_MASK_TOPRIGHT)
1102 #define HIT_MASK_BOTTOM         (HIT_MASK_BOTTOMLEFT | HIT_MASK_BOTTOMRIGHT)
1103 #define HIT_MASK_ALL            (HIT_MASK_LEFT | HIT_MASK_RIGHT)
1104
1105 // step values for rotating elements
1106 #define ROTATE_NO_ROTATING      0
1107 #define ROTATE_LEFT             (+1)
1108 #define ROTATE_RIGHT            (-1)
1109 #define BUTTON_ROTATION(button) ((button) == MB_LEFTBUTTON  ? ROTATE_LEFT :  \
1110                                  (button) == MB_RIGHTBUTTON ? ROTATE_RIGHT : \
1111                                  ROTATE_NO_ROTATING)
1112
1113 // game over values
1114 #define GAME_OVER_NO_ENERGY     1
1115 #define GAME_OVER_OVERLOADED    2
1116 #define GAME_OVER_BOMB          3
1117
1118 // values for game_status
1119 #define EXITGAME                0
1120 #define MAINMENU                1
1121 #define PLAYING                 2
1122 #define LEVELED                 3
1123 #define HELPSCREEN              4
1124 #define CHOOSELEVEL             5
1125 #define TYPENAME                6
1126 #define HALLOFFAME              7
1127 #define SETUP                   8
1128
1129 // return values for GameActions
1130 #define ACT_GO_ON               0
1131 #define ACT_GAME_OVER           1
1132 #define ACT_NEW_GAME            2
1133
1134 // values for color_status
1135 #define STATIC_COLORS           0
1136 #define DYNAMIC_COLORS          1
1137
1138 #define PROGRAM_VERSION_MAJOR   2
1139 #define PROGRAM_VERSION_MINOR   0
1140 #define PROGRAM_VERSION_PATCH   2
1141 #define PROGRAM_VERSION_STRING  "2.0.2"
1142
1143 #define PROGRAM_TITLE_STRING    "Mirror Magic II"
1144 #define PROGRAM_AUTHOR_STRING   "Holger Schemel"
1145 #define PROGRAM_RIGHTS_STRING   "Copyright ^1994-2001"
1146 #define PROGRAM_DOS_PORT_STRING "DOS port based on code by Guido Schulz"
1147 #define PROGRAM_IDENT_STRING    PROGRAM_VERSION_STRING " " TARGET_STRING
1148 #define WINDOW_TITLE_STRING     PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING
1149 #define WINDOW_SUBTITLE_STRING  PROGRAM_RIGHTS_STRING " " PROGRAM_AUTHOR_STRING
1150 #define ICON_TITLE_STRING       PROGRAM_TITLE_STRING
1151 #define UNIX_USERDATA_DIRECTORY ".mirrormagic"
1152
1153 #define X11_ICON_FILENAME       "mirrormagic_icon.xbm"
1154 #define X11_ICONMASK_FILENAME   "mirrormagic_iconmask.xbm"
1155 #define MSDOS_POINTER_FILENAME  "mouse.pcx"
1156
1157 // functions for version handling
1158 #define MM_VERSION_IDENT(x,y,z) VERSION_IDENT(x,y,z,0)
1159 #define MM_VERSION_MAJOR(x)     VERSION_PART_1(x)
1160 #define MM_VERSION_MINOR(x)     VERSION_PART_2(x)
1161 #define MM_VERSION_PATCH(x)     VERSION_PART_3(x)
1162
1163 // file version numbers for resource files (levels, score, setup, etc.)
1164 // currently supported/known file version numbers:
1165 //      1.4 (still in use)
1166 //      2.0 (actual)
1167
1168 #define MM_FILE_VERSION_1_4     MM_VERSION_IDENT(1,4,0)
1169 #define MM_FILE_VERSION_2_0     MM_VERSION_IDENT(2,0,0)
1170
1171 // file version does not change for every program version, but is changed
1172 // when new features are introduced that are incompatible with older file
1173 // versions, so that they can be treated accordingly
1174 #define MM_FILE_VERSION_ACTUAL  MM_FILE_VERSION_2_0
1175
1176 #define MM_GAME_VERSION_ACTUAL  MM_VERSION_IDENT(PROGRAM_VERSION_MAJOR, \
1177                                                  PROGRAM_VERSION_MINOR, \
1178                                                  PROGRAM_VERSION_PATCH)
1179
1180 // sound control
1181
1182 #define ST(x)           (((x) - 8) * 16)
1183
1184 #endif  // MM_MAIN_H