/*---------------------------------------------------------------------------*/
-#define MODE_CHALLENGE 1
-#define MODE_NORMAL 2
-#define MODE_PRACTICE 3
-#define MODE_SINGLE 4
-
-const char *mode_to_str(int);
-
-const char *level_shot(int);
-const char *level_coin_n(int, int);
-const char *level_time_n(int, int);
-int level_coin_c(int, int);
-int level_time_c(int, int);
-int level_coin_t(int, int);
-int level_time_t(int, int);
-
-void level_init(const char *, const char *, const char *);
-void level_free(void);
-
-int level_exists(int);
-int level_opened(int);
-int level_locked(int);
-int level_extra_bonus(int i);
-int level_extra_bonus_opened(void);
-int level_set_completed(void);
-const char * level_number_name(int);
-
-int curr_times_total(void);
-int curr_coins_total(void);
-int curr_count(void);
-int curr_score(void);
-int curr_balls(void);
-int curr_level(void);
-
-int level_replay(const char *);
-void level_play_single(const char *);
-void level_play(int, int);
-int level_play_go(void);
-void level_next(void);
-
-void level_stop(int);
-int level_dead(void);
-int level_last(void);
-int level_sort(int *, int *);
-int level_done(int *, int *);
-int count_extra_balls(int, int);
-
-
-void level_name(int, const char *, int, int);
-void level_snap(int);
-void level_song(void);
-
-int level_mode(void);
-
-void level_cheat(void);
+struct level_game
+{
+ int mode; /* game mode */
+ const struct level *level; /* the level played */
+
+ int goal; /* coins needed */
+ int time; /* time limit */
+
+ /* MODE_CHALLENGE only */
+ int score; /* coin total */
+ int balls; /* live count */
+ int times; /* time total */
+
+ /* Once a level is finished */
+ int status; /* status ending */
+ int coins; /* coins collected */
+ int timer; /* time elapsed */
+
+ /* rank = 3 => unclassed */
+ int coin_rank; /* rank in the level high-scores */
+ int goal_rank; /* rank in the level high-scores */
+ int time_rank; /* rank in the level high-scores */
+ int score_rank; /* rank in the set high-scores */
+ int times_rank; /* rank in the set high-scores */
+
+ /* What about the game and the set? */
+ int dead; /* Is the game over and lost? */
+ int win; /* Is the game over and win? */
+ int unlock; /* Is the next level newly unlocked */
+ const struct level *next_level; /* next level (NULL no next level) */
+};
+
+struct level_game *curr_lg(void);
/*---------------------------------------------------------------------------*/