X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=4dfe8d668ea0318efcb4772348dada308e456915;hb=9e08928735ed2195ecceb20747e705cfd3c7c5d2;hp=3fcdf6c72177e386d8b720072824bf1d9b04ea26;hpb=b857093af85a12103d638aa99962d16367935e49;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 3fcdf6c7..4dfe8d66 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -330,6 +330,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 */ @@ -345,6 +349,9 @@ #define ANIM_EVENT_DEFAULT ANIM_EVENT_NONE +/* values for special global animation event actions */ +#define ANIM_EVENT_ACTION_NONE -1 + /* values for fade mode */ #define FADE_TYPE_NONE 0 #define FADE_TYPE_FADE_IN (1 << 0) @@ -493,6 +500,20 @@ #define CHAR_GRID_BUTTON_SNAP '1' #define CHAR_GRID_BUTTON_DROP '2' +#define GET_ACTION_FROM_GRID_BUTTON(c) ((c) == CHAR_GRID_BUTTON_LEFT ? \ + JOY_LEFT : \ + (c) == CHAR_GRID_BUTTON_RIGHT ? \ + JOY_RIGHT : \ + (c) == CHAR_GRID_BUTTON_UP ? \ + JOY_UP : \ + (c) == CHAR_GRID_BUTTON_DOWN ? \ + JOY_DOWN : \ + (c) == CHAR_GRID_BUTTON_SNAP ? \ + JOY_BUTTON_1 : \ + (c) == CHAR_GRID_BUTTON_DROP ? \ + JOY_BUTTON_2 : \ + JOY_NO_ACTION) + /* default name for empty highscore entry */ #define EMPTY_PLAYER_NAME "no name" @@ -844,6 +865,17 @@ struct ProgramInfo boolean headless; }; +struct NetworkInfo +{ + boolean enabled; + boolean connected; + boolean serveronly; + + char *server_host; + int server_port; + +}; + struct OptionInfo { char *server_host; @@ -1024,8 +1056,9 @@ struct OverlayInfo int grid_ysize; char grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE]; - char grid_button_highlight; + + int grid_button_action; }; struct JoystickInfo @@ -1062,6 +1095,7 @@ struct SetupTouchInfo int transparency; /* in percent (0 == opaque, 100 == invisible) */ boolean draw_outlined; + boolean draw_pressed; boolean grid_initialized; }; @@ -1223,6 +1257,7 @@ struct SetupInfo boolean handicap; boolean skip_levels; boolean increment_levels; + boolean auto_play_next_level; boolean time_limit; boolean fullscreen; int window_scaling_percent; @@ -1249,6 +1284,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; @@ -1533,6 +1571,7 @@ struct LevelStats /* ========================================================================= */ extern struct ProgramInfo program; +extern struct NetworkInfo network; extern struct OptionInfo options; extern struct VideoSystemInfo video; extern struct AudioSystemInfo audio; @@ -1571,6 +1610,7 @@ 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();