Remove duplicate date_to_str declaration
[neverball] / ball / demo.h
index 5e0cdca..0dcb0c5 100644 (file)
@@ -2,33 +2,34 @@
 #define DEMO_H
 
 #include <time.h>
+
 #include "level.h"
 
 /*---------------------------------------------------------------------------*/
 
 struct demo
 {
-    char   name[PATHMAX];      /* demo basename */
-    char   filename[MAXSTR];  /* demo path */
-
-    int    timer;           /* elapsed time */
-    int    coins;           /* coin number */
-    int    state;           /* how the replay end */
-    int    mode;            /* game mode */
-    time_t date;            /* date of creation */
-    char   player[MAXNAM];  /* player name */
+    char   name[PATHMAX];     /* demo basename    */
+    char   filename[MAXSTR];  /* demo path        */
+
+    char   player[MAXNAM];
+    time_t date;
+
+    int    timer;
+    int    coins;
+    int    status;
+    int    mode;
+
     char   shot[PATHMAX];   /* image filename */
     char   file[PATHMAX];   /* level filename */
-    char   back[PATHMAX];   /* level bg filename */
-    char   grad[PATHMAX];   /* level gradient filename */
-    char   song[PATHMAX];   /* level song filename */
-    int    time;            /* time limit (! training mode) */
-    int    goal;            /* coin to open the goal (! training mode) */
-    int    score;           /* sum of coins (challenge mode) */
-    int    balls;           /* number of balls (challenge mode) */
-    int    times;           /* total time (challenge mode) */
-};
 
+    int    time;            /* time limit        */
+    int    goal;            /* coin limit        */
+    int    goal_e;          /* goal enabled flag */
+    int    score;           /* total coins       */
+    int    balls;           /* number of balls   */
+    int    times;           /* total time        */
+};
 
 /*---------------------------------------------------------------------------*/
 
@@ -38,26 +39,32 @@ int                demo_scan(void);
 const char        *demo_pick(void);
 const struct demo *demo_get(int);
 
-const char *date_to_str(time_t);
-
 int  demo_exists(const char *);
-void demo_unique(char *);
+
+const char *demo_format_name(const char *fmt,
+                             const char *set,
+                             const char *level);
 
 /*---------------------------------------------------------------------------*/
 
 int  demo_play_init(const char *, const struct level *,
-                    const struct level_game *);
-void demo_play_step(float);
-void demo_play_stop(const struct level_game *);
-int  demo_play_saved(void);
-void demo_play_save(const char *);
+                    int, int, int, int, int, int, int);
+void demo_play_step(void);
+void demo_play_stat(int, int, int);
+void demo_play_stop(void);
+
+int  demo_saved (void);
+void demo_rename(const char *);
+
+void demo_rename_player(const char *name, const char *player);
 
 /*---------------------------------------------------------------------------*/
 
-int  demo_replay_init(const char *, struct level_game *);
-int  demo_replay_step(float *);
+int  demo_replay_init(const char *, int *, int *, int *, int *, int *);
+int  demo_replay_step(float);
 void demo_replay_stop(int);
 void demo_replay_dump_info(void);
+
 const struct demo *curr_demo_replay(void);
 
 /*---------------------------------------------------------------------------*/