diff options
author | Matthew Wozniak <me@woz.blue> | 2024-11-04 10:57:48 -0500 |
---|---|---|
committer | Matthew Wozniak <me@woz.blue> | 2024-11-04 10:57:48 -0500 |
commit | 5296fc43920de4c6548f888a4d026f981b476cf7 (patch) | |
tree | 7d6d3e1b35361750059358cbd77ddc1b74892992 /api.h | |
parent | b0e22ae772eceaeeb666492fde6678f90b0ec45a (diff) | |
download | rt-5296fc43920de4c6548f888a4d026f981b476cf7.tar.gz rt-5296fc43920de4c6548f888a4d026f981b476cf7.zip |
video no audio
Diffstat (limited to 'api.h')
-rw-r--r-- | api.h | 96 |
1 files changed, 66 insertions, 30 deletions
@@ -23,20 +23,21 @@ #define VENGINE_TOOL_INTERFACE_VERSION "VENGINETOOL003" #include "intdef.h" +#include "os.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); + void (*VIRTUAL server_command)(struct engserver *this, const char *str); } *vt; }; struct engclient { struct { usize _pad[75]; - void (*__thiscall is_playing_demo)(struct engclient *this); + void (*VIRTUAL is_playing_demo)(struct engclient *this); } *vt; }; @@ -49,50 +50,85 @@ struct engineapi { struct enginetools { struct { - usize _pad[64]; - void *is_recording_movie; + usize _pad[65]; + void *start_movie_recording; } *vt; }; struct movieinfo { - char name[256]; - int curframe; - int type; - int jpeg_quality; + char name[256]; + int curframe; + int type; + int jpeg_quality; +}; + +// Almost no chance I need all of these, but why not. +enum image_format { + IMAGE_FORMAT_UNKNOWN = -1, + IMAGE_FORMAT_RGBA8888 = 0, + IMAGE_FORMAT_ABGR8888, + IMAGE_FORMAT_RGB888, + IMAGE_FORMAT_BGR888, + IMAGE_FORMAT_RGB565, + IMAGE_FORMAT_I8, + IMAGE_FORMAT_IA88, + IMAGE_FORMAT_P8, + IMAGE_FORMAT_A8, + IMAGE_FORMAT_RGB888_BLUESCREEN, + IMAGE_FORMAT_BGR888_BLUESCREEN, + IMAGE_FORMAT_ARGB8888, + IMAGE_FORMAT_BGRA8888, + IMAGE_FORMAT_DXT1, + IMAGE_FORMAT_DXT3, + IMAGE_FORMAT_DXT5, + IMAGE_FORMAT_BGRX8888, + IMAGE_FORMAT_BGR565, + IMAGE_FORMAT_BGRX5551, + IMAGE_FORMAT_BGRA4444, + IMAGE_FORMAT_DXT1_ONEBITALPHA, + IMAGE_FORMAT_BGRA5551, + IMAGE_FORMAT_UV88, + IMAGE_FORMAT_UVWQ8888, + IMAGE_FORMAT_RGBA16161616F, + IMAGE_FORMAT_RGBA16161616, + IMAGE_FORMAT_UVLX8888, + IMAGE_FORMAT_R32F, // Single-channel 32-bit floating point + IMAGE_FORMAT_RGB323232F, + IMAGE_FORMAT_RGBA32323232F, + // vendor crap + IMAGE_FORMAT_NV_DST16, + IMAGE_FORMAT_NV_DST24, + IMAGE_FORMAT_NV_INTZ, + IMAGE_FORMAT_NV_RAWZ, + IMAGE_FORMAT_ATI_DST16, + IMAGE_FORMAT_ATI_DST24, + IMAGE_FORMAT_NV_NULL, + IMAGE_FORMAT_ATI2N, + IMAGE_FORMAT_ATI1N, + NUM_IMAGE_FORMATS }; struct videomode { struct { usize _pad[22]; - void (*__thiscall write_movie_frame)(struct videomode *this, + void (*VIRTUAL write_movie_frame)(struct videomode *this, struct movieinfo *info); + usize _pad2[4]; + void (*VIRTUAL read_screen_pixels)(struct videomode *this, + int x, int y, int w, int h, void *buf, enum image_format fmt); } *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, + usize _pad[5]; + bool (*VIRTUAL 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); + usize _pad2[11]; + void (*VIRTUAL stop_playback)(struct demoplayer *this); + // TODO: Disable interp when in a portal bubble. This will be very + // difficult! + void (*VIRTUAL interpolate_viewpoint)(struct demoplayer *this); } *vt; }; |