#endif
/* values for touch control */
+#define TOUCH_CONTROL_OFF "off"
#define TOUCH_CONTROL_VIRTUAL_BUTTONS "virtual_buttons"
#define TOUCH_CONTROL_WIPE_GESTURES "wipe_gestures"
#define TOUCH_CONTROL_FOLLOW_FINGER "follow_finger"
+#if defined(PLATFORM_ANDROID)
#define TOUCH_CONTROL_DEFAULT TOUCH_CONTROL_VIRTUAL_BUTTONS
+#else
+#define TOUCH_CONTROL_DEFAULT TOUCH_CONTROL_OFF
+#endif
#define TOUCH_MOVE_DISTANCE_DEFAULT 2
#define TOUCH_DROP_DISTANCE_DEFAULT 5
#define SCREEN_KEYBOARD_POS(h) ((h) / 2)
#endif
-
/* default input keys */
#define DEFAULT_KEY_LEFT KSYM_Left
#define DEFAULT_KEY_RIGHT KSYM_Right
#define MAX_GLOBAL_ANIMS 32
#define MAX_GLOBAL_ANIM_PARTS 32
+/* minimum/maximum/default x/y grid size for virtual buttons */
+#define MIN_GRID_XSIZE 3
+#define MIN_GRID_YSIZE 3
+#define MAX_GRID_XSIZE 32
+#define MAX_GRID_YSIZE 32
+#define DEFAULT_GRID_XSIZE 18
+#define DEFAULT_GRID_YSIZE MIN(MAX(MIN_GRID_YSIZE, \
+ DEFAULT_GRID_XSIZE * \
+ video.screen_height / \
+ video.screen_width), \
+ MAX_GRID_YSIZE)
+
+/* values for grid button characters for virtual buttons */
+#define CHAR_GRID_BUTTON_NONE ' '
+#define CHAR_GRID_BUTTON_LEFT '<'
+#define CHAR_GRID_BUTTON_RIGHT '>'
+#define CHAR_GRID_BUTTON_UP '^'
+#define CHAR_GRID_BUTTON_DOWN 'v'
+#define CHAR_GRID_BUTTON_SNAP '1'
+#define CHAR_GRID_BUTTON_DROP '2'
+
/* default name for empty highscore entry */
#define EMPTY_PLAYER_NAME "no name"
/* 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_PART_1(x) ((x) / 1000000)
+#define VERSION_PART_2(x) (((x) % 1000000) / 10000)
+#define VERSION_PART_3(x) (((x) % 10000) / 100)
+#define VERSION_PART_4(x) ((x) % 100)
+
+#define VERSION_SUPER(x) VERSION_PART_1(x)
+#define VERSION_MAJOR(x) VERSION_PART_2(x)
+#define VERSION_MINOR(x) VERSION_PART_3(x)
+#define VERSION_PATCH(x) VERSION_PART_4(x)
#define VERSION_IDENT(a,b,c,d) ((a) * 1000000 + (b) * 10000 + (c) * 100 + (d))
FILE *log_file[NUM_LOGS]; /* log file handles for out/err files */
FILE *log_file_default[NUM_LOGS]; /* default log file handles (out/err) */
+ int version_super;
int version_major;
int version_minor;
int version_patch;
- int version_build;
int version_ident;
char *version_string;
{
Bitmap *bitmap;
- int src_x, src_y; /* start position of animation frames */
- int width, height; /* width/height of each animation frame */
+ int src_x, src_y; /* start position of font characters */
+ int width, height; /* width / height of font characters */
+
+ int offset_x; /* offset to next font character */
+ int offset_y; /* offset to next font character */
int draw_xoffset; /* offset for drawing font characters */
int draw_yoffset; /* offset for drawing font characters */
void (*draw_busy_anim_function)(void);
void (*draw_global_anim_function)(int, int);
void (*draw_global_border_function)(int);
+ void (*draw_tile_cursor_function)(int);
int cursor_mode;
};
+struct TileCursorInfo
+{
+ boolean enabled; /* tile cursor generally enabled or disabled */
+ boolean active; /* tile cursor activated (depending on game) */
+ boolean moving; /* tile cursor moving to target position */
+
+ int xpos, ypos; /* tile cursor level playfield position */
+ int x, y; /* tile cursor current screen position */
+ int target_x, target_y; /* tile cursor target screen position */
+
+ int sx, sy; /* tile cursor screen start position */
+};
+
struct OverlayInfo
{
boolean enabled; /* overlay generally enabled or disabled */
boolean active; /* overlay activated (depending on game mode) */
+
+ boolean show_grid;
+ boolean show_grid_buttons;
+
+ int grid_xsize;
+ int grid_ysize;
+
+ char grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
+ char grid_button_highlight;
};
struct JoystickInfo
char *name_sorting; /* optional sorting name for correct name sorting */
char *author; /* level or artwork author name */
char *year; /* optional year of creation for levels or artwork */
+
+ char *program_title; /* optional alternative text for program title */
+ char *program_copyright; /* optional alternative text for program copyright */
+ char *program_company; /* optional alternative text for program company */
+
char *imported_from; /* optional comment for imported levels or artwork */
char *imported_by; /* optional comment for imported levels or artwork */
char *tested_by; /* optional comment to name people who tested a set */
{
int lx, ly;
int button;
+ int button_hint;
};
struct LevelStats
extern struct VideoSystemInfo video;
extern struct AudioSystemInfo audio;
extern struct GfxInfo gfx;
+extern struct TileCursorInfo tile_cursor;
extern struct OverlayInfo overlay;
extern struct AnimInfo anim;
extern struct ArtworkInfo artwork;
void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void));
void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(int, int));
void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int));
+void InitGfxDrawTileCursorFunction(void (*draw_tile_cursor_function)(int));
void InitGfxCustomArtworkInfo();
void InitGfxOtherSettings();
+void InitTileCursorInfo();
void InitOverlayInfo();
+void SetTileCursorEnabled(boolean);
+void SetTileCursorActive(boolean);
+void SetTileCursorTargetXY(int, int);
+void SetTileCursorXY(int, int);
+void SetTileCursorSXSY(int, int);
void SetOverlayEnabled(boolean);
void SetOverlayActive(boolean);
+void SetOverlayShowGrid(boolean);
boolean GetOverlayActive();
void SetDrawDeactivationMask(int);
int GetDrawDeactivationMask(void);
void LimitScreenUpdates(boolean);
+void InitVideoDefaults(void);
void InitVideoDisplay(void);
void CloseVideoDisplay(void);
void InitVideoBuffer(int, int, int, boolean);