mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 13:44:22 +00:00
Use old API to draw scoreboard and motd lines in goldsource
This commit is contained in:
parent
34c577572b
commit
ca590f2420
@ -305,3 +305,8 @@ void DLLEXPORT HUD_MobilityInterface( mobile_engfuncs_t *gpMobileEngfuncs )
|
|||||||
return;
|
return;
|
||||||
gMobileEngfuncs = gpMobileEngfuncs;
|
gMobileEngfuncs = gpMobileEngfuncs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isXashFWGS()
|
||||||
|
{
|
||||||
|
return gMobileEngfuncs != NULL;
|
||||||
|
}
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
//
|
//
|
||||||
// cl_util.h
|
// cl_util.h
|
||||||
//
|
//
|
||||||
|
#ifndef CL_UTIL_H
|
||||||
|
#define CL_UTIL_H
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
#include "cvardef.h"
|
#include "cvardef.h"
|
||||||
|
|
||||||
@ -179,3 +180,6 @@ inline void UnpackRGB( int &r, int &g, int &b, unsigned long ulRGB )\
|
|||||||
}
|
}
|
||||||
|
|
||||||
HSPRITE LoadSprite( const char *pszName );
|
HSPRITE LoadSprite( const char *pszName );
|
||||||
|
|
||||||
|
bool isXashFWGS();
|
||||||
|
#endif
|
||||||
|
@ -234,6 +234,8 @@ int CHud::DrawHudString( int xpos, int ypos, int iMaxX, const char *szIt, int r,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int DrawUtfString( int xpos, int ypos, int iMaxX, const char *szIt, int r, int g, int b )
|
int DrawUtfString( int xpos, int ypos, int iMaxX, const char *szIt, int r, int g, int b )
|
||||||
|
{
|
||||||
|
if (isXashFWGS())
|
||||||
{
|
{
|
||||||
// xash3d: reset unicode state
|
// xash3d: reset unicode state
|
||||||
gEngfuncs.pfnVGUI2DrawCharacterAdditive( 0, 0, 0, 0, 0, 0, 0 );
|
gEngfuncs.pfnVGUI2DrawCharacterAdditive( 0, 0, 0, 0, 0, 0, 0 );
|
||||||
@ -256,9 +258,13 @@ int DrawUtfString( int xpos, int ypos, int iMaxX, const char *szIt, int r, int g
|
|||||||
int c = (unsigned int)(unsigned char)*szIt;
|
int c = (unsigned int)(unsigned char)*szIt;
|
||||||
xpos += gEngfuncs.pfnVGUI2DrawCharacterAdditive( xpos, ypos, c, r, g, b, 0 );
|
xpos += gEngfuncs.pfnVGUI2DrawCharacterAdditive( xpos, ypos, c, r, g, b, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return xpos;
|
return xpos;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return gHUD.DrawHudString(xpos, ypos, iMaxX, szIt, r, g, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int CHud::DrawHudStringLen( const char *szIt )
|
int CHud::DrawHudStringLen( const char *szIt )
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "input_mouse.h"
|
#include "input_mouse.h"
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
#include "cl_util.h"
|
||||||
|
|
||||||
// shared between backends
|
// shared between backends
|
||||||
Vector dead_viewangles(0, 0, 0);
|
Vector dead_viewangles(0, 0, 0);
|
||||||
@ -68,7 +69,7 @@ void IN_Shutdown( void )
|
|||||||
void IN_Init( void )
|
void IN_Init( void )
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
||||||
if (gMobileEngfuncs) {
|
if (isXashFWGS()) {
|
||||||
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
|
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
|
||||||
currentInput = &fwgsInput;
|
currentInput = &fwgsInput;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user