X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=464cb761ca340f53b76663526b644f19cda65092;hp=ab8f43b0a85172467403a575bedb67b599c4938d;hb=94b9816442fd27ab02bcef6f5d4aaf6740009fc5;hpb=bd5cd06243740a2fac2a5ee5b026a23c5fd7eeb6 diff --git a/src/libgame/system.h b/src/libgame/system.h index ab8f43b0..464cb761 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -82,6 +82,19 @@ #define SPECIAL_RENDERING_DEFAULT SPECIAL_RENDERING_BITMAP #endif +/* values for vertical screen retrace synchronization (vsync) */ +#define STR_VSYNC_MODE_OFF "off" +#define STR_VSYNC_MODE_NORMAL "normal" +#define STR_VSYNC_MODE_ADAPTIVE "adaptive" + +#define STR_VSYNC_MODE_DEFAULT STR_VSYNC_MODE_OFF + +#define VSYNC_MODE_OFF 0 +#define VSYNC_MODE_NORMAL 1 +#define VSYNC_MODE_ADAPTIVE -1 + +#define VSYNC_MODE_DEFAULT VSYNC_MODE_OFF + /* values for touch control */ #define TOUCH_CONTROL_OFF "off" #define TOUCH_CONTROL_VIRTUAL_BUTTONS "virtual_buttons" @@ -330,6 +343,10 @@ #define STYLE_INNER_CORNERS (1 << 1) #define STYLE_REVERSE (1 << 2) +/* values for special event handling style (used for global animation) */ +#define STYLE_PASSTHROUGH (1 << 3) +#define STYLE_MULTIPLE_ACTIONS (1 << 4) + #define STYLE_DEFAULT STYLE_NONE /* values for special global animation events */ @@ -563,6 +580,7 @@ #define DOCS_DIRECTORY "docs" #define CACHE_DIRECTORY "cache" #define CONF_DIRECTORY "conf" +#define NETWORK_DIRECTORY "network" #define GFX_CLASSIC_SUBDIR "gfx_classic" #define SND_CLASSIC_SUBDIR "snd_classic" @@ -861,6 +879,17 @@ struct ProgramInfo boolean headless; }; +struct NetworkInfo +{ + boolean enabled; + boolean connected; + boolean serveronly; + + char *server_host; + int server_port; + +}; + struct OptionInfo { char *server_host; @@ -903,6 +932,7 @@ struct VideoSystemInfo int window_scaling_percent; char *window_scaling_quality; int screen_rendering_mode; + int vsync_mode; unsigned int frame_delay; unsigned int frame_delay_value; @@ -1242,11 +1272,14 @@ struct SetupInfo boolean handicap; boolean skip_levels; boolean increment_levels; + boolean auto_play_next_level; + boolean skip_scores_after_game; boolean time_limit; boolean fullscreen; int window_scaling_percent; char *window_scaling_quality; char *screen_rendering_mode; + char *vsync_mode; boolean ask_on_escape; boolean ask_on_escape_editor; boolean quick_switch; @@ -1268,6 +1301,9 @@ struct SetupInfo int volume_loops; int volume_music; + boolean network_mode; + int network_player_nr; + struct SetupAutoSetupInfo auto_setup; struct SetupEditorInfo editor; struct SetupEditorCascadeInfo editor_cascade; @@ -1519,6 +1555,7 @@ struct TextPosInfo int x, y; int xoffset; /* special case for tape date and time */ int xoffset2; /* special case for tape date */ + int yoffset; /* special case for list of preview players */ int width, height; int align, valign; int size; /* also used for suffix ".digits" */ @@ -1531,6 +1568,10 @@ struct TextPosInfo int direction; /* needed for panel time/health graphics */ int class; /* needed for panel time/health graphics */ int style; /* needed for panel time/health graphics */ + + int tile_size; /* special case for list of network players */ + int border_size; /* special case for list of preview players */ + int vertical; /* special case for list of preview players */ }; struct MouseActionInfo @@ -1540,6 +1581,14 @@ struct MouseActionInfo int button_hint; }; +struct LevelSetInfo +{ + int music[MAX_LEVELS]; + + char *identifier; + int level_nr; +}; + struct LevelStats { int played; @@ -1552,6 +1601,7 @@ struct LevelStats /* ========================================================================= */ extern struct ProgramInfo program; +extern struct NetworkInfo network; extern struct OptionInfo options; extern struct VideoSystemInfo video; extern struct AudioSystemInfo audio; @@ -1568,6 +1618,7 @@ extern LevelDirTree *leveldir_first; extern LevelDirTree *leveldir_current; extern int level_nr; +extern struct LevelSetInfo levelset; extern struct LevelStats level_stats[]; extern DrawWindow *window; @@ -1590,9 +1641,10 @@ extern int FrameCounter; void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, char *, int); +void InitNetworkInfo(boolean, boolean, boolean, char *, int); -void InitScoresInfo(); -void SetWindowTitle(); +void InitScoresInfo(void); +void SetWindowTitle(void); void InitWindowTitleFunction(char *(*window_title_function)(void)); void InitExitMessageFunction(void (*exit_message_function)(char *, va_list)); @@ -1612,10 +1664,10 @@ 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 InitGfxCustomArtworkInfo(void); +void InitGfxOtherSettings(void); +void InitTileCursorInfo(void); +void InitOverlayInfo(void); void SetTileCursorEnabled(boolean); void SetTileCursorActive(boolean); void SetTileCursorTargetXY(int, int); @@ -1624,7 +1676,7 @@ void SetTileCursorSXSY(int, int); void SetOverlayEnabled(boolean); void SetOverlayActive(boolean); void SetOverlayShowGrid(boolean); -boolean GetOverlayActive(); +boolean GetOverlayActive(void); void SetDrawDeactivationMask(int); int GetDrawDeactivationMask(void); void SetDrawBackgroundMask(int); @@ -1654,7 +1706,7 @@ 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(); +boolean DrawingAreaChanged(void); void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int); void BlitTexture(Bitmap *, int, int, int, int, int, int); void BlitTextureMasked(Bitmap *, int, int, int, int, int, int); @@ -1671,7 +1723,7 @@ void KeyboardAutoRepeatOn(void); void KeyboardAutoRepeatOff(void); boolean SetVideoMode(boolean); void SetVideoFrameDelay(unsigned int); -unsigned int GetVideoFrameDelay(); +unsigned int GetVideoFrameDelay(void); boolean ChangeVideoModeIfNeeded(boolean); Bitmap *LoadImage(char *); @@ -1696,15 +1748,15 @@ void PeekEvent(Event *event); void CheckQuitEvent(void); Key GetEventKey(KeyEvent *, boolean); KeyMod HandleKeyModState(Key, int); -KeyMod GetKeyModState(); -KeyMod GetKeyModStateFromEvents(); +KeyMod GetKeyModState(void); +KeyMod GetKeyModStateFromEvents(void); void StartTextInput(int, int, int, int); -void StopTextInput(); +void StopTextInput(void); boolean CheckCloseWindowEvent(ClientMessageEvent *); -void InitJoysticks(); +void InitJoysticks(void); boolean ReadJoystick(int, int *, int *, boolean *, boolean *); boolean CheckJoystickOpened(int); -void ClearJoystickState(); +void ClearJoystickState(void); #endif /* SYSTEM_H */