-#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 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
+#define DEFAULT_KEY_FOCUS_PLAYER_1 KSYM_F5
+#define DEFAULT_KEY_FOCUS_PLAYER_2 KSYM_F6
+#define DEFAULT_KEY_FOCUS_PLAYER_3 KSYM_F7
+#define DEFAULT_KEY_FOCUS_PLAYER_4 KSYM_F8
+#define DEFAULT_KEY_FOCUS_PLAYER_ALL KSYM_F9
+#define DEFAULT_KEY_TAPE_EJECT KSYM_UNDEFINED
+#define DEFAULT_KEY_TAPE_EXTRA KSYM_UNDEFINED
+#define DEFAULT_KEY_TAPE_STOP KSYM_UNDEFINED
+#define DEFAULT_KEY_TAPE_PAUSE KSYM_UNDEFINED
+#define DEFAULT_KEY_TAPE_RECORD KSYM_UNDEFINED
+#define DEFAULT_KEY_TAPE_PLAY KSYM_UNDEFINED
+#define DEFAULT_KEY_SOUND_SIMPLE KSYM_UNDEFINED
+#define DEFAULT_KEY_SOUND_LOOPS KSYM_UNDEFINED
+#define DEFAULT_KEY_SOUND_MUSIC KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_LEFT KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_RIGHT KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_UP KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_DOWN KSYM_UNDEFINED
+
+// default debug setup keys and values
+#define DEFAULT_FRAME_DELAY_0 20 // 100 % speed
+#define DEFAULT_FRAME_DELAY_1 500 // 4 % speed
+#define DEFAULT_FRAME_DELAY_2 250 // 8 % speed
+#define DEFAULT_FRAME_DELAY_3 125 // 16 % speed
+#define DEFAULT_FRAME_DELAY_4 60 // 33 % speed
+#define DEFAULT_FRAME_DELAY_5 40 // 50 % speed
+#define DEFAULT_FRAME_DELAY_6 30 // 66 % speed
+#define DEFAULT_FRAME_DELAY_7 10 // 200 % speed
+#define DEFAULT_FRAME_DELAY_8 5 // 400 % speed
+#define DEFAULT_FRAME_DELAY_9 0 // maximum speed
+
+#define DEFAULT_KEY_FRAME_DELAY_0 KSYM_0
+#define DEFAULT_KEY_FRAME_DELAY_1 KSYM_1
+#define DEFAULT_KEY_FRAME_DELAY_2 KSYM_2
+#define DEFAULT_KEY_FRAME_DELAY_3 KSYM_3
+#define DEFAULT_KEY_FRAME_DELAY_4 KSYM_4
+#define DEFAULT_KEY_FRAME_DELAY_5 KSYM_5
+#define DEFAULT_KEY_FRAME_DELAY_6 KSYM_6
+#define DEFAULT_KEY_FRAME_DELAY_7 KSYM_7
+#define DEFAULT_KEY_FRAME_DELAY_8 KSYM_8
+#define DEFAULT_KEY_FRAME_DELAY_9 KSYM_9
+
+#define NUM_DEBUG_FRAME_DELAY_KEYS 10
+
+#define DEFAULT_FRAME_DELAY_USE_MOD_KEY FALSE
+#define DEFAULT_FRAME_DELAY_GAME_ONLY TRUE
+
+// 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
+#define MB_WHEEL_UP 4
+#define MB_WHEEL_DOWN 5
+#define MB_WHEEL_LEFT 6
+#define MB_WHEEL_RIGHT 7
+#define IS_WHEEL_BUTTON_VERTICAL(b) ((b) == MB_WHEEL_UP || \
+ (b) == MB_WHEEL_DOWN)
+#define IS_WHEEL_BUTTON_HORIZONTAL(b) ((b) == MB_WHEEL_LEFT || \
+ (b) == MB_WHEEL_RIGHT)
+#define IS_WHEEL_BUTTON(b) (IS_WHEEL_BUTTON_VERTICAL(b) || \
+ IS_WHEEL_BUTTON_HORIZONTAL(b))
+#define DEFAULT_WHEEL_STEPS 3
+
+#define BUTTON_STEPSIZE(b) ((b) == MB_LEFTBUTTON ? 1 : \
+ (b) == MB_MIDDLEBUTTON ? 5 : \
+ (b) == MB_RIGHTBUTTON ? 10 : 1)
+
+// 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
+
+// diagonal movement directions are used in a different contect than buttons
+#define MV_BIT_UPLEFT 4
+#define MV_BIT_UPRIGHT 5
+#define MV_BIT_DOWNLEFT 6
+#define MV_BIT_DOWNRIGHT 7
+
+#define NUM_DIRECTIONS_FULL 8
+
+// values for special "button" bitmasks
+#define BUTTON_1 4
+#define BUTTON_2 5
+
+#define NUM_PLAYER_ACTIONS 6
+
+// values for special "focus player" bitmasks
+#define BIT_SET_FOCUS 6
+
+// values for drawing stages for global animations
+#define DRAW_GLOBAL_ANIM_STAGE_1 1
+#define DRAW_GLOBAL_ANIM_STAGE_2 2
+
+// values for drawing target (various functions)
+#define DRAW_TO_BACKBUFFER 0
+#define DRAW_TO_FIELDBUFFER 1
+#define DRAW_TO_SCREEN 2
+#define DRAW_TO_FADE_SOURCE 3
+#define DRAW_TO_FADE_TARGET 4
+
+// values for move directions and special "button" key bitmasks
+#define MV_NONE 0