2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 01:47:45 +01:00

Fix build.

This commit is contained in:
Night Owl 2017-07-02 02:36:56 +05:00
parent 2faa732aa1
commit d20c4ff329
9 changed files with 20 additions and 16 deletions

View File

@ -94,8 +94,12 @@ inline void DrawSetTextColor( float r, float g, float b )
inline int SPR_Height( HSPRITE x, int f ) { return gEngfuncs.pfnSPR_Height(x, f); }
inline int SPR_Width( HSPRITE x, int f ) { return gEngfuncs.pfnSPR_Width(x, f); }
inline client_textmessage_t *TextMessageGet( const char *pName ) { return gEngfuncs.pfnTextMessageGet( pName ); }
inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b )
inline client_textmessage_t *TextMessageGet( const char *pName )
{
return gEngfuncs.pfnTextMessageGet( pName );
}
inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b )
{
return gEngfuncs.pfnDrawCharacter( x, y, number, r, g, b );
}
@ -115,7 +119,7 @@ inline void GetConsoleStringSize( const char *string, int *width, int *height )
gEngfuncs.pfnDrawConsoleStringLen( (char*)string, width, height );
}
int DrawUtfString( int xpos, int ypos, int iMaxX, 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 );
inline int ConsoleStringLen( const char *string )
{

View File

@ -46,7 +46,7 @@ void COM_Log( const char *pszFile, const char *fmt, ... )
va_list argptr;
char string[1024];
FILE *fp;
char *pfilename;
const char *pfilename;
if( !pszFile )
{

View File

@ -281,7 +281,7 @@ int CHud::DrawHudNumberString( int xpos, int ypos, int iMinX, int iNumber, int r
int CHud::DrawHudStringReverse( int xpos, int ypos, int iMinX, const char *szString, int r, int g, int b )
{
// find the end of the string
for( char *szIt = szString; *szIt != 0; szIt++ )
for( const char *szIt = szString; *szIt != 0; szIt++ )
xpos -= gHUD.m_scrinfo.charWidths[(unsigned char)*szIt];
if( xpos < iMinX )
xpos = iMinX;

View File

@ -45,7 +45,7 @@ int CHudTextMessage::Init( void )
char *CHudTextMessage::LocaliseTextString( const char *msg, char *dst_buffer, int buffer_size )
{
char *dst = dst_buffer;
for( char *src = msg; *src != 0 && buffer_size > 0; buffer_size-- )
for( char *src = (char*)msg; *src != 0 && buffer_size > 0; buffer_size-- )
{
if( *src == '#' )
{
@ -163,22 +163,22 @@ int CHudTextMessage::MsgFunc_TextMsg( const char *pszName, int iSize, void *pbuf
int msg_dest = READ_BYTE();
static char szBuf[6][128];
char *msg_text = LookupString( READ_STRING(), &msg_dest );
const char *msg_text = LookupString( READ_STRING(), &msg_dest );
msg_text = strcpy( szBuf[0], msg_text );
// keep reading strings and using C format strings for subsituting the strings into the localised text string
const char *sstr1 = LookupString( READ_STRING() );
sstr1 = strcpy( szBuf[1], sstr1 );
StripEndNewlineFromString( sstr1 ); // these strings are meant for subsitution into the main strings, so cull the automatic end newlines
StripEndNewlineFromString( (char*)sstr1 ); // these strings are meant for subsitution into the main strings, so cull the automatic end newlines
const char *sstr2 = LookupString( READ_STRING() );
sstr2 = strcpy( szBuf[2], sstr2 );
StripEndNewlineFromString( sstr2 );
StripEndNewlineFromString( (char*)sstr2 );
const char *sstr3 = LookupString( READ_STRING() );
sstr3 = strcpy( szBuf[3], sstr3 );
StripEndNewlineFromString( sstr3 );
StripEndNewlineFromString( (char*)sstr3 );
const char *sstr4 = LookupString( READ_STRING() );
sstr4 = strcpy( szBuf[4], sstr4 );
StripEndNewlineFromString( sstr4 );
StripEndNewlineFromString( (char*)sstr4 );
char *psz = szBuf[5];
switch( msg_dest )

View File

@ -525,7 +525,7 @@ void CBaseButton::Spawn()
// Button sound table.
// Also used by CBaseDoor to get 'touched' door lock/unlock sounds
char *ButtonSound( int sound )
const char *ButtonSound( int sound )
{
const char *pszSound;

View File

@ -1463,7 +1463,7 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin
}
}
// make bullet trails
UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0 );
UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0 ) );
}
ApplyMultiDamage( pev, pevAttacker );
}

View File

@ -935,7 +935,7 @@ BOOL CBasePlayerWeapon::CanDeploy( void )
return TRUE;
}
BOOL CBasePlayerWeapon::DefaultDeploy( const char *szViewModel, char *szWeaponModel, int iAnim, char *szAnimExt, int skiplocal /* = 0 */, int body )
BOOL CBasePlayerWeapon::DefaultDeploy( const char *szViewModel, const char *szWeaponModel, int iAnim, const char *szAnimExt, int skiplocal /* = 0 */, int body )
{
if( !CanDeploy() )
return FALSE;

View File

@ -310,7 +310,7 @@ public:
virtual BOOL CanDeploy( void );
virtual BOOL IsUseable( void );
BOOL DefaultDeploy( const char *szViewModel, char *szWeaponModel, int iAnim, char *szAnimExt, int skiplocal = 0, int body = 0 );
BOOL DefaultDeploy( const char *szViewModel, const char *szWeaponModel, int iAnim, const char *szAnimExt, int skiplocal = 0, int body = 0 );
int DefaultReload( int iClipSize, int iAnim, float fDelay, int body = 0 );
virtual void ItemPostFrame( void ); // called each frame by the player PostThink

View File

@ -205,7 +205,7 @@ typedef struct cl_enginefuncs_s
int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent );
const struct model_s* (*GetSpritePointer)( HSPRITE hSprite );
void (*pfnPlaySoundByNameAtLocation)( char *szSound, float volume, float *origin );
void (*pfnPlaySoundByNameAtLocation)( const char *szSound, float volume, float *origin );
unsigned short (*pfnPrecacheEvent)( int type, const char* psz );
void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );