summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-11-29 18:55:15 +0100
committerPaweł Redman <pawel.redman@gmail.com>2015-11-29 18:55:15 +0100
commit1509124dc819fadf68ffc53e2369258bafcda5b5 (patch)
tree181ff2fcfa03881a836573ff46f184be3f6f53fc /src
parent0918eb3bcdefd0d6ee4bd573b761454c99f032f6 (diff)
Port ui to 1.1 ABI.
Diffstat (limited to 'src')
-rw-r--r--src/ui/ui_main.c5
-rw-r--r--src/ui/ui_public.h16
-rw-r--r--src/ui/ui_shared.c16
-rw-r--r--src/ui/ui_syscalls.asm119
-rw-r--r--src/ui/ui_syscalls.c10
5 files changed, 86 insertions, 80 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index dc5bc26..27406b1 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -4211,6 +4211,7 @@ void UI_SetActiveMenu( uiMenuCommand_t menu )
// this should be the ONLY way the menu system is brought up
// enusure minumum menu data is cached
+
if( Menu_Count() > 0 )
{
vec3_t v;
@@ -4667,3 +4668,7 @@ void UI_UpdateNews( qboolean begin )
uiInfo.newsInfo.refreshActive = qfalse;
}
+void trap_R_SetClipRegion( const float *region )
+{
+ // syscall missing in 1.1
+}
diff --git a/src/ui/ui_public.h b/src/ui/ui_public.h
index 0fb2292..f6db76d 100644
--- a/src/ui/ui_public.h
+++ b/src/ui/ui_public.h
@@ -37,8 +37,7 @@ typedef struct
}
uiClientState_t;
-typedef enum
-{
+typedef enum {
UI_ERROR,
UI_PRINT,
UI_MILLISECONDS,
@@ -66,7 +65,6 @@ typedef enum
UI_R_ADDLIGHTTOSCENE,
UI_R_RENDERSCENE,
UI_R_SETCOLOR,
- UI_R_SETCLIPREGION,
UI_R_DRAWSTRETCHPIC,
UI_UPDATESCREEN,
UI_CM_LERPTAG,
@@ -95,6 +93,11 @@ typedef enum
UI_MEMORY_REMAINING,
UI_R_REGISTERFONT,
UI_R_MODELBOUNDS,
+ UI_PARSE_ADD_GLOBAL_DEFINE,
+ UI_PARSE_LOAD_SOURCE,
+ UI_PARSE_FREE_SOURCE,
+ UI_PARSE_READ_TOKEN,
+ UI_PARSE_SOURCE_FILE_AND_LINE,
UI_S_STOPBACKGROUNDTRACK,
UI_S_STARTBACKGROUNDTRACK,
UI_REAL_TIME,
@@ -122,13 +125,6 @@ typedef enum
UI_FS_SEEK,
UI_SET_PBCLSTATUS,
- UI_PARSE_ADD_GLOBAL_DEFINE,
- UI_PARSE_LOAD_SOURCE,
- UI_PARSE_FREE_SOURCE,
- UI_PARSE_READ_TOKEN,
- UI_PARSE_SOURCE_FILE_AND_LINE,
- UI_GETNEWS,
-
UI_MEMSET = 100,
UI_MEMCPY,
UI_STRNCPY,
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 7a47413..3b566a7 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -8079,3 +8079,19 @@ static qboolean Menu_OverActiveItem( menuDef_t *menu, float x, float y )
return qfalse;
}
+
+
+/*
+NOTE: conflicts with the not yet ported cgame
+
+void trap_R_SetClipRegion( const float *region )
+{
+ // syscall missing in 1.1
+}
+*/
+
+qboolean trap_GetNews( qboolean force )
+{
+ // syscall missing in 1.1
+ return qfalse;
+}
diff --git a/src/ui/ui_syscalls.asm b/src/ui/ui_syscalls.asm
index 1e797a9..e989ab9 100644
--- a/src/ui/ui_syscalls.asm
+++ b/src/ui/ui_syscalls.asm
@@ -27,68 +27,67 @@ equ trap_R_AddPolyToScene -24
equ trap_R_AddLightToScene -25
equ trap_R_RenderScene -26
equ trap_R_SetColor -27
-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 -82
-equ trap_Parse_LoadSource -83
-equ trap_Parse_FreeSource -84
-equ trap_Parse_ReadToken -85
-equ trap_Parse_SourceFileAndLine -86
+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_Parse_AddGlobalDefine -56
+equ trap_Parse_LoadSource -57
+equ trap_Parse_FreeSource -58
+equ trap_Parse_ReadToken -59
+equ trap_Parse_SourceFileAndLine -60
+equ trap_S_StopBackgroundTrack -61
+equ trap_S_StartBackgroundTrack -62
+equ trap_RealTime -63
+equ trap_LAN_GetServerCount -64
+equ trap_LAN_GetServerAddressString -65
+equ trap_LAN_GetServerInfo -66
+equ trap_LAN_MarkServerVisible -67
+equ trap_LAN_UpdateVisiblePings -68
+equ trap_LAN_ResetPings -69
+equ trap_LAN_LoadCachedServers -70
+equ trap_LAN_SaveCachedServers -71
+equ trap_LAN_AddServer -72
+equ trap_LAN_RemoveServer -73
+equ trap_CIN_PlayCinematic -74
+equ trap_CIN_StopCinematic -75
+equ trap_CIN_RunCinematic -76
+equ trap_CIN_DrawCinematic -77
+equ trap_CIN_SetExtents -78
+equ trap_R_RemapShader -79
+equ trap_LAN_ServerStatus -80
+equ trap_LAN_GetServerPing -81
+equ trap_LAN_ServerIsVisible -82
+equ trap_LAN_CompareServers -83
+equ trap_FS_Seek -84
+equ trap_SetPbClStatus -85
+
-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 2187f18..edfeaf3 100644
--- a/src/ui/ui_syscalls.c
+++ b/src/ui/ui_syscalls.c
@@ -197,11 +197,6 @@ 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 );
@@ -327,11 +322,6 @@ int trap_LAN_ServerStatus( const char *serverAddress, char *serverStatus, int ma
return syscall( UI_LAN_SERVERSTATUS, serverAddress, serverStatus, maxLen );
}
-qboolean trap_GetNews( qboolean force )
-{
- return syscall( UI_GETNEWS, force );
-}
-
void trap_LAN_SaveCachedServers( void )
{
syscall( UI_LAN_SAVECACHEDSERVERS );