mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-09 05:24:17 +00:00
Merge branch 'master' of https://github.com/SDLash3D/hlsdk-xash3d into gravgun
This commit is contained in:
commit
4a7e928520
@ -103,7 +103,7 @@ int CHudMOTD::Draw( float fTime )
|
|||||||
|
|
||||||
// find where to start drawing the line
|
// find where to start drawing the line
|
||||||
if( ( ypos > ROW_RANGE_MIN ) && ( ypos + LINE_HEIGHT <= ypos_r + height ) )
|
if( ( ypos > ROW_RANGE_MIN ) && ( ypos + LINE_HEIGHT <= ypos_r + height ) )
|
||||||
gHUD.DrawHudString( xpos, ypos, xmax, ch, 255, 180, 0 );
|
DrawUtfString( xpos, ypos, xmax, ch, 255, 180, 0 );
|
||||||
|
|
||||||
ypos += LINE_HEIGHT;
|
ypos += LINE_HEIGHT;
|
||||||
|
|
||||||
|
@ -41,6 +41,10 @@ typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
|
|||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
|
||||||
|
#define XASH_64BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
extern cl_enginefunc_t gEngfuncs;
|
extern cl_enginefunc_t gEngfuncs;
|
||||||
#include "../engine/mobility_int.h"
|
#include "../engine/mobility_int.h"
|
||||||
extern mobile_engfuncs_t *gMobileEngfuncs;
|
extern mobile_engfuncs_t *gMobileEngfuncs;
|
||||||
|
@ -115,6 +115,8 @@ 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 );
|
||||||
|
|
||||||
inline int ConsoleStringLen( const char *string )
|
inline int ConsoleStringLen( const char *string )
|
||||||
{
|
{
|
||||||
int _width = 0, _height = 0;
|
int _width = 0, _height = 0;
|
||||||
|
@ -283,7 +283,7 @@ unsigned short stub_PrecacheEvent( int type, const char *s )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *stub_NameForFunction( unsigned long function )
|
const char *stub_NameForFunction( void *function )
|
||||||
{
|
{
|
||||||
return "func";
|
return "func";
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
//========= Copyright (c) 1996-2002, Valve LLC, All rights reserved. ============
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//
|
//
|
||||||
@ -34,7 +34,7 @@ void HUD_SetMaxSpeed( const struct edict_s *ed, float speed );
|
|||||||
int stub_PrecacheModel( char* s );
|
int stub_PrecacheModel( char* s );
|
||||||
int stub_PrecacheSound( char* s );
|
int stub_PrecacheSound( char* s );
|
||||||
unsigned short stub_PrecacheEvent( int type, const char *s );
|
unsigned short stub_PrecacheEvent( int type, const char *s );
|
||||||
const char *stub_NameForFunction( unsigned long function );
|
const char *stub_NameForFunction( void *function );
|
||||||
void stub_SetModel( struct edict_s *e, const char *m );
|
void stub_SetModel( struct edict_s *e, const char *m );
|
||||||
|
|
||||||
extern cvar_t *cl_lw;
|
extern cvar_t *cl_lw;
|
||||||
|
@ -226,6 +226,35 @@ int CHud::DrawHudString( int xpos, int ypos, int iMaxX, char *szIt, int r, int g
|
|||||||
return xpos;
|
return xpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int DrawUtfString( int xpos, int ypos, int iMaxX, char *szIt, int r, int g, int b )
|
||||||
|
{
|
||||||
|
// xash3d: reset unicode state
|
||||||
|
gEngfuncs.pfnVGUI2DrawCharacterAdditive( 0, 0, 0, 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
// draw the string until we hit the null character or a newline character
|
||||||
|
for( ; *szIt != 0 && *szIt != '\n'; szIt++ )
|
||||||
|
{
|
||||||
|
int w = gHUD.m_scrinfo.charWidths['M'];
|
||||||
|
if( xpos + w > iMaxX )
|
||||||
|
return xpos;
|
||||||
|
if( ( *szIt == '^' ) && ( *( szIt + 1 ) >= '0') && ( *( szIt + 1 ) <= '7') )
|
||||||
|
{
|
||||||
|
szIt++;
|
||||||
|
r = colors[*szIt - '0'][0];
|
||||||
|
g = colors[*szIt - '0'][1];
|
||||||
|
b = colors[*szIt - '0'][2];
|
||||||
|
if( !*(++szIt) )
|
||||||
|
return xpos;
|
||||||
|
}
|
||||||
|
int c = (unsigned int)(unsigned char)*szIt;
|
||||||
|
xpos += gEngfuncs.pfnVGUI2DrawCharacterAdditive( xpos, ypos, c, r, g, b, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return xpos;
|
||||||
|
}
|
||||||
|
|
||||||
int CHud::DrawHudStringLen( char *szIt )
|
int CHud::DrawHudStringLen( char *szIt )
|
||||||
{
|
{
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
@ -146,18 +146,18 @@ int CHudScoreboard::Draw( float fTime )
|
|||||||
FAR_RIGHT += 5;
|
FAR_RIGHT += 5;
|
||||||
gHUD.DrawDarkRectangle( xpos - 5, ypos - 5, FAR_RIGHT, ROW_RANGE_MAX );
|
gHUD.DrawDarkRectangle( xpos - 5, ypos - 5, FAR_RIGHT, ROW_RANGE_MAX );
|
||||||
if( !gHUD.m_Teamplay )
|
if( !gHUD.m_Teamplay )
|
||||||
gHUD.DrawHudString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Player", 255, 140, 0 );
|
DrawUtfString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Player", 255, 140, 0 );
|
||||||
else
|
else
|
||||||
gHUD.DrawHudString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Teams", 255, 140, 0 );
|
DrawUtfString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Teams", 255, 140, 0 );
|
||||||
|
|
||||||
gHUD.DrawHudStringReverse( KILLS_RANGE_MAX + xpos_rel, ypos, 0, "kills", 255, 140, 0 );
|
gHUD.DrawHudStringReverse( KILLS_RANGE_MAX + xpos_rel, ypos, 0, "kills", 255, 140, 0 );
|
||||||
gHUD.DrawHudString( DIVIDER_POS + xpos_rel, ypos, ScreenWidth, "/", 255, 140, 0 );
|
DrawUtfString( DIVIDER_POS + xpos_rel, ypos, ScreenWidth, "/", 255, 140, 0 );
|
||||||
gHUD.DrawHudString( DEATHS_RANGE_MIN + xpos_rel + 5, ypos, ScreenWidth, "deaths", 255, 140, 0 );
|
DrawUtfString( DEATHS_RANGE_MIN + xpos_rel + 5, ypos, ScreenWidth, "deaths", 255, 140, 0 );
|
||||||
gHUD.DrawHudString( PING_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "latency", 255, 140, 0 );
|
DrawUtfString( PING_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "latency", 255, 140, 0 );
|
||||||
|
|
||||||
if( can_show_packetloss )
|
if( can_show_packetloss )
|
||||||
{
|
{
|
||||||
gHUD.DrawHudString( PL_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "pkt loss", 255, 140, 0 );
|
DrawUtfString( PL_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "pkt loss", 255, 140, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
list_slot += 1.2;
|
list_slot += 1.2;
|
||||||
@ -272,7 +272,7 @@ int CHudScoreboard::Draw( float fTime )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// draw their name (left to right)
|
// draw their name (left to right)
|
||||||
gHUD.DrawHudString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, team_info->name, r, g, b );
|
DrawUtfString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, team_info->name, r, g, b );
|
||||||
|
|
||||||
// draw kills (right to left)
|
// draw kills (right to left)
|
||||||
xpos = KILLS_RANGE_MAX + xpos_rel;
|
xpos = KILLS_RANGE_MAX + xpos_rel;
|
||||||
@ -280,7 +280,7 @@ int CHudScoreboard::Draw( float fTime )
|
|||||||
|
|
||||||
// draw divider
|
// draw divider
|
||||||
xpos = DIVIDER_POS + xpos_rel;
|
xpos = DIVIDER_POS + xpos_rel;
|
||||||
gHUD.DrawHudString( xpos, ypos, xpos + 20, "/", r, g, b );
|
DrawUtfString( xpos, ypos, xpos + 20, "/", r, g, b );
|
||||||
|
|
||||||
// draw deaths
|
// draw deaths
|
||||||
xpos = DEATHS_RANGE_MAX + xpos_rel;
|
xpos = DEATHS_RANGE_MAX + xpos_rel;
|
||||||
@ -300,7 +300,7 @@ int CHudScoreboard::Draw( float fTime )
|
|||||||
xpos = ( ( PL_RANGE_MAX - PL_RANGE_MIN ) / 2) + PL_RANGE_MIN + xpos_rel + 25;
|
xpos = ( ( PL_RANGE_MAX - PL_RANGE_MIN ) / 2) + PL_RANGE_MIN + xpos_rel + 25;
|
||||||
|
|
||||||
sprintf( buf, " %d", team_info->packetloss );
|
sprintf( buf, " %d", team_info->packetloss );
|
||||||
gHUD.DrawHudString( xpos, ypos, xpos+50, buf, r, g, b );
|
DrawUtfString( xpos, ypos, xpos+50, buf, r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
team_info->already_drawn = TRUE; // set the already_drawn to be TRUE, so this team won't get drawn again
|
team_info->already_drawn = TRUE; // set the already_drawn to be TRUE, so this team won't get drawn again
|
||||||
@ -400,7 +400,7 @@ int CHudScoreboard::DrawPlayers( int xpos_rel, float list_slot, int nameoffset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// draw their name (left to right)
|
// draw their name (left to right)
|
||||||
gHUD.DrawHudString( xpos + nameoffset, ypos, NAME_RANGE_MAX + xpos_rel, pl_info->name, r, g, b );
|
DrawUtfString( xpos + nameoffset, ypos, NAME_RANGE_MAX + xpos_rel, pl_info->name, r, g, b );
|
||||||
|
|
||||||
// draw kills (right to left)
|
// draw kills (right to left)
|
||||||
xpos = KILLS_RANGE_MAX + xpos_rel;
|
xpos = KILLS_RANGE_MAX + xpos_rel;
|
||||||
@ -408,7 +408,7 @@ int CHudScoreboard::DrawPlayers( int xpos_rel, float list_slot, int nameoffset,
|
|||||||
|
|
||||||
// draw divider
|
// draw divider
|
||||||
xpos = DIVIDER_POS + xpos_rel;
|
xpos = DIVIDER_POS + xpos_rel;
|
||||||
gHUD.DrawHudString( xpos, ypos, xpos + 20, "/", r, g, b );
|
DrawUtfString( xpos, ypos, xpos + 20, "/", r, g, b );
|
||||||
|
|
||||||
// draw deaths
|
// draw deaths
|
||||||
xpos = DEATHS_RANGE_MAX + xpos_rel;
|
xpos = DEATHS_RANGE_MAX + xpos_rel;
|
||||||
@ -435,7 +435,7 @@ int CHudScoreboard::DrawPlayers( int xpos_rel, float list_slot, int nameoffset,
|
|||||||
|
|
||||||
xpos = ( ( PL_RANGE_MAX - PL_RANGE_MIN ) / 2 ) + PL_RANGE_MIN + xpos_rel + 25;
|
xpos = ( ( PL_RANGE_MAX - PL_RANGE_MIN ) / 2 ) + PL_RANGE_MIN + xpos_rel + 25;
|
||||||
|
|
||||||
gHUD.DrawHudString( xpos, ypos, xpos+50, buf, r, g, b );
|
DrawUtfString( xpos, ypos, xpos+50, buf, r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
pl_info->name = NULL; // set the name to be NULL, so this client won't get drawn again
|
pl_info->name = NULL; // set the name to be NULL, so this client won't get drawn again
|
||||||
|
@ -57,6 +57,10 @@ typedef int BOOL;
|
|||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
|
||||||
|
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
|
||||||
|
#define XASH_64BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
// Header file containing definition of globalvars_t and entvars_t
|
// Header file containing definition of globalvars_t and entvars_t
|
||||||
typedef unsigned int func_t;
|
typedef unsigned int func_t;
|
||||||
typedef unsigned int string_t; // from engine's pr_comp.h;
|
typedef unsigned int string_t; // from engine's pr_comp.h;
|
||||||
|
@ -103,7 +103,11 @@ typedef struct
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
// CGraph
|
// CGraph
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
#ifdef XASH_64BIT
|
||||||
|
#define GRAPH_VERSION (int)16 * 10
|
||||||
|
#else
|
||||||
#define GRAPH_VERSION (int)16// !!!increment this whever graph/node/link classes change, to obsolesce older disk files.
|
#define GRAPH_VERSION (int)16// !!!increment this whever graph/node/link classes change, to obsolesce older disk files.
|
||||||
|
#endif
|
||||||
|
|
||||||
class CGraph
|
class CGraph
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
void WriteVector( const char *pname, const float *value, int count ); // Save a vector
|
void WriteVector( const char *pname, const float *value, int count ); // Save a vector
|
||||||
void WritePositionVector( const char *pname, const Vector &value ); // Offset for landmark if necessary
|
void WritePositionVector( const char *pname, const Vector &value ); // Offset for landmark if necessary
|
||||||
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
|
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
|
||||||
void WriteFunction( const char *pname, const int *value, int count ); // Save a function pointer
|
void WriteFunction( const char *pname, void **value, int count ); // Save a function pointer
|
||||||
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
|
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
|
||||||
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );
|
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );
|
||||||
|
|
||||||
|
@ -1584,6 +1584,33 @@ void UTIL_StripToken( const char *pKey, char *pDest )
|
|||||||
//
|
//
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
static int gSizes[FIELD_TYPECOUNT] =
|
static int gSizes[FIELD_TYPECOUNT] =
|
||||||
|
{
|
||||||
|
sizeof(float), // FIELD_FLOAT
|
||||||
|
sizeof(int), // FIELD_STRING
|
||||||
|
sizeof(void*), // FIELD_ENTITY
|
||||||
|
sizeof(void*), // FIELD_CLASSPTR
|
||||||
|
sizeof(void*), // FIELD_EHANDLE
|
||||||
|
sizeof(void*), // FIELD_entvars_t
|
||||||
|
sizeof(void*), // FIELD_EDICT
|
||||||
|
sizeof(float) * 3, // FIELD_VECTOR
|
||||||
|
sizeof(float) * 3, // FIELD_POSITION_VECTOR
|
||||||
|
sizeof(void *), // FIELD_POINTER
|
||||||
|
sizeof(int), // FIELD_INTEGER
|
||||||
|
#ifdef GNUC
|
||||||
|
sizeof(void *) * 2, // FIELD_FUNCTION
|
||||||
|
#else
|
||||||
|
sizeof(void *), // FIELD_FUNCTION
|
||||||
|
#endif
|
||||||
|
sizeof(int), // FIELD_BOOLEAN
|
||||||
|
sizeof(short), // FIELD_SHORT
|
||||||
|
sizeof(char), // FIELD_CHARACTER
|
||||||
|
sizeof(float), // FIELD_TIME
|
||||||
|
sizeof(int), // FIELD_MODELNAME
|
||||||
|
sizeof(int), // FIELD_SOUNDNAME
|
||||||
|
};
|
||||||
|
|
||||||
|
// entities has different store size
|
||||||
|
static int gInputSizes[FIELD_TYPECOUNT] =
|
||||||
{
|
{
|
||||||
sizeof(float), // FIELD_FLOAT
|
sizeof(float), // FIELD_FLOAT
|
||||||
sizeof(int), // FIELD_STRING
|
sizeof(int), // FIELD_STRING
|
||||||
@ -1594,12 +1621,12 @@ static int gSizes[FIELD_TYPECOUNT] =
|
|||||||
sizeof(int), // FIELD_EDICT
|
sizeof(int), // FIELD_EDICT
|
||||||
sizeof(float) * 3, // FIELD_VECTOR
|
sizeof(float) * 3, // FIELD_VECTOR
|
||||||
sizeof(float) * 3, // FIELD_POSITION_VECTOR
|
sizeof(float) * 3, // FIELD_POSITION_VECTOR
|
||||||
sizeof(int *), // FIELD_POINTER
|
sizeof(void *), // FIELD_POINTER
|
||||||
sizeof(int), // FIELD_INTEGER
|
sizeof(int), // FIELD_INTEGER
|
||||||
#ifdef GNUC
|
#ifdef GNUC
|
||||||
sizeof(int *) * 2, // FIELD_FUNCTION
|
sizeof(void *) * 2, // FIELD_FUNCTION
|
||||||
#else
|
#else
|
||||||
sizeof(int *), // FIELD_FUNCTION
|
sizeof(void *), // FIELD_FUNCTION
|
||||||
#endif
|
#endif
|
||||||
sizeof(int), // FIELD_BOOLEAN
|
sizeof(int), // FIELD_BOOLEAN
|
||||||
sizeof(short), // FIELD_SHORT
|
sizeof(short), // FIELD_SHORT
|
||||||
@ -1886,7 +1913,7 @@ void CSave::WritePositionVector( const char *pname, const float *value, int coun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSave::WriteFunction( const char *pname, const int *data, int count )
|
void CSave::WriteFunction( const char *pname, void **data, int count )
|
||||||
{
|
{
|
||||||
const char *functionName;
|
const char *functionName;
|
||||||
|
|
||||||
@ -1894,7 +1921,7 @@ void CSave::WriteFunction( const char *pname, const int *data, int count )
|
|||||||
if( functionName )
|
if( functionName )
|
||||||
BufferField( pname, strlen( functionName ) + 1, functionName );
|
BufferField( pname, strlen( functionName ) + 1, functionName );
|
||||||
else
|
else
|
||||||
ALERT( at_error, "Invalid function pointer in entity!" );
|
ALERT( at_error, "Invalid function pointer in entity!\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd )
|
void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd )
|
||||||
@ -2042,7 +2069,7 @@ int CSave::WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFi
|
|||||||
WriteInt( pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize );
|
WriteInt( pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize );
|
||||||
break;
|
break;
|
||||||
case FIELD_FUNCTION:
|
case FIELD_FUNCTION:
|
||||||
WriteFunction( pTest->fieldName, (int *)pOutputData, pTest->fieldSize );
|
WriteFunction( pTest->fieldName, (void **)pOutputData, pTest->fieldSize );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ALERT( at_error, "Bad field type\n" );
|
ALERT( at_error, "Bad field type\n" );
|
||||||
@ -2137,7 +2164,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
|
|||||||
for( j = 0; j < pTest->fieldSize; j++ )
|
for( j = 0; j < pTest->fieldSize; j++ )
|
||||||
{
|
{
|
||||||
void *pOutputData = ( (char *)pBaseData + pTest->fieldOffset + ( j * gSizes[pTest->fieldType] ) );
|
void *pOutputData = ( (char *)pBaseData + pTest->fieldOffset + ( j * gSizes[pTest->fieldType] ) );
|
||||||
void *pInputData = (char *)pData + j * gSizes[pTest->fieldType];
|
void *pInputData = (char *)pData + j * gInputSizes[pTest->fieldType];
|
||||||
|
|
||||||
switch( pTest->fieldType )
|
switch( pTest->fieldType )
|
||||||
{
|
{
|
||||||
|
11
dlls/util.h
11
dlls/util.h
@ -35,10 +35,17 @@ extern globalvars_t *gpGlobals;
|
|||||||
|
|
||||||
// Use this instead of ALLOC_STRING on constant strings
|
// Use this instead of ALLOC_STRING on constant strings
|
||||||
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
|
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
|
||||||
#if !defined __amd64__ || defined(CLIENT_DLL)
|
#if !defined XASH_64BIT || defined(CLIENT_DLL)
|
||||||
#define MAKE_STRING(str) ((int)(size_t)str - (int)(size_t)STRING(0))
|
#define MAKE_STRING(str) ((int)(size_t)str - (int)(size_t)STRING(0))
|
||||||
#else
|
#else
|
||||||
#define MAKE_STRING ALLOC_STRING
|
static inline int MAKE_STRING(const char *szValue)
|
||||||
|
{
|
||||||
|
long long ptrdiff = szValue - STRING(0);
|
||||||
|
if( ptrdiff > INT_MAX || ptrdiff < INT_MIN )
|
||||||
|
return ALLOC_STRING(szValue);
|
||||||
|
else
|
||||||
|
return (int)ptrdiff;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName)
|
inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName)
|
||||||
|
@ -171,8 +171,8 @@ typedef struct enginefuncs_s
|
|||||||
int (*pfnRegUserMsg)( const char *pszName, int iSize );
|
int (*pfnRegUserMsg)( const char *pszName, int iSize );
|
||||||
void (*pfnAnimationAutomove)( const edict_t* pEdict, float flTime );
|
void (*pfnAnimationAutomove)( const edict_t* pEdict, float flTime );
|
||||||
void (*pfnGetBonePosition)( const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
void (*pfnGetBonePosition)( const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
||||||
unsigned long (*pfnFunctionFromName)( const char *pName );
|
void* (*pfnFunctionFromName)( const char *pName );
|
||||||
const char *(*pfnNameForFunction)( unsigned long function );
|
const char *(*pfnNameForFunction)( void *function );
|
||||||
void (*pfnClientPrintf)( edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg ); // JOHN: engine callbacks so game DLL can print messages to individual clients
|
void (*pfnClientPrintf)( edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg ); // JOHN: engine callbacks so game DLL can print messages to individual clients
|
||||||
void (*pfnServerPrint)( const char *szMsg );
|
void (*pfnServerPrint)( const char *szMsg );
|
||||||
const char *(*pfnCmd_Args)( void ); // these 3 added
|
const char *(*pfnCmd_Args)( void ); // these 3 added
|
||||||
|
@ -215,7 +215,7 @@ typedef struct
|
|||||||
char label[32]; // textual name
|
char label[32]; // textual name
|
||||||
char name[64]; // file name
|
char name[64]; // file name
|
||||||
cache_user_t cache; // cache index pointer
|
cache_user_t cache; // cache index pointer
|
||||||
#ifndef __amd64
|
#ifndef XASH_64BIT
|
||||||
int data; // hack for group 0
|
int data; // hack for group 0
|
||||||
#endif
|
#endif
|
||||||
} mstudioseqgroup_t;
|
} mstudioseqgroup_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user