X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=6580d083b37f3cafa6fe87a7e1a2ad64e86feb5c;hb=959794cfda1f83edc51512211ae5a9f6b1e0b179;hp=dfa7a4f73cd1af11b0cffa925416f02e14ba9b19;hpb=68d1418be737276c8214780106399c0dae588d1c;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index dfa7a4f7..6580d083 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -22,8 +22,6 @@ #include "macosx.h" #elif defined(PLATFORM_WIN32) #include "windows.h" -#elif defined(PLATFORM_MSDOS) -#include "msdos.h" #elif defined(PLATFORM_ANDROID) #include "android.h" #endif @@ -60,6 +58,23 @@ #define MAX_WINDOW_SCALING_PERCENT 300 #define STEP_WINDOW_SCALING_PERCENT 10 +/* values for window scaling quality */ +#define SCALING_QUALITY_NEAREST "nearest" +#define SCALING_QUALITY_LINEAR "linear" +#define SCALING_QUALITY_BEST "best" + +#define SCALING_QUALITY_DEFAULT SCALING_QUALITY_LINEAR + +/* values for touch control */ +#define TOUCH_CONTROL_VIRTUAL_BUTTONS "virtual_buttons" +#define TOUCH_CONTROL_WIPE_GESTURES "wipe_gestures" + +#define TOUCH_CONTROL_DEFAULT TOUCH_CONTROL_VIRTUAL_BUTTONS + +#define TOUCH_MOVE_DISTANCE_DEFAULT 2 +#define TOUCH_DROP_DISTANCE_DEFAULT 5 + + /* default input keys */ #define DEFAULT_KEY_LEFT KSYM_Left #define DEFAULT_KEY_RIGHT KSYM_Right @@ -310,12 +325,18 @@ #define REDRAWTILES_THRESHOLD 0 #endif -#define IN_GFX_SCREEN(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \ +#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_DOOR(x, y) (x >= gfx.dx && x < gfx.dx + gfx.dxsize && \ +#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_VIDEO(x, y) (x >= gfx.vx && x < gfx.vx + gfx.vxsize && \ +#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 @@ -365,7 +386,10 @@ /* default values for undefined configuration file parameters */ #define ARG_UNDEFINED "-1000000" -#define ARG_UNDEFINED_VALUE (atoi(ARG_UNDEFINED)) +#define ARG_UNDEFINED_VALUE (-1000000) + +/* default value for off-screen positions */ +#define POS_OFFSCREEN (-1000000) /* definitions for game sub-directories */ #ifndef RO_GAME_DIR @@ -389,15 +413,9 @@ #define DOCS_DIRECTORY "docs" #define CACHE_DIRECTORY "cache" -#if !defined(PLATFORM_MSDOS) #define GFX_CLASSIC_SUBDIR "gfx_classic" #define SND_CLASSIC_SUBDIR "snd_classic" #define MUS_CLASSIC_SUBDIR "mus_classic" -#else -#define GFX_CLASSIC_SUBDIR "gfx_orig" -#define SND_CLASSIC_SUBDIR "snd_orig" -#define MUS_CLASSIC_SUBDIR "mus_orig" -#endif #if defined(CREATE_SPECIAL_EDITION_RND_JUE) #define GFX_DEFAULT_SUBDIR "jue0" @@ -416,7 +434,6 @@ #endif /* file names and filename extensions */ -#if !defined(PLATFORM_MSDOS) #define LEVELSETUP_DIRECTORY "levelsetup" #define SETUP_FILENAME "setup.conf" #define LEVELSETUP_FILENAME "levelsetup.conf" @@ -432,23 +449,6 @@ #define LEVELFILE_EXTENSION "level" #define TAPEFILE_EXTENSION "tape" #define SCOREFILE_EXTENSION "score" -#else -#define LEVELSETUP_DIRECTORY "lvlsetup" -#define SETUP_FILENAME "setup.cnf" -#define LEVELSETUP_FILENAME "lvlsetup.cnf" -#define EDITORSETUP_FILENAME "edsetup.cnf" -#define EDITORCASCADE_FILENAME "edcascad.conf" -#define HELPANIM_FILENAME "helpanim.cnf" -#define HELPTEXT_FILENAME "helptext.cnf" -#define LEVELINFO_FILENAME "lvlinfo.cnf" -#define GRAPHICSINFO_FILENAME "gfxinfo.cnf" -#define SOUNDSINFO_FILENAME "sndinfo.cnf" -#define MUSICINFO_FILENAME "musinfo.cnf" -#define ARTWORKINFO_CACHE_FILE "artinfo.cac" -#define LEVELFILE_EXTENSION "lvl" -#define TAPEFILE_EXTENSION "tap" -#define SCOREFILE_EXTENSION "sco" -#endif #define ERROR_BASENAME "stderr.txt" @@ -461,7 +461,7 @@ #define STRING_NEWLINE_UNIX "\n" #define STRING_NEWLINE_DOS "\r\n" -#if defined(PLATFORM_WIN32) || defined(PLATFORM_MSDOS) +#if defined(PLATFORM_WIN32) #define CHAR_PATH_SEPARATOR CHAR_PATH_SEPARATOR_DOS #define STRING_PATH_SEPARATOR STRING_PATH_SEPARATOR_DOS #define STRING_NEWLINE STRING_NEWLINE_DOS @@ -683,7 +683,6 @@ struct ProgramInfo char *x11_icon_filename; char *x11_iconmask_filename; char *sdl_icon_filename; - char *msdos_cursor_filename; char *cookie_prefix; char *filename_prefix; /* prefix to cut off from DOS filenames */ @@ -695,6 +694,7 @@ struct ProgramInfo int version_minor; int version_patch; + char *(*window_title_function)(void); void (*exit_message_function)(char *, va_list); void (*exit_function)(int); }; @@ -743,6 +743,7 @@ struct VideoSystemInfo boolean window_scaling_available; int window_scaling_percent; + char *window_scaling_quality; }; struct AudioSystemInfo @@ -796,6 +797,9 @@ struct GfxInfo int vx, vy; int vxsize, vysize; + int ex, ey; + int exsize, eysize; + int win_xsize, win_ysize; int draw_deactivation_mask; @@ -847,6 +851,13 @@ struct SetupKeyboardInfo Key snap, drop; }; +struct SetupTouchInfo +{ + char *control_type; + int move_distance; + int drop_distance; +}; + struct SetupInputInfo { boolean use_joystick; @@ -953,6 +964,7 @@ struct SetupInfo boolean fullscreen; char *fullscreen_mode; int window_scaling_percent; + char *window_scaling_quality; boolean ask_on_escape; boolean ask_on_escape_editor; boolean quick_switch; @@ -977,6 +989,7 @@ struct SetupInfo struct SetupEditorCascadeInfo editor_cascade; struct SetupShortcutInfo shortcut; struct SetupInputInfo input[MAX_PLAYERS]; + struct SetupTouchInfo touch; struct SetupSystemInfo system; struct OptionInfo options; }; @@ -1190,6 +1203,19 @@ struct MenuPosInfo int align, valign; }; +struct DoorPartPosInfo +{ + int x, y; + int step_xoffset; + int step_yoffset; + int step_delay; + int start_step; + int start_step_opening; + int start_step_closing; + boolean draw_masked; + int sort_priority; +}; + struct TextPosInfo { int x, y; @@ -1198,6 +1224,7 @@ struct TextPosInfo int size; int font, font_alt; boolean draw_masked; + boolean draw_player; /* special case for network player buttons */ int sort_priority; int id; }; @@ -1253,9 +1280,17 @@ extern int FrameCounter; /* function definitions */ +#if 1 +void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, + char *, char *, char *, int); +#else void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, char *, char *, char *, char *, char *, int); +#endif + +void SetWindowTitle(); +void InitWindowTitleFunction(char *(*window_title_function)(void)); void InitExitMessageFunction(void (*exit_message_function)(char *, va_list)); void InitExitFunction(void (*exit_function)(int)); void InitPlatformDependentStuff(void); @@ -1264,6 +1299,7 @@ void ClosePlatformDependentStuff(void); void InitGfxFieldInfo(int, int, int, int, int, int, int, int, Bitmap *); void InitGfxDoor1Info(int, int, int, int); void InitGfxDoor2Info(int, int, int, int); +void InitGfxDoor3Info(int, int, int, int); void InitGfxWindowInfo(int, int); void InitGfxScrollbufferInfo(int, int); void InitGfxClipRegion(boolean, int, int, int, int); @@ -1275,6 +1311,8 @@ void SetWindowBackgroundBitmap(Bitmap *); void SetMainBackgroundBitmap(Bitmap *); void SetDoorBackgroundBitmap(Bitmap *); +void LimitScreenUpdates(boolean); + void InitVideoDisplay(void); void CloseVideoDisplay(void); void InitVideoBuffer(int, int, int, boolean);