Browse Source

Fix build.

halloween
Night Owl 8 years ago
parent
commit
d20c4ff329
  1. 8
      cl_dll/cl_util.h
  2. 2
      cl_dll/com_weapons.cpp
  3. 2
      cl_dll/hud_redraw.cpp
  4. 12
      cl_dll/text_message.cpp
  5. 2
      dlls/buttons.cpp
  6. 2
      dlls/combat.cpp
  7. 2
      dlls/weapons.cpp
  8. 2
      dlls/weapons.h
  9. 2
      engine/cdll_int.h

8
cl_dll/cl_util.h

@ -94,7 +94,11 @@ 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_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 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 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 int TextMessageDrawChar( int x, int y, int number, int r, int g, int b )
{ {
return gEngfuncs.pfnDrawCharacter( x, y, number, r, g, 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 ); 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 ) inline int ConsoleStringLen( const char *string )
{ {

2
cl_dll/com_weapons.cpp

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

2
cl_dll/hud_redraw.cpp

@ -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 ) int CHud::DrawHudStringReverse( int xpos, int ypos, int iMinX, const char *szString, int r, int g, int b )
{ {
// find the end of the string // 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]; xpos -= gHUD.m_scrinfo.charWidths[(unsigned char)*szIt];
if( xpos < iMinX ) if( xpos < iMinX )
xpos = iMinX; xpos = iMinX;

12
cl_dll/text_message.cpp

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

2
dlls/buttons.cpp

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

2
dlls/combat.cpp

@ -1463,7 +1463,7 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin
} }
} }
// make bullet trails // 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 ); ApplyMultiDamage( pev, pevAttacker );
} }

2
dlls/weapons.cpp

@ -935,7 +935,7 @@ BOOL CBasePlayerWeapon::CanDeploy( void )
return TRUE; 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() ) if( !CanDeploy() )
return FALSE; return FALSE;

2
dlls/weapons.h

@ -310,7 +310,7 @@ public:
virtual BOOL CanDeploy( void ); virtual BOOL CanDeploy( void );
virtual BOOL IsUseable( 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 ); int DefaultReload( int iClipSize, int iAnim, float fDelay, int body = 0 );
virtual void ItemPostFrame( void ); // called each frame by the player PostThink virtual void ItemPostFrame( void ); // called each frame by the player PostThink

2
engine/cdll_int.h

@ -205,7 +205,7 @@ typedef struct cl_enginefuncs_s
int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent ); int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent );
const struct model_s* (*GetSpritePointer)( HSPRITE hSprite ); 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 ); 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 ); 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 );

Loading…
Cancel
Save