I've been using the (excellent) bot templates to write bots, but those templates lack a bit of structure. I really can't stand that procedural code (no offense) as I came from Java.
So I decided to start from scratch and only keep the stuff I really need.
I stumbled upon this code in bot.h
Code:
#ifndef __linux__
typedef int (FAR *GETENTITYAPI)(DLL_FUNCTIONS *, int);
typedef int (FAR *GETNEWDLLFUNCTIONS)(NEW_DLL_FUNCTIONS *, int *);
typedef void (DLLEXPORT *GIVEFNPTRSTODLL)(enginefuncs_t *, globalvars_t *);
typedef int (DLLEXPORT *SERVER_GETBLENDINGINTERFACE) (int, struct sv_blending_interface_s **, struct engine_studio_api_s *, float (*)[3][4], float (*)[MAXSTUDIOBONES][3][4]);
typedef void (FAR *LINK_ENTITY_FUNC)(entvars_t *);
#else
#include <dlfcn.h>
#define GetProcAddress dlsym
typedef int BOOL;
typedef int (*GETENTITYAPI)(DLL_FUNCTIONS *, int);
typedef int (*GETNEWDLLFUNCTIONS)(NEW_DLL_FUNCTIONS *, int *);
typedef void (*GIVEFNPTRSTODLL)(enginefuncs_t *, globalvars_t *);
typedef int (*SERVER_GETBLENDINGINTERFACE) (int, struct sv_blending_interface_s **, struct engine_studio_api_s *, float (*)[3][4], float (*)[MAXSTUDIOBONES][3][4]);
typedef void (*LINK_ENTITY_FUNC)(entvars_t *);
#endif
I had no idea what that "FAR" keyword is, so after a bit of digging on the net I managed to piece together what it's supposed to be:
"The far qualifier when used in 16 bit compilers results in a 32 bit pointer."
So I assume I can safely remove that keyword, or does FAR have another more obscure significance aswell?
I'm not concerned with portability as I have no experience with other OSes besides Windows.
[MODS: I hope this is the right forum for this thread]