X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=ff701a202c926b3684c06d90fc2f54bf3b225b68;hb=2a357b702b5ceb9bf9173ac02f68cf42340b3158;hp=cbfbf67fc893ef3eceb67154b95f816196f5b996;hpb=e093d2ffd9547d556207818c38f71d5afa455ad0;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index cbfbf67f..ff701a20 100644 --- a/src/main.h +++ b/src/main.h @@ -26,6 +26,7 @@ #include "conf_gfx.h" /* include auto-generated data structure definitions */ #include "conf_snd.h" /* include auto-generated data structure definitions */ +#include "conf_mus.h" /* include auto-generated data structure definitions */ #define IMG_UNDEFINED (-1) #define IMG_EMPTY IMG_EMPTY_SPACE @@ -35,6 +36,7 @@ #define IMG_CUSTOM_START IMG_CUSTOM_1 #define SND_UNDEFINED (-1) +#define MUS_UNDEFINED (-1) #define WIN_XSIZE 672 #define WIN_YSIZE 560 @@ -880,12 +882,14 @@ #define EL_DYNABOMB_PLAYER_4 (EL_FIRST_DUMMY + 17) #define EL_SHIELD_NORMAL_ACTIVE (EL_FIRST_DUMMY + 18) #define EL_SHIELD_DEADLY_ACTIVE (EL_FIRST_DUMMY + 19) -#define EL_DEFAULT (EL_FIRST_DUMMY + 20) -#define EL_BD_DEFAULT (EL_FIRST_DUMMY + 21) -#define EL_SP_DEFAULT (EL_FIRST_DUMMY + 22) -#define EL_SB_DEFAULT (EL_FIRST_DUMMY + 23) +#define EL_AMOEBA (EL_FIRST_DUMMY + 20) +#define EL_DEFAULT (EL_FIRST_DUMMY + 21) +#define EL_BD_DEFAULT (EL_FIRST_DUMMY + 22) +#define EL_SP_DEFAULT (EL_FIRST_DUMMY + 23) +#define EL_SB_DEFAULT (EL_FIRST_DUMMY + 24) +#define EL_DUMMY (EL_FIRST_DUMMY + 25) -#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 24) +#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 26) /* values for graphics/sounds action types */ @@ -915,30 +919,49 @@ #define ACTION_CHANGING 23 #define ACTION_EXPLODING 24 #define ACTION_BORING 25 -#define ACTION_SLEEPING 26 -#define ACTION_DYING 27 -#define ACTION_TURNING 28 -#define ACTION_TURNING_FROM_LEFT 29 -#define ACTION_TURNING_FROM_RIGHT 30 -#define ACTION_TURNING_FROM_UP 31 -#define ACTION_TURNING_FROM_DOWN 32 -#define ACTION_OTHER 33 +#define ACTION_BORING_1 26 +#define ACTION_BORING_2 27 +#define ACTION_BORING_3 28 +#define ACTION_BORING_4 29 +#define ACTION_BORING_5 30 +#define ACTION_BORING_6 31 +#define ACTION_BORING_7 32 +#define ACTION_BORING_8 33 +#define ACTION_BORING_9 34 +#define ACTION_BORING_10 35 +#define ACTION_SLEEPING 36 +#define ACTION_SLEEPING_1 37 +#define ACTION_SLEEPING_2 38 +#define ACTION_SLEEPING_3 39 +#define ACTION_AWAKENING 40 +#define ACTION_DYING 41 +#define ACTION_TURNING 42 +#define ACTION_TURNING_FROM_LEFT 43 +#define ACTION_TURNING_FROM_RIGHT 44 +#define ACTION_TURNING_FROM_UP 45 +#define ACTION_TURNING_FROM_DOWN 46 +#define ACTION_OTHER 47 + +#define NUM_ACTIONS 48 + +#define ACTION_BORING_LAST ACTION_BORING_10 +#define ACTION_SLEEPING_LAST ACTION_SLEEPING_3 -#define NUM_ACTIONS 34 /* values for special image configuration suffixes (must match game mode) */ -#define GFX_SPECIAL_ARG_MAIN 0 -#define GFX_SPECIAL_ARG_LEVELS 1 -#define GFX_SPECIAL_ARG_SCORES 2 -#define GFX_SPECIAL_ARG_EDITOR 3 -#define GFX_SPECIAL_ARG_INFO 4 -#define GFX_SPECIAL_ARG_SETUP 5 -#define GFX_SPECIAL_ARG_PLAYING 6 -#define GFX_SPECIAL_ARG_DOOR 7 -#define GFX_SPECIAL_ARG_PREVIEW 8 -#define GFX_SPECIAL_ARG_CRUMBLED 9 +#define GFX_SPECIAL_ARG_DEFAULT 0 +#define GFX_SPECIAL_ARG_MAIN 1 +#define GFX_SPECIAL_ARG_LEVELS 2 +#define GFX_SPECIAL_ARG_SCORES 3 +#define GFX_SPECIAL_ARG_EDITOR 4 +#define GFX_SPECIAL_ARG_INFO 5 +#define GFX_SPECIAL_ARG_SETUP 6 +#define GFX_SPECIAL_ARG_PLAYING 7 +#define GFX_SPECIAL_ARG_DOOR 8 +#define GFX_SPECIAL_ARG_PREVIEW 9 +#define GFX_SPECIAL_ARG_CRUMBLED 10 -#define NUM_SPECIAL_GFX_ARGS 10 +#define NUM_SPECIAL_GFX_ARGS 11 /* values for image configuration suffixes */ @@ -968,9 +991,13 @@ #define GFX_ARG_DRAW_XOFFSET 23 #define GFX_ARG_DRAW_YOFFSET 24 #define GFX_ARG_DRAW_MASKED 25 -#define GFX_ARG_NAME 26 +#define GFX_ARG_ANIM_DELAY_FIXED 26 +#define GFX_ARG_ANIM_DELAY_RANDOM 27 +#define GFX_ARG_POST_DELAY_FIXED 28 +#define GFX_ARG_POST_DELAY_RANDOM 29 +#define GFX_ARG_NAME 30 -#define NUM_GFX_ARGS 27 +#define NUM_GFX_ARGS 31 /* values for sound configuration suffixes */ @@ -979,8 +1006,13 @@ #define NUM_SND_ARGS 1 -/* values for font configuration */ +/* values for music configuration suffixes */ +#define MUS_ARG_MODE_LOOP 0 + +#define NUM_MUS_ARGS 1 + +/* values for font configuration */ #define FONT_INITIAL_1 0 #define FONT_INITIAL_2 1 #define FONT_INITIAL_3 2 @@ -1018,20 +1050,33 @@ #define NUM_INITIAL_FONTS 4 /* values for game_status (must match special image configuration suffixes) */ -#define GAME_MODE_MAIN 0 -#define GAME_MODE_LEVELS 1 -#define GAME_MODE_SCORES 2 -#define GAME_MODE_EDITOR 3 -#define GAME_MODE_INFO 4 -#define GAME_MODE_SETUP 5 -#define GAME_MODE_PLAYING 6 -#define GAME_MODE_PSEUDO_DOOR 7 -#define GAME_MODE_PSEUDO_PREVIEW 8 -#define GAME_MODE_PSEUDO_CRUMBLED 9 +#define GAME_MODE_DEFAULT 0 +#define GAME_MODE_MAIN 1 +#define GAME_MODE_LEVELS 2 +#define GAME_MODE_SCORES 3 +#define GAME_MODE_EDITOR 4 +#define GAME_MODE_INFO 5 +#define GAME_MODE_SETUP 6 +#define GAME_MODE_PLAYING 7 +#define GAME_MODE_PSEUDO_DOOR 8 +#define GAME_MODE_PSEUDO_PREVIEW 9 +#define GAME_MODE_PSEUDO_CRUMBLED 10 /* there are no special config file suffixes for these modes */ -#define GAME_MODE_PSEUDO_TYPENAME 10 -#define GAME_MODE_QUIT 11 +#define GAME_MODE_PSEUDO_TYPENAME 11 +#define GAME_MODE_QUIT 12 + +/* special definitions currently only used for custom artwork configuration */ +#define MUSIC_PREFIX_BACKGROUND 0 +#define NUM_MUSIC_PREFIXES 1 +#define MAX_LEVELS 1000 + +/* definitions for demo animation lists */ +#define HELPANIM_LIST_NEXT -1 +#define HELPANIM_LIST_END -999 + + +/* program information and versioning definitions */ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 0 @@ -1042,12 +1087,6 @@ #define PROGRAM_AUTHOR_STRING "Holger Schemel" #define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2003 by Holger Schemel" -#if 0 -#define PROGRAM_DOS_PORT_STRING "DOS port done by Guido Schulz" -#define PROGRAM_IDENT_STRING PROGRAM_VERSION_STRING " " TARGET_STRING -#define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING -#endif - #define ICON_TITLE_STRING PROGRAM_TITLE_STRING #define COOKIE_PREFIX "ROCKSNDIAMONDS" #define FILENAME_PREFIX "Rocks" @@ -1108,6 +1147,9 @@ struct MenuInfo int list_size_default; int list_size[NUM_SPECIAL_GFX_ARGS]; + + int sound[NUM_SPECIAL_GFX_ARGS]; + int music[NUM_SPECIAL_GFX_ARGS]; }; struct DoorInfo @@ -1138,7 +1180,7 @@ struct PlayerInfo byte programmed_action; /* action forced by game itself (like moving through doors); overrides other actions */ - int jx,jy, last_jx,last_jy; + int jx, jy, last_jx, last_jy; int MovDir, MovPos, GfxDir, GfxPos; int Frame, StepFrame; @@ -1158,6 +1200,21 @@ struct PlayerInfo boolean is_pushing; boolean is_switching; + boolean is_bored; + boolean is_sleeping; + + int frame_counter_bored; + int frame_counter_sleeping; + + int anim_delay_counter; + int post_delay_counter; + + int special_action_bored; + int special_action_sleeping; + + int num_special_action_bored; + int num_special_action_sleeping; + int switch_x, switch_y; int show_envelope; @@ -1184,6 +1241,11 @@ struct PlayerInfo int inventory_size; }; +struct LevelSetInfo +{ + int music[MAX_LEVELS]; +}; + struct LevelInfo { int file_version; /* file format version the level is stored with */ @@ -1279,6 +1341,12 @@ struct GameInfo boolean gravity; boolean explosions_delayed; boolean envelope_active; + + /* values for player idle animation (no effect on engine) */ + int player_boring_delay_fixed; + int player_boring_delay_random; + int player_sleeping_delay_fixed; + int player_sleeping_delay_random; }; struct GlobalInfo @@ -1431,6 +1499,11 @@ struct GraphicInfo int diggable_like; /* element for cloning digging graphics */ int border_size; /* border size for "crumbled" graphics */ + 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_delay; /* optional step delay of toon animations */ @@ -1449,6 +1522,31 @@ struct SoundInfo boolean loop; }; +struct MusicInfo +{ + boolean loop; +}; + +struct MusicPrefixInfo +{ + char *prefix; + boolean is_loop_music; +}; + +struct MusicFileInfo +{ + char *context; + + char *title; + char *artist; + char *album; + char *year; + + int music; + + struct MusicFileInfo *next; +}; + struct ElementActionInfo { char *suffix; @@ -1468,6 +1566,15 @@ struct SpecialSuffixInfo int value; }; +struct HelpAnimInfo +{ + int element; + int action; + int direction; + + int delay; +}; + #if 0 extern GC tile_clip_gc; @@ -1542,6 +1649,7 @@ extern boolean network_player_action_received; extern int graphics_action_mapping[]; +extern struct LevelSetInfo levelset; extern struct LevelInfo level, level_template; extern struct PlayerInfo stored_player[], *local_player; extern struct HiScore highscore[]; @@ -1556,9 +1664,20 @@ 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 MusicPrefixInfo music_prefix_info[]; extern struct GraphicInfo *graphic_info; extern struct SoundInfo *sound_info; -extern struct ConfigInfo image_config[], sound_config[]; -extern struct ConfigInfo image_config_suffix[], sound_config_suffix[]; +extern struct MusicInfo *music_info; +extern struct MusicFileInfo *music_file_info; +extern struct HelpAnimInfo *helpanim_info; +extern SetupFileHash *helptext_info; +extern struct ConfigInfo image_config[]; +extern struct ConfigInfo sound_config[]; +extern struct ConfigInfo music_config[]; +extern struct ConfigInfo image_config_suffix[]; +extern struct ConfigInfo sound_config_suffix[]; +extern struct ConfigInfo music_config_suffix[]; +extern struct ConfigInfo helpanim_config[]; +extern struct ConfigInfo helptext_config[]; #endif /* MAIN_H */