nyuuzyou/wikis huggingface dataset:
IGameConsole

This interface can help you manage the console using the GameUI module rather than using the corresponding ConCommands & ConVars. You can also print out messages in whatever color you'd like. It is not included in any of the SDK code.
==public\gameui\IGameConsole.h==
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose: 
//
//=============================================================================
#ifndef IGAMECONSOLE_H
#define IGAMECONSOLE_H
#ifdef _WIN32
#pragma once
#endif
#include "interface.h"
#include <vgui\VGUI.h>
class Color;
using namespace vgui;
//-----------------------------------------------------------------------------
// Purpose: interface to game/dev console
//-----------------------------------------------------------------------------
class IGameConsole : public IBaseInterface
{
public:
	// activates the console, makes it visible and brings it to the foreground
	virtual void	Activate() = 0;
	virtual void	Initialize() = 0;
	// hides the console
	virtual void	Hide() = 0;
	// clears the console
	virtual void	Clear() = 0;
	// return true if the console has focus
	virtual bool	IsConsoleVisible() = 0;
	// prints a message to the console
	virtual void	Printf(const char *format, ...) = 0;
	// printes a debug message to the console
	virtual void	DPrintf(const char *format, ...) = 0;
	// printes a debug message to the console
	virtual void	ColorPrintf( Color& clr, const char *format, ...) = 0;
	virtual void	SetParent( VPANEL parent ) = 0;
};
#define GAMECONSOLE_INTERFACE_VERSION "GameConsole003"
#endif // IGAMECONSOLE_H
==Access==
These lines go in the client/server init files: 
 #include <gameui\IGameConsole.h>
 IGameConsole *gameconsole = NULL;
 	CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll");
 	gameconsole = (IGameConsole *)gameUIFactory(GAMECONSOLE_INTERFACE_VERSION, NULL);
Category:Interfaces
IGameEventManager

The IGameEventManager2-class makes it possible to fire & catch events. Events are "messages" sent by the server and are "catchable" on the server & client. A good example is player_death. An event that is fired when a player dies.
== For modcode ==
=== Subscribing to events ===
You can subscribe at events with the function AddListener to add an instance of IGameEventListener2 to the event, for more information see Networking Events & Messages.
It's possible to catch all events but most of the time, due performance-reasons, only catching certain events would be smarter.
Catching all events on the server:
gameeventmanager->AddListener( this, true );
Catching a certain event on the server:
gameeventmanager->AddListener( this, "event_name", true );
Catching an event on the client:
gameeventmanager->AddListener( this, "event_name", false );
=== Catching events ===
Catching events is easy. Only adding the function void FireGameEvent( IGameEvent* event ) is enough.
Example:
void FireGameEvent( IGameEvent* event )
{
 if ( Q_strcmp(event->GetName(), "player_connect") == 0 )
 Msg("The player %d has connected!\n", event->GetInt("userid") );
}
=== Adding events ===
Custom events need to be added to the file resource/ModEvents.res before they can be used in the code.
== For plugins ==
=== Note on IGameEventManager2 ===
With the release of the August 6 SDK, the IGameEventManager was upgraded to version 2. This version allows for registering for only the events that are explicitly desired instead of registering for all events.
=== Getting an Instance if the IGameEventManager2 ===
bool Plugin::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory ) {
	IGameEventManager2* gameeventmanager = 
		(IGameEventManager2*) interfaceFactory( INTERFACEVERSION_GAMEEVENTSMANAGER2, NULL);
}
=== Subscribing To Events ===
void Plugin::LevelInit( char const* pMapName ) {
	Msg( "Level \"%s\" has been loaded\n", pMapName );
	gameeventmanager->AddListener( this, "player_say", true );
}
=== Catching events ===
class Plugin :
	public IGameEventListener2 {
	virtual void FireGameEvent( IGameEvent* event ) {
		const char* eventName = event->GetName();
		if( FStrEq( eventName, "player_say") ) {
			int userId = event->GetInt( "userid");
			const char* text = event->GetString( "text");
			Msg( "Got player_say event: userid=%i text=%s\n", userId, text);
		}
	}
}
== See also ==
* Networking Events & Messages
Category:Programming
Category:Interfaces
IGameSystem Derived Systems

