2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

[NEED TESTS AND REVIEWS] Reworked EXT_FUNC usage (#513)

* Added missed EXT_FUNC for engfuncs and pm
* Added missed EXT_FUNC for exposed interfaces
* Added missed EXT_FUNC for ReHLDS API interfaces
* Added EXT_FUNC to export macros (added missed EXT_FUNC to exported functions like CreateInterface, F and NET_Sleep_Timeout)
This commit is contained in:
Artem Golubikhin 2017-08-04 23:57:36 +03:00 committed by Lev
parent b1f93cb321
commit 5bd5e891d1
29 changed files with 443 additions and 439 deletions

View File

@ -46,15 +46,15 @@ public:
BSPModel() {}
virtual ~BSPModel() {}
void Init(IBaseSystem *system);
void Clear();
bool Load(const char *name, bool minimal);
bool IsValid();
bool IsMinimal();
void SetPVS(vec_t *point);
bool InPVS(vec_t *point);
bool TraceLine(vec_t *start, vec_t *end, vec_t *impact);
int TruePointContents(vec_t *point);
EXT_FUNC void Init(IBaseSystem *system);
EXT_FUNC void Clear();
EXT_FUNC bool Load(const char *name, bool minimal);
EXT_FUNC bool IsValid();
EXT_FUNC bool IsMinimal();
EXT_FUNC void SetPVS(vec_t *point);
EXT_FUNC bool InPVS(vec_t *point);
EXT_FUNC bool TraceLine(vec_t *start, vec_t *end, vec_t *impact);
EXT_FUNC int TruePointContents(vec_t *point);
private:
void LoadTextures(lump_t *l);

View File

@ -38,21 +38,21 @@ public:
NetSocket() : m_netSplitSequenceNumber(0) {}
virtual ~NetSocket() {}
NetPacket *ReceivePacket();
void FreePacket(NetPacket *packet);
bool SendPacket(NetPacket *packet);
bool SendPacket(NetAddress *packet, const void *data, int length);
void AddPacket(NetPacket *packet);
bool AddChannel(INetChannel *channel);
bool RemoveChannel(INetChannel *channel);
INetwork *GetNetwork();
void OutOfBandPrintf(NetAddress *to, const char *format, ...);
void Flush();
void GetFlowStats(float *avgInKBSec, float *avgOutKBSec);
bool LeaveGroup(NetAddress *group);
bool JoinGroup(NetAddress *group);
void Close();
int GetPort();
EXT_FUNC NetPacket *ReceivePacket();
EXT_FUNC void FreePacket(NetPacket *packet);
EXT_FUNC bool SendPacket(NetPacket *packet);
EXT_FUNC bool SendPacket(NetAddress *packet, const void *data, int length);
EXT_FUNC void AddPacket(NetPacket *packet);
EXT_FUNC bool AddChannel(INetChannel *channel);
EXT_FUNC bool RemoveChannel(INetChannel *channel);
EXT_FUNC INetwork *GetNetwork();
EXT_FUNC void OutOfBandPrintf(NetAddress *to, const char *format, ...);
EXT_FUNC void Flush();
EXT_FUNC void GetFlowStats(float *avgInKBSec, float *avgOutKBSec);
EXT_FUNC bool LeaveGroup(NetAddress *group);
EXT_FUNC bool JoinGroup(NetAddress *group);
EXT_FUNC void Close();
EXT_FUNC int GetPort();
bool Create(Network *network, int port, bool reuse, bool loopback);
void UpdateStats(double time);

View File

@ -85,28 +85,28 @@ public:
Network();
virtual ~Network() {}
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
void ExecuteCommand(int commandID, char *commandLine);
void RegisterListener(ISystemModule *module);
void RemoveListener(ISystemModule *module);
IBaseSystem *GetSystem();
int GetSerial();
char *GetStatusLine();
char *GetType();
char *GetName();
int GetState();
int GetVersion();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC void RegisterListener(ISystemModule *module);
EXT_FUNC void RemoveListener(ISystemModule *module);
EXT_FUNC IBaseSystem *GetSystem();
EXT_FUNC int GetSerial();
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC char *GetName();
EXT_FUNC int GetState();
EXT_FUNC int GetVersion();
EXT_FUNC void ShutDown();
INetSocket *CreateSocket(int port, bool reuse, bool loopback);
bool RemoveSocket(INetSocket *netsocket);
NetAddress *GetLocalAddress();
bool ResolveAddress(char *string, NetAddress *address);
void GetFlowStats(float *totalIn, float *totalOut);
int GetLastErrorCode();
char *GetErrorText(int code);
EXT_FUNC INetSocket *CreateSocket(int port, bool reuse, bool loopback);
EXT_FUNC bool RemoveSocket(INetSocket *netsocket);
EXT_FUNC NetAddress *GetLocalAddress();
EXT_FUNC bool ResolveAddress(char *string, NetAddress *address);
EXT_FUNC void GetFlowStats(float *totalIn, float *totalOut);
EXT_FUNC int GetLastErrorCode();
EXT_FUNC char *GetErrorText(int code);
protected:
enum LocalCommandIDs { CMD_ID_FAKELOSS = 1 };

View File

@ -63,58 +63,58 @@ public:
Server() {}
virtual ~Server() {}
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
void ExecuteCommand(int commandID, char *commandLine);
void RegisterListener(ISystemModule *module);
void RemoveListener(ISystemModule *module);
IBaseSystem *GetSystem();
int GetSerial();
char *GetStatusLine();
char *GetType();
char *GetName();
int GetState();
int GetVersion();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC void RegisterListener(ISystemModule *module);
EXT_FUNC void RemoveListener(ISystemModule *module);
EXT_FUNC IBaseSystem *GetSystem();
EXT_FUNC int GetSerial();
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC char *GetName();
EXT_FUNC int GetState();
EXT_FUNC int GetVersion();
EXT_FUNC void ShutDown();
bool Connect(IWorld *world, NetAddress *address, INetSocket *socket);
bool LoadDemo(IWorld *world, char *filename, bool forceHLTV, bool continuous);
void Reconnect();
void Disconnect();
void Retry();
void StopRetry();
void SendStringCommand(char *command);
void SendHLTVCommand(BitBuffer *msg);
void SetPlayerName(char *newName);
void SetProxy(IProxy *proxy);
void SetDirector(IDirector *director);
void SetDelayReconnect(bool state);
void SetAutoRetry(bool state);
void SetVoiceBlocking(bool state);
void SetRate(int rate);
void SetUpdateRate(int updaterate);
void SetUserInfo(char *key, char *value);
bool SetProtocol(int version);
void SetGameDirectory(const char *defaultDir, const char *gameDir);
bool IsConnected();
bool IsDemoFile();
bool IsGameServer();
bool IsRelayProxy();
bool IsVoiceBlocking();
int GetRate();
int GetUpdateRate();
char *GetPlayerName();
InfoString *GetServerInfoString();
EXT_FUNC bool Connect(IWorld *world, NetAddress *address, INetSocket *socket);
EXT_FUNC bool LoadDemo(IWorld *world, char *filename, bool forceHLTV, bool continuous);
EXT_FUNC void Reconnect();
EXT_FUNC void Disconnect();
EXT_FUNC void Retry();
EXT_FUNC void StopRetry();
EXT_FUNC void SendStringCommand(char *command);
EXT_FUNC void SendHLTVCommand(BitBuffer *msg);
EXT_FUNC void SetPlayerName(char *newName);
EXT_FUNC void SetProxy(IProxy *proxy);
EXT_FUNC void SetDirector(IDirector *director);
EXT_FUNC void SetDelayReconnect(bool state);
EXT_FUNC void SetAutoRetry(bool state);
EXT_FUNC void SetVoiceBlocking(bool state);
EXT_FUNC void SetRate(int rate);
EXT_FUNC void SetUpdateRate(int updaterate);
EXT_FUNC void SetUserInfo(char *key, char *value);
EXT_FUNC bool SetProtocol(int version);
EXT_FUNC void SetGameDirectory(const char *defaultDir, const char *gameDir);
EXT_FUNC bool IsConnected();
EXT_FUNC bool IsDemoFile();
EXT_FUNC bool IsGameServer();
EXT_FUNC bool IsRelayProxy();
EXT_FUNC bool IsVoiceBlocking();
EXT_FUNC int GetRate();
EXT_FUNC int GetUpdateRate();
EXT_FUNC char *GetPlayerName();
EXT_FUNC InfoString *GetServerInfoString();
float GetTime();
IWorld *GetWorld();
char *GetDemoFileName();
NetAddress *GetAddress();
bool GetAutoRetry();
char *GetHostName();
float GetPacketLoss();
int GetProtocol();
EXT_FUNC float GetTime();
EXT_FUNC IWorld *GetWorld();
EXT_FUNC char *GetDemoFileName();
EXT_FUNC NetAddress *GetAddress();
EXT_FUNC bool GetAutoRetry();
EXT_FUNC char *GetHostName();
EXT_FUNC float GetPacketLoss();
EXT_FUNC int GetProtocol();
private:
public:

View File

@ -44,98 +44,98 @@ public:
World() {}
virtual ~World() {}
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
void ExecuteCommand(int commandID, char *commandLine);
void RegisterListener(ISystemModule *module);
void RemoveListener(ISystemModule *module);
IBaseSystem *GetSystem();
int GetSerial();
char *GetStatusLine();
char *GetType();
char *GetName();
int GetState();
int GetVersion();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC void RegisterListener(ISystemModule *module);
EXT_FUNC void RemoveListener(ISystemModule *module);
EXT_FUNC IBaseSystem *GetSystem();
EXT_FUNC int GetSerial();
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC char *GetName();
EXT_FUNC int GetState();
EXT_FUNC int GetVersion();
EXT_FUNC void ShutDown();
double GetTime();
NetAddress *GetGameServerAddress();
char *GetLevelName();
char *GetGameDir();
frame_t *GetFrameByTime(double time);
frame_t *GetFrameBySeqNr(unsigned int seqnr);
frame_t *GetLastFrame();
frame_t *GetFirstFrame();
int GetServerCount();
int GetSlotNumber();
int GetMaxClients();
int GetNumPlayers();
IBSPModel *GetWorldModel();
InfoString *GetServerInfoString();
bool GetPlayerInfoString(int playerNum, InfoString *infoString);
UserMsg *GetUserMsg(int msgNumber);
char *GetHostName();
serverinfo_t *GetServerInfo();
EXT_FUNC double GetTime();
EXT_FUNC NetAddress *GetGameServerAddress();
EXT_FUNC char *GetLevelName();
EXT_FUNC char *GetGameDir();
EXT_FUNC frame_t *GetFrameByTime(double time);
EXT_FUNC frame_t *GetFrameBySeqNr(unsigned int seqnr);
EXT_FUNC frame_t *GetLastFrame();
EXT_FUNC frame_t *GetFirstFrame();
EXT_FUNC int GetServerCount();
EXT_FUNC int GetSlotNumber();
EXT_FUNC int GetMaxClients();
EXT_FUNC int GetNumPlayers();
EXT_FUNC IBSPModel *GetWorldModel();
EXT_FUNC InfoString *GetServerInfoString();
EXT_FUNC bool GetPlayerInfoString(int playerNum, InfoString *infoString);
EXT_FUNC UserMsg *GetUserMsg(int msgNumber);
EXT_FUNC char *GetHostName();
EXT_FUNC serverinfo_t *GetServerInfo();
bool IsPlayerIndex(int index);
bool IsVoiceEnabled();
bool IsActive();
bool IsPaused();
bool IsComplete();
bool IsHLTV();
void Reset();
EXT_FUNC bool IsPlayerIndex(int index);
EXT_FUNC bool IsVoiceEnabled();
EXT_FUNC bool IsActive();
EXT_FUNC bool IsPaused();
EXT_FUNC bool IsComplete();
EXT_FUNC bool IsHLTV();
EXT_FUNC void Reset();
void SetServerInfo(int protocol, CRC32_t nserverCRC, unsigned char *nclientdllmd5, int nmaxclients, int nplayernum, int ngametype, char *ngamedir, char *nservername, char *nlevelname);
void SetServerInfoString(char *infostring);
void SetServerInfo(serverinfo_t *serverinfo);
EXT_FUNC void SetServerInfo(int protocol, CRC32_t nserverCRC, unsigned char *nclientdllmd5, int nmaxclients, int nplayernum, int ngametype, char *ngamedir, char *nservername, char *nlevelname);
EXT_FUNC void SetServerInfoString(char *infostring);
EXT_FUNC void SetServerInfo(serverinfo_t *serverinfo);
void UpdateServerInfo();
void SetPaused(bool state);
void SetTime(double newTime);
void SetBufferSize(float seconds);
void SetVoiceEnabled(bool state);
void SetMoveVars(movevars_t *nmovevars);
void SetCDInfo(int ncdtrack, int nlooptrack);
void SetHLTV(bool state);
void SetExtraInfo(char *nclientfallback, int nallowCheats);
void SetViewEntity(int nviewentity);
void SetGameServerAddress(NetAddress *address);
void SetHostName(char *name);
void NewGame(int newServerCount);
void FinishGame();
bool SaveAsDemo(char *filename, IDirector *director);
void StopGame();
int FindUserMsgByName(char *name);
void ParseDeltaDescription(BitBuffer *stream);
void ParseBaseline(BitBuffer *stream);
void ParseEvent(BitBuffer *stream);
void ParseClientData(BitBuffer *stream, unsigned int deltaSeqNr, BitBuffer *to, clientdata_t *clientData);
bool GetUncompressedFrame(unsigned int seqNr, frame_t *frame);
bool UncompressEntitiesFromStream(frame_t *frame, BitBuffer *stream);
bool UncompressEntitiesFromStream(frame_t *frame, BitBuffer *stream, unsigned int from);
bool GetClientData(unsigned int SeqNr, clientdata_t *clientData);
bool GetClientData(frame_t *frame, clientdata_t *clientData);
int AddFrame(frame_t *newFrame);
bool AddResource(resource_t *resource);
void AddLightStyle(int index, char *style);
bool AddSignonData(unsigned char type, unsigned char *data, int size);
bool AddUserMessage(int msgNumber, int size, char *name);
void AddBaselineEntity(int index, entity_state_t *ent);
void AddInstancedBaselineEntity(int index, entity_state_t *ent);
void UpdatePlayer(int playerNum, int userId, char *infostring, char *hashedcdkey);
EXT_FUNC void UpdateServerInfo();
EXT_FUNC void SetPaused(bool state);
EXT_FUNC void SetTime(double newTime);
EXT_FUNC void SetBufferSize(float seconds);
EXT_FUNC void SetVoiceEnabled(bool state);
EXT_FUNC void SetMoveVars(movevars_t *nmovevars);
EXT_FUNC void SetCDInfo(int ncdtrack, int nlooptrack);
EXT_FUNC void SetHLTV(bool state);
EXT_FUNC void SetExtraInfo(char *nclientfallback, int nallowCheats);
EXT_FUNC void SetViewEntity(int nviewentity);
EXT_FUNC void SetGameServerAddress(NetAddress *address);
EXT_FUNC void SetHostName(char *name);
EXT_FUNC void NewGame(int newServerCount);
EXT_FUNC void FinishGame();
EXT_FUNC bool SaveAsDemo(char *filename, IDirector *director);
EXT_FUNC void StopGame();
EXT_FUNC int FindUserMsgByName(char *name);
EXT_FUNC void ParseDeltaDescription(BitBuffer *stream);
EXT_FUNC void ParseBaseline(BitBuffer *stream);
EXT_FUNC void ParseEvent(BitBuffer *stream);
EXT_FUNC void ParseClientData(BitBuffer *stream, unsigned int deltaSeqNr, BitBuffer *to, clientdata_t *clientData);
EXT_FUNC bool GetUncompressedFrame(unsigned int seqNr, frame_t *frame);
EXT_FUNC bool UncompressEntitiesFromStream(frame_t *frame, BitBuffer *stream);
EXT_FUNC bool UncompressEntitiesFromStream(frame_t *frame, BitBuffer *stream, unsigned int from);
EXT_FUNC bool GetClientData(unsigned int SeqNr, clientdata_t *clientData);
EXT_FUNC bool GetClientData(frame_t *frame, clientdata_t *clientData);
EXT_FUNC int AddFrame(frame_t *newFrame);
EXT_FUNC bool AddResource(resource_t *resource);
EXT_FUNC void AddLightStyle(int index, char *style);
EXT_FUNC bool AddSignonData(unsigned char type, unsigned char *data, int size);
EXT_FUNC bool AddUserMessage(int msgNumber, int size, char *name);
EXT_FUNC void AddBaselineEntity(int index, entity_state_t *ent);
EXT_FUNC void AddInstancedBaselineEntity(int index, entity_state_t *ent);
EXT_FUNC void UpdatePlayer(int playerNum, int userId, char *infostring, char *hashedcdkey);
void WriteFrame(frame_t *frame, unsigned int lastFrameSeqnr, BitBuffer *reliableStream, BitBuffer *unreliableStream, unsigned int deltaSeqNr, unsigned int clientDelta, bool addVoice);
void WriteNewData(BitBuffer *stream);
void WriteClientUpdate(BitBuffer *stream, int playerIndex);
void WriteMovevars(BitBuffer *stream);
void WriteSigonData(BitBuffer *stream);
void WriteLightStyles(BitBuffer *stream);
EXT_FUNC void WriteFrame(frame_t *frame, unsigned int lastFrameSeqnr, BitBuffer *reliableStream, BitBuffer *unreliableStream, unsigned int deltaSeqNr, unsigned int clientDelta, bool addVoice);
EXT_FUNC void WriteNewData(BitBuffer *stream);
EXT_FUNC void WriteClientUpdate(BitBuffer *stream, int playerIndex);
EXT_FUNC void WriteMovevars(BitBuffer *stream);
EXT_FUNC void WriteSigonData(BitBuffer *stream);
EXT_FUNC void WriteLightStyles(BitBuffer *stream);
int RemoveFrames(unsigned int startSeqNr, unsigned int endSeqNr);
int DuplicateFrames(unsigned int startSeqNr, unsigned int endSeqNr);
int MoveFrames(unsigned int startSeqNr, unsigned int endSeqNr, double destSeqnr);
int RevertFrames(unsigned int startSeqNr, unsigned int endSeqNr);
EXT_FUNC int RemoveFrames(unsigned int startSeqNr, unsigned int endSeqNr);
EXT_FUNC int DuplicateFrames(unsigned int startSeqNr, unsigned int endSeqNr);
EXT_FUNC int MoveFrames(unsigned int startSeqNr, unsigned int endSeqNr, double destSeqnr);
EXT_FUNC int RevertFrames(unsigned int startSeqNr, unsigned int endSeqNr);
private:
int CompressFrame(frame_t *from, BitBuffer *stream);

View File

@ -50,54 +50,54 @@ public:
DemoPlayer();
virtual ~DemoPlayer() {}
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
void ExecuteCommand(int commandID, char *commandLine);
void RegisterListener(ISystemModule *module);
void RemoveListener(ISystemModule *module);
IBaseSystem *GetSystem();
int GetSerial();
char *GetStatusLine();
char *GetType();
char *GetName();
int GetState();
int GetVersion();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC void RegisterListener(ISystemModule *module);
EXT_FUNC void RemoveListener(ISystemModule *module);
EXT_FUNC IBaseSystem *GetSystem();
EXT_FUNC int GetSerial();
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC char *GetName();
EXT_FUNC int GetState();
EXT_FUNC int GetVersion();
EXT_FUNC void ShutDown();
void NewGame(IWorld *world, IProxy *proxy = nullptr);
char *GetModName();
void WriteCommands(BitBuffer *stream, float startTime, float endTime);
int AddCommand(DirectorCmd *cmd);
bool RemoveCommand(int index);
DirectorCmd *GetLastCommand();
IObjectContainer *GetCommands();
EXT_FUNC void NewGame(IWorld *world, IProxy *proxy = nullptr);
EXT_FUNC char *GetModName();
EXT_FUNC void WriteCommands(BitBuffer *stream, float startTime, float endTime);
EXT_FUNC int AddCommand(DirectorCmd *cmd);
EXT_FUNC bool RemoveCommand(int index);
EXT_FUNC DirectorCmd *GetLastCommand();
EXT_FUNC IObjectContainer *GetCommands();
IDirector *GetDirector();
void SetWorldTime(double time, bool relative);
void SetTimeScale(float scale);
void SetPaused(bool state);
void SetEditMode(bool state);
void SetMasterMode(bool state);
bool IsPaused();
bool IsLoading();
bool IsActive();
bool IsEditMode();
bool IsMasterMode();
void RemoveFrames(double starttime, double endtime);
void ExecuteDirectorCmd(DirectorCmd *cmd);
double GetWorldTime();
double GetStartTime();
double GetEndTime();
float GetTimeScale();
IWorld *GetWorld();
char *GetFileName();
bool SaveGame(char *filename);
bool LoadGame(char *filename);
void Stop();
void ForceHLTV(bool state);
void GetDemoViewInfo(ref_params_t *rp, float *view, int *viewmodel);
int ReadDemoMessage(unsigned char *buffer, int size);
void ReadNetchanState(int *incoming_sequence, int *incoming_acknowledged, int *incoming_reliable_acknowledged, int *incoming_reliable_sequence, int *outgoing_sequence, int *reliable_sequence, int *last_reliable_sequence);
EXT_FUNC void SetWorldTime(double time, bool relative);
EXT_FUNC void SetTimeScale(float scale);
EXT_FUNC void SetPaused(bool state);
EXT_FUNC void SetEditMode(bool state);
EXT_FUNC void SetMasterMode(bool state);
EXT_FUNC bool IsPaused();
EXT_FUNC bool IsLoading();
EXT_FUNC bool IsActive();
EXT_FUNC bool IsEditMode();
EXT_FUNC bool IsMasterMode();
EXT_FUNC void RemoveFrames(double starttime, double endtime);
EXT_FUNC void ExecuteDirectorCmd(DirectorCmd *cmd);
EXT_FUNC double GetWorldTime();
EXT_FUNC double GetStartTime();
EXT_FUNC double GetEndTime();
EXT_FUNC float GetTimeScale();
EXT_FUNC IWorld *GetWorld();
EXT_FUNC char *GetFileName();
EXT_FUNC bool SaveGame(char *filename);
EXT_FUNC bool LoadGame(char *filename);
EXT_FUNC void Stop();
EXT_FUNC void ForceHLTV(bool state);
EXT_FUNC void GetDemoViewInfo(ref_params_t *rp, float *view, int *viewmodel);
EXT_FUNC int ReadDemoMessage(unsigned char *buffer, int size);
EXT_FUNC void ReadNetchanState(int *incoming_sequence, int *incoming_acknowledged, int *incoming_reliable_acknowledged, int *incoming_reliable_sequence, int *outgoing_sequence, int *reliable_sequence, int *last_reliable_sequence);
void SetName(char *newName);
private:

View File

@ -40,21 +40,21 @@ public:
Director() {}
virtual ~Director() {}
virtual bool Init(IBaseSystem *system, int serial, char *name);
virtual void RunFrame(double time);
virtual void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
virtual void ExecuteCommand(int commandID, char *commandLine);
virtual char *GetStatusLine();
virtual char *GetType();
virtual void ShutDown();
EXT_FUNC virtual bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC virtual void RunFrame(double time);
EXT_FUNC virtual void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC virtual void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC virtual char *GetStatusLine();
EXT_FUNC virtual char *GetType();
EXT_FUNC virtual void ShutDown();
virtual void NewGame(IWorld *world, IProxy *proxy);
virtual char *GetModName();
virtual void WriteCommands(BitBuffer *stream, float startTime, float endTime);
virtual int AddCommand(DirectorCmd *cmd);
virtual bool RemoveCommand(int index);
virtual DirectorCmd *GetLastCommand();
virtual IObjectContainer *GetCommands();
EXT_FUNC virtual void NewGame(IWorld *world, IProxy *proxy);
EXT_FUNC virtual char *GetModName();
EXT_FUNC virtual void WriteCommands(BitBuffer *stream, float startTime, float endTime);
EXT_FUNC virtual int AddCommand(DirectorCmd *cmd);
EXT_FUNC virtual bool RemoveCommand(int index);
EXT_FUNC virtual DirectorCmd *GetLastCommand();
EXT_FUNC virtual IObjectContainer *GetCommands();
typedef struct playerData_s {
vec3_t origin;

View File

@ -72,55 +72,55 @@ public:
Proxy() {}
virtual ~Proxy() {}
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
void ExecuteCommand(int commandID, char *commandLine);
char *GetStatusLine();
char *GetType();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC void ShutDown();
void Reset();
void Broadcast(byte *data, int length, int groupType, bool isReliable);
void IncreaseCheering(int votes);
void ChatCommentator(char *nick, char *text);
void ChatSpectator(char *nick, char *text);
void CountLocalClients(int &spectators, int &proxies);
void ParseStatusMsg(BitBuffer *stream);
void ParseStatusReport(NetAddress *from, BitBuffer *stream);
bool ProcessConnectionlessMessage(NetAddress *from, BitBuffer *stream);
resource_t *AddResource(char *fileName, resourcetype_t type, char *asFileName = nullptr);
bool IsMaster();
bool IsLanOnly();
bool IsActive();
bool IsPublicGame();
bool IsPasswordProtected();
bool IsStressed();
void SetDelay(float seconds);
void SetClientTime(double time, bool relative);
void SetClientTimeScale(float scale);
void SetMaxRate(int rate);
void SetMaxLoss(float maxloss);
void SetMaxUpdateRate(int updaterate);
bool SetMaxClients(int number);
void SetRegion(unsigned char region);
float GetDelay();
double GetSpectatorTime();
double GetProxyTime();
IObjectContainer *GetClients();
IWorld *GetWorld();
IServer *GetServer();
IDirector *GetDirector();
INetSocket *GetSocket();
ChatMode_e GetChatMode();
void GetStatistics(int &proxies, int &slots, int &spectators);
int GetMaxRate();
int GetMaxClients();
int GetMaxUpdateRate();
resource_t *GetResource(char *fileName);
int GetDispatchMode();
unsigned char GetRegion();
bool WriteSignonData(int type, BitBuffer *stream);
EXT_FUNC void Reset();
EXT_FUNC void Broadcast(byte *data, int length, int groupType, bool isReliable);
EXT_FUNC void IncreaseCheering(int votes);
EXT_FUNC void ChatCommentator(char *nick, char *text);
EXT_FUNC void ChatSpectator(char *nick, char *text);
EXT_FUNC void CountLocalClients(int &spectators, int &proxies);
EXT_FUNC void ParseStatusMsg(BitBuffer *stream);
EXT_FUNC void ParseStatusReport(NetAddress *from, BitBuffer *stream);
EXT_FUNC bool ProcessConnectionlessMessage(NetAddress *from, BitBuffer *stream);
EXT_FUNC resource_t *AddResource(char *fileName, resourcetype_t type, char *asFileName = nullptr);
EXT_FUNC bool IsMaster();
EXT_FUNC bool IsLanOnly();
EXT_FUNC bool IsActive();
EXT_FUNC bool IsPublicGame();
EXT_FUNC bool IsPasswordProtected();
EXT_FUNC bool IsStressed();
EXT_FUNC void SetDelay(float seconds);
EXT_FUNC void SetClientTime(double time, bool relative);
EXT_FUNC void SetClientTimeScale(float scale);
EXT_FUNC void SetMaxRate(int rate);
EXT_FUNC void SetMaxLoss(float maxloss);
EXT_FUNC void SetMaxUpdateRate(int updaterate);
EXT_FUNC bool SetMaxClients(int number);
EXT_FUNC void SetRegion(unsigned char region);
EXT_FUNC float GetDelay();
EXT_FUNC double GetSpectatorTime();
EXT_FUNC double GetProxyTime();
EXT_FUNC IObjectContainer *GetClients();
EXT_FUNC IWorld *GetWorld();
EXT_FUNC IServer *GetServer();
EXT_FUNC IDirector *GetDirector();
EXT_FUNC INetSocket *GetSocket();
EXT_FUNC ChatMode_e GetChatMode();
EXT_FUNC void GetStatistics(int &proxies, int &slots, int &spectators);
EXT_FUNC int GetMaxRate();
EXT_FUNC int GetMaxClients();
EXT_FUNC int GetMaxUpdateRate();
EXT_FUNC resource_t *GetResource(char *fileName);
EXT_FUNC int GetDispatchMode();
EXT_FUNC unsigned char GetRegion();
EXT_FUNC bool WriteSignonData(int type, BitBuffer *stream);
void ReconnectClients();
void ExecuteRcon(NetAddress *from, char *command);

View File

@ -104,7 +104,7 @@ float fran1()
return temp;
}
float RandomFloat(float flLow, float flHigh)
float EXT_FUNC RandomFloat(float flLow, float flHigh)
{
SeedRandomNumberGenerator();
@ -114,7 +114,7 @@ float RandomFloat(float flLow, float flHigh)
#define MAX_RANDOM_RANGE 0x7FFFFFFFUL
int RandomLong(int lLow, int lHigh)
int EXT_FUNC RandomLong(int lLow, int lHigh)
{
SeedRandomNumberGenerator();

View File

@ -39,17 +39,17 @@ public:
BaseSystemModule();
virtual ~BaseSystemModule() {}
virtual bool Init(IBaseSystem *system, int serial, char *name);
virtual void RunFrame(double time);
virtual void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
virtual void ExecuteCommand(int commandID, char *commandLine);
virtual void RegisterListener(ISystemModule *module);
virtual void RemoveListener(ISystemModule *module);
virtual IBaseSystem *GetSystem();
virtual int GetSerial();
virtual char *GetStatusLine();
virtual char *GetType();
virtual char *GetName();
EXT_FUNC virtual bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC virtual void RunFrame(double time);
EXT_FUNC virtual void ReceiveSignal(ISystemModule *module, unsigned int signal, void *data);
EXT_FUNC virtual void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC virtual void RegisterListener(ISystemModule *module);
EXT_FUNC virtual void RemoveListener(ISystemModule *module);
EXT_FUNC virtual IBaseSystem *GetSystem();
EXT_FUNC virtual int GetSerial();
EXT_FUNC virtual char *GetStatusLine();
EXT_FUNC virtual char *GetType();
EXT_FUNC virtual char *GetName();
enum ModuleState {
MODULE_UNDEFINED = 0,
@ -59,10 +59,10 @@ public:
MODULE_DISCONNECTED
};
virtual int GetState();
virtual int GetVersion();
virtual void ShutDown();
virtual char *GetBaseDir() { return ""; }
EXT_FUNC virtual int GetState();
EXT_FUNC virtual int GetVersion();
EXT_FUNC virtual void ShutDown();
EXT_FUNC virtual char *GetBaseDir() { return ""; }
void FireSignal(unsigned int signal, void *data = nullptr);
protected:

View File

@ -32,24 +32,24 @@
class ObjectList: public IObjectContainer {
public:
void Init();
bool Add(void *newObject);
void *GetFirst();
void *GetNext();
EXT_FUNC void Init();
EXT_FUNC bool Add(void *newObject);
EXT_FUNC void *GetFirst();
EXT_FUNC void *GetNext();
ObjectList();
virtual ~ObjectList();
void Clear(bool freeElementsMemory = false);
int CountElements();
EXT_FUNC void Clear(bool freeElementsMemory = false);
EXT_FUNC int CountElements();
void *RemoveTail();
void *RemoveHead();
bool AddTail(void *newObject);
bool AddHead(void *newObject);
bool Remove(void *object);
bool Contains(void *object);
bool IsEmpty();
EXT_FUNC bool Remove(void *object);
EXT_FUNC bool Contains(void *object);
EXT_FUNC bool IsEmpty();
typedef struct element_s {
struct element_s *prev; // pointer to the last element or NULL

View File

@ -36,7 +36,7 @@ extern "C"
#if defined ( _WIN32 )
#ifdef STEAM_EXPORTS
#define STEAM_API __declspec(dllexport)
#define STEAM_API __declspec(dllexport) EXT_FUNC
#else
#define STEAM_API __declspec(dllimport)
#endif
@ -45,7 +45,11 @@ extern "C"
#else
#ifdef STEAM_EXPORTS
#define STEAM_API EXT_FUNC
#else
#define STEAM_API /* */
#endif
#define STEAM_CALL /* */
#endif

View File

@ -30,7 +30,7 @@
class CDedicatedExports: public IDedicatedExports {
public:
void Sys_Printf(char *text);
EXT_FUNC void Sys_Printf(char *text);
};
EXPOSE_SINGLE_INTERFACE(CDedicatedExports, IDedicatedExports, VENGINE_DEDICATEDEXPORTS_API_VERSION);

View File

@ -54,9 +54,9 @@ CBaseEntity
#ifndef CBASE_DLLEXPORT
#ifdef _WIN32
#define CBASE_DLLEXPORT _declspec( dllexport )
#define CBASE_DLLEXPORT _declspec( dllexport ) EXT_FUNC
#else
#define CBASE_DLLEXPORT __attribute__ ((visibility("default")))
#define CBASE_DLLEXPORT __attribute__ ((visibility("default"))) EXT_FUNC
#endif
#endif

View File

@ -85,9 +85,9 @@ typedef int BOOL;
#ifndef UTIL_DLLEXPORT
#ifdef _WIN32
#define UTIL_DLLEXPORT _declspec( dllexport )
#define UTIL_DLLEXPORT _declspec( dllexport ) EXT_FUNC
#else
#define UTIL_DLLEXPORT __attribute__ ((visibility("default")))
#define UTIL_DLLEXPORT __attribute__ ((visibility("default"))) EXT_FUNC
#endif
#endif

View File

@ -73,39 +73,39 @@ public:
class Panel;
class SystemWrapper: public IBaseSystem, public BaseSystemModule {
public:
bool Init(IBaseSystem *system, int serial, char *name);
void RunFrame(double time);
void ExecuteCommand(int commandID, char *commandLine);
char *GetStatusLine();
char *GetType();
void ShutDown();
EXT_FUNC bool Init(IBaseSystem *system, int serial, char *name);
EXT_FUNC void RunFrame(double time);
EXT_FUNC void ExecuteCommand(int commandID, char *commandLine);
EXT_FUNC char *GetStatusLine();
EXT_FUNC char *GetType();
EXT_FUNC void ShutDown();
double GetTime();
unsigned int GetTick();
void SetFPS(float fps) {}
void Printf(char *fmt, ...);
void DPrintf(char *fmt, ...);
void RedirectOutput(char *buffer, int maxSize);
IFileSystem *GetFileSystem();
unsigned char *LoadFile(const char *name, int *length);
void FreeFile(unsigned char *fileHandle);
void SetTitle(char *pszTitle);
void SetStatusLine(char *pszStatus);
void ShowConsole(bool visible) {}
void LogConsole(char *filename);
bool InitVGUI(IVGuiModule *module);
Panel *GetPanel();
bool RegisterCommand(char *name, ISystemModule *module, int commandID);
void GetCommandMatches(char *string, ObjectList *pMatchList);
void ExecuteString(char *commands);
void ExecuteFile(char *filename);
void Errorf(char *fmt, ...);
char *CheckParam(char *param);
bool AddModule(ISystemModule *module, char *name);
ISystemModule *GetModule(char *interfacename, char *library, char *instancename = nullptr);
bool RemoveModule(ISystemModule *module);
void Stop();
char *GetBaseDir() { return BaseSystemModule::GetBaseDir(); }
EXT_FUNC double GetTime();
EXT_FUNC unsigned int GetTick();
EXT_FUNC void SetFPS(float fps) {}
EXT_FUNC void Printf(char *fmt, ...);
EXT_FUNC void DPrintf(char *fmt, ...);
EXT_FUNC void RedirectOutput(char *buffer, int maxSize);
EXT_FUNC IFileSystem *GetFileSystem();
EXT_FUNC unsigned char *LoadFile(const char *name, int *length);
EXT_FUNC void FreeFile(unsigned char *fileHandle);
EXT_FUNC void SetTitle(char *pszTitle);
EXT_FUNC void SetStatusLine(char *pszStatus);
EXT_FUNC void ShowConsole(bool visible) {}
EXT_FUNC void LogConsole(char *filename);
EXT_FUNC bool InitVGUI(IVGuiModule *module);
EXT_FUNC Panel *GetPanel();
EXT_FUNC bool RegisterCommand(char *name, ISystemModule *module, int commandID);
EXT_FUNC void GetCommandMatches(char *string, ObjectList *pMatchList);
EXT_FUNC void ExecuteString(char *commands);
EXT_FUNC void ExecuteFile(char *filename);
EXT_FUNC void Errorf(char *fmt, ...);
EXT_FUNC char *CheckParam(char *param);
EXT_FUNC bool AddModule(ISystemModule *module, char *name);
EXT_FUNC ISystemModule *GetModule(char *interfacename, char *library, char *instancename = nullptr);
EXT_FUNC bool RemoveModule(ISystemModule *module);
EXT_FUNC void Stop();
EXT_FUNC char *GetBaseDir() { return BaseSystemModule::GetBaseDir(); }
protected:
struct command_t {

View File

@ -2859,7 +2859,7 @@ void Host_Stopdemo_f(void)
}
}
NOXREF void Host_EndSection(const char *pszSection)
NOXREF void EXT_FUNC Host_EndSection(const char *pszSection)
{
NOXREFCHECK;
giActive = DLL_PAUSED;

View File

@ -475,7 +475,7 @@ void* EXT_FUNC PvEntPrivateData(edict_t *pEdict)
return pEdict->pvPrivateData;
}
void FreeEntPrivateData(edict_t *pEdict)
void EXT_FUNC FreeEntPrivateData(edict_t *pEdict)
{
if (pEdict->pvPrivateData)
{

View File

@ -28,17 +28,17 @@
#include "precompiled.h"
void PM_SV_PlaybackEventFull(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 EXT_FUNC PM_SV_PlaybackEventFull(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)
{
EV_SV_Playback(flags | FEV_NOTHOST, clientindex, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2);
}
void PM_SV_PlaySound(int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch)
void EXT_FUNC PM_SV_PlaySound(int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch)
{
SV_StartSound(1, host_client->edict, channel, sample, (int)(volume * 255.0), attenuation, fFlags, pitch);
}
const char *PM_SV_TraceTexture(int ground, vec_t *vstart, vec_t *vend)
const char * EXT_FUNC PM_SV_TraceTexture(int ground, vec_t *vstart, vec_t *vend)
{
if (ground < 0 || ground >= pmove->numphysent)
return NULL;

View File

@ -49,8 +49,8 @@ public:
virtual ~CServerRemoteAccess() {}
virtual void WriteDataRequest(const void *buffer, int bufferSize);
virtual int ReadDataResponse(void *data, int len);
EXT_FUNC virtual void WriteDataRequest(const void *buffer, int bufferSize);
EXT_FUNC virtual int ReadDataResponse(void *data, int len);
void SendMessageToAdminUI(const char *message);
void RequestValue(int requestID, const char *variable);

View File

@ -574,7 +574,7 @@ void ClearIOStates(void)
class CEngineAPI: public IEngineAPI
{
public:
int Run(void *instance, char *basedir, char *cmdline, char *postRestartCmdLineArgs, CreateInterfaceFn launcherFactory, CreateInterfaceFn filesystemFactory)
EXT_FUNC int Run(void *instance, char *basedir, char *cmdline, char *postRestartCmdLineArgs, CreateInterfaceFn launcherFactory, CreateInterfaceFn filesystemFactory)
{
return 0;
}

View File

@ -68,11 +68,11 @@ private:
char m_OrigCmd[1024];
public:
virtual bool Init(char *basedir, char *cmdline, CreateInterfaceFn launcherFactory, CreateInterfaceFn filesystemFactory);
virtual int Shutdown();
virtual bool RunFrame();
virtual void AddConsoleText(char *text);
virtual void UpdateStatus(float *fps, int *nActive, int *nMaxPlayers, char *pszMap);
EXT_FUNC virtual bool Init(char *basedir, char *cmdline, CreateInterfaceFn launcherFactory, CreateInterfaceFn filesystemFactory);
EXT_FUNC virtual int Shutdown();
EXT_FUNC virtual bool RunFrame();
EXT_FUNC virtual void AddConsoleText(char *text);
EXT_FUNC virtual void UpdateStatus(float *fps, int *nActive, int *nMaxPlayers, char *pszMap);
};
const char *GetCurrentSteamAppName();

View File

@ -87,9 +87,9 @@ public:
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(className, interfaceName, versionName, __g_##className##_singleton)
#ifdef _WIN32
#define EXPORT_FUNCTION __declspec(dllexport)
#define EXPORT_FUNCTION __declspec(dllexport) EXT_FUNC
#else
#define EXPORT_FUNCTION __attribute__((visibility("default")))
#define EXPORT_FUNCTION __attribute__((visibility("default"))) EXT_FUNC
#endif // _WIN32
// This function is automatically exported and allows you to access any interfaces exposed with the above macros.

View File

@ -37,9 +37,9 @@
/*
#ifdef _WIN32
#define DLLEXPORT __stdcall
#define DLLEXPORT __stdcall EXT_FUNC
#else
#define DLLEXPORT __attribute__ ((visibility("default")))
#define DLLEXPORT __attribute__ ((visibility("default"))) EXT_FUNC
#endif
*/

View File

@ -31,7 +31,7 @@
// Steam API export macro
#if defined( _WIN32 ) && !defined( _X360 )
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C" __declspec( dllexport )
#define S_API extern "C" __declspec( dllexport ) EXT_FUNC
#elif defined( STEAM_API_NODLL )
#define S_API extern "C"
#else
@ -39,13 +39,13 @@
#endif // STEAM_API_EXPORTS
#elif defined( GNUC )
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C" __attribute__ ((visibility("default")))
#define S_API extern "C" __attribute__ ((visibility("default"))) EXT_FUNC
#else
#define S_API extern "C"
#endif // STEAM_API_EXPORTS
#else // !WIN32
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C"
#define S_API extern "C" EXT_FUNC
#else
#define S_API extern "C"
#endif // STEAM_API_EXPORTS

View File

@ -46,15 +46,15 @@
// C functions for external declarations that call the appropriate C++ methods
#ifndef EXPORT
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define EXPORT __declspec(dllexport) EXT_FUNC
#else
#define EXPORT /* */
#define EXPORT EXT_FUNC
#endif
#endif
#ifdef _WIN32
// Used for dll exporting and importing
#define DLL_EXPORT extern "C" __declspec(dllexport)
#define DLL_EXPORT extern "C" __declspec(dllexport) EXT_FUNC
#define DLL_IMPORT extern "C" __declspec(dllimport)
// Can't use extern "C" when DLL exporting a class
@ -67,7 +67,7 @@
#elif defined __linux__
// Used for dll exporting and importing
#define DLL_EXPORT extern "C"
#define DLL_EXPORT extern "C" EXT_FUNC
#define DLL_IMPORT extern "C"
// Can't use extern "C" when DLL exporting a class

View File

@ -99,26 +99,26 @@ public:
virtual ~CRehldsFlightRecorder();
void dump(const char* fname);
virtual void StartMessage(uint16 msg, bool entrance);
virtual void EndMessage(uint16 msg, bool entrance);
EXT_FUNC virtual void StartMessage(uint16 msg, bool entrance);
EXT_FUNC virtual void EndMessage(uint16 msg, bool entrance);
virtual void WriteInt8(int8 v);
virtual void WriteUInt8(uint8 v);
EXT_FUNC virtual void WriteInt8(int8 v);
EXT_FUNC virtual void WriteUInt8(uint8 v);
virtual void WriteInt16(int16 v);
virtual void WriteUInt16(uint16 v);
EXT_FUNC virtual void WriteInt16(int16 v);
EXT_FUNC virtual void WriteUInt16(uint16 v);
virtual void WriteInt32(int32 v);
virtual void WriteUInt32(uint32 v);
EXT_FUNC virtual void WriteInt32(int32 v);
EXT_FUNC virtual void WriteUInt32(uint32 v);
virtual void WriteInt64(int64 v);
virtual void WriteUInt64(uint64 v);
EXT_FUNC virtual void WriteInt64(int64 v);
EXT_FUNC virtual void WriteUInt64(uint64 v);
virtual void WriteFloat(float v);
virtual void WriteDouble(double v);
EXT_FUNC virtual void WriteFloat(float v);
EXT_FUNC virtual void WriteDouble(double v);
virtual void WriteBuffer(const void* data, unsigned int len);
virtual void WriteString(const char* s);
EXT_FUNC virtual void WriteBuffer(const void* data, unsigned int len);
EXT_FUNC virtual void WriteString(const char* s);
virtual uint16 RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut);
EXT_FUNC virtual uint16 RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut);
};

View File

@ -45,7 +45,7 @@ public:
virtual ~IHookChainImpl() {}
virtual t_ret callNext(t_args... args) {
EXT_FUNC virtual t_ret callNext(t_args... args) {
hookfunc_t nexthook = (hookfunc_t)m_Hooks[0];
if (nexthook)
@ -57,7 +57,7 @@ public:
return m_OriginalFunc(args...);
}
virtual t_ret callOriginal(t_args... args) {
EXT_FUNC virtual t_ret callOriginal(t_args... args) {
return m_OriginalFunc(args...);
}
@ -76,7 +76,7 @@ public:
IVoidHookChainImpl(void** hooks, origfunc_t orig) : m_Hooks(hooks), m_OriginalFunc(orig) {}
virtual ~IVoidHookChainImpl() {}
virtual void callNext(t_args... args) {
EXT_FUNC virtual void callNext(t_args... args) {
hookfunc_t nexthook = (hookfunc_t)m_Hooks[0];
if (nexthook)
@ -91,7 +91,7 @@ public:
}
}
virtual void callOriginal(t_args... args) {
EXT_FUNC virtual void callOriginal(t_args... args) {
if (m_OriginalFunc)
m_OriginalFunc(args...);
}
@ -129,10 +129,10 @@ public:
return chain.callNext(args...);
}
virtual void registerHook(hookfunc_t hook, int priority) {
EXT_FUNC virtual void registerHook(hookfunc_t hook, int priority) {
addHook((void*)hook, priority);
}
virtual void unregisterHook(hookfunc_t hook) {
EXT_FUNC virtual void unregisterHook(hookfunc_t hook) {
removeHook((void*)hook);
}
};
@ -150,11 +150,11 @@ public:
chain.callNext(args...);
}
virtual void registerHook(hookfunc_t hook, int priority) {
EXT_FUNC virtual void registerHook(hookfunc_t hook, int priority) {
addHook((void*)hook, priority);
}
virtual void unregisterHook(hookfunc_t hook) {
EXT_FUNC virtual void unregisterHook(hookfunc_t hook) {
removeHook((void*)hook);
}
};

View File

@ -230,45 +230,45 @@ public:
CRehldsHookRegistry_CreateFakeClient m_CreateFakeClient;
public:
virtual IRehldsHookRegistry_Steam_NotifyClientConnect* Steam_NotifyClientConnect();
virtual IRehldsHookRegistry_SV_ConnectClient* SV_ConnectClient();
virtual IRehldsHookRegistry_SV_GetIDString* SV_GetIDString();
virtual IRehldsHookRegistry_SV_SendServerinfo* SV_SendServerinfo();
virtual IRehldsHookRegistry_SV_CheckProtocol* SV_CheckProtocol();
virtual IRehldsHookRegistry_SVC_GetChallenge_mod* SVC_GetChallenge_mod();
virtual IRehldsHookRegistry_SV_CheckKeyInfo* SV_CheckKeyInfo();
virtual IRehldsHookRegistry_SV_CheckIPRestrictions* SV_CheckIPRestrictions();
virtual IRehldsHookRegistry_SV_FinishCertificateCheck* SV_FinishCertificateCheck();
virtual IRehldsHookRegistry_Steam_NotifyBotConnect* Steam_NotifyBotConnect();
virtual IRehldsHookRegistry_SerializeSteamId* SerializeSteamId();
virtual IRehldsHookRegistry_SV_CompareUserID* SV_CompareUserID();
virtual IRehldsHookRegistry_Steam_NotifyClientDisconnect* Steam_NotifyClientDisconnect();
virtual IRehldsHookRegistry_PreprocessPacket* PreprocessPacket();
virtual IRehldsHookRegistry_ValidateCommand* ValidateCommand();
virtual IRehldsHookRegistry_ClientConnected* ClientConnected();
virtual IRehldsHookRegistry_HandleNetCommand* HandleNetCommand();
virtual IRehldsHookRegistry_Mod_LoadBrushModel* Mod_LoadBrushModel();
virtual IRehldsHookRegistry_Mod_LoadStudioModel* Mod_LoadStudioModel();
virtual IRehldsHookRegistry_ExecuteServerStringCmd* ExecuteServerStringCmd();
virtual IRehldsHookRegistry_SV_EmitEvents* SV_EmitEvents();
virtual IRehldsHookRegistry_EV_PlayReliableEvent* EV_PlayReliableEvent();
virtual IRehldsHookRegistry_SV_StartSound* SV_StartSound();
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I();
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I();
virtual IRehldsHookRegistry_SV_WriteFullClientUpdate* SV_WriteFullClientUpdate();
virtual IRehldsHookRegistry_SV_CheckConsistencyResponse* SV_CheckConsistencyResponse();
virtual IRehldsHookRegistry_SV_DropClient* SV_DropClient();
virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer();
virtual IRehldsHookRegistry_SV_WriteVoiceCodec* SV_WriteVoiceCodec();
virtual IRehldsHookRegistry_Steam_GSGetSteamID* Steam_GSGetSteamID();
virtual IRehldsHookRegistry_SV_TransferConsistencyInfo* SV_TransferConsistencyInfo();
virtual IRehldsHookRegistry_Steam_GSBUpdateUserData* Steam_GSBUpdateUserData();
virtual IRehldsHookRegistry_Cvar_DirectSet* Cvar_DirectSet();
virtual IRehldsHookRegistry_SV_EstablishTimeBase* SV_EstablishTimeBase();
virtual IRehldsHookRegistry_SV_Spawn_f* SV_Spawn_f();
virtual IRehldsHookRegistry_SV_CreatePacketEntities* SV_CreatePacketEntities();
virtual IRehldsHookRegistry_SV_EmitSound2* SV_EmitSound2();
virtual IRehldsHookRegistry_CreateFakeClient* CreateFakeClient();
EXT_FUNC virtual IRehldsHookRegistry_Steam_NotifyClientConnect* Steam_NotifyClientConnect();
EXT_FUNC virtual IRehldsHookRegistry_SV_ConnectClient* SV_ConnectClient();
EXT_FUNC virtual IRehldsHookRegistry_SV_GetIDString* SV_GetIDString();
EXT_FUNC virtual IRehldsHookRegistry_SV_SendServerinfo* SV_SendServerinfo();
EXT_FUNC virtual IRehldsHookRegistry_SV_CheckProtocol* SV_CheckProtocol();
EXT_FUNC virtual IRehldsHookRegistry_SVC_GetChallenge_mod* SVC_GetChallenge_mod();
EXT_FUNC virtual IRehldsHookRegistry_SV_CheckKeyInfo* SV_CheckKeyInfo();
EXT_FUNC virtual IRehldsHookRegistry_SV_CheckIPRestrictions* SV_CheckIPRestrictions();
EXT_FUNC virtual IRehldsHookRegistry_SV_FinishCertificateCheck* SV_FinishCertificateCheck();
EXT_FUNC virtual IRehldsHookRegistry_Steam_NotifyBotConnect* Steam_NotifyBotConnect();
EXT_FUNC virtual IRehldsHookRegistry_SerializeSteamId* SerializeSteamId();
EXT_FUNC virtual IRehldsHookRegistry_SV_CompareUserID* SV_CompareUserID();
EXT_FUNC virtual IRehldsHookRegistry_Steam_NotifyClientDisconnect* Steam_NotifyClientDisconnect();
EXT_FUNC virtual IRehldsHookRegistry_PreprocessPacket* PreprocessPacket();
EXT_FUNC virtual IRehldsHookRegistry_ValidateCommand* ValidateCommand();
EXT_FUNC virtual IRehldsHookRegistry_ClientConnected* ClientConnected();
EXT_FUNC virtual IRehldsHookRegistry_HandleNetCommand* HandleNetCommand();
EXT_FUNC virtual IRehldsHookRegistry_Mod_LoadBrushModel* Mod_LoadBrushModel();
EXT_FUNC virtual IRehldsHookRegistry_Mod_LoadStudioModel* Mod_LoadStudioModel();
EXT_FUNC virtual IRehldsHookRegistry_ExecuteServerStringCmd* ExecuteServerStringCmd();
EXT_FUNC virtual IRehldsHookRegistry_SV_EmitEvents* SV_EmitEvents();
EXT_FUNC virtual IRehldsHookRegistry_EV_PlayReliableEvent* EV_PlayReliableEvent();
EXT_FUNC virtual IRehldsHookRegistry_SV_StartSound* SV_StartSound();
EXT_FUNC virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I();
EXT_FUNC virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I();
EXT_FUNC virtual IRehldsHookRegistry_SV_WriteFullClientUpdate* SV_WriteFullClientUpdate();
EXT_FUNC virtual IRehldsHookRegistry_SV_CheckConsistencyResponse* SV_CheckConsistencyResponse();
EXT_FUNC virtual IRehldsHookRegistry_SV_DropClient* SV_DropClient();
EXT_FUNC virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer();
EXT_FUNC virtual IRehldsHookRegistry_SV_WriteVoiceCodec* SV_WriteVoiceCodec();
EXT_FUNC virtual IRehldsHookRegistry_Steam_GSGetSteamID* Steam_GSGetSteamID();
EXT_FUNC virtual IRehldsHookRegistry_SV_TransferConsistencyInfo* SV_TransferConsistencyInfo();
EXT_FUNC virtual IRehldsHookRegistry_Steam_GSBUpdateUserData* Steam_GSBUpdateUserData();
EXT_FUNC virtual IRehldsHookRegistry_Cvar_DirectSet* Cvar_DirectSet();
EXT_FUNC virtual IRehldsHookRegistry_SV_EstablishTimeBase* SV_EstablishTimeBase();
EXT_FUNC virtual IRehldsHookRegistry_SV_Spawn_f* SV_Spawn_f();
EXT_FUNC virtual IRehldsHookRegistry_SV_CreatePacketEntities* SV_CreatePacketEntities();
EXT_FUNC virtual IRehldsHookRegistry_SV_EmitSound2* SV_EmitSound2();
EXT_FUNC virtual IRehldsHookRegistry_CreateFakeClient* CreateFakeClient();
};
extern CRehldsHookchains g_RehldsHookchains;