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