add infos in Modes and Secrets tabs
[neverball] / ball / set.h
1 #ifndef SET_H
2 #define SET_H
3
4 #include "base_config.h"
5 #include "level.h"
6
7 /*---------------------------------------------------------------------------*/
8
9 #define SET_FILE "sets.txt"
10 #define MAXSET 16
11 #define MAXLVL 25
12
13 /* A pack of levels */
14 struct set
15 {
16     /* set global info */
17     int number;               /* number of the set */
18
19     char file[PATHMAX];
20
21     char user_scores[PATHMAX]; /* user highscore file */
22     char setname[MAXSTR];     /* internal set name */
23
24     char name[MAXSTR];        /* set name */
25     char desc[MAXSTR];        /* set description */
26     char shot[MAXSTR];        /* screenshot image file*/
27
28     struct score time_score;  /* challenge score */
29     struct score coin_score;  /* challenge score */
30
31     /* levels info */
32
33     int count;                /* number of levels */
34     int locked;               /* number of locked levels */
35     int completed;            /* number of completed levels */
36 };
37
38 /*---------------------------------------------------------------------------*/
39
40 void set_init();
41
42 int  set_exists(int);
43 const struct set *get_set(int);
44
45 /*---------------------------------------------------------------------------*/
46
47 int  set_unlocked(const struct set *);
48 int  set_completed(const struct set *);
49
50 int  set_level_exists(const struct set *, int);
51
52 /*---------------------------------------------------------------------------*/
53
54 void set_goto(int i);
55 const struct set *curr_set(void);
56
57 const struct level *get_level(int);
58
59 /*---------------------------------------------------------------------------*/
60
61 void set_finish_level(struct level_game *, const char *);
62 void score_change_name(struct level_game *, const char *);
63
64 /*---------------------------------------------------------------------------*/
65
66 void level_snap(int);
67
68 void set_cheat(void);
69
70 /*---------------------------------------------------------------------------*/
71
72 #endif