There are a couple of sub implementations of IGameSystem that have slightly modified functionality. Some are simplified, and others are called per frame. This list divides classes up by the most derived version of IGameSystem it inherits from.
==IGameSystem==
Effects:
*CClientEffectPrecacheSystem - Responsible for caching client effects
*CViewportClientSystem - Manages the client viewport
*IDetailObjectSystem - Manages detail objects
===CBaseGameSystem===
*CGameStringPool
*CSoundEmitterSystem
===CAutoGameSystem===
*CAsyncCaptionResourceManager - Manages instance
*CBulletWhizTimer
*CDataObjectAccessSystem
*CDecalEmitterSystem
*CDirtySpatialPartitionEntityList
*CEZParticleInit
*CFlexSceneFileManager
*CGlowOverlaySystem
*CPixelVisibilitySystem
==IGameSystemPerFrame==
*CClientThinkList
*IClientLeafSystem
*IClientShadowMgr
===CBaseGameSystemPerFrame===
*C_SoundscapeSystem
*CPerfVisualBenchmark
*CToolFrameworkClient
===CAutoGameSystemPerFrame===
*C_GameRules
*CAntlionGibManager
*CPhysicsSystem
*CPrecipHack
*CRagdollLRURetirement
*CSoundControllerImp
IGameUI

IGameUI is an interface that allows you to have some access to the GameUI module. The include file is found in every SDK except Source 2006. The code below is the lost file from that branch.
==common\gameui\IGameUI.h==
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================
#ifndef IGAMEUI_H
#define IGAMEUI_H
#ifdef _WIN32
#pragma once
#endif
#include "interface.h"
struct cl_enginefuncs_s;
class IBaseSystem;
//-----------------------------------------------------------------------------
// Purpose: contains all the functions that the GameUI dll exports
//			GameUI_GetInterface() is exported via dll export table to get this table
//-----------------------------------------------------------------------------
class IGameUI : public IBaseInterface
{
public:
	virtual void 	Initialize( CreateInterfaceFn *factories, int count ) = 0;
	virtual void	Start(struct cl_enginefuncs_s *engineFuncs, int interfaceVersion, IBaseSystem *system) = 0;
	virtual void	Shutdown() = 0;
	virtual int	ActivateGameUI() = 0;	// activates the menus, returns 0 if it doesn't want to handle it
	virtual int	ActivateDemoUI() = 0;	// activates the demo player, returns 0 if it doesn't want to handle it
	virtual int	HasExclusiveInput() = 0;
	virtual void	RunFrame() = 0;
	virtual void	ConnectToServer(const char *game, int IP, int port) = 0;
	virtual void	DisconnectFromServer() = 0;
	virtual void	HideGameUI() = 0;
	virtual bool	IsGameUIActive() = 0;
	
	virtual void	LoadingStarted(const char *resourceType, const char *resourceName) = 0;
	virtual void	LoadingFinished(const char *resourceType, const char *resourceName) = 0;
	virtual void	StartProgressBar(const char *progressType, int numProgressPoints) = 0;
	virtual int	ContinueProgressBar(int progressPoint, float progressFraction) = 0;
	virtual void	StopProgressBar(bool bError, const char *failureReasonIfAny, const char *extendedReason) = 0;
	virtual int	SetProgressBarStatusText(const char *statusText) = 0;
 
	virtual void	GetSteamPassword( const char *szAccountName, const char *szUserName ) = 0;
	virtual void	ValidateCDKey(bool force, bool inConnect) = 0;
};
// the interface version is the number to call GameUI_GetInterface(int interfaceNumber) with
#define GAMEUI_INTERFACE_VERSION "GameUI011"
#endif // IGAMEUI_H
==Notes==
Later branches include functions for bonus maps, Xbox 360 integration, and menu interaction. Check your SDK branch for the actual list of functions in the IGameUI.h file.
==Access==
These lines go in the client/server init files:
#include <gameui\IGameUI.h>
IGameUI *gameui = NULL;
	CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll");
	gameui = (IGameUI *)gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL);
