-/* values for move directions and special "button" key bitmasks */
-#define MV_NONE 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 MV_UPLEFT (MV_UP | MV_LEFT)
-#define MV_UPRIGHT (MV_UP | MV_RIGHT)
-#define MV_DOWNLEFT (MV_DOWN | MV_LEFT)
-#define MV_DOWNRIGHT (MV_DOWN | MV_RIGHT)
-
-#define MV_HORIZONTAL (MV_LEFT | MV_RIGHT)
-#define MV_VERTICAL (MV_UP | MV_DOWN)
-#define MV_ALL_DIRECTIONS (MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
-#define MV_ANY_DIRECTION (MV_ALL_DIRECTIONS)
-#define MV_NO_DIRECTION (MV_NONE)
-
-#define KEY_BUTTON_1 (1 << BUTTON_1)
-#define KEY_BUTTON_2 (1 << BUTTON_2)
-#define KEY_BUTTON_SNAP KEY_BUTTON_1
-#define KEY_BUTTON_DROP KEY_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 KEY_SET_FOCUS (1 << BIT_SET_FOCUS)
-
-#define MV_DIR_FROM_BIT(x) ((x) < NUM_DIRECTIONS ? 1 << (x) : \
- (x) == MV_BIT_UPLEFT ? MV_UPLEFT : \
- (x) == MV_BIT_UPRIGHT ? MV_UPRIGHT : \
- (x) == MV_BIT_DOWNLEFT ? MV_DOWNLEFT : \
- (x) == MV_BIT_DOWNRIGHT ? MV_DOWNRIGHT : \
- MV_NONE)
-
-#define MV_DIR_TO_BIT(x) ((x) == MV_LEFT ? MV_BIT_LEFT : \
- (x) == MV_RIGHT ? MV_BIT_RIGHT : \
- (x) == MV_UP ? MV_BIT_UP : \
- (x) == MV_DOWN ? MV_BIT_DOWN : \
- (x) == MV_UPLEFT ? MV_BIT_UPLEFT : \
- (x) == MV_UPRIGHT ? MV_BIT_UPRIGHT : \
- (x) == MV_DOWNLEFT ? MV_BIT_DOWNLEFT : \
- (x) == MV_DOWNRIGHT ? MV_BIT_DOWNRIGHT : \
- MV_BIT_DOWN)
-
-#define MV_DIR_OPPOSITE(x) ((x) == MV_LEFT ? MV_RIGHT : \
- (x) == MV_RIGHT ? MV_LEFT : \
- (x) == MV_UP ? MV_DOWN : \
- (x) == MV_DOWN ? MV_UP : \
- (x) == MV_UPLEFT ? MV_DOWNRIGHT : \
- (x) == MV_UPRIGHT ? MV_DOWNLEFT : \
- (x) == MV_DOWNLEFT ? MV_UPRIGHT : \
- (x) == MV_DOWNRIGHT ? MV_UPLEFT : \
- MV_NONE)
-
-/* values for animation mode (frame order and direction) */
-/* (stored in level files -- never change existing values) */
-#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_CE_VALUE (1 << 5)
-#define ANIM_CE_SCORE (1 << 6)
-#define ANIM_CE_DELAY (1 << 7)
-#define ANIM_REVERSE (1 << 8)
-#define ANIM_OPAQUE_PLAYER (1 << 9)
-
-/* values for special (non game element) animation modes */
-/* (not stored in level files -- can be changed, if needed) */
-#define ANIM_HORIZONTAL (1 << 10)
-#define ANIM_VERTICAL (1 << 11)
-#define ANIM_CENTERED (1 << 12)
-#define ANIM_STATIC_PANEL (1 << 13)
-#define ANIM_ALL (1 << 14)
-#define ANIM_ONCE (1 << 15)
-
-#define ANIM_DEFAULT ANIM_LOOP
-
-/* values for special drawing styles (currently only for crumbled graphics) */
-#define STYLE_NONE 0
-#define STYLE_ACCURATE_BORDERS (1 << 0)
-#define STYLE_INNER_CORNERS (1 << 1)
-#define STYLE_REVERSE (1 << 2)
-
-#define STYLE_DEFAULT STYLE_NONE
-
-/* values for special global animation events */
-#define ANIM_EVENT_NONE 0
-#define ANIM_EVENT_SELF (1 << 16)
-#define ANIM_EVENT_ANY (1 << 17)
-
-#define ANIM_EVENT_ANIM_BIT 0
-#define ANIM_EVENT_PART_BIT 8
-
-#define ANIM_EVENT_ANIM_MASK (0xff << ANIM_EVENT_ANIM_BIT)
-#define ANIM_EVENT_PART_MASK (0xff << ANIM_EVENT_PART_BIT)
-
-#define ANIM_EVENT_DEFAULT ANIM_EVENT_NONE
-
-/* values for fade mode */
-#define FADE_TYPE_NONE 0
-#define FADE_TYPE_FADE_IN (1 << 0)
-#define FADE_TYPE_FADE_OUT (1 << 1)
-#define FADE_TYPE_TRANSFORM (1 << 2)
-#define FADE_TYPE_CROSSFADE (1 << 3)
-#define FADE_TYPE_MELT (1 << 4)
-#define FADE_TYPE_CURTAIN (1 << 5)
-#define FADE_TYPE_SKIP (1 << 6)
-
-#define FADE_MODE_NONE (FADE_TYPE_NONE)
-#define FADE_MODE_FADE_IN (FADE_TYPE_FADE_IN)
-#define FADE_MODE_FADE_OUT (FADE_TYPE_FADE_OUT)
-#define FADE_MODE_FADE (FADE_TYPE_FADE_IN | FADE_TYPE_FADE_OUT)
-#define FADE_MODE_TRANSFORM (FADE_TYPE_TRANSFORM | FADE_TYPE_FADE_IN)
-#define FADE_MODE_CROSSFADE (FADE_MODE_TRANSFORM | FADE_TYPE_CROSSFADE)
-#define FADE_MODE_MELT (FADE_MODE_TRANSFORM | FADE_TYPE_MELT)
-#define FADE_MODE_CURTAIN (FADE_MODE_TRANSFORM | FADE_TYPE_CURTAIN)
-#define FADE_MODE_SKIP_FADE_IN (FADE_TYPE_SKIP | FADE_TYPE_FADE_IN)
-#define FADE_MODE_SKIP_FADE_OUT (FADE_TYPE_SKIP | FADE_TYPE_FADE_OUT)
-
-#define FADE_MODE_DEFAULT FADE_MODE_FADE
-
-/* values for toon positions */
-#define POS_UNDEFINED -1
-#define POS_LEFT 0
-#define POS_RIGHT 1
-#define POS_TOP 2
-#define POS_UPPER 3
-#define POS_MIDDLE 4
-#define POS_LOWER 5
-#define POS_BOTTOM 6
-#define POS_ANY 7
-#define POS_LAST 8
-
-/* values for text alignment */
-#define ALIGN_LEFT (1 << 0)
-#define ALIGN_RIGHT (1 << 1)
-#define ALIGN_CENTER (1 << 2)
-#define ALIGN_DEFAULT ALIGN_LEFT
-
-#define VALIGN_TOP (1 << 0)
-#define VALIGN_BOTTOM (1 << 1)
-#define VALIGN_MIDDLE (1 << 2)
-#define VALIGN_DEFAULT VALIGN_TOP
-
-#define ALIGNED_XPOS(x,w,a) ((a) == ALIGN_CENTER ? (x) - (w) / 2 : \
- (a) == ALIGN_RIGHT ? (x) - (w) : (x))
-#define ALIGNED_YPOS(y,h,v) ((v) == VALIGN_MIDDLE ? (y) - (h) / 2 : \
- (v) == VALIGN_BOTTOM ? (y) - (h) : (y))
-#define ALIGNED_TEXT_XPOS(p) ALIGNED_XPOS((p)->x, (p)->width, (p)->align)
-#define ALIGNED_TEXT_YPOS(p) ALIGNED_YPOS((p)->y, (p)->height, (p)->valign)
-
-/* values for redraw_mask */
-#define REDRAW_NONE (0)
-#define REDRAW_ALL (1 << 0)
-#define REDRAW_FIELD (1 << 1)
-#define REDRAW_DOOR_1 (1 << 2)
-#define REDRAW_DOOR_2 (1 << 3)
-#define REDRAW_DOOR_3 (1 << 4)
-#define REDRAW_FPS (1 << 5)
-
-#define REDRAW_DOORS (REDRAW_DOOR_1 | \
- REDRAW_DOOR_2 | \
- REDRAW_DOOR_3)
-
-#define IN_GFX_FIELD_PLAY(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
- y >= gfx.sy && y < gfx.sy + gfx.sysize)
-#define IN_GFX_FIELD_FULL(x, y) (x >= gfx.real_sx && \
- x < gfx.real_sx + gfx.full_sxsize && \
- y >= gfx.real_sy && \
- y < gfx.real_sy + gfx.full_sysize)
-#define IN_GFX_DOOR_1(x, y) (x >= gfx.dx && x < gfx.dx + gfx.dxsize && \
- y >= gfx.dy && y < gfx.dy + gfx.dysize)
-#define IN_GFX_DOOR_2(x, y) (x >= gfx.vx && x < gfx.vx + gfx.vxsize && \
- y >= gfx.vy && y < gfx.vy + gfx.vysize)
-#define IN_GFX_DOOR_3(x, y) (x >= gfx.ex && x < gfx.ex + gfx.exsize && \
- y >= gfx.ey && y < gfx.ey + gfx.eysize)
-
-/* values for mouse cursor */
-#define CURSOR_DEFAULT 0
-#define CURSOR_NONE 1
-#define CURSOR_PLAYFIELD 2
-
-/* fundamental game speed values */
-#define ONE_SECOND_DELAY 1000 /* delay value for one second */
-#define MENU_FRAME_DELAY 20 /* frame delay in milliseconds */
-#define GAME_FRAME_DELAY 20 /* frame delay in milliseconds */
-#define FFWD_FRAME_DELAY 10 /* 200% speed for fast forward */
-#define FRAMES_PER_SECOND (ONE_SECOND_DELAY / GAME_FRAME_DELAY)
-#define FRAMES_PER_SECOND_SP 35
-
-/* maximum playfield size supported by libgame functions */
-#define MAX_PLAYFIELD_WIDTH 128
-#define MAX_PLAYFIELD_HEIGHT 128
-
-/* 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
-
-/* maximum number of levels in a level set */
-#define MAX_LEVELS 1000
-
-/* maximum number of global animation and parts */
+// values for move directions and special "button" key bitmasks
+#define MV_NONE 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 MV_UPLEFT (MV_UP | MV_LEFT)
+#define MV_UPRIGHT (MV_UP | MV_RIGHT)
+#define MV_DOWNLEFT (MV_DOWN | MV_LEFT)
+#define MV_DOWNRIGHT (MV_DOWN | MV_RIGHT)
+
+#define MV_HORIZONTAL (MV_LEFT | MV_RIGHT)
+#define MV_VERTICAL (MV_UP | MV_DOWN)
+#define MV_ALL_DIRECTIONS (MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
+#define MV_ANY_DIRECTION (MV_ALL_DIRECTIONS)
+#define MV_NO_DIRECTION (MV_NONE)
+
+#define KEY_BUTTON_1 (1 << BUTTON_1)
+#define KEY_BUTTON_2 (1 << BUTTON_2)
+#define KEY_BUTTON_SNAP KEY_BUTTON_1
+#define KEY_BUTTON_DROP KEY_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 KEY_SET_FOCUS (1 << BIT_SET_FOCUS)
+
+#define MV_DIR_FROM_BIT(x) ((x) < NUM_DIRECTIONS ? 1 << (x) : \
+ (x) == MV_BIT_UPLEFT ? MV_UPLEFT : \
+ (x) == MV_BIT_UPRIGHT ? MV_UPRIGHT : \
+ (x) == MV_BIT_DOWNLEFT ? MV_DOWNLEFT : \
+ (x) == MV_BIT_DOWNRIGHT ? MV_DOWNRIGHT : \
+ MV_NONE)
+
+#define MV_DIR_TO_BIT(x) ((x) == MV_LEFT ? MV_BIT_LEFT : \
+ (x) == MV_RIGHT ? MV_BIT_RIGHT : \
+ (x) == MV_UP ? MV_BIT_UP : \
+ (x) == MV_DOWN ? MV_BIT_DOWN : \
+ (x) == MV_UPLEFT ? MV_BIT_UPLEFT : \
+ (x) == MV_UPRIGHT ? MV_BIT_UPRIGHT : \
+ (x) == MV_DOWNLEFT ? MV_BIT_DOWNLEFT : \
+ (x) == MV_DOWNRIGHT ? MV_BIT_DOWNRIGHT : \
+ MV_BIT_DOWN)
+
+#define MV_DIR_OPPOSITE(x) ((x) == MV_LEFT ? MV_RIGHT : \
+ (x) == MV_RIGHT ? MV_LEFT : \
+ (x) == MV_UP ? MV_DOWN : \
+ (x) == MV_DOWN ? MV_UP : \
+ (x) == MV_UPLEFT ? MV_DOWNRIGHT : \
+ (x) == MV_UPRIGHT ? MV_DOWNLEFT : \
+ (x) == MV_DOWNLEFT ? MV_UPRIGHT : \
+ (x) == MV_DOWNRIGHT ? MV_UPLEFT : \
+ MV_NONE)
+
+// values for animation mode (frame order and direction)
+// (stored in level files -- never change existing values)
+#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_CE_VALUE (1 << 5)
+#define ANIM_CE_SCORE (1 << 6)
+#define ANIM_CE_DELAY (1 << 7)
+#define ANIM_REVERSE (1 << 8)
+#define ANIM_OPAQUE_PLAYER (1 << 9)
+#define ANIM_LEVEL_NR (1 << 10)
+
+// values for special (non game element) animation modes
+// (not stored in level files -- can be changed, if needed)
+#define ANIM_HORIZONTAL (1 << 11)
+#define ANIM_VERTICAL (1 << 12)
+#define ANIM_CENTERED (1 << 13)
+#define ANIM_STATIC_PANEL (1 << 14)
+#define ANIM_ALL (1 << 15)
+#define ANIM_ONCE (1 << 16)
+#define ANIM_TILED (1 << 17)
+#define ANIM_RANDOM_STATIC (1 << 18)
+
+#define ANIM_DEFAULT ANIM_LOOP
+
+// values for special global animation events
+#define ANIM_EVENT_UNDEFINED -1
+#define ANIM_EVENT_NONE 0
+#define ANIM_EVENT_SELF (1 << 0)
+#define ANIM_EVENT_ANY (1 << 1)
+#define ANIM_EVENT_CLICK (1 << 2)
+#define ANIM_EVENT_INIT (1 << 3)
+#define ANIM_EVENT_START (1 << 4)
+#define ANIM_EVENT_END (1 << 5)
+#define ANIM_EVENT_POST (1 << 6)
+#define ANIM_EVENT_UNCLICK_ANY (1 << 7)
+#define ANIM_EVENT_CE_CHANGE (1 << 8)
+
+// event mask: bits 0-15
+// CE number: bits 16-23
+// anim number: bits 16-23
+// page number: bits 24-31
+// part number: bits 24-31
+#define ANIM_EVENT_CE_BIT 16
+#define ANIM_EVENT_ANIM_BIT 16
+#define ANIM_EVENT_PAGE_BIT 24
+#define ANIM_EVENT_PART_BIT 24
+
+#define ANIM_EVENT_CE_MASK (0xff << ANIM_EVENT_CE_BIT)
+#define ANIM_EVENT_ANIM_MASK (0xff << ANIM_EVENT_ANIM_BIT)
+#define ANIM_EVENT_PAGE_MASK (0xff << ANIM_EVENT_PAGE_BIT)
+#define ANIM_EVENT_PART_MASK (0xff << ANIM_EVENT_PART_BIT)
+
+#define ANIM_EVENT_DEFAULT ANIM_EVENT_NONE
+
+// values for special global animation event actions
+#define ANIM_EVENT_ACTION_NONE -1
+
+// values for special global animation delay types
+#define ANIM_DELAY_UNDEFINED -1
+#define ANIM_DELAY_NONE 0
+#define ANIM_DELAY_INIT 1
+#define ANIM_DELAY_ANIM 2
+#define ANIM_DELAY_POST 3
+
+// values for special global animation delay actions
+#define ANIM_DELAY_ACTION_NONE -1
+
+// values for special drawing styles and event handling
+#define STYLE_NONE 0
+
+// values used for crumbled graphics
+#define STYLE_ACCURATE_BORDERS (1 << 0)
+#define STYLE_INNER_CORNERS (1 << 1)
+
+// values used for game panel graphics
+#define STYLE_REVERSE (1 << 2)
+#define STYLE_LEFTMOST_POSITION (1 << 3)
+
+// values used for global animations
+#define STYLE_BLOCK (1 << 4)
+#define STYLE_PASSTHROUGH (1 << 5)
+#define STYLE_MULTIPLE_ACTIONS (1 << 6)
+#define STYLE_CONSUME_CE_EVENT (1 << 7)
+
+#define STYLE_DEFAULT STYLE_NONE
+
+// values for fade mode
+#define FADE_TYPE_NONE 0
+#define FADE_TYPE_FADE_IN (1 << 0)
+#define FADE_TYPE_FADE_OUT (1 << 1)
+#define FADE_TYPE_TRANSFORM (1 << 2)
+#define FADE_TYPE_CROSSFADE (1 << 3)
+#define FADE_TYPE_MELT (1 << 4)
+#define FADE_TYPE_CURTAIN (1 << 5)
+#define FADE_TYPE_SKIP (1 << 6)
+
+#define FADE_MODE_NONE (FADE_TYPE_NONE)
+#define FADE_MODE_FADE_IN (FADE_TYPE_FADE_IN)
+#define FADE_MODE_FADE_OUT (FADE_TYPE_FADE_OUT)
+#define FADE_MODE_FADE (FADE_TYPE_FADE_IN | FADE_TYPE_FADE_OUT)
+#define FADE_MODE_TRANSFORM (FADE_TYPE_TRANSFORM | FADE_TYPE_FADE_IN)
+#define FADE_MODE_CROSSFADE (FADE_MODE_TRANSFORM | FADE_TYPE_CROSSFADE)
+#define FADE_MODE_MELT (FADE_MODE_TRANSFORM | FADE_TYPE_MELT)
+#define FADE_MODE_CURTAIN (FADE_MODE_TRANSFORM | FADE_TYPE_CURTAIN)
+#define FADE_MODE_SKIP_FADE_IN (FADE_TYPE_SKIP | FADE_TYPE_FADE_IN)
+#define FADE_MODE_SKIP_FADE_OUT (FADE_TYPE_SKIP | FADE_TYPE_FADE_OUT)
+
+#define FADE_MODE_DEFAULT FADE_MODE_FADE
+
+#define AUTO_DELAY_UNIT_MS 0
+#define AUTO_DELAY_UNIT_FRAMES 1
+
+#define AUTO_DELAY_UNIT_DEFAULT AUTO_DELAY_UNIT_MS
+
+// values for toon positions
+#define POS_UNDEFINED -1
+#define POS_LEFT 0
+#define POS_RIGHT 1
+#define POS_TOP 2
+#define POS_UPPER 3
+#define POS_MIDDLE 4
+#define POS_LOWER 5
+#define POS_BOTTOM 6
+#define POS_ANY 7
+#define POS_CE 8
+#define POS_CE_TRIGGER 9
+#define POS_LAST 10
+
+// values for text alignment
+#define ALIGN_LEFT (1 << 0)
+#define ALIGN_RIGHT (1 << 1)
+#define ALIGN_CENTER (1 << 2)
+#define ALIGN_DEFAULT ALIGN_LEFT
+
+#define VALIGN_TOP (1 << 0)
+#define VALIGN_BOTTOM (1 << 1)
+#define VALIGN_MIDDLE (1 << 2)
+#define VALIGN_DEFAULT VALIGN_TOP
+
+#define ALIGNED_XPOS(x, w, a) ((a) == ALIGN_CENTER ? (x) - (w) / 2 : \
+ (a) == ALIGN_RIGHT ? (x) - (w) : (x))
+#define ALIGNED_YPOS(y, h, v) ((v) == VALIGN_MIDDLE ? (y) - (h) / 2 : \
+ (v) == VALIGN_BOTTOM ? (y) - (h) : (y))
+#define ALIGNED_TEXT_XPOS(p) ALIGNED_XPOS((p)->x, (p)->width, (p)->align)
+#define ALIGNED_TEXT_YPOS(p) ALIGNED_YPOS((p)->y, (p)->height, (p)->valign)
+#define ALIGNED_VP_XPOS(p) ALIGNED_TEXT_XPOS(p)
+#define ALIGNED_VP_YPOS(p) ALIGNED_TEXT_YPOS(p)
+
+// values for redraw_mask
+#define REDRAW_NONE (0)
+#define REDRAW_ALL (1 << 0)
+#define REDRAW_FIELD (1 << 1)
+#define REDRAW_DOOR_1 (1 << 2)
+#define REDRAW_DOOR_2 (1 << 3)
+#define REDRAW_DOOR_3 (1 << 4)
+#define REDRAW_FPS (1 << 5)
+
+#define REDRAW_DOORS (REDRAW_DOOR_1 | \
+ REDRAW_DOOR_2 | \
+ REDRAW_DOOR_3)
+
+#define IN_GFX_FIELD_PLAY(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
+ y >= gfx.sy && y < gfx.sy + gfx.sysize)
+#define IN_GFX_FIELD_FULL(x, y) (x >= gfx.real_sx && \
+ x < gfx.real_sx + gfx.full_sxsize && \
+ y >= gfx.real_sy && \
+ y < gfx.real_sy + gfx.full_sysize)
+#define IN_GFX_DOOR_1(x, y) (x >= gfx.dx && x < gfx.dx + gfx.dxsize && \
+ y >= gfx.dy && y < gfx.dy + gfx.dysize)
+#define IN_GFX_DOOR_2(x, y) (x >= gfx.vx && x < gfx.vx + gfx.vxsize && \
+ y >= gfx.vy && y < gfx.vy + gfx.vysize)
+#define IN_GFX_DOOR_3(x, y) (x >= gfx.ex && x < gfx.ex + gfx.exsize && \
+ y >= gfx.ey && y < gfx.ey + gfx.eysize)
+
+// values for mouse cursor
+#define CURSOR_UNDEFINED -1
+#define CURSOR_DEFAULT 0
+#define CURSOR_NONE 1
+#define CURSOR_PLAYFIELD 2
+
+// fundamental game speed values
+#define ONE_SECOND_DELAY 1000 // delay value for one second
+#define MENU_FRAME_DELAY 20 // frame delay in milliseconds
+#define GAME_FRAME_DELAY 20 // frame delay in milliseconds
+#define FFWD_FRAME_DELAY 10 // 200% speed for fast forward
+#define MIN_VSYNC_FRAME_DELAY 15 // minimum value for vsync to keep
+#define MAX_VSYNC_FRAME_DELAY 16 // maximum value for vsync to work
+#define FRAMES_PER_SECOND (ONE_SECOND_DELAY / GAME_FRAME_DELAY)
+#define FRAMES_PER_SECOND_SP 35
+#define FRAMES_PER_SECOND_PAL 50
+#define FRAMES_PER_SECOND_NTSC 60
+
+// maximum playfield size supported by libgame functions
+#define MAX_PLAYFIELD_WIDTH 128
+#define MAX_PLAYFIELD_HEIGHT 128
+
+// maximum number of parallel players supported by libgame functions
+#define MAX_PLAYERS 4
+
+// maximum number of player names
+#define MAX_PLAYER_NAMES 12
+
+// maximum allowed length of player name
+#define MAX_PLAYER_NAME_LEN 10
+
+// maximum number of levels in a level set
+#define MAX_LEVELS 1000
+
+// maximum number of global animation and parts