Added a tweak to place the GUI into "recently moved" mode upon level end. This will...
[neverball] / ball / levels.h
index ac69891..7901904 100644 (file)
@@ -1,27 +1,41 @@
 #ifndef LEVELS_H
 #define LEVELS_H
 
-#include "game.h"
-
 /*---------------------------------------------------------------------------*/
 
-const struct level_game * curr_lg(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, int);
-int  level_dead(void);
-
-int  count_extra_balls(int, int);
-
-int  level_sort(int *, int *);
-int  level_done(int *, int *);
-       
-void level_update_player_name(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);
 
 /*---------------------------------------------------------------------------*/