#include "libgame/libgame.h"
+#include "conf_gfx.h"
+#include "conf_snd.h"
+
+#define IMG_EMPTY IMG_EMPTY_SPACE
+#define IMG_SP_EMPTY IMG_SP_EMPTY_SPACE
+#define IMG_CHAR_START IMG_CHAR_SPACE
+
#define WIN_XSIZE 672
#define WIN_YSIZE 560
/* values for 'Elementeigenschaften2' */
#define EP_BIT_BELT (1 << 0)
-#define EP_BIT_BELT_SWITCH (1 << 1)
-#define EP_BIT_TUBE (1 << 2)
-#define EP_BIT_EM_SLIPPERY_WALL (1 << 3)
+#define EP_BIT_BELT_ACTIVE (1 << 1)
+#define EP_BIT_BELT_SWITCH (1 << 2)
+#define EP_BIT_TUBE (1 << 3)
+#define EP_BIT_EM_SLIPPERY_WALL (1 << 4)
#define IS_AMOEBALIVE(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBALIVE)
#define IS_AMOEBOID(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBOID)
#define IS_QUICK_GATE(e) (Elementeigenschaften1[e] & EP_BIT_QUICK_GATE)
#define IS_OVER_PLAYER(e) (Elementeigenschaften1[e] & EP_BIT_OVER_PLAYER)
#define IS_ACTIVE_BOMB(e) (Elementeigenschaften1[e] & EP_BIT_ACTIVE_BOMB)
+
#define IS_BELT(e) (Elementeigenschaften2[e] & EP_BIT_BELT)
+#define IS_BELT_ACTIVE(e) (Elementeigenschaften2[e] & EP_BIT_BELT_ACTIVE)
#define IS_BELT_SWITCH(e) (Elementeigenschaften2[e] & EP_BIT_BELT_SWITCH)
#define IS_TUBE(e) (Elementeigenschaften2[e] & EP_BIT_TUBE)
#define IS_EM_SLIPPERY_WALL(e) (Elementeigenschaften2[e] & EP_BIT_EM_SLIPPERY_WALL)
#define IS_PLAYER(x,y) (ELEM_IS_PLAYER(StorePlayer[x][y]))
-#define IS_FREE(x,y) (Feld[x][y] == EL_LEERRAUM && !IS_PLAYER(x,y))
-#define IS_FREE_OR_PLAYER(x,y) (Feld[x][y] == EL_LEERRAUM)
+#define IS_FREE(x,y) (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x,y))
+#define IS_FREE_OR_PLAYER(x,y) (Feld[x][y] == EL_EMPTY)
#define IS_MOVING(x,y) (MovPos[x][y] != 0)
#define IS_FALLING(x,y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
#define IS_BLOCKED(x,y) (Feld[x][y] == EL_BLOCKED)
-#define EL_CHANGED(e) ((e) == EL_FELSBROCKEN ? EL_EDELSTEIN : \
- (e) == EL_BD_ROCK ? EL_EDELSTEIN_BD : \
- (e) == EL_EDELSTEIN ? EL_DIAMANT : \
- (e) == EL_EDELSTEIN_GELB ? EL_DIAMANT : \
- (e) == EL_EDELSTEIN_ROT ? EL_DIAMANT : \
- (e) == EL_EDELSTEIN_LILA ? EL_DIAMANT : \
- EL_FELSBROCKEN)
-#define EL_CHANGED2(e) ((e) == EL_FELSBROCKEN ? EL_EDELSTEIN_BD : \
- (e) == EL_BD_ROCK ? EL_EDELSTEIN_BD : \
+#define EL_CHANGED(e) ((e) == EL_ROCK ? EL_EMERALD : \
+ (e) == EL_BD_ROCK ? EL_BD_DIAMOND : \
+ (e) == EL_EMERALD ? EL_DIAMOND : \
+ (e) == EL_EMERALD_YELLOW ? EL_DIAMOND : \
+ (e) == EL_EMERALD_RED ? EL_DIAMOND : \
+ (e) == EL_EMERALD_PURPLE ? EL_DIAMOND : \
+ EL_ROCK)
+#define EL_CHANGED2(e) ((e) == EL_ROCK ? EL_BD_DIAMOND : \
+ (e) == EL_BD_ROCK ? EL_BD_DIAMOND : \
EL_BD_ROCK)
#define IS_DRAWABLE(e) ((e) < EL_BLOCKED)
#define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED)
#define TAPE_IS_EMPTY(x) ((x).length == 0)
#define TAPE_IS_STOPPED(x) (!(x).recording && !(x).playing)
-#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_SPIELER1])
-#define SHIELD_ON(p) ((p)->shield_passive_time_left > 0)
+#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_PLAYER1])
+#define SHIELD_ON(p) ((p)->shield_normal_time_left > 0)
#define PROTECTED_FIELD(x,y) (IS_TUBE(Feld[x][y]))
#define PLAYER_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
PROTECTED_FIELD(x, y))
+#define PLAYER_NR_GFX(g,i) ((g) + i * (IMG_PLAYER2 - IMG_PLAYER1))
+
+
+#if 0
+
/* Bitmaps with graphic file */
#define PIX_BACK 0
#define PIX_DOOR 1
-#define PIX_HEROES 2
-#define PIX_TOONS 3
-#define PIX_SP 4
-#define PIX_DC 5
-#define PIX_MORE 6
-#define PIX_BIGFONT 7
-#define PIX_SMALLFONT 8
-#define PIX_MEDIUMFONT 9
+#define PIX_TOONS 2
+#define PIX_FONT_BIG 3
+#define PIX_FONT_SMALL 4
+#define PIX_FONT_MEDIUM 5
+#define PIX_FONT_EM 6
+/* Bitmaps without graphic file */
+#define PIX_DB_DOOR 7
+#define PIX_DB_FIELD 8
+
+#define NUM_PICTURES 7
+#define NUM_BITMAPS 9
+
+#else
+
+/* Bitmaps with graphic file */
+#define PIX_BACK 0
+#define PIX_ELEMENTS 1
+#define PIX_DOOR 2
+#define PIX_HEROES 3
+#define PIX_TOONS 4
+#define PIX_SP 5
+#define PIX_DC 6
+#define PIX_MORE 7
+#define PIX_FONT_BIG 8
+#define PIX_FONT_SMALL 9
+#define PIX_FONT_MEDIUM 10
+#define PIX_FONT_EM 11
/* Bitmaps without graphic file */
-#define PIX_DB_DOOR 10
-#define PIX_DB_FIELD 11
+#define PIX_DB_DOOR 12
+#define PIX_DB_FIELD 13
+
+#define NUM_PICTURES 12
+#define NUM_BITMAPS 14
-#define NUM_PICTURES 10
-#define NUM_BITMAPS 12
+#endif
/* boundaries of arrays etc. */
#define MAX_LEVEL_NAME_LEN 32
#define MAX_TAPELEN (1000 * 50) /* max. time * framerate */
#define MAX_SCORE_ENTRIES 100
#define MAX_ELEMENTS 700 /* 500 static + 200 runtime */
+#define MAX_GRAPHICS 1536 /* see below: NUM_TILES */
#define MAX_NUM_AMOEBA 100
/* values for elements with content */
#define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */
#define MICROLEVEL_LABEL_DELAY 250 /* delay for micro level label */
-struct HiScore
-{
- char Name[MAX_PLAYER_NAME_LEN + 1];
- int Score;
-};
-
-struct PlayerInfo
-{
- boolean present; /* player present in level playfield */
- boolean connected; /* player connected (locally or via network) */
- boolean active; /* player (present && connected) */
-
- int index_nr, client_nr, element_nr;
-
- byte action; /* action from local input device */
- byte effective_action; /* action acknowledged from network server
- or summarized over all configured input
- devices when in single player mode */
- byte programmed_action; /* action forced by game itself (like moving
- through doors); overrides other actions */
-
- int jx,jy, last_jx,last_jy;
- int MovDir, MovPos, GfxPos;
- int Frame;
-
- boolean Pushing;
- boolean Switching;
- boolean LevelSolved, GameOver;
- boolean snapped;
-
- int last_move_dir;
- int is_moving;
-
- unsigned long move_delay;
- int move_delay_value;
-
- unsigned long push_delay;
- unsigned long push_delay_value;
-
- int frame_reset_delay;
-
- unsigned long actual_frame_counter;
-
- int score;
- int gems_still_needed;
- int sokobanfields_still_needed;
- int lights_still_needed;
- int friends_still_needed;
- int key[4];
- int dynamite;
- int dynabomb_count, dynabomb_size, dynabombs_left, dynabomb_xl;
- int shield_passive_time_left;
- int shield_active_time_left;
-};
-
-struct LevelInfo
-{
- int file_version; /* file format version the level is stored with */
- int game_version; /* game release version the level was created with */
-
- boolean encoding_16bit_field; /* level contains 16-bit elements */
- boolean encoding_16bit_yamyam; /* yamyam contains 16-bit elements */
- boolean encoding_16bit_amoeba; /* amoeba contains 16-bit elements */
-
- int fieldx;
- int fieldy;
- int time;
- int gems_needed;
- char name[MAX_LEVEL_NAME_LEN + 1];
- char author[MAX_LEVEL_AUTHOR_LEN + 1];
- int score[LEVEL_SCORE_ELEMENTS];
- int yam_content[MAX_ELEMENT_CONTENTS][3][3];
- int num_yam_contents;
- int amoeba_speed;
- int amoeba_content;
- int time_magic_wall;
- int time_wheel;
- int time_light;
- int time_timegate;
- boolean double_speed;
- boolean gravity;
- boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */
-};
-
-struct TapeInfo
-{
- int file_version; /* file format version the tape is stored with */
- int game_version; /* game release version the tape was created with */
- int engine_version; /* game engine version the tape was recorded with */
-
- int level_nr;
- unsigned long random_seed;
- unsigned long date;
- unsigned long counter;
- unsigned long length;
- unsigned long length_seconds;
- unsigned int delay_played;
- boolean pause_before_death;
- boolean recording, playing, pausing;
- boolean fast_forward;
- boolean index_search;
- boolean quick_resume;
- boolean single_step;
- boolean changed;
- boolean player_participates[MAX_PLAYERS];
- int num_participating_players;
-
- struct
- {
- byte action[MAX_PLAYERS];
- byte delay;
- } pos[MAX_TAPELEN];
-};
-
-struct GameInfo
-{
- /* constant within running game */
- int engine_version;
- int emulation;
- int initial_move_delay;
- int initial_move_delay_value;
-
- /* variable within running game */
- int yam_content_nr;
- boolean magic_wall_active;
- int magic_wall_time_left;
- int light_time_left;
- int timegate_time_left;
- int belt_dir[4];
- int belt_dir_nr[4];
- int switchgate_pos;
- int balloon_dir;
- boolean explosions_delayed;
-};
-
-struct GlobalInfo
-{
- float frames_per_second;
- boolean fps_slowdown;
- int fps_slowdown_factor;
-};
-
-struct ElementInfo
-{
- char *sound_class_name;
- char *editor_description;
-};
-
-extern GC tile_clip_gc;
-extern Bitmap *pix[];
-extern Pixmap tile_clipmask[];
-extern DrawBuffer *fieldbuffer;
-extern DrawBuffer *drawto_field;
-
-extern int game_status;
-extern boolean level_editor_test_game;
-extern boolean network_playing;
-
-extern int key_joystick_mapping;
-
-extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
-extern int redraw_x1, redraw_y1;
-
-extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
-extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-extern unsigned long Elementeigenschaften1[MAX_ELEMENTS];
-extern unsigned long Elementeigenschaften2[MAX_ELEMENTS];
-
-extern int lev_fieldx,lev_fieldy, scroll_x,scroll_y;
-
-extern int FX,FY, ScrollStepSize;
-extern int ScreenMovDir, ScreenMovPos, ScreenGfxPos;
-extern int BorderElement;
-extern int GameFrameDelay;
-extern int FfwdFrameDelay;
-extern int BX1,BY1, BX2,BY2;
-extern int SBX_Left, SBX_Right;
-extern int SBY_Upper, SBY_Lower;
-extern int ZX,ZY, ExitX,ExitY;
-extern int AllPlayersGone;
-
-extern int TimeFrames, TimePlayed, TimeLeft;
-extern boolean SiebAktiv;
-extern int SiebCount;
-
-extern boolean network_player_action_received;
-
-extern struct LevelInfo level;
-extern struct PlayerInfo stored_player[], *local_player;
-extern struct HiScore highscore[];
-extern struct TapeInfo tape;
-extern struct GameInfo game;
-extern struct GlobalInfo global;
-extern struct ElementInfo element_info[];
-extern struct SoundEffectInfo sound_effects[];
-
/* often used screen positions */
#define SX 8
#define SY 8
#define MICROLEV_YPOS (SX + 12 * TILEY - MICRO_TILEY)
#define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7)
-#define GFX_STARTX SX
-#define GFX_STARTY SY
-#define MINI_GFX_STARTX SX
-#define MINI_GFX_STARTY 424
-#define MICRO_GFX_STARTX SX
-#define MICRO_GFX_STARTY 536
+#define MINI_GFX_STARTX 0
+#define MINI_GFX_STARTY 448
+#define MICRO_GFX_STARTX 384
+#define MICRO_GFX_STARTY 448
#define GFX_PER_LINE 16
-#define MINI_GFX_PER_LINE 32
-#define MICRO_GFX_PER_LINE 128
+#define MINI_GFX_PER_LINE 16
+#define MICRO_GFX_PER_LINE 16
+
+#define MINI_FONT_STARTX 0
+#define MINI_FONT_STARTY 160
+#define MICRO_FONT_STARTX 384
+#define MICRO_FONT_STARTY 160
#define HEROES_PER_LINE 16
#define MINI_SP_STARTX 0
-#define MINI_SP_STARTY 352
-#define MICRO_SP_STARTX 0
-#define MICRO_SP_STARTY 448
+#define MINI_SP_STARTY 512
+#define MICRO_SP_STARTX 384
+#define MICRO_SP_STARTY 512
#define SP_PER_LINE 16
#define MINI_SP_PER_LINE 16
-#define MICRO_SP_PER_LINE 64
+#define MICRO_SP_PER_LINE 16
-#define MINI_DC_STARTX 256
-#define MINI_DC_STARTY 256
+#define MINI_DC_STARTX 0
+#define MINI_DC_STARTY 512
#define MICRO_DC_STARTX 384
-#define MICRO_DC_STARTY 384
+#define MICRO_DC_STARTY 512
#define DC_PER_LINE 16
#define MINI_DC_PER_LINE 16
#define MICRO_DC_PER_LINE 16
-#define MINI_MORE_STARTX 256
+#define MINI_MORE_STARTX 0
#define MINI_MORE_STARTY 256
#define MICRO_MORE_STARTX 384
-#define MICRO_MORE_STARTY 384
+#define MICRO_MORE_STARTY 256
#define MORE_PER_LINE 16
#define MINI_MORE_PER_LINE 16
#define MICRO_MORE_PER_LINE 16
/* game elements:
-** 0 - 499: real elements, stored in level file
-** 500 - 699: flag elements, only used at runtime
+** 0 <= element < xxx: real elements, stored in level file
+** xxx <= element < yyy: flag elements, only used at runtime
*/
/* "real" level elements */
-#define EL_LEERRAUM 0
-#define EL_ERDREICH 1
-#define EL_MAUERWERK 2
-#define EL_FELSBODEN 3
-#define EL_FELSBROCKEN 4
-#define EL_SCHLUESSEL 5
-#define EL_EDELSTEIN 6
-#define EL_AUSGANG_ZU 7
-#define EL_SPIELFIGUR 8
-#define EL_KAEFER 9
-#define EL_FLIEGER 10
-#define EL_MAMPFER 11
-#define EL_ROBOT 12
-#define EL_BETON 13
-#define EL_DIAMANT 14
-#define EL_AMOEBE_TOT 15
-#define EL_MORAST_LEER 16
-#define EL_MORAST_VOLL 17
-#define EL_TROPFEN 18
-#define EL_BOMBE 19
-#define EL_MAGIC_WALL_OFF 20
-#define EL_SPEED_PILL 21
-#define EL_SALZSAEURE 22
-#define EL_AMOEBE_NASS 23
-#define EL_AMOEBE_NORM 24
-#define EL_KOKOSNUSS 25
-#define EL_LIFE 26
-#define EL_LIFE_ASYNC 27
-#define EL_DYNAMITE_ACTIVE 28
-#define EL_BADEWANNE 29
-#define EL_ABLENK_AUS 30
-#define EL_ABLENK_EIN 31
-#define EL_SCHLUESSEL1 32
-#define EL_SCHLUESSEL2 33
-#define EL_SCHLUESSEL3 34
-#define EL_SCHLUESSEL4 35
-#define EL_PFORTE1 36
-#define EL_PFORTE2 37
-#define EL_PFORTE3 38
-#define EL_PFORTE4 39
-#define EL_PFORTE1X 40
-#define EL_PFORTE2X 41
-#define EL_PFORTE3X 42
-#define EL_PFORTE4X 43
-#define EL_DYNAMITE_INACTIVE 44
-#define EL_PACMAN 45
-#define EL_UNSICHTBAR 46
-#define EL_BIRNE_AUS 47
-#define EL_BIRNE_EIN 48
-#define EL_ERZ_EDEL 49
-#define EL_ERZ_DIAM 50
-#define EL_AMOEBE_VOLL 51
-#define EL_AMOEBE_BD 52
-#define EL_ZEIT_VOLL 53
-#define EL_ZEIT_LEER 54
-#define EL_MAUER_LEBT 55
-#define EL_EDELSTEIN_BD 56
-#define EL_EDELSTEIN_GELB 57
-#define EL_ERZ_EDEL_BD 58
-#define EL_ERZ_EDEL_GELB 59
-#define EL_MAMPFER2 60
-#define EL_MAGIC_WALL_BD_OFF 61
-#define EL_INVISIBLE_STEEL 62
-
-#define EL_UNUSED_63 63
-
-#define EL_DYNABOMB_NR 64
-#define EL_DYNABOMB_SZ 65
-#define EL_DYNABOMB_XL 66
-#define EL_SOKOBAN_OBJEKT 67
-#define EL_SOKOBAN_FELD_LEER 68
-#define EL_SOKOBAN_FELD_VOLL 69
-#define EL_BUTTERFLY_RIGHT 70
-#define EL_BUTTERFLY_UP 71
-#define EL_BUTTERFLY_LEFT 72
-#define EL_BUTTERFLY_DOWN 73
-#define EL_FIREFLY_RIGHT 74
-#define EL_FIREFLY_UP 75
-#define EL_FIREFLY_LEFT 76
-#define EL_FIREFLY_DOWN 77
-#define EL_BUTTERFLY_1 EL_BUTTERFLY_DOWN
-#define EL_BUTTERFLY_2 EL_BUTTERFLY_LEFT
-#define EL_BUTTERFLY_3 EL_BUTTERFLY_UP
-#define EL_BUTTERFLY_4 EL_BUTTERFLY_RIGHT
-#define EL_FIREFLY_1 EL_FIREFLY_LEFT
-#define EL_FIREFLY_2 EL_FIREFLY_DOWN
-#define EL_FIREFLY_3 EL_FIREFLY_RIGHT
-#define EL_FIREFLY_4 EL_FIREFLY_UP
-#define EL_BUTTERFLY 78
-#define EL_FIREFLY 79
-#define EL_SPIELER1 80
-#define EL_SPIELER2 81
-#define EL_SPIELER3 82
-#define EL_SPIELER4 83
-#define EL_KAEFER_RIGHT 84
-#define EL_KAEFER_UP 85
-#define EL_KAEFER_LEFT 86
-#define EL_KAEFER_DOWN 87
-#define EL_FLIEGER_RIGHT 88
-#define EL_FLIEGER_UP 89
-#define EL_FLIEGER_LEFT 90
-#define EL_FLIEGER_DOWN 91
-#define EL_PACMAN_RIGHT 92
-#define EL_PACMAN_UP 93
-#define EL_PACMAN_LEFT 94
-#define EL_PACMAN_DOWN 95
-#define EL_EDELSTEIN_ROT 96
-#define EL_EDELSTEIN_LILA 97
-#define EL_ERZ_EDEL_ROT 98
-#define EL_ERZ_EDEL_LILA 99
-#define EL_BADEWANNE1 100
-#define EL_BADEWANNE2 101
-#define EL_BADEWANNE3 102
-#define EL_BADEWANNE4 103
-#define EL_BADEWANNE5 104
-#define EL_BD_WALL 105
-#define EL_BD_ROCK 106
-#define EL_AUSGANG_AUF 107
-#define EL_BLACK_ORB 108
-#define EL_AMOEBA2DIAM 109
-#define EL_MOLE 110
-#define EL_PINGUIN 111
-#define EL_SONDE 112
-#define EL_PFEIL_LEFT 113
-#define EL_PFEIL_RIGHT 114
-#define EL_PFEIL_UP 115
-#define EL_PFEIL_DOWN 116
-#define EL_SCHWEIN 117
-#define EL_DRACHE 118
-
-#define EL_EM_KEY_1_FILE 119
-
-#define EL_CHAR_START 120
-#define EL_CHAR_ASCII0 (EL_CHAR_START-32)
-#define EL_CHAR_AUSRUF (EL_CHAR_ASCII0+33)
-#define EL_CHAR_ZOLL (EL_CHAR_ASCII0+34)
-#define EL_CHAR_RAUTE (EL_CHAR_ASCII0+35)
-#define EL_CHAR_DOLLAR (EL_CHAR_ASCII0+36)
-#define EL_CHAR_PROZ (EL_CHAR_ASCII0+37)
-#define EL_CHAR_AMPERSAND (EL_CHAR_ASCII0+38)
-#define EL_CHAR_APOSTR (EL_CHAR_ASCII0+39)
-#define EL_CHAR_KLAMM1 (EL_CHAR_ASCII0+40)
-#define EL_CHAR_KLAMM2 (EL_CHAR_ASCII0+41)
-#define EL_CHAR_MULT (EL_CHAR_ASCII0+42)
-#define EL_CHAR_PLUS (EL_CHAR_ASCII0+43)
-#define EL_CHAR_KOMMA (EL_CHAR_ASCII0+44)
-#define EL_CHAR_MINUS (EL_CHAR_ASCII0+45)
-#define EL_CHAR_PUNKT (EL_CHAR_ASCII0+46)
-#define EL_CHAR_SLASH (EL_CHAR_ASCII0+47)
-#define EL_CHAR_0 (EL_CHAR_ASCII0+48)
-#define EL_CHAR_9 (EL_CHAR_ASCII0+57)
-#define EL_CHAR_DOPPEL (EL_CHAR_ASCII0+58)
-#define EL_CHAR_SEMIKL (EL_CHAR_ASCII0+59)
-#define EL_CHAR_LT (EL_CHAR_ASCII0+60)
-#define EL_CHAR_GLEICH (EL_CHAR_ASCII0+61)
-#define EL_CHAR_GT (EL_CHAR_ASCII0+62)
-#define EL_CHAR_FRAGE (EL_CHAR_ASCII0+63)
-#define EL_CHAR_AT (EL_CHAR_ASCII0+64)
-#define EL_CHAR_A (EL_CHAR_ASCII0+65)
-#define EL_CHAR_Z (EL_CHAR_ASCII0+90)
-#define EL_CHAR_AE (EL_CHAR_ASCII0+91)
-#define EL_CHAR_OE (EL_CHAR_ASCII0+92)
-#define EL_CHAR_UE (EL_CHAR_ASCII0+93)
-#define EL_CHAR_COPY (EL_CHAR_ASCII0+94)
-#define EL_CHAR_END (EL_CHAR_START+79)
-
-#define EL_CHAR(x) ((x) == 'Ä' ? EL_CHAR_AE : \
- (x) == 'Ö' ? EL_CHAR_OE : \
- (x) == 'Ü' ? EL_CHAR_UE : \
- EL_CHAR_A + (x) - 'A')
-
-#define EL_MAUER_X 200
-#define EL_MAUER_Y 201
-#define EL_MAUER_XY 202
-
-#define EL_EM_GATE_1 203
-#define EL_EM_GATE_2 204
-#define EL_EM_GATE_3 205
-#define EL_EM_GATE_4 206
-
-#define EL_EM_KEY_2_FILE 207
-#define EL_EM_KEY_3_FILE 208
-#define EL_EM_KEY_4_FILE 209
-
-#define EL_SP_START 210
-#define EL_SP_EMPTY (EL_SP_START + 0)
-#define EL_SP_ZONK (EL_SP_START + 1)
-#define EL_SP_BASE (EL_SP_START + 2)
-#define EL_SP_MURPHY (EL_SP_START + 3)
-#define EL_SP_INFOTRON (EL_SP_START + 4)
-#define EL_SP_CHIP_SINGLE (EL_SP_START + 5)
-#define EL_SP_HARD_GRAY (EL_SP_START + 6)
-#define EL_SP_EXIT (EL_SP_START + 7)
-#define EL_SP_DISK_ORANGE (EL_SP_START + 8)
-#define EL_SP_PORT1_RIGHT (EL_SP_START + 9)
-#define EL_SP_PORT1_DOWN (EL_SP_START + 10)
-#define EL_SP_PORT1_LEFT (EL_SP_START + 11)
-#define EL_SP_PORT1_UP (EL_SP_START + 12)
-#define EL_SP_PORT2_RIGHT (EL_SP_START + 13)
-#define EL_SP_PORT2_DOWN (EL_SP_START + 14)
-#define EL_SP_PORT2_LEFT (EL_SP_START + 15)
-#define EL_SP_PORT2_UP (EL_SP_START + 16)
-#define EL_SP_SNIKSNAK (EL_SP_START + 17)
-#define EL_SP_DISK_YELLOW (EL_SP_START + 18)
-#define EL_SP_TERMINAL (EL_SP_START + 19)
-#define EL_SP_DISK_RED (EL_SP_START + 20)
-#define EL_SP_PORT_Y (EL_SP_START + 21)
-#define EL_SP_PORT_X (EL_SP_START + 22)
-#define EL_SP_PORT_XY (EL_SP_START + 23)
-#define EL_SP_ELECTRON (EL_SP_START + 24)
-#define EL_SP_BUG (EL_SP_START + 25)
-#define EL_SP_CHIP_LEFT (EL_SP_START + 26)
-#define EL_SP_CHIP_RIGHT (EL_SP_START + 27)
-#define EL_SP_HARD_BASE1 (EL_SP_START + 28)
-#define EL_SP_HARD_GREEN (EL_SP_START + 29)
-#define EL_SP_HARD_BLUE (EL_SP_START + 30)
-#define EL_SP_HARD_RED (EL_SP_START + 31)
-#define EL_SP_HARD_YELLOW (EL_SP_START + 32)
-#define EL_SP_HARD_BASE2 (EL_SP_START + 33)
-#define EL_SP_HARD_BASE3 (EL_SP_START + 34)
-#define EL_SP_HARD_BASE4 (EL_SP_START + 35)
-#define EL_SP_HARD_BASE5 (EL_SP_START + 36)
-#define EL_SP_HARD_BASE6 (EL_SP_START + 37)
-#define EL_SP_CHIP_UPPER (EL_SP_START + 38)
-#define EL_SP_CHIP_LOWER (EL_SP_START + 39)
-#define EL_SP_END (EL_SP_START + 39)
-
-#define EL_EM_GATE_1X 250
-#define EL_EM_GATE_2X 251
-#define EL_EM_GATE_3X 252
-#define EL_EM_GATE_4X 253
-
-#define EL_UNUSED_254 254
-#define EL_UNUSED_255 255
-
-#define EL_PEARL 256
-#define EL_CRYSTAL 257
-#define EL_WALL_PEARL 258
-#define EL_WALL_CRYSTAL 259
-#define EL_DOOR_WHITE 260
-#define EL_DOOR_WHITE_GRAY 261
-#define EL_KEY_WHITE 262
-#define EL_SHIELD_PASSIVE 263
-#define EL_EXTRA_TIME 264
-#define EL_SWITCHGATE_OPEN 265
-#define EL_SWITCHGATE_CLOSED 266
-#define EL_SWITCHGATE_SWITCH_1 267
-#define EL_SWITCHGATE_SWITCH_2 268
-
-#define EL_UNUSED_269 269
-#define EL_UNUSED_270 270
-
-#define EL_BELT1_LEFT 271
-#define EL_BELT1_MIDDLE 272
-#define EL_BELT1_RIGHT 273
-#define EL_BELT1_SWITCH_LEFT 274
-#define EL_BELT1_SWITCH_MIDDLE 275
-#define EL_BELT1_SWITCH_RIGHT 276
-#define EL_BELT2_LEFT 277
-#define EL_BELT2_MIDDLE 278
-#define EL_BELT2_RIGHT 279
-#define EL_BELT2_SWITCH_LEFT 280
-#define EL_BELT2_SWITCH_MIDDLE 281
-#define EL_BELT2_SWITCH_RIGHT 282
-#define EL_BELT3_LEFT 283
-#define EL_BELT3_MIDDLE 284
-#define EL_BELT3_RIGHT 285
-#define EL_BELT3_SWITCH_LEFT 286
-#define EL_BELT3_SWITCH_MIDDLE 287
-#define EL_BELT3_SWITCH_RIGHT 288
-#define EL_BELT4_LEFT 289
-#define EL_BELT4_MIDDLE 290
-#define EL_BELT4_RIGHT 291
-#define EL_BELT4_SWITCH_LEFT 292
-#define EL_BELT4_SWITCH_MIDDLE 293
-#define EL_BELT4_SWITCH_RIGHT 294
-#define EL_LANDMINE 295
-#define EL_ENVELOPE 296
-#define EL_LIGHT_SWITCH_OFF 297
-#define EL_LIGHT_SWITCH_ON 298
-#define EL_SIGN_EXCLAMATION 299
-#define EL_SIGN_RADIOACTIVITY 300
-#define EL_SIGN_STOP 301
-#define EL_SIGN_WHEELCHAIR 302
-#define EL_SIGN_PARKING 303
-#define EL_SIGN_ONEWAY 304
-#define EL_SIGN_HEART 305
-#define EL_SIGN_TRIANGLE 306
-#define EL_SIGN_ROUND 307
-#define EL_SIGN_EXIT 308
-#define EL_SIGN_YINYANG 309
-#define EL_SIGN_OTHER 310
-#define EL_MOLE_LEFT 311
-#define EL_MOLE_RIGHT 312
-#define EL_MOLE_UP 313
-#define EL_MOLE_DOWN 314
-#define EL_STEEL_SLANTED 315
-#define EL_SAND_INVISIBLE 316
-#define EL_DX_UNKNOWN_15 317
-#define EL_DX_UNKNOWN_42 318
-
-#define EL_UNUSED_319 319
-#define EL_UNUSED_320 320
-
-#define EL_SHIELD_ACTIVE 321
-#define EL_TIMEGATE_OPEN 322
-#define EL_TIMEGATE_CLOSED 323
-#define EL_TIMEGATE_SWITCH_ON 324
-#define EL_TIMEGATE_SWITCH_OFF 325
-
-#define EL_BALLOON 326
-#define EL_BALLOON_SEND_LEFT 327
-#define EL_BALLOON_SEND_RIGHT 328
-#define EL_BALLOON_SEND_UP 329
-#define EL_BALLOON_SEND_DOWN 330
-#define EL_BALLOON_SEND_ANY 331
-
-#define EL_EMC_STEEL_WALL_1 332
-#define EL_EMC_STEEL_WALL_2 333
-#define EL_EMC_STEEL_WALL_3 334
-#define EL_EMC_STEEL_WALL_4 335
-#define EL_EMC_WALL_1 336
-#define EL_EMC_WALL_2 337
-#define EL_EMC_WALL_3 338
-#define EL_EMC_WALL_4 339
-#define EL_EMC_WALL_5 340
-#define EL_EMC_WALL_6 341
-#define EL_EMC_WALL_7 342
-#define EL_EMC_WALL_8 343
-
-#define EL_TUBE_CROSS 344
-#define EL_TUBE_VERTICAL 345
-#define EL_TUBE_HORIZONTAL 346
-#define EL_TUBE_VERT_LEFT 347
-#define EL_TUBE_VERT_RIGHT 348
-#define EL_TUBE_HORIZ_UP 349
-#define EL_TUBE_HORIZ_DOWN 350
-#define EL_TUBE_LEFT_UP 351
-#define EL_TUBE_LEFT_DOWN 352
-#define EL_TUBE_RIGHT_UP 353
-#define EL_TUBE_RIGHT_DOWN 354
-#define EL_SPRING 355
-#define EL_TRAP_INACTIVE 356
-#define EL_DX_SUPABOMB 357
-
-#define NUM_LEVEL_ELEMENTS 358
+#define EL_EMPTY_SPACE 0
+#define EL_EMPTY EL_EMPTY_SPACE
+#define EL_SAND 1
+#define EL_WALL 2
+#define EL_WALL_CRUMBLED 3
+#define EL_ROCK 4
+#define EL_KEY_OBSOLETE 5 /* obsolete; mapped to EL_KEY1 */
+#define EL_EMERALD 6
+#define EL_EXIT_CLOSED 7
+#define EL_PLAYER_OBSOLETE 8 /* obsolete; mapped to EL_PLAYER1 */
+#define EL_BUG 9
+#define EL_SPACESHIP 10
+#define EL_YAMYAM 11
+#define EL_ROBOT 12
+#define EL_STEELWALL 13
+#define EL_DIAMOND 14
+#define EL_AMOEBA_DEAD 15
+#define EL_QUICKSAND_EMPTY 16
+#define EL_QUICKSAND_FULL 17
+#define EL_AMOEBA_DROP 18
+#define EL_BOMB 19
+#define EL_MAGIC_WALL 20
+#define EL_SPEED_PILL 21
+#define EL_ACID 22
+#define EL_AMOEBA_WET 23
+#define EL_AMOEBA_DRY 24
+#define EL_NUT 25
+#define EL_GAMEOFLIFE 26
+#define EL_BIOMAZE 27
+#define EL_DYNAMITE_ACTIVE 28
+#define EL_STONEBLOCK 29
+#define EL_ROBOT_WHEEL 30
+#define EL_ROBOT_WHEEL_ACTIVE 31
+#define EL_KEY1 32
+#define EL_KEY2 33
+#define EL_KEY3 34
+#define EL_KEY4 35
+#define EL_GATE1 36
+#define EL_GATE2 37
+#define EL_GATE3 38
+#define EL_GATE4 39
+#define EL_GATE1_GRAY 40
+#define EL_GATE2_GRAY 41
+#define EL_GATE3_GRAY 42
+#define EL_GATE4_GRAY 43
+#define EL_DYNAMITE 44
+#define EL_PACMAN 45
+#define EL_INVISIBLE_WALL 46
+#define EL_LAMP 47
+#define EL_LAMP_ACTIVE 48
+#define EL_WALL_EMERALD 49
+#define EL_WALL_DIAMOND 50
+#define EL_AMOEBA_FULL 51
+#define EL_BD_AMOEBA 52
+#define EL_TIME_ORB_FULL 53
+#define EL_TIME_ORB_EMPTY 54
+#define EL_WALL_GROWING 55
+#define EL_BD_DIAMOND 56
+#define EL_EMERALD_YELLOW 57
+#define EL_WALL_BD_DIAMOND 58
+#define EL_WALL_EMERALD_YELLOW 59
+#define EL_DARK_YAMYAM 60
+#define EL_BD_MAGIC_WALL 61
+#define EL_INVISIBLE_STEELWALL 62
+
+#define EL_UNUSED_63 63
+
+#define EL_DYNABOMB_NR 64
+#define EL_DYNABOMB_SZ 65
+#define EL_DYNABOMB_XL 66
+#define EL_SOKOBAN_OBJECT 67
+#define EL_SOKOBAN_FIELD_EMPTY 68
+#define EL_SOKOBAN_FIELD_FULL 69
+#define EL_BD_BUTTERFLY_RIGHT 70
+#define EL_BD_BUTTERFLY_UP 71
+#define EL_BD_BUTTERFLY_LEFT 72
+#define EL_BD_BUTTERFLY_DOWN 73
+#define EL_BD_FIREFLY_RIGHT 74
+#define EL_BD_FIREFLY_UP 75
+#define EL_BD_FIREFLY_LEFT 76
+#define EL_BD_FIREFLY_DOWN 77
+#define EL_BD_BUTTERFLY_1 EL_BD_BUTTERFLY_DOWN
+#define EL_BD_BUTTERFLY_2 EL_BD_BUTTERFLY_LEFT
+#define EL_BD_BUTTERFLY_3 EL_BD_BUTTERFLY_UP
+#define EL_BD_BUTTERFLY_4 EL_BD_BUTTERFLY_RIGHT
+#define EL_BD_FIREFLY_1 EL_BD_FIREFLY_LEFT
+#define EL_BD_FIREFLY_2 EL_BD_FIREFLY_DOWN
+#define EL_BD_FIREFLY_3 EL_BD_FIREFLY_RIGHT
+#define EL_BD_FIREFLY_4 EL_BD_FIREFLY_UP
+#define EL_BD_BUTTERFLY 78
+#define EL_BD_FIREFLY 79
+#define EL_PLAYER1 80
+#define EL_PLAYER2 81
+#define EL_PLAYER3 82
+#define EL_PLAYER4 83
+#define EL_BUG_RIGHT 84
+#define EL_BUG_UP 85
+#define EL_BUG_LEFT 86
+#define EL_BUG_DOWN 87
+#define EL_SPACESHIP_RIGHT 88
+#define EL_SPACESHIP_UP 89
+#define EL_SPACESHIP_LEFT 90
+#define EL_SPACESHIP_DOWN 91
+#define EL_PACMAN_RIGHT 92
+#define EL_PACMAN_UP 93
+#define EL_PACMAN_LEFT 94
+#define EL_PACMAN_DOWN 95
+#define EL_EMERALD_RED 96
+#define EL_EMERALD_PURPLE 97
+#define EL_WALL_EMERALD_RED 98
+#define EL_WALL_EMERALD_PURPLE 99
+#define EL_ACIDPOOL_TOPLEFT 100
+#define EL_ACIDPOOL_TOPRIGHT 101
+#define EL_ACIDPOOL_BOTTOMLEFT 102
+#define EL_ACIDPOOL_BOTTOM 103
+#define EL_ACIDPOOL_BOTTOMRIGHT 104
+#define EL_BD_WALL 105
+#define EL_BD_ROCK 106
+#define EL_EXIT_OPEN 107
+#define EL_BLACK_ORB 108
+#define EL_AMOEBA_TO_DIAMOND 109
+#define EL_MOLE 110
+#define EL_PENGUIN 111
+#define EL_SATELLITE 112
+#define EL_ARROW_BLUE_LEFT 113
+#define EL_ARROW_BLUE_RIGHT 114
+#define EL_ARROW_BLUE_UP 115
+#define EL_ARROW_BLUE_DOWN 116
+#define EL_PIG 117
+#define EL_DRAGON 118
+
+#define EL_EM_KEY1_FILE 119
+
+#define EL_CHAR_START 120
+#define EL_CHAR_ASCII0 (EL_CHAR_START - 32)
+#define EL_CHAR_EXCLAM (EL_CHAR_ASCII0 + 33)
+#define EL_CHAR_QUOTEDBL (EL_CHAR_ASCII0 + 34)
+#define EL_CHAR_NUMBERSIGN (EL_CHAR_ASCII0 + 35)
+#define EL_CHAR_DOLLAR (EL_CHAR_ASCII0 + 36)
+#define EL_CHAR_PROCENT (EL_CHAR_ASCII0 + 37)
+#define EL_CHAR_AMPERSAND (EL_CHAR_ASCII0 + 38)
+#define EL_CHAR_APOSTROPHE (EL_CHAR_ASCII0 + 39)
+#define EL_CHAR_PARENLEFT (EL_CHAR_ASCII0 + 40)
+#define EL_CHAR_PARENRIGHT (EL_CHAR_ASCII0 + 41)
+#define EL_CHAR_ASTERISK (EL_CHAR_ASCII0 + 42)
+#define EL_CHAR_PLUS (EL_CHAR_ASCII0 + 43)
+#define EL_CHAR_COMMA (EL_CHAR_ASCII0 + 44)
+#define EL_CHAR_MINUS (EL_CHAR_ASCII0 + 45)
+#define EL_CHAR_PERIOD (EL_CHAR_ASCII0 + 46)
+#define EL_CHAR_SLASH (EL_CHAR_ASCII0 + 47)
+#define EL_CHAR_0 (EL_CHAR_ASCII0 + 48)
+#define EL_CHAR_9 (EL_CHAR_ASCII0 + 57)
+#define EL_CHAR_COLON (EL_CHAR_ASCII0 + 58)
+#define EL_CHAR_SEMICOLON (EL_CHAR_ASCII0 + 59)
+#define EL_CHAR_LESS (EL_CHAR_ASCII0 + 60)
+#define EL_CHAR_EQUAL (EL_CHAR_ASCII0 + 61)
+#define EL_CHAR_GREATER (EL_CHAR_ASCII0 + 62)
+#define EL_CHAR_QUESTION (EL_CHAR_ASCII0 + 63)
+#define EL_CHAR_AT (EL_CHAR_ASCII0 + 64)
+#define EL_CHAR_A (EL_CHAR_ASCII0 + 65)
+#define EL_CHAR_Z (EL_CHAR_ASCII0 + 90)
+#define EL_CHAR_AE (EL_CHAR_ASCII0 + 91)
+#define EL_CHAR_OE (EL_CHAR_ASCII0 + 92)
+#define EL_CHAR_UE (EL_CHAR_ASCII0 + 93)
+#define EL_CHAR_COPYRIGHT (EL_CHAR_ASCII0 + 94)
+#define EL_CHAR_END (EL_CHAR_START + 79)
+
+#define EL_CHAR(x) ((x) == 'Ä' ? EL_CHAR_AE : \
+ (x) == 'Ö' ? EL_CHAR_OE : \
+ (x) == 'Ü' ? EL_CHAR_UE : \
+ EL_CHAR_A + (x) - 'A')
+
+#define EL_WALL_GROWING_X 200
+#define EL_WALL_GROWING_Y 201
+#define EL_WALL_GROWING_XY 202
+
+#define EL_EM_GATE1 203
+#define EL_EM_GATE2 204
+#define EL_EM_GATE3 205
+#define EL_EM_GATE4 206
+
+#define EL_EM_KEY2_FILE 207
+#define EL_EM_KEY3_FILE 208
+#define EL_EM_KEY4_FILE 209
+
+#define EL_SP_START 210
+#define EL_SP_EMPTY_SPACE (EL_SP_START + 0)
+#define EL_SP_EMPTY EL_SP_EMPTY_SPACE
+#define EL_SP_ZONK (EL_SP_START + 1)
+#define EL_SP_BASE (EL_SP_START + 2)
+#define EL_SP_MURPHY (EL_SP_START + 3)
+#define EL_SP_INFOTRON (EL_SP_START + 4)
+#define EL_SP_CHIP_SINGLE (EL_SP_START + 5)
+#define EL_SP_HARD_GRAY (EL_SP_START + 6)
+#define EL_SP_EXIT_CLOSED (EL_SP_START + 7)
+#define EL_SP_DISK_ORANGE (EL_SP_START + 8)
+#define EL_SP_PORT1_RIGHT (EL_SP_START + 9)
+#define EL_SP_PORT1_DOWN (EL_SP_START + 10)
+#define EL_SP_PORT1_LEFT (EL_SP_START + 11)
+#define EL_SP_PORT1_UP (EL_SP_START + 12)
+#define EL_SP_PORT2_RIGHT (EL_SP_START + 13)
+#define EL_SP_PORT2_DOWN (EL_SP_START + 14)
+#define EL_SP_PORT2_LEFT (EL_SP_START + 15)
+#define EL_SP_PORT2_UP (EL_SP_START + 16)
+#define EL_SP_SNIKSNAK (EL_SP_START + 17)
+#define EL_SP_DISK_YELLOW (EL_SP_START + 18)
+#define EL_SP_TERMINAL (EL_SP_START + 19)
+#define EL_SP_DISK_RED (EL_SP_START + 20)
+#define EL_SP_PORT_Y (EL_SP_START + 21)
+#define EL_SP_PORT_X (EL_SP_START + 22)
+#define EL_SP_PORT_XY (EL_SP_START + 23)
+#define EL_SP_ELECTRON (EL_SP_START + 24)
+#define EL_SP_BUGGY_BASE (EL_SP_START + 25)
+#define EL_SP_CHIP_LEFT (EL_SP_START + 26)
+#define EL_SP_CHIP_RIGHT (EL_SP_START + 27)
+#define EL_SP_HARD_BASE1 (EL_SP_START + 28)
+#define EL_SP_HARD_GREEN (EL_SP_START + 29)
+#define EL_SP_HARD_BLUE (EL_SP_START + 30)
+#define EL_SP_HARD_RED (EL_SP_START + 31)
+#define EL_SP_HARD_YELLOW (EL_SP_START + 32)
+#define EL_SP_HARD_BASE2 (EL_SP_START + 33)
+#define EL_SP_HARD_BASE3 (EL_SP_START + 34)
+#define EL_SP_HARD_BASE4 (EL_SP_START + 35)
+#define EL_SP_HARD_BASE5 (EL_SP_START + 36)
+#define EL_SP_HARD_BASE6 (EL_SP_START + 37)
+#define EL_SP_CHIP_UPPER (EL_SP_START + 38)
+#define EL_SP_CHIP_LOWER (EL_SP_START + 39)
+#define EL_SP_END (EL_SP_START + 39)
+
+#define EL_EM_GATE1_GRAY 250
+#define EL_EM_GATE2_GRAY 251
+#define EL_EM_GATE3_GRAY 252
+#define EL_EM_GATE4_GRAY 253
+
+#define EL_UNUSED_254 254
+#define EL_UNUSED_255 255
+
+#define EL_PEARL 256
+#define EL_CRYSTAL 257
+#define EL_WALL_PEARL 258
+#define EL_WALL_CRYSTAL 259
+#define EL_DOOR_WHITE 260
+#define EL_DOOR_WHITE_GRAY 261
+#define EL_KEY_WHITE 262
+#define EL_SHIELD_NORMAL 263
+#define EL_EXTRA_TIME 264
+#define EL_SWITCHGATE_OPEN 265
+#define EL_SWITCHGATE_CLOSED 266
+#define EL_SWITCHGATE_SWITCH_UP 267
+#define EL_SWITCHGATE_SWITCH_DOWN 268
+
+#define EL_UNUSED_269 269
+#define EL_UNUSED_270 270
+
+#define EL_CONVEYOR_BELT1_LEFT 271
+#define EL_CONVEYOR_BELT1_MIDDLE 272
+#define EL_CONVEYOR_BELT1_RIGHT 273
+#define EL_CONVEYOR_BELT1_SWITCH_LEFT 274
+#define EL_CONVEYOR_BELT1_SWITCH_MIDDLE 275
+#define EL_CONVEYOR_BELT1_SWITCH_RIGHT 276
+#define EL_CONVEYOR_BELT2_LEFT 277
+#define EL_CONVEYOR_BELT2_MIDDLE 278
+#define EL_CONVEYOR_BELT2_RIGHT 279
+#define EL_CONVEYOR_BELT2_SWITCH_LEFT 280
+#define EL_CONVEYOR_BELT2_SWITCH_MIDDLE 281
+#define EL_CONVEYOR_BELT2_SWITCH_RIGHT 282
+#define EL_CONVEYOR_BELT3_LEFT 283
+#define EL_CONVEYOR_BELT3_MIDDLE 284
+#define EL_CONVEYOR_BELT3_RIGHT 285
+#define EL_CONVEYOR_BELT3_SWITCH_LEFT 286
+#define EL_CONVEYOR_BELT3_SWITCH_MIDDLE 287
+#define EL_CONVEYOR_BELT3_SWITCH_RIGHT 288
+#define EL_CONVEYOR_BELT4_LEFT 289
+#define EL_CONVEYOR_BELT4_MIDDLE 290
+#define EL_CONVEYOR_BELT4_RIGHT 291
+#define EL_CONVEYOR_BELT4_SWITCH_LEFT 292
+#define EL_CONVEYOR_BELT4_SWITCH_MIDDLE 293
+#define EL_CONVEYOR_BELT4_SWITCH_RIGHT 294
+#define EL_LANDMINE 295
+#define EL_ENVELOPE 296
+#define EL_LIGHT_SWITCH 297
+#define EL_LIGHT_SWITCH_ACTIVE 298
+#define EL_SIGN_EXCLAMATION 299
+#define EL_SIGN_RADIOACTIVITY 300
+#define EL_SIGN_STOP 301
+#define EL_SIGN_WHEELCHAIR 302
+#define EL_SIGN_PARKING 303
+#define EL_SIGN_ONEWAY 304
+#define EL_SIGN_HEART 305
+#define EL_SIGN_TRIANGLE 306
+#define EL_SIGN_ROUND 307
+#define EL_SIGN_EXIT 308
+#define EL_SIGN_YINYANG 309
+#define EL_SIGN_OTHER 310
+#define EL_MOLE_LEFT 311
+#define EL_MOLE_RIGHT 312
+#define EL_MOLE_UP 313
+#define EL_MOLE_DOWN 314
+#define EL_STEELWALL_SLANTED 315
+#define EL_INVISIBLE_SAND 316
+#define EL_DX_UNKNOWN_15 317
+#define EL_DX_UNKNOWN_42 318
+
+#define EL_UNUSED_319 319
+#define EL_UNUSED_320 320
+
+#define EL_SHIELD_DEADLY 321
+#define EL_TIMEGATE_OPEN 322
+#define EL_TIMEGATE_CLOSED 323
+#define EL_TIMEGATE_SWITCH_ACTIVE 324
+#define EL_TIMEGATE_SWITCH 325
+
+#define EL_BALLOON 326
+#define EL_BALLOON_SEND_LEFT 327
+#define EL_BALLOON_SEND_RIGHT 328
+#define EL_BALLOON_SEND_UP 329
+#define EL_BALLOON_SEND_DOWN 330
+#define EL_BALLOON_SEND_ANY_DIRECTION 331
+
+#define EL_EMC_STEELWALL1 332
+#define EL_EMC_STEELWALL2 333
+#define EL_EMC_STEELWALL3 334
+#define EL_EMC_STEELWALL4 335
+#define EL_EMC_WALL_PILLAR_UPPER 336
+#define EL_EMC_WALL_PILLAR_MIDDLE 337
+#define EL_EMC_WALL_PILLAR_LOWER 338
+#define EL_EMC_WALL4 339
+#define EL_EMC_WALL5 340
+#define EL_EMC_WALL6 341
+#define EL_EMC_WALL7 342
+#define EL_EMC_WALL8 343
+
+#define EL_TUBE_ALL 344
+#define EL_TUBE_VERTICAL 345
+#define EL_TUBE_HORIZONTAL 346
+#define EL_TUBE_VERTICAL_LEFT 347
+#define EL_TUBE_VERTICAL_RIGHT 348
+#define EL_TUBE_HORIZONTAL_UP 349
+#define EL_TUBE_HORIZONTAL_DOWN 350
+#define EL_TUBE_LEFT_UP 351
+#define EL_TUBE_LEFT_DOWN 352
+#define EL_TUBE_RIGHT_UP 353
+#define EL_TUBE_RIGHT_DOWN 354
+#define EL_SPRING 355
+#define EL_TRAP 356
+#define EL_DX_SUPABOMB 357
+
+#define NUM_FILE_ELEMENTS 358
/* "real" (and therefore drawable) runtime elements */
-#define EL_FIRST_RUNTIME_EL 500
-
-#define EL_MAGIC_WALL_EMPTY 500
-#define EL_MAGIC_WALL_BD_EMPTY 501
-#define EL_MAGIC_WALL_FULL 502
-#define EL_MAGIC_WALL_BD_FULL 503
-#define EL_MAGIC_WALL_DEAD 504
-#define EL_MAGIC_WALL_BD_DEAD 505
-#define EL_AUSGANG_ACT 506
-#define EL_SP_TERMINAL_ACTIVE 507
-#define EL_SP_BUG_ACTIVE 508
-#define EL_EM_KEY_1 509
-#define EL_EM_KEY_2 510
-#define EL_EM_KEY_3 511
-#define EL_EM_KEY_4 512
-#define EL_DYNABOMB_ACTIVE_1 513
-#define EL_DYNABOMB_ACTIVE_2 514
-#define EL_DYNABOMB_ACTIVE_3 515
-#define EL_DYNABOMB_ACTIVE_4 516
-#define EL_SWITCHGATE_OPENING 517
-#define EL_SWITCHGATE_CLOSING 518
-#define EL_TIMEGATE_OPENING 519
-#define EL_TIMEGATE_CLOSING 520
-#define EL_PEARL_BREAKING 521
-#define EL_TRAP_ACTIVE 522
-#define EL_SPRING_MOVING 523
-#define EL_SP_MURPHY_CLONE 524
-#define EL_QUICKSAND_EMPTYING 525
-#define EL_MAGIC_WALL_EMPTYING 526
-#define EL_MAGIC_WALL_BD_EMPTYING 527
-#define EL_AMOEBA_DRIPPING 528
+#define EL_FIRST_RUNTIME_REAL NUM_FILE_ELEMENTS
+
+#define EL_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 0)
+#define EL_BD_MAGIC_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 1)
+#define EL_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 2)
+#define EL_BD_MAGIC_WALL_FULL (EL_FIRST_RUNTIME_REAL + 3)
+#define EL_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 4)
+#define EL_BD_MAGIC_WALL_DEAD (EL_FIRST_RUNTIME_REAL + 5)
+#define EL_EXIT_OPENING (EL_FIRST_RUNTIME_REAL + 6)
+#define EL_SP_TERMINAL_ACTIVE (EL_FIRST_RUNTIME_REAL + 7)
+#define EL_SP_BUGGY_BASE_ACTIVE (EL_FIRST_RUNTIME_REAL + 8)
+#define EL_EM_KEY1 (EL_FIRST_RUNTIME_REAL + 9)
+#define EL_EM_KEY2 (EL_FIRST_RUNTIME_REAL + 10)
+#define EL_EM_KEY3 (EL_FIRST_RUNTIME_REAL + 11)
+#define EL_EM_KEY4 (EL_FIRST_RUNTIME_REAL + 12)
+#define EL_DYNABOMB_PLAYER1_ACTIVE (EL_FIRST_RUNTIME_REAL + 13)
+#define EL_DYNABOMB_PLAYER2_ACTIVE (EL_FIRST_RUNTIME_REAL + 14)
+#define EL_DYNABOMB_PLAYER3_ACTIVE (EL_FIRST_RUNTIME_REAL + 15)
+#define EL_DYNABOMB_PLAYER4_ACTIVE (EL_FIRST_RUNTIME_REAL + 16)
+#define EL_SWITCHGATE_OPENING (EL_FIRST_RUNTIME_REAL + 17)
+#define EL_SWITCHGATE_CLOSING (EL_FIRST_RUNTIME_REAL + 18)
+#define EL_TIMEGATE_OPENING (EL_FIRST_RUNTIME_REAL + 19)
+#define EL_TIMEGATE_CLOSING (EL_FIRST_RUNTIME_REAL + 20)
+#define EL_PEARL_BREAKING (EL_FIRST_RUNTIME_REAL + 21)
+#define EL_TRAP_ACTIVE (EL_FIRST_RUNTIME_REAL + 22)
+#define EL_SPRING_MOVING (EL_FIRST_RUNTIME_REAL + 23)
+#define EL_SP_MURPHY_CLONE (EL_FIRST_RUNTIME_REAL + 24)
+#define EL_QUICKSAND_EMPTYING (EL_FIRST_RUNTIME_REAL + 25)
+#define EL_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 26)
+#define EL_BD_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 27)
+#define EL_AMOEBA_DRIPPING (EL_FIRST_RUNTIME_REAL + 28)
+#define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME_REAL + 29)
+#define EL_INVISIBLE_STEELWALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 30)
+#define EL_INVISIBLE_SAND_ACTIVE (EL_FIRST_RUNTIME_REAL + 31)
+#define EL_INVISIBLE_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 32)
+#define EL_CONVEYOR_BELT1_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 33)
+#define EL_CONVEYOR_BELT1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 34)
+#define EL_CONVEYOR_BELT1_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 35)
+#define EL_CONVEYOR_BELT2_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 36)
+#define EL_CONVEYOR_BELT2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 37)
+#define EL_CONVEYOR_BELT2_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 38)
+#define EL_CONVEYOR_BELT3_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 39)
+#define EL_CONVEYOR_BELT3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 40)
+#define EL_CONVEYOR_BELT3_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 41)
+#define EL_CONVEYOR_BELT4_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 42)
+#define EL_CONVEYOR_BELT4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 43)
+#define EL_CONVEYOR_BELT4_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 44)
/* "unreal" (and therefore not drawable) runtime elements */
-#define EL_BLOCKED 600
-#define EL_EXPLODING 601
-#define EL_CRACKINGNUT 602
-#define EL_BLURB_LEFT 603
-#define EL_BLURB_RIGHT 604
-#define EL_AMOEBING 605
-#define EL_DEAMOEBING 606
-#define EL_MAUERND 607
-#define EL_BURNING 608
-#define EL_PLAYER_IS_LEAVING 609
-#define EL_QUICKSAND_FILLING 610
-#define EL_MAGIC_WALL_FILLING 611
-#define EL_MAGIC_WALL_BD_FILLING 612
+#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 45)
+
+#define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0)
+#define EL_EXPLOSION (EL_FIRST_RUNTIME_UNREAL + 1)
+#define EL_NUT_CRACKING (EL_FIRST_RUNTIME_UNREAL + 2)
+#define EL_ACID_SPLASH_LEFT (EL_FIRST_RUNTIME_UNREAL + 3)
+#define EL_ACID_SPLASH_RIGHT (EL_FIRST_RUNTIME_UNREAL + 4)
+#define EL_AMOEBA_CREATING (EL_FIRST_RUNTIME_UNREAL + 5)
+#define EL_AMOEBA_SHRINKING (EL_FIRST_RUNTIME_UNREAL + 6)
+#define EL_WALL_GROWING_ACTIVE (EL_FIRST_RUNTIME_UNREAL + 7)
+#define EL_FLAMES (EL_FIRST_RUNTIME_UNREAL + 8)
+#define EL_PLAYER_IS_LEAVING (EL_FIRST_RUNTIME_UNREAL + 9)
+#define EL_QUICKSAND_FILLING (EL_FIRST_RUNTIME_UNREAL + 10)
+#define EL_MAGIC_WALL_FILLING (EL_FIRST_RUNTIME_UNREAL + 11)
+#define EL_BD_MAGIC_WALL_FILLING (EL_FIRST_RUNTIME_UNREAL + 12)
+
+/* dummy (not drawable) runtime elements (internal use only) */
+#define EL_FIRST_DUMMY (EL_FIRST_RUNTIME_UNREAL + 13)
+
+#define EL_STEELWALL_TOPLEFT (EL_FIRST_DUMMY + 0)
+#define EL_STEELWALL_TOPRIGHT (EL_FIRST_DUMMY + 1)
+#define EL_STEELWALL_BOTTOMLEFT (EL_FIRST_DUMMY + 2)
+#define EL_STEELWALL_BOTTOMRIGHT (EL_FIRST_DUMMY + 3)
+#define EL_STEELWALL_HORIZONTAL (EL_FIRST_DUMMY + 4)
+#define EL_STEELWALL_VERTICAL (EL_FIRST_DUMMY + 5)
+#define EL_INVISIBLE_STEELWALL_TOPLEFT (EL_FIRST_DUMMY + 6)
+#define EL_INVISIBLE_STEELWALL_TOPRIGHT (EL_FIRST_DUMMY + 7)
+#define EL_INVISIBLE_STEELWALL_BOTTOMLEFT (EL_FIRST_DUMMY + 8)
+#define EL_INVISIBLE_STEELWALL_BOTTOMRIGHT (EL_FIRST_DUMMY + 9)
+#define EL_INVISIBLE_STEELWALL_HORIZONTAL (EL_FIRST_DUMMY + 10)
+#define EL_INVISIBLE_STEELWALL_VERTICAL (EL_FIRST_DUMMY + 11)
+#define EL_SAND_CRUMBLED (EL_FIRST_DUMMY + 12)
+#define EL_BD_AMOEBA_PART1 (EL_FIRST_DUMMY + 13)
+#define EL_BD_AMOEBA_PART2 (EL_FIRST_DUMMY + 14)
+#define EL_BD_AMOEBA_PART3 (EL_FIRST_DUMMY + 15)
+#define EL_BD_AMOEBA_PART4 (EL_FIRST_DUMMY + 16)
+#define EL_AMOEBA_WET_PART1 (EL_FIRST_DUMMY + 17)
+#define EL_AMOEBA_WET_PART2 (EL_FIRST_DUMMY + 18)
+#define EL_AMOEBA_WET_PART3 (EL_FIRST_DUMMY + 19)
+#define EL_AMOEBA_WET_PART4 (EL_FIRST_DUMMY + 20)
+#define EL_AMOEBA_DRY_PART1 (EL_FIRST_DUMMY + 21)
+#define EL_AMOEBA_DRY_PART2 (EL_FIRST_DUMMY + 22)
+#define EL_AMOEBA_DRY_PART3 (EL_FIRST_DUMMY + 23)
+#define EL_AMOEBA_DRY_PART4 (EL_FIRST_DUMMY + 24)
+#define EL_AMOEBA_DEAD_PART1 (EL_FIRST_DUMMY + 25)
+#define EL_AMOEBA_DEAD_PART2 (EL_FIRST_DUMMY + 26)
+#define EL_AMOEBA_DEAD_PART3 (EL_FIRST_DUMMY + 27)
+#define EL_AMOEBA_DEAD_PART4 (EL_FIRST_DUMMY + 28)
+#define EL_DYNABOMB_ACTIVE (EL_FIRST_DUMMY + 29)
+#define EL_SHIELD_NORMAL_ACTIVE (EL_FIRST_DUMMY + 30)
+#define EL_SHIELD_DEADLY_ACTIVE (EL_FIRST_DUMMY + 31)
+#define EL_ARROW_RED_LEFT (EL_FIRST_DUMMY + 32)
+#define EL_ARROW_RED_RIGHT (EL_FIRST_DUMMY + 33)
+#define EL_ARROW_RED_UP (EL_FIRST_DUMMY + 34)
+#define EL_ARROW_RED_DOWN (EL_FIRST_DUMMY + 35)
+
+#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 36)
+
/* game graphics:
-** 0 - 255: graphics from "RocksScreen"
+** 0 - 255: graphics from "RocksElements"
** 256 - 511: graphics from "RocksFont"
** 512 - 767: graphics from "RocksHeroes"
** 768 - 1023: graphics from "RocksSP"
** 1280 - 1535: graphics from "RocksMore"
*/
-#define GFX_START_ROCKSSCREEN 0
-#define GFX_END_ROCKSSCREEN 255
-#define GFX_START_ROCKSFONT 256
-#define GFX_END_ROCKSFONT 511
-#define GFX_START_ROCKSHEROES 512
-#define GFX_END_ROCKSHEROES 767
-#define GFX_START_ROCKSSP 768
-#define GFX_END_ROCKSSP 1023
-#define GFX_START_ROCKSDC 1024
-#define GFX_END_ROCKSDC 1279
-#define GFX_START_ROCKSMORE 1280
-#define GFX_END_ROCKSMORE 1535
-
-#define NUM_TILES 1536
+#define GFX_START_ROCKSELEMENTS 0
+#define GFX_END_ROCKSELEMENTS 255
+#define GFX_START_ROCKSFONT 256
+#define GFX_END_ROCKSFONT 511
+#define GFX_START_ROCKSHEROES 512
+#define GFX_END_ROCKSHEROES 767
+#define GFX_START_ROCKSSP 768
+#define GFX_END_ROCKSSP 1023
+#define GFX_START_ROCKSDC 1024
+#define GFX_END_ROCKSDC 1279
+#define GFX_START_ROCKSMORE 1280
+#define GFX_END_ROCKSMORE 1535
+
+#define NUM_TILES 1536 /* see above: MAX_GRAPHICS */
/* graphics from "RocksScreen" */
/* Zeile 0 (0) */
-#define GFX_LEERRAUM (-1)
-#define GFX_ERDREICH 0
-#define GFX_ERDENRAND 1
-#define GFX_MORAST_LEER 2
-#define GFX_MORAST_VOLL 3
-#define GFX_BETON 4
-#define GFX_MAUERWERK 5
-#define GFX_FELSBODEN 6
-#define GFX_EDELSTEIN 8
-#define GFX_DIAMANT 10
-#define GFX_FELSBROCKEN 12
+#define GFX_LEERRAUM (-1)
+#define GFX_ERDREICH 0
+#define GFX_ERDENRAND 1
+#define GFX_MORAST_LEER 2
+#define GFX_MORAST_VOLL 3
+#define GFX_BETON 4
+#define GFX_MAUERWERK 5
+#define GFX_FELSBODEN 6
+#define GFX_EDELSTEIN 8
+#define GFX_DIAMANT 10
+#define GFX_FELSBROCKEN 12
/* Zeile 1 (16) */
-#define GFX_BADEWANNE1 16
-#define GFX_SALZSAEURE 17
-#define GFX_BADEWANNE2 18
+#define GFX_BADEWANNE1 16
+#define GFX_SALZSAEURE 17
+#define GFX_BADEWANNE2 18
/*
-#define GFX_UNSICHTBAR 19
+#define GFX_UNSICHTBAR 19
*/
-#define GFX_SCHLUESSEL1 20
-#define GFX_SCHLUESSEL2 21
-#define GFX_SCHLUESSEL3 22
-#define GFX_SCHLUESSEL4 23
-#define GFX_LIFE 24
-#define GFX_LIFE_ASYNC 25
-#define GFX_BADEWANNE 26
-#define GFX_BOMBE 27
-#define GFX_KOKOSNUSS 28
-#define GFX_CRACKINGNUT 29
+#define GFX_SCHLUESSEL1 20
+#define GFX_SCHLUESSEL2 21
+#define GFX_SCHLUESSEL3 22
+#define GFX_SCHLUESSEL4 23
+#define GFX_LIFE 24
+#define GFX_LIFE_ASYNC 25
+#define GFX_BADEWANNE 26
+#define GFX_BOMBE 27
+#define GFX_KOKOSNUSS 28
+#define GFX_CRACKINGNUT 29
/* Zeile 2 (32) */
-#define GFX_BADEWANNE3 32
-#define GFX_BADEWANNE4 33
-#define GFX_BADEWANNE5 34
-#define GFX_SMILEY 35
-#define GFX_PFORTE1 36
-#define GFX_PFORTE2 37
-#define GFX_PFORTE3 38
-#define GFX_PFORTE4 39
-#define GFX_PFORTE1X 40
-#define GFX_PFORTE2X 41
-#define GFX_PFORTE3X 42
-#define GFX_PFORTE4X 43
+#define GFX_BADEWANNE3 32
+#define GFX_BADEWANNE4 33
+#define GFX_BADEWANNE5 34
+#define GFX_SMILEY 35
+#define GFX_PFORTE1 36
+#define GFX_PFORTE2 37
+#define GFX_PFORTE3 38
+#define GFX_PFORTE4 39
+#define GFX_PFORTE1X 40
+#define GFX_PFORTE2X 41
+#define GFX_PFORTE3X 42
+#define GFX_PFORTE4X 43
/* Zeile 3 (48) */
-#define GFX_DYNAMIT_AUS 48
-#define GFX_DYNAMIT 49
-#define GFX_FLIEGER 56
-#define GFX_FLIEGER_RIGHT 56
-#define GFX_FLIEGER_UP 57
-#define GFX_FLIEGER_LEFT 58
-#define GFX_FLIEGER_DOWN 59
+#define GFX_DYNAMIT_AUS 48
+#define GFX_DYNAMIT 49
+#define GFX_FLIEGER 56
+#define GFX_FLIEGER_RIGHT 56
+#define GFX_FLIEGER_UP 58
+#define GFX_FLIEGER_LEFT 60
+#define GFX_FLIEGER_DOWN 62
/* Zeile 4 (64) */
-#define GFX_EXPLOSION 64
-#define GFX_KAEFER 72
-#define GFX_KAEFER_RIGHT 72
-#define GFX_KAEFER_UP 73
-#define GFX_KAEFER_LEFT 74
-#define GFX_KAEFER_DOWN 75
+#define GFX_EXPLOSION 64
+#define GFX_KAEFER 72
+#define GFX_KAEFER_RIGHT 72
+#define GFX_KAEFER_UP 74
+#define GFX_KAEFER_LEFT 76
+#define GFX_KAEFER_DOWN 78
/* Zeile 5 (80) */
-#define GFX_MAMPFER 80
-#define GFX_ROBOT 84
-#define GFX_PACMAN 88
-#define GFX_PACMAN_RIGHT 88
-#define GFX_PACMAN_UP 89
-#define GFX_PACMAN_LEFT 90
-#define GFX_PACMAN_DOWN 91
+#define GFX_MAMPFER 80
+#define GFX_ROBOT 84
+#define GFX_PACMAN 88
+#define GFX_PACMAN_RIGHT 88
+#define GFX_PACMAN_UP 90
+#define GFX_PACMAN_LEFT 92
+#define GFX_PACMAN_DOWN 94
/* Zeile 6 (96) */
-#define GFX_ABLENK 96
-#define GFX_ABLENK_EIN GFX_ABLENK
-#define GFX_ABLENK_AUS GFX_ABLENK
-#define GFX_AMOEBE_NASS 100
-#define GFX_TROPFEN 101
-#define GFX_AMOEBING GFX_TROPFEN
-#define GFX_AMOEBE_LEBT 104
-#define GFX_AMOEBE_NORM GFX_AMOEBE_LEBT
-#define GFX_AMOEBE_TOT 108
-#define GFX_AMOEBA2DIAM GFX_AMOEBE_TOT
+#define GFX_ABLENK 96
+#define GFX_ABLENK_EIN GFX_ABLENK
+#define GFX_ABLENK_AUS GFX_ABLENK
+#define GFX_AMOEBE_NASS 100
+#define GFX_TROPFEN 101
+#define GFX_AMOEBING GFX_TROPFEN
+#define GFX_AMOEBE_LEBT 104
+#define GFX_AMOEBE_NORM GFX_AMOEBE_LEBT
+#define GFX_AMOEBE_TOT 108
+#define GFX_AMOEBA2DIAM GFX_AMOEBE_TOT
/* Zeile 7 (112) */
-#define GFX_BIRNE_AUS 112
-#define GFX_BIRNE_EIN 113
-#define GFX_ZEIT_VOLL 114
-#define GFX_ZEIT_LEER 115
-#define GFX_SPIELER1 116
-#define GFX_SPIELER2 117
-#define GFX_SPIELER3 118
-#define GFX_SPIELER4 119
-#define GFX_AMOEBE_VOLL 120
-#define GFX_AMOEBE_BD GFX_AMOEBE_VOLL
-#define GFX_SOKOBAN_OBJEKT 121
-#define GFX_SOKOBAN_FELD_LEER 122
-#define GFX_SOKOBAN_FELD_VOLL 123
-#define GFX_GEBLUBBER 124
+#define GFX_BIRNE_AUS 112
+#define GFX_BIRNE_EIN 113
+#define GFX_ZEIT_VOLL 114
+#define GFX_ZEIT_LEER 115
+#define GFX_SPIELER1 116
+#define GFX_SPIELER2 117
+#define GFX_SPIELER3 118
+#define GFX_SPIELER4 119
+#define GFX_AMOEBE_VOLL 120
+#define GFX_AMOEBE_BD GFX_AMOEBE_VOLL
+#define GFX_SOKOBAN_OBJEKT 121
+#define GFX_SOKOBAN_FELD_LEER 122
+#define GFX_SOKOBAN_FELD_VOLL 123
+#define GFX_GEBLUBBER 124
/* Zeile 8 (128) */
-#define GFX_MAGIC_WALL_OFF 128
-#define GFX_MAGIC_WALL_EMPTY GFX_MAGIC_WALL_OFF
-#define GFX_MAGIC_WALL_FULL GFX_MAGIC_WALL_OFF
-#define GFX_MAGIC_WALL_DEAD GFX_MAGIC_WALL_OFF
-#define GFX_ERZ_EDEL 132
-#define GFX_ERZ_DIAM 133
-#define GFX_ERZ_EDEL_ROT 134
-#define GFX_ERZ_EDEL_LILA 135
-#define GFX_ERZ_EDEL_GELB 136
-#define GFX_ERZ_EDEL_BD 137
-#define GFX_EDELSTEIN_GELB 138
-#define GFX_KUGEL_ROT 140
-#define GFX_KUGEL_BLAU 141
-#define GFX_KUGEL_GELB 142
-#define GFX_KUGEL_GRAU 143
+#define GFX_MAGIC_WALL_OFF 128
+#define GFX_MAGIC_WALL_EMPTY GFX_MAGIC_WALL_OFF
+#define GFX_MAGIC_WALL_FULL GFX_MAGIC_WALL_OFF
+#define GFX_MAGIC_WALL_DEAD GFX_MAGIC_WALL_OFF
+#define GFX_ERZ_EDEL 132
+#define GFX_ERZ_DIAM 133
+#define GFX_ERZ_EDEL_ROT 134
+#define GFX_ERZ_EDEL_LILA 135
+#define GFX_ERZ_EDEL_GELB 136
+#define GFX_ERZ_EDEL_BD 137
+#define GFX_EDELSTEIN_GELB 138
+#define GFX_KUGEL_ROT 140
+#define GFX_KUGEL_BLAU 141
+#define GFX_KUGEL_GELB 142
+#define GFX_KUGEL_GRAU 143
/* Zeile 9 (144) */
-#define GFX_PINGUIN 144
-#define GFX_MOLE 145
-#define GFX_SCHWEIN 146
-#define GFX_DRACHE 147
-#define GFX_MAUER_XY 148
-#define GFX_MAUER_X 149
-#define GFX_MAUER_Y 150
-#define GFX_EDELSTEIN_ROT 152
-#define GFX_EDELSTEIN_LILA 154
-#define GFX_DYNABOMB_XL 156
-#define GFX_BLACK_ORB 157
-#define GFX_SPEED_PILL 158
-#define GFX_SONDE 159
+#define GFX_PINGUIN 144
+#define GFX_MOLE 145
+#define GFX_SCHWEIN 146
+#define GFX_DRACHE 147
+#define GFX_MAUER_XY 148
+#define GFX_MAUER_X 149
+#define GFX_MAUER_Y 150
+#define GFX_EDELSTEIN_ROT 152
+#define GFX_EDELSTEIN_LILA 154
+#define GFX_DYNABOMB_XL 156
+#define GFX_BLACK_ORB 157
+#define GFX_SPEED_PILL 158
+#define GFX_SONDE 159
/* Zeile 10 (160) */
-#define GFX_EDELSTEIN_BD 163
-#define GFX_MAUER_RIGHT 165
-#define GFX_MAUER_R1 GFX_MAUER_RIGHT
-#define GFX_MAUER_R 167
-#define GFX_MAUER_LEFT 168
-#define GFX_MAUER_L1 GFX_MAUER_LEFT
-#define GFX_MAUER_L 170
-#define GFX_MAUER_LEBT 171
-#define GFX_MAGIC_WALL_BD_OFF 172
-#define GFX_MAGIC_WALL_BD_EMPTY GFX_MAGIC_WALL_BD_OFF
-#define GFX_MAGIC_WALL_BD_FULL GFX_MAGIC_WALL_BD_OFF
-#define GFX_MAGIC_WALL_BD_DEAD GFX_MAGIC_WALL_BD_OFF
+#define GFX_EDELSTEIN_BD 163
+#define GFX_MAUER_RIGHT 165
+#define GFX_MAUER_R1 GFX_MAUER_RIGHT
+#define GFX_MAUER_R 167
+#define GFX_MAUER_LEFT 168
+#define GFX_MAUER_L1 GFX_MAUER_LEFT
+#define GFX_MAUER_L 170
+#define GFX_MAUER_LEBT 171
+#define GFX_MAGIC_WALL_BD_OFF 172
+#define GFX_MAGIC_WALL_BD_EMPTY GFX_MAGIC_WALL_BD_OFF
+#define GFX_MAGIC_WALL_BD_FULL GFX_MAGIC_WALL_BD_OFF
+#define GFX_MAGIC_WALL_BD_DEAD GFX_MAGIC_WALL_BD_OFF
/* Zeile 11 (176) */
-#define GFX_AUSGANG_ZU 176
-#define GFX_AUSGANG_ACT 177
-#define GFX_AUSGANG_AUF 180
-#define GFX_MAMPFER2 184
-#define GFX_DYNABOMB 188
-#define GFX_DYNABOMB_NR 188
-#define GFX_DYNABOMB_SZ 191
+#define GFX_AUSGANG_ZU 176
+#define GFX_AUSGANG_ACT 177
+#define GFX_AUSGANG_AUF 180
+#define GFX_MAMPFER2 184
+#define GFX_DYNABOMB 188
+#define GFX_DYNABOMB_NR 188
+#define GFX_DYNABOMB_SZ 191
/* Zeile 12 (192) */
-#define GFX_PFEIL_LEFT 192
-#define GFX_PFEIL_RIGHT 193
-#define GFX_PFEIL_UP 194
-#define GFX_PFEIL_DOWN 195
-#define GFX_BUTTERFLY 196
-#define GFX_FIREFLY 198
-#define GFX_BUTTERFLY_RIGHT 200
-#define GFX_BUTTERFLY_UP 201
-#define GFX_BUTTERFLY_LEFT 202
-#define GFX_BUTTERFLY_DOWN 203
-#define GFX_FIREFLY_RIGHT 204
-#define GFX_FIREFLY_UP 205
-#define GFX_FIREFLY_LEFT 206
-#define GFX_FIREFLY_DOWN 207
+#define GFX_PFEIL_LEFT 192
+#define GFX_PFEIL_RIGHT 193
+#define GFX_PFEIL_UP 194
+#define GFX_PFEIL_DOWN 195
+#define GFX_BUTTERFLY 196
+#define GFX_FIREFLY 198
+#define GFX_BUTTERFLY_RIGHT 200
+#define GFX_BUTTERFLY_UP 201
+#define GFX_BUTTERFLY_LEFT 202
+#define GFX_BUTTERFLY_DOWN 203
+#define GFX_FIREFLY_RIGHT 204
+#define GFX_FIREFLY_UP 205
+#define GFX_FIREFLY_LEFT 206
+#define GFX_FIREFLY_DOWN 207
/* only available as size MINI_TILE */
-#define GFX_VSTEEL_UPPER_LEFT 208
-#define GFX_VSTEEL_UPPER_RIGHT 209
-#define GFX_VSTEEL_LOWER_LEFT 210
-#define GFX_VSTEEL_LOWER_RIGHT 211
-#define GFX_VSTEEL_HORIZONTAL 212
-#define GFX_VSTEEL_VERTICAL 213
-#define GFX_ISTEEL_UPPER_LEFT 214
-#define GFX_ISTEEL_UPPER_RIGHT 215
-#define GFX_ISTEEL_LOWER_LEFT 216
-#define GFX_ISTEEL_LOWER_RIGHT 217
-#define GFX_ISTEEL_HORIZONTAL 218
-#define GFX_ISTEEL_VERTICAL 219
+#define GFX_VSTEEL_UPPER_LEFT 208
+#define GFX_VSTEEL_UPPER_RIGHT 209
+#define GFX_VSTEEL_LOWER_LEFT 210
+#define GFX_VSTEEL_LOWER_RIGHT 211
+#define GFX_VSTEEL_HORIZONTAL 212
+#define GFX_VSTEEL_VERTICAL 213
+#define GFX_ISTEEL_UPPER_LEFT 214
+#define GFX_ISTEEL_UPPER_RIGHT 215
+#define GFX_ISTEEL_LOWER_LEFT 216
+#define GFX_ISTEEL_LOWER_RIGHT 217
+#define GFX_ISTEEL_HORIZONTAL 218
+#define GFX_ISTEEL_VERTICAL 219
/* elements with graphics borrowed from other elements */
-#define GFX_SCHLUESSEL GFX_SCHLUESSEL1
-#define GFX_SPIELFIGUR GFX_SPIELER1
+#define GFX_SCHLUESSEL GFX_SCHLUESSEL1
+#define GFX_SPIELFIGUR GFX_SPIELER1
/* graphics from "RocksHeroes" */
#define GFX_SPIELER1_DOWN (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 0)
#define NUM_SOUNDS 55
-/* values for sound effects */
-#define SND_BD_EMPTY_SPACE_DIGGING 0
-#define SND_BD_SAND_DIGGING 1
-#define SND_BD_DIAMOND_COLLECTING 2
-#define SND_BD_DIAMOND_IMPACT 3
-#define SND_BD_ROCK_PUSHING 4
-#define SND_BD_ROCK_IMPACT 5
-#define SND_BD_MAGIC_WALL_ACTIVATING 6
-#define SND_BD_MAGIC_WALL_CHANGING 7
-#define SND_BD_MAGIC_WALL_RUNNING 8
-#define SND_BD_AMOEBA_WAITING 9
-#define SND_BD_AMOEBA_CREATING 10
-#define SND_BD_AMOEBA_TURNING_TO_GEM 11
-#define SND_BD_AMOEBA_TURNING_TO_ROCK 12
-#define SND_BD_BUTTERFLY_MOVING 13
-#define SND_BD_BUTTERFLY_WAITING 14
-#define SND_BD_FIREFLY_MOVING 15
-#define SND_BD_FIREFLY_WAITING 16
-#define SND_BD_EXIT_ENTERING 17
-#define SND_SP_EMPTY_SPACE_DIGGING 18
-#define SND_SP_BASE_DIGGING 19
-#define SND_SP_BUGGY_BASE_DIGGING 20
-#define SND_SP_BUGGY_BASE_ACTIVATING 21
-#define SND_SP_INFOTRON_COLLECTING 22
-#define SND_SP_INFOTRON_IMPACT 23
-#define SND_SP_ZONK_PUSHING 24
-#define SND_SP_ZONK_IMPACT 25
-#define SND_SP_DISK_RED_COLLECTING 26
-#define SND_SP_DISK_ORANGE_PUSHING 27
-#define SND_SP_DISK_YELLOW_PUSHING 28
-#define SND_SP_PORT_PASSING 29
-#define SND_SP_EXIT_ENTERING 30
-#define SND_SP_ELEMENT_EXPLODING 31
-#define SND_SP_SNIKSNAK_MOVING 32
-#define SND_SP_SNIKSNAK_WAITING 33
-#define SND_SP_ELECTRON_MOVING 34
-#define SND_SP_ELECTRON_WAITING 35
-#define SND_SP_TERMINAL_ACTIVATING 36
-#define SND_SOKOBAN_OBJECT_PUSHING 37
-#define SND_SOKOBAN_FIELD_FILLING 38
-#define SND_SOKOBAN_FIELD_CLEARING 39
-#define SND_SOKOBAN_GAME_SOLVING 40
-#define SND_EMPTY_SPACE_DIGGING 41
-#define SND_SAND_DIGGING 42
-#define SND_EMERALD_COLLECTING 43
-#define SND_EMERALD_IMPACT 44
-#define SND_DIAMOND_COLLECTING 45
-#define SND_DIAMOND_IMPACT 46
-#define SND_DIAMOND_BREAKING 47
-#define SND_ROCK_PUSHING 48
-#define SND_ROCK_IMPACT 49
-#define SND_BOMB_PUSHING 50
-#define SND_NUT_PUSHING 51
-#define SND_NUT_CRACKING 52
-#define SND_NUT_IMPACT 53
-#define SND_DYNAMITE_COLLECTING 54
-#define SND_DYNAMITE_PLACING 55
-#define SND_DYNAMITE_BURNING 56
-#define SND_KEY_COLLECTING 57
-#define SND_GATE_PASSING 58
-#define SND_BUG_MOVING 59
-#define SND_BUG_WAITING 60
-#define SND_SPACESHIP_MOVING 61
-#define SND_SPACESHIP_WAITING 62
-#define SND_YAMYAM_MOVING 63
-#define SND_YAMYAM_WAITING 64
-#define SND_YAMYAM_EATING_DIAMOND 65
-#define SND_ROBOT_STEPPING 66
-#define SND_ROBOT_WAITING 67
-#define SND_ROBOT_WHEEL_ACTIVATING 68
-#define SND_ROBOT_WHEEL_RUNNING 69
-#define SND_MAGIC_WALL_ACTIVATING 70
-#define SND_MAGIC_WALL_CHANGING 71
-#define SND_MAGIC_WALL_RUNNING 72
-#define SND_AMOEBA_WAITING 73
-#define SND_AMOEBA_CREATING 74
-#define SND_AMOEBA_DROPPING 75
-#define SND_ACID_SPLASHING 76
-#define SND_QUICKSAND_FILLING 77
-#define SND_QUICKSAND_SLIPPING_THROUGH 78
-#define SND_QUICKSAND_EMPTYING 79
-#define SND_EXIT_OPENING 80
-#define SND_EXIT_ENTERING 81
-#define SND_BALLOON_MOVING 82
-#define SND_BALLOON_WAITING 83
-#define SND_BALLOON_PUSHING 84
-#define SND_BALLOON_SWITCH_ACTIVATING 85
-#define SND_SPRING_MOVING 86
-#define SND_SPRING_PUSHING 87
-#define SND_SPRING_IMPACT 88
-#define SND_WALL_GROWING 89
-#define SND_PEARL_COLLECTING 90
-#define SND_PEARL_BREAKING 91
-#define SND_PEARL_IMPACT 92
-#define SND_CRYSTAL_COLLECTING 93
-#define SND_CRYSTAL_IMPACT 94
-#define SND_ENVELOPE_COLLECTING 95
-#define SND_SAND_INVISIBLE_DIGGING 96
-#define SND_SHIELD_PASSIVE_COLLECTING 97
-#define SND_SHIELD_PASSIVE_ACTIVATED 98
-#define SND_SHIELD_ACTIVE_COLLECTING 99
-#define SND_SHIELD_ACTIVE_ACTIVATED 100
-#define SND_EXTRA_TIME_COLLECTING 101
-#define SND_MOLE_MOVING 102
-#define SND_MOLE_WAITING 103
-#define SND_MOLE_EATING_AMOEBA 104
-#define SND_SWITCHGATE_SWITCH_ACTIVATING 105
-#define SND_SWITCHGATE_OPENING 106
-#define SND_SWITCHGATE_CLOSING 107
-#define SND_SWITCHGATE_PASSING 108
-#define SND_TIMEGATE_WHEEL_ACTIVATING 109
-#define SND_TIMEGATE_WHEEL_RUNNING 110
-#define SND_TIMEGATE_OPENING 111
-#define SND_TIMEGATE_CLOSING 112
-#define SND_TIMEGATE_PASSING 113
-#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING 114
-#define SND_CONVEYOR_BELT_RUNNING 115
-#define SND_LIGHT_SWITCH_ACTIVATING 116
-#define SND_LIGHT_SWITCH_DEACTIVATING 117
-#define SND_DX_BOMB_PUSHING 118
-#define SND_TRAP_INACTIVE_DIGGING 119
-#define SND_TRAP_ACTIVATING 120
-#define SND_TUBE_PASSING 121
-#define SND_AMOEBA_TURNING_TO_GEM 122
-#define SND_AMOEBA_TURNING_TO_ROCK 123
-#define SND_SPEED_PILL_COLLECTING 124
-#define SND_DYNABOMB_NR_COLLECTING 125
-#define SND_DYNABOMB_SZ_COLLECTING 126
-#define SND_DYNABOMB_XL_COLLECTING 127
-#define SND_DYNABOMB_PLACING 128
-#define SND_DYNABOMB_BURNING 129
-#define SND_SATELLITE_MOVING 130
-#define SND_SATELLITE_WAITING 131
-#define SND_SATELLITE_PUSHING 132
-#define SND_LAMP_ACTIVATING 133
-#define SND_LAMP_DEACTIVATING 134
-#define SND_TIME_ORB_FULL_COLLECTING 135
-#define SND_TIME_ORB_FULL_IMPACT 136
-#define SND_TIME_ORB_EMPTY_PUSHING 137
-#define SND_TIME_ORB_EMPTY_IMPACT 138
-#define SND_GAMEOFLIFE_WAITING 139
-#define SND_GAMEOFLIFE_CREATING 140
-#define SND_BIOMAZE_WAITING 141
-#define SND_BIOMAZE_CREATING 142
-#define SND_PACMAN_MOVING 143
-#define SND_PACMAN_WAITING 144
-#define SND_PACMAN_EATING_AMOEBA 145
-#define SND_DARK_YAMYAM_MOVING 146
-#define SND_DARK_YAMYAM_WAITING 147
-#define SND_DARK_YAMYAM_EATING_ANY 148
-#define SND_PENGUIN_MOVING 149
-#define SND_PENGUIN_WAITING 150
-#define SND_PENGUIN_ENTERING_EXIT 151
-#define SND_PIG_MOVING 152
-#define SND_PIG_WAITING 153
-#define SND_PIG_EATING_GEM 154
-#define SND_DRAGON_MOVING 155
-#define SND_DRAGON_WAITING 156
-#define SND_DRAGON_ATTACKING 157
-#define SND_PLAYER_DYING 158
-#define SND_ELEMENT_EXPLODING 159
-#define SND_GAME_STARTING 160
-#define SND_GAME_RUNNING_OUT_OF_TIME 161
-#define SND_GAME_LEVELTIME_BONUS 162
-#define SND_GAME_LOSING 163
-#define SND_GAME_WINNING 164
-#define SND_MENU_DOOR_OPENING 165
-#define SND_MENU_DOOR_CLOSING 166
-#define SND_MENU_HALL_OF_FAME 167
-#define SND_MENU_INFO_SCREEN 168
-
-#define NUM_SOUND_EFFECTS 169
+/* values for animation action types */
+#define GFX_ACTION_DEFAULT 0
+#define GFX_ACTION_WAITING 1
+#define GFX_ACTION_FALLING 2
+#define GFX_ACTION_MOVING 3
+#define GFX_ACTION_DIGGING 4
+#define GFX_ACTION_SNAPPING 5
+#define GFX_ACTION_COLLECTING 6
+#define GFX_ACTION_PUSHING 7
+#define GFX_ACTION_PASSING 8
+#define GFX_ACTION_IMPACT 9
+#define GFX_ACTION_CRACKING 10
+#define GFX_ACTION_ACTIVATING 11
+#define GFX_ACTION_EATING 12
+#define GFX_ACTION_ATTACKING 13
+#define GFX_ACTION_GROWING 14
+#define GFX_ACTION_OTHER 15
+
+#define NUM_GFX_ACTIONS 16
+#define NUM_GFX_ACTIONS_MAPPED 8
+
+
+/* values for image configuration suffixes */
+#define GFX_ARG_XPOS 0
+#define GFX_ARG_YPOS 1
+#define GFX_ARG_OFFSET 2
+#define GFX_ARG_VERTICAL 3
+#define GFX_ARG_FRAMES 4
+#define GFX_ARG_START_FRAME 5
+#define GFX_ARG_DELAY 6
+#define GFX_ARG_MODE_LOOP 7
+#define GFX_ARG_MODE_LINEAR 8
+#define GFX_ARG_MODE_PINGPONG 9
+#define GFX_ARG_MODE_PINGPONG2 10
+#define GFX_ARG_MODE_REVERSE 11
+#define GFX_ARG_GLOBAL_SYNC 12
+
+/* values for sound configuration suffixes */
+/* (currently none) */
/* values for game_status */
#define PROGRAM_VERSION_MAJOR 2
#define PROGRAM_VERSION_MINOR 1
-#define PROGRAM_VERSION_PATCH 1
-#define PROGRAM_VERSION_STRING "2.1.1"
+#define PROGRAM_VERSION_PATCH 2
+#define PROGRAM_VERSION_STRING "2.1.2"
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
PROGRAM_VERSION_MINOR, \
PROGRAM_VERSION_PATCH)
-/* for DrawGraphicAnimation() [tools.c] and AnimateToon() [cartoons.c] */
-#define ANIM_NORMAL 0
-#define ANIM_OSCILLATE 1
-#define ANIM_REVERSE 2
-
/* values for game_emulation */
#define EMU_NONE 0
#define EMU_BOULDERDASH 1
#define EMU_SOKOBAN 2
#define EMU_SUPAPLEX 3
+struct HiScore
+{
+ char Name[MAX_PLAYER_NAME_LEN + 1];
+ int Score;
+};
+
+struct PlayerInfo
+{
+ boolean present; /* player present in level playfield */
+ boolean connected; /* player connected (locally or via network) */
+ boolean active; /* player (present && connected) */
+
+ int index_nr, client_nr, element_nr;
+
+ byte action; /* action from local input device */
+ byte effective_action; /* action acknowledged from network server
+ or summarized over all configured input
+ devices when in single player mode */
+ byte programmed_action; /* action forced by game itself (like moving
+ through doors); overrides other actions */
+
+ int jx,jy, last_jx,last_jy;
+ int MovDir, MovPos, GfxPos;
+ int Frame;
+
+ boolean Pushing;
+ boolean Switching;
+ boolean LevelSolved, GameOver;
+ boolean snapped;
+
+ int last_move_dir;
+ int is_moving;
+
+ unsigned long move_delay;
+ int move_delay_value;
+
+ unsigned long push_delay;
+ unsigned long push_delay_value;
+
+ int frame_reset_delay;
+
+ unsigned long actual_frame_counter;
+
+ int score;
+ int gems_still_needed;
+ int sokobanfields_still_needed;
+ int lights_still_needed;
+ int friends_still_needed;
+ int key[4];
+ int dynamite;
+ int dynabomb_count, dynabomb_size, dynabombs_left, dynabomb_xl;
+ int shield_normal_time_left;
+ int shield_deadly_time_left;
+};
+
+struct LevelInfo
+{
+ int file_version; /* file format version the level is stored with */
+ int game_version; /* game release version the level was created with */
+
+ boolean encoding_16bit_field; /* level contains 16-bit elements */
+ boolean encoding_16bit_yamyam; /* yamyam contains 16-bit elements */
+ boolean encoding_16bit_amoeba; /* amoeba contains 16-bit elements */
+
+ int fieldx;
+ int fieldy;
+ int time;
+ int gems_needed;
+ char name[MAX_LEVEL_NAME_LEN + 1];
+ char author[MAX_LEVEL_AUTHOR_LEN + 1];
+ int score[LEVEL_SCORE_ELEMENTS];
+ int yam_content[MAX_ELEMENT_CONTENTS][3][3];
+ int num_yam_contents;
+ int amoeba_speed;
+ int amoeba_content;
+ int time_magic_wall;
+ int time_wheel;
+ int time_light;
+ int time_timegate;
+ boolean double_speed;
+ boolean gravity;
+ boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */
+};
+
+struct TapeInfo
+{
+ int file_version; /* file format version the tape is stored with */
+ int game_version; /* game release version the tape was created with */
+ int engine_version; /* game engine version the tape was recorded with */
+
+ int level_nr;
+ unsigned long random_seed;
+ unsigned long date;
+ unsigned long counter;
+ unsigned long length;
+ unsigned long length_seconds;
+ unsigned int delay_played;
+ boolean pause_before_death;
+ boolean recording, playing, pausing;
+ boolean fast_forward;
+ boolean index_search;
+ boolean quick_resume;
+ boolean single_step;
+ boolean changed;
+ boolean player_participates[MAX_PLAYERS];
+ int num_participating_players;
+
+ struct
+ {
+ byte action[MAX_PLAYERS];
+ byte delay;
+ } pos[MAX_TAPELEN];
+};
+
+struct GameInfo
+{
+ /* constant within running game */
+ int engine_version;
+ int emulation;
+ int initial_move_delay;
+ int initial_move_delay_value;
+
+ /* variable within running game */
+ int yam_content_nr;
+ boolean magic_wall_active;
+ int magic_wall_time_left;
+ int light_time_left;
+ int timegate_time_left;
+ int belt_dir[4];
+ int belt_dir_nr[4];
+ int switchgate_pos;
+ int balloon_dir;
+ boolean explosions_delayed;
+};
+
+struct GlobalInfo
+{
+ float frames_per_second;
+ boolean fps_slowdown;
+ int fps_slowdown_factor;
+};
+
+struct ElementInfo
+{
+ char *sound_class_name; /* classification for custom sound effects */
+ char *editor_description; /* short description for level editor */
+
+ /* default graphics for several actions */
+ int graphic[NUM_GFX_ACTIONS_MAPPED];
+
+ /* special graphics for left/right/up/down */
+ int direction_graphic[NUM_GFX_ACTIONS_MAPPED][NUM_MV_DIRECTIONS];
+};
+
+struct GraphicInfo
+{
+ Bitmap *bitmap;
+ int src_x, src_y;
+};
+
+struct NewGraphicInfo
+{
+ Bitmap *bitmap;
+ int src_x, src_y; /* derived from (tile sized) .xpos/.ypos */
+ int offset_x, offset_y; /* x/y offset to next animation frame */
+ int anim_frames;
+ int anim_start_frame;
+ int anim_delay; /* important: delay of 1 means "no delay"! */
+ int anim_mode;
+ boolean anim_global_sync;
+};
+
+extern GC tile_clip_gc;
+extern Bitmap *pix[];
+extern Pixmap tile_clipmask[];
+extern DrawBuffer *fieldbuffer;
+extern DrawBuffer *drawto_field;
+
+extern int game_status;
+extern boolean level_editor_test_game;
+extern boolean network_playing;
+
+extern int key_joystick_mapping;
+
+extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+extern int redraw_x1, redraw_y1;
+
+extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
+extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern unsigned long Elementeigenschaften1[MAX_ELEMENTS];
+extern unsigned long Elementeigenschaften2[MAX_ELEMENTS];
+
+extern int lev_fieldx,lev_fieldy, scroll_x,scroll_y;
+
+extern int FX,FY, ScrollStepSize;
+extern int ScreenMovDir, ScreenMovPos, ScreenGfxPos;
+extern int BorderElement;
+extern int GameFrameDelay;
+extern int FfwdFrameDelay;
+extern int BX1,BY1, BX2,BY2;
+extern int SBX_Left, SBX_Right;
+extern int SBY_Upper, SBY_Lower;
+extern int ZX,ZY, ExitX,ExitY;
+extern int AllPlayersGone;
+
+extern int TimeFrames, TimePlayed, TimeLeft;
+extern boolean SiebAktiv;
+extern int SiebCount;
+
+extern boolean network_player_action_received;
+
+extern int graphics_action_mapping[];
+
+extern struct LevelInfo level;
+extern struct PlayerInfo stored_player[], *local_player;
+extern struct HiScore highscore[];
+extern struct TapeInfo tape;
+extern struct GameInfo game;
+extern struct GlobalInfo global;
+extern struct ElementInfo element_info[];
+extern struct GraphicInfo graphic_info[];
+extern struct NewGraphicInfo new_graphic_info[];
+extern struct ConfigInfo image_config[], sound_config[];
+extern struct ConfigInfo image_config_suffix[], sound_config_suffix[];
+extern struct FileInfo *image_files, *sound_files;
+
#endif /* MAIN_H */