mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-08 02:58:24 +00:00
Further ICVar reversal
This commit is contained in:
parent
d306f68e6b
commit
dcfee62c58
@ -68,22 +68,22 @@ abstract_class ICvar : public IAppSystem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// allow_developer - Allows finding convars with FCVAR_DEVELOPMENTONLY flag
|
// allow_developer - Allows finding convars with FCVAR_DEVELOPMENTONLY flag
|
||||||
virtual ConVarID FindConVar(const char *name, bool allow_developer = false) = 0;
|
virtual ConVarID FindConVar(const char *szName, bool bAllowDeveloper = false) = 0;
|
||||||
virtual ConVarID FindFirstConVar() = 0;
|
virtual ConVarID FindFirstConVar() = 0;
|
||||||
virtual ConVarID FindNextConVar(ConVarID previous) = 0;
|
virtual ConVarID FindNextConVar(ConVarID previous) = 0;
|
||||||
|
|
||||||
virtual void SetConVarValue(ConVarID cvarid, CSplitScreenSlot nSlot, CVValue_t *value, void*) = 0;
|
virtual void SetConVarValue(ConVarID cvarid, CSplitScreenSlot nSlot, CVValue_t *pNewValue, CVValue_t *pOldValue) = 0;
|
||||||
|
|
||||||
virtual ConCommandID FindCommand(const char *name) = 0;
|
virtual ConCommandID FindCommand(const char *szName) = 0;
|
||||||
virtual ConCommandID FindFirstCommand() = 0;
|
virtual ConCommandID FindFirstCommand() = 0;
|
||||||
virtual ConCommandID FindNextCommand(ConCommandID previous) = 0;
|
virtual ConCommandID FindNextCommand(ConCommandID previous) = 0;
|
||||||
|
|
||||||
virtual void DispatchConCommand(ConCommandID command, CCommandContext& ctx, CCommand& tok) = 0;
|
virtual void DispatchConCommand(ConCommandID commandid, CCommandContext& ctx, CCommand& tok) = 0;
|
||||||
|
|
||||||
// Install a global change callback (to be called when any convar changes)
|
// Install a global change callback (to be called when any convar changes)
|
||||||
virtual void InstallGlobalChangeCallback(FnChangeCallback_t callback) = 0;
|
virtual void InstallGlobalChangeCallback(FnChangeCallbackGlobal_t callback) = 0;
|
||||||
virtual void RemoveGlobalChangeCallback(FnChangeCallback_t callback) = 0;
|
virtual void RemoveGlobalChangeCallback(FnChangeCallbackGlobal_t callback) = 0;
|
||||||
virtual void CallGlobalChangeCallbacks(ConVar *var, const char *pOldString, float flOldValue) = 0;
|
virtual void CallGlobalChangeCallbacks(ConVarRefAbstract *cvar, CSplitScreenSlot nSlot, const char *pNewValue, const char* pOldValue) = 0;
|
||||||
|
|
||||||
// Reverts cvars which contain a specific flag
|
// Reverts cvars which contain a specific flag
|
||||||
virtual void RevertFlaggedConVars(int nFlag) = 0;
|
virtual void RevertFlaggedConVars(int nFlag) = 0;
|
||||||
@ -91,26 +91,28 @@ public:
|
|||||||
virtual void SetMaxSplitScreenSlots(int nSlots) = 0;
|
virtual void SetMaxSplitScreenSlots(int nSlots) = 0;
|
||||||
virtual int GetMaxSplitScreenSlots() const = 0;
|
virtual int GetMaxSplitScreenSlots() const = 0;
|
||||||
|
|
||||||
virtual void RegisterCreationListener() = 0;
|
virtual void RegisterCreationListeners(CCreationListenerCallbacks *callbacks) = 0;
|
||||||
virtual void RemoveCreationListener() = 0;
|
virtual void RemoveCreationListeners(CCreationListenerCallbacks *callbacks) = 0;
|
||||||
|
|
||||||
virtual void unk2() = 0;
|
virtual void unk2() = 0;
|
||||||
virtual void unk3() = 0;
|
|
||||||
virtual void unk4() = 0;
|
virtual void ResetConVarsToDefaultValues(const char *pszSearchString) = 0;
|
||||||
virtual void unk5() = 0;
|
|
||||||
virtual void unk6() = 0;
|
virtual ConVarSnapshot_t TakeConVarSnapshot() = 0;
|
||||||
|
virtual void ResetConVarsFromSnapshot(ConVarSnapshot_t *snapshot) = 0;
|
||||||
|
virtual void DestroyConVarSnapshot(ConVarSnapshot_t *snapshot) = 0;
|
||||||
|
|
||||||
virtual characterset_t GetCharacterSet() = 0;
|
virtual characterset_t GetCharacterSet() = 0;
|
||||||
|
|
||||||
virtual void unk8() = 0;
|
virtual void SetConVarsFromGameInfo(KeyValues *) = 0;
|
||||||
|
|
||||||
virtual void RegisterConVar(ConVarDesc_t, void*, ConVarID&, ConVar&) = 0;
|
virtual void RegisterConVar(ConVarDesc_t*, void*, ConVarID&, ConVar&) = 0;
|
||||||
virtual void UnregisterConVar(ConVarID cvar) = 0;
|
virtual void UnregisterConVar(ConVarID cvarid) = 0;
|
||||||
virtual ConVar* GetConVar(ConVarID cvar) = 0;
|
virtual ConVar* GetConVar(ConVarID cvarid) = 0;
|
||||||
|
|
||||||
virtual void RegisterConCommand(void*, void*, ConCommandID&, ConCommand&) = 0;
|
virtual void RegisterConCommand(void*, void*, ConCommandID&, ConCommand&) = 0;
|
||||||
virtual void UnregisterConCommand(ConCommandID command) = 0;
|
virtual void UnregisterConCommand(ConCommandID commandid) = 0;
|
||||||
virtual ConCommand* GetConCommand(ConCommandID command) = 0;
|
virtual ConCommand* GetConCommand(ConCommandID commandid) = 0;
|
||||||
|
|
||||||
virtual void QueueThreadSetValue(ConVarRefAbstract *ref, CSplitScreenSlot nSlot, CVValue_t *value) = 0;
|
virtual void QueueThreadSetValue(ConVarRefAbstract *ref, CSplitScreenSlot nSlot, CVValue_t *value) = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -89,6 +89,16 @@ DECLARE_HANDLE_32BIT(ConCommandID);
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Called when a ConVar changes value
|
// Called when a ConVar changes value
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
typedef void ( *FnChangeCallback_t )( IConVar *var, const char *pOldValue, float flOldValue );
|
typedef void ( *FnChangeCallbackGlobal_t )( ConVarRefAbstract *cvar, CSplitScreenSlot nSlot, const char *pNewValue, const char* pOldValue );
|
||||||
|
typedef void ( *FnChangeCallback_t )( ConVarRefAbstract *cvar, CSplitScreenSlot nSlot, CVValue_t *pNewValue, CVValue_t* pOldValue );
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// ConVar & ConCommand creation listener callbacks
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
struct CCreationListenerCallbacks
|
||||||
|
{
|
||||||
|
void(*FnConVarCreationCallback)(CCreationListenerCallbacks *pThisCallback, ConVarRefAbstract *pNewCvar);
|
||||||
|
void(*FnConCommandCreationCallback)(CCreationListenerCallbacks *pThisCallback, ConCommandID commandID);
|
||||||
|
};
|
||||||
|
|
||||||
#endif // ICONVAR_H
|
#endif // ICONVAR_H
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user