int coins; /* coins collected */
int timer; /* time elapsed */
int state_value; /* more precision about the state: skip for goal */
-
+
/* rank = 3 => unclassed */
int coin_rank; /* rank in the level high-scores */
int goal_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) */
};
/*---------------------------------------------------------------------------*/
-#define GAME_NONE 0
-#define GAME_TIME 1
-#define GAME_GOAL 2
-#define GAME_FALL 3
+#define GAME_NONE 0 /* No event (or aborted) */
+#define GAME_TIME 1 /* Time's up */
+#define GAME_GOAL 2 /* Goal reached */
+#define GAME_FALL 3 /* Fall out */
+#define GAME_SPEC 4 /* Special goal reached */
const char *state_to_str(int);