+#define FULLSCREEN_NOT_AVAILABLE FALSE
+#define FULLSCREEN_AVAILABLE TRUE
+
+/* default input keys */
+#define DEFAULT_KEY_LEFT KSYM_Left
+#define DEFAULT_KEY_RIGHT KSYM_Right
+#define DEFAULT_KEY_UP KSYM_Up
+#define DEFAULT_KEY_DOWN KSYM_Down
+#if defined(PLATFORM_MACOSX)
+#define DEFAULT_KEY_SNAP KSYM_Control_L
+#define DEFAULT_KEY_BOMB KSYM_KP_Enter
+#else
+#define DEFAULT_KEY_SNAP KSYM_Shift_L
+#define DEFAULT_KEY_BOMB KSYM_Shift_R
+#endif
+#define DEFAULT_KEY_OKAY KSYM_Return
+#define DEFAULT_KEY_CANCEL KSYM_Escape
+
+/* default shortcut keys */
+#define DEFAULT_KEY_SAVE_GAME KSYM_F1
+#define DEFAULT_KEY_LOAD_GAME KSYM_F2
+#define DEFAULT_KEY_TOGGLE_PAUSE KSYM_space
+
+/* values for key_status */
+#define KEY_NOT_PRESSED FALSE
+#define KEY_RELEASED FALSE
+#define KEY_PRESSED TRUE
+
+/* values for button status */
+#define MB_NOT_PRESSED FALSE
+#define MB_NOT_RELEASED TRUE
+#define MB_RELEASED FALSE
+#define MB_PRESSED TRUE
+#define MB_MENU_CHOICE FALSE
+#define MB_MENU_MARK TRUE
+#define MB_MENU_INITIALIZE (-1)
+#define MB_MENU_LEAVE (-2)
+#define MB_LEFTBUTTON 1
+#define MB_MIDDLEBUTTON 2
+#define MB_RIGHTBUTTON 3
+
+
+/* values for move directions */
+#define MV_BIT_LEFT 0
+#define MV_BIT_RIGHT 1
+#define MV_BIT_UP 2
+#define MV_BIT_DOWN 3
+
+#define NUM_DIRECTIONS 4
+
+/* values for special "button" bitmasks */
+#define BUTTON_1 4
+#define BUTTON_2 5
+
+/* values for move direction and special "button" key bitmasks */
+#define MV_NO_MOVING 0
+#define MV_LEFT (1 << MV_BIT_LEFT)
+#define MV_RIGHT (1 << MV_BIT_RIGHT)
+#define MV_UP (1 << MV_BIT_UP)
+#define MV_DOWN (1 << MV_BIT_DOWN)
+
+#define KEY_BUTTON_1 (1 << BUTTON_1)
+#define KEY_BUTTON_2 (1 << BUTTON_2)
+#define KEY_MOTION (MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
+#define KEY_BUTTON (KEY_BUTTON_1 | KEY_BUTTON_2)
+#define KEY_ACTION (KEY_MOTION | KEY_BUTTON)
+
+#define MV_DIR_BIT(x) ((x) == MV_LEFT ? MV_BIT_LEFT : \
+ (x) == MV_RIGHT ? MV_BIT_RIGHT : \
+ (x) == MV_UP ? MV_BIT_UP : MV_BIT_DOWN)
+
+
+/* values for animation mode (frame order and direction) */
+#define ANIM_NONE 0
+#define ANIM_LOOP (1 << 0)
+#define ANIM_LINEAR (1 << 1)
+#define ANIM_PINGPONG (1 << 2)
+#define ANIM_PINGPONG2 (1 << 3)
+#define ANIM_RANDOM (1 << 4)
+#define ANIM_REVERSE (1 << 5)
+
+/* values for special (non game element) animation modes */
+#define ANIM_HORIZONTAL (1 << 6)
+#define ANIM_VERTICAL (1 << 7)
+
+#define ANIM_DEFAULT ANIM_LOOP
+
+/* values for redraw_mask */
+#define REDRAW_NONE (0)
+#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_MICROLABEL (1 << 8)
+#define REDRAW_FROM_BACKBUFFER (1 << 9)
+#define REDRAW_DOOR_2 (REDRAW_VIDEO_1 | \
+ REDRAW_VIDEO_2 | \
+ REDRAW_VIDEO_3)
+#define REDRAW_DOOR_3 (1 << 10)
+#define REDRAW_DOORS (REDRAW_DOOR_1 | \
+ REDRAW_DOOR_2 | \
+ REDRAW_DOOR_3)
+#define REDRAW_MAIN (REDRAW_FIELD | \
+ REDRAW_TILES | \
+ REDRAW_MICROLEVEL)
+#define REDRAW_FPS (1 << 11)
+#define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2)
+
+
+/* values for mouse cursor */
+#define CURSOR_DEFAULT 0
+#define CURSOR_PLAYFIELD 1
+
+
+/* maximum number of parallel players supported by libgame functions */
+#define MAX_PLAYERS 4
+
+/* maximum allowed length of player name */
+#define MAX_PLAYER_NAME_LEN 10
+
+/* 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"
+
+/* default text for non-existant artwork */
+#define NOT_AVAILABLE "(not available)"
+
+/* default value for undefined filename */
+#define UNDEFINED_FILENAME "[NONE]"
+
+/* default value for undefined parameter */
+#define ARG_DEFAULT "[DEFAULT]"
+
+/* default values for undefined configuration file parameters */
+#define ARG_UNDEFINED "-1000000"
+#define ARG_UNDEFINED_VALUE (atoi(ARG_UNDEFINED))
+
+/* definitions for game sub-directories */
+#ifndef RO_GAME_DIR
+#define RO_GAME_DIR "."
+#endif
+
+#ifndef RW_GAME_DIR
+#define RW_GAME_DIR "."
+#endif
+
+#define RO_BASE_PATH RO_GAME_DIR
+#define RW_BASE_PATH RW_GAME_DIR
+
+/* directory names */
+#define GRAPHICS_DIRECTORY "graphics"
+#define SOUNDS_DIRECTORY "sounds"
+#define MUSIC_DIRECTORY "music"
+#define LEVELS_DIRECTORY "levels"
+#define TAPES_DIRECTORY "tapes"
+#define SCORES_DIRECTORY "scores"
+#define DOCS_DIRECTORY "docs"
+
+#if !defined(PLATFORM_MSDOS)
+#define GFX_CLASSIC_SUBDIR "gfx_classic"
+#define SND_CLASSIC_SUBDIR "snd_classic"
+#define MUS_CLASSIC_SUBDIR "mus_classic"
+#else
+#define GFX_CLASSIC_SUBDIR "gfx_orig"
+#define SND_CLASSIC_SUBDIR "snd_orig"
+#define MUS_CLASSIC_SUBDIR "mus_orig"
+#endif
+
+/* file names and filename extensions */
+#if !defined(PLATFORM_MSDOS)
+#define LEVELSETUP_DIRECTORY "levelsetup"
+#define SETUP_FILENAME "setup.conf"
+#define LEVELSETUP_FILENAME "levelsetup.conf"
+#define EDITORSETUP_FILENAME "editorsetup.conf"
+#define ELEMENTINFO_FILENAME "elementinfo.conf"
+#define LEVELINFO_FILENAME "levelinfo.conf"
+#define GRAPHICSINFO_FILENAME "graphicsinfo.conf"
+#define SOUNDSINFO_FILENAME "soundsinfo.conf"
+#define MUSICINFO_FILENAME "musicinfo.conf"
+#define LEVELFILE_EXTENSION "level"
+#define TAPEFILE_EXTENSION "tape"
+#define SCOREFILE_EXTENSION "score"
+#else
+#define LEVELSETUP_DIRECTORY "lvlsetup"
+#define SETUP_FILENAME "setup.cnf"
+#define LEVELSETUP_FILENAME "lvlsetup.cnf"
+#define EDITORSETUP_FILENAME "edsetup.conf"
+#define ELEMENTINFO_FILENAME "eleminfo.conf"
+#define LEVELINFO_FILENAME "lvlinfo.cnf"
+#define GRAPHICSINFO_FILENAME "gfxinfo.cnf"
+#define SOUNDSINFO_FILENAME "sndinfo.cnf"
+#define MUSICINFO_FILENAME "musinfo.cnf"
+#define LEVELFILE_EXTENSION "lvl"
+#define TAPEFILE_EXTENSION "tap"
+#define SCOREFILE_EXTENSION "sco"
+#endif
+
+
+/* areas in bitmap 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 (gfx.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_PAGEX7 (6 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX8 (7 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEY1 (0)
+#define DOOR_GFX_PAGEY2 (gfx.dysize)
+
+
+/* macros for version handling */
+#define VERSION_MAJOR(x) ((x) / 1000000)
+#define VERSION_MINOR(x) (((x) % 1000000) / 10000)
+#define VERSION_PATCH(x) (((x) % 10000) / 100)
+#define VERSION_BUILD(x) ((x) % 100)
+#define VERSION_IDENT(a,b,c,d) ((a) * 1000000 + (b) * 10000 + (c) * 100 + (d))
+
+
+/* macros for parent/child process identification */
+#if defined(PLATFORM_UNIX)
+#define IS_PARENT_PROCESS() (audio.mixer_pid != getpid())
+#define IS_CHILD_PROCESS() (audio.mixer_pid == getpid())
+#define HAS_CHILD_PROCESS() (audio.mixer_pid > 0)
+#else
+#define IS_PARENT_PROCESS() TRUE
+#define IS_CHILD_PROCESS() FALSE
+#define HAS_CHILD_PROCESS() FALSE
+#endif
+
+
+/* values for artwork type */
+#define ARTWORK_TYPE_GRAPHICS 0
+#define ARTWORK_TYPE_SOUNDS 1
+#define ARTWORK_TYPE_MUSIC 2
+
+#define NUM_ARTWORK_TYPES 3