4 #include "base_config.h"
7 /*---------------------------------------------------------------------------*/
11 char player[NSCORE + 1][MAXNAM];
13 int timer [NSCORE + 1]; /* Time elapsed */
14 int coins [NSCORE + 1]; /* Coins collected */
17 void score_init_hs(struct score *, int, int);
19 /*---------------------------------------------------------------------------*/
34 int time; /* Time limit */
35 int goal; /* Coins needed */
39 struct score best_times;
40 struct score unlock_goal;
41 struct score most_coins;
45 /* Set information. */
50 char repr[3]; /* String representation of the number (eg. "B1") */
57 int level_load(const char *, struct level *);
59 void level_dump_info(const struct level *);
61 /*---------------------------------------------------------------------------*/
63 /* A level for the playing */
67 int mode; /* game mode */
68 const struct level *level; /* the level played */
70 int goal; /* coins needed */
71 int time; /* time limit */
73 /* MODE_CHALLENGE only */
74 int score; /* coin total */
75 int balls; /* live count */
76 int times; /* time total */
78 /* Once a level is finished */
79 int state; /* state ending */
80 int coins; /* coins collected */
81 int timer; /* time elapsed */
82 int state_value; /* more precision about the state: skip for goal */
84 /* rank = 3 => unclassed */
85 int coin_rank; /* rank in the level high-scores */
86 int goal_rank; /* rank in the level high-scores */
87 int time_rank; /* rank in the level high-scores */
88 int score_rank; /* rank in the set high-scores */
89 int times_rank; /* rank in the set high-scores */
91 /* What about the game and the set? */
92 int dead; /* Is the game over and lost? */
93 int win; /* Is the game over and win? */
94 int unlock; /* Is the next level newly unlocked */
95 const struct level *next_level; /* next level (NULL no next level) */
98 /*---------------------------------------------------------------------------*/
100 #define MODE_CHALLENGE 1
101 #define MODE_NORMAL 2
102 #define MODE_PRACTICE 3
103 #define MODE_SINGLE 4
105 const char *mode_to_str(int);
107 /*---------------------------------------------------------------------------*/
109 #define GAME_NONE 0 /* No event (or aborted) */
110 #define GAME_TIME 1 /* Time's up */
111 #define GAME_GOAL 2 /* Goal reached */
112 #define GAME_FALL 3 /* Fall out */
113 #define GAME_SPEC 4 /* Special goal reached */
115 const char *state_to_str(int);