Add forgotten const-qualifiers in interface headers. Remove unneeded PM headers

This commit is contained in:
Alibek Omarov 2018-04-23 23:05:49 +03:00
parent fd649905ea
commit e1f80fba3d
13 changed files with 109 additions and 196 deletions

View File

@ -117,58 +117,58 @@ typedef struct efx_api_s efx_api_t;
struct efx_api_s
{
particle_t *(*R_AllocParticle)( void (*callback)( struct particle_s *particle, float frametime ));
void (*R_BlobExplosion)( float *org );
void (*R_Blood)( float *org, float *dir, int pcolor, int speed );
void (*R_BloodSprite)( float *org, int colorindex, int modelIndex, int modelIndex2, float size );
void (*R_BloodStream)( float *org, float *dir, int pcolor, int speed );
void (*R_BreakModel)( float *pos, float *size, float *dir, float random, float life, int count, int modelIndex, char flags );
void (*R_Bubbles)( float *mins, float *maxs, float height, int modelIndex, int count, float speed );
void (*R_BubbleTrail)( float *start, float *end, float height, int modelIndex, int count, float speed );
void (*R_BulletImpactParticles)( float *pos );
void (*R_BlobExplosion)( const float *org );
void (*R_Blood)( const float *org, const float *dir, int pcolor, int speed );
void (*R_BloodSprite)( const float *org, int colorindex, int modelIndex, int modelIndex2, float size );
void (*R_BloodStream)( const float *org, const float *dir, int pcolor, int speed );
void (*R_BreakModel)( const float *pos, const float *size, const float *dir, float random, float life, int count, int modelIndex, char flags );
void (*R_Bubbles)( const float *mins, const float *maxs, float height, int modelIndex, int count, float speed );
void (*R_BubbleTrail)( const float *start, const float *end, float height, int modelIndex, int count, float speed );
void (*R_BulletImpactParticles)( const float *pos );
void (*R_EntityParticles)( struct cl_entity_s *ent );
void (*R_Explosion)( float *pos, int model, float scale, float framerate, int flags );
void (*R_FizzEffect)( struct cl_entity_s *pent, int modelIndex, int density );
void (*R_FireField)( float *org, int radius, int modelIndex, int count, int flags, float life );
void (*R_FlickerParticles)( float *org );
void (*R_FunnelSprite)( float *org, int modelIndex, int reverse );
void (*R_Implosion)( float *end, float radius, int count, float life );
void (*R_LargeFunnel)( float *org, int reverse );
void (*R_LavaSplash)( float *org );
void (*R_MultiGunshot)( float *org, float *dir, float *noise, int count, int decalCount, int *decalIndices );
void (*R_MuzzleFlash)( float *pos1, int type );
void (*R_ParticleBox)( float *mins, float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_ParticleBurst)( float *pos, int size, int color, float life );
void (*R_ParticleExplosion)( float *org );
void (*R_ParticleExplosion2)( float *org, int colorStart, int colorLength );
void (*R_ParticleLine)( float *start, float *end, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_FlickerParticles)( const float *org );
void (*R_FunnelSprite)( const float *org, int modelIndex, int reverse );
void (*R_Implosion)( const float *end, float radius, int count, float life );
void (*R_LargeFunnel)( const float *org, int reverse );
void (*R_LavaSplash)( const float *org );
void (*R_MultiGunshot)( const float *org, const float *dir, const float *noise, int count, int decalCount, int *decalIndices );
void (*R_MuzzleFlash)( const float *pos1, int type );
void (*R_ParticleBox)( const float *mins, const float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_ParticleBurst)( const float *pos, int size, int color, float life );
void (*R_ParticleExplosion)( const float *org );
void (*R_ParticleExplosion2)( const float *org, int colorStart, int colorLength );
void (*R_ParticleLine)( const float *start, const float *end, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_PlayerSprites)( int client, int modelIndex, int count, int size );
void (*R_Projectile)( float *origin, float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
void (*R_RicochetSound)( float *pos );
void (*R_RicochetSprite)( float *pos, struct model_s *pmodel, float duration, float scale );
void (*R_RocketFlare)( float *pos );
void (*R_Projectile)( const float *origin, const float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
void (*R_RicochetSound)( const float *pos );
void (*R_RicochetSprite)( const float *pos, struct model_s *pmodel, float duration, float scale );
void (*R_RocketFlare)( const float *pos );
void (*R_RocketTrail)( float *start, float *end, int type );
void (*R_RunParticleEffect)( float *org, float *dir, int color, int count );
void (*R_ShowLine)( float *start, float *end );
void (*R_SparkEffect)( float *pos, int count, int velocityMin, int velocityMax );
void (*R_SparkShower)( float *pos );
void (*R_SparkStreaks)( float *pos, int count, int velocityMin, int velocityMax );
void (*R_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
void (*R_RunParticleEffect)( const float *org, const float *dir, int color, int count );
void (*R_ShowLine)( const float *start, const float *end );
void (*R_SparkEffect)( const float *pos, int count, int velocityMin, int velocityMax );
void (*R_SparkShower)( const float *pos );
void (*R_SparkStreaks)( const float *pos, int count, int velocityMin, int velocityMax );
void (*R_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
void (*R_Sprite_Explode)( TEMPENTITY *pTemp, float scale, int flags );
void (*R_Sprite_Smoke)( TEMPENTITY *pTemp, float scale );
void (*R_Sprite_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int iRand );
void (*R_Sprite_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int iRand );
void (*R_Sprite_Trail)( int type, float *start, float *end, int modelIndex, int count, float life, float size, float amplitude, int renderamt, float speed );
void (*R_Sprite_WallPuff)( TEMPENTITY *pTemp, float scale );
void (*R_StreakSplash)( float *pos, float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
void (*R_TracerEffect)( float *start, float *end );
void (*R_StreakSplash)( const float *pos, const float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
void (*R_TracerEffect)( const float *start, const float *end );
void (*R_UserTracerParticle)( float *org, float *vel, float life, int colorIndex, float length, unsigned char deathcontext, void (*deathfunc)( struct particle_s *particle ));
particle_t *(*R_TracerParticles)( float *org, float *vel, float life );
void (*R_TeleportSplash)( float *org );
void (*R_TempSphereModel)( float *pos, float speed, float life, int count, int modelIndex );
TEMPENTITY *(*R_TempModel)( float *pos, float *dir, float *angles, float life, int modelIndex, int soundtype );
TEMPENTITY *(*R_DefaultSprite)( float *pos, int spriteIndex, float framerate );
TEMPENTITY *(*R_TempSprite)( float *pos, float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
void (*R_TeleportSplash)( const float *org );
void (*R_TempSphereModel)( const float *pos, float speed, float life, int count, int modelIndex );
TEMPENTITY *(*R_TempModel)( const float *pos, const float *dir, const float *angles, float life, int modelIndex, int soundtype );
TEMPENTITY *(*R_DefaultSprite)( const float *pos, int spriteIndex, float framerate );
TEMPENTITY *(*R_TempSprite)( float *pos, const float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
int (*Draw_DecalIndex)( int id );
int (*Draw_DecalIndexFromName)( char *name );
int (*Draw_DecalIndexFromName)( const char *name );
void (*R_DecalShoot)( int textureIndex, int entity, int modelIndex, float *position, int flags );
void (*R_AttachTentToPlayer)( int client, int modelIndex, float zoffset, float life );
void (*R_KillAttachedTents)( int client );
@ -182,14 +182,14 @@ struct efx_api_s
BEAM *(*R_BeamRing)( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
dlight_t *(*CL_AllocDlight)( int key );
dlight_t *(*CL_AllocElight)( int key );
TEMPENTITY *(*CL_TempEntAlloc)( float *org, struct model_s *model );
TEMPENTITY *(*CL_TempEntAllocNoModel)( float *org );
TEMPENTITY *(*CL_TempEntAllocHigh)( float *org, struct model_s *model );
TEMPENTITY *(*CL_TentEntAllocCustom)( float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
TEMPENTITY *(*CL_TempEntAlloc)( const float *org, struct model_s *model );
TEMPENTITY *(*CL_TempEntAllocNoModel)( const float *org );
TEMPENTITY *(*CL_TempEntAllocHigh)( const float *org, struct model_s *model );
TEMPENTITY *(*CL_TentEntAllocCustom)( const float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
void (*R_GetPackedColor)( short *packed, short color );
short (*R_LookupColor)( unsigned char r, unsigned char g, unsigned char b );
void (*R_DecalRemoveAll)( int textureIndex ); // textureIndex points to the decal index in the array, not the actual texture index.
void (*R_FireCustomDecal)( int textureIndex, int entity, int modelIndex, float *position, int flags, float scale );
};
#endif//R_EFX_H
#endif//R_EFX_H

View File

@ -26,7 +26,7 @@ typedef struct engine_studio_api_s
// Check to see if pointer is in the cache
void *( *Cache_Check )( struct cache_user_s *c );
// Load file into cache ( can be swapped out on demand )
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
// Retrieve model pointer for the named model
struct model_s *( *Mod_ForName )( const char *name, int crash_if_missing );
// Retrieve pointer to studio model data block from a model
@ -120,7 +120,7 @@ typedef struct server_studio_api_s
// Check to see if pointer is in the cache
void *( *Cache_Check )( struct cache_user_s *c );
// Load file into cache ( can be swapped out on demand )
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
// Retrieve pointer to studio model data block from a model
void *( *Mod_Extradata )( struct model_s *mod );
} server_studio_api_t;
@ -151,4 +151,4 @@ typedef struct sv_blending_interface_s
const edict_t *pEdict );
} sv_blending_interface_t;
#endif//R_STUDIOINT_H
#endif//R_STUDIOINT_H

View File

@ -149,6 +149,8 @@ typedef struct decallist_s
modelstate_t studio_state; // studio decals only
} decallist_t;
struct ref_viewpass_s;
typedef struct render_api_s
{
// Get renderer info (doesn't changes engine state at all)
@ -172,9 +174,9 @@ typedef struct render_api_s
const char* (*GL_TextureName)( unsigned int texnum );
const byte* (*GL_TextureData)( unsigned int texnum ); // may be NULL
int (*GL_LoadTexture)( const char *name, const byte *buf, size_t size, int flags );
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, int flags );
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, texFlags_t flags );
int (*GL_LoadTextureArray)( const char **names, int flags );
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, int flags );
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, texFlags_t flags );
void (*GL_FreeTexture)( unsigned int texnum );
// Decals manipulating (draw & remove)
@ -225,7 +227,7 @@ typedef struct render_api_s
// engine utils (not related with render API but placed here)
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly );
unsigned long (*pfnFileBufferCRC32)( const void *buffer, const int length );
unsigned int (*pfnFileBufferCRC32)( const void *buffer, const int length );
int (*COM_CompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
void (*Host_Error)( const char *error, ... ); // cause Host Error
void* ( *pfnGetModel )( int modelindex );

View File

@ -44,14 +44,14 @@ typedef struct triangleapi_s
void (*Color4f)( float r, float g, float b, float a );
void (*Color4ub)( unsigned char r, unsigned char g, unsigned char b, unsigned char a );
void (*TexCoord2f)( float u, float v );
void (*Vertex3fv)( float *worldPnt );
void (*Vertex3fv)( const float *worldPnt );
void (*Vertex3f)( float x, float y, float z );
void (*Brightness)( float brightness );
void (*CullFace)( TRICULLSTYLE style );
int (*SpriteTexture)( struct model_s *pSpriteModel, int frame );
int (*WorldToScreen)( float *world, float *screen ); // Returns 1 if it's z clipped
int (*WorldToScreen)( const float *world, float *screen ); // Returns 1 if it's z clipped
void (*Fog)( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b.
void (*ScreenToWorld)( float *screen, float *world );
void (*ScreenToWorld)( const float *screen, float *world );
void (*GetMatrix)( const int pname, float *matrix );
int (*BoxInPVS)( float *mins, float *maxs );
void (*LightAtPoint)( float *pos, float *value );
@ -59,4 +59,4 @@ typedef struct triangleapi_s
void (*FogParams)( float flDensity, int iFogSkybox );
} triangleapi_t;
#endif//TRIANGLEAPI_H
#endif//TRIANGLEAPI_H

View File

@ -135,20 +135,20 @@ typedef struct cl_enginefuncs_s
void (*pfnSetCrosshair)( HSPRITE hspr, wrect_t rc, int r, int g, int b );
// cvar handlers
struct cvar_s *(*pfnRegisterVariable)( char *szName, char *szValue, int flags );
float (*pfnGetCvarFloat)( char *szName );
char* (*pfnGetCvarString)( char *szName );
struct cvar_s *(*pfnRegisterVariable)( const char *szName, const char *szValue, int flags );
float (*pfnGetCvarFloat)( const char *szName );
const char* (*pfnGetCvarString)( const char *szName );
// command handlers
int (*pfnAddCommand)( char *cmd_name, void (*function)(void) );
int (*pfnHookUserMsg)( char *szMsgName, pfnUserMsgHook pfn );
int (*pfnServerCmd)( char *szCmdString );
int (*pfnClientCmd)( char *szCmdString );
int (*pfnAddCommand)( const char *cmd_name, void (*function)(void) );
int (*pfnHookUserMsg)( const char *szMsgName, pfnUserMsgHook pfn );
int (*pfnServerCmd)( const char *szCmdString );
int (*pfnClientCmd)( const char *szCmdString );
void (*pfnGetPlayerInfo)( int ent_num, hud_player_info_t *pinfo );
// sound handlers
void (*pfnPlaySoundByName)( char *szSound, float volume );
void (*pfnPlaySoundByName)( const char *szSound, float volume );
void (*pfnPlaySoundByIndex)( int iSound, float volume );
// vector helpers
@ -170,14 +170,14 @@ typedef struct cl_enginefuncs_s
void (*GetViewAngles)( float * );
void (*SetViewAngles)( float * );
int (*GetMaxClients)( void );
void (*Cvar_SetValue)( char *cvar, float value );
void (*Cvar_SetValue)( const char *cvar, float value );
int (*Cmd_Argc)( void );
char *(*Cmd_Argv)( int arg );
void (*Con_Printf)( char *fmt, ... );
void (*Con_DPrintf)( char *fmt, ... );
void (*Con_NPrintf)( int pos, char *fmt, ... );
void (*Con_NXPrintf)( struct con_nprint_s *info, char *fmt, ... );
const char *(*Cmd_Argv)( int arg );
void (*Con_Printf)( const char *fmt, ... );
void (*Con_DPrintf)( const char *fmt, ... );
void (*Con_NPrintf)( int pos, const char *fmt, ... );
void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... );
const char* (*PhysInfo_ValueForKey)( const char *key );
const char* (*ServerInfo_ValueForKey)( const char *key );
@ -196,8 +196,8 @@ typedef struct cl_enginefuncs_s
void (*V_CalcShake)( void );
void (*V_ApplyShake)( float *origin, float *angles, float factor );
int (*PM_PointContents)( float *point, int *truecontents );
int (*PM_WaterEntity)( float *p );
int (*PM_PointContents)( const float *point, int *truecontents );
int (*PM_WaterEntity)( const float *p );
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe );
struct model_s *(*CL_LoadModel)( const char *modelname, int *index );
@ -211,7 +211,7 @@ typedef struct cl_enginefuncs_s
void (*pfnWeaponAnim)( int iAnim, int body );
float (*pfnRandomFloat)( float flLow, float flHigh );
int (*pfnRandomLong)( int lLow, int lHigh );
void (*pfnHookEvent)( char *name, void ( *pfnEvent )( struct event_args_s *args ));
void (*pfnHookEvent)( const char *name, void ( *pfnEvent )( struct event_args_s *args ));
int (*Con_IsVisible) ();
const char *(*pfnGetGameDirectory)( void );
struct cvar_s *(*pfnGetCvarPointer)( const char *szName );
@ -222,7 +222,7 @@ typedef struct cl_enginefuncs_s
void* (*VGui_GetPanel)( );
void (*VGui_ViewportPaintBackground)( int extents[4] );
byte* (*COM_LoadFile)( char *path, int usehunk, int *pLength );
byte* (*COM_LoadFile)( const char *path, int usehunk, int *pLength );
char* (*COM_ParseFile)( char *data, char *token );
void (*COM_FreeFile)( void *buffer );

View File

@ -72,8 +72,6 @@ int RankForContents( int contents );
#define check_angles( x ) ( (int)x == 90 || (int)x == 180 || (int)x == 270 || (int)x == -90 || (int)x == -180 || (int)x == -270 )
#include "pm_shared.h"
/*
===============================================================================
@ -104,4 +102,4 @@ typedef struct event_state_s
event_info_t ei[MAX_EVENT_QUEUE];
} event_state_t;
#endif//WORLD_H
#endif//WORLD_H

View File

@ -94,7 +94,7 @@ typedef struct
int fPlayTrack;
} CDStatus;
typedef unsigned long CRC32_t;
typedef unsigned int CRC32_t;
typedef struct delta_s delta_t;
struct entity_state_s;
@ -102,13 +102,13 @@ struct entity_state_s;
// Engine hands this to DLLs for functionality callbacks
typedef struct enginefuncs_s
{
int (*pfnPrecacheModel)( char* s );
int (*pfnPrecacheSound)( char* s );
int (*pfnPrecacheModel)( const char* s );
int (*pfnPrecacheSound)( const char* s );
void (*pfnSetModel)( edict_t *e, const char *m );
int (*pfnModelIndex)( const char *m );
int (*pfnModelFrames)( int modelIndex );
void (*pfnSetSize)( edict_t *e, const float *rgflMin, const float *rgflMax );
void (*pfnChangeLevel)( char* s1, char* s2 );
void (*pfnChangeLevel)( const char* s1, const char* s2 );
void (*pfnGetSpawnParms)( edict_t *ent );
void (*pfnSaveSpawnParms)( edict_t *ent );
float (*pfnVecToYaw)( const float *rgflVector );
@ -141,11 +141,11 @@ typedef struct enginefuncs_s
const char *(*pfnTraceTexture)( edict_t *pTextureEntity, const float *v1, const float *v2 );
void (*pfnTraceSphere)( const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr );
void (*pfnGetAimVector)( edict_t* ent, float speed, float *rgflReturn );
void (*pfnServerCommand)( char* str );
void (*pfnServerCommand)( const char* str );
void (*pfnServerExecute)( void );
void (*pfnClientCommand)( edict_t* pEdict, char* szFmt, ... );
void (*pfnParticleEffect)( const float *org, const float *dir, float color, float count );
void (*pfnLightStyle)( int style, char* val );
void (*pfnLightStyle)( int style, const char* val );
int (*pfnDecalIndex)( const char *name );
int (*pfnPointContents)( const float *rgflVector );
void (*pfnMessageBegin)( int msg_dest, int msg_type, const float *pOrigin, edict_t *ed );
@ -189,18 +189,18 @@ typedef struct enginefuncs_s
int (*pfnCmd_Argc)( void ); // access client 'cmd' strings
void (*pfnGetAttachment)( const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles );
void (*pfnCRC32_Init)( CRC32_t *pulCRC );
void (*pfnCRC32_ProcessBuffer)( CRC32_t *pulCRC, void *p, int len );
void (*pfnCRC32_ProcessBuffer)( CRC32_t *pulCRC, const void *p, int len );
void (*pfnCRC32_ProcessByte)( CRC32_t *pulCRC, unsigned char ch );
CRC32_t (*pfnCRC32_Final)( CRC32_t pulCRC );
long (*pfnRandomLong)( long lLow, long lHigh );
int (*pfnRandomLong)( int lLow, int lHigh );
float (*pfnRandomFloat)( float flLow, float flHigh );
void (*pfnSetView)( const edict_t *pClient, const edict_t *pViewent );
float (*pfnTime)( void );
void (*pfnCrosshairAngle)( const edict_t *pClient, float pitch, float yaw );
byte* (*pfnLoadFileForMe)( char *filename, int *pLength );
byte* (*pfnLoadFileForMe)( const char *filename, int *pLength );
void (*pfnFreeFile)( void *buffer );
void (*pfnEndSection)( const char *pszSectionName ); // trigger_endsection
int (*pfnCompareFileTime)( char *filename1, char *filename2, int *iCompare );
int (*pfnCompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
void (*pfnGetGameDir)( char *szGetGameDir );
void (*pfnCvar_RegisterVariable)( cvar_t *variable );
void (*pfnFadeClientVolume)( const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds );
@ -209,12 +209,12 @@ typedef struct enginefuncs_s
void (*pfnRunPlayerMove)( edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
int (*pfnNumberOfEntities)( void );
char* (*pfnGetInfoKeyBuffer)( edict_t *e ); // passing in NULL gets the serverinfo
char* (*pfnInfoKeyValue)( char *infobuffer, char *key );
const char* (*pfnInfoKeyValue)( const char *infobuffer, const char *key );
void (*pfnSetKeyValue)( char *infobuffer, char *key, char *value );
void (*pfnSetClientKeyValue)( int clientIndex, char *infobuffer, char *key, char *value );
int (*pfnIsMapValid)( char *filename );
void (*pfnStaticDecal)( const float *origin, int decalIndex, int entityIndex, int modelIndex );
int (*pfnPrecacheGeneric)( char *s );
int (*pfnPrecacheGeneric)( const char *s );
int (*pfnGetPlayerUserId)( edict_t *e ); // returns the server assigned userid for this player. useful for logging frags, etc. returns -1 if the edict couldn't be found in the list of clients
void (*pfnBuildSoundMsg)( edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed );
int (*pfnIsDedicatedServer)( void ); // is this a dedicated server?
@ -229,8 +229,8 @@ typedef struct enginefuncs_s
unsigned short (*pfnPrecacheEvent)( int type, const char*psz );
void (*pfnPlaybackEvent)( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
unsigned char *(*pfnSetFatPVS)( float *org );
unsigned char *(*pfnSetFatPAS)( float *org );
unsigned char *(*pfnSetFatPVS)( const float *org );
unsigned char *(*pfnSetFatPAS)( const float *org );
int (*pfnCheckVisibility )( const edict_t *entity, unsigned char *pset );
@ -244,7 +244,7 @@ typedef struct enginefuncs_s
void (*pfnDeltaUnsetFieldByIndex)( delta_t *pFields, int fieldNumber );
void (*pfnSetGroupMask)( int mask, int op );
int (*pfnCreateInstancedBaseline)( int classname, struct entity_state_s *baseline );
void (*pfnCvar_DirectSet)( struct cvar_s *var, char *value );
void (*pfnCvar_DirectSet)( struct cvar_s *var, const char *value );
// Forces the client and server to be running with the same version of the specified file
// ( e.g., a player model ).
@ -253,7 +253,7 @@ typedef struct enginefuncs_s
void (*pfnGetPlayerStats)( const edict_t *pClient, int *ping, int *packet_loss );
void (*pfnAddServerCommand)( char *cmd_name, void (*function) (void) );
void (*pfnAddServerCommand)( const char *cmd_name, void (*function) (void) );
// For voice communications, set which clients hear eachother.
// NOTE: these functions take player entity indices (starting at 1).

View File

@ -70,7 +70,7 @@ typedef struct ui_enginefuncs_s
// cvar handlers
cvar_t* (*pfnRegisterVariable)( const char *szName, const char *szValue, int flags );
float (*pfnGetCvarFloat)( const char *szName );
char* (*pfnGetCvarString)( const char *szName );
const char* (*pfnGetCvarString)( const char *szName );
void (*pfnCvarSetString)( const char *szName, const char *szValue );
void (*pfnCvarSetValue)( const char *szName, float flValue );
@ -79,8 +79,8 @@ typedef struct ui_enginefuncs_s
void (*pfnClientCmd)( int execute_now, const char *szCmdString );
void (*pfnDelCommand)( const char *cmd_name );
int (*pfnCmdArgc)( void );
char* (*pfnCmdArgv)( int argc );
char* (*pfnCmd_Args)( void );
const char* (*pfnCmdArgv)( int argc );
const char* (*pfnCmd_Args)( void );
// debug messages (in-menu shows only notify)
void (*Con_Printf)( const char *fmt, ... );
@ -145,7 +145,7 @@ typedef struct ui_enginefuncs_s
int (*pfnGetGameInfo)( GAMEINFO *pgameinfo );
GAMEINFO **(*pfnGetGamesList)( int *numGames ); // collect info about all mods
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly ); // find in files
int (*pfnGetSaveComment)( const char *savename, char *comment );
int (*pfnGetSaveComment)( const char *savename, char *comment );
int (*pfnGetDemoComment)( const char *demoname, char *comment );
int (*pfnCheckGameDll)( void ); // returns false if hl.dll is missed or invalid
char *(*pfnGetClipboardData)( void );
@ -160,12 +160,12 @@ typedef struct ui_enginefuncs_s
// menu interface is freezed at version 0.75
// new functions starts here
float (*pfnRandomFloat)( float flLow, float flHigh );
long (*pfnRandomLong)( long lLow, long lHigh );
int (*pfnRandomLong)( int lLow, int lHigh );
void (*pfnSetCursor)( void *hCursor ); // change cursor
int (*pfnIsMapValid)( char *filename );
void (*pfnProcessImage)( int texnum, float gamma, int topColor, int bottomColor );
int (*pfnCompareFileTime)( char *filename1, char *filename2, int *iCompare );
int (*pfnCompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
const char *(*pfnGetModeString)( int vid_mode );
} ui_enginefuncs_t;

View File

@ -75,8 +75,8 @@ typedef struct server_physics_api_s
int ( *pfnDrawConsoleString )( int x, int y, char *string );
void ( *pfnDrawSetTextColor )( float r, float g, float b );
void ( *pfnDrawConsoleStringLen )( const char *string, int *length, int *height );
void ( *Con_NPrintf )( int pos, char *fmt, ... );
void ( *Con_NXPrintf )( struct con_nprint_s *info, char *fmt, ... );
void ( *Con_NPrintf )( int pos, const char *fmt, ... );
void ( *Con_NXPrintf )( struct con_nprint_s *info, const char *fmt, ... );
const char *( *pfnGetLightStyle )( int style ); // read custom appreance for selected lightstyle
void ( *pfnUpdateFogSettings )( unsigned int packed_fog );
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly );
@ -94,7 +94,7 @@ typedef struct server_physics_api_s
int (*pfnBoxInPVS)( const float *org, const float *boxmins, const float *boxmaxs );
// message handler (missed function to write raw bytes)
void (*pfnWriteBytes)( byte *bytes, int count );
void (*pfnWriteBytes)( const byte *bytes, int count );
// BSP lump management
int (*pfnCheckLump)( const char *filename, const int lump, int *lumpsize );
@ -161,4 +161,4 @@ typedef struct physics_interface_s
int (*SV_PlayerThink)( edict_t *ent, float frametime, double time );
} physics_interface_t;
#endif//PHYSINT_H
#endif//PHYSINT_H

View File

@ -1,23 +0,0 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#ifndef PM_DEBUG_H
#define PM_DEBUG_H
void PM_ViewEntity( void );
void PM_DrawBBox(vec3_t mins, vec3_t maxs, vec3_t origin, int pcolor, float life);
void PM_ParticleLine(vec3_t start, vec3_t end, int pcolor, float life, float vert);
void PM_ShowClipBox( void );
#endif//PM_DEBUG_H

View File

@ -184,11 +184,11 @@ typedef struct playermove_s
// Common functions
const char *(*PM_Info_ValueForKey) ( const char *s, const char *key );
void (*PM_Particle)( float *origin, int color, float life, int zpos, int zvel );
void (*PM_Particle)( const float *origin, int color, float life, int zpos, int zvel );
int (*PM_TestPlayerPosition)( float *pos, pmtrace_t *ptrace );
void (*Con_NPrintf)( int idx, char *fmt, ... );
void (*Con_DPrintf)( char *fmt, ... );
void (*Con_Printf)( char *fmt, ... );
void (*Con_NPrintf)( int idx, const char *fmt, ... );
void (*Con_DPrintf)( const char *fmt, ... );
void (*Con_Printf)( const char *fmt, ... );
double (*Sys_FloatTime)( void );
void (*PM_StuckTouch)( int hitent, pmtrace_t *ptraceresult );
int (*PM_PointContents)( float *p, int *truecontents /*filled in if this is non-null*/ );
@ -196,14 +196,14 @@ typedef struct playermove_s
int (*PM_HullPointContents)( struct hull_s *hull, int num, float *p );
pmtrace_t (*PM_PlayerTrace)( float *start, float *end, int traceFlags, int ignore_pe );
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehulll, int ignore_pe );
long (*RandomLong)( long lLow, long lHigh );
int (*RandomLong)( int lLow, int lHigh );
float (*RandomFloat)( float flLow, float flHigh );
int (*PM_GetModelType)( struct model_s *mod );
void (*PM_GetModelBounds)( struct model_s *mod, float *mins, float *maxs );
void *(*PM_HullForBsp)( physent_t *pe, float *offset );
float (*PM_TraceModel)( physent_t *pEnt, float *start, float *end, trace_t *trace );
int (*COM_FileSize)( char *filename );
byte *(*COM_LoadFile)( char *path, int usehunk, int *pLength );
int (*COM_FileSize)( const char *filename );
byte *(*COM_LoadFile)( const char *path, int usehunk, int *pLength );
void (*COM_FreeFile)( void *buffer );
char *(*memfgets)( byte *pMemFile, int fileSize, int *pFilePos, char *pBuffer, int bufferSize );
@ -218,4 +218,4 @@ typedef struct playermove_s
struct pmtrace_s *(*PM_TraceLineEx)( float *start, float *end, int flags, int usehulll, int (*pfnIgnore)( physent_t *pe ));
struct msurface_s *(*PM_TraceSurface)( int ground, float *vstart, float *vend );
} playermove_t;
#endif//PM_DEFS_H
#endif//PM_DEFS_H

