Those sets haven't been merged.
[neverball] / ball / level.h
1 #ifndef LEVEL_H
2 #define LEVEL_H
3
4 #include "base_config.h"
5 #include "score.h"
6 #include "levels.h"
7
8 /*---------------------------------------------------------------------------*/
9
10 struct level
11 {
12     char file[PATHMAX];
13     char back[PATHMAX];
14     char grad[PATHMAX];
15     char shot[PATHMAX];
16     char song[PATHMAX];
17
18     char message[MAXSTR];
19
20     char version[MAXSTR];
21     char author[MAXSTR];
22
23     int time; /* Time limit   */
24     int goal; /* Coins needed */
25
26     struct
27     {
28         struct score best_times;
29         struct score unlock_goal;
30         struct score most_coins;
31     }
32     score;
33
34     /* Set information. */
35
36     struct set *set;
37
38     int  number;
39
40     /* String representation of the number (eg. "IV") */
41     char repr[MAXSTR];
42
43     int is_locked;
44     int is_bonus;
45     int is_completed;
46 };
47
48 int  level_load(const char *, struct level *);
49 void level_dump(const struct level *);
50
51 int  level_replay(const char *);
52 int  level_play(const struct level *, int);
53 void level_stat(int, int, int);
54 void level_stop(void);
55 int  level_next(void);
56 int  level_same(void);
57
58 /*---------------------------------------------------------------------------*/
59
60 int count_extra_balls(int, int);
61
62 void level_update_player_name(void);
63
64 /*---------------------------------------------------------------------------*/
65
66 #define GAME_NONE 0     /* No event (or aborted) */
67 #define GAME_TIME 1     /* Time's up */
68 #define GAME_GOAL 2     /* Goal reached */
69 #define GAME_FALL 3     /* Fall out */
70
71 const char *status_to_str(int);
72
73 #endif