diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_main.c | 29 | ||||
-rw-r--r-- | src/ui/ui_public.h | 13 | ||||
-rw-r--r-- | src/ui/ui_syscalls.c | 4 | ||||
-rw-r--r-- | src/ui/ui_syscalls_11.asm | 97 |
4 files changed, 143 insertions, 0 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index a542e642..a5b9879e 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -33,11 +33,24 @@ USER INTERFACE MAIN uiInfo_t uiInfo; +#ifdef MODULE_INTERFACE_11 +#undef AS_GLOBAL +#undef AS_LOCAL +#define AS_GLOBAL 2 +#define AS_LOCAL 0 +#endif + static const char *netSources[ ] = { +#ifdef MODULE_INTERFACE_11 + "LAN", + "Mplayer", + "Internet", +#else "Internet", "Mplayer", "LAN", +#endif "Favorites" }; @@ -163,12 +176,14 @@ Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, UI_MouseEvent( arg0, arg1 ); return 0; +#ifndef MODULE_INTERFACE_11 case UI_MOUSE_POSITION: return UI_MousePosition( ); case UI_SET_MOUSE_POSITION: UI_SetMousePosition( arg0, arg1 ); return 0; +#endif case UI_REFRESH: UI_Refresh( arg0 ); @@ -1113,7 +1128,11 @@ static void UI_StartServerRefresh( qboolean full ) { qboolean global = ui_netSource.integer == AS_GLOBAL; +#ifdef MODULE_INTERFACE_11 + trap_Cmd_ExecuteText( EXEC_APPEND, va( "globalservers %d 69 full empty\n", +#else trap_Cmd_ExecuteText( EXEC_APPEND, va( "globalservers %d 70 full empty\n", +#endif global ? 0 : 1 ) ); } } @@ -4630,3 +4649,13 @@ void UI_UpdateNews( qboolean begin ) uiInfo.newsInfo.refreshActive = qfalse; } +#ifdef MODULE_INTERFACE_11 +void trap_R_SetClipRegion( const float *region ) +{ +} + +qboolean trap_GetNews( qboolean force ) +{ + return qtrue; +} +#endif diff --git a/src/ui/ui_public.h b/src/ui/ui_public.h index f1f55c2f..489b2b08 100644 --- a/src/ui/ui_public.h +++ b/src/ui/ui_public.h @@ -66,7 +66,9 @@ typedef enum UI_R_ADDLIGHTTOSCENE, UI_R_RENDERSCENE, UI_R_SETCOLOR, +#ifndef MODULE_INTERFACE_11 UI_R_SETCLIPREGION, +#endif UI_R_DRAWSTRETCHPIC, UI_UPDATESCREEN, UI_CM_LERPTAG, @@ -95,6 +97,13 @@ typedef enum UI_MEMORY_REMAINING, UI_R_REGISTERFONT, UI_R_MODELBOUNDS, +#ifdef MODULE_INTERFACE_11 + UI_PARSE_ADD_GLOBAL_DEFINE, + UI_PARSE_LOAD_SOURCE, + UI_PARSE_FREE_SOURCE, + UI_PARSE_READ_TOKEN, + UI_PARSE_SOURCE_FILE_AND_LINE, +#endif UI_S_STOPBACKGROUNDTRACK, UI_S_STARTBACKGROUNDTRACK, UI_REAL_TIME, @@ -122,12 +131,14 @@ typedef enum UI_FS_SEEK, UI_SET_PBCLSTATUS, +#ifndef MODULE_INTERFACE_11 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, +#endif UI_MEMSET = 100, UI_MEMCPY, @@ -175,11 +186,13 @@ typedef enum UI_MOUSE_EVENT, // void UI_MouseEvent( int dx, int dy ); +#ifndef MODULE_INTERFACE_11 UI_MOUSE_POSITION, // int UI_MousePosition( void ); UI_SET_MOUSE_POSITION, // void UI_SetMousePosition( int x, int y ); +#endif UI_REFRESH, // void UI_Refresh( int time ); diff --git a/src/ui/ui_syscalls.c b/src/ui/ui_syscalls.c index 3163322c..b3967867 100644 --- a/src/ui/ui_syscalls.c +++ b/src/ui/ui_syscalls.c @@ -199,10 +199,12 @@ void trap_R_SetColor( const float *rgba ) syscall( UI_R_SETCOLOR, rgba ); } +#ifndef MODULE_INTERFACE_11 void trap_R_SetClipRegion( const float *region ) { syscall( UI_R_SETCLIPREGION, region ); } +#endif void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ) { @@ -329,10 +331,12 @@ int trap_LAN_ServerStatus( const char *serverAddress, char *serverStatus, int ma return syscall( UI_LAN_SERVERSTATUS, serverAddress, serverStatus, maxLen ); } +#ifndef MODULE_INTERFACE_11 qboolean trap_GetNews( qboolean force ) { return syscall( UI_GETNEWS, force ); } +#endif void trap_LAN_SaveCachedServers( void ) { diff --git a/src/ui/ui_syscalls_11.asm b/src/ui/ui_syscalls_11.asm new file mode 100644 index 00000000..cb80264b --- /dev/null +++ b/src/ui/ui_syscalls_11.asm @@ -0,0 +1,97 @@ +code + +equ trap_Error -1 +equ trap_Print -2 +equ trap_Milliseconds -3 +equ trap_Cvar_Set -4 +equ trap_Cvar_VariableValue -5 +equ trap_Cvar_VariableStringBuffer -6 +equ trap_Cvar_SetValue -7 +equ trap_Cvar_Reset -8 +equ trap_Cvar_Create -9 +equ trap_Cvar_InfoStringBuffer -10 +equ trap_Argc -11 +equ trap_Argv -12 +equ trap_Cmd_ExecuteText -13 +equ trap_FS_FOpenFile -14 +equ trap_FS_Read -15 +equ trap_FS_Write -16 +equ trap_FS_FCloseFile -17 +equ trap_FS_GetFileList -18 +equ trap_R_RegisterModel -19 +equ trap_R_RegisterSkin -20 +equ trap_R_RegisterShaderNoMip -21 +equ trap_R_ClearScene -22 +equ trap_R_AddRefEntityToScene -23 +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_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 memset -101 +equ memcpy -102 +equ strncpy -103 +equ sin -104 +equ cos -105 +equ atan2 -106 +equ sqrt -107 +equ floor -108 +equ ceil -109 |