2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-17 09:07:54 +03:00

Fixed: parameter constraints in meta forwards

This commit is contained in:
Souvik Das 2017-02-15 00:10:58 +05:30
parent 0a62dab196
commit 6a9d611a25
9 changed files with 24 additions and 24 deletions

View File

@ -576,7 +576,7 @@ typedef void(*pfnEngDst_pfnGetScreenFade_t) (struct screenfade_s **);
typedef void(*pfnEngDst_pfnSetScreenFade_t) (struct screenfade_s **); typedef void(*pfnEngDst_pfnSetScreenFade_t) (struct screenfade_s **);
typedef void(*pfnEngDst_VGui_GetPanel_t) (); typedef void(*pfnEngDst_VGui_GetPanel_t) ();
typedef void(*pfnEngDst_VGui_ViewportPaintBackground_t) (int **); typedef void(*pfnEngDst_VGui_ViewportPaintBackground_t) (int **);
typedef void(*pfnEngDst_COM_LoadFile_t) (char **, int *, int **); typedef void(*pfnEngDst_COM_LoadFile_t) (const char **, int *, int **);
typedef void(*pfnEngDst_COM_ParseFile_t) (char **, char **); typedef void(*pfnEngDst_COM_ParseFile_t) (char **, char **);
typedef void(*pfnEngDst_COM_FreeFile_t) (void **); typedef void(*pfnEngDst_COM_FreeFile_t) (void **);
typedef void(*pfnEngDst_IsSpectateOnly_t) (void); typedef void(*pfnEngDst_IsSpectateOnly_t) (void);

View File

@ -1973,7 +1973,7 @@ NOXREF int COM_ExpandFilename(char *filename)
return *filename != 0; return *filename != 0;
} }
int EXT_FUNC COM_FileSize(char *filename) int EXT_FUNC COM_FileSize(const char *filename)
{ {
FileHandle_t fp; FileHandle_t fp;
int iSize; int iSize;
@ -2385,7 +2385,7 @@ void COM_Log(char *pszFile, char *fmt, ...)
} }
} }
unsigned char* EXT_FUNC COM_LoadFileForMe(char *filename, int *pLength) unsigned char* EXT_FUNC COM_LoadFileForMe(const char *filename, int *pLength)
{ {
return COM_LoadFile(filename, 5, pLength); return COM_LoadFile(filename, 5, pLength);
} }

View File

@ -317,7 +317,7 @@ void COM_FixSlashes(char *pname);
void COM_CreatePath(char *path); void COM_CreatePath(char *path);
NOXREF void COM_CopyFile(char *netpath, char *cachepath); NOXREF void COM_CopyFile(char *netpath, char *cachepath);
NOXREF int COM_ExpandFilename(char *filename); NOXREF int COM_ExpandFilename(char *filename);
int COM_FileSize(char *filename); int COM_FileSize(const char *filename);
unsigned char *COM_LoadFile(const char *path, int usehunk, int *pLength); unsigned char *COM_LoadFile(const char *path, int usehunk, int *pLength);
void COM_FreeFile(void *buffer); void COM_FreeFile(void *buffer);
void COM_CopyFileChunk(FileHandle_t dst, FileHandle_t src, int nSize); void COM_CopyFileChunk(FileHandle_t dst, FileHandle_t src, int nSize);
@ -335,7 +335,7 @@ qboolean COM_SetupDirectories(void);
void COM_CheckPrintMap(dheader_t *header, const char *mapname, qboolean bShowOutdated); void COM_CheckPrintMap(dheader_t *header, const char *mapname, qboolean bShowOutdated);
void COM_ListMaps(char *pszSubString); void COM_ListMaps(char *pszSubString);
void COM_Log(char *pszFile, char *fmt, ...); void COM_Log(char *pszFile, char *fmt, ...);
unsigned char *COM_LoadFileForMe(char *filename, int *pLength); unsigned char *COM_LoadFileForMe(const char *filename, int *pLength);
int COM_CompareFileTime(char *filename1, char *filename2, int *iCompare); int COM_CompareFileTime(char *filename1, char *filename2, int *iCompare);
void COM_GetGameDir(char *szGameDir); void COM_GetGameDir(char *szGameDir);
int COM_EntsForPlayerSlots(int nPlayers); int COM_EntsForPlayerSlots(int nPlayers);

