Debian Codegraph @

prboom2/src/dsda/key_frame.h

raw
1 //
2 // Copyright(C) 2020 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 Key Frame
16 //
17
18 #ifndef __DSDA_KEY_FRAME__
19 #define __DSDA_KEY_FRAME__
20
21 #include "doomtype.h"
22
23 struct auto_kf_s;
24
25 typedef struct {
26 byte* buffer;
27 struct auto_kf_s* auto_kf;
28 } parent_kf_t;
29
30 typedef struct {
31 byte* buffer;
32 int buffer_length;
33 int game_tic_count;
34 parent_kf_t parent;
35 } dsda_key_frame_t;
36
37 typedef struct auto_kf_s {
38 int auto_index;
39 dsda_key_frame_t kf;
40 struct auto_kf_s* prev;
41 struct auto_kf_s* next;
42 } auto_kf_t;
43
44 void dsda_StoreKeyFrame(dsda_key_frame_t* key_frame, byte complete, byte export);
45 void dsda_RestoreKeyFrame(dsda_key_frame_t* key_frame, dboolean skip_wipe);
46 dboolean dsda_RestoreClosestKeyFrame(int tic);
47 int dsda_KeyFrameRestored(void);
48 void dsda_ContinueKeyFrame(void);
49
50 void dsda_InitAutoKeyFrames(void);
51 void dsda_UpdateAutoKeyFrames(void);
52 void dsda_ForgetAutoKeyFrames(void);
53 void dsda_RewindAutoKeyFrame(void);
54 void dsda_ResetAutoKeyFrameTimeout(void);
55
56 void dsda_InitPlaybackKeyFrames(void);
57 void dsda_UpdatePlaybackKeyFrames(void);
58
59 void dsda_StoreTempKeyFrame(void);
60 void dsda_StoreQuickKeyFrame(void);
61 void dsda_RestoreQuickKeyFrame(void);
62
63 #endif