X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_gameplay.h;h=aa9a48de387be6ec127c0e09cc5853798353800f;hb=4eff89df72ffc45c4ad59fcd01860eb8f4179b9c;hp=4fb6ece48f342c0e3edd5ee17b00568f34938fbf;hpb=31ded67181e0c5c303559daa82863ff51e3671f0;p=rocksndiamonds.git diff --git a/src/game_bd/bd_gameplay.h b/src/game_bd/bd_gameplay.h index 4fb6ece4..aa9a48de 100644 --- a/src/game_bd/bd_gameplay.h +++ b/src/game_bd/bd_gameplay.h @@ -17,88 +17,78 @@ #ifndef BD_GAMEPLAY_H #define BD_GAMEPLAY_H -#include - #include "bd_cave.h" #define GAME_INT_INVALID -100 -/* prepare cave, gfx buffer */ +// prepare cave, gfx buffer #define GAME_INT_LOAD_CAVE -73 -/* show description/note of cave. */ +// show description/note of cave. #define GAME_INT_SHOW_STORY -72 -/* waiting fire button after showing the story. */ +// waiting fire button after showing the story. #define GAME_INT_SHOW_STORY_WAIT -71 -/* start uncovering */ +// start uncovering #define GAME_INT_START_UNCOVER -70 -/* ...70 frames until full uncover... */ +// ...70 frames until full uncover... #define GAME_INT_UNCOVER_ALL -1 -/* normal running state. */ +// normal running state. #define GAME_INT_CAVE_RUNNING 0 -/* add points for remaining time */ +// add points for remaining time #define GAME_INT_CHECK_BONUS_TIME 1 -/* ...2..99 = wait and do nothing, after adding time */ +// ...2..99 = wait and do nothing, after adding time #define GAME_INT_WAIT_BEFORE_COVER 2 -/* start covering */ +// start covering #define GAME_INT_COVER_START 100 -/* ... 8 frames of cover animation */ +// ... 8 frames of cover animation #define GAME_INT_COVER_ALL 108 -typedef enum _gd_gametype -{ - GD_GAMETYPE_NORMAL, - GD_GAMETYPE_SNAPSHOT, - GD_GAMETYPE_TEST, - GD_GAMETYPE_REPLAY, - GD_GAMETYPE_CONTINUE_REPLAY, -} GdGameType; typedef struct _gd_game { - GdString player_name; /* Name of player */ - int player_score; /* Score of player */ - int player_lives; /* Remaining lives of player */ + GdString player_name; // Name of player + int player_score; // Score of player + int player_lives; // Remaining lives of player GdDirection player_move; boolean player_move_stick; boolean player_fire; - GdGameType type; - - GdCave *cave; /* Copy of the cave. This is the iterated, changed (ruined...) one */ - GdCave *original_cave; /* original cave from caveset. used to record highscore */ - - GdReplay *replay_record; - GdReplay *replay_from; - - GList *replays_recorded; + GdCave *cave; // Copy of the cave. This is the iterated, changed (ruined...) one + GdCave *original_cave; // original cave from caveset. used to record highscore - boolean out_of_window; /* will be set to true, if player is not visible in the window, and we have to wait for scrolling */ + boolean out_of_window; // will be set to true, if player is not visible in the window, + // and we have to wait for scrolling - int cave_num; /* actual playing cave number */ - int cave_score; /* score collected in this cave */ - int level_num; /* actual playing level */ - int bonus_life_flash; /* different kind of flashing, for bonus life */ + int cave_num; // actual playing cave number + int cave_score; // score collected in this cave + int level_num; // actual playing level + int bonus_life_flash; // different kind of flashing, for bonus life - int state_counter; /* counter used to control the game flow, rendering of caves */ + int state_counter; // counter used to control the game flow, rendering of caves int **element_buffer; - int **gfx_buffer; /* contains the indexes to the cells; created by *start_level, deleted by *stop_game */ + int **last_element_buffer; + int **dir_buffer; + int **gfx_buffer; // contains the indexes to the cells; + // created by *start_level, deleted by *stop_game + int itercycle; + int itermax; + int itermax_last; int animcycle; int milliseconds_game; int milliseconds_anim; int replay_no_more_movements; - boolean show_story; /* variable to remember that the story for a particular cave was already shown. */ + boolean show_story; // to remember that story for a particular cave was already shown. } GdGame; typedef enum _gd_game_state @@ -109,7 +99,7 @@ typedef enum _gd_game_state GD_GAME_CAVE_LOADED, GD_GAME_NOTHING, GD_GAME_LABELS_CHANGED, - GD_GAME_TIMEOUT_NOW, /* this signals the moment of time out */ + GD_GAME_TIMEOUT_NOW, // this signals the moment of time out GD_GAME_NO_MORE_LIVES, GD_GAME_STOP, GD_GAME_GAME_OVER, @@ -121,7 +111,6 @@ void gd_game_free(GdGame *gameplay); GdGame *gd_game_new(const int cave, const int level); GdGame *gd_game_new_snapshot(GdCave *snapshot); GdGame *gd_game_new_test(GdCave *cave, int level); -GdGame *gd_game_new_replay(GdCave *cave, GdReplay *replay); void play_game_func(GdGame *game, int action);