View File

@ -993,7 +993,7 @@ int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
return MSG_CurrentBit() - startbit; return MSG_CurrentBit() - startbit;
} }
void EXT_FUNC DELTA_AddEncoder(char *name, void(*conditionalencode)(struct delta_s *, const unsigned char *, const unsigned char *)) void EXT_FUNC DELTA_AddEncoder(const char *name, void(*conditionalencode)(struct delta_s *, const unsigned char *, const unsigned char *))
{ {
delta_encoder_t *p = (delta_encoder_t *)Mem_ZeroMalloc(sizeof(delta_encoder_t)); delta_encoder_t *p = (delta_encoder_t *)Mem_ZeroMalloc(sizeof(delta_encoder_t));
p->name = Mem_Strdup(name); p->name = Mem_Strdup(name);

View File

@ -136,7 +136,7 @@ qboolean DELTA_WriteDeltaForceMask(unsigned char *from, unsigned char *to, qbool
qboolean DELTA_WriteDelta(unsigned char *from, unsigned char *to, qboolean force, delta_t *pFields, void(*callback)(void)); qboolean DELTA_WriteDelta(unsigned char *from, unsigned char *to, qboolean force, delta_t *pFields, void(*callback)(void));
qboolean _DELTA_WriteDelta(unsigned char *from, unsigned char *to, qboolean force, delta_t *pFields, void(*callback)(void), qboolean sendfields); qboolean _DELTA_WriteDelta(unsigned char *from, unsigned char *to, qboolean force, delta_t *pFields, void(*callback)(void), qboolean sendfields);
int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields); int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields);
void DELTA_AddEncoder(char *name, void(*conditionalencode)(struct delta_s *, const unsigned char *, const unsigned char *)); void DELTA_AddEncoder(const char *name, void(*conditionalencode)(struct delta_s *, const unsigned char *, const unsigned char *));
void DELTA_ClearEncoders(void); void DELTA_ClearEncoders(void);
encoder_t DELTA_LookupEncoder(char *name); encoder_t DELTA_LookupEncoder(char *name);
int DELTA_CountLinks(delta_link_t *plinks); int DELTA_CountLinks(delta_link_t *plinks);

View File

@ -816,7 +816,7 @@ qboolean EXT_FUNC ValidCmd(const char *pCmd)
return len && (pCmd[len - 1] == '\n' || pCmd[len - 1] == ';'); return len && (pCmd[len - 1] == '\n' || pCmd[len - 1] == ';');
} }
void EXT_FUNC PF_stuffcmd_I(edict_t *pEdict, char *szFmt, ...) void EXT_FUNC PF_stuffcmd_I(edict_t *pEdict, const char *szFmt, ...)
{ {
int entnum; int entnum;
client_t *old; client_t *old;
@ -850,7 +850,7 @@ void EXT_FUNC PF_stuffcmd_I(edict_t *pEdict, char *szFmt, ...)
} }
} }
void EXT_FUNC PF_localcmd_I(char *str) void EXT_FUNC PF_localcmd_I(const char *str)
{ {
if (ValidCmd(str)) if (ValidCmd(str))
Cbuf_AddText(str); Cbuf_AddText(str);
@ -1457,7 +1457,7 @@ int EXT_FUNC PF_precache_model_I(const char *s)
} }
#ifdef REHLDS_FIXES #ifdef REHLDS_FIXES
int EXT_FUNC PF_precache_generic_I(char *s) int EXT_FUNC PF_precache_generic_I(const char *s)
{ {
if (!s) if (!s)
Host_Error("%s: NULL pointer", __func__); Host_Error("%s: NULL pointer", __func__);
@ -1504,7 +1504,7 @@ int EXT_FUNC PF_precache_generic_I(char *s)
return g_rehlds_sv.precachedGenericResourceCount++; return g_rehlds_sv.precachedGenericResourceCount++;
} }
#else // REHLDS_FIXES #else // REHLDS_FIXES
int EXT_FUNC PF_precache_generic_I(char *s) int EXT_FUNC PF_precache_generic_I(const char *s)
{ {
if (!s) if (!s)
Host_Error("%s: NULL pointer", __func__); Host_Error("%s: NULL pointer", __func__);
@ -1544,7 +1544,7 @@ int EXT_FUNC PF_precache_generic_I(char *s)
} }
#endif // REHLDS_FIXES #endif // REHLDS_FIXES
int EXT_FUNC PF_IsMapValid_I(char *mapname) int EXT_FUNC PF_IsMapValid_I(const char *mapname)
{ {
char cBuf[260]; char cBuf[260];
if (!mapname || Q_strlen(mapname) == 0) if (!mapname || Q_strlen(mapname) == 0)

View File

@ -129,8 +129,8 @@ mnode_t *PVSNode(mnode_t *node, vec_t *emins, vec_t *emaxs);
void PVSMark(model_t *pmodel, unsigned char *ppvs); void PVSMark(model_t *pmodel, unsigned char *ppvs);
edict_t *PVSFindEntities(edict_t *pplayer); edict_t *PVSFindEntities(edict_t *pplayer);
qboolean ValidCmd(const char *pCmd); qboolean ValidCmd(const char *pCmd);
void PF_stuffcmd_I(edict_t *pEdict, char *szFmt, ...); void PF_stuffcmd_I(edict_t *pEdict, const char *szFmt, ...);
void PF_localcmd_I(char *str); void PF_localcmd_I(const char *str);
void PF_localexec_I(void); void PF_localexec_I(void);
edict_t *FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad); edict_t *FindEntityInSphere(edict_t *pEdictStartSearchAfter, const float *org, float rad);
edict_t *PF_Spawn_I(void); edict_t *PF_Spawn_I(void);
@ -150,8 +150,8 @@ void EV_PlayReliableEvent_internal(client_t *cl, int entindex, unsigned short ev
void EV_Playback(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); void EV_Playback(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);
void EV_SV_Playback(int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); void EV_SV_Playback(int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2);
int PF_precache_model_I(const char *s); int PF_precache_model_I(const char *s);
int PF_precache_generic_I(char *s); int PF_precache_generic_I(const char *s);
int PF_IsMapValid_I(char *mapname); int PF_IsMapValid_I(const char *mapname);
int PF_NumberOfEntities_I(void); int PF_NumberOfEntities_I(void);
char *PF_GetInfoKeyBuffer_I(edict_t *e); char *PF_GetInfoKeyBuffer_I(edict_t *e);
char *PF_InfoKeyValue_I(char *infobuffer, const char *key); char *PF_InfoKeyValue_I(char *infobuffer, const char *key);

View File

@ -208,7 +208,7 @@ typedef struct playermove_s
void (*PM_GetModelBounds)( struct model_s *mod, float *mins, float *maxs ); void (*PM_GetModelBounds)( struct model_s *mod, float *mins, float *maxs );
void *(*PM_HullForBsp)( physent_t *pe, float *offset ); void *(*PM_HullForBsp)( physent_t *pe, float *offset );
float (*PM_TraceModel)( physent_t *pEnt, float *start, float *end, trace_t *trace ); float (*PM_TraceModel)( physent_t *pEnt, float *start, float *end, trace_t *trace );
int (*COM_FileSize)(char *filename); int (*COM_FileSize)(const char *filename);
byte *(*COM_LoadFile) (const char *path, int usehunk, int *pLength); byte *(*COM_LoadFile) (const char *path, int usehunk, int *pLength);
void (*COM_FreeFile) ( void *buffer ); void (*COM_FreeFile) ( void *buffer );
char *(*memfgets)( byte *pMemFile, int fileSize, int *pFilePos, char *pBuffer, int bufferSize ); char *(*memfgets)( byte *pMemFile, int fileSize, int *pFilePos, char *pBuffer, int bufferSize );

View File

@ -144,9 +144,9 @@ typedef struct enginefuncs_s
const char *(*pfnTraceTexture) (edict_t *pTextureEntity, const float *v1, const float *v2 ); 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 (*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 (*pfnGetAimVector) (edict_t* ent, float speed, float *rgflReturn);
void (*pfnServerCommand) (char* str); void (*pfnServerCommand) (const char* str);
void (*pfnServerExecute) (void); void (*pfnServerExecute) (void);
void (*pfnClientCommand) (edict_t* pEdict, char* szFmt, ...); void (*pfnClientCommand) (edict_t* pEdict, const char* szFmt, ...);
void (*pfnParticleEffect) (const float *org, const float *dir, float color, float count); void (*pfnParticleEffect) (const float *org, const float *dir, float color, float count);
void (*pfnLightStyle) (int style, char* val); void (*pfnLightStyle) (int style, char* val);
int (*pfnDecalIndex) (const char *name); int (*pfnDecalIndex) (const char *name);
@ -200,7 +200,7 @@ typedef struct enginefuncs_s
void (*pfnSetView) (const edict_t *pClient, const edict_t *pViewent ); void (*pfnSetView) (const edict_t *pClient, const edict_t *pViewent );
float (*pfnTime) ( void ); float (*pfnTime) ( void );
void (*pfnCrosshairAngle) (const edict_t *pClient, float pitch, float yaw); 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 (*pfnFreeFile) (void *buffer);
void (*pfnEndSection) (const char *pszSectionName); // trigger_endsection void (*pfnEndSection) (const char *pszSectionName); // trigger_endsection
int (*pfnCompareFileTime) (char *filename1, char *filename2, int *iCompare); int (*pfnCompareFileTime) (char *filename1, char *filename2, int *iCompare);
@ -215,9 +215,9 @@ typedef struct enginefuncs_s
char* (*pfnInfoKeyValue) (char *infobuffer, const char *key); char* (*pfnInfoKeyValue) (char *infobuffer, const char *key);
void (*pfnSetKeyValue) (char *infobuffer, const char *key, const char *value); void (*pfnSetKeyValue) (char *infobuffer, const char *key, const char *value);
void (*pfnSetClientKeyValue) (int clientIndex, char *infobuffer, const char *key, const char *value); void (*pfnSetClientKeyValue) (int clientIndex, char *infobuffer, const char *key, const char *value);
int (*pfnIsMapValid) (char *filename); int (*pfnIsMapValid) (const char *filename);
void (*pfnStaticDecal) ( const float *origin, int decalIndex, int entityIndex, int modelIndex ); 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 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); 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? int (*pfnIsDedicatedServer) (void);// is this a dedicated server?
@ -239,7 +239,7 @@ typedef struct enginefuncs_s
void (*pfnDeltaSetField) ( struct delta_s *pFields, const char *fieldname ); void (*pfnDeltaSetField) ( struct delta_s *pFields, const char *fieldname );
void (*pfnDeltaUnsetField) ( struct delta_s *pFields, const char *fieldname ); void (*pfnDeltaUnsetField) ( struct delta_s *pFields, const char *fieldname );
void (*pfnDeltaAddEncoder) ( char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); void (*pfnDeltaAddEncoder) ( const char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) );
int (*pfnGetCurrentPlayer) ( void ); int (*pfnGetCurrentPlayer) ( void );
int (*pfnCanSkipPlayer) ( const edict_t *player ); int (*pfnCanSkipPlayer) ( const edict_t *player );
int (*pfnDeltaFindField) ( struct delta_s *pFields, const char *fieldname ); int (*pfnDeltaFindField) ( struct delta_s *pFields, const char *fieldname );
@ -274,7 +274,7 @@ typedef struct enginefuncs_s
sentenceEntry_s* (*pfnSequencePickSentence) ( const char* groupName, int pickMethod, int *picked ); sentenceEntry_s* (*pfnSequencePickSentence) ( const char* groupName, int pickMethod, int *picked );
// LH: Give access to filesize via filesystem // LH: Give access to filesize via filesystem
int (*pfnGetFileSize) ( char *filename ); int (*pfnGetFileSize) ( const char *filename );
unsigned int (*pfnGetApproxWavePlayLen) (const char *filepath); unsigned int (*pfnGetApproxWavePlayLen) (const char *filepath);
// MDC: Added for CZ career-mode // MDC: Added for CZ career-mode