Initial commit.
* Beginning reconstruction of Source SDK. Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
29
include/cstrike/Interfaces/IBaseClientDLL.h
Normal file
29
include/cstrike/Interfaces/IBaseClientDLL.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
class ClientClass;
|
||||
|
||||
enum ClientFrameStage_t: int {
|
||||
FRAME_UNDEFINED = -1,
|
||||
FRAME_START,
|
||||
FRAME_NET_UPDATE_START,
|
||||
FRAME_NET_UPDATE_POSTDATAUPDATE_START,
|
||||
FRAME_NET_UPDATE_POSTDATAUPDATE_END,
|
||||
FRAME_NET_UPDATE_END,
|
||||
FRAME_RENDER_START,
|
||||
FRAME_RENDER_END
|
||||
};
|
||||
|
||||
class IBaseClientDLL {
|
||||
public:
|
||||
ClientClass* GetAllClasses() {
|
||||
return GetVirtualFunction<ClientClass*(*)(IBaseClientDLL*)>(this, 8)(this);
|
||||
}
|
||||
|
||||
void CreateMove(int sequence, float frametime, bool active) {
|
||||
return GetVirtualFunction<void(*)(IBaseClientDLL*, int, float, bool)>(this, 21)(this, sequence, frametime, active);
|
||||
}
|
||||
|
||||
void FrameStageNotify(ClientFrameStage_t stage) {
|
||||
return GetVirtualFunction<void(*)(IBaseClientDLL*, ClientFrameStage_t)>(this, 35)(this, stage);
|
||||
}
|
||||
};
|
||||
19
include/cstrike/Interfaces/IClientEntityList.h
Normal file
19
include/cstrike/Interfaces/IClientEntityList.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
class CBaseHandle;
|
||||
class IClientEntity;
|
||||
class IClientNetworkable;
|
||||
class IClientUnknown;
|
||||
|
||||
class IClientEntityList {
|
||||
public:
|
||||
virtual IClientNetworkable* GetClientNetworkable(int entindex) = 0;
|
||||
virtual IClientNetworkable* GetClientNetworkableFromHandle(CBaseHandle handle) = 0;
|
||||
virtual IClientUnknown* GetClientUnknownFromHandle(CBaseHandle handle) = 0;
|
||||
virtual IClientEntity* GetClientEntity(int entindex) = 0;
|
||||
virtual IClientEntity* GetClientEntityFromHandle(CBaseHandle handle) = 0;
|
||||
virtual int NumberOfEntities(bool include_non_networkable) = 0;
|
||||
virtual int GetHighestEntityIndex(void) = 0;
|
||||
virtual void SetMaxEntities(int max_entities) = 0;
|
||||
virtual int GetMaxEntities() = 0;
|
||||
};
|
||||
12
include/cstrike/Interfaces/ICvar.h
Normal file
12
include/cstrike/Interfaces/ICvar.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
class ICvar {
|
||||
public:
|
||||
template <typename... Values> void ConsoleColorPrintf(const Color& MsgColor, const char* Format, Values... Parameters) {
|
||||
return GetVirtualFunction<void(*)(ICvar*, const Color&, const char*, ...)>(this, 23)(this, MsgColor, Format, Parameters...);
|
||||
}
|
||||
|
||||
template <typename... Values> void ConsoleDPrintf(const char* Format, Values... Parameters) {
|
||||
return GetVirtualFunction<void(*)(ICvar*, const char*, ...)>(this, 24)(this, Format, Parameters...);
|
||||
}
|
||||
};
|
||||
48
include/cstrike/Interfaces/IGameEventManager2.h
Normal file
48
include/cstrike/Interfaces/IGameEventManager2.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#define EVENT_DEBUG_ID_INIT 42
|
||||
#define EVENT_DEBUG_ID_SHUTDOWN 13
|
||||
|
||||
class bf_read;
|
||||
class bf_write;
|
||||
|
||||
class IGameEvent {
|
||||
public:
|
||||
virtual ~IGameEvent() {};
|
||||
virtual const char* GetName() const = 0;
|
||||
virtual bool IsReliable() const = 0;
|
||||
virtual bool IsLocal() const = 0;
|
||||
virtual bool IsEmpty(const char* key = 0) = 0;
|
||||
virtual bool GetBool(const char* key = 0, bool default_value = false) = 0;
|
||||
virtual int GetInt(const char* key = 0, int default_value = 0) = 0;
|
||||
virtual float GetFloat(const char* key = 0, float default_value = 0.0f) = 0;
|
||||
virtual const char* GetString(const char* key = 0, const char* default_value = "") = 0;
|
||||
virtual void SetBool(const char* key, bool value) = 0;
|
||||
virtual void SetInt(const char* key, int value) = 0;
|
||||
virtual void SetFloat(const char* key, float value) = 0;
|
||||
virtual void SetString(const char* key, const char* value) = 0;
|
||||
};
|
||||
|
||||
class IGameEventListener2 {
|
||||
public:
|
||||
virtual ~IGameEventListener2() {};
|
||||
virtual void FireGameEvent(IGameEvent* event) = 0;
|
||||
virtual int GetEventDebugID(void) = 0;
|
||||
};
|
||||
|
||||
class IGameEventManager2 {
|
||||
public:
|
||||
virtual ~IGameEventManager2() {};
|
||||
virtual int LoadEventsFromFile(const char* filename) = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual bool AddListener(IGameEventListener2* listener, const char* name, bool serverside) = 0;
|
||||
virtual bool FindListener(IGameEventListener2* listener, const char* name) = 0;
|
||||
virtual void RemoveListener(IGameEventListener2* listener) = 0;
|
||||
virtual IGameEvent* CreateEvent(const char* name, bool force = false) = 0;
|
||||
virtual bool FireEvent(IGameEvent* event, bool dont_broadcast = false) = 0;
|
||||
virtual bool FireEventClientSide(IGameEvent* event) = 0;
|
||||
virtual IGameEvent* DuplicateEvent(IGameEvent* event) = 0;
|
||||
virtual void FreeEvent(IGameEvent* event) = 0;
|
||||
virtual bool SerializeEvent(IGameEvent* event, bf_write* buf) = 0;
|
||||
virtual IGameEvent* UnserializeEvent(bf_read* buf) = 0;
|
||||
};
|
||||
36
include/cstrike/Interfaces/ILauncherMgr.h
Normal file
36
include/cstrike/Interfaces/ILauncherMgr.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
class CShowPixelsParams;
|
||||
|
||||
typedef void* PseudoGLContextPtr;
|
||||
|
||||
class ILauncherMgr {
|
||||
public:
|
||||
void PumpWindowsMessageLoop() {
|
||||
return GetVirtualFunction<void(*)(ILauncherMgr*)>(this, 15)(this);
|
||||
}
|
||||
|
||||
PseudoGLContextPtr GetMainContext() {
|
||||
return GetVirtualFunction<PseudoGLContextPtr(*)(ILauncherMgr*)>(this, 22)(this);
|
||||
}
|
||||
|
||||
PseudoGLContextPtr CreateExtraContext() {
|
||||
return GetVirtualFunction<PseudoGLContextPtr(*)(ILauncherMgr*)>(this, 24)(this);
|
||||
}
|
||||
|
||||
void DeleteContext(PseudoGLContextPtr context) {
|
||||
return GetVirtualFunction<void(*)(ILauncherMgr*, PseudoGLContextPtr)>(this, 27)(this, context);
|
||||
}
|
||||
|
||||
bool MakeContextCurrent(PseudoGLContextPtr context) {
|
||||
return GetVirtualFunction<bool(*)(ILauncherMgr*, PseudoGLContextPtr)>(this, 26)(this, context);
|
||||
}
|
||||
|
||||
void PumpWindowsMessageLoop(CShowPixelsParams* params) {
|
||||
return GetVirtualFunction<void(*)(ILauncherMgr*, CShowPixelsParams*)>(this, 29)(this, params);
|
||||
}
|
||||
|
||||
void* GetWindowRef() {
|
||||
return GetVirtualFunction<void*(*)(ILauncherMgr*)>(this, 32)(this);
|
||||
}
|
||||
};
|
||||
139
include/cstrike/Interfaces/IMaterialSystem.h
Normal file
139
include/cstrike/Interfaces/IMaterialSystem.h
Normal file
@@ -0,0 +1,139 @@
|
||||
#pragma once
|
||||
|
||||
#define TEXTURE_GROUP_LIGHTMAP "Lightmaps"
|
||||
#define TEXTURE_GROUP_WORLD "World textures"
|
||||
#define TEXTURE_GROUP_MODEL "Model textures"
|
||||
#define TEXTURE_GROUP_VGUI "VGUI textures"
|
||||
#define TEXTURE_GROUP_PARTICLE "Particle textures"
|
||||
#define TEXTURE_GROUP_DECAL "Decal textures"
|
||||
#define TEXTURE_GROUP_SKYBOX "SkyBox textures"
|
||||
#define TEXTURE_GROUP_CLIENT_EFFECTS "ClientEffect textures"
|
||||
#define TEXTURE_GROUP_OTHER "Other textures"
|
||||
#define TEXTURE_GROUP_PRECACHED "Precached"
|
||||
#define TEXTURE_GROUP_CUBE_MAP "CubeMap textures"
|
||||
#define TEXTURE_GROUP_RENDER_TARGET "RenderTargets"
|
||||
#define TEXTURE_GROUP_RUNTIME_COMPOSITE "Runtime Composite"
|
||||
#define TEXTURE_GROUP_UNACCOUNTED "Unaccounted textures"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER "Static Vertex"
|
||||
#define TEXTURE_GROUP_STATIC_INDEX_BUFFER "Static Indices"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER_DISP "Displacement Verts"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER_COLOR "Lighting Verts"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER_WORLD "World Verts"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER_MODELS "Model Verts"
|
||||
#define TEXTURE_GROUP_STATIC_VERTEX_BUFFER_OTHER "Other Verts"
|
||||
#define TEXTURE_GROUP_DYNAMIC_INDEX_BUFFER "Dynamic Indices"
|
||||
#define TEXTURE_GROUP_DYNAMIC_VERTEX_BUFFER "Dynamic Verts"
|
||||
#define TEXTURE_GROUP_DEPTH_BUFFER "DepthBuffer"
|
||||
#define TEXTURE_GROUP_VIEW_MODEL "ViewModel"
|
||||
#define TEXTURE_GROUP_PIXEL_SHADERS "Pixel Shaders"
|
||||
#define TEXTURE_GROUP_VERTEX_SHADERS "Vertex Shaders"
|
||||
#define TEXTURE_GROUP_RENDER_TARGET_SURFACE "RenderTarget Surfaces"
|
||||
#define TEXTURE_GROUP_MORPH_TARGETS "Morph Targets"
|
||||
|
||||
enum MaterialVarFlags_t {
|
||||
MATERIAL_VAR_DEBUG = (1 << 0),
|
||||
MATERIAL_VAR_NO_DEBUG_OVERRIDE = (1 << 1),
|
||||
MATERIAL_VAR_NO_DRAW = (1 << 2),
|
||||
MATERIAL_VAR_USE_IN_FILLRATE_MODE = (1 << 3),
|
||||
MATERIAL_VAR_VERTEXCOLOR = (1 << 4),
|
||||
MATERIAL_VAR_VERTEXALPHA = (1 << 5),
|
||||
MATERIAL_VAR_SELFILLUM = (1 << 6),
|
||||
MATERIAL_VAR_ADDITIVE = (1 << 7),
|
||||
MATERIAL_VAR_ALPHATEST = (1 << 8),
|
||||
MATERIAL_VAR_MULTIPASS = (1 << 9),
|
||||
MATERIAL_VAR_ZNEARER = (1 << 10),
|
||||
MATERIAL_VAR_MODEL = (1 << 11),
|
||||
MATERIAL_VAR_FLAT = (1 << 12),
|
||||
MATERIAL_VAR_NOCULL = (1 << 13),
|
||||
MATERIAL_VAR_NOFOG = (1 << 14),
|
||||
MATERIAL_VAR_IGNOREZ = (1 << 15),
|
||||
MATERIAL_VAR_DECAL = (1 << 16),
|
||||
MATERIAL_VAR_ENVMAPSPHERE = (1 << 17),
|
||||
MATERIAL_VAR_NOALPHAMOD = (1 << 18),
|
||||
MATERIAL_VAR_ENVMAPCAMERASPACE = (1 << 19),
|
||||
MATERIAL_VAR_BASEALPHAENVMAPMASK = (1 << 20),
|
||||
MATERIAL_VAR_TRANSLUCENT = (1 << 21),
|
||||
MATERIAL_VAR_NORMALMAPALPHAENVMAPMASK = (1 << 22),
|
||||
MATERIAL_VAR_NEEDS_SOFTWARE_SKINNING = (1 << 23),
|
||||
MATERIAL_VAR_OPAQUETEXTURE = (1 << 24),
|
||||
MATERIAL_VAR_ENVMAPMODE = (1 << 25),
|
||||
MATERIAL_VAR_SUPPRESS_DECALS = (1 << 26),
|
||||
MATERIAL_VAR_HALFLAMBERT = (1 << 27),
|
||||
MATERIAL_VAR_WIREFRAME = (1 << 28),
|
||||
MATERIAL_VAR_ALLOWALPHATOCOVERAGE = (1 << 29),
|
||||
MATERIAL_VAR_IGNORE_ALPHA_MODULATION = (1 << 30)
|
||||
};
|
||||
|
||||
typedef unsigned short MaterialHandle_t;
|
||||
|
||||
class KeyValues;
|
||||
|
||||
class IMaterial {
|
||||
public:
|
||||
const char* GetName() {
|
||||
return GetVirtualFunction<const char*(*)(IMaterial*)>(this, 0)(this);
|
||||
}
|
||||
|
||||
const char* GetTextureGroupName() {
|
||||
return GetVirtualFunction<const char*(*)(IMaterial*)>(this, 1)(this);
|
||||
}
|
||||
|
||||
void IncrementReferenceCount() {
|
||||
return GetVirtualFunction<void(*)(IMaterial*)>(this, 12)(this);
|
||||
}
|
||||
|
||||
void DecrementReferenceCount() {
|
||||
return GetVirtualFunction<void(*)(IMaterial*)>(this, 13)(this);
|
||||
}
|
||||
|
||||
void AlphaModulate(float alpha) {
|
||||
return GetVirtualFunction<void(*)(IMaterial*, float)>(this, 27)(this, alpha);
|
||||
}
|
||||
|
||||
void ColorModulate(float red, float green, float blue) {
|
||||
return GetVirtualFunction<void(*)(IMaterial*, float, float, float)>(this, 28)(this, red, green, blue);
|
||||
}
|
||||
|
||||
void SetMaterialVarFlag(MaterialVarFlags_t flags, bool state) {
|
||||
return GetVirtualFunction<void(*)(IMaterial*, MaterialVarFlags_t, bool)>(this, 29)(this, flags, state);
|
||||
}
|
||||
|
||||
bool GetMaterialVarFlag(MaterialVarFlags_t flags) {
|
||||
return GetVirtualFunction<bool(*)(IMaterial*, MaterialVarFlags_t)>(this, 30)(this, flags);
|
||||
}
|
||||
|
||||
bool IsErrorMaterial() {
|
||||
return GetVirtualFunction<bool(*)(IMaterial*)>(this, 42)(this);
|
||||
}
|
||||
};
|
||||
|
||||
class IMaterialSystem {
|
||||
public:
|
||||
IMaterial* CreateMaterial(const char* name, KeyValues* keyvalues) {
|
||||
return GetVirtualFunction<IMaterial*(*)(IMaterialSystem*, const char*, KeyValues*)>(this, 70)(this, name, keyvalues);
|
||||
}
|
||||
|
||||
IMaterial* FindMaterial(char const* name, const char* group, bool complain = true, const char* complain_prefix = NULL) {
|
||||
return GetVirtualFunction<IMaterial*(*)(IMaterialSystem*, const char*, const char*, bool, const char*)>(this, 71)(this, name, group, complain, complain_prefix);
|
||||
}
|
||||
|
||||
bool IsMaterialLoaded(char const* name) {
|
||||
return GetVirtualFunction<bool(*)(IMaterialSystem*, const char*)>(this, 72)(this, name);
|
||||
}
|
||||
|
||||
MaterialHandle_t FirstMaterial() {
|
||||
return GetVirtualFunction<MaterialHandle_t(*)(IMaterialSystem*)>(this, 73)(this);
|
||||
}
|
||||
|
||||
MaterialHandle_t NextMaterial(MaterialHandle_t material) {
|
||||
return GetVirtualFunction<MaterialHandle_t(*)(IMaterialSystem*, MaterialHandle_t)>(this, 74)(this, material);
|
||||
}
|
||||
|
||||
MaterialHandle_t InvalidMaterial() {
|
||||
return GetVirtualFunction<MaterialHandle_t(*)(IMaterialSystem*)>(this, 75)(this);
|
||||
}
|
||||
|
||||
IMaterial* GetMaterial(MaterialHandle_t material) {
|
||||
return GetVirtualFunction<IMaterial*(*)(IMaterialSystem*, MaterialHandle_t)>(this, 76)(this, material);
|
||||
}
|
||||
};
|
||||
14
include/cstrike/Interfaces/IPanel.h
Normal file
14
include/cstrike/Interfaces/IPanel.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
typedef unsigned long VPANEL;
|
||||
|
||||
class IPanel {
|
||||
public:
|
||||
const char* GetName(VPANEL vpanel) {
|
||||
return GetVirtualFunction<const char*(*)(IPanel*, VPANEL)>(this, 37)(this, vpanel);
|
||||
}
|
||||
|
||||
void PaintTraverse(VPANEL vpanel, bool force_repaint, bool allow_force) {
|
||||
GetVirtualFunction<void(*)(IPanel*, VPANEL, bool, bool)>(this, 37)(this, vpanel, force_repaint, allow_force);
|
||||
}
|
||||
};
|
||||
10
include/cstrike/Interfaces/IVModelInfo.h
Normal file
10
include/cstrike/Interfaces/IVModelInfo.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
class model_t;
|
||||
|
||||
class IVModelInfoClient {
|
||||
public:
|
||||
const char* GetModelName(const model_t* model) {
|
||||
return GetVirtualFunction<const char*(*)(IVModelInfoClient*, const model_t*)>(this, 4)(this, model);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user