X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=3cf8bea6231c944b36ec44102233a4928560f403;hp=4a54de8767f20a1c5416cc5d2d65100b2b04082e;hb=88a1829af8ca41b6e581f209002022b2483b86df;hpb=d275633f8688c5ea2846b1fe063e07bbe3ea53b0 diff --git a/src/libgame/system.h b/src/libgame/system.h index 4a54de87..3cf8bea6 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -324,6 +324,19 @@ #define STYLE_DEFAULT STYLE_NONE +/* values for special global animation events */ +#define ANIM_EVENT_NONE 0 +#define ANIM_EVENT_SELF (1 << 16) +#define ANIM_EVENT_ANY (1 << 17) + +#define ANIM_EVENT_ANIM_BIT 0 +#define ANIM_EVENT_PART_BIT 8 + +#define ANIM_EVENT_ANIM_MASK (0xff << ANIM_EVENT_ANIM_BIT) +#define ANIM_EVENT_PART_MASK (0xff << ANIM_EVENT_PART_BIT) + +#define ANIM_EVENT_DEFAULT ANIM_EVENT_NONE + /* values for fade mode */ #define FADE_TYPE_NONE 0 #define FADE_TYPE_FADE_IN (1 << 0) @@ -357,6 +370,7 @@ #define POS_LOWER 5 #define POS_BOTTOM 6 #define POS_ANY 7 +#define POS_LAST 8 /* values for text alignment */ #define ALIGN_LEFT (1 << 0) @@ -428,6 +442,10 @@ /* maximum number of levels in a level set */ #define MAX_LEVELS 1000 +/* maximum number of global animation and parts */ +#define MAX_GLOBAL_ANIMS 32 +#define MAX_GLOBAL_ANIM_PARTS 32 + /* default name for empty highscore entry */ #define EMPTY_PLAYER_NAME "no name" @@ -480,6 +498,7 @@ #define SCORES_DIRECTORY "scores" #define DOCS_DIRECTORY "docs" #define CACHE_DIRECTORY "cache" +#define CONF_DIRECTORY "conf" #define GFX_CLASSIC_SUBDIR "gfx_classic" #define SND_CLASSIC_SUBDIR "snd_classic" @@ -513,6 +532,8 @@ #define TAPEFILE_EXTENSION "tape" #define SCOREFILE_EXTENSION "score" +#define GAMECONTROLLER_BASENAME "gamecontrollerdb.txt" + #define LOG_OUT_BASENAME "stdout.txt" #define LOG_ERR_BASENAME "stderr.txt" @@ -758,6 +779,8 @@ struct ProgramInfo int version_build; int version_ident; + char *version_string; + char *(*window_title_function)(void); void (*exit_message_function)(char *, va_list); void (*exit_function)(int); @@ -780,6 +803,7 @@ struct OptionInfo char *sounds_directory; char *music_directory; char *docs_directory; + char *conf_directory; char *execute_command; @@ -921,13 +945,14 @@ struct GfxInfo struct OverlayInfo { - boolean active; + boolean enabled; /* overlay generally enabled or disabled */ + boolean active; /* overlay activated (depending on game mode) */ }; struct JoystickInfo { int status; - int fd[MAX_PLAYERS]; /* file descriptor of player's joystick */ + int nr[MAX_PLAYERS]; /* joystick number for each player */ }; struct SetupJoystickInfo @@ -1042,6 +1067,7 @@ struct SetupSystemInfo struct SetupInternalInfo { char *program_title; + char *program_version; char *program_author; char *program_email; char *program_website; @@ -1064,6 +1090,7 @@ struct SetupInternalInfo int default_window_height; boolean choose_from_top_leveldir; + boolean show_scaling_in_title; }; struct SetupDebugInfo @@ -1072,6 +1099,7 @@ struct SetupDebugInfo Key frame_delay_key[10]; boolean frame_delay_use_mod_key; boolean frame_delay_game_only; + boolean show_frames_per_second; }; struct SetupInfo @@ -1424,7 +1452,7 @@ extern int FrameCounter; /* function definitions */ void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, - int); + char *, int); void InitScoresInfo(); void SetWindowTitle(); @@ -1449,9 +1477,11 @@ void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int)); void InitGfxCustomArtworkInfo(); void InitGfxOtherSettings(); void InitOverlayInfo(); +void SetOverlayEnabled(boolean); void SetOverlayActive(boolean); boolean GetOverlayActive(); void SetDrawDeactivationMask(int); +int GetDrawDeactivationMask(void); void SetDrawBackgroundMask(int); void SetWindowBackgroundBitmap(Bitmap *); void SetMainBackgroundBitmap(Bitmap *); @@ -1514,8 +1544,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(); @@ -1526,5 +1557,7 @@ boolean CheckCloseWindowEvent(ClientMessageEvent *); void InitJoysticks(); boolean ReadJoystick(int, int *, int *, boolean *, boolean *); +boolean CheckJoystickOpened(int); +void ClearJoystickState(); #endif /* SYSTEM_H */