X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=2f323f279a3f05d55b2581c18a276339dfb4c0c9;hb=197edf38367a6f825e4a60441a11a3c55191e51b;hp=1e62cc61186a8ab658c32be77c43875a7ff6d2ab;hpb=872cf2d86e73d185fcad1fac7b389e7d1dfcb839;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 1e62cc61..2f323f27 100644 --- a/src/main.h +++ b/src/main.h @@ -625,6 +625,18 @@ #define IS_OBSOLETE(e) HAS_PROPERTY(e, EP_OBSOLETE) /* special macros used in game engine */ +#define IS_FILE_ELEMENT(e) ((e) >= 0 && \ + (e) <= NUM_FILE_ELEMENTS) + +#define IS_DRAWABLE_ELEMENT(e) ((e) >= 0 && \ + (e) <= NUM_DRAWABLE_ELEMENTS) + +#define IS_RUNTIME_ELEMENT(e) ((e) >= 0 && \ + (e) <= NUM_RUNTIME_ELEMENTS) + +#define IS_VALID_ELEMENT(e) ((e) >= 0 && \ + (e) <= MAX_NUM_ELEMENTS) + #define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \ (e) <= EL_CUSTOM_END) @@ -1526,8 +1538,10 @@ #define EL_EMC_DRIPPER_ACTIVE (EL_FIRST_RUNTIME_REAL + 70) #define EL_EMC_SPRING_BUMPER_ACTIVE (EL_FIRST_RUNTIME_REAL + 71) +#define NUM_DRAWABLE_ELEMENTS (EL_FIRST_RUNTIME_REAL + 72) + /* "unreal" (and therefore not drawable) runtime elements */ -#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 72) +#define EL_FIRST_RUNTIME_UNREAL (NUM_DRAWABLE_ELEMENTS) #define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0) #define EL_EXPLOSION (EL_FIRST_RUNTIME_UNREAL + 1) @@ -1911,7 +1925,7 @@ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 2 #define PROGRAM_VERSION_PATCH 4 -#define PROGRAM_VERSION_BUILD 0 +#define PROGRAM_VERSION_BUILD 1 #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" @@ -2460,6 +2474,9 @@ struct ElementInfo int collect_score; /* runtime score value for collecting */ + /* count of this element on playfield, calculated after each frame */ + int element_count; + /* ---------- internal values used in level editor ---------- */ int access_type; /* walkable or passable */