diff options
author | Tim Angus <tim@ngus.net> | 2009-10-12 22:36:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:48 +0000 |
commit | 35249fc2c3762fe1690559772a6d89724fb7469c (patch) | |
tree | efad01bc9142be45298594fbf8c01fdcca5e8237 /src/ui | |
parent | 6e5fbea644646afa82130be9bf366d866c9838ca (diff) |
* Add [trap_R|RE]_SetClipRegion to prevent rendering outside a specified area
* Rewrite CG_DrawTeamSpectators to scroll on a pixel basis rather than a character basis
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_local.h | 1 | ||||
-rw-r--r-- | src/ui/ui_public.h | 1 | ||||
-rw-r--r-- | src/ui/ui_syscalls.asm | 119 | ||||
-rw-r--r-- | src/ui/ui_syscalls.c | 5 |
4 files changed, 67 insertions, 59 deletions
diff --git a/src/ui/ui_local.h b/src/ui/ui_local.h index 1f7ecf40..86649d62 100644 --- a/src/ui/ui_local.h +++ b/src/ui/ui_local.h @@ -344,6 +344,7 @@ void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVer void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); void trap_R_RenderScene( const refdef_t *fd ); void trap_R_SetColor( const float *rgba ); +void trap_R_SetClipRegion( const float *region ); void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ); void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ); void trap_UpdateScreen( void ); diff --git a/src/ui/ui_public.h b/src/ui/ui_public.h index bcaf3d5c..9e77c4b9 100644 --- a/src/ui/ui_public.h +++ b/src/ui/ui_public.h @@ -66,6 +66,7 @@ typedef enum UI_R_ADDLIGHTTOSCENE, UI_R_RENDERSCENE, UI_R_SETCOLOR, + UI_R_SETCLIPREGION, UI_R_DRAWSTRETCHPIC, UI_UPDATESCREEN, UI_CM_LERPTAG, diff --git a/src/ui/ui_syscalls.asm b/src/ui/ui_syscalls.asm index 0880d419..1e797a97 100644 --- a/src/ui/ui_syscalls.asm +++ b/src/ui/ui_syscalls.asm @@ -27,67 +27,68 @@ equ trap_R_AddPolyToScene -24 equ trap_R_AddLightToScene -25 equ trap_R_RenderScene -26 equ trap_R_SetColor -27 -equ trap_R_DrawStretchPic -28 -equ trap_UpdateScreen -29 -equ trap_CM_LerpTag -30 -equ trap_CM_LoadModel -31 -equ trap_S_RegisterSound -32 -equ trap_S_StartLocalSound -33 -equ trap_Key_KeynumToStringBuf -34 -equ trap_Key_GetBindingBuf -35 -equ trap_Key_SetBinding -36 -equ trap_Key_IsDown -37 -equ trap_Key_GetOverstrikeMode -38 -equ trap_Key_SetOverstrikeMode -39 -equ trap_Key_ClearStates -40 -equ trap_Key_GetCatcher -41 -equ trap_Key_SetCatcher -42 -equ trap_GetClipboardData -43 -equ trap_GetGlconfig -44 -equ trap_GetClientState -45 -equ trap_GetConfigString -46 -equ trap_LAN_GetPingQueueCount -47 -equ trap_LAN_ClearPing -48 -equ trap_LAN_GetPing -49 -equ trap_LAN_GetPingInfo -50 -equ trap_Cvar_Register -51 -equ trap_Cvar_Update -52 -equ trap_MemoryRemaining -53 -equ trap_R_RegisterFont -54 -equ trap_R_ModelBounds -55 -equ trap_S_StopBackgroundTrack -56 -equ trap_S_StartBackgroundTrack -57 -equ trap_RealTime -58 -equ trap_LAN_GetServerCount -59 -equ trap_LAN_GetServerAddressString -60 -equ trap_LAN_GetServerInfo -61 -equ trap_LAN_MarkServerVisible -62 -equ trap_LAN_UpdateVisiblePings -63 -equ trap_LAN_ResetPings -64 -equ trap_LAN_LoadCachedServers -65 -equ trap_LAN_SaveCachedServers -66 -equ trap_LAN_AddServer -67 -equ trap_LAN_RemoveServer -68 -equ trap_CIN_PlayCinematic -69 -equ trap_CIN_StopCinematic -70 -equ trap_CIN_RunCinematic -71 -equ trap_CIN_DrawCinematic -72 -equ trap_CIN_SetExtents -73 -equ trap_R_RemapShader -74 -equ trap_LAN_ServerStatus -75 -equ trap_LAN_GetServerPing -76 -equ trap_LAN_ServerIsVisible -77 -equ trap_LAN_CompareServers -78 -equ trap_FS_Seek -79 -equ trap_SetPbClStatus -80 +equ trap_R_SetClipRegion -28 +equ trap_R_DrawStretchPic -29 +equ trap_UpdateScreen -30 +equ trap_CM_LerpTag -31 +equ trap_CM_LoadModel -32 +equ trap_S_RegisterSound -33 +equ trap_S_StartLocalSound -34 +equ trap_Key_KeynumToStringBuf -35 +equ trap_Key_GetBindingBuf -36 +equ trap_Key_SetBinding -37 +equ trap_Key_IsDown -38 +equ trap_Key_GetOverstrikeMode -39 +equ trap_Key_SetOverstrikeMode -40 +equ trap_Key_ClearStates -41 +equ trap_Key_GetCatcher -42 +equ trap_Key_SetCatcher -43 +equ trap_GetClipboardData -44 +equ trap_GetGlconfig -45 +equ trap_GetClientState -46 +equ trap_GetConfigString -47 +equ trap_LAN_GetPingQueueCount -48 +equ trap_LAN_ClearPing -49 +equ trap_LAN_GetPing -50 +equ trap_LAN_GetPingInfo -51 +equ trap_Cvar_Register -52 +equ trap_Cvar_Update -53 +equ trap_MemoryRemaining -54 +equ trap_R_RegisterFont -55 +equ trap_R_ModelBounds -56 +equ trap_S_StopBackgroundTrack -57 +equ trap_S_StartBackgroundTrack -58 +equ trap_RealTime -59 +equ trap_LAN_GetServerCount -60 +equ trap_LAN_GetServerAddressString -61 +equ trap_LAN_GetServerInfo -62 +equ trap_LAN_MarkServerVisible -63 +equ trap_LAN_UpdateVisiblePings -64 +equ trap_LAN_ResetPings -65 +equ trap_LAN_LoadCachedServers -66 +equ trap_LAN_SaveCachedServers -67 +equ trap_LAN_AddServer -68 +equ trap_LAN_RemoveServer -69 +equ trap_CIN_PlayCinematic -70 +equ trap_CIN_StopCinematic -71 +equ trap_CIN_RunCinematic -72 +equ trap_CIN_DrawCinematic -73 +equ trap_CIN_SetExtents -74 +equ trap_R_RemapShader -75 +equ trap_LAN_ServerStatus -76 +equ trap_LAN_GetServerPing -77 +equ trap_LAN_ServerIsVisible -78 +equ trap_LAN_CompareServers -79 +equ trap_FS_Seek -80 +equ trap_SetPbClStatus -81 -equ trap_Parse_AddGlobalDefine -81 -equ trap_Parse_LoadSource -82 -equ trap_Parse_FreeSource -83 -equ trap_Parse_ReadToken -84 -equ trap_Parse_SourceFileAndLine -85 -equ trap_GetNews -86 +equ trap_Parse_AddGlobalDefine -82 +equ trap_Parse_LoadSource -83 +equ trap_Parse_FreeSource -84 +equ trap_Parse_ReadToken -85 +equ trap_Parse_SourceFileAndLine -86 +equ trap_GetNews -87 equ memset -101 equ memcpy -102 diff --git a/src/ui/ui_syscalls.c b/src/ui/ui_syscalls.c index 29938149..4da66e03 100644 --- a/src/ui/ui_syscalls.c +++ b/src/ui/ui_syscalls.c @@ -197,6 +197,11 @@ void trap_R_SetColor( const float *rgba ) syscall( UI_R_SETCOLOR, rgba ); } +void trap_R_SetClipRegion( const float *region ) +{ + syscall( UI_R_SETCLIPREGION, region ); +} + void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ) { syscall( UI_R_DRAWSTRETCHPIC, PASSFLOAT( x ), PASSFLOAT( y ), PASSFLOAT( w ), PASSFLOAT( h ), PASSFLOAT( s1 ), PASSFLOAT( t1 ), PASSFLOAT( s2 ), PASSFLOAT( t2 ), hShader ); |