Browse Source

Add HUD_MessageBox. Rename isXashFWGS to IsXashFWGS

caseclosed
Alibek Omarov 7 years ago
parent
commit
cec6d7a1bc
  1. 17
      cl_dll/cdll_int.cpp
  2. 3
      cl_dll/cl_util.h
  3. 2
      cl_dll/hud_redraw.cpp
  4. 2
      cl_dll/input_mouse.cpp

17
cl_dll/cdll_int.cpp

@ -376,7 +376,22 @@ void DLLEXPORT HUD_MobilityInterface( mobile_engfuncs_t *gpMobileEngfuncs ) @@ -376,7 +376,22 @@ void DLLEXPORT HUD_MobilityInterface( mobile_engfuncs_t *gpMobileEngfuncs )
gMobileEngfuncs = gpMobileEngfuncs;
}
bool isXashFWGS()
bool HUD_MessageBox( const char *msg )
{
gEngfuncs.Con_Printf( msg ); // just in case
if( IsXashFWGS() )
{
gMobileEngfuncs->pfnSys_Warn( msg );
return true;
}
// TODO: Load SDL2 and call ShowSimpleMessageBox
return false;
}
bool IsXashFWGS()
{
return gMobileEngfuncs != NULL;
}

3
cl_dll/cl_util.h

@ -181,5 +181,6 @@ inline void UnpackRGB( int &r, int &g, int &b, unsigned long ulRGB )\ @@ -181,5 +181,6 @@ inline void UnpackRGB( int &r, int &g, int &b, unsigned long ulRGB )\
HSPRITE LoadSprite( const char *pszName );
bool isXashFWGS();
bool HUD_MessageBox( const char *msg );
bool IsXashFWGS();
#endif

2
cl_dll/hud_redraw.cpp

@ -235,7 +235,7 @@ int CHud::DrawHudString( int xpos, int ypos, int iMaxX, const char *szIt, int r, @@ -235,7 +235,7 @@ 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 )
{
if (isXashFWGS())
if (IsXashFWGS())
{
// xash3d: reset unicode state
gEngfuncs.pfnVGUI2DrawCharacterAdditive( 0, 0, 0, 0, 0, 0, 0 );

2
cl_dll/input_mouse.cpp

@ -69,7 +69,7 @@ void IN_Shutdown( void ) @@ -69,7 +69,7 @@ void IN_Shutdown( void )
void IN_Init( void )
{
#ifdef SUPPORT_GOLDSOURCE_INPUT
if (isXashFWGS()) {
if (IsXashFWGS()) {
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
currentInput = &fwgsInput;
} else {

Loading…
Cancel
Save