mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 17:59:37 +00:00
WIP: fix compilation issues
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef IGAMECLIENTEXPORTS_H
|
||||
#define IGAMECLIENTEXPORTS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Exports a set of functions for the GameUI interface to interact with the game client
|
||||
//-----------------------------------------------------------------------------
|
||||
abstract_class IGameClientExports : public IBaseInterface
|
||||
{
|
||||
public:
|
||||
// ingame voice manipulation
|
||||
virtual bool IsPlayerGameVoiceMuted(int playerIndex) = 0;
|
||||
virtual void MutePlayerGameVoice(int playerIndex) = 0;
|
||||
virtual void UnmutePlayerGameVoice(int playerIndex) = 0;
|
||||
|
||||
// notification of gameui state changes
|
||||
virtual void OnGameUIActivated() = 0;
|
||||
virtual void OnGameUIHidden() = 0;
|
||||
|
||||
// if true, the gameui applies the blur effect
|
||||
virtual bool ClientWantsBlurEffect( void ) = 0;
|
||||
};
|
||||
|
||||
#define GAMECLIENTEXPORTS_INTERFACE_VERSION "GameClientExports001"
|
||||
|
||||
|
||||
#endif // IGAMECLIENTEXPORTS_H
|
||||
@@ -0,0 +1,41 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Exposes interfaces to the engine which allow the client to setup their own render targets
|
||||
// during the proper period of material system's init.
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef ICLIENTRENDERTARGETS_H
|
||||
#define ICLIENTRENDERTARGETS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "interface.h" // For base interface
|
||||
|
||||
class IMaterialSystem;
|
||||
class IMaterialSystemHardwareConfig;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
// Purpose: Exposes interfaces to the engine which allow the client to setup their own render targets
|
||||
// during the proper period of material system's init.
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
abstract_class IClientRenderTargets
|
||||
{
|
||||
public:
|
||||
// Pass the material system interface to the client-- Their Material System singleton has not been created
|
||||
// at the time they receive this call.
|
||||
virtual void InitClientRenderTargets( IMaterialSystem* pMaterialSystem, IMaterialSystemHardwareConfig* pHardwareConfig ) = 0;
|
||||
|
||||
// Call shutdown on every created refrence-- Clients keep track of this themselves
|
||||
// and should add shutdown code to this function whenever they add a new render target.
|
||||
virtual void ShutdownClientRenderTargets( void ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define CLIENTRENDERTARGETS_INTERFACE_VERSION "ClientRenderTargets001"
|
||||
|
||||
extern IClientRenderTargets * g_pClientRenderTargets;
|
||||
|
||||
#endif // ICLIENTRENDERTARGETS_H
|
||||
@@ -0,0 +1,68 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#if !defined( IVIEWPORT_H )
|
||||
#define IVIEWPORT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <vgui/VGUI.h>
|
||||
|
||||
#include "viewport_panel_names.h"
|
||||
|
||||
class KeyValues;
|
||||
|
||||
abstract_class IViewPortPanel
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~IViewPortPanel() {};
|
||||
|
||||
virtual const char *GetName( void ) = 0;// return identifer name
|
||||
virtual void SetData(KeyValues *data) = 0; // set ViewPortPanel data
|
||||
virtual void Reset( void ) = 0; // clears internal state, deactivates it
|
||||
virtual void Update( void ) = 0; // updates all (size, position, content, etc)
|
||||
virtual bool NeedsUpdate( void ) = 0; // query panel if content needs to be updated
|
||||
virtual bool HasInputElements( void ) = 0; // true if panel contains elments which accepts input
|
||||
virtual void ReloadScheme( void ) {}
|
||||
virtual bool CanReplace( const char *panelName ) const { return true; } // returns true if this panel can appear on top of the given panel
|
||||
virtual bool CanBeReopened( void ) const { return true; } // returns true if this panel can be re-opened after being hidden by another panel
|
||||
|
||||
virtual void ShowPanel( bool state ) = 0; // activate VGUI Frame
|
||||
|
||||
// VGUI functions:
|
||||
virtual vgui::VPANEL GetVPanel( void ) = 0; // returns VGUI panel handle
|
||||
virtual bool IsVisible() = 0; // true if panel is visible
|
||||
virtual void SetParent( vgui::VPANEL parent ) = 0;
|
||||
|
||||
virtual bool WantsBackgroundBlurred( void ) = 0;
|
||||
};
|
||||
|
||||
abstract_class IViewPort
|
||||
{
|
||||
public:
|
||||
virtual void UpdateAllPanels( void ) = 0;
|
||||
virtual void ShowPanel( const char *pName, bool state, KeyValues *data, bool autoDeleteData = true ) = 0;
|
||||
virtual void ShowPanel( const char *pName, bool state ) = 0;
|
||||
virtual void ShowPanel( IViewPortPanel* pPanel, bool state ) = 0;
|
||||
virtual void ShowBackGround(bool bShow) = 0;
|
||||
virtual IViewPortPanel* FindPanelByName(const char *szPanelName) = 0;
|
||||
virtual IViewPortPanel* GetActivePanel( void ) = 0;
|
||||
virtual void RecreatePanel( const char *szPanelName ) = 0;
|
||||
virtual void PostMessageToPanel( const char *pName, KeyValues *pKeyValues ) = 0;
|
||||
};
|
||||
|
||||
extern IViewPort *GetViewPortInterface();
|
||||
extern IViewPort *GetFullscreenViewPortInterface();
|
||||
|
||||
#endif // IVIEWPORT_H
|
||||
@@ -0,0 +1,198 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: provides an interface for dlls to query information about players from the game dll
|
||||
//
|
||||
//=============================================================================//
|
||||
#ifndef IPLAYERINFO_H
|
||||
#define IPLAYERINFO_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "mathlib/vector.h"
|
||||
|
||||
// helper class for user commands
|
||||
class CBotCmd
|
||||
{
|
||||
public:
|
||||
CBotCmd()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
virtual ~CBotCmd() { };
|
||||
|
||||
void Reset()
|
||||
{
|
||||
command_number = 0;
|
||||
tick_count = 0;
|
||||
viewangles.Init();
|
||||
forwardmove = 0.0f;
|
||||
sidemove = 0.0f;
|
||||
upmove = 0.0f;
|
||||
buttons = 0;
|
||||
impulse = 0;
|
||||
weaponselect = 0;
|
||||
weaponsubtype = 0;
|
||||
random_seed = 0;
|
||||
mousedx = 0;
|
||||
mousedy = 0;
|
||||
|
||||
hasbeenpredicted = false;
|
||||
}
|
||||
|
||||
CBotCmd& operator =( const CBotCmd& src )
|
||||
{
|
||||
if ( this == &src )
|
||||
return *this;
|
||||
|
||||
command_number = src.command_number;
|
||||
tick_count = src.tick_count;
|
||||
viewangles = src.viewangles;
|
||||
forwardmove = src.forwardmove;
|
||||
sidemove = src.sidemove;
|
||||
upmove = src.upmove;
|
||||
buttons = src.buttons;
|
||||
impulse = src.impulse;
|
||||
weaponselect = src.weaponselect;
|
||||
weaponsubtype = src.weaponsubtype;
|
||||
random_seed = src.random_seed;
|
||||
mousedx = src.mousedx;
|
||||
mousedy = src.mousedy;
|
||||
hasbeenpredicted = src.hasbeenpredicted;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// For matching server and client commands for debugging
|
||||
int command_number;
|
||||
|
||||
// the tick the client created this command
|
||||
int tick_count;
|
||||
|
||||
// Player instantaneous view angles.
|
||||
QAngle viewangles;
|
||||
// Intended velocities
|
||||
// forward velocity.
|
||||
float forwardmove;
|
||||
// sideways velocity.
|
||||
float sidemove;
|
||||
// upward velocity.
|
||||
float upmove;
|
||||
// Attack button states
|
||||
int buttons;
|
||||
// Impulse command issued.
|
||||
byte impulse;
|
||||
// Current weapon id
|
||||
int weaponselect;
|
||||
int weaponsubtype;
|
||||
|
||||
int random_seed; // For shared random functions
|
||||
|
||||
short mousedx; // mouse accum in x from create move
|
||||
short mousedy; // mouse accum in y from create move
|
||||
|
||||
// Client only, tracks whether we've predicted this command at least once
|
||||
bool hasbeenpredicted;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
abstract_class IPlayerInfo
|
||||
{
|
||||
public:
|
||||
// returns the players name (UTF-8 encoded)
|
||||
virtual const char *GetName() = 0;
|
||||
// returns the userid (slot number)
|
||||
virtual int GetUserID() = 0;
|
||||
// returns the string of their network (i.e Steam) ID
|
||||
virtual const char *GetNetworkIDString() = 0;
|
||||
// returns the team the player is on
|
||||
virtual int GetTeamIndex() = 0;
|
||||
// changes the player to a new team (if the game dll logic allows it)
|
||||
virtual void ChangeTeam( int iTeamNum ) = 0;
|
||||
// returns the number of kills this player has (exact meaning is mod dependent)
|
||||
virtual int GetFragCount() = 0;
|
||||
// returns the number of deaths this player has (exact meaning is mod dependent)
|
||||
virtual int GetDeathCount() = 0;
|
||||
// returns if this player slot is actually valid
|
||||
virtual bool IsConnected() = 0;
|
||||
// returns the armor/health of the player (exact meaning is mod dependent)
|
||||
virtual int GetArmorValue() = 0;
|
||||
|
||||
// extensions added to V2
|
||||
|
||||
// various player flags
|
||||
virtual bool IsHLTV() = 0;
|
||||
#if defined( REPLAY_ENABLED )
|
||||
virtual bool IsReplay() = 0;
|
||||
#endif
|
||||
virtual bool IsPlayer() = 0;
|
||||
virtual bool IsFakeClient() = 0;
|
||||
virtual bool IsDead() = 0;
|
||||
virtual bool IsInAVehicle() = 0;
|
||||
virtual bool IsObserver() = 0;
|
||||
|
||||
// player position and size
|
||||
virtual const Vector GetAbsOrigin() = 0;
|
||||
virtual const QAngle GetAbsAngles() = 0;
|
||||
virtual const Vector GetPlayerMins() = 0;
|
||||
virtual const Vector GetPlayerMaxs() = 0;
|
||||
// the name of the weapon currently being carried
|
||||
virtual const char *GetWeaponName() = 0;
|
||||
// the name of the player model in use
|
||||
virtual const char *GetModelName() = 0;
|
||||
// current player health
|
||||
virtual const int GetHealth() = 0;
|
||||
// max health value
|
||||
virtual const int GetMaxHealth() = 0;
|
||||
// the last user input from this player
|
||||
virtual CBotCmd GetLastUserCommand() = 0;
|
||||
};
|
||||
|
||||
|
||||
#define INTERFACEVERSION_PLAYERINFOMANAGER "PlayerInfoManager002"
|
||||
abstract_class IPlayerInfoManager
|
||||
{
|
||||
public:
|
||||
virtual IPlayerInfo *GetPlayerInfo( edict_t *pEdict ) = 0;
|
||||
virtual CGlobalVars *GetGlobalVars() = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
abstract_class IBotController
|
||||
{
|
||||
public:
|
||||
// change the bots position
|
||||
virtual void SetAbsOrigin( Vector & vec ) = 0;
|
||||
virtual void SetAbsAngles( QAngle & ang ) = 0;
|
||||
virtual void SetLocalOrigin( const Vector& origin ) = 0;
|
||||
virtual const Vector GetLocalOrigin( void ) = 0;
|
||||
virtual void SetLocalAngles( const QAngle& angles ) = 0;
|
||||
virtual const QAngle GetLocalAngles( void ) = 0;
|
||||
|
||||
// strip them of weapons, etc
|
||||
virtual void RemoveAllItems( bool removeSuit ) = 0;
|
||||
// give them a weapon
|
||||
virtual void SetActiveWeapon( const char *WeaponName ) = 0;
|
||||
// called after running a move command
|
||||
virtual void PostClientMessagesSent( void ) = 0;
|
||||
// check various effect flags
|
||||
virtual bool IsEFlagSet( int nEFlagMask ) = 0;
|
||||
// fire a virtual move command to the bot
|
||||
virtual void RunPlayerMove( CBotCmd *ucmd ) = 0;
|
||||
};
|
||||
|
||||
|
||||
#define INTERFACEVERSION_PLAYERBOTMANAGER "BotManager001"
|
||||
abstract_class IBotManager
|
||||
{
|
||||
public:
|
||||
virtual IBotController *GetBotController( edict_t *pEdict ) = 0;
|
||||
// create a new bot and spawn it into the server
|
||||
virtual edict_t *CreateBot( const char *botname ) = 0;
|
||||
};
|
||||
|
||||
#endif // IPLAYERINFO_H
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "ai_component.h"
|
||||
#include "ai_basenpc.h"
|
||||
#include "ai_default.h"
|
||||
#include "AI_Criteria.h"
|
||||
#include "ai_criteria.h"
|
||||
#include "networkvar.h"
|
||||
#include "delegates.h"
|
||||
#include "tier1/utlvector.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "basemultiplayerplayer.h"
|
||||
#include "ai_baseactor.h"
|
||||
//#include "flex_expresser.h"
|
||||
#include "scenefilecache/iscenefilecache.h"
|
||||
#include "scenefilecache/ISceneFileCache.h"
|
||||
/*
|
||||
#include "engine/ienginesound.h"
|
||||
#include "keyvalues.h"
|
||||
|
||||
@@ -198,7 +198,6 @@ public:
|
||||
|
||||
unsigned int operator()( const NavVisPair_t &item ) const
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(CNavArea *) == 4 );
|
||||
int key[2] = { (int)item.pAreas[0] + item.pAreas[1]->GetID(), (int)item.pAreas[1] + item.pAreas[0]->GetID() };
|
||||
return Hash8( key );
|
||||
}
|
||||
|
||||
+2
-1
@@ -43,6 +43,7 @@ def build(bld):
|
||||
|
||||
includes = [
|
||||
'.',
|
||||
'../public',
|
||||
'../shared',
|
||||
'../../utils/common',
|
||||
'../shared/econ',
|
||||
@@ -50,7 +51,7 @@ def build(bld):
|
||||
'../../common',
|
||||
'../../public/tier0',
|
||||
'../../public/tier1',
|
||||
'../../public'
|
||||
'../../public',
|
||||
]
|
||||
|
||||
defines = []
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
#include "cbase.h"
|
||||
#include "env_wind_shared.h"
|
||||
#include "soundenvelope.h"
|
||||
#include "ieffects.h"
|
||||
#include "engine/ienginesound.h"
|
||||
#include "IEffects.h"
|
||||
#include "engine/IEngineSound.h"
|
||||
#include "sharedinterface.h"
|
||||
#include "renderparm.h"
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ ISaveRestoreOps *GetPhysObjSaveRestoreOps( PhysInterfaceId_t );
|
||||
//-------------------------------------
|
||||
|
||||
#define DEFINE_PHYSPTR(name) \
|
||||
{ FIELD_CUSTOM, #name, offsetof(classNameTypedef,name), 1, FTYPEDESC_SAVE, NULL, GetPhysObjSaveRestoreOps( GetPhysIID( &(((classNameTypedef *)0)->name) ) ), NULL }
|
||||
{ FIELD_CUSTOM, #name, {offsetof(classNameTypedef,name), 0}, 1, FTYPEDESC_SAVE, NULL, GetPhysObjSaveRestoreOps( GetPhysIID( &(((classNameTypedef *)0)->name) ) ), NULL }
|
||||
|
||||
#define DEFINE_PHYSPTR_ARRAY(name) \
|
||||
{ FIELD_CUSTOM, #name, offsetof(classNameTypedef,name), ARRAYSIZE(((classNameTypedef *)0)->name), FTYPEDESC_SAVE, NULL, GetPhysObjSaveRestoreOps( GetPhysIID( &(((classNameTypedef *)0)->name[0]) ) ), NULL }
|
||||
{ FIELD_CUSTOM, #name, {offsetof(classNameTypedef,name), 0}, ARRAYSIZE(((classNameTypedef *)0)->name), FTYPEDESC_SAVE, NULL, GetPhysObjSaveRestoreOps( GetPhysIID( &(((classNameTypedef *)0)->name[0]) ) ), NULL }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
(fieldtype_t)FIELD_TYPE,
|
||||
"elems",
|
||||
0,
|
||||
{ 0, 0 },
|
||||
1,
|
||||
FTYPEDESC_SAVE,
|
||||
NULL,
|
||||
@@ -50,8 +50,9 @@ public:
|
||||
1,
|
||||
"uv",
|
||||
NULL,
|
||||
false,
|
||||
false,
|
||||
0,
|
||||
NULL,
|
||||
#ifdef _DEBUG
|
||||
true
|
||||
#endif
|
||||
@@ -86,7 +87,7 @@ public:
|
||||
{
|
||||
(fieldtype_t)FIELD_TYPE,
|
||||
"elems",
|
||||
0,
|
||||
{ 0, 0 },
|
||||
1,
|
||||
FTYPEDESC_SAVE,
|
||||
NULL,
|
||||
@@ -102,8 +103,9 @@ public:
|
||||
1,
|
||||
"uv",
|
||||
NULL,
|
||||
false,
|
||||
false,
|
||||
0,
|
||||
NULL,
|
||||
#ifdef _DEBUG
|
||||
true
|
||||
#endif
|
||||
@@ -171,10 +173,10 @@ public:
|
||||
//-------------------------------------
|
||||
|
||||
#define DEFINE_UTLVECTOR(name,fieldtype) \
|
||||
{ FIELD_CUSTOM, #name, offsetof(classNameTypedef,name), 1, FTYPEDESC_SAVE, NULL, CUtlVectorDataopsInstantiator<fieldtype>::GetDataOps(&(((classNameTypedef *)0)->name)), NULL }
|
||||
{ FIELD_CUSTOM, #name, { offsetof(classNameTypedef,name), 0 }, 1, FTYPEDESC_SAVE, NULL, CUtlVectorDataopsInstantiator<fieldtype>::GetDataOps(&(((classNameTypedef *)0)->name)), NULL }
|
||||
|
||||
#define DEFINE_GLOBAL_UTLVECTOR(name,fieldtype) \
|
||||
{ FIELD_CUSTOM, #name, offsetof(classNameTypedef,name), 1, FTYPEDESC_SAVE|FTYPEDESC_GLOBAL, NULL, CUtlVectorDataopsInstantiator<fieldtype>::GetDataOps(&(((classNameTypedef *)0)->name)), NULL }
|
||||
{ FIELD_CUSTOM, #name, { offsetof(classNameTypedef,name), 0 }, 1, FTYPEDESC_SAVE|FTYPEDESC_GLOBAL, NULL, CUtlVectorDataopsInstantiator<fieldtype>::GetDataOps(&(((classNameTypedef *)0)->name)), NULL }
|
||||
|
||||
|
||||
#endif // SAVERESTORE_UTLVECTOR_H
|
||||
|
||||
@@ -99,7 +99,7 @@ class ISaveRestoreOps;
|
||||
ISaveRestoreOps *GetSoundSaveRestoreOps( );
|
||||
|
||||
#define DEFINE_SOUNDPATCH(name) \
|
||||
{ FIELD_CUSTOM, #name, offsetof(classNameTypedef,name), 1, FTYPEDESC_SAVE, NULL, GetSoundSaveRestoreOps( ), NULL }
|
||||
{ FIELD_CUSTOM, #name, {offsetof(classNameTypedef,name), 0}, 1, FTYPEDESC_SAVE, NULL, GetSoundSaveRestoreOps( ), NULL }
|
||||
|
||||
|
||||
#endif // SOUNDENVELOPE_H
|
||||
|
||||
@@ -451,7 +451,7 @@ void UTIL_TraceEntity( CBaseEntity *pEntity, const Vector &vecAbsStart, const Ve
|
||||
|
||||
bool UTIL_EntityHasMatchingRootParent( CBaseEntity *pRootParent, CBaseEntity *pEntity );
|
||||
|
||||
inline int UTIL_PointContents( const Vector &vec, int contentsMask )
|
||||
inline int UTIL_PointContents( const Vector &vec, int contentsMask = 0 )
|
||||
{
|
||||
return enginetrace->GetPointContents( vec, contentsMask );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user