diff --git a/common/const.h b/common/const.h index fe4469fa..bffcebc7 100644 --- a/common/const.h +++ b/common/const.h @@ -14,6 +14,9 @@ ****/ #ifndef CONST_H #define CONST_H + +#include // ptrdiff_t + // // Constants shared by the engine and dlls // This header file included by engine files and DLL files. @@ -721,7 +724,7 @@ enum }; typedef int func_t; -typedef int string_t; +typedef ptrdiff_t string_t; typedef unsigned short word; diff --git a/engine/eiface.h b/engine/eiface.h index e18cdedb..3bda3265 100644 --- a/engine/eiface.h +++ b/engine/eiface.h @@ -125,7 +125,7 @@ typedef struct enginefuncs_s void (*pfnAngleVectors)( const float *rgflVector, float *forward, float *right, float *up ); edict_t* (*pfnCreateEntity)( void ); void (*pfnRemoveEntity)( edict_t* e ); - edict_t* (*pfnCreateNamedEntity)( int className ); + edict_t* (*pfnCreateNamedEntity)( string_t className ); void (*pfnMakeStatic)( edict_t *ent ); int (*pfnEntIsOnFloor)( edict_t *e ); int (*pfnDropToFloor)( edict_t* e ); @@ -168,8 +168,8 @@ typedef struct enginefuncs_s void* (*pfnPvAllocEntPrivateData)( edict_t *pEdict, long cb ); void* (*pfnPvEntPrivateData)( edict_t *pEdict ); void (*pfnFreeEntPrivateData)( edict_t *pEdict ); - const char *(*pfnSzFromIndex)( int iString ); - int (*pfnAllocString)( const char *szValue ); + const char *(*pfnSzFromIndex)( string_t iString ); + string_t (*pfnAllocString)( const char *szValue ); struct entvars_s *(*pfnGetVarsOfEnt)( edict_t *pEdict ); edict_t* (*pfnPEntityOfEntOffset)( int iEntOffset ); int (*pfnEntOffsetOfPEntity)( const edict_t *pEdict ); diff --git a/engine/progdefs.h b/engine/progdefs.h index 2a0e133b..fb636827 100644 --- a/engine/progdefs.h +++ b/engine/progdefs.h @@ -85,8 +85,8 @@ typedef struct entvars_s int modelindex; string_t model; - int viewmodel; // player's viewmodel - int weaponmodel; // what other players see + string_t viewmodel; // player's viewmodel + string_t weaponmodel; // what other players see vec3_t absmin; // BB max translated to world coord vec3_t absmax; // BB max translated to world coord @@ -144,7 +144,7 @@ typedef struct entvars_s int flags; int colormap; // lowbyte topcolor, highbyte bottomcolor - int team; + string_t team; float max_health; float teleport_time;