Home
Q3A source
game directory
bg_lib
bg_local
bg_pmove
bg_public
g_active
g_client
g_cmds
g_local
g_main
g_pseudocam
g_svcmds
g_syscalls
q_math
q_shared

bg_lib.c/h

bg_lib provides standard C library functionality for the Quake Virtual Machine (QVM). Since, Q3A can be run on multiple O/s's they have decided to essentially rewrite memory functions, string functions and math functions. If you need a math function that isn't available add it to bg_lib.h and then write the function in bg_lib.c.

Some of the functions in bg_lib.c have been removed via the use of "#if 0", particularly math functions. Make sure that the functions you add are not removed with "#if 0". The reason for this is that the removed functions have assembly jumps into the engine, which you don't have access to. This took a little while for us to figure out!