add magic to sol files and allow simple loading without texture and other things...
[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 init_levels[MAXSTR]; /* levels list file */
20     char init_scores[MAXSTR]; /* levels intals score file */
21     char user_scores[MAXSTR]; /* lever user highscore file */
22
23     char shot[MAXSTR];        /* screenshot image file*/
24     char name[MAXSTR];        /* set name */
25     char desc[MAXSTR];        /* set description */
26
27     struct score time_score;  /* challenge score */
28     struct score coin_score;  /* challenge score */
29     
30     /* levels info */
31     
32     int count;                /* number of levels */
33     int limit;                /* last opened level */
34 };
35
36 /*---------------------------------------------------------------------------*/
37
38 void set_init();
39
40 int  set_exists(int);
41 const struct set *get_set(int);
42
43 /*---------------------------------------------------------------------------*/
44
45 int  set_extra_bonus_opened(const struct set *);
46 int  set_completed(const struct set *);
47
48 int  set_level_exists(const struct set *, int);
49
50 /*---------------------------------------------------------------------------*/
51
52 void set_goto(int i);
53 const struct set *curr_set(void);
54
55 const struct level *get_level(int);
56
57 /*---------------------------------------------------------------------------*/
58
59 void set_finish_level(struct level_game *, const char *);
60 void score_change_name(struct level_game *, const char *);
61
62 /*---------------------------------------------------------------------------*/
63
64 void level_snap(int);
65
66 void set_cheat(void);
67
68 /*---------------------------------------------------------------------------*/
69
70 #endif