2023-07-19 19:37:28 -04:00
|
|
|
#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.
|
2023-07-20 10:38:02 -04:00
|
|
|
*
|
2023-07-19 19:37:28 -04:00
|
|
|
* prefix | meaning
|
|
|
|
* -------+----------------
|
|
|
|
* gp_* | global pointer
|
|
|
|
* go_* | global original
|
|
|
|
*/
|
2023-07-20 10:38:02 -04:00
|
|
|
#define DECL_INTF(type, name) \
|
|
|
|
type* gp_##name = NULL; \
|
2023-07-19 19:37:28 -04:00
|
|
|
type go_##name;
|
|
|
|
|
2023-07-20 10:38:02 -04:00
|
|
|
#define DECL_INTF_EXTERN(type, name) \
|
|
|
|
extern type* gp_##name; \
|
2023-07-19 19:37:28 -04:00
|
|
|
extern type go_##name;
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
extern void* hw;
|
2023-07-20 10:38:02 -04:00
|
|
|
DECL_INTF_EXTERN(cl_enginefunc_t, engine);
|
|
|
|
DECL_INTF_EXTERN(cl_clientfunc_t, client);
|
2023-07-19 19:37:28 -04:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
bool globals_init(void);
|
|
|
|
|
|
|
|
#endif /* _GLOBALS_H */
|