Skip to content

CGame API

Zack Middleton edited this page Jun 2, 2014 · 16 revisions

In the future this page will document the CGame/UI API functions, structures, and enums. (It may primarily focus on new things and changes compared to quake3.)

For now see code/cgame/cg_public.h, code/cgame/cg_syscalls.h, bottom of code/game/bg_public.h, and code/renderercommon/tr_types.h.

Porting Notes

Ambient Light

In Quake3, ambient light is added to every model that is drawn. In RTCW there is refEntity_t::hilightIntensity and RF_MINLIGHT. EF, ET, JK2/JA SP and MP have different ways as well. In Spearmint it must be set in refEntity_t::ambientLight[3]! See blog post. Also see commit for engine and cgame.

Cinematic Drawing

trap_CIN_PlayCinematic and trap_CIN_SetExtents in Spearmint expect x, y, width, and height to be in window coords (like all other draw system calls), Q3/RTCW/ET/EF (and all other id Tech 3 games?) expect virtual 640x480 coords. Changed in commit 62f36a.

Clone this wiki locally