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