X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=fbd89b278cf005a760fdea16059174e6c420e030;hb=478ead0811dfe963fe610b4fdf2b74a16c7bd12b;hp=aac5a59c254955bebbc7c96631e609265784de13;hpb=c4d9b5e489f38f7e6f42039cce9bca0ecafc0992;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index aac5a59c..fbd89b27 100644 --- a/src/main.h +++ b/src/main.h @@ -108,6 +108,7 @@ #define EP_THROWABLE 28 #define EP_CAN_EXPLODE 29 #define EP_GRAVITY_REACHABLE 30 +#define EP_DONT_GET_HIT_BY 31 /* values for pre-defined properties */ /* (from here on, values can be changed by inserting new values) */ @@ -548,6 +549,7 @@ #define IS_THROWABLE(e) HAS_PROPERTY(e, EP_THROWABLE) #define CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE) #define IS_GRAVITY_REACHABLE(e) HAS_PROPERTY(e, EP_GRAVITY_REACHABLE) +#define DONT_GET_HIT_BY(e) HAS_PROPERTY(e, EP_DONT_GET_HIT_BY) /* macros for special configurable properties */ #define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL) @@ -674,9 +676,11 @@ (e) <= EL_EM_GATE_4) #define IS_EMC_GATE(e) ((e) >= EL_EMC_GATE_5 && \ (e) <= EL_EMC_GATE_8) +#define IS_DC_GATE(e) ((e) == EL_DC_GATE_WHITE) #define IS_GATE(e) (IS_RND_GATE(e) || \ IS_EM_GATE(e) || \ - IS_EMC_GATE(e)) + IS_EMC_GATE(e) || \ + IS_DC_GATE(e)) #define RND_GATE_NR(e) ((e) - EL_GATE_1) #define EM_GATE_NR(e) ((e) - EL_EM_GATE_1) #define EMC_GATE_NR(e) ((e) - EL_EMC_GATE_5 + 4) @@ -696,12 +700,17 @@ (e) <= EL_EMC_GATE_8_GRAY) #define IS_EMC_GATE_GRAY_ACTIVE(e) ((e) >= EL_EMC_GATE_5_GRAY_ACTIVE && \ (e) <= EL_EMC_GATE_8_GRAY_ACTIVE) +#define IS_DC_GATE_GRAY(e) ((e) == EL_DC_GATE_WHITE_GRAY) +#define IS_DC_GATE_GRAY_ACTIVE(e) ((e) == EL_DC_GATE_WHITE_GRAY_ACTIVE) + #define IS_GATE_GRAY(e) (IS_RND_GATE_GRAY(e) || \ IS_EM_GATE_GRAY(e) || \ - IS_EMC_GATE_GRAY(e)) + IS_EMC_GATE_GRAY(e) || \ + IS_DC_GATE_GRAY(e)) #define IS_GATE_GRAY_ACTIVE(e) (IS_RND_GATE_GRAY_ACTIVE(e) || \ IS_EM_GATE_GRAY_ACTIVE(e) || \ - IS_EMC_GATE_GRAY_ACTIVE(e)) + IS_EMC_GATE_GRAY_ACTIVE(e) || \ + IS_DC_GATE_GRAY_ACTIVE(e)) #define RND_GATE_GRAY_NR(e) ((e) - EL_GATE_1_GRAY) #define RND_GATE_GRAY_ACTIVE_NR(e) ((e) - EL_GATE_1_GRAY_ACTIVE) #define EM_GATE_GRAY_NR(e) ((e) - EL_EM_GATE_1_GRAY) @@ -929,6 +938,12 @@ #define MICROLABEL1_YPOS (MICROLEVEL_YPOS - 36) #define MICROLABEL2_YPOS (MICROLEVEL_YPOS + MICROLEVEL_YSIZE + 7) +/* values for GfxRedraw */ +#define GFX_REDRAW_NONE (0) +#define GFX_REDRAW_TILE (1 << 0) +#define GFX_REDRAW_TILE_CRUMBLED (1 << 1) +#define GFX_REDRAW_TILE_CRUMBLED_NEIGHBOURS (1 << 2) +#define GFX_REDRAW_TILE_TWINKLED (1 << 3) /* score for elements */ #define SC_EMERALD 0 @@ -1954,7 +1969,7 @@ #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2007 by Holger Schemel" +#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2008 by Holger Schemel" #define PROGRAM_EMAIL_STRING "info@artsoft.org" #define PROGRAM_WEBSITE_STRING "http://www.artsoft.org/" #define PROGRAM_GAME_BY_STRING "A Game by Artsoft Entertainment" @@ -2378,7 +2393,7 @@ struct ElementChangeInfo int delay_random; /* added frame delay before changed (random) */ int delay_frames; /* either 1 (frames) or 50 (seconds; 50 fps) */ - int trigger_element; /* element triggering change */ + int initial_trigger_element; /* initial element triggering change */ struct Content target_content;/* elements for extended change target */ boolean use_target_content; /* use extended change target */ @@ -2396,6 +2411,8 @@ struct ElementChangeInfo /* ---------- internal values used at runtime when playing ---------- */ + int trigger_element; /* element triggering change */ + /* 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); @@ -2740,6 +2757,7 @@ extern int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +extern int GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int ActiveElement[MAX_NUM_ELEMENTS]; extern int ActiveButton[NUM_IMAGE_FILES];