diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index bd490382..137fa43d 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -355,6 +355,8 @@ typedef enum { TRAP_TESTPRINTFLOAT } sharedTraps_t; +typedef intptr_t (QDECL *vmMainProc)(int callNum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11); + void VM_Init( void ); vm_t *VM_Create( const char *module, intptr_t (*systemCalls)(intptr_t *), vmInterpret_t interpret ); @@ -1080,7 +1082,7 @@ NON-PORTABLE SYSTEM SERVICES void Sys_Init (void); // general development dll loading for virtual machine testing -void * QDECL Sys_LoadGameDll( const char *name, intptr_t (QDECL **entryPoint)(int, ...), +void * QDECL Sys_LoadGameDll( const char *name, vmMainProc *entryPoint, intptr_t (QDECL *systemcalls)(intptr_t, ...) ); void Sys_UnloadDll( void *dllHandle ); diff --git a/code/qcommon/vm_local.h b/code/qcommon/vm_local.h index 07e89675..f649cf81 100644 --- a/code/qcommon/vm_local.h +++ b/code/qcommon/vm_local.h @@ -154,7 +154,7 @@ struct vm_s { // for dynamic linked modules void *dllHandle; - intptr_t (QDECL *entryPoint)( int callNum, ... ); + vmMainProc entryPoint; void (*destroy)(vm_t* self); // for interpreted modules diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index 40b07e5d..ae46c705 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -579,7 +579,7 @@ Used to load a development dll instead of a virtual machine ================= */ void *Sys_LoadGameDll(const char *name, - intptr_t (QDECL **entryPoint)(int, ...), + vmMainProc *entryPoint, intptr_t (*systemcalls)(intptr_t, ...)) { void *libHandle;