X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=128726a610b96312960353c8baac1594b04e4fcf;hb=c4dd9e14b72b528e82bc018fe2fa76b784221584;hp=84f128770d8aeb10a5ca7bab31279d8b212d4163;hpb=caa7c617a9ffc31ac6b4a20d7046235c409671ca;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 84f12877..128726a6 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 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 : \ @@ -218,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