mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-26 06:01:04 +00:00
40 lines
907 B
C++
40 lines
907 B
C++
|
// vmachine.cpp -- wrapper to fake virtual machine for client
|
||
|
|
||
|
#include "vmachine.h"
|
||
|
#pragma warning (disable : 4514)
|
||
|
/*
|
||
|
==============================================================
|
||
|
|
||
|
VIRTUAL MACHINE
|
||
|
|
||
|
==============================================================
|
||
|
*/
|
||
|
int VM_Call( int callnum, ... )
|
||
|
{
|
||
|
// assert (cgvm.entryPoint);
|
||
|
|
||
|
if (cgvm.entryPoint)
|
||
|
{
|
||
|
return cgvm.entryPoint( (&callnum)[0], (&callnum)[1], (&callnum)[2], (&callnum)[3],
|
||
|
(&callnum)[4], (&callnum)[5], (&callnum)[6], (&callnum)[7],
|
||
|
(&callnum)[8], (&callnum)[9] );
|
||
|
}
|
||
|
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
============
|
||
|
VM_DllSyscall
|
||
|
|
||
|
we pass this to the cgame dll to call back into the client
|
||
|
============
|
||
|
*/
|
||
|
extern int CL_CgameSystemCalls( int *args );
|
||
|
extern int CL_UISystemCalls( int *args );
|
||
|
|
||
|
int VM_DllSyscall( int arg, ... ) {
|
||
|
// return cgvm->systemCall( &arg );
|
||
|
return CL_CgameSystemCalls( &arg );
|
||
|
}
|