X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=a2226a78d8228e9b5229a43618122060eb734a7b;hp=d11f71b4bf56962f43c34efe73da8c9cd0230bf4;hb=c9308ba3e7ddea2d7e44b4d98f0dfbb19e18f04f;hpb=33775032e403b28c89ee7c60b64a456d30a013fb diff --git a/src/libgame/system.h b/src/libgame/system.h index d11f71b4..a2226a78 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -83,11 +83,16 @@ #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 @@ -944,10 +949,21 @@ struct GfxInfo 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) */ + + 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 */ +}; + struct OverlayInfo { boolean enabled; /* overlay generally enabled or disabled */ @@ -1452,6 +1468,7 @@ extern struct OptionInfo options; 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; @@ -1506,9 +1523,15 @@ void InitGfxClipRegion(boolean, int, int, int, int); 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 SetOverlayEnabled(boolean); void SetOverlayActive(boolean); boolean GetOverlayActive();