diff options
author | Matthew Wozniak <me@woz.blue> | 2024-11-03 00:20:45 -0400 |
---|---|---|
committer | Matthew Wozniak <me@woz.blue> | 2024-11-03 00:22:05 -0400 |
commit | 492aac484b5c65e5df21a7d1b1cf781063efef50 (patch) | |
tree | 01055654432f784c6d709690f0d6b7e175c3262d /api.h | |
parent | d00096fe2ea3dd64cff9878879c077f23a783e4a (diff) | |
download | rt-492aac484b5c65e5df21a7d1b1cf781063efef50.tar.gz rt-492aac484b5c65e5df21a7d1b1cf781063efef50.zip |
purge CR from this project
Diffstat (limited to 'api.h')
-rw-r--r-- | api.h | 204 |
1 files changed, 102 insertions, 102 deletions
@@ -1,102 +1,102 @@ -// SPDX-License-Identifier: ISC
-// SPDX-FileCopyrightText: 2024 Matthew Wozniak <me@woz.blue>
-
-#ifndef ENGINEAPI_H
-#define ENGINEAPI_H
-
-#define VENGINE_SERVER_INTERFACE_VERSION "VEngineServer021"
-#define VENGINE_CLIENT_INTERFACE_VERSION "VEngineClient013"
-#define VENGINE_LAUNCHER_INTERFACE_VERSION "VENGINE_LAUNCHER_API_VERSION004"
-#define VENGINE_TOOL_INTERFACE_VERSION "VENGINETOOL003"
-
-#include "intdef.h"
-
-typedef void * (*createinterface_func)(const char *name, int *ret);
-
-struct engserver {
- struct {
- usize _pad[36];
- void (*__thiscall server_command)(struct engserver *this, const char *str);
- } *vt;
-};
-
-struct engclient {
- struct {
- usize _pad[75];
- void (*__thiscall is_playing_demo)(struct engclient *this);
- } *vt;
-};
-
-struct engineapi {
- struct {
- usize _pad[7];
- void *set_engine_window;
- } *vt;
-};
-
-struct enginetools {
- struct {
- usize _pad[64];
- void *is_recording_movie;
- } *vt;
-};
-
-struct movieinfo {
- char name[256];
- int curframe;
- int type;
- int jpeg_quality;
-};
-
-struct videomode {
- struct {
- usize _pad[22];
- void (*__thiscall write_movie_frame)(struct videomode *this,
- struct movieinfo *info);
- } *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; // TODO
- 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 engineapi *engineapi;
-extern struct enginetools *enginetools;
-extern struct demoplayer *demoplayer;
-extern struct videomode **videomode;
-extern struct movieinfo *movieinfo;
-extern void (*cbuf_addtext)(char *);
-#endif
-
-// initializes required engine apis. returns false on error.
-bool api_init(void);
-
-#endif
-
-// vi: sw=4 ts=4 noet tw=80 cc=80
+// SPDX-License-Identifier: ISC +// SPDX-FileCopyrightText: 2024 Matthew Wozniak <me@woz.blue> + +#ifndef ENGINEAPI_H +#define ENGINEAPI_H + +#define VENGINE_SERVER_INTERFACE_VERSION "VEngineServer021" +#define VENGINE_CLIENT_INTERFACE_VERSION "VEngineClient013" +#define VENGINE_LAUNCHER_INTERFACE_VERSION "VENGINE_LAUNCHER_API_VERSION004" +#define VENGINE_TOOL_INTERFACE_VERSION "VENGINETOOL003" + +#include "intdef.h" + +typedef void * (*createinterface_func)(const char *name, int *ret); + +struct engserver { + struct { + usize _pad[36]; + void (*__thiscall server_command)(struct engserver *this, const char *str); + } *vt; +}; + +struct engclient { + struct { + usize _pad[75]; + void (*__thiscall is_playing_demo)(struct engclient *this); + } *vt; +}; + +struct engineapi { + struct { + usize _pad[7]; + void *set_engine_window; + } *vt; +}; + +struct enginetools { + struct { + usize _pad[64]; + void *is_recording_movie; + } *vt; +}; + +struct movieinfo { + char name[256]; + int curframe; + int type; + int jpeg_quality; +}; + +struct videomode { + struct { + usize _pad[22]; + void (*__thiscall write_movie_frame)(struct videomode *this, + struct movieinfo *info); + } *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; // TODO + 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 engineapi *engineapi; +extern struct enginetools *enginetools; +extern struct demoplayer *demoplayer; +extern struct videomode **videomode; +extern struct movieinfo *movieinfo; +extern void (*cbuf_addtext)(char *); +#endif + +// initializes required engine apis. returns false on error. +bool api_init(void); + +#endif + +// vi: sw=4 ts=4 noet tw=80 cc=80 |