E_P_BLOWS_UP_FLIES, /* flies blow up, if they touch this */
E_P_EXPLODES_BY_HIT, /* explodes if hit by a stone */
+ E_P_EXPLOSION, /* set for every stage of every explosion. */
E_P_EXPLOSION_FIRST_STAGE, /* set for first stage of every explosion.
helps slower/faster explosions changing */
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 */
#define P_BLOWS_UP_FLIES (1 << E_P_BLOWS_UP_FLIES)
#define P_EXPLODES_BY_HIT (1 << E_P_EXPLODES_BY_HIT)
+#define P_EXPLOSION (1 << E_P_EXPLOSION)
#define P_EXPLOSION_FIRST_STAGE (1 << E_P_EXPLOSION_FIRST_STAGE)
#define P_NON_EXPLODABLE (1 << E_P_NON_EXPLODABLE)
#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
{
GD_MV_LEFT = 7,
GD_MV_UP_LEFT = 8,
- /* to be able to type GD_MV_TWICE+GD_MV_DOWN, for example */
+ /* to be able to type GD_MV_TWICE + GD_MV_DOWN, for example */
GD_MV_TWICE = 8,
/* directions * 2 */
GdString player_name; /* who played this */
GdString date; /* when played */
- GString *comment; /* some comments from the player */
+ char *comment; /* some comments from the player */
int score; /* score collected */
int duration; /* number of seconds played */
GdString difficulty; /* difficulty of the game, for info purposes */
GdString www; /* link to author's webpage */
GdString date; /* date of creation */
- GString *story; /* story for the cave - will be shown when the cave is played. */
- GString *remark; /* some note */
+ char *story; /* story for the cave - will be shown when the cave is played. */
+ char *remark; /* some note */
GdString charset; /* these are not used by gdash */
GdString fontset;
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 */
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);