X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=f3da4ad15bf6d0b5a771638b78b0785a88578c86;hp=630dce8573face1ad389ca539d2aa4d72fedb1f6;hb=7d85a53b341ca7a3dca87b6f2ccebf45ddf96c92;hpb=499ad3bb12d513266ddcebe41a84eee8237a7fb5 diff --git a/src/libgame/system.h b/src/libgame/system.h index 630dce85..f3da4ad1 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 @@ -321,6 +326,7 @@ #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 @@ -517,6 +523,7 @@ /* file names and filename extensions */ #define LEVELSETUP_DIRECTORY "levelsetup" #define SETUP_FILENAME "setup.conf" +#define AUTOSETUP_FILENAME "autosetup.conf" #define LEVELSETUP_FILENAME "levelsetup.conf" #define EDITORSETUP_FILENAME "editorsetup.conf" #define EDITORCASCADE_FILENAME "editorcascade.conf" @@ -869,8 +876,11 @@ struct FontBitmapInfo { 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 */ @@ -939,10 +949,24 @@ 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) */ + 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 */ @@ -994,6 +1018,10 @@ struct SetupEditorInfo boolean el_supaplex; boolean el_diamond_caves; boolean el_dx_boulderdash; + + boolean el_mirror_magic; + boolean el_deflektor; + boolean el_chars; boolean el_steel_chars; @@ -1012,6 +1040,11 @@ struct SetupEditorInfo boolean use_template_for_new_levels; }; +struct SetupAutoSetupInfo +{ + int editor_zoom_tilesize; +}; + struct SetupEditorCascadeInfo { boolean el_bd; @@ -1022,6 +1055,8 @@ struct SetupEditorCascadeInfo boolean el_sp; boolean el_dc; boolean el_dx; + boolean el_mm; + boolean el_df; boolean el_chars; boolean el_steel_chars; boolean el_ce; @@ -1090,6 +1125,7 @@ struct SetupInternalInfo int default_window_height; boolean choose_from_top_leveldir; + boolean show_scaling_in_title; }; struct SetupDebugInfo @@ -1148,6 +1184,7 @@ struct SetupInfo int volume_loops; int volume_music; + struct SetupAutoSetupInfo auto_setup; struct SetupEditorInfo editor; struct SetupEditorCascadeInfo editor_cascade; struct SetupShortcutInfo shortcut; @@ -1182,6 +1219,11 @@ struct TreeInfo 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 */ @@ -1401,6 +1443,17 @@ struct TextPosInfo boolean draw_player; /* special case for network player buttons */ int sort_priority; /* also used for suffix ".draw_order" */ int id; + + int direction; /* needed for panel time/health graphics */ + int class; /* needed for panel time/health graphics */ + int style; /* needed for panel time/health graphics */ +}; + +struct MouseActionInfo +{ + int lx, ly; + int button; + int button_hint; }; struct LevelStats @@ -1419,6 +1472,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; @@ -1473,9 +1527,16 @@ 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 SetTileCursorSXSY(int, int); void SetOverlayEnabled(boolean); void SetOverlayActive(boolean); boolean GetOverlayActive(); @@ -1489,6 +1550,7 @@ void SetRedrawMaskFromArea(int, int, int, int); void LimitScreenUpdates(boolean); +void InitVideoDefaults(void); void InitVideoDisplay(void); void CloseVideoDisplay(void); void InitVideoBuffer(int, int, int, boolean); @@ -1504,6 +1566,7 @@ void FillRectangle(Bitmap *, int, int, int, int, Pixel); void ClearRectangle(Bitmap *, int, int, int, int); void ClearRectangleOnBackground(Bitmap *, int, int, int, int); void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); +boolean DrawingDeactivatedField(void); boolean DrawingDeactivated(int, int, int, int); boolean DrawingOnBackground(int, int); boolean DrawingAreaChanged(); @@ -1543,8 +1606,9 @@ void CloseAudio(void); void SetAudioMode(boolean); boolean PendingEvent(void); -void NextEvent(Event *event); +void WaitEvent(Event *event); void PeekEvent(Event *event); +void CheckQuitEvent(void); Key GetEventKey(KeyEvent *, boolean); KeyMod HandleKeyModState(Key, int); KeyMod GetKeyModState();