2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

engine: add NetAPI to extended menu API

This commit is contained in:
Alibek Omarov 2024-07-07 03:39:09 +03:00
parent f8b958738a
commit 6bbf08893e
6 changed files with 6 additions and 4 deletions

View File

@ -3772,7 +3772,7 @@ static demo_api_t gDemoApi =
Demo_WriteBuffer, Demo_WriteBuffer,
}; };
static net_api_t gNetApi = net_api_t gNetApi =
{ {
NetAPI_InitNetworking, NetAPI_InitNetworking,
NetAPI_Status, NetAPI_Status,

View File

@ -1237,6 +1237,7 @@ static ui_extendedfuncs_t gExtendedfuncs =
NET_AdrToString, NET_AdrToString,
NET_CompareAdrSort, NET_CompareAdrSort,
Sys_GetNativeObject, Sys_GetNativeObject,
&gNetApi,
}; };
void UI_UnloadProgs( void ) void UI_UnloadProgs( void )

View File

@ -1164,5 +1164,7 @@ int Key_ToUpper( int key );
void OSK_Draw( void ); void OSK_Draw( void );
extern rgba_t g_color_table[8]; extern rgba_t g_color_table[8];
extern triangleapi_t gTriApi;
extern net_api_t gNetApi;
#endif//CLIENT_H #endif//CLIENT_H

View File

@ -467,7 +467,6 @@ static void CL_FillTriAPIFromRef( triangleapi_t *dst, const ref_interface_t *src
static qboolean R_LoadProgs( const char *name ) static qboolean R_LoadProgs( const char *name )
{ {
extern triangleapi_t gTriApi;
static ref_api_t gpEngfuncs; static ref_api_t gpEngfuncs;
REFAPI GetRefAPI; // single export REFAPI GetRefAPI; // single export

View File

@ -54,6 +54,4 @@ extern convar_t gl_clear;
qboolean R_Init( void ); qboolean R_Init( void );
void R_Shutdown( void ); void R_Shutdown( void );
extern triangleapi_t gTriApi;
#endif // REF_COMMON_H #endif // REF_COMMON_H

View File

@ -19,6 +19,7 @@ GNU General Public License for more details.
#include "cvardef.h" #include "cvardef.h"
#include "gameinfo.h" #include "gameinfo.h"
#include "wrect.h" #include "wrect.h"
#include "net_api.h"
// a macro for mainui_cpp, indicating that mainui should be compiled for // a macro for mainui_cpp, indicating that mainui should be compiled for
// Xash3D 1.0 interface // Xash3D 1.0 interface
@ -216,6 +217,7 @@ typedef struct ui_extendedfuncs_s {
const char *(*pfnAdrToString)( const struct netadr_s a ); const char *(*pfnAdrToString)( const struct netadr_s a );
int (*pfnCompareAdr)( const void *a, const void *b ); // netadr_t int (*pfnCompareAdr)( const void *a, const void *b ); // netadr_t
void *(*pfnGetNativeObject)( const char *name ); void *(*pfnGetNativeObject)( const char *name );
struct net_api_s *pNetAPI;
} ui_extendedfuncs_t; } ui_extendedfuncs_t;
// deprecated export from old engine // deprecated export from old engine