Category:Interfaces
IInput

IInput is a client interface that packages user input from keyboards, mice and joysticks/gamepads into usercmds for transmission to the server. It also handles third-person cameras.
Conventionally, each type of supported peripheral has its own CPP file. Valve's CInput interface implementation is in in_main.cpp (for usercmd packaging and keyboard), in_mouse.cpp and in_joystick.cpp.
== Minimum implementation ==
static CInput g_Input;
IInput* input = (IInput*)&g_Input;
== See also ==
* CInput, Valve's basic IInput implementation
Category:Interfaces
INFRA

is a singleplayer adventure game developed by Loiste Interactive created using the Source Engine. Set in the fictional Baltic City of Stalburg, the player must solve a variety of mechanical and electrical puzzles and visit dozens of unique locations, each with distinct gameplay all while avoiding hazards of the city's decaying infrastructure.
The game was released in an episodic format of three acts in total, the latter two being available for free as downloadable content. The final act was released on September 27th, 2017.
== Features ==
Improved shadow mapping
: Up to eight env_projectedtexture entities can be used at once, based on the Portal 2 implementation.
Increased engine limits
: More brushes and entities can be used within a single level allowing for larger and more detailed levels.
Category:INFRA Category:Portal 2 engine branch games
INetChannelInfo

INetChannelInfo is an engine interface that provides information about connected clients. It is available from the moment that a client connects.
There is no way to get the player's name, userid or edict from INetChannelInfo.
== Usage ==
INetChannelInfo* netinfo = engine->GetPlayerNetInfo(int playerIndex);
== Notable members ==
; char* GetName()
: The name of the connection - not of the player. Typically (always?) the user's IP address.
; float GetAvgLatency(int flow)
; float GetAvgLoss(int flow)
; float GetAvgChoke(int flow)
; etc...
: Functions that require a "flow" argument expect FLOW_OUTGOING, FLOW_INCOMING, or MAX_FLOWS (in + out).
== See also ==
* IPlayerInfo
* player_info_t
Category:NetworkingN
IPhysicsObject

IPhysicsObject is the basic representation of a rigid VPhysics object. It is shared between the server, client and VPhysics libraries.
== Getting and setting ==
* If you just want to create a physics object for your entity's model, use a VPhysicsInit*() function.
* An entity's main physics object can be accessed with CBaseEntity::VPhysicsGetObject(), while a list of all its objects is returned by VPhysicsGetObjectList().
* New IPhysicsObjects can be created with the physenv->Create*() functions, or with the global PhysModelCreate*() helpers. 
== Member functions ==
=== State ===
; Wake()
; Sleep()
: To improve performance physics objects will go to sleep after a second or so of inactivity. They will be woken by interaction with another object, but not by changes to their own internal state. If you change a simulation property of the object and want it to respond immediately, make sure that you Wake() it!
; GetCollide()
: Gets this object's CPhysCollide (the actual geometry it represents).
; BecomeTrigger()
; RemoveTrigger()
: 
; EnableCollisions()
; EnableGravity()
; EnableDrag()
; EnableMotion()
: Various simulation features that can be enabled or disabled per-object.
=== Properties ===
; SetMass()
; SetInertia()
: Overrides this object's mass (in kilos) and inertia ().
; SetDamping()
: 
; SetDragCoefficient()
: Set friction. 
; SetBuoyancyRatio()
: Sets how much upward force is exerted on the object (relative to its mass) whenever it is in water. 0 means that the object sinks, while >1 results in the object bouncing off the surface with increasing violence.
: Source does not simulate water pressure, so genuine buoyancy is not possible.
=== Forces ===
; ApplyForceCenter()
; ApplyForceOffset()
: Applies a inch per second per kilogram force relative to the world. If you specify an offset the force comes from a specific location, otherwise it applies evenly across the whole object.
; ApplyTorqueCenter()
: Applies a degrees per second per kilogram () rotation relative to the world.
; AddVelocity()
; SetVelocity()
; SetVelocityInstantaneous()
: Adds or sets velocity (inch/s) and torque (degrees/s) in a physically incorrect way that affects the object regardless of its current mass/inertia.
; SetPosition()
; SetPositionMatrix()
: Teleports the object to a new location. 
== Multiple IPhysicsObjects ==
An entity can represent up to 1024 IPhysicsObjects. This happens in Valve's code with vehicle wheels and whenever a model has $collisionjoints (the "must all be convex" limitation of which is imposed by studiomdl, not the engine).
See multi_phys for an example entity that performs all of the jobs needed for multiple IPhysicsObjects.
Category:Physics
P
IPlayerInfo