View File

@ -1,32 +0,0 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#ifndef PM_MATERIALS_H
#define PM_MATERIALS_H
#define CBTEXTURENAMEMAX 13 // only load first n chars of name
#define CHAR_TEX_CONCRETE 'C' // texture types
#define CHAR_TEX_METAL 'M'
#define CHAR_TEX_DIRT 'D'
#define CHAR_TEX_VENT 'V'
#define CHAR_TEX_GRATE 'G'
#define CHAR_TEX_TILE 'T'
#define CHAR_TEX_SLOSH 'S'
#define CHAR_TEX_WOOD 'W'
#define CHAR_TEX_COMPUTER 'P'
#define CHAR_TEX_GLASS 'Y'
#define CHAR_TEX_FLESH 'F'
#endif//PM_MATERIALS_H

View File

@ -1,32 +0,0 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#ifndef PM_SHARED_H
#define PM_SHARED_H
void PM_Init( struct playermove_s *ppmove );
void PM_Move( struct playermove_s *ppmove, int server );
char PM_FindTextureType( char *name );
// Spectator Movement modes (stored in pev->iuser1, so the physics code can get at them)
#define OBS_NONE 0
#define OBS_CHASE_LOCKED 1
#define OBS_CHASE_FREE 2
#define OBS_ROAMING 3
#define OBS_IN_EYE 4
#define OBS_MAP_FREE 5
#define OBS_MAP_CHASE 6
#endif//PM_SHARED_H