From fb95177298bb92098b61f09b9f66c1fce32f2f02 Mon Sep 17 00:00:00 2001 From: Matthew Wozniak Date: Sun, 27 Oct 2024 23:28:51 -0400 Subject: add hooking and IVEngineServer interface --- api.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 api.h (limited to 'api.h') 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 + +#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 -- cgit v1.2.3-54-g00ecf