IPlayerInfo is a server interface that provides data about connected users, accessed through IPlayerInfoManager. Since both interfaces are defined in the server library, game-specific versions are possible.
== Example ==
#include "game/server/iplayerinfo.h"
IPlayerInfoManager* playerinfomanager; // give globals global scope
bool CMyServerPlugin::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory)
{
	playerinfomanager = (IPlayerInfoManager*)gameServerFactory(INTERFACEVERSION_PLAYERINFOMANAGER,NULL);
	if (!playerinfomanager)
	{
		Warning("Could not access IPlayerInfoManager!\n");
		return false;
	}
	
	IPlayerInfo* info = playerinfomanager->GetPlayerInfo(engine->PEntityOfEntIndex(1)); // first player
	if (info)
		Msg("Player 1 is %s, with %i health\n",info->GetName(),info->GetHealth());
	else
		Msg("Player 1 has not spawned\n");
		
	return true;
}
== See also ==
* player_info_t
* INetChannelInfo
P
IScheme

This interface has major implementation with VGUI2.
 //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
 //
 // Purpose: 
 //
 // $NoKeywords: $
 //=============================================================================//
 
 #ifndef ISCHEME_H
 #define ISCHEME_H
 
 #ifdef _WIN32
 #pragma once
 #endif
 
 #include <vgui/VGUI.h>
 #include "interface.h"
 
 class Color;
 
 namespace vgui
 {
 
 typedef unsigned long HScheme;
 typedef unsigned long HTexture;
 
 class IBorder;
 class IImage;
 
 //-----------------------------------------------------------------------------
 // Purpose: Holds all panel rendering data
 //			This functionality is all wrapped in the Panel::GetScheme*() functions
 //-----------------------------------------------------------------------------
 class IScheme : public IBaseInterface
 {
 public:
 	// gets a string from the default settings section
 	virtual const char *GetResourceString(const char *stringName) = 0;
 
 	// returns a pointer to an existing border
 	virtual IBorder *GetBorder(const char *borderName) = 0;
 
 	// returns a pointer to an existing font
 	virtual HFont GetFont(const char *fontName, bool proportional = false) = 0;
 
 	// inverse font lookup
 	virtual char const *GetFontName( const HFont& font ) = 0;
 
 	// colors
 	virtual Color GetColor(const char *colorName, Color defaultColor) = 0;
 };
 
 } // namespace vgui
 
 
 #endif // ISCHEME_H
==See also==
* ISurface
Category:Interfaces
ISchemeManager

