diff options
author | IronClawTrem <louie.nutman@gmail.com> | 2020-04-09 18:30:35 +0100 |
---|---|---|
committer | IronClawTrem <louie.nutman@gmail.com> | 2020-04-09 18:31:16 +0100 |
commit | f324890e9715490c909ca6123948f4157401324c (patch) | |
tree | 9db453bd1cf86ea2a5751dadd073c003635f9f3e /src/ui | |
parent | c378d3fb9f7f443ee6a6f78f490f2bc203aba5ea (diff) |
multiprotocol: gamelogic code for 1.1
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_main.c | 15 | ||||
-rw-r--r-- | src/ui/ui_public.h | 28 | ||||
-rw-r--r-- | src/ui/ui_syscalls.asm | 118 | ||||
-rw-r--r-- | src/ui/ui_syscalls_11.asm | 1 |
4 files changed, 97 insertions, 65 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 096253a..d694381 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 ); diff --git a/src/ui/ui_public.h b/src/ui/ui_public.h index a70746b..364adcf 100644 --- a/src/ui/ui_public.h +++ b/src/ui/ui_public.h @@ -65,6 +65,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, @@ -93,11 +96,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, @@ -125,6 +130,15 @@ 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, UI_STRNCPY, @@ -171,6 +185,14 @@ 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 ); @@ -189,12 +211,6 @@ typedef enum // if !overlay, the background will be drawn, otherwise it will be // overlayed over whatever the cgame has drawn. // a GetClientState syscall will be made to get the current strings - - UI_MOUSE_POSITION, - // int UI_MousePosition( void ); - - UI_SET_MOUSE_POSITION - // void UI_SetMousePosition( int x, int y ); } uiExport_t; diff --git a/src/ui/ui_syscalls.asm b/src/ui/ui_syscalls.asm index e989ab9..f8ff938 100644 --- a/src/ui/ui_syscalls.asm +++ b/src/ui/ui_syscalls.asm @@ -28,66 +28,68 @@ 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 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_GetNews -87 equ memset -101 equ memcpy -102 diff --git a/src/ui/ui_syscalls_11.asm b/src/ui/ui_syscalls_11.asm index 64d2ca3..cb80264 100644 --- a/src/ui/ui_syscalls_11.asm +++ b/src/ui/ui_syscalls_11.asm @@ -95,4 +95,3 @@ equ atan2 -106 equ sqrt -107 equ floor -108 equ ceil -109 - |