Is there some kind of science to editing the *_syscalls.asm files? I've had nothing but trouble whenever I try adding entries for more traps, generally having the game crash before it loads the UI. Btw, I'm using ioquake3.
This is what I get from the console log:
Code: Select all
----- Client Shutdown (recursive error after: Bad UI system trap: 31) -----
Closing SDL audio device...
SDL audio device shut down.
RE_Shutdown( 1 )
forcefully unloading ui vm
-----------------------
If I use the dll's instead of the vm's then the UI loads, but cgame crashes:
Code: Select all
Sys_LoadDll(cgame) found vmMain function at 6d68763a
----- Client Shutdown (Received signal 11) -----
All I added was trap_Cvar_LSet to each of them, the code of which is identical to trap_Cvar_Set except it latches the cvar. I defined the traps in the *_syscalls.c files and declared them in the public headers. I've got the syscall indexes set in cgameImport_t, gameImport_t and uiImport_t all in order straight after *_FS_SEEK. Also added them to CL_CgameSystemCalls(), SV_GameSystemCalls() and CL_UISystemCalls().
I tried edited the asm's in both VC++ and RadASM but the result is the same. I attached the files if anyone wants to see if there's something wrong with them. Is there a specific procedure to adding traps?