This interface has major implementation with VGUI2.
 //======================= Copyright © 1996-2005, Valve Corporation, All rights reserved. =======================//
 //
 // Purpose: 
 //
 // $NoKeywords: $
 //==============================================================================================================//
 
 #ifndef ISCHEME_H
 #define ISCHEME_H
 
 #ifdef _WIN32
 #pragma once
 #endif
 
 #include <vgui/VGUI.h>
 #include "interface.h"
 
 class Color;
 
 namespace vgui
 {
 
 typedef unsigned long HScheme;
 typedef unsigned long HTexture;
 
 class IBorder;
 class IImage;
 
 class ISchemeManager: public IBaseInterface
 {
 public:
 	// loads a scheme from a file
 	// first scheme loaded becomes the default scheme, and all subsequent loaded scheme are derivatives of that
 	virtual HScheme LoadSchemeFromFile(const char *fileName, const char *tag) = 0;
 
 	// reloads the scheme from the file - should only be used during development
 	virtual void ReloadSchemes() = 0;
 
 	// reloads scheme fonts
 	virtual void ReloadFonts() = 0;
 
 	// returns a handle to the default (first loaded) scheme
 	virtual HScheme GetDefaultScheme() = 0;
 
 	// returns a handle to the scheme identified by "tag"
 	virtual HScheme GetScheme(const char *tag) = 0;
 
 	// returns a pointer to an image
 	virtual IImage *GetImage(const char *imageName, bool hardwareFiltered) = 0;
 	virtual HTexture GetImageID(const char *imageName, bool hardwareFiltered) = 0;
 
 	// This can only be called at certain times, like during paint()
 	// It will assert-fail if you call it at the wrong time...
 
 	// FIXME: This interface should go away!!! It's an icky back-door
 	// If you're using this interface, try instead to cache off the information
 	// in ApplySchemeSettings
 	virtual IScheme *GetIScheme( HScheme scheme ) = 0;
 
 	// unload all schemes
 	virtual void Shutdown( bool full = true ) = 0;
 
 	// gets the proportional coordinates for doing screen-size independent panel layouts
 	// use these for font, image and panel size scaling (they all use the pixel height of the display for scaling)
 	virtual int GetProportionalScaledValue(int normalizedValue) = 0;
 	virtual int GetProportionalNormalizedValue(int scaledValue) = 0;
 };
 
 #define VGUI_SCHEME_INTERFACE_VERSION "VGUI_Scheme010"
 
 
 } // namespace vgui
 
 
 #endif // ISCHEME_H
Category:Interfaces
ITexture

This interface provides access to individual textures.
 //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
 //
 // Purpose: 
 //
 // $NoKeywords: $
 //
 //=============================================================================//
 
 #ifndef ITEXTURE_H
 #define ITEXTURE_H
 
 #ifdef _WIN32
 #pragma once
 #endif
 
 enum ImageFormat;
 class IVTFTexture;
 class ITexture;
 struct Rect_t;
 
 class ITexture
 {
 public:
 	// Various texture polling methods
 	virtual const char *GetName( void ) const = 0;
 	virtual int GetMappingWidth() const = 0;
 	virtual int GetMappingHeight() const = 0;
 	virtual int GetActualWidth() const = 0;
 	virtual int GetActualHeight() const = 0;
 	virtual int GetNumAnimationFrames() const = 0;
 	virtual bool IsTranslucent() const = 0;
 	virtual bool IsMipmapped() const = 0;
 
 	virtual void GetLowResColorSample( float s, float t, float *color ) const = 0;
 
 	// Methods associated with reference count
 	virtual void IncrementReferenceCount( void ) = 0;
 	virtual void DecrementReferenceCount( void ) = 0;
 
 	// Used to modify the texture bits (procedural textures only)
 	virtual void SetTextureRegenerator( ITextureRegenerator *pTextureRegen ) = 0;
 
 	// Reconstruct the texture bits in HW memory
 
 	// If rect is not specified, reconstruct all bits, otherwise just
 	// reconstruct a subrect.
 	virtual void Download( Rect_t *pRect = 0 ) = 0;
 
 	// Uses for stats. . .get the approximate size of the texture in it's current format.
 	virtual int GetApproximateVidMemBytes( void ) const = 0;
 
 	// Returns true if the texture data couldn't be loaded.
 	virtual bool IsError() const = 0;
 };
 
 
 inline bool IsErrorTexture( ITexture *pTex )
 {
 	return !pTex || pTex->IsError();
 }
 
 #endif // ITEXTURE_H
Category:Interfaces
ITextureRegenerator

