X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=cdfd00cc8999f852b59e8f1d9cdd6cd97aa0469d;hb=d14ff3d04c44d90b4dc151fd7774946e20da0152;hp=b8941add3846ea550572819576d903c8fc13ddf2;hpb=ecf508e3d4590f48a92f6b37114a0590a08acb2b;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index b8941add..cdfd00cc 100644 --- a/src/main.h +++ b/src/main.h @@ -50,8 +50,8 @@ #define MIN_LEV_FIELDY 3 #define STD_LEV_FIELDX 64 #define STD_LEV_FIELDY 32 -#define MAX_LEV_FIELDX 128 -#define MAX_LEV_FIELDY 128 +#define MAX_LEV_FIELDX MAX_PLAYFIELD_WIDTH +#define MAX_LEV_FIELDY MAX_PLAYFIELD_HEIGHT #define SCREENX(a) ((a) - scroll_x) #define SCREENY(a) ((a) - scroll_y) @@ -171,7 +171,11 @@ #define EP_BITMASK_DEFAULT 0 #define PROPERTY_BIT(p) (1 << ((p) % 32)) +#if 1 +#define PROPERTY_VAR(e,p) (element_info[e].properties[(p) / 32]) +#else #define PROPERTY_VAR(e,p) (Properties[e][(p) / 32]) +#endif #define HAS_PROPERTY(e,p) ((PROPERTY_VAR(e, p) & PROPERTY_BIT(p)) != 0) #define SET_PROPERTY(e,p,v) ((v) ? \ (PROPERTY_VAR(e,p) |= PROPERTY_BIT(p)) : \ @@ -746,7 +750,7 @@ #define EL_CASCADE_TOGGLE(e) (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : \ IS_EDITOR_CASCADE_ACTIVE(e) ? (e) - 1 : (e)) -#define EL_NAME(e) (element_info[e].token_name) +#define EL_NAME(e) ((e) >= 0 ? element_info[e].token_name : "(?)") /* fundamental game speed values */ #define ONE_SECOND_DELAY 1000 /* delay value for one second */ @@ -1660,7 +1664,7 @@ #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2005 by Holger Schemel" +#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2006 by Holger Schemel" #define ICON_TITLE_STRING PROGRAM_TITLE_STRING #define COOKIE_PREFIX "ROCKSNDIAMONDS" @@ -2199,6 +2203,8 @@ struct ElementInfo /* ---------- special element property values ---------- */ + unsigned long properties[NUM_EP_BITFIELDS]; /* element base properties */ + boolean use_gfx_element; /* use custom graphic element */ int gfx_element; /* optional custom graphic element */ @@ -2436,7 +2442,9 @@ extern short ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +#if 0 extern unsigned long Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS]; +#endif extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];