goldsrc-cheat/src/include/globals.h

42 lines
1.0 KiB
C
Raw Normal View History

#ifndef GLOBALS_H_
#define GLOBALS_H_
#include "sdk.h"
/*----------------------------------------------------------------------------*/
/*
2023-07-20 11:26:30 -04:00
* DECL_INTF: Macro for declaring interfaces and it's originals.
* DECL_INTF_EXTERN: Extern version for the header.
*
* prefix | meaning
* -------+-------------------------------
* i_* | interface ptr (global scope)
* o_* | original interface (not a ptr)
*/
#define DECL_INTF(type, name) \
type* i_##name = NULL; \
type o_##name;
#define DECL_INTF_EXTERN(type, name) \
extern type* i_##name; \
extern type o_##name;
/*----------------------------------------------------------------------------*/
extern void* hw;
DECL_INTF_EXTERN(cl_enginefunc_t, engine);
DECL_INTF_EXTERN(cl_clientfunc_t, client);
2023-07-20 14:40:34 -04:00
DECL_INTF_EXTERN(playermove_t, pmove);
2023-07-20 17:30:44 -04:00
extern cl_entity_t* localplayer;
/*----------------------------------------------------------------------------*/
bool globals_init(void);
void globals_store(void);
void globals_restore(void);
#endif /* GLOBALS_H_ */