Kill trailing whitespace.
[neverball] / ball / demo.h
1 #ifndef DEMO_H
2 #define DEMO_H
3
4 #include <time.h>
5 #include "level.h"
6
7 /*---------------------------------------------------------------------------*/
8
9 /* Demo information structure (header) */
10 struct demo
11 {
12     char   name[PATHMAX];      /* demo basename */
13     char   filename[PATHMAX]; /* demo path */
14
15     /* The following reflects the file structure */
16     /* magic number */
17     /* replay file version */
18     int    timer;           /* elapsed time */
19     int    coins;           /* coin number */
20     int    state;           /* how the replay end */
21     int    mode;            /* game mode */
22     time_t date;            /* date of creation */
23     char   player[MAXNAM];  /* player name */
24     char   shot[PATHMAX];   /* image filename */
25     char   file[PATHMAX];   /* level filename */
26     char   back[PATHMAX];   /* level bg filename */
27     char   grad[PATHMAX];   /* level gradiant filename */
28     char   song[PATHMAX];   /* level song filename */
29     int    time;            /* time limit (! training mode) */
30     int    goal;            /* coin to open the goal (! training mode) */
31     int    score;           /* sum of coins (challenge mode) */
32     int    balls;           /* number of balls (challenge mode) */
33     int    times;           /* total time (challenge mode) */
34     char   nb_version[20]; /* neverball version used */
35 };
36
37
38 /*---------------------------------------------------------------------------*/
39
40 #define MAXDEMO 256
41
42 int               demo_scan(void);
43 const char        *demo_pick(void);
44 const struct demo *get_demo(int);
45
46 const char * date_to_str(time_t);
47
48 int  demo_exists(char *);
49 void demo_unique(char *);
50
51 /*---------------------------------------------------------------------------*/
52
53 int  demo_play_init(const char *, const struct level *,
54                     const struct level_game *);
55 /*                    int, int, int, int, int, int);*/
56 void demo_play_step(float);
57 void demo_play_stop(const struct level_game *);
58 int  demo_play_saved(void);
59 void demo_play_save(const char *);
60
61 /*---------------------------------------------------------------------------*/
62
63 int  demo_replay_init(const char *, struct level_game *);
64 int  demo_replay_step(float *);
65 void demo_replay_stop(int);
66 void demo_replay_dump_info(void);
67 const struct demo *curr_demo_replay(void);
68
69 /*---------------------------------------------------------------------------*/
70
71 #endif