#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#ifndef MSDOS
#define XK_MISCELLANY
typedef unsigned char byte;
#ifndef FALSE
-#define FALSE 0
-#define TRUE (!FALSE)
+#define FALSE 0
+#define TRUE (!FALSE)
#endif
#define WIN_XSIZE 672
#define SCR_FIELDY 17
#define MAX_BUF_XSIZE (SCR_FIELDX + 2)
#define MAX_BUF_YSIZE (SCR_FIELDY + 2)
-
-#define MIN_LEV_FIELDX (SCR_FIELDX - 2)
-#define MIN_LEV_FIELDY (SCR_FIELDY - 2)
+#define MIN_LEV_FIELDX 3
+#define MIN_LEV_FIELDY 3
#define STD_LEV_FIELDX 64
#define STD_LEV_FIELDY 32
#define MAX_LEV_FIELDX 128
#define IN_SCR_FIELD(x,y) ((x)>=BX1 && (x)<=BX2 && (y)>=BY1 &&(y)<=BY2)
#define IN_LEV_FIELD(x,y) ((x)>=0 && (x)<lev_fieldx && (y)>=0 &&(y)<lev_fieldy)
-#define EP_BIT_AMOEBALIVE (1<<0)
-#define EP_BIT_AMOEBOID (1<<1)
-#define EP_BIT_SCHLUESSEL (1<<2)
-#define EP_BIT_PFORTE (1<<3)
-#define EP_BIT_SOLID (1<<4)
-#define EP_BIT_MASSIV (1<<5)
-#define EP_BIT_SLIPPERY (1<<6)
-#define EP_BIT_ENEMY (1<<7)
-#define EP_BIT_MAUER (1<<8)
-#define EP_BIT_CAN_FALL (1<<9)
-#define EP_BIT_CAN_SMASH (1<<10)
-#define EP_BIT_CAN_CHANGE (1<<11)
-#define EP_BIT_CAN_MOVE (1<<12)
-#define EP_BIT_COULD_MOVE (1<<13)
-#define EP_BIT_DONT_TOUCH (1<<14)
-#define EP_BIT_DONT_GO_TO (1<<15)
-#define EP_BIT_MAMPF2 (1<<16)
-#define EP_BIT_CHAR (1<<17)
-#define EP_BIT_BD_ELEMENT (1<<18)
-#define EP_BIT_SB_ELEMENT (1<<19)
-#define EP_BIT_GEM (1<<20)
-#define EP_BIT_INACTIVE (1<<21)
-#define EP_BIT_EXPLOSIVE (1<<22)
-#define EP_BIT_MAMPF3 (1<<23)
-#define EP_BIT_PUSHABLE (1<<24)
-#define EP_BIT_PLAYER (1<<25)
-
-#define IS_AMOEBALIVE(e) (Elementeigenschaften[e] & EP_BIT_AMOEBALIVE)
-#define IS_AMOEBOID(e) (Elementeigenschaften[e] & EP_BIT_AMOEBOID)
-#define IS_SCHLUESSEL(e) (Elementeigenschaften[e] & EP_BIT_SCHLUESSEL)
-#define IS_PFORTE(e) (Elementeigenschaften[e] & EP_BIT_PFORTE)
-#define IS_SOLID(e) (Elementeigenschaften[e] & EP_BIT_SOLID)
-#define IS_MASSIV(e) (Elementeigenschaften[e] & EP_BIT_MASSIV)
-#define IS_SLIPPERY(e) (Elementeigenschaften[e] & EP_BIT_SLIPPERY)
-#define IS_ENEMY(e) (Elementeigenschaften[e] & EP_BIT_ENEMY)
-#define IS_MAUER(e) (Elementeigenschaften[e] & EP_BIT_MAUER)
-#define CAN_FALL(e) (Elementeigenschaften[e] & EP_BIT_CAN_FALL)
-#define CAN_SMASH(e) (Elementeigenschaften[e] & EP_BIT_CAN_SMASH)
-#define CAN_CHANGE(e) (Elementeigenschaften[e] & EP_BIT_CAN_CHANGE)
-#define CAN_MOVE(e) (Elementeigenschaften[e] & EP_BIT_CAN_MOVE)
-#define COULD_MOVE(e) (Elementeigenschaften[e] & EP_BIT_COULD_MOVE)
-#define DONT_TOUCH(e) (Elementeigenschaften[e] & EP_BIT_DONT_TOUCH)
-#define DONT_GO_TO(e) (Elementeigenschaften[e] & EP_BIT_DONT_GO_TO)
-#define IS_MAMPF2(e) (Elementeigenschaften[e] & EP_BIT_MAMPF2)
-#define IS_CHAR(e) (Elementeigenschaften[e] & EP_BIT_CHAR)
-#define IS_BD_ELEMENT(e) (Elementeigenschaften[e] & EP_BIT_BD_ELEMENT)
-#define IS_SB_ELEMENT(e) (Elementeigenschaften[e] & EP_BIT_SB_ELEMENT)
-#define IS_GEM(e) (Elementeigenschaften[e] & EP_BIT_GEM)
-#define IS_INACTIVE(e) (Elementeigenschaften[e] & EP_BIT_INACTIVE)
-#define IS_EXPLOSIVE(e) (Elementeigenschaften[e] & EP_BIT_EXPLOSIVE)
-#define IS_MAMPF3(e) (Elementeigenschaften[e] & EP_BIT_MAMPF3)
-#define IS_PUSHABLE(e) (Elementeigenschaften[e] & EP_BIT_PUSHABLE)
-#define ELEM_IS_PLAYER(e) (Elementeigenschaften[e] & EP_BIT_PLAYER)
+/* values for 'Elementeigenschaften1' */
+#define EP_BIT_AMOEBALIVE (1 << 0)
+#define EP_BIT_AMOEBOID (1 << 1)
+#define EP_BIT_SCHLUESSEL (1 << 2)
+#define EP_BIT_PFORTE (1 << 3)
+#define EP_BIT_SOLID (1 << 4)
+#define EP_BIT_MASSIVE (1 << 5)
+#define EP_BIT_SLIPPERY (1 << 6)
+#define EP_BIT_ENEMY (1 << 7)
+#define EP_BIT_MAUER (1 << 8)
+#define EP_BIT_CAN_FALL (1 << 9)
+#define EP_BIT_CAN_SMASH (1 << 10)
+#define EP_BIT_CAN_CHANGE (1 << 11)
+#define EP_BIT_CAN_MOVE (1 << 12)
+#define EP_BIT_COULD_MOVE (1 << 13)
+#define EP_BIT_DONT_TOUCH (1 << 14)
+#define EP_BIT_DONT_GO_TO (1 << 15)
+#define EP_BIT_MAMPF2 (1 << 16)
+#define EP_BIT_CHAR (1 << 17)
+#define EP_BIT_BD_ELEMENT (1 << 18)
+#define EP_BIT_SB_ELEMENT (1 << 19)
+#define EP_BIT_GEM (1 << 20)
+#define EP_BIT_INACTIVE (1 << 21)
+#define EP_BIT_EXPLOSIVE (1 << 22)
+#define EP_BIT_MAMPF3 (1 << 23)
+#define EP_BIT_PUSHABLE (1 << 24)
+#define EP_BIT_PLAYER (1 << 25)
+#define EP_BIT_HAS_CONTENT (1 << 26)
+#define EP_BIT_EATABLE (1 << 27)
+#define EP_BIT_SP_ELEMENT (1 << 28)
+#define EP_BIT_QUICK_GATE (1 << 29)
+#define EP_BIT_OVER_PLAYER (1 << 30)
+#define EP_BIT_ACTIVE_BOMB (1 << 31)
+
+/* values for 'Elementeigenschaften2' */
+#define EP_BIT_BELT (1 << 0)
+#define EP_BIT_BELT_SWITCH (1 << 1)
+
+#define IS_AMOEBALIVE(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBALIVE)
+#define IS_AMOEBOID(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBOID)
+#define IS_SCHLUESSEL(e) (Elementeigenschaften1[e] & EP_BIT_SCHLUESSEL)
+#define IS_PFORTE(e) (Elementeigenschaften1[e] & EP_BIT_PFORTE)
+#define IS_SOLID(e) (Elementeigenschaften1[e] & EP_BIT_SOLID)
+#define IS_MASSIVE(e) (Elementeigenschaften1[e] & EP_BIT_MASSIVE)
+#define IS_SLIPPERY(e) (Elementeigenschaften1[e] & EP_BIT_SLIPPERY)
+#define IS_ENEMY(e) (Elementeigenschaften1[e] & EP_BIT_ENEMY)
+#define IS_MAUER(e) (Elementeigenschaften1[e] & EP_BIT_MAUER)
+#define CAN_FALL(e) (Elementeigenschaften1[e] & EP_BIT_CAN_FALL)
+#define CAN_SMASH(e) (Elementeigenschaften1[e] & EP_BIT_CAN_SMASH)
+#define CAN_CHANGE(e) (Elementeigenschaften1[e] & EP_BIT_CAN_CHANGE)
+#define CAN_MOVE(e) (Elementeigenschaften1[e] & EP_BIT_CAN_MOVE)
+#define COULD_MOVE(e) (Elementeigenschaften1[e] & EP_BIT_COULD_MOVE)
+#define DONT_TOUCH(e) (Elementeigenschaften1[e] & EP_BIT_DONT_TOUCH)
+#define DONT_GO_TO(e) (Elementeigenschaften1[e] & EP_BIT_DONT_GO_TO)
+#define IS_MAMPF2(e) (Elementeigenschaften1[e] & EP_BIT_MAMPF2)
+#define IS_CHAR(e) (Elementeigenschaften1[e] & EP_BIT_CHAR)
+#define IS_BD_ELEMENT(e) (Elementeigenschaften1[e] & EP_BIT_BD_ELEMENT)
+#define IS_SB_ELEMENT(e) (Elementeigenschaften1[e] & EP_BIT_SB_ELEMENT)
+#define IS_GEM(e) (Elementeigenschaften1[e] & EP_BIT_GEM)
+#define IS_INACTIVE(e) (Elementeigenschaften1[e] & EP_BIT_INACTIVE)
+#define IS_EXPLOSIVE(e) (Elementeigenschaften1[e] & EP_BIT_EXPLOSIVE)
+#define IS_MAMPF3(e) (Elementeigenschaften1[e] & EP_BIT_MAMPF3)
+#define IS_PUSHABLE(e) (Elementeigenschaften1[e] & EP_BIT_PUSHABLE)
+#define ELEM_IS_PLAYER(e) (Elementeigenschaften1[e] & EP_BIT_PLAYER)
+#define HAS_CONTENT(e) (Elementeigenschaften1[e] & EP_BIT_HAS_CONTENT)
+#define IS_EATABLE(e) (Elementeigenschaften1[e] & EP_BIT_EATABLE)
+#define IS_SP_ELEMENT(e) (Elementeigenschaften1[e] & EP_BIT_SP_ELEMENT)
+#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_SWITCH(e) (Elementeigenschaften2[e] & EP_BIT_BELT_SWITCH)
#define IS_PLAYER(x,y) (ELEM_IS_PLAYER(StorePlayer[x][y]))
#define IS_FREE_OR_PLAYER(x,y) (Feld[x][y] == EL_LEERRAUM)
#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 : \
EL_FELSBROCKEN)
#define IS_DRAWABLE(e) ((e) < EL_BLOCKED)
#define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED)
-#define TIMESIZE (TimeLeft * 100 / level.time)
#define TAPE_IS_EMPTY(x) ((x).length == 0)
#define TAPE_IS_STOPPED(x) (!(x).recording && !(x).playing &&!(x).pausing)
#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_SPIELER1])
+#define SHIELD_ON(p) ((p)->shield_passive_time_left > 0)
-/* Pixmaps with Xpm or X11 Bitmap files */
+/* Pixmaps with graphic file */
#define PIX_BACK 0
#define PIX_DOOR 1
#define PIX_HEROES 2
#define PIX_TOONS 3
-#define PIX_BIGFONT 4
-#define PIX_SMALLFONT 5
-/* Pixmaps without them */
-#define PIX_DB_BACK 6
-#define PIX_DB_DOOR 7
-#define PIX_DB_FIELD 8
-
-#define NUM_PICTURES 6
-#define NUM_PIXMAPS 9
+#define PIX_SP 4
+#define PIX_DC 5
+#define PIX_BIGFONT 6
+#define PIX_SMALLFONT 7
+#define PIX_MEDIUMFONT 8
+/* Pixmaps without graphic file */
+#define PIX_DB_BACK 9
+#define PIX_DB_DOOR 10
+#define PIX_DB_FIELD 11
+
+#define NUM_PICTURES 9
+#define NUM_PIXMAPS 11
/* boundaries of arrays etc. */
-#define MAX_NAMELEN (10+1)
+#define MAX_PLAYER_NAME_LEN 10
+#define MAX_LEVEL_NAME_LEN 32
+#define MAX_LEVEL_AUTHOR_LEN 32
+#define MAX_TAPELEN (1000 * 50) /* max. time * framerate */
+#define MAX_LEVDIR_ENTRIES 250 /* max. level directories */
+#define MAX_SCORE_ENTRIES 100
+#define MAX_ELEMENTS 700 /* 500 static + 200 runtime */
+#define MAX_NUM_AMOEBA 100
-#define MAX_LEVNAMLEN 32
-#define MAX_LEVSCORE_ENTRIES 16
-#define NUM_FREE_LVHD_BYTES 18
-#define MAX_TAPELEN 10000
+/* values for elements with content */
+#define MIN_ELEMENT_CONTENTS 1
+#define STD_ELEMENT_CONTENTS 4
+#define MAX_ELEMENT_CONTENTS 8
-#define MAX_LEVDIR_FILENAME (64+1)
-#define MAX_LEVDIR_NAME (16+1)
-#define MAX_LEVDIR_ENTRIES 15
-#define MAX_SCORE_ENTRIES 100
+#define LEVEL_SCORE_ELEMENTS 16 /* level elements with score */
-#define MAX_OPTION_LEN 256
-#define MAX_FILENAME_LEN 256
-#define MAX_NUM_AMOEBA 100
-#define MAX_ELEMENTS 512
+/* fundamental game speed values */
+#define GAME_FRAME_DELAY 20 /* frame delay in milliseconds */
+#define FFWD_FRAME_DELAY 10 /* 200% speed for fast forward */
+#define FRAMES_PER_SECOND (1000 / GAME_FRAME_DELAY)
+#define GADGET_FRAME_DELAY 150 /* delay between gadget actions */
+#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_NAMELEN];
+ char Name[MAX_PLAYER_NAME_LEN + 1];
int Score;
};
char *display_name;
char *server_host;
int server_port;
- char *base_directory;
+ char *ro_base_directory;
+ char *rw_base_directory;
char *level_directory;
boolean serveronly;
boolean network;
boolean autorecord;
boolean quick_doors;
boolean team_mode;
+ boolean handicap;
+ boolean time_limit;
struct SetupInputInfo input[MAX_PLAYERS];
};
byte effective_action; /* action aknowledged 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 joystick_fd; /* file descriptor of player's joystick */
int Frame;
boolean Pushing;
- boolean gone, LevelSolved, GameOver;
+ boolean Switching;
+ boolean LevelSolved, GameOver;
boolean snapped;
- long move_delay;
+ unsigned long move_delay;
+ int move_delay_value;
+
int last_move_dir;
- long push_delay;
- int push_delay_value;
+ unsigned long push_delay;
+ unsigned long push_delay_value;
int frame_reset_delay;
- long actual_frame_counter;
+ unsigned long actual_frame_counter;
int score;
int gems_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 fieldx;
int fieldy;
int time;
- int edelsteine;
- char name[MAX_LEVNAMLEN];
- int score[MAX_LEVSCORE_ENTRIES];
- int mampfer_inhalt[4][3][3];
- int tempo_amoebe;
- int dauer_sieb;
- int dauer_ablenk;
- int amoebe_inhalt;
+ 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;
};
struct LevelDirInfo
{
- char *filename;
- char *name;
- int levels;
- int sort_priority;
- boolean readonly;
+ char *filename; /* level series sub-directory inside level directory */
+ char *name; /* level series name, as displayed on main screen */
+ char *name_short; /* optional short name for level selection screen */
+ char *name_sorting; /* optional sorting name for correct level sorting */
+ char *author; /* level series author name levels without author */
+ char *imported_from; /* optional comment for imported level series */
+ int levels; /* number of levels in level series */
+ int first_level; /* first level number (to allow start with 0 or 1) */
+ int last_level; /* last level number (automatically calculated) */
+ int sort_priority; /* sort levels by 'sort_priority' and then by name */
+ boolean user_defined; /* user defined levels are stored in home directory */
+ boolean readonly; /* readonly levels can not be changed with editor */
+ int color; /* color to use on selection screen for this level */
+ char *class_desc; /* description of level series class */
+ int handicap_level; /* number of the lowest unsolved level */
};
-struct RecordingInfo
+struct TapeInfo
{
int level_nr;
unsigned long random_seed;
boolean recording, playing, pausing;
boolean fast_forward;
boolean changed;
+ boolean player_participates[MAX_PLAYERS];
struct
{
byte action[MAX_PLAYERS];
} pos[MAX_TAPELEN];
};
+struct GameInfo
+{
+ int emulation;
+ 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;
+};
+
+struct GlobalInfo
+{
+};
+
extern Display *display;
extern Visual *visual;
extern int screen;
extern char *sound_device_name;
extern int joystick_device;
extern char *joystick_device_name[];
-extern int width, height;
extern char *program_name;
extern int game_status;
-extern int game_emulation;
+extern boolean level_editor_test_game;
extern boolean network_playing;
extern int button_status;
extern boolean motion_status;
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 JustHit[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 unsigned long Elementeigenschaften[MAX_ELEMENTS];
+extern unsigned long Elementeigenschaften1[MAX_ELEMENTS];
+extern unsigned long Elementeigenschaften2[MAX_ELEMENTS];
extern int level_nr, leveldir_nr, num_leveldirs;
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 MoveSpeed;
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 FrameCounter, TimeFrames, TimeLeft;
-extern int MampferNr, SiebAktiv;
+extern int FrameCounter, TimeFrames, TimePlayed, TimeLeft;
+extern boolean SiebAktiv;
+extern int SiebCount;
extern boolean network_player_action_received;
-extern int TestPlayer;
extern struct LevelDirInfo leveldir[];
extern struct LevelInfo level;
extern struct PlayerInfo stored_player[], *local_player;
extern struct HiScore highscore[];
-extern struct RecordingInfo tape;
+extern struct TapeInfo tape;
extern struct SoundInfo Sound[];
extern struct JoystickInfo joystick[];
extern struct OptionInfo options;
extern struct SetupInfo setup;
-extern struct SetupFileList *setup_list;
-extern struct SetupFileList *level_setup_list;
+extern struct GameInfo game;
+extern struct GlobalInfo global;
extern char *sound_name[];
extern int background_loop[];
extern int num_bg_loops;
+extern char *element_info[];
/* often used screen positions */
#define SX 8
#define SY 8
-#define REAL_SX (SX-2)
-#define REAL_SY (SY-2)
+#define REAL_SX (SX - 2)
+#define REAL_SY (SY - 2)
#define DX 566
#define DY 60
#define VX DX
#define VY 400
+#define EX DX
+#define EY (VY - 44)
#define TILEX 32
#define TILEY 32
-#define MINI_TILEX (TILEX/2)
-#define MINI_TILEY (TILEY/2)
-#define MICRO_TILEX (TILEX/8)
-#define MICRO_TILEY (TILEY/8)
-#define MIDPOSX (SCR_FIELDX/2)
-#define MIDPOSY (SCR_FIELDY/2)
-#define SXSIZE (SCR_FIELDX*TILEX)
-#define SYSIZE (SCR_FIELDY*TILEY)
-#define FXSIZE ((SCR_FIELDX+2)*TILEX)
-#define FYSIZE ((SCR_FIELDY+2)*TILEY)
+#define MINI_TILEX (TILEX / 2)
+#define MINI_TILEY (TILEY / 2)
+#define MICRO_TILEX (TILEX / 8)
+#define MICRO_TILEY (TILEY / 8)
+#define MIDPOSX (SCR_FIELDX / 2)
+#define MIDPOSY (SCR_FIELDY / 2)
+#define SXSIZE (SCR_FIELDX * TILEX)
+#define SYSIZE (SCR_FIELDY * TILEY)
+#define FXSIZE ((SCR_FIELDX + 2) * TILEX)
+#define FYSIZE ((SCR_FIELDY + 2) * TILEY)
#define DXSIZE 100
#define DYSIZE 280
#define VXSIZE DXSIZE
#define VYSIZE 100
-#define FULL_SXSIZE (2+SXSIZE+2)
-#define FULL_SYSIZE (2+SYSIZE+2)
-#define MICROLEV_XPOS (SX+4*32+16)
-#define MICROLEV_YPOS (SX+12*32)
-#define MICROLEV_XSIZE (STD_LEV_FIELDX*MICRO_TILEX)
-#define MICROLEV_YSIZE (STD_LEV_FIELDY*MICRO_TILEY)
-#define MICROLABEL_YPOS (MICROLEV_YPOS+MICROLEV_YSIZE+12)
+#define EXSIZE DXSIZE
+#define EYSIZE (VXSIZE + 44)
+#define FULL_SXSIZE (2 + SXSIZE + 2)
+#define FULL_SYSIZE (2 + SYSIZE + 2)
+#define MICROLEV_XSIZE ((STD_LEV_FIELDX + 2) * MICRO_TILEX)
+#define MICROLEV_YSIZE ((STD_LEV_FIELDY + 2) * MICRO_TILEY)
+#define MICROLEV_XPOS (SX + (SXSIZE - MICROLEV_XSIZE) / 2)
+#define MICROLEV_YPOS (SX + 12 * TILEY - MICRO_TILEY)
+#define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7)
#define FONT1_XSIZE 32
#define FONT1_YSIZE 32
#define FONT2_XSIZE 14
#define FONT3_YSIZE 14
#define FONT4_XSIZE 16
#define FONT4_YSIZE 16
+#define FONT5_XSIZE 10
+#define FONT5_YSIZE 14
+#define FONT6_XSIZE 16
+#define FONT6_YSIZE 32
#define GFX_STARTX SX
#define GFX_STARTY SY
#define GFX_PER_LINE 16
#define MINI_GFX_PER_LINE 32
#define MICRO_GFX_PER_LINE 128
+
#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 SP_PER_LINE 16
+#define MINI_SP_PER_LINE 16
+#define MICRO_SP_PER_LINE 64
+
+#define MINI_DC_STARTX 256
+#define MINI_DC_STARTY 256
+#define MICRO_DC_STARTX 384
+#define MICRO_DC_STARTY 384
+#define DC_PER_LINE 16
+#define MINI_DC_PER_LINE 16
+#define MICRO_DC_PER_LINE 16
+
#define FONT_CHARS_PER_LINE 16
#define FONT_LINES_PER_FONT 4
/* game elements:
-** 0 - 255: real elements, stored in level file
-** 256 - 511: flag elements, only used at runtime
+** 0 - 499: real elements, stored in level file
+** 500 - 699: flag elements, only used at runtime
*/
/* "real" level elements */
#define EL_LEERRAUM 0
#define EL_MORAST_VOLL 17
#define EL_TROPFEN 18
#define EL_BOMBE 19
-#define EL_SIEB_LEER 20
-#define EL_SIEB_VOLL 21
+#define EL_SIEB_INAKTIV 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_DYNAMIT 28
+#define EL_DYNAMITE_ACTIVE 28
#define EL_BADEWANNE 29
#define EL_ABLENK_AUS 30
#define EL_ABLENK_EIN 31
#define EL_PFORTE2X 41
#define EL_PFORTE3X 42
#define EL_PFORTE4X 43
-#define EL_DYNAMIT_AUS 44
+#define EL_DYNAMITE_INACTIVE 44
#define EL_PACMAN 45
#define EL_UNSICHTBAR 46
#define EL_BIRNE_AUS 47
#define EL_ERZ_EDEL_BD 58
#define EL_ERZ_EDEL_GELB 59
#define EL_MAMPFER2 60
-#define EL_SIEB2_LEER 61
-#define EL_SIEB2_VOLL 62
-#define EL_DYNABOMB 63
+#define EL_SIEB2_INAKTIV 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_R 70
-#define EL_BUTTERFLY_O 71
-#define EL_BUTTERFLY_L 72
-#define EL_BUTTERFLY_U 73
-#define EL_FIREFLY_R 74
-#define EL_FIREFLY_O 75
-#define EL_FIREFLY_L 76
-#define EL_FIREFLY_U 77
-#define EL_BUTTERFLY_1 EL_BUTTERFLY_U
-#define EL_BUTTERFLY_2 EL_BUTTERFLY_L
-#define EL_BUTTERFLY_3 EL_BUTTERFLY_O
-#define EL_BUTTERFLY_4 EL_BUTTERFLY_R
-#define EL_FIREFLY_1 EL_FIREFLY_L
-#define EL_FIREFLY_2 EL_FIREFLY_U
-#define EL_FIREFLY_3 EL_FIREFLY_R
-#define EL_FIREFLY_4 EL_FIREFLY_O
+#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_R 84
-#define EL_KAEFER_O 85
-#define EL_KAEFER_L 86
-#define EL_KAEFER_U 87
-#define EL_FLIEGER_R 88
-#define EL_FLIEGER_O 89
-#define EL_FLIEGER_L 90
-#define EL_FLIEGER_U 91
-#define EL_PACMAN_R 92
-#define EL_PACMAN_O 93
-#define EL_PACMAN_L 94
-#define EL_PACMAN_U 95
+#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_BADEWANNE3 102
#define EL_BADEWANNE4 103
#define EL_BADEWANNE5 104
-#define EL_SIEB_TOT 105
-#define EL_AUSGANG_ACT 106
+
+#define EL_UNUSED_105 105
+#define EL_UNUSED_106 106
+
#define EL_AUSGANG_AUF 107
-#define EL_SIEB2_TOT 108
+
+#define EL_BLACK_ORB 108
+
#define EL_AMOEBA2DIAM 109
-#define EL_MAULWURF 110
+#define EL_MOLE 110
#define EL_PINGUIN 111
#define EL_SONDE 112
-#define EL_PFEIL_L 113
-#define EL_PFEIL_R 114
-#define EL_PFEIL_O 115
-#define EL_PFEIL_U 116
+#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_UNUSED_119 119
+#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_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_UNUSED_200 203
-/* ... */
+#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
-/* "unreal" runtime elements */
-#define EL_BLOCKED 300
-#define EL_EXPLODING 301
-#define EL_CRACKINGNUT 302
-#define EL_BLURB_LEFT 303
-#define EL_BLURB_RIGHT 304
-#define EL_AMOEBING 305
-#define EL_MAUERND 306
-#define EL_BURNING 307
-#define EL_PLAYER_IS_LEAVING 308
+#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
+
+
+/* "real" (and therefore drawable) runtime elements */
+#define EL_FIRST_RUNTIME_EL 500
+
+#define EL_SIEB_LEER 500
+#define EL_SIEB2_LEER 501
+#define EL_SIEB_VOLL 502
+#define EL_SIEB2_VOLL 503
+#define EL_SIEB_TOT 504
+#define EL_SIEB2_TOT 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
+
+/* "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
/* game graphics:
-** 0 - 255: graphics from "RocksScreen"
-** 256 - 511: graphics from "RocksFont"
-** 512 - 767: graphics from "RocksHeroes"
+** 0 - 255: graphics from "RocksScreen"
+** 256 - 511: graphics from "RocksFont"
+** 512 - 767: graphics from "RocksHeroes"
+** 768 - 1023: graphics from "RocksSP"
+** 1024 - 1279: graphics from "RocksDC"
*/
#define GFX_START_ROCKSSCREEN 0
#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 NUM_TILES 768
+#define NUM_TILES 1280
/* graphics from "RocksScreen" */
/* Zeile 0 (0) */
#define GFX_BADEWANNE1 16
#define GFX_SALZSAEURE 17
#define GFX_BADEWANNE2 18
+
+/*
#define GFX_UNSICHTBAR 19
+*/
+
#define GFX_SCHLUESSEL1 20
#define GFX_SCHLUESSEL2 21
#define GFX_SCHLUESSEL3 22
#define GFX_DYNAMIT_AUS 48
#define GFX_DYNAMIT 49
#define GFX_FLIEGER 56
-#define GFX_FLIEGER_R 56
-#define GFX_FLIEGER_O 57
-#define GFX_FLIEGER_L 58
-#define GFX_FLIEGER_U 59
+#define GFX_FLIEGER_RIGHT 56
+#define GFX_FLIEGER_UP 57
+#define GFX_FLIEGER_LEFT 58
+#define GFX_FLIEGER_DOWN 59
/* Zeile 4 (64) */
#define GFX_EXPLOSION 64
#define GFX_KAEFER 72
-#define GFX_KAEFER_R 72
-#define GFX_KAEFER_O 73
-#define GFX_KAEFER_L 74
-#define GFX_KAEFER_U 75
+#define GFX_KAEFER_RIGHT 72
+#define GFX_KAEFER_UP 73
+#define GFX_KAEFER_LEFT 74
+#define GFX_KAEFER_DOWN 75
/* Zeile 5 (80) */
#define GFX_MAMPFER 80
#define GFX_ROBOT 84
#define GFX_PACMAN 88
-#define GFX_PACMAN_R 88
-#define GFX_PACMAN_O 89
-#define GFX_PACMAN_L 90
-#define GFX_PACMAN_U 91
+#define GFX_PACMAN_RIGHT 88
+#define GFX_PACMAN_UP 89
+#define GFX_PACMAN_LEFT 90
+#define GFX_PACMAN_DOWN 91
/* Zeile 6 (96) */
#define GFX_ABLENK 96
#define GFX_ABLENK_EIN GFX_ABLENK
#define GFX_SOKOBAN_FELD_VOLL 123
#define GFX_GEBLUBBER 124
/* Zeile 8 (128) */
-#define GFX_SIEB_LEER 128
-#define GFX_SIEB_VOLL GFX_SIEB_LEER
-#define GFX_SIEB_TOT GFX_SIEB_LEER
+#define GFX_SIEB_INAKTIV 128
+#define GFX_SIEB_LEER GFX_SIEB_INAKTIV
+#define GFX_SIEB_VOLL GFX_SIEB_INAKTIV
+#define GFX_SIEB_TOT GFX_SIEB_INAKTIV
#define GFX_ERZ_EDEL 132
#define GFX_ERZ_DIAM 133
#define GFX_ERZ_EDEL_ROT 134
#define GFX_KUGEL_GRAU 143
/* Zeile 9 (144) */
#define GFX_PINGUIN 144
-#define GFX_MAULWURF 145
+#define GFX_MOLE 145
#define GFX_SCHWEIN 146
#define GFX_DRACHE 147
#define GFX_MAUER_XY 148
#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_L1 GFX_MAUER_LEFT
#define GFX_MAUER_L 170
#define GFX_MAUER_LEBT 171
-#define GFX_SIEB2_LEER 172
-#define GFX_SIEB2_VOLL GFX_SIEB2_LEER
-#define GFX_SIEB2_TOT GFX_SIEB2_LEER
+#define GFX_SIEB2_INAKTIV 172
+#define GFX_SIEB2_LEER GFX_SIEB2_INAKTIV
+#define GFX_SIEB2_VOLL GFX_SIEB2_INAKTIV
+#define GFX_SIEB2_TOT GFX_SIEB2_INAKTIV
/* Zeile 11 (176) */
#define GFX_AUSGANG_ZU 176
#define GFX_AUSGANG_ACT 177
#define GFX_DYNABOMB_NR 188
#define GFX_DYNABOMB_SZ 191
/* Zeile 12 (192) */
-#define GFX_PFEIL_L 192
-#define GFX_PFEIL_R 193
-#define GFX_PFEIL_O 194
-#define GFX_PFEIL_U 195
+#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_R 200
-#define GFX_BUTTERFLY_O 201
-#define GFX_BUTTERFLY_L 202
-#define GFX_BUTTERFLY_U 203
-#define GFX_FIREFLY_R 204
-#define GFX_FIREFLY_O 205
-#define GFX_FIREFLY_L 206
-#define GFX_FIREFLY_U 207
-
+#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
+
+/* elements with graphics borrowed from other elements */
#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 GFX_SPIELER1_UP (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 4)
#define GFX_SPIELER1_LEFT (GFX_START_ROCKSHEROES + 1*HEROES_PER_LINE + 0)
#define GFX_SPIELER4_PUSH_LEFT (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 4)
#define GFX_MAUER_DOWN (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 0)
#define GFX_MAUER_UP (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 3)
+#define GFX2_SHIELD_PASSIVE (GFX_START_ROCKSHEROES +13*HEROES_PER_LINE + 1)
+#define GFX2_SHIELD_ACTIVE (GFX_START_ROCKSHEROES +13*HEROES_PER_LINE + 5)
#define GFX_SONDE_START (GFX_START_ROCKSHEROES + 9*HEROES_PER_LINE + 8)
#define GFX_SCHWEIN_DOWN (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 8)
#define GFX_DRACHE_UP (GFX_START_ROCKSHEROES + 2*HEROES_PER_LINE +12)
#define GFX_DRACHE_LEFT (GFX_START_ROCKSHEROES + 3*HEROES_PER_LINE + 8)
#define GFX_DRACHE_RIGHT (GFX_START_ROCKSHEROES + 3*HEROES_PER_LINE +12)
-#define GFX_MAULWURF_DOWN (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE + 8)
-#define GFX_MAULWURF_UP (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE +12)
-#define GFX_MAULWURF_LEFT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE + 8)
-#define GFX_MAULWURF_RIGHT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE +12)
+/*
+#define GFX_MOLE_DOWN (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE + 8)
+#define GFX_MOLE_UP (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE +12)
+#define GFX_MOLE_LEFT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE + 8)
+#define GFX_MOLE_RIGHT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE +12)
+*/
#define GFX_PINGUIN_DOWN (GFX_START_ROCKSHEROES + 6*HEROES_PER_LINE + 8)
#define GFX_PINGUIN_UP (GFX_START_ROCKSHEROES + 6*HEROES_PER_LINE +12)
#define GFX_PINGUIN_LEFT (GFX_START_ROCKSHEROES + 7*HEROES_PER_LINE + 8)
#define GFX_PINGUIN_RIGHT (GFX_START_ROCKSHEROES + 7*HEROES_PER_LINE +12)
#define GFX_BLURB_LEFT (GFX_START_ROCKSHEROES +10*HEROES_PER_LINE + 8)
#define GFX_BLURB_RIGHT (GFX_START_ROCKSHEROES +10*HEROES_PER_LINE +12)
-#define GFX_FUNKELN_BLAU (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 8)
-#define GFX_FUNKELN_WEISS (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE +12)
+#define GFX_FUNKELN_BLAU (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 9)
+#define GFX_FUNKELN_WEISS (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE +13)
#define GFX_FLAMMEN_LEFT (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 8)
#define GFX_FLAMMEN_RIGHT (GFX_START_ROCKSHEROES +13*HEROES_PER_LINE + 8)
#define GFX_FLAMMEN_UP (GFX_START_ROCKSHEROES +14*HEROES_PER_LINE + 8)
#define GFX_FLAMMEN_DOWN (GFX_START_ROCKSHEROES +15*HEROES_PER_LINE + 8)
+/* graphics from "RocksSP" */
+#define GFX_SP_EMPTY (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 0)
+/*
+#define GFX_SP_ZONK (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 1)
+*/
+#define GFX_SP_BASE (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 2)
+#define GFX_SP_MURPHY (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 3)
+#define GFX_SP_INFOTRON (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 4)
+#define GFX_SP_CHIP_SINGLE (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 5)
+#define GFX_SP_HARD_GRAY (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 6)
+#define GFX_SP_EXIT (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 7)
+#define GFX_SP_DISK_ORANGE (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 0)
+#define GFX_SP_PORT1_RIGHT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 1)
+#define GFX_SP_PORT1_DOWN (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 2)
+#define GFX_SP_PORT1_LEFT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 3)
+#define GFX_SP_PORT1_UP (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 4)
+#define GFX_SP_PORT2_RIGHT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 5)
+#define GFX_SP_PORT2_DOWN (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 6)
+#define GFX_SP_PORT2_LEFT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 7)
+#define GFX_SP_PORT2_UP (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 0)
+#define GFX_SP_SNIKSNAK (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 1)
+#define GFX_SP_DISK_YELLOW (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 2)
+#define GFX_SP_TERMINAL (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 3)
+#define GFX_SP_DISK_RED (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 4)
+#define GFX_SP_PORT_Y (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 5)
+#define GFX_SP_PORT_X (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 6)
+#define GFX_SP_PORT_XY (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 7)
+#define GFX_SP_ELECTRON (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 0)
+#define GFX_SP_BUG (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 1)
+#define GFX_SP_CHIP_LEFT (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 2)
+#define GFX_SP_CHIP_RIGHT (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 3)
+#define GFX_SP_HARD_BASE1 (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 4)
+#define GFX_SP_HARD_GREEN (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 5)
+#define GFX_SP_HARD_BLUE (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 6)
+#define GFX_SP_HARD_RED (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 7)
+#define GFX_SP_HARD_YELLOW (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 0)
+#define GFX_SP_HARD_BASE2 (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 1)
+#define GFX_SP_HARD_BASE3 (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 2)
+#define GFX_SP_HARD_BASE4 (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 3)
+#define GFX_SP_HARD_BASE5 (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 4)
+#define GFX_SP_HARD_BASE6 (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 5)
+#define GFX_SP_CHIP_UPPER (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 6)
+#define GFX_SP_CHIP_LOWER (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 7)
+
+#define GFX_INVISIBLE_STEEL_ON (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 1)
+#define GFX_SAND_INVISIBLE_ON (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 2)
+#define GFX_INVISIBLE_STEEL (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 3)
+#define GFX_UNSICHTBAR_ON (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 5)
+#define GFX_SAND_INVISIBLE (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 6)
+#define GFX_UNSICHTBAR (GFX_START_ROCKSSP + 5 * SP_PER_LINE + 7)
+
+#define GFX_SP_ZONK (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 0)
+
+#define GFX_EM_KEY_1 (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 4)
+#define GFX_EM_KEY_2 (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 5)
+#define GFX_EM_KEY_3 (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 6)
+#define GFX_EM_KEY_4 (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 7)
+#define GFX_EM_GATE_1 (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 0)
+#define GFX_EM_GATE_2 (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 1)
+#define GFX_EM_GATE_3 (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 2)
+#define GFX_EM_GATE_4 (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 3)
+#define GFX_EM_GATE_1X (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 4)
+#define GFX_EM_GATE_2X (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 5)
+#define GFX_EM_GATE_3X (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 6)
+#define GFX_EM_GATE_4X (GFX_START_ROCKSSP + 7 * SP_PER_LINE + 7)
+
+#define GFX_MURPHY_GO_LEFT (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 8)
+#define GFX_MURPHY_ANY_LEFT (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 9)
+#define GFX_MURPHY_GO_RIGHT (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 11)
+#define GFX_MURPHY_ANY_RIGHT (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 12)
+#define GFX_MURPHY_SNAP_UP (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 14)
+#define GFX_MURPHY_SNAP_DOWN (GFX_START_ROCKSSP + 0 * SP_PER_LINE + 15)
+#define GFX_MURPHY_SNAP_RIGHT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 8)
+#define GFX_MURPHY_SNAP_LEFT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 9)
+#define GFX_MURPHY_PUSH_RIGHT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 10)
+#define GFX_MURPHY_PUSH_LEFT (GFX_START_ROCKSSP + 1 * SP_PER_LINE + 11)
+
+#define GFX_SP_BUG_WARNING (GFX_START_ROCKSSP + 2 * SP_PER_LINE + 15)
+#define GFX_SP_EXPLODE_EMPTY (GFX_START_ROCKSSP + 3 * SP_PER_LINE + 8)
+#define GFX_SP_EXPLODE_INFOTRON (GFX_START_ROCKSSP + 4 * SP_PER_LINE + 8)
+#define GFX_SP_BUG_ACTIVE (GFX_START_ROCKSSP + 6 * SP_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_LEFT (GFX_START_ROCKSSP + 8 * SP_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_RIGHT (GFX_START_ROCKSSP + 8 * SP_PER_LINE + 12)
+#define GFX_SP_SNIKSNAK_UP (GFX_START_ROCKSSP + 9 * SP_PER_LINE + 8)
+#define GFX_SP_SNIKSNAK_DOWN (GFX_START_ROCKSSP + 9 * SP_PER_LINE + 12)
+
+#define GFX2_SP_ELECTRON (GFX_START_ROCKSSP + 10 * SP_PER_LINE + 8)
+#define GFX2_SP_TERMINAL (GFX_START_ROCKSSP + 11 * SP_PER_LINE + 8)
+#define GFX2_SP_TERMINAL_ACTIVE (GFX_START_ROCKSSP + 12 * SP_PER_LINE + 8)
+
+/* graphics from "RocksDC" */
+#define GFX_BELT1_MIDDLE (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 0)
+#define GFX_BELT1_LEFT (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 0)
+#define GFX_BELT1_RIGHT (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 0)
+#define GFX_BELT2_MIDDLE (GFX_START_ROCKSDC + 3 * DC_PER_LINE + 0)
+#define GFX_BELT2_LEFT (GFX_START_ROCKSDC + 4 * DC_PER_LINE + 0)
+#define GFX_BELT2_RIGHT (GFX_START_ROCKSDC + 5 * DC_PER_LINE + 0)
+#define GFX_BELT3_MIDDLE (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 0)
+#define GFX_BELT3_LEFT (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 0)
+#define GFX_BELT3_RIGHT (GFX_START_ROCKSDC + 8 * DC_PER_LINE + 0)
+#define GFX_BELT4_MIDDLE (GFX_START_ROCKSDC + 9 * DC_PER_LINE + 0)
+#define GFX_BELT4_LEFT (GFX_START_ROCKSDC + 10 * DC_PER_LINE + 0)
+#define GFX_BELT4_RIGHT (GFX_START_ROCKSDC + 11 * DC_PER_LINE + 0)
+#define GFX_BELT1_SWITCH_LEFT (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 0)
+#define GFX_BELT2_SWITCH_LEFT (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 1)
+#define GFX_BELT3_SWITCH_LEFT (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 2)
+#define GFX_BELT4_SWITCH_LEFT (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 3)
+#define GFX_BELT1_SWITCH_MIDDLE (GFX_START_ROCKSDC + 13 * DC_PER_LINE + 0)
+#define GFX_BELT2_SWITCH_MIDDLE (GFX_START_ROCKSDC + 13 * DC_PER_LINE + 1)
+#define GFX_BELT3_SWITCH_MIDDLE (GFX_START_ROCKSDC + 13 * DC_PER_LINE + 2)
+#define GFX_BELT4_SWITCH_MIDDLE (GFX_START_ROCKSDC + 13 * DC_PER_LINE + 3)
+#define GFX_BELT1_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 0)
+#define GFX_BELT2_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 1)
+#define GFX_BELT3_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 2)
+#define GFX_BELT4_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 3)
+
+#define GFX_SWITCHGATE_SWITCH_1 (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 4)
+#define GFX_SWITCHGATE_SWITCH_2 (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 5)
+#define GFX_LIGHT_SWITCH_OFF (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 6)
+#define GFX_LIGHT_SWITCH_ON (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 7)
+#define GFX_TIMEGATE_SWITCH (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 0)
+
+#define GFX_ENVELOPE (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 4)
+#define GFX_SIGN_EXCLAMATION (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 5)
+#define GFX_SIGN_STOP (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 6)
+#define GFX_LANDMINE (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 7)
+#define GFX_STEEL_SLANTED (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 5)
+
+#define GFX_EXTRA_TIME (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 8)
+#define GFX_SHIELD_ACTIVE (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 8)
+#define GFX_SHIELD_PASSIVE (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 8)
+#define GFX_MOLE_DOWN (GFX_START_ROCKSDC + 3 * DC_PER_LINE + 8)
+#define GFX_MOLE_UP (GFX_START_ROCKSDC + 3 * DC_PER_LINE + 12)
+#define GFX_MOLE_LEFT (GFX_START_ROCKSDC + 4 * DC_PER_LINE + 8)
+#define GFX_MOLE_RIGHT (GFX_START_ROCKSDC + 4 * DC_PER_LINE + 12)
+#define GFX_SWITCHGATE_CLOSED (GFX_START_ROCKSDC + 5 * DC_PER_LINE + 8)
+#define GFX_SWITCHGATE_OPEN (GFX_START_ROCKSDC + 5 * DC_PER_LINE + 12)
+#define GFX_TIMEGATE_CLOSED (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 8)
+#define GFX_TIMEGATE_OPEN (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 12)
+#define GFX_BALLOON_SEND_LEFT (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 8)
+#define GFX_BALLOON_SEND_RIGHT (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 9)
+#define GFX_BALLOON_SEND_UP (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 10)
+#define GFX_BALLOON_SEND_DOWN (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 11)
+#define GFX_BALLOON (GFX_START_ROCKSDC + 7 * DC_PER_LINE + 12)
+#define GFX_BALLOON_SEND_ANY (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 15)
+
+#define GFX_EMC_STEEL_WALL_1 (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 14)
+#define GFX_EMC_STEEL_WALL_2 (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 14)
+#define GFX_EMC_STEEL_WALL_3 (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 14)
+#define GFX_EMC_STEEL_WALL_4 (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 14)
+#define GFX_EMC_WALL_1 (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 13)
+#define GFX_EMC_WALL_2 (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 14)
+#define GFX_EMC_WALL_3 (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 15)
+#define GFX_EMC_WALL_4 (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 14)
+#define GFX_EMC_WALL_5 (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 15)
+#define GFX_EMC_WALL_6 (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 14)
+#define GFX_EMC_WALL_7 (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 15)
+#define GFX_EMC_WALL_8 (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 14)
+
/* graphics from "RocksFont" */
#define GFX_CHAR_START (GFX_START_ROCKSFONT)
-#define GFX_CHAR_ASCII0 (GFX_CHAR_START-32)
-#define GFX_CHAR_AUSRUF (GFX_CHAR_ASCII0+33)
-#define GFX_CHAR_ZOLL (GFX_CHAR_ASCII0+34)
-#define GFX_CHAR_DOLLAR (GFX_CHAR_ASCII0+36)
-#define GFX_CHAR_PROZ (GFX_CHAR_ASCII0+37)
-#define GFX_CHAR_APOSTR (GFX_CHAR_ASCII0+39)
-#define GFX_CHAR_KLAMM1 (GFX_CHAR_ASCII0+40)
-#define GFX_CHAR_KLAMM2 (GFX_CHAR_ASCII0+41)
-#define GFX_CHAR_PLUS (GFX_CHAR_ASCII0+43)
-#define GFX_CHAR_KOMMA (GFX_CHAR_ASCII0+44)
-#define GFX_CHAR_MINUS (GFX_CHAR_ASCII0+45)
-#define GFX_CHAR_PUNKT (GFX_CHAR_ASCII0+46)
-#define GFX_CHAR_SLASH (GFX_CHAR_ASCII0+47)
-#define GFX_CHAR_0 (GFX_CHAR_ASCII0+48)
-#define GFX_CHAR_9 (GFX_CHAR_ASCII0+57)
-#define GFX_CHAR_DOPPEL (GFX_CHAR_ASCII0+58)
-#define GFX_CHAR_SEMIKL (GFX_CHAR_ASCII0+59)
-#define GFX_CHAR_LT (GFX_CHAR_ASCII0+60)
-#define GFX_CHAR_GLEICH (GFX_CHAR_ASCII0+61)
-#define GFX_CHAR_GT (GFX_CHAR_ASCII0+62)
-#define GFX_CHAR_FRAGE (GFX_CHAR_ASCII0+63)
-#define GFX_CHAR_AT (GFX_CHAR_ASCII0+64)
-#define GFX_CHAR_A (GFX_CHAR_ASCII0+65)
-#define GFX_CHAR_Z (GFX_CHAR_ASCII0+90)
-#define GFX_CHAR_AE (GFX_CHAR_ASCII0+91)
-#define GFX_CHAR_OE (GFX_CHAR_ASCII0+92)
-#define GFX_CHAR_UE (GFX_CHAR_ASCII0+93)
-#define GFX_CHAR_COPY (GFX_CHAR_ASCII0+94)
-#define GFX_CHAR_END (GFX_CHAR_START+79)
-
-/* score for elements */
-#define SC_EDELSTEIN 0
-#define SC_DIAMANT 1
-#define SC_KAEFER 2
-#define SC_FLIEGER 3
-#define SC_MAMPFER 4
-#define SC_ROBOT 5
-#define SC_PACMAN 6
-#define SC_KOKOSNUSS 7
-#define SC_DYNAMIT 8
-#define SC_SCHLUESSEL 9
-#define SC_ZEITBONUS 10
+#define GFX_CHAR_ASCII0 (GFX_CHAR_START - 32)
+#define GFX_CHAR_AUSRUF (GFX_CHAR_ASCII0 + 33)
+#define GFX_CHAR_ZOLL (GFX_CHAR_ASCII0 + 34)
+#define GFX_CHAR_DOLLAR (GFX_CHAR_ASCII0 + 36)
+#define GFX_CHAR_PROZ (GFX_CHAR_ASCII0 + 37)
+#define GFX_CHAR_APOSTR (GFX_CHAR_ASCII0 + 39)
+#define GFX_CHAR_KLAMM1 (GFX_CHAR_ASCII0 + 40)
+#define GFX_CHAR_KLAMM2 (GFX_CHAR_ASCII0 + 41)
+#define GFX_CHAR_PLUS (GFX_CHAR_ASCII0 + 43)
+#define GFX_CHAR_KOMMA (GFX_CHAR_ASCII0 + 44)
+#define GFX_CHAR_MINUS (GFX_CHAR_ASCII0 + 45)
+#define GFX_CHAR_PUNKT (GFX_CHAR_ASCII0 + 46)
+#define GFX_CHAR_SLASH (GFX_CHAR_ASCII0 + 47)
+#define GFX_CHAR_0 (GFX_CHAR_ASCII0 + 48)
+#define GFX_CHAR_9 (GFX_CHAR_ASCII0 + 57)
+#define GFX_CHAR_DOPPEL (GFX_CHAR_ASCII0 + 58)
+#define GFX_CHAR_SEMIKL (GFX_CHAR_ASCII0 + 59)
+#define GFX_CHAR_LT (GFX_CHAR_ASCII0 + 60)
+#define GFX_CHAR_GLEICH (GFX_CHAR_ASCII0 + 61)
+#define GFX_CHAR_GT (GFX_CHAR_ASCII0 + 62)
+#define GFX_CHAR_FRAGE (GFX_CHAR_ASCII0 + 63)
+#define GFX_CHAR_AT (GFX_CHAR_ASCII0 + 64)
+#define GFX_CHAR_A (GFX_CHAR_ASCII0 + 65)
+#define GFX_CHAR_Z (GFX_CHAR_ASCII0 + 90)
+#define GFX_CHAR_AE (GFX_CHAR_ASCII0 + 91)
+#define GFX_CHAR_OE (GFX_CHAR_ASCII0 + 92)
+#define GFX_CHAR_UE (GFX_CHAR_ASCII0 + 93)
+#define GFX_CHAR_COPY (GFX_CHAR_ASCII0 + 94)
+#define GFX_CHAR_END (GFX_CHAR_START + 79)
+
+/* new elements which still have no graphic */
+#define GFX_PEARL GFX_CHAR_FRAGE
+#define GFX_CRYSTAL GFX_CHAR_FRAGE
+#define GFX_WALL_PEARL GFX_CHAR_FRAGE
+#define GFX_WALL_CRYSTAL GFX_CHAR_FRAGE
+#define GFX_DOOR_WHITE GFX_CHAR_FRAGE
+#define GFX_DOOR_WHITE_GRAY GFX_CHAR_FRAGE
+#define GFX_KEY_WHITE GFX_CHAR_FRAGE
+#define GFX_SIGN_RADIOACTIVITY GFX_CHAR_FRAGE
+#define GFX_SIGN_WHEELCHAIR GFX_CHAR_FRAGE
+#define GFX_SIGN_PARKING GFX_CHAR_FRAGE
+#define GFX_SIGN_ONEWAY GFX_CHAR_FRAGE
+#define GFX_SIGN_HEART GFX_CHAR_FRAGE
+#define GFX_SIGN_TRIANGLE GFX_CHAR_FRAGE
+#define GFX_SIGN_ROUND GFX_CHAR_FRAGE
+#define GFX_SIGN_EXIT GFX_CHAR_FRAGE
+#define GFX_SIGN_YINYANG GFX_CHAR_FRAGE
+#define GFX_SIGN_OTHER GFX_CHAR_FRAGE
+#define GFX_DX_UNKNOWN_15 GFX_CHAR_FRAGE
+#define GFX_DX_UNKNOWN_42 GFX_CHAR_FRAGE
+
/* the names of the sounds */
#define SND_ALCHEMY 0
#define SND_WARNTON 49
#define SND_WHOOSH 50
#define SND_ZISCH 51
-
-#define NUM_SOUNDS 52
-
-#define IS_LOOP_SOUND(s) ((s)==SND_KLAPPER || (s)==SND_ROEHR || \
- (s)==SND_NJAM || (s)==SND_MIEP)
-#define IS_MUSIC_SOUND(s) ((s)==SND_ALCHEMY || (s)==SND_CHASE || \
- (s)==SND_NETWORK || (s)==SND_CZARDASZ || \
- (s)==SND_TYGER || (s)==SND_VOYAGER || \
- (s)==SND_TWILIGHT)
+#define SND_SP_BASE 52
+#define SND_SP_INFOTRON 53
+#define SND_SP_ZONKDOWN 54
+#define SND_SP_ZONKPUSH 55
+#define SND_SP_BUG 56
+#define SND_SP_BOOM 57
+#define SND_SP_BOOOM 58
+#define SND_SP_EXIT 59
+#define SND_EMPTY 60
+#define SND_GATE 61
+
+#define NUM_SOUNDS 62
/* default input keys */
#define KEY_UNDEFINDED XK_VoidSymbol
/* directions for moving */
#define MV_NO_MOVING 0
-#define MV_LEFT (1<<0)
-#define MV_RIGHT (1<<1)
-#define MV_UP (1<<2)
-#define MV_DOWN (1<<3)
+#define MV_LEFT (1 << 0)
+#define MV_RIGHT (1 << 1)
+#define MV_UP (1 << 2)
+#define MV_DOWN (1 << 3)
/* font types */
#define FS_SMALL 0
#define FS_BIG 1
+#define FS_MEDIUM 2
/* font colors */
#define FC_RED 0
#define FC_BLUE 1
#define FC_YELLOW 3
#define FC_SPECIAL1 4
#define FC_SPECIAL2 5
+#define FC_SPECIAL3 6
/* values for game_status */
-#define MAINMENU 0
-#define PLAYING 1
-#define LEVELED 2
-#define HELPSCREEN 3
-#define CHOOSELEVEL 4
-#define TYPENAME 5
-#define HALLOFFAME 6
-#define SETUP 7
-#define SETUPINPUT 8
-#define EXITGAME 9
-
-/* values for game_emulation */
-#define EMU_NONE 0
-#define EMU_BOULDERDASH 1
-#define EMU_SOKOBAN 2
+#define EXITGAME 0
+#define MAINMENU 1
+#define PLAYING 2
+#define LEVELED 3
+#define HELPSCREEN 4
+#define CHOOSELEVEL 5
+#define TYPENAME 6
+#define HALLOFFAME 7
+#define SETUP 8
+#define SETUPINPUT 9
+#define CALIBRATION 10
+
+#ifndef RO_GAME_DIR
+#define RO_GAME_DIR "."
+#endif
-#ifndef GAME_DIR
-#define GAME_DIR "."
+#ifndef RW_GAME_DIR
+#define RW_GAME_DIR "."
#endif
-#define BASE_PATH GAME_DIR
+#define RO_BASE_PATH RO_GAME_DIR
+#define RW_BASE_PATH RW_GAME_DIR
#define GRAPHICS_DIRECTORY "graphics"
#define SOUNDS_DIRECTORY "sounds"
#define TAPES_DIRECTORY "tapes"
#define SCORES_DIRECTORY "scores"
-#ifndef MSDOS
-#define USERDATA_DIRECTORY ".rocksndiamonds"
-#define SETUP_FILENAME "setup.conf"
-#define LEVELSETUP_FILENAME "levelsetup.conf"
-#define LEVELINFO_FILENAME "levelinfo.conf"
-#define TAPEFILE_EXTENSION "tape"
-#define SCOREFILE_EXTENSION "score"
-#else
-#define USERDATA_DIRECTORY "userdata"
-#define SETUP_FILENAME "setup.cnf"
-#define LEVELSETUP_FILENAME "lvlsetup.cnf"
-#define LEVELINFO_FILENAME "lvlinfo.cnf"
-#define TAPEFILE_EXTENSION "rec"
-#define SCOREFILE_EXTENSION "sco"
-#endif
+#define PROGRAM_VERSION_STRING "1.3.5"
+#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
+#define PROGRAM_AUTHOR_STRING "Holger Schemel"
+#define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_VERSION_STRING
+#define COPYRIGHT_STRING "Copyright ^1995-99 by " PROGRAM_AUTHOR_STRING
-#define MODE_R_ALL (S_IRUSR | S_IRGRP | S_IROTH)
-#define MODE_W_ALL (S_IWUSR | S_IWGRP | S_IWOTH)
-#define MODE_X_ALL (S_IXUSR | S_IXGRP | S_IXOTH)
-#define USERDATA_DIR_MODE (MODE_R_ALL | MODE_X_ALL | S_IWUSR)
-#define LEVEL_PERMS (MODE_R_ALL | MODE_W_ALL)
-#define SCORE_PERMS LEVEL_PERMS
-#define NAMES_PERMS LEVEL_PERMS
-#define LEVDIR_PERMS LEVEL_PERMS
-#define LEVREC_PERMS LEVEL_PERMS
-#define JOYDAT_PERMS LEVEL_PERMS
-#define SETUP_PERMS LEVEL_PERMS
-
-/* old cookies */
-#define LEVELREC_COOKIE_10 "ROCKSNDIAMONDS_LEVELREC_FILE_VERSION_1.0"
-
-#define LEVEL_COOKIE "ROCKSNDIAMONDS_LEVEL_FILE_VERSION_1.0"
-#define SCORE_COOKIE "ROCKSNDIAMONDS_SCORE_FILE_VERSION_1.2"
-#define LEVELDIR_COOKIE "ROCKSNDIAMONDS_LEVELDIR_FILE_VERSION_1.0"
-#define LEVELREC_COOKIE "ROCKSNDIAMONDS_LEVELREC_FILE_VERSION_1.2"
-#define JOYSTICK_COOKIE "ROCKSNDIAMONDS_JOYSTICK_FILE_VERSION_1.0"
-#define SETUP_COOKIE "ROCKSNDIAMONDS_SETUP_FILE_VERSION_1.2"
-#define LEVELSETUP_COOKIE "ROCKSNDIAMONDS_LEVELSETUP_FILE_VERSION_1.2"
-#define LEVELINFO_COOKIE "ROCKSNDIAMONDS_LEVELINFO_FILE_VERSION_1.2"
-#define LEVEL_COOKIE_LEN (strlen(LEVEL_COOKIE)+1)
-#define SCORE_COOKIE_LEN (strlen(SCORE_COOKIE)+1)
-#define LEVELDIR_COOKIE_LEN (strlen(LEVELDIR_COOKIE)+1)
-#define LEVELREC_COOKIE_LEN (strlen(LEVELREC_COOKIE)+1)
-#define JOYSTICK_COOKIE_LEN (strlen(JOYSTICK_COOKIE)+1)
-#define SETUP_COOKIE_LEN (strlen(SETUP_COOKIE)+1)
-#define LEVELSETUP_COOKIE_LEN (strlen(LEVELSETUP_COOKIE)+1)
-#define LEVELINFO_COOKIE_LEN (strlen(LEVELINFO_COOKIE)+1)
-
-#define VERSION_STRING "1.2 preview 1"
-#define GAMETITLE_STRING "Rocks'n'Diamonds"
-#define WINDOWTITLE_STRING GAMETITLE_STRING " " VERSION_STRING
-#define COPYRIGHT_STRING "Copyright ^1995-98 by Holger Schemel"
-
-/* Leerer Login- und Alias-Name */
-#define EMPTY_LOGIN "NO_LOGIN"
-#define EMPTY_ALIAS "NO_NAME"
+/* default name for empty highscore entry */
+#define EMPTY_PLAYER_NAME "no name"
+
+/* default name for unknown player names */
+#define ANONYMOUS_NAME "anonymous"
+
+/* default name for new levels */
+#define NAMELESS_LEVEL_NAME "nameless level"
/* values for button_status */
#define MB_NOT_PRESSED FALSE
#define MB_MENU_MARK TRUE
#define MB_MENU_INITIALIZE (-1)
#define MB_LEFT 1
-#ifdef MSDOS
-#define MB_MIDDLE 4
-#define MB_RIGHT 2
-#else
#define MB_MIDDLE 2
#define MB_RIGHT 3
-#endif
-
-/* values for key_status */
-#define KEY_NOT_PRESSED FALSE
-#define KEY_RELEASED FALSE
-#define KEY_PRESSED TRUE
/* values for redraw_mask */
-#define REDRAW_ALL (1L<<0)
-#define REDRAW_FIELD (1L<<1)
-#define REDRAW_TILES (1L<<2)
-#define REDRAW_DOOR_1 (1L<<3)
-#define REDRAW_VIDEO_1 (1L<<4)
-#define REDRAW_VIDEO_2 (1L<<5)
-#define REDRAW_VIDEO_3 (1L<<6)
-#define REDRAW_MICROLEV (1L<<7)
-#define REDRAW_FROM_BACKBUFFER (1L<<8)
-#define REDRAW_DOOR_2 (REDRAW_VIDEO_1 | REDRAW_VIDEO_2 | REDRAW_VIDEO_3)
-#define REDRAW_DOORS (REDRAW_DOOR_1 | REDRAW_DOOR_2)
-#define REDRAW_MAIN (REDRAW_FIELD | REDRAW_TILES | REDRAW_MICROLEV)
-#define REDRAWTILES_THRESHOLD SCR_FIELDX*SCR_FIELDY/2
-
-/* positions in the game control window */
-#define XX_LEVEL 37
-#define YY_LEVEL 20
-#define XX_EMERALDS 29
-#define YY_EMERALDS 54
-#define XX_DYNAMITE 29
-#define YY_DYNAMITE 89
-#define XX_KEYS 18
-#define YY_KEYS 123
-#define XX_SCORE 15
-#define YY_SCORE 159
-#define XX_TIME 29
-#define YY_TIME 194
-
-#define DX_LEVEL (DX+XX_LEVEL)
-#define DY_LEVEL (DY+YY_LEVEL)
-#define DX_EMERALDS (DX+XX_EMERALDS)
-#define DY_EMERALDS (DY+YY_EMERALDS)
-#define DX_DYNAMITE (DX+XX_DYNAMITE)
-#define DY_DYNAMITE (DY+YY_DYNAMITE)
-#define DX_KEYS (DX+XX_KEYS)
-#define DY_KEYS (DY+YY_KEYS)
-#define DX_SCORE (DX+XX_SCORE)
-#define DY_SCORE (DY+YY_SCORE)
-#define DX_TIME (DX+XX_TIME)
-#define DY_TIME (DY+YY_TIME)
-
-/* Felder in PIX_DOOR */
-/* Bedeutung in PIX_DB_DOOR: (3 PAGEs)
- PAGEX1: 1. Zwischenspeicher für DOOR_1
- PAGEX2: 2. Zwischenspeicher für DOOR_1
- PAGEX3: Pufferspeicher für Animationen
+#define REDRAW_ALL (1 << 0)
+#define REDRAW_FIELD (1 << 1)
+#define REDRAW_TILES (1 << 2)
+#define REDRAW_DOOR_1 (1 << 3)
+#define REDRAW_VIDEO_1 (1 << 4)
+#define REDRAW_VIDEO_2 (1 << 5)
+#define REDRAW_VIDEO_3 (1 << 6)
+#define REDRAW_MICROLEVEL (1 << 7)
+#define REDRAW_FROM_BACKBUFFER (1 << 8)
+#define REDRAW_DOOR_2 (REDRAW_VIDEO_1 | \
+ REDRAW_VIDEO_2 | \
+ REDRAW_VIDEO_3)
+#define REDRAW_DOOR_3 (1 << 9)
+#define REDRAW_DOORS (REDRAW_DOOR_1 | \
+ REDRAW_DOOR_2 | \
+ REDRAW_DOOR_3)
+#define REDRAW_MAIN (REDRAW_FIELD | \
+ REDRAW_TILES | \
+ REDRAW_MICROLEVEL)
+#define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2)
+
+/* areas in pixmap PIX_DOOR */
+/* meaning in PIX_DB_DOOR: (3 PAGEs)
+ PAGEX1: 1. buffer for DOOR_1
+ PAGEX2: 2. buffer for DOOR_1
+ PAGEX3: buffer for animations
*/
#define DOOR_GFX_PAGESIZE DXSIZE
-#define DOOR_GFX_PAGEX1 (0*DOOR_GFX_PAGESIZE)
-#define DOOR_GFX_PAGEX2 (1*DOOR_GFX_PAGESIZE)
-#define DOOR_GFX_PAGEX3 (2*DOOR_GFX_PAGESIZE)
-#define DOOR_GFX_PAGEX4 (3*DOOR_GFX_PAGESIZE)
-#define DOOR_GFX_PAGEX5 (4*DOOR_GFX_PAGESIZE)
-#define DOOR_GFX_PAGEX6 (5*DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX1 (0 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX2 (1 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX3 (2 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX4 (3 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX5 (4 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX6 (5 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX7 (6 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX8 (7 * DOOR_GFX_PAGESIZE)
#define DOOR_GFX_PAGEY1 0
#define DOOR_GFX_PAGEY2 DYSIZE
-/* für DrawGraphicAnimation (tools.c) und AnimateToon (cartoons.c) */
-#define ANIM_NORMAL 0
-#define ANIM_OSCILLATE 1
-#define ANIM_REVERSE 2
+/* 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
#endif /* MAIN_H */