aboutsummaryrefslogtreecommitdiff
path: root/api.h
diff options
context:
space:
mode:
authorGravatar Matthew Wozniak <me@woz.blue> 2024-10-27 23:28:51 -0400
committerGravatar Matthew Wozniak <me@woz.blue> 2024-10-27 23:28:51 -0400
commitfb95177298bb92098b61f09b9f66c1fce32f2f02 (patch)
treec73b45c91f145dca7d055a1cde1f4efaa6db8da6 /api.h
parent36b6d84ee4b520bdf43891ea86df03cf660cb464 (diff)
downloadrt-fb95177298bb92098b61f09b9f66c1fce32f2f02.tar.gz
rt-fb95177298bb92098b61f09b9f66c1fce32f2f02.zip
add hooking and IVEngineServer interface
Diffstat (limited to 'api.h')
-rw-r--r--api.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/api.h b/api.h
new file mode 100644
index 0000000..1a841f5
--- /dev/null
+++ b/api.h
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: ISC
+// SPDX-FileCopyrightText: 2024 Matthew Wozniak <me@woz.blue>
+
+#ifndef ENGINEAPI_H
+#define ENGINEAPI_H
+
+#define INTERFACEVERSION_VENGINESERVER "VEngineServer021"
+
+#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;
+};
+
+#ifndef NO_EXTERNS
+extern struct engserver *engserver;
+#endif
+
+void api_init(void);
+
+#endif
+
+// vi: sw=4 ts=4 noet tw=80 cc=80