locales: Improved words-fr.png texture
[neverball] / ball / level.h
1 #ifndef LEVEL_H
2 #define LEVEL_H
3
4 #include "base_config.h"
5 #include "score.h"
6 #include "progress.h"
7
8 /*---------------------------------------------------------------------------*/
9
10 struct level
11 {
12     /* TODO: turn into an internal structure. */
13
14     char file[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 name[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 /*---------------------------------------------------------------------------*/
52
53 int  level_exists(int);
54
55 void level_open  (int);
56 int  level_opened(int);
57
58 void level_complete (int);
59 int  level_completed(int);
60
61 int  level_time(int);
62 int  level_goal(int);
63 int  level_bonus(int);
64
65 const char *level_shot(int);
66 const char *level_file(int);
67 const char *level_name(int);
68 const char *level_msg (int);
69
70 /*---------------------------------------------------------------------------*/
71
72 int  level_score_update (int, int, int, int *, int *, int *);
73 void level_rename_player(int, int, int, int, const char *);
74
75 /*---------------------------------------------------------------------------*/
76
77 #endif