forked from vera/halflife-thewastes-sdk
server: enable dll export on Linux
This commit is contained in:
parent
524f4874a8
commit
382152ca79
3 changed files with 4 additions and 8 deletions
|
@ -100,7 +100,7 @@ static void SetObjectCollisionBox( entvars_t *pev );
|
|||
#ifndef _WIN32
|
||||
extern "C" {
|
||||
#endif
|
||||
int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion )
|
||||
int DLLEXPORT GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion )
|
||||
{
|
||||
if ( !pFunctionTable || interfaceVersion != INTERFACE_VERSION )
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion )
|
||||
int DLLEXPORT GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion )
|
||||
{
|
||||
if ( !pFunctionTable || *interfaceVersion != INTERFACE_VERSION )
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t
|
|||
|
||||
extern "C" {
|
||||
|
||||
void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
|
||||
void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
|
||||
{
|
||||
memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t));
|
||||
gpGlobals = pGlobals;
|
||||
|
|
|
@ -85,13 +85,9 @@ typedef int BOOL;
|
|||
// This is the glue that hooks .MAP entity class names to our CPP classes
|
||||
// The _declspec forces them to be exported by name so we can do a lookup with GetProcAddress()
|
||||
// The function is used to intialize / allocate the object for the entity
|
||||
#ifdef _WIN32
|
||||
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) \
|
||||
extern "C" _declspec( dllexport ) void mapClassName( entvars_t *pev ); \
|
||||
extern "C" DLLEXPORT void mapClassName( entvars_t *pev ); \
|
||||
void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); }
|
||||
#else
|
||||
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" void mapClassName( entvars_t *pev ); void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); }
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue