X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=e05dd9db6d9c5aa46007727e1a2ebf714cc81f25;hb=074c00b42409c74e9c5856db1be03dced3a15ae9;hp=037ac80fcb6b45c118f721d10176ca68eed0fa09;hpb=2a07a2dbfc676cab37fa82f4baca0f872a60b74d;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 037ac80f..e05dd9db 100644 --- a/src/main.h +++ b/src/main.h @@ -86,7 +86,7 @@ #define EP_DROPPABLE 22 #define EP_CAN_EXPLODE_1X1 23 #define EP_PUSHABLE 24 -#define EP_CAN_EXPLODE_DYNA 25 +#define EP_CAN_EXPLODE_CROSS 25 #define EP_PROTECTED 26 #define EP_CAN_MOVE_INTO_ACID 27 @@ -236,9 +236,9 @@ #define CH_PAGE_ANY (0xffffffff) /* values for change power for custom elements */ -#define CP_NON_DESTRUCTIVE 0 -#define CP_HALF_DESTRUCTIVE 1 -#define CP_FULL_DESTRUCTIVE 2 +#define CP_WHEN_EMPTY 0 +#define CP_WHEN_DIGGABLE 1 +#define CP_WHEN_DESTRUCTIBLE 2 /* values for custom move patterns (bits 0 - 3: basic move directions) */ #define MV_BIT_TOWARDS_PLAYER 4 @@ -324,7 +324,7 @@ #define IS_DROPPABLE(e) HAS_PROPERTY(e, EP_DROPPABLE) #define CAN_EXPLODE_1X1(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_1X1) #define IS_PUSHABLE(e) HAS_PROPERTY(e, EP_PUSHABLE) -#define CAN_EXPLODE_DYNA(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_DYNA) +#define CAN_EXPLODE_CROSS(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_CROSS) #define IS_PROTECTED(e) HAS_PROPERTY(e, EP_PROTECTED) #define CAN_MOVE_INTO_ACID(e) HAS_PROPERTY(e, EP_CAN_MOVE_INTO_ACID) @@ -390,16 +390,19 @@ #define IS_GROUP_ELEMENT(e) ((e) >= EL_GROUP_START && \ (e) <= EL_GROUP_END) +#define IS_INTERNAL_ELEMENT(e) ((e) >= EL_INTERNAL_START && \ + (e) <= EL_INTERNAL_END) + #define IS_ENVELOPE(e) ((e) >= EL_ENVELOPE_1 && \ (e) <= EL_ENVELOPE_4) #define GFX_ELEMENT(e) (element_info[e].use_gfx_element ? \ element_info[e].gfx_element : e) -#define IS_PLAYER(x,y) (ELEM_IS_PLAYER(StorePlayer[x][y])) +#define IS_PLAYER(x, y) (ELEM_IS_PLAYER(StorePlayer[x][y])) -#define IS_FREE(x,y) (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x,y)) -#define IS_FREE_OR_PLAYER(x,y) (Feld[x][y] == EL_EMPTY) +#define IS_FREE(x, y) (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x, y)) +#define IS_FREE_OR_PLAYER(x, y) (Feld[x][y] == EL_EMPTY) #define IS_MOVING(x,y) (MovPos[x][y] != 0) #define IS_FALLING(x,y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN) @@ -1011,10 +1014,14 @@ /* internal elements (only used for internal purposes like copying) */ #define EL_FIRST_INTERNAL (EL_FIRST_DUMMY + 25) -#define EL_INTERNAL_EDITOR (EL_FIRST_INTERNAL + 0) -#define EL_INTERNAL_DUMMY (EL_FIRST_INTERNAL + 1) +#define EL_INTERNAL_CLIPBOARD_CUSTOM (EL_FIRST_INTERNAL + 0) +#define EL_INTERNAL_CLIPBOARD_GROUP (EL_FIRST_INTERNAL + 1) +#define EL_INTERNAL_DUMMY (EL_FIRST_INTERNAL + 2) + +#define EL_INTERNAL_START (EL_FIRST_INTERNAL + 0) +#define EL_INTERNAL_END (EL_FIRST_INTERNAL + 2) -#define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 2) +#define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 3) /* values for graphics/sounds action types */ @@ -1206,7 +1213,7 @@ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 1 #define PROGRAM_VERSION_PATCH 0 -#define PROGRAM_VERSION_BUILD 0 +#define PROGRAM_VERSION_BUILD 1 #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" @@ -1437,7 +1444,9 @@ struct LevelInfo 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 */ + /* ('int' instead of 'boolean' because used as selectbox value in editor) */ int use_step_counter; /* count steps instead of seconds for level */ short field[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -1464,7 +1473,8 @@ struct TapeInfo boolean pause_before_death; boolean recording, playing, pausing; boolean fast_forward; - boolean index_search; + boolean warp_forward; + boolean deactivate_display; boolean auto_play; boolean auto_play_level_solved; boolean quick_resume; @@ -1546,23 +1556,23 @@ struct ElementChangeInfo short trigger_element; /* element triggering change */ - int content[3][3]; /* new elements after extended change */ - boolean use_content; /* use extended change content */ - boolean only_complete; /* only use complete content */ - boolean use_random_change; /* use random value for setting content */ - int random; /* random value for setting content */ - int power; /* power of extended change */ + int target_content[3][3]; /* elements for extended change target */ + boolean use_target_content; /* use extended change target */ + boolean only_if_complete; /* only use complete target content */ + boolean use_random_replace; /* use random value for replacing elements */ + int random_percentage; /* random value for replacing elements */ + int replace_when; /* type of elements that can be replaced */ boolean explode; /* explode instead of change */ + /* ---------- internal values used at runtime when playing ---------- */ + /* functions that are called before, while and after the change of an element -- currently only used for non-custom elements */ void (*pre_change_function)(int x, int y); void (*change_function)(int x, int y); void (*post_change_function)(int x, int y); - /* ---------- internal values used at runtime when playing ---------- */ - short actual_trigger_element; /* element that actually triggered change */ int actual_trigger_player; /* player which actually triggered change */