Quake3World.com Forums
     Programming Discussion
        UI code


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: UI code

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 02-04-2012 02:18 PM           Profile Send private message  E-mail  Edit post Reply with quote


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?




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 02-04-2012 05:03 PM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 02-04-2012 08:20 PM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Veteran
Veteran
Joined: 13 Jan 2008
Posts: 167
PostPosted: 02-05-2012 01:08 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 02-05-2012 06:29 AM           Profile Send private message  E-mail  Edit post Reply with quote


Perfect, Thanks!




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.