Quake3World.com
https://www.quake3world.com/forum/

UI code
https://www.quake3world.com/forum/viewtopic.php?f=16&t=47104
Page 1 of 1

Author:  nexus024 [ 02-04-2012 02:18 PM ]
Post subject:  UI code

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?

Author:  ^misantropia^ [ 02-04-2012 05:03 PM ]
Post subject:  Re: UI code

You can't, unless you hack the engine too.

Author:  nexus024 [ 02-04-2012 08:20 PM ]
Post subject:  Re: UI code

Can you point me in the right direction to hack the engine? :D

Author:  speaker [ 02-05-2012 01:08 AM ]
Post subject:  Re: UI code

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.

Author:  nexus024 [ 02-05-2012 06:29 AM ]
Post subject:  Re: UI code

Perfect, Thanks!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/