X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_cave.h;h=aa27a5f73604efe438a7913dcb3947f824d40966;hb=d2b7c541271aec188c9394af58cdb8d9f66d88b9;hp=189e2777d69687375c72e2a86bd283d57050f359;hpb=2be47982a3acd069ebfdb2a75b26f770257932a6;p=rocksndiamonds.git diff --git a/src/game_bd/bd_cave.h b/src/game_bd/bd_cave.h index 189e2777..aa27a5f7 100644 --- a/src/game_bd/bd_cave.h +++ b/src/game_bd/bd_cave.h @@ -179,6 +179,8 @@ enum _element_property E_P_PLAYER, /* easier to find out if it is a player element */ E_P_MOVED_BY_CONVEYOR_TOP, /* can be moved by conveyor belt */ E_P_MOVED_BY_CONVEYOR_BOTTOM, /* can be moved UNDER the conveyor belt */ + + E_P_COLLECTIBLE, /* can be collected */ }; /* properties */ @@ -210,6 +212,8 @@ enum _element_property #define P_MOVED_BY_CONVEYOR_TOP (1 << E_P_MOVED_BY_CONVEYOR_TOP) #define P_MOVED_BY_CONVEYOR_BOTTOM (1 << E_P_MOVED_BY_CONVEYOR_BOTTOM) +#define P_COLLECTIBLE (1 << E_P_COLLECTIBLE) + /* These are states of the magic wall. */ typedef enum _magic_wall_state { @@ -550,7 +554,13 @@ typedef struct _gd_cave boolean pneumatic_hammer_sound; /* internal variables, used during the game. private data :) */ - GdElement* (*getp) (const struct _gd_cave*, int x, int y); /* returns a pointer to the element at x, y. this points to a perfect border or a line shifting get function. */ + + /* returns range corrected x/y position (points to perfect or line shifting get function) */ + int (*getx) (const struct _gd_cave*, int x, int y); + int (*gety) (const struct _gd_cave*, int x, int y); + + /* returns pointer to element at x, y (points to perfect border or a line shifting get function) */ + GdElement* (*getp) (const struct _gd_cave*, int x, int y); boolean hatched; /* hatching has happened. (timers may run, ...) */ boolean gate_open; /* self-explaining */ @@ -703,9 +713,6 @@ GdReplay *gd_replay_new_from_replay(GdReplay *orig); void gd_replay_free(GdReplay *replay); void gd_replay_store_movement(GdReplay *replay, GdDirection player_move, boolean player_fire, boolean suicide); boolean gd_replay_get_next_movement(GdReplay *replay, GdDirection *player_move, boolean *player_fire, boolean *suicide); -void gd_replay_rewind(GdReplay *replay); - -char *gd_replay_movements_to_bdcff(GdReplay *replay); guint32 gd_cave_adler_checksum(GdCave *cave); void gd_cave_adler_checksum_more(GdCave *cave, guint32 *a, guint32 *b);