UI code

Locked
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

UI code

Post by nexus024 »

I have been struggling with getting ui_* files to utilize the qcommon.h file. Specifically I need to be able to access functions such as NET_OutOfBandPrint(). Does anyone know if this is possible?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: UI code

Post by ^misantropia^ »

You can't, unless you hack the engine too.
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: UI code

Post by nexus024 »

Can you point me in the right direction to hack the engine? :D
speaker
Posts: 167
Joined: Sun Jan 13, 2008 8:34 pm

Re: UI code

Post by speaker »

System calls from the UI module to the main engine are implemented in the following source files:

ui_public.h -- enumeration of system calls (UI_PRINT, etc.)

ui_local.h -- prototypes of the system calls, e.g. 'void trap_Print(const char *string);'

ui_syscalls.asm -- enumerations (whatever?) for the Quake assembler (e.g. -2 for UI_PRINT)

cl_ui.c -- the main engine functions that are called when the system call is made, see the huge switch module in 'CL_UISystemCalls'

If you plan to use DLLs instead of VM modules, then you also have to modify 'ui_syscalls.c'.

Studying these files will give you an idea about how the whole system call stuff is implemented. Try to imitate what the already implemented calls do.
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: UI code

Post by nexus024 »

Perfect, Thanks!
Locked