X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=092a47e71b5bfbf8a0d44827a9b951b373ef3823;hb=8d67b62445143c8f9fdde2cea730bfee49cc4271;hp=157eafe6cdc233ee46eeba030eefd5df039ed67b;hpb=daabb36abdc5b6cad050f60e576a1dd758854171;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 157eafe6..092a47e7 100644 --- a/src/main.h +++ b/src/main.h @@ -870,6 +870,8 @@ #define IS_SPECIAL_GFX_ARG(a) ((a) >= 0 && (a) < NUM_SPECIAL_GFX_ARGS) +#define IS_GLOBAL_ANIM_PART(a) ((a) >= 0 && (a) < NUM_GLOBAL_ANIM_PARTS) + #define EL_CASCADE_ACTIVE(e) (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : (e)) #define EL_CASCADE_INACTIVE(e) (IS_EDITOR_CASCADE_ACTIVE(e) ? (e) - 1 : (e)) #define EL_CASCADE_TOGGLE(e) (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : \ @@ -1958,6 +1960,17 @@ /* values for global animation configuration (must match those from main.c) */ #define NUM_GLOBAL_ANIMS 8 #define NUM_GLOBAL_ANIM_PARTS 8 +#define NUM_GLOBAL_ANIM_PARTS_ALL (NUM_GLOBAL_ANIM_PARTS + 1) +#define NUM_GLOBAL_ANIM_TOKENS (2 * NUM_GLOBAL_ANIMS) + +#define GLOBAL_ANIM_ID_GRAPHIC_FIRST 0 +#define GLOBAL_ANIM_ID_GRAPHIC_LAST 7 +#define GLOBAL_ANIM_ID_CONTROL_FIRST (NUM_GLOBAL_ANIMS + 0) +#define GLOBAL_ANIM_ID_CONTROL_LAST (NUM_GLOBAL_ANIMS + 7) + +#define GLOBAL_ANIM_ID_PART_FIRST 0 +#define GLOBAL_ANIM_ID_PART_LAST 7 +#define GLOBAL_ANIM_ID_PART_BASE 8 /* values for game_status (must match special image configuration suffixes) */ #define GAME_MODE_DEFAULT 0 @@ -2762,8 +2775,8 @@ struct GlobalAnimInfo { char *token_name; /* global animation token in config files */ - /* global animation parts for certain screens */ - int graphic[NUM_GLOBAL_ANIM_PARTS][NUM_SPECIAL_GFX_ARGS]; + /* global animation graphic and control definitions */ + int graphic[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS]; }; struct GraphicInfo @@ -2813,6 +2826,8 @@ struct GraphicInfo int step_delay; /* optional step delay of toon animations */ int direction; /* optional move direction of toon animations */ int position; /* optional draw position of toon animations */ + int x; /* optional draw position of toon animations */ + int y; /* optional draw position of toon animations */ int draw_xoffset; /* optional offset for drawing font chars */ int draw_yoffset; /* optional offset for drawing font chars */