X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmain.h;h=9cf276a2108d02a3094e6ad198e4fb0e83751c31;hp=8b4948d7530be721eda7d145ee7e7b6c900b2cfb;hb=3d7e2dc14fb5478cb7590eb9808ccafbe48ae096;hpb=61f3e4384807556f36acba1388e4b5535c583c13 diff --git a/src/main.h b/src/main.h index 8b4948d7..9cf276a2 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 : \ @@ -1765,9 +1767,17 @@ #define ACTION_PAGE_30 81 #define ACTION_PAGE_31 82 #define ACTION_PAGE_32 83 -#define ACTION_OTHER 84 - -#define NUM_ACTIONS 85 +#define ACTION_PART_1 84 +#define ACTION_PART_2 85 +#define ACTION_PART_3 86 +#define ACTION_PART_4 87 +#define ACTION_PART_5 88 +#define ACTION_PART_6 89 +#define ACTION_PART_7 90 +#define ACTION_PART_8 91 +#define ACTION_OTHER 92 + +#define NUM_ACTIONS 93 #define ACTION_BORING_LAST ACTION_BORING_10 #define ACTION_SLEEPING_LAST ACTION_SLEEPING_3 @@ -1856,35 +1866,41 @@ #define GFX_ARG_DIGGABLE_LIKE 23 #define GFX_ARG_BORDER_SIZE 24 #define GFX_ARG_STEP_OFFSET 25 -#define GFX_ARG_STEP_DELAY 26 -#define GFX_ARG_DIRECTION 27 -#define GFX_ARG_POSITION 28 -#define GFX_ARG_DRAW_XOFFSET 29 -#define GFX_ARG_DRAW_YOFFSET 30 -#define GFX_ARG_DRAW_MASKED 31 -#define GFX_ARG_ANIM_DELAY_FIXED 32 -#define GFX_ARG_ANIM_DELAY_RANDOM 33 -#define GFX_ARG_POST_DELAY_FIXED 34 -#define GFX_ARG_POST_DELAY_RANDOM 35 -#define GFX_ARG_NAME 36 -#define GFX_ARG_SCALE_UP_FACTOR 37 -#define GFX_ARG_TILE_SIZE 38 -#define GFX_ARG_CLONE_FROM 39 -#define GFX_ARG_FADE_MODE 40 -#define GFX_ARG_FADE_DELAY 41 -#define GFX_ARG_POST_DELAY 42 -#define GFX_ARG_AUTO_DELAY 43 -#define GFX_ARG_ALIGN 44 -#define GFX_ARG_VALIGN 45 -#define GFX_ARG_SORT_PRIORITY 46 -#define GFX_ARG_CLASS 47 -#define GFX_ARG_STYLE 48 -#define GFX_ARG_ACTIVE_XOFFSET 49 -#define GFX_ARG_ACTIVE_YOFFSET 50 -#define GFX_ARG_PRESSED_XOFFSET 51 -#define GFX_ARG_PRESSED_YOFFSET 52 - -#define NUM_GFX_ARGS 53 +#define GFX_ARG_STEP_XOFFSET 26 +#define GFX_ARG_STEP_YOFFSET 27 +#define GFX_ARG_STEP_FRAMES 28 +#define GFX_ARG_STEP_DELAY 29 +#define GFX_ARG_DIRECTION 30 +#define GFX_ARG_POSITION 31 +#define GFX_ARG_DRAW_XOFFSET 32 +#define GFX_ARG_DRAW_YOFFSET 33 +#define GFX_ARG_DRAW_MASKED 34 +#define GFX_ARG_DRAW_ORDER 35 +#define GFX_ARG_INIT_DELAY_FIXED 36 +#define GFX_ARG_INIT_DELAY_RANDOM 37 +#define GFX_ARG_ANIM_DELAY_FIXED 38 +#define GFX_ARG_ANIM_DELAY_RANDOM 39 +#define GFX_ARG_POST_DELAY_FIXED 40 +#define GFX_ARG_POST_DELAY_RANDOM 41 +#define GFX_ARG_NAME 42 +#define GFX_ARG_SCALE_UP_FACTOR 43 +#define GFX_ARG_TILE_SIZE 44 +#define GFX_ARG_CLONE_FROM 45 +#define GFX_ARG_FADE_MODE 46 +#define GFX_ARG_FADE_DELAY 47 +#define GFX_ARG_POST_DELAY 48 +#define GFX_ARG_AUTO_DELAY 49 +#define GFX_ARG_ALIGN 50 +#define GFX_ARG_VALIGN 51 +#define GFX_ARG_SORT_PRIORITY 52 +#define GFX_ARG_CLASS 53 +#define GFX_ARG_STYLE 54 +#define GFX_ARG_ACTIVE_XOFFSET 55 +#define GFX_ARG_ACTIVE_YOFFSET 56 +#define GFX_ARG_PRESSED_XOFFSET 57 +#define GFX_ARG_PRESSED_YOFFSET 58 + +#define NUM_GFX_ARGS 59 /* values for sound configuration suffixes */ @@ -1944,6 +1960,24 @@ #define NUM_FONTS 38 #define NUM_INITIAL_FONTS 4 +/* values for toon animation configuration */ +#define MAX_NUM_TOONS 20 + +/* 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 #define GAME_MODE_LOADING 1 @@ -2743,6 +2777,14 @@ struct FontInfo /* internal bitmap ID for special graphics */ }; +struct GlobalAnimInfo +{ + char *token_name; /* global animation token in config files */ + + /* global animation graphic and control definitions */ + int graphic[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS]; +}; + struct GraphicInfo { Bitmap **bitmaps; /* bitmaps in all required sizes */ @@ -2778,18 +2820,28 @@ struct GraphicInfo int clone_from; /* graphic for cloning *all* settings */ + int init_delay_fixed; /* optional initial delay values for global */ + int init_delay_random; /* animations (pause interval before start) */ int anim_delay_fixed; /* optional delay values for bored and */ int anim_delay_random; /* sleeping player animations (animation */ int post_delay_fixed; /* intervall and following pause before */ int post_delay_random; /* next intervall (bored animation only) */ int step_offset; /* optional step offset of toon animations */ + int step_xoffset; /* optional step offset of toon animations */ + int step_yoffset; /* optional step offset of toon animations */ + int step_frames; /* optional step frames of toon animations */ 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 */ int draw_masked; /* optional setting for drawing envelope gfx */ + int draw_order; /* optional draw order for global animations */ int fade_mode; /* optional setting for drawing title screens */ int fade_delay; /* optional setting for drawing title screens */ @@ -3016,6 +3068,7 @@ extern struct ElementDirectionInfo element_direction_info[]; extern struct SpecialSuffixInfo special_suffix_info[]; extern struct TokenIntPtrInfo image_config_vars[]; extern struct FontInfo font_info[]; +extern struct GlobalAnimInfo global_anim_info[]; extern struct MusicPrefixInfo music_prefix_info[]; extern struct GraphicInfo *graphic_info; extern struct SoundInfo *sound_info;