X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=8eb5d9ab99e8eceb795a11521214400540a9e044;hb=479bba3c31872d0bf11756a6380988bf787ce5ef;hp=2883d1dc82d1de2a2a496920a1ade3656ce85a9d;hpb=fa628a204ea4662806244b0ed994a48b40ece2ca;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 2883d1dc..8eb5d9ab 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -112,6 +112,9 @@ #define BUTTON_1 4 #define BUTTON_2 5 +/* values for special "focus player" bitmasks */ +#define BIT_SET_FOCUS 6 + /* values for move directions and special "button" key bitmasks */ #define MV_NONE 0 #define MV_LEFT (1 << MV_BIT_LEFT) @@ -136,6 +139,8 @@ #define KEY_BUTTON (KEY_BUTTON_1 | KEY_BUTTON_2) #define KEY_ACTION (KEY_MOTION | KEY_BUTTON) +#define KEY_SET_FOCUS (1 << BIT_SET_FOCUS) + #define MV_DIR_FROM_BIT(x) ((x) < NUM_DIRECTIONS ? 1 << (x) : \ (x) == MV_BIT_UPLEFT ? MV_UPLEFT : \ (x) == MV_BIT_UPRIGHT ? MV_UPRIGHT : \ @@ -173,11 +178,12 @@ #define ANIM_CE_VALUE (1 << 5) #define ANIM_CE_SCORE (1 << 6) #define ANIM_REVERSE (1 << 7) +#define ANIM_OPAQUE_PLAYER (1 << 8) /* values for special (non game element) animation modes */ -#define ANIM_HORIZONTAL (1 << 8) -#define ANIM_VERTICAL (1 << 9) -#define ANIM_STATIC_PANEL (1 << 10) +#define ANIM_HORIZONTAL (1 << 9) +#define ANIM_VERTICAL (1 << 10) +#define ANIM_STATIC_PANEL (1 << 11) #define ANIM_DEFAULT ANIM_LOOP @@ -217,6 +223,11 @@ #define CURSOR_DEFAULT 0 #define CURSOR_PLAYFIELD 1 +/* fundamental game speed values */ +#define ONE_SECOND_DELAY 1000 /* delay value for one second */ +#define GAME_FRAME_DELAY 20 /* frame delay in milliseconds */ +#define FFWD_FRAME_DELAY 10 /* 200% speed for fast forward */ +#define FRAMES_PER_SECOND (ONE_SECOND_DELAY / GAME_FRAME_DELAY) /* maximum playfield size supported by libgame functions */ #define MAX_PLAYFIELD_WIDTH 128 @@ -425,9 +436,9 @@ #define ARTWORK_FIRST_NODE(artwork, type) \ ((type) == ARTWORK_TYPE_GRAPHICS ? \ - (artwork).gfx_first : \ + (artwork).gfx_first : \ (type) == ARTWORK_TYPE_SOUNDS ? \ - (artwork).snd_first : \ + (artwork).snd_first : \ (artwork).mus_first) #define ARTWORK_CURRENT_IDENTIFIER_PTR(artwork, type) \ @@ -550,9 +561,13 @@ struct AudioSystemInfo struct FontBitmapInfo { Bitmap *bitmap; + int src_x, src_y; /* start position of animation frames */ int width, height; /* width/height of each animation frame */ - int draw_x, draw_y; /* offset for drawing font characters */ + + int draw_xoffset; /* offset for drawing font characters */ + int draw_yoffset; /* offset for drawing font characters */ + int num_chars; int num_chars_per_line; @@ -693,6 +708,8 @@ struct SetupInfo boolean ask_on_escape; boolean ask_on_escape_editor; boolean quick_switch; + boolean input_on_focus; + boolean prefer_aga_graphics; char *graphics_set; char *sounds_set; @@ -733,6 +750,8 @@ struct TreeInfo char *imported_from; /* optional comment for imported levels or artwork */ char *imported_by; /* optional comment for imported levels or artwork */ + char *graphics_set_ecs; /* special EMC custom graphics set (ECS graphics) */ + char *graphics_set_aga; /* special EMC custom graphics set (AGA graphics) */ char *graphics_set; /* optional custom graphics set (level tree only) */ char *sounds_set; /* optional custom sounds set (level tree only) */ char *music_set; /* optional custom music set (level tree only) */