#define EP_DROPPABLE 22
#define EP_CAN_EXPLODE_1X1 23
#define EP_PUSHABLE 24
+#define EP_CAN_EXPLODE_DYNA 25
/* values for pre-defined properties */
#define EP_PLAYER 32
#define CE_PRESSED_BY_PLAYER 2
#define CE_PUSHED_BY_PLAYER 3
#define CE_DROPPED_BY_PLAYER 4
-#define CE_COLLISION 5
+#define CE_HITTING_SOMETHING 5
#define CE_IMPACT 6
#define CE_SMASHED 7
#define CE_OTHER_IS_TOUCHING 8
#define CE_OTHER_GETS_PUSHED 13
#define CE_OTHER_GETS_COLLECTED 14
#define CE_OTHER_GETS_DROPPED 15
-#define CE_BY_PLAYER 16 /* obsolete; now CE_BY_DIRECT_ACTION */
-#define CE_BY_COLLISION 17 /* obsolete; now CE_BY_DIRECT_ACTION */
+#define CE_BY_PLAYER_OBSOLETE 16 /* obsolete; now CE_BY_DIRECT_ACTION */
+#define CE_BY_COLLISION_OBSOLETE 17 /* obsolete; now CE_BY_DIRECT_ACTION */
#define CE_BY_OTHER_ACTION 18 /* activates other element events */
#define CE_BY_DIRECT_ACTION 19 /* activates direct element events */
#define CE_OTHER_GETS_DIGGED 20
#define CE_OTHER_GETS_LEFT 24
#define CE_SWITCHED 25
#define CE_OTHER_IS_SWITCHING 26
+#define CE_HIT_BY_SOMETHING 27
+#define CE_OTHER_IS_HITTING 28
+#define CE_OTHER_GETS_HIT 29
-#define NUM_CHANGE_EVENTS 27
+#define NUM_CHANGE_EVENTS 30
#define CE_BITMASK_DEFAULT 0
#define MV_BIT_TURNING_LEFT 8
#define MV_BIT_TURNING_RIGHT 9
#define MV_BIT_WHEN_PUSHED 10
+#define MV_BIT_MAZE_RUNNER 11
+#define MV_BIT_MAZE_HUNTER 12
+#define MV_BIT_WHEN_DROPPED 13
+#define MV_BIT_TURNING_LEFT_RIGHT 14
+#define MV_BIT_TURNING_RIGHT_LEFT 15
+#define MV_BIT_TURNING_RANDOM 16
/* values for special move patterns for custom elements */
#define MV_HORIZONTAL (MV_LEFT | MV_RIGHT)
#define MV_TURNING_LEFT (1 << MV_BIT_TURNING_LEFT)
#define MV_TURNING_RIGHT (1 << MV_BIT_TURNING_RIGHT)
#define MV_WHEN_PUSHED (1 << MV_BIT_WHEN_PUSHED)
+#define MV_MAZE_RUNNER (1 << MV_BIT_MAZE_RUNNER)
+#define MV_MAZE_HUNTER (1 << MV_BIT_MAZE_HUNTER)
+#define MV_MAZE_RUNNER_STYLE (MV_MAZE_RUNNER | MV_MAZE_HUNTER)
+#define MV_WHEN_DROPPED (1 << MV_BIT_WHEN_DROPPED)
+#define MV_TURNING_LEFT_RIGHT (1 << MV_BIT_TURNING_LEFT_RIGHT)
+#define MV_TURNING_RIGHT_LEFT (1 << MV_BIT_TURNING_RIGHT_LEFT)
+#define MV_TURNING_RANDOM (1 << MV_BIT_TURNING_RANDOM)
/* values for slippery property for custom elements */
#define SLIPPERY_ANY_RANDOM 0
#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)
/* macros for special configurable properties */
#define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
#define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \
(e) <= EL_CUSTOM_END)
+#define IS_GROUP_ELEMENT(e) ((e) >= EL_GROUP_START && \
+ (e) <= EL_GROUP_END)
+
#define IS_ENVELOPE(e) ((e) >= EL_ENVELOPE_1 && \
(e) <= EL_ENVELOPE_4)
#define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7)
+/* score for elements */
+#define SC_EMERALD 0
+#define SC_DIAMOND 1
+#define SC_BUG 2
+#define SC_SPACESHIP 3
+#define SC_YAMYAM 4
+#define SC_ROBOT 5
+#define SC_PACMAN 6
+#define SC_NUT 7
+#define SC_DYNAMITE 8
+#define SC_KEY 9
+#define SC_TIME_BONUS 10
+#define SC_CRYSTAL 11
+#define SC_PEARL 12
+#define SC_SHIELD 13
+
+
/* "real" level file elements */
#define EL_UNDEFINED -1
#define EL_BD_MAGIC_WALL 61
#define EL_INVISIBLE_STEELWALL 62
-#define EL_UNUSED_63 63
+#define EL_MAZE_RUNNER 63
#define EL_DYNABOMB_INCREASE_NUMBER 64
#define EL_DYNABOMB_INCREASE_SIZE 65
#define EL_ENVELOPE_3 622
#define EL_ENVELOPE_4 623
-#define NUM_FILE_ELEMENTS 624
+/* ---------- begin of group elements section ------------------------------ */
+#define EL_GROUP_START 624
+
+#include "conf_grp.h" /* include auto-generated data structure definitions */
+
+#define NUM_GROUP_ELEMENTS 32
+#define EL_GROUP_END 655
+/* ---------- end of custom elements section ------------------------------- */
+
+#define NUM_FILE_ELEMENTS 656
/* "real" (and therefore drawable) runtime elements */
#define PROGRAM_VERSION_MAJOR 3
#define PROGRAM_VERSION_MINOR 0
-#define PROGRAM_VERSION_PATCH 8
+#define PROGRAM_VERSION_PATCH 9
#define PROGRAM_VERSION_BUILD 0
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
{
boolean present; /* player present in level playfield */
boolean connected; /* player connected (locally or via network) */
- boolean active; /* player (present && connected) */
+ boolean active; /* player present and connected */
int index_nr, client_nr, element_nr;
boolean is_collecting;
boolean is_pushing;
boolean is_switching;
+ boolean is_dropping;
boolean is_bored;
boolean is_sleeping;
int anim_delay_counter;
int post_delay_counter;
+ int action_waiting, last_action_waiting;
int special_action_bored;
int special_action_sleeping;
unsigned long move_delay;
int move_delay_value;
+ int move_delay_reset_counter;
+
unsigned long push_delay;
unsigned long push_delay_value;
unsigned long actual_frame_counter;
+ int drop_delay;
+
+ int step_counter;
+
int score;
int gems_still_needed;
int sokobanfields_still_needed;
int music[MAX_LEVELS];
};
+struct LevelFileInfo
+{
+ int nr;
+ int type;
+ char *filename;
+};
+
struct LevelInfo
{
int file_version; /* file format version the level is stored with */
struct MusicFileInfo
{
- char *context;
+ char *basename;
+
+ char *title_header;
+ char *artist_header;
+ char *album_header;
+ char *year_header;
char *title;
char *artist;
char *album;
char *year;
+ int music;
+
+ boolean is_sound;
+
struct MusicFileInfo *next;
};
extern short AmoebaCnt2[MAX_NUM_AMOEBA];
extern short ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern unsigned long Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];