Debian Codegraph @

prboom2/src/dsda/split_tracker.h

raw
1 //
2 // Copyright(C) 2021 by Ryan Krafnick
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Split Tracker
16 //
17
18 #ifndef __DSDA_SPLIT_TRACKER__
19 #define __DSDA_SPLIT_TRACKER__
20
21 typedef struct {
22 int current;
23 int best;
24 int best_delta;
25 int session_best;
26 int session_best_delta;
27 int ref;
28 int ref_delta;
29 } dsda_split_time_t;
30
31 typedef struct {
32 dsda_split_time_t leveltime;
33 dsda_split_time_t totalleveltimes;
34 int episode;
35 int map;
36 int first_time;
37 int run_counter;
38 int exits;
39 } dsda_split_t;
40
41 void dsda_RecordSplit(void);
42 dsda_split_t* dsda_CurrentSplit(void);
43 void dsda_WriteSplits(void);
44 void dsda_ResetSplits(void);
45 int dsda_DemoAttempts(void);
46
47 #endif