mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-07 18:48:22 +00:00
Initial set of changes from reversed engineered l4d binaries
* Bumped IVEngineServer to version 022 * Bumped ICvar to version 007 * Added/Removed various functions to/from the following interfaces: IVEngineServer, ICvar, IServerGameDLL, IServerGameEnts, IServerGameClients, IFileSystem, IEngineSound, IEngineTrace, IClient, IConvar, and INetworkStringTableContainer * Added unknown extra int ptr param to IGameEventManager2::CreateEvent * Added GetDebugEventID to IGameEventListener2 * Added two new members of CGlobalVars: serverCount and baseEdict * Added new functions to ConCommandBase and ConVar classes in tier1 * Recompiled tier1 static library for Windows * Updated notes.txt to reflect the nature of this SDK
This commit is contained in:
parent
7ff7f366d5
commit
db8a44c299
Binary file not shown.
36
notes.txt
36
notes.txt
@ -1,35 +1,9 @@
|
||||
*********
|
||||
* About *
|
||||
*********
|
||||
This version of the Source/Orange Box SDK attempts to remove as many
|
||||
warnings as possible when compiling on Windows or Linux.
|
||||
The -fpermissive option has been removed from the Linux makefiles and
|
||||
-Wall has been added. It is also now possible to cross-compile the SDK
|
||||
on 64-bit Linux systems with the addition of the -m32 option.
|
||||
This version of the Source SDK is meant only for compiling server plugins for
|
||||
the engine that runs Valve's Left 4 Dead game. An official SDK is not yet
|
||||
available.
|
||||
|
||||
*********
|
||||
* Notes *
|
||||
*********
|
||||
1: A Visual Studio project file for choreoobjects has been added to
|
||||
the choreoobjects directory for the convenience of recompiling this
|
||||
static library for Windows if it ever becomes necessary to do so.
|
||||
|
||||
2: Makefiles for choreoobjects, mathlib, and tier1 have been added to
|
||||
the linux_sdk directory for the convenience of recompiling these
|
||||
static libraries for Linux if it ever becomes necessary to do so.
|
||||
|
||||
3: The vmpi directory has been removed as it seems to be an exact copy
|
||||
of the one located in the utils directory. Nothing seems to depend
|
||||
upon the files within it yet.
|
||||
|
||||
****************
|
||||
* Known Issues *
|
||||
****************
|
||||
1: The SDK will not compile with GCC 4.3. This will be addressed in a
|
||||
future update.
|
||||
|
||||
2: The SDK may not fully compile with Visual Studio 2008. This will be
|
||||
addressed in a future update.
|
||||
|
||||
3: The caption compiler which is located in utils/captioncompiler will
|
||||
not link due to a missing static library (appframework.lib).
|
||||
This is a modified version of the Orange Box SDK. Changes to it were reverse
|
||||
engineered from the Left 4 Dead engine and game binaries.
|
||||
|
||||
@ -59,6 +59,14 @@ public:
|
||||
bool teamplay;
|
||||
// current maxentities
|
||||
int maxEntities;
|
||||
|
||||
// Number of servers spawned (-fork)
|
||||
int serverCount;
|
||||
|
||||
// First edict/entity, usually worldspawn (0)
|
||||
// - Replacement for IndexOfEntity: (edict - baseEdict) >> 4
|
||||
// - Replacement for PEntityOfIndex: baseEdict + (entIndex << 4)
|
||||
edict_t *baseEdict;
|
||||
};
|
||||
|
||||
inline CGlobalVars::CGlobalVars( bool bIsClient ) :
|
||||
|
||||
@ -57,6 +57,7 @@ class CStandardSendProxies;
|
||||
class IAchievementMgr;
|
||||
class CGamestatsData;
|
||||
class CSteamID;
|
||||
struct bbox_t;
|
||||
|
||||
typedef struct player_info_s player_info_t;
|
||||
|
||||
@ -70,7 +71,7 @@ typedef struct player_info_s player_info_t;
|
||||
#define DLLEXPORT /* */
|
||||
#endif
|
||||
|
||||
#define INTERFACEVERSION_VENGINESERVER "VEngineServer021"
|
||||
#define INTERFACEVERSION_VENGINESERVER "VEngineServer022"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface the engine exposes to the game DLL
|
||||
@ -123,13 +124,12 @@ public:
|
||||
virtual int GetPlayerUserId( const edict_t *e ) = 0;
|
||||
virtual const char *GetPlayerNetworkIDString( const edict_t *e ) = 0;
|
||||
|
||||
virtual bool IsUserIDInUse ( int userid ) = 0;
|
||||
virtual int GetLoadingProgressForUserID ( int userid ) = 0;
|
||||
|
||||
// Return the current number of used edict slots
|
||||
virtual int GetEntityCount( void ) = 0;
|
||||
// Given an edict, returns the entity index
|
||||
virtual int IndexOfEdict( const edict_t *pEdict ) = 0;
|
||||
// Given and entity index, returns the corresponding edict pointer
|
||||
virtual edict_t *PEntityOfEntIndex( int iEntIndex ) = 0;
|
||||
|
||||
|
||||
// Get stats info interface for a client netchannel
|
||||
virtual INetChannelInfo* GetPlayerNetInfo( int playerIndex ) = 0;
|
||||
|
||||
@ -265,6 +265,7 @@ public:
|
||||
|
||||
// Print a message to the server log file
|
||||
virtual void LogPrint( const char *msg ) = 0;
|
||||
virtual bool IsLogEnabled( void ) = 0;
|
||||
|
||||
// Builds PVS information for an entity
|
||||
virtual void BuildEntityClusterList( edict_t *pEdict, PVSInfo_t *pPVSInfo ) = 0;
|
||||
@ -311,7 +312,7 @@ public:
|
||||
|
||||
// Is the engine in Commentary mode?
|
||||
virtual int IsInCommentaryMode( void ) = 0;
|
||||
|
||||
virtual bool IsLevelMainMenuBackground( void ) = 0;
|
||||
|
||||
// Mark some area portals as open/closed. It's more efficient to use this
|
||||
// than a bunch of individual SetAreaPortalState calls.
|
||||
@ -338,6 +339,10 @@ public:
|
||||
// Name of most recently load .sav file
|
||||
virtual char const *GetMostRecentlyLoadedFileName() = 0;
|
||||
virtual char const *GetSaveFileName() = 0;
|
||||
virtual void WriteSavegameScreenshot( const char *filename ) = 0;
|
||||
|
||||
virtual int GetLightForPointListenServerOnly(const Vector &, bool, Vector *) = 0;
|
||||
virtual int TraceLightingListenServerOnly(const Vector &, const Vector &, Vector *, Vector *) = 0;
|
||||
|
||||
// Matchmaking
|
||||
virtual void MultiplayerEndGame() = 0;
|
||||
@ -352,6 +357,7 @@ public:
|
||||
virtual int GetAppID() = 0;
|
||||
|
||||
virtual bool IsLowViolence() = 0;
|
||||
virtual bool IsAnyClientLowViolence() = 0;
|
||||
|
||||
// Call this to find out the value of a cvar on the client.
|
||||
//
|
||||
@ -370,16 +376,32 @@ public:
|
||||
// Returns true if this client has been fully authenticated by Steam
|
||||
virtual bool IsClientFullyAuthenticated( edict_t *pEdict ) = 0;
|
||||
|
||||
// This makes the host run 1 tick per frame instead of checking the system timer to see how many ticks to run in a certain frame.
|
||||
// i.e. it does the same thing timedemo does.
|
||||
virtual void SetDedicatedServerBenchmarkMode( bool bBenchmarkMode ) = 0;
|
||||
virtual bool IsSplitScreenPlayer( int ) = 0;
|
||||
virtual int GetSplitScreenPlayerAttachToEdict( int ) = 0;
|
||||
virtual int GetNumSplitScreenUsersAttachedToEdict( int ) = 0;
|
||||
virtual int GetSplitScreenPlayerForEdict( int, int ) = 0;
|
||||
|
||||
virtual bool IsOverrideLoadGameEntsOn() = 0;
|
||||
virtual void ForceFlushEntity( int ) = 0;
|
||||
|
||||
virtual void *GetSinglePlayerSharedMemorySpace( char const * ) = 0;
|
||||
|
||||
virtual void *AllocLevelStaticData( unsigned int ) = 0;
|
||||
virtual int GetClusterCount() = 0;
|
||||
virtual void *GetAllClusterBounds( bbox_t *, int ) = 0;
|
||||
|
||||
virtual bool IsCreatingReslist() = 0;
|
||||
virtual bool IsCreatingXboxReslist() = 0;
|
||||
virtual bool IsDedicatedServerForXbox() = 0;
|
||||
|
||||
virtual void Pause( bool, bool ) = 0;
|
||||
|
||||
// Methods to set/get a gamestats data container so client & server running in same process can send combined data
|
||||
virtual void SetGamestatsData( CGamestatsData *pGamestatsData ) = 0;
|
||||
virtual CGamestatsData *GetGamestatsData() = 0;
|
||||
|
||||
// Returns the SteamID of the specified player. It'll be NULL if the player hasn't authenticated yet.
|
||||
virtual const CSteamID *GetClientSteamID( edict_t *pPlayerEdict ) = 0;
|
||||
|
||||
virtual void HostValidateSession() = 0;
|
||||
virtual void RefreshScreenIfNecessary() = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_4 "ServerGameDLL004"
|
||||
@ -487,6 +509,12 @@ public:
|
||||
// iCookie is the value returned by IServerPluginHelpers::StartQueryCvarValue.
|
||||
// Added with version 2 of the interface.
|
||||
virtual void OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue ) = 0;
|
||||
|
||||
virtual void PostToolsInit( void ) = 0;
|
||||
virtual void ApplyGameSettings( KeyValues * ) = 0;
|
||||
virtual const char * GetGameModeConfigFile( int ) = 0;
|
||||
virtual int GameGameModePlayerSlots( int ) = 0;
|
||||
virtual void GetMatchmakingTags( char *, unsigned int ) = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -505,9 +533,6 @@ abstract_class IServerGameEnts
|
||||
public:
|
||||
virtual ~IServerGameEnts() {}
|
||||
|
||||
// Only for debugging. Set the edict base so you can get an edict's index in the debugger while debugging the game .dll
|
||||
virtual void SetDebugEdictBase(edict_t *base) = 0;
|
||||
|
||||
// The engine wants to mark two entities as touching
|
||||
virtual void MarkEntitiesAsTouching( edict_t *e1, edict_t *e2 ) = 0;
|
||||
|
||||
@ -524,6 +549,8 @@ public:
|
||||
// This is also where an entity can force other entities to be transmitted if it refers to them
|
||||
// with ehandles.
|
||||
virtual void CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) = 0;
|
||||
|
||||
virtual void PrepareForFullUpdate( edict_t * ) = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_SERVERGAMECLIENTS "ServerGameClients003"
|
||||
@ -582,9 +609,15 @@ public:
|
||||
// Anything this game .dll wants to add to the bug reporter text (e.g., the entity/model under the picker crosshair)
|
||||
// can be added here
|
||||
virtual void GetBugReportInfo( char *buf, int buflen ) = 0;
|
||||
|
||||
virtual void ClientVoice( edict_t * ) = 0;
|
||||
|
||||
// A user has had their network id setup and validated
|
||||
virtual void NetworkIDValidated( const char *pszUserName, const char *pszNetworkID ) = 0;
|
||||
|
||||
virtual int GetMaxSplitscreenPlayers( void ) = 0;
|
||||
|
||||
virtual int GetMaxHumanPlayers( void ) = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001"
|
||||
|
||||
@ -59,6 +59,9 @@ public:
|
||||
virtual bool PrecacheSound( const char *pSample, bool bPreload = false, bool bIsUISound = false ) = 0;
|
||||
virtual bool IsSoundPrecached( const char *pSample ) = 0;
|
||||
virtual void PrefetchSound( const char *pSample ) = 0;
|
||||
|
||||
// Client only
|
||||
virtual bool IsLoopingSound( const char *pSample ) = 0;
|
||||
|
||||
// Just loads the file header and checks for duration (not hooked up for .mp3's yet)
|
||||
// Is accessible to server and client though
|
||||
@ -116,6 +119,9 @@ public:
|
||||
virtual void PrecacheSentenceGroup( const char *pGroupName ) = 0;
|
||||
virtual void NotifyBeginMoviePlayback() = 0;
|
||||
virtual void NotifyEndMoviePlayback() = 0;
|
||||
|
||||
// Client only
|
||||
virtual float GetSoundChannelVolume( const char *, float &, float & ) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ class CGameTrace;
|
||||
typedef CGameTrace trace_t;
|
||||
class ICollideable;
|
||||
class QAngle;
|
||||
class CTraceListData;
|
||||
class CPhysCollide;
|
||||
struct cplane_t;
|
||||
|
||||
@ -45,6 +44,16 @@ public:
|
||||
virtual TraceType_t GetTraceType() const = 0;
|
||||
};
|
||||
|
||||
abstract_class ITraceListData
|
||||
{
|
||||
public:
|
||||
virtual ~ITraceListData() {};
|
||||
|
||||
virtual void Reset() = 0;
|
||||
virtual bool IsEmpty() = 0;
|
||||
virtual bool CanTraceRay( const Ray_t &ray ) = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Classes are expected to inherit these + implement the ShouldHitEntity method
|
||||
@ -129,8 +138,9 @@ abstract_class IEngineTrace
|
||||
{
|
||||
public:
|
||||
// Returns the contents mask + entity at a particular world-space position
|
||||
virtual int GetPointContents( const Vector &vecAbsPosition, IHandleEntity** ppEntity = NULL ) = 0;
|
||||
virtual int GetPointContents( const Vector &vecAbsPosition, int, IHandleEntity** ppEntity = NULL ) = 0;
|
||||
|
||||
virtual int GetPointContents_WorldOnly( const Vector &vecAbsPosition, int ) = 0;
|
||||
// Get the point contents, but only test the specific entity. This works
|
||||
// on static props and brush models.
|
||||
//
|
||||
@ -148,9 +158,9 @@ public:
|
||||
virtual void TraceRay( const Ray_t &ray, unsigned int fMask, ITraceFilter *pTraceFilter, trace_t *pTrace ) = 0;
|
||||
|
||||
// A version that sets up the leaf and entity lists and allows you to pass those in for collision.
|
||||
virtual void SetupLeafAndEntityListRay( const Ray_t &ray, CTraceListData &traceData ) = 0;
|
||||
virtual void SetupLeafAndEntityListBox( const Vector &vecBoxMin, const Vector &vecBoxMax, CTraceListData &traceData ) = 0;
|
||||
virtual void TraceRayAgainstLeafAndEntityList( const Ray_t &ray, CTraceListData &traceData, unsigned int fMask, ITraceFilter *pTraceFilter, trace_t *pTrace ) = 0;
|
||||
virtual void SetupLeafAndEntityListRay( const Ray_t &ray, ITraceListData *traceData ) = 0;
|
||||
virtual void SetupLeafAndEntityListBox( const Vector &vecBoxMin, const Vector &vecBoxMax, ITraceListData *traceData ) = 0;
|
||||
virtual void TraceRayAgainstLeafAndEntityList( const Ray_t &ray, ITraceListData *traceData, unsigned int fMask, ITraceFilter *pTraceFilter, trace_t *pTrace ) = 0;
|
||||
|
||||
// A version that sweeps a collideable through the world
|
||||
// abs start + abs end represents the collision origins you want to sweep the collideable through
|
||||
@ -185,6 +195,9 @@ public:
|
||||
|
||||
// Walks bsp to find the leaf containing the specified point
|
||||
virtual int GetLeafContainingPoint( const Vector &ptTest ) = 0;
|
||||
|
||||
virtual ITraceListData *AllocTraceListData( void ) = 0;
|
||||
virtual void FreeTraceListData( ITraceListData *traceData ) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -736,6 +736,17 @@ public:
|
||||
|
||||
// Installs a callback used to display a dirty disk dialog
|
||||
virtual void InstallDirtyDiskReportFunc( FSDirtyDiskReportFunc_t func ) = 0;
|
||||
|
||||
virtual bool IsLaunchedFromXboxHDD( void ) = 0;
|
||||
virtual bool IsInstalledToXboxHDDCache( void ) = 0;
|
||||
virtual bool IsDVDHosted( void ) = 0;
|
||||
virtual bool IsInstallAllowed( void ) = 0;
|
||||
virtual void GetSearchPathID( char *, int ) = 0;
|
||||
virtual bool FixupSearchPathsAfterInstall( void ) = 0;
|
||||
|
||||
virtual FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc( void ) = 0;
|
||||
|
||||
virtual int AddVPKFile( const char *file ) = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@ -229,6 +229,14 @@ public:
|
||||
virtual void SetWhitelistSpewFlags( int spewFlags )
|
||||
{ m_pFileSystemPassThru->SetWhitelistSpewFlags( spewFlags ); }
|
||||
virtual void InstallDirtyDiskReportFunc( FSDirtyDiskReportFunc_t func ) { m_pFileSystemPassThru->InstallDirtyDiskReportFunc( func ); }
|
||||
virtual bool IsLaunchedFromXboxHDD() { return m_pFileSystemPassThru->IsLaunchedFromXboxHDD(); }
|
||||
virtual bool IsInstalledToXboxHDDCache() { return m_pFileSystemPassThru->IsInstalledToXboxHDDCache(); }
|
||||
virtual bool IsDVDHosted() { return m_pFileSystemPassThru->IsDVDHosted(); }
|
||||
virtual bool IsInstallAllowed() { return m_pFileSystemPassThru->IsInstallAllowed(); }
|
||||
virtual void GetSearchPathID( char *a, int b ) { m_pFileSystemPassThru->GetSearchPathID(a, b); }
|
||||
virtual bool FixupSearchPathsAfterInstall() { return m_pFileSystemPassThru->FixupSearchPathsAfterInstall(); }
|
||||
virtual FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc() { return m_pFileSystemPassThru->GetDirtyDiskReportFunc(); }
|
||||
virtual int AddVPKFile( const char *file ) { return m_pFileSystemPassThru->AddVPKFile(file); }
|
||||
|
||||
protected:
|
||||
IFileSystem *m_pFileSystemPassThru;
|
||||
|
||||
@ -23,7 +23,7 @@ public:
|
||||
virtual ~IClient() {}
|
||||
|
||||
// connect client
|
||||
virtual void Connect(const char * szName, int nUserID, INetChannel *pNetChannel, bool bFakePlayer) = 0;
|
||||
virtual void Connect(const char * szName, int nUserID, INetChannel *pNetChannel, bool bFakePlayer, CUtlVector< NetMessageCvar_t > *) = 0;
|
||||
|
||||
// set the client in a pending state waiting for a new game
|
||||
virtual void Inactivate( void ) = 0;
|
||||
@ -80,6 +80,12 @@ public:
|
||||
virtual bool IsProximityHearingClient(int index) const = 0;
|
||||
|
||||
virtual void SetMaxRoutablePayloadSize( int nMaxRoutablePayloadSize ) = 0;
|
||||
|
||||
virtual bool IsSplitScreenUser( void ) = 0;
|
||||
virtual bool CheckConnect ( void ) = 0;
|
||||
virtual bool IsLowViolenceClient( void ) = 0;
|
||||
virtual int GetSplitScreenOwner( void ) = 0;
|
||||
virtual int GetNumPlayers( void ) = 0;
|
||||
};
|
||||
|
||||
#endif // ICLIENT_H
|
||||
|
||||
@ -75,10 +75,6 @@ public:
|
||||
virtual ConCommand *FindCommand( const char *name ) = 0;
|
||||
virtual const ConCommand *FindCommand( const char *name ) const = 0;
|
||||
|
||||
// Get first ConCommandBase to allow iteration
|
||||
virtual ConCommandBase *GetCommands( void ) = 0;
|
||||
virtual const ConCommandBase *GetCommands( void ) const = 0;
|
||||
|
||||
// Install a global change callback (to be called when any convar changes)
|
||||
virtual void InstallGlobalChangeCallback( FnChangeCallback_t callback ) = 0;
|
||||
virtual void RemoveGlobalChangeCallback( FnChangeCallback_t callback ) = 0;
|
||||
@ -102,9 +98,23 @@ public:
|
||||
#if defined( _X360 )
|
||||
virtual void PublishToVXConsole( ) = 0;
|
||||
#endif
|
||||
|
||||
virtual void SetMaxSplitScreenSlots( int ) = 0;
|
||||
virtual int GetMaxSplitScreenSlots() const = 0;
|
||||
virtual void AddSplitScreenConVars() = 0;
|
||||
virtual void RemoveSplitScreenConVars( int ) = 0;
|
||||
virtual int GetConsoleDisplayFuncCount() const = 0;
|
||||
virtual void GetConsoleText( int, char *, unsigned int ) const = 0;
|
||||
virtual bool IsMaterialThreadSetAllowed() const = 0;
|
||||
virtual void QueueMaterialThreadSetValue( ConVar *, const char * ) = 0;
|
||||
virtual void QueueMaterialThreadSetValue( ConVar *, int ) = 0;
|
||||
virtual void QueueMaterialThreadSetValue( ConVar *, float ) = 0;
|
||||
virtual bool HasQueuedMaterialThreadConVarSets() const = 0;
|
||||
virtual int ProcessQueuedMaterialThreadConVarSets() = 0;
|
||||
virtual void FactoryInternalIterator() = 0;
|
||||
};
|
||||
|
||||
#define CVAR_INTERFACE_VERSION "VEngineCvar004"
|
||||
#define CVAR_INTERFACE_VERSION "VEngineCvar007"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@ -93,6 +93,10 @@ public:
|
||||
// FireEvent is called by EventManager if event just occured
|
||||
// KeyValue memory will be freed by manager if not needed anymore
|
||||
virtual void FireGameEvent( IGameEvent *event ) = 0;
|
||||
virtual int GetEventDebugID( void )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
abstract_class IGameEventManager2 : public IBaseInterface
|
||||
@ -117,7 +121,7 @@ public:
|
||||
|
||||
// create an event by name, but doesn't fire it. returns NULL is event is not
|
||||
// known or no listener is registered for it. bForce forces the creation even if no listener is active
|
||||
virtual IGameEvent *CreateEvent( const char *name, bool bForce = false ) = 0;
|
||||
virtual IGameEvent *CreateEvent( const char *name, bool bForce = false, int *unknown=NULL) = 0;
|
||||
|
||||
// fires a server event created earlier, if bDontBroadcast is set, event is not send to clients
|
||||
virtual bool FireEvent( IGameEvent *event, bool bDontBroadcast = false ) = 0;
|
||||
|
||||
@ -58,6 +58,24 @@ public:
|
||||
virtual void SetStringChangedCallback( void *object, pfnStringChanged changeFunc ) = 0;
|
||||
};
|
||||
|
||||
class INetworkStringDict
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~INetworkStringDict( void ) {};
|
||||
|
||||
virtual int Count( void ) = 0;
|
||||
virtual void Purge( void ) = 0;
|
||||
virtual const char *String( int index ) = 0;
|
||||
virtual bool IsValidIndex( int index ) = 0;
|
||||
virtual int Insert( const char *string ) = 0;
|
||||
virtual int Find( const char *string ) = 0;
|
||||
virtual void UpdateDictionary( int ) = 0;
|
||||
virtual int DictionaryIndex( int ) = 0;
|
||||
virtual int Element( int ) = 0;
|
||||
virtual int Element( int ) const = 0;
|
||||
};
|
||||
|
||||
class INetworkStringTableContainer
|
||||
{
|
||||
public:
|
||||
@ -65,7 +83,7 @@ public:
|
||||
virtual ~INetworkStringTableContainer( void ) {};
|
||||
|
||||
// table creation/destruction
|
||||
virtual INetworkStringTable *CreateStringTable( const char *tableName, int maxentries, int userdatafixedsize = 0, int userdatanetworkbits = 0 ) = 0;
|
||||
virtual INetworkStringTable *CreateStringTable( const char *tableName, int maxentries, int userdatafixedsize = 0, int userdatanetworkbits = 0, int ) = 0;
|
||||
virtual void RemoveAllTables( void ) = 0;
|
||||
|
||||
// table infos
|
||||
@ -73,8 +91,8 @@ public:
|
||||
virtual INetworkStringTable *GetTable( TABLEID stringTable ) const = 0;
|
||||
virtual int GetNumTables( void ) const = 0;
|
||||
|
||||
virtual INetworkStringTable *CreateStringTableEx( const char *tableName, int maxentries, int userdatafixedsize = 0, int userdatanetworkbits = 0, bool bIsFilenames = false ) = 0;
|
||||
virtual void SetAllowClientSideAddString( INetworkStringTable *table, bool bAllowClientSideAddString ) = 0;
|
||||
virtual INetworkStringDict *CreateDictionary( const char *dictName ) = 0;
|
||||
};
|
||||
|
||||
#endif // NETWORKSTRINGTABLEDEFS_H
|
||||
|
||||
@ -120,6 +120,10 @@ public:
|
||||
virtual bool IsFlagSet( int flag ) const;
|
||||
// Set flag
|
||||
virtual void AddFlags( int flags );
|
||||
// Remove flag
|
||||
virtual void RemoveFlags( int flags );
|
||||
// Get flags
|
||||
virtual int GetFlags( void ) const;
|
||||
|
||||
// Return name of cvar
|
||||
virtual const char *GetName( void ) const;
|
||||
@ -342,13 +346,14 @@ public:
|
||||
|
||||
virtual ~ConVar( void );
|
||||
|
||||
virtual bool IsCommand( void ) const;
|
||||
virtual bool IsFlagSet( int flag ) const;
|
||||
virtual void AddFlags( int flags );
|
||||
virtual int GetFlags( void ) const;
|
||||
virtual const char *GetName( void ) const;
|
||||
virtual const char* GetHelpText( void ) const;
|
||||
virtual bool IsRegistered( void ) const;
|
||||
virtual const char *GetName( void ) const;
|
||||
virtual void AddFlags( int flags );
|
||||
virtual bool IsCommand( void ) const;
|
||||
|
||||
|
||||
// Install a change callback (there shouldn't already be one....)
|
||||
void InstallChangeCallback( FnChangeCallback_t callback );
|
||||
|
||||
@ -357,6 +362,12 @@ public:
|
||||
FORCEINLINE_CVAR int GetInt( void ) const;
|
||||
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
|
||||
FORCEINLINE_CVAR char const *GetString( void ) const;
|
||||
|
||||
// Used internally by OneTimeInit to initialize.
|
||||
virtual void Init();
|
||||
|
||||
virtual const char *GetBaseName( void ) const;
|
||||
virtual int GetSplitScreenPlayerSlot ( void ) const;
|
||||
|
||||
// Any function that allocates/frees memory needs to be virtual or else you'll have crashes
|
||||
// from alloc/free across dll/exe boundaries.
|
||||
@ -388,9 +399,6 @@ private:
|
||||
const char *pHelpString = 0, bool bMin = false, float fMin = 0.0,
|
||||
bool bMax = false, float fMax = false, FnChangeCallback_t callback = 0 );
|
||||
|
||||
// Used internally by OneTimeInit to initialize.
|
||||
virtual void Init();
|
||||
|
||||
private:
|
||||
|
||||
// This either points to "this" or it points to the original declaration of a ConVar.
|
||||
|
||||
@ -104,10 +104,13 @@ public:
|
||||
|
||||
// Return name of command
|
||||
virtual const char *GetName( void ) const = 0;
|
||||
virtual const char *GetBaseName( void ) const = 0;
|
||||
|
||||
// Accessors.. not as efficient as using GetState()/GetInfo()
|
||||
// if you call these methods multiple times on the same IConVar
|
||||
virtual bool IsFlagSet( int nFlag ) const = 0;
|
||||
|
||||
virtual int GetSplitScreenPlayerSlot( void ) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -241,6 +241,16 @@ void ConCommandBase::AddFlags( int flags )
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConCommandBase::RemoveFlags( int flags )
|
||||
{
|
||||
m_nFlags &= ~flags;
|
||||
}
|
||||
|
||||
int ConCommandBase::GetFlags( void ) const
|
||||
{
|
||||
return m_nFlags;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@ -715,6 +725,11 @@ void ConVar::AddFlags( int flags )
|
||||
#endif
|
||||
}
|
||||
|
||||
int ConVar::GetFlags( void ) const
|
||||
{
|
||||
return m_pParent->m_nFlags;
|
||||
}
|
||||
|
||||
bool ConVar::IsRegistered( void ) const
|
||||
{
|
||||
return m_pParent->m_bRegistered;
|
||||
@ -743,6 +758,16 @@ void ConVar::Init()
|
||||
BaseClass::Init();
|
||||
}
|
||||
|
||||
const char *ConVar::GetBaseName( void ) const
|
||||
{
|
||||
return m_pParent->m_pszName;
|
||||
}
|
||||
|
||||
int ConVar::GetSplitScreenPlayerSlot( void ) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : *value -
|
||||
|
||||
Loading…
Reference in New Issue
Block a user