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 /*---------------------------------------------------------------------------*/
31 char levelname[MAXSTR];
35 int time; /* Time limit */
36 int goal; /* Coins needed */
40 struct score best_times;
41 struct score unlock_goal;
42 struct score most_coins;
46 /* Set information. */
51 char repr[3]; /* String representation of the number (eg. "B1") */
58 int level_load(const char *, struct level *);
60 void level_dump_info(const struct level *);
62 /*---------------------------------------------------------------------------*/
64 /* A level for the playing */
68 int mode; /* game mode */
69 const struct level *level; /* the level played */
71 int goal; /* coins needed */
72 int time; /* time limit */
74 /* MODE_CHALLENGE only */
75 int score; /* coin total */
76 int balls; /* live count */
77 int times; /* time total */
79 /* Once a level is finished */
80 int state; /* state ending */
81 int coins; /* coins collected */
82 int timer; /* time elapsed */
83 int state_value; /* more precision about the state: skip for goal */
85 /* rank = 3 => unclassed */
86 int coin_rank; /* rank in the level high-scores */
87 int goal_rank; /* rank in the level high-scores */
88 int time_rank; /* rank in the level high-scores */
89 int score_rank; /* rank in the set high-scores */
90 int times_rank; /* rank in the set high-scores */
92 /* What about the game and the set? */
93 int dead; /* Is the game over and lost? */
94 int win; /* Is the game over and win? */
95 int unlock; /* Is the next level newly unlocked */
96 const struct level *next_level; /* next level (NULL no next level) */
99 /*---------------------------------------------------------------------------*/
101 #define MODE_CHALLENGE 1
102 #define MODE_NORMAL 2
103 #define MODE_PRACTICE 3
104 #define MODE_SINGLE 4
106 const char *mode_to_str(int);
108 /*---------------------------------------------------------------------------*/
110 #define GAME_NONE 0 /* No event (or aborted) */
111 #define GAME_TIME 1 /* Time's up */
112 #define GAME_GOAL 2 /* Goal reached */
113 #define GAME_FALL 3 /* Fall out */
114 #define GAME_SPEC 4 /* Special goal reached */
116 const char *state_to_str(int);