diff options
Diffstat (limited to 'code/qcommon/qcommon.h')
-rw-r--r-- | code/qcommon/qcommon.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index ad175f4..9b5bd5d 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -310,7 +310,7 @@ typedef enum { } sharedTraps_t; void VM_Init( void ); -vm_t *VM_Create( const char *module, int (*systemCalls)(int *), +vm_t *VM_Create( const char *module, long (*systemCalls)(long *), vmInterpret_t interpret ); // module should be bare: "cgame", not "cgame.dll" or "vm/cgame.qvm" @@ -318,12 +318,25 @@ void VM_Free( vm_t *vm ); void VM_Clear(void); vm_t *VM_Restart( vm_t *vm ); -int QDECL VM_Call( vm_t *vm, int callNum, ... ); +long QDECL VM_Call( vm_t *vm, long callNum, ... ); void VM_Debug( int level ); -void *VM_ArgPtr( int intValue ); -void *VM_ExplicitArgPtr( vm_t *vm, int intValue ); +void *VM_ArgPtr( long intValue ); +void *VM_ExplicitArgPtr( vm_t *vm, long intValue ); + +#define VMA(x) VM_ArgPtr(args[x]) +static inline float _vmf(long x) +{ + union { + long l; + float fh, fl; + } t; + t.l = x; + return t.fl; +} +#define VMF(x) _vmf(args[x]) + /* ============================================================== @@ -936,8 +949,8 @@ void Sys_Init (void); // general development dll loading for virtual machine testing // fqpath param added 7/20/02 by T.Ray - Sys_LoadDll is only called in vm.c at this time -void * QDECL Sys_LoadDll( const char *name, char *fqpath , int (QDECL **entryPoint)(int, ...), - int (QDECL *systemcalls)(int, ...) ); +void * QDECL Sys_LoadDll( const char *name, char *fqpath , long (QDECL **entryPoint)(long, ...), + long (QDECL *systemcalls)(long, ...) ); void Sys_UnloadDll( void *dllHandle ); void Sys_UnloadGame( void ); |