;Location:public\materialsystem\itexture.h
;Purpose:The job ITextureRegenerator class is to change the pixel values of any procedural texture that uses a regenerator that implements this class.
 //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
 //
 // Purpose: 
 //
 // $NoKeywords: $
 //
 //=============================================================================//
 
 #ifndef ITEXTURE_H
 #define ITEXTURE_H
 
 #ifdef _WIN32
 #pragma once
 #endif
 
 enum ImageFormat;
 class IVTFTexture;
 class ITexture;
 struct Rect_t;
 
 //-----------------------------------------------------------------------------
 // This will get called on procedural textures to re-fill the textures
 // with the appropriate bit pattern. Calling Download() will also
 // cause this interface to be called. It will also be called upon
 // mode switch, or on other occasions where the bits are discarded.
 //-----------------------------------------------------------------------------
 class ITextureRegenerator
 {
 public:
 	// This will be called when the texture bits need to be regenerated.
 	// Use the VTFTexture interface, which has been set up with the
 	// appropriate texture size + format
 	// The rect specifies which part of the texture needs to be updated
 	// You can choose to update all of the bits if you prefer
 	virtual void RegenerateTextureBits( ITexture *pTexture, IVTFTexture *pVTFTexture, Rect_t *pRect ) = 0;
 
 	// This will be called when the regenerator needs to be deleted
 	// which will happen when the texture is destroyed
 	virtual void Release() = 0;
 };
 
 inline bool IsErrorTexture( ITexture *pTex )
 {
 	return !pTex || pTex->IsError();
 }
 
 #endif // ITEXTURE_H
== See also ==
* Procedural Materials
Category:Interfaces
IVGuiModuleLoader

With this interface not included in the SDK, you can activate the server browser module and the friends module.
==public\gameui\IVGuiModuleLoader.h==
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================
#ifndef IVGUIMODULELOADER_H
#define IVGUIMODULELOADER_H
#ifdef _WIN32
#pragma once
#endif
#include "interface.h"
#define APP_FRIENDS 0
#define APP_SERVERS 1
//-----------------------------------------------------------------------------
// Purpose: interface to accessing all loaded modules
//-----------------------------------------------------------------------------
class IVGuiModuleLoader : public IBaseInterface
{
public:
	virtual int			GetModuleCount() = 0;
	virtual const char *		GetModuleLabel(int moduleIndex) = 0;
	virtual CreateInterfaceFn	GetModuleFactory(int moduleIndex) = 0;
	virtual bool			ActivateModule(int moduleIndex) = 0;
	virtual bool			ActivateModule(const char *moduleName) = 0;
	virtual void			SetPlatformToRestart() = 0;
};
#define VGUIMODULELOADER_INTERFACE_VERSION "VGuiModuleLoader003"
#endif // IVGUIMODULELOADER_H
==Access==
These lines go in the client/server init files: 
 #include <gameui\IVGuiModuleLoader.h>
 IVGuiModuleLoader * moduleloader = NULL;
 	CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll");
 	moduleloader = (IVGuiModuleLoader *)gameUIFactory(VGUIMODULELOADER_INTERFACE_VERSION, NULL);
Category:Interfaces
IVehicle

This interface class is defined in src\game_shared\IVehicle.h. This class is the interface from which vehicles are derived. It is used by the player to access vehicles.
 class IVehicle
 {
 public:
 	// Get and set the current driver. Use PassengerRole_t enum in shareddefs.h for adding passengers
 	virtual CBasePlayer*	GetPassenger( int nRole = VEHICLE_DRIVER ) = 0;
 	virtual int				GetPassengerRole( CBasePlayer *pPassenger ) = 0;
 	
 	// Where is the passenger seeing from?
 	virtual void			GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles ) = 0;
 
 	// Does the player use his normal weapons while in this mode?
 	virtual bool			IsPassengerUsingStandardWeapons( int nRole = VEHICLE_DRIVER ) = 0;
 
 	// Process movement
 	virtual void			SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) = 0;
 	virtual void			ProcessMovement( CBasePlayer *pPlayer, CMoveData *pMoveData ) = 0;
 	virtual void			FinishMove( CBasePlayer *player, CUserCmd *ucmd, CMoveData *move ) = 0;
 
 	// Process input
 	virtual void			ItemPostFrame( CBasePlayer *pPlayer ) = 0;
 }
Category:Interfaces