MCPcopy Create free account
hub / github.com/JACoders/OpenJK / VM_Call

Function VM_Call

code/client/vmachine.cpp:35–49  ·  view source on GitHub ↗

============================================================== VIRTUAL MACHINE ============================================================== */

Source from the content-addressed store, hash-verified

33==============================================================
34*/
35intptr_t VM_Call( int callnum, ... )
36{
37 intptr_t args[8] = { 0 };
38 va_list ap;
39
40 if ( cgvm.entryPoint ) {
41 va_start( ap, callnum );
42 for ( size_t i = 0; i < ARRAY_LEN( args ); i++ )
43 args[i] = va_arg( ap, intptr_t );
44 va_end(ap);
45
46 return cgvm.entryPoint( callnum, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7] );
47 }
48 return -1;
49}
50
51// The syscall mechanism relies on stack manipulation to get it's args.
52// This is likely due to C's inability to pass "..." parameters to a function in one clean chunk.

Callers 7

CL_DrawDatapadFunction · 0.70
CL_ShutdownCGameFunction · 0.70
CL_InitCGameFunction · 0.70
CL_GameCommandFunction · 0.70
CL_CGameRenderingFunction · 0.70
SV_PlayerCanSeeEntFunction · 0.50
SV_BuildClientSnapshotFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected