Implement dynamic library loading and symbol resolving

This commit is contained in:
Alibek Omarov
2018-04-17 03:43:27 +03:00
parent 64257ef428
commit 7c9b724531
4 changed files with 451 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ edict_t *SV_EdictNum( int n )
return NULL;
}
#ifdef _DEBUG
#ifndef NDEBUG
qboolean SV_CheckEdict( const edict_t *e, const char *file, const int line )
{
int n;
@@ -3225,9 +3225,9 @@ pfnFunctionFromName
=============
*/
dword pfnFunctionFromName( const char *pName )
void *pfnFunctionFromName( const char *pName )
{
return COM_FunctionFromName( svgame.hInstance, pName );
return COM_FunctionFromName_SR( svgame.hInstance, pName );
}
/*
@@ -3236,7 +3236,7 @@ pfnNameForFunction
=============
*/
const char *pfnNameForFunction( dword function )
const char *pfnNameForFunction( void *function )
{
return COM_NameForFunction( svgame.hInstance, function );
}
@@ -4371,8 +4371,8 @@ static enginefuncs_t gEngfuncs =
pfnRegUserMsg,
pfnAnimationAutomove,
pfnGetBonePosition,
pfnFunctionFromName,
pfnNameForFunction,
(void*)pfnFunctionFromName,
pfnNameForFunction,
pfnClientPrintf,
pfnServerPrint,
Cmd_Args,
@@ -4880,4 +4880,4 @@ qboolean SV_LoadProgs( const char *name )
svgame.dllFuncs.pfnRegisterEncoders();
return true;
}
}