X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=170a1fe53166293f95da3e79c30dbf5ca4450771;hb=bec4e2a1fb71569a3302583f71fbb11aa3f58b63;hp=0c793a0b468f093234f6e655ef9cb7f76b085960;hpb=0cb7e467765fe1ac2797cb58c069fcca56d43877;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 0c793a0b..170a1fe5 100644 --- a/src/main.h +++ b/src/main.h @@ -23,6 +23,7 @@ #include #include "libgame/libgame.h" +#include "libem/libem.h" #include "conf_gfx.h" /* include auto-generated data structure definitions */ #include "conf_snd.h" /* include auto-generated data structure definitions */ @@ -436,7 +437,13 @@ #define GFX_ELEMENT(e) (element_info[e].use_gfx_element ? \ element_info[e].gfx_element : e) +/* !!! "use sound" deactivated due to problems with level "bug machine" !!! */ +/* (solution: add separate "use sound of element" to level file and editor) */ +#if 0 #define SND_ELEMENT(e) GFX_ELEMENT(e) +#else +#define SND_ELEMENT(e) (e) +#endif #define IS_PLAYER(x, y) (ELEM_IS_PLAYER(StorePlayer[x][y])) @@ -947,7 +954,16 @@ #define EL_TRIGGER_ELEMENT 657 #define EL_TRIGGER_PLAYER 658 -#define NUM_FILE_ELEMENTS 659 +#define EL_SP_GRAVITY_ON_PORT_RIGHT 659 +#define EL_SP_GRAVITY_ON_PORT_DOWN 660 +#define EL_SP_GRAVITY_ON_PORT_LEFT 661 +#define EL_SP_GRAVITY_ON_PORT_UP 662 +#define EL_SP_GRAVITY_OFF_PORT_RIGHT 663 +#define EL_SP_GRAVITY_OFF_PORT_DOWN 664 +#define EL_SP_GRAVITY_OFF_PORT_LEFT 665 +#define EL_SP_GRAVITY_OFF_PORT_UP 666 + +#define NUM_FILE_ELEMENTS 667 /* "real" (and therefore drawable) runtime elements */ @@ -1254,8 +1270,8 @@ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 1 -#define PROGRAM_VERSION_PATCH 0 -#define PROGRAM_VERSION_BUILD 4 +#define PROGRAM_VERSION_PATCH 1 +#define PROGRAM_VERSION_BUILD 0 #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" @@ -1366,6 +1382,8 @@ struct PlayerInfo boolean use_murphy_graphic; boolean block_last_field; + int block_delay; + boolean can_fall_into_acid; boolean LevelSolved, GameOver; @@ -1402,13 +1420,23 @@ struct PlayerInfo int show_envelope; +#if 1 /* USE_NEW_MOVE_DELAY */ + int move_delay; + int move_delay_value; +#else unsigned long move_delay; int move_delay_value; +#endif int move_delay_reset_counter; +#if 1 /* USE_NEW_PUSH_DELAY */ + int push_delay; + int push_delay_value; +#else unsigned long push_delay; unsigned long push_delay_value; +#endif unsigned long actual_frame_counter; @@ -1484,13 +1512,16 @@ struct LevelInfo boolean double_speed; boolean initial_gravity; boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */ - boolean block_last_field; /* player blocks previous field while moving */ - boolean sp_block_last_field; /* player blocks previous field while moving */ boolean use_spring_bug; /* for compatibility with old levels */ boolean instant_relocation; /* no visual delay when relocating player */ boolean can_pass_to_walkable; /* player can pass to empty or walkable tile */ boolean grow_into_diggable; /* amoeba can grow into anything diggable */ + boolean block_last_field; /* player blocks previous field while moving */ + boolean sp_block_last_field; /* player blocks previous field while moving */ + int block_delay; /* delay for blocking previous field */ + int sp_block_delay; /* delay for blocking previous field */ + /* ('int' instead of 'boolean' because used as selectbox value in editor) */ int use_step_counter; /* count steps instead of seconds for level */ @@ -1499,6 +1530,8 @@ struct LevelInfo boolean use_custom_template; /* use custom properties from template file */ boolean no_valid_file; /* set when level file missing or invalid */ + + boolean changed; /* set when level was changed in the editor */ }; struct TapeInfo @@ -1550,6 +1583,10 @@ struct GameInfo int initial_move_delay_value; int initial_push_delay_value; + /* flags to handle bugs in and changes between different engine versions */ + /* (for the latest engine version, these flags should always be "FALSE") */ + boolean use_bug_change_when_pushing; + /* variable within running game */ int yamyam_content_nr; boolean magic_wall_active; @@ -1576,6 +1613,9 @@ struct GlobalInfo char *autoplay_leveldir; int autoplay_level_nr; + char *convert_leveldir; + int convert_level_nr; + int num_toons; float frames_per_second; @@ -1644,6 +1684,15 @@ struct ElementGroupInfo int choice_pos; /* current element choice position */ }; +struct ElementNameInfo +{ + /* ---------- token and description strings ---------- */ + + char *token_name; /* element token used in config files */ + char *class_name; /* element class used in config files */ + char *editor_description; /* pre-defined description for level editor */ +}; + struct ElementInfo { /* ---------- token and description strings ---------- */ @@ -1943,6 +1992,7 @@ extern struct GlobalInfo global; extern struct MenuInfo menu; extern struct DoorInfo door_1, door_2; extern struct ElementInfo element_info[]; +extern struct ElementNameInfo element_name_info[]; extern struct ElementActionInfo element_action_info[]; extern struct ElementDirectionInfo element_direction_info[]; extern struct SpecialSuffixInfo special_suffix_info[]; @@ -1955,12 +2005,12 @@ extern struct MusicInfo *music_info; extern struct MusicFileInfo *music_file_info; extern struct HelpAnimInfo *helpanim_info; extern SetupFileHash *helptext_info; +extern struct ConfigTypeInfo image_config_suffix[]; +extern struct ConfigTypeInfo sound_config_suffix[]; +extern struct ConfigTypeInfo music_config_suffix[]; 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[];