diff options
author | Matthew Wozniak <me@woz.blue> | 2024-11-01 13:47:31 -0400 |
---|---|---|
committer | Matthew Wozniak <me@woz.blue> | 2024-11-01 13:48:09 -0400 |
commit | a2f7e37d8adf2047e1f3b0ea1227ac9d51514783 (patch) | |
tree | 2942ee2a12abe02e27f119552221c6a06ac87273 /api.h | |
parent | fb95177298bb92098b61f09b9f66c1fce32f2f02 (diff) | |
download | rt-a2f7e37d8adf2047e1f3b0ea1227ac9d51514783.tar.gz rt-a2f7e37d8adf2047e1f3b0ea1227ac9d51514783.zip |
play demo using the demoplayer object
Diffstat (limited to 'api.h')
-rw-r--r-- | api.h | 41 |
1 files changed, 40 insertions, 1 deletions
@@ -5,6 +5,7 @@ #define ENGINEAPI_H
#define INTERFACEVERSION_VENGINESERVER "VEngineServer021"
+#define VENGINE_CLIENT_INTERFACE_VERSION "VEngineClient013"
#include "intdef.h"
@@ -17,11 +18,49 @@ struct engserver { } *vt;
};
+struct engclient {
+ struct {
+ usize _pad[75];
+ void (*__thiscall is_playing_demo)(struct engclient *this);
+ } *vt;
+};
+
+struct demoplayer {
+ struct {
+ void *_destructor;
+ void * (*__thiscall get_demo_file)(struct demoplayer *this);
+ int (*__thiscall get_playback_tick)(struct demoplayer *this);
+ int (*__thiscall get_total_ticks)(struct demoplayer *this);
+ void *_whatisthisihavenoidea;
+ bool (*__thiscall start_playback)(struct demoplayer *this,
+ const char *filename, bool as_time_demo);
+ bool (*__thiscall is_playing_back)(struct demoplayer *this);
+ bool (*__thiscall is_playback_paused)(struct demoplayer *this);
+ bool (*__thiscall is_playing_time_demo)(struct demoplayer *this);
+ bool (*__thiscall is_skipping)(struct demoplayer *this);
+ bool (*__thiscall can_skip_backwards)(struct demoplayer *this);
+ void (*__thiscall set_playback_time_scale)(struct demoplayer *this,
+ float timescale);
+ float (*__thiscall get_playback_time_scale)(struct demoplayer *this);
+ void (*__thiscall pause_playback)(struct demoplayer *this,
+ float seconds);
+ void (*__thiscall skip_to_tick)(struct demoplayer *this, int tick,
+ bool relative, bool pause);
+ void (*__thiscall resume_playback)(struct demoplayer *this);
+ void (*__thiscall stop_playback)(struct demoplayer *this);
+ void (*__thiscall interpolate_viewpoint)(struct demoplayer *this);
+ } *vt;
+};
+
#ifndef NO_EXTERNS
extern struct engserver *engserver;
+extern struct engclient *engclient;
+extern struct demoplayer *demoplayer;
+extern void (*cbuf_addtext)(char *);
#endif
-void api_init(void);
+// initializes required engine apis. returns false on error.
+bool api_init(void);
#endif
|