Add externs to interface and class headers.

Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
aixxe 2016-12-20 20:09:50 +00:00
parent c40361343c
commit 66f7ff9b8e
16 changed files with 48 additions and 16 deletions

View File

@ -20,4 +20,6 @@ class CGlobalVarsBase {
bool m_bClient;
int nTimestampNetworkingBase;
int nTimestampRandomizeWindow;
};
};
extern CGlobalVarsBase* globalvars;

View File

@ -108,4 +108,6 @@ class CInput {
cmd_verified->m_cmd = *cmd;
cmd_verified->m_crc = cmd->GetChecksum();
}
};
};
extern CInput* input;

View File

@ -26,4 +26,6 @@ class IBaseClientDLL {
void FrameStageNotify(ClientFrameStage_t stage) {
return GetVirtualFunction<void(*)(IBaseClientDLL*, ClientFrameStage_t)>(this, 35)(this, stage);
}
};
};
extern IBaseClientDLL* clientdll;

View File

@ -16,4 +16,6 @@ class IClientEntityList {
virtual int GetHighestEntityIndex(void) = 0;
virtual void SetMaxEntities(int max_entities) = 0;
virtual int GetMaxEntities() = 0;
};
};
extern IClientEntityList* entitylist;

View File

@ -9,4 +9,6 @@ class ICvar {
template <typename... Values> void ConsoleDPrintf(const char* Format, Values... Parameters) {
return GetVirtualFunction<void(*)(ICvar*, const char*, ...)>(this, 24)(this, Format, Parameters...);
}
};
};
extern ICvar* cvar;

View File

@ -45,4 +45,6 @@ class IGameEventManager2 {
virtual void FreeEvent(IGameEvent* event) = 0;
virtual bool SerializeEvent(IGameEvent* event, bf_write* buf) = 0;
virtual IGameEvent* UnserializeEvent(bf_read* buf) = 0;
};
};
extern IGameEventManager2* gameevents;

View File

@ -18,4 +18,6 @@ class IInputInternal {
void SetMouseCodeState(MouseCode code, MouseCodeState_t state) {
GetVirtualFunction<void(*)(IInputInternal*, MouseCode, MouseCodeState_t)>(this, 84)(this, code, state);
}
};
};
extern IInputInternal* inputinternal;

View File

@ -7,4 +7,6 @@ class IInputSystem {
bool IsButtonDown(ButtonCode_t button) {
return GetVirtualFunction<bool(*)(void*, ButtonCode_t)>(this, 11)(this, button);
}
};
};
extern IInputSystem* inputsystem;

View File

@ -33,4 +33,6 @@ class ILauncherMgr {
void* GetWindowRef() {
return GetVirtualFunction<void*(*)(ILauncherMgr*)>(this, 32)(this);
}
};
};
extern ILauncherMgr* launchermgr;

View File

@ -136,4 +136,6 @@ class IMaterialSystem {
IMaterial* GetMaterial(MaterialHandle_t material) {
return GetVirtualFunction<IMaterial*(*)(IMaterialSystem*, MaterialHandle_t)>(this, 76)(this, material);
}
};
};
extern IMaterialSystem* matsystem;

View File

@ -11,4 +11,6 @@ class IPanel {
void PaintTraverse(VPANEL vpanel, bool force_repaint, bool allow_force) {
GetVirtualFunction<void(*)(IPanel*, VPANEL, bool, bool)>(this, 42)(this, vpanel, force_repaint, allow_force);
}
};
};
extern IPanel* panel;

View File

@ -92,4 +92,6 @@ class ISurface {
void DrawOutlinedCircle(int x, int y, int radius, int segments) {
return GetVirtualFunction<void(*)(ISurface*, int, int, int, int)>(this, 99)(this, x, y, radius, segments);
}
};
};
extern ISurface* matsurface;

View File

@ -5,4 +5,6 @@ class IVDebugOverlay {
bool ScreenPosition(const Vector& world, Vector& screen) {
return GetVirtualFunction<int(*)(IVDebugOverlay*, const Vector&, Vector&)>(this, 9)(this, world, screen) == 0;
}
};
};
extern IVDebugOverlay* debugoverlay;

View File

@ -61,4 +61,6 @@ class IVEngineClient {
void ClientCmd_Unrestricted(const char* command) {
return GetVirtualFunction<void(*)(IVEngineClient*, const char*)>(this, 106)(this, command);
}
};
};
extern IVEngineClient* engine;

View File

@ -97,4 +97,6 @@ class IVModelInfoClient {
studiohdr_t* GetStudioModel(const model_t* model) {
return GetVirtualFunction<studiohdr_t*(*)(IVModelInfoClient*, const model_t*)>(this, 29)(this, model);
}
};
};
extern IVModelInfoClient* modelinfo;

View File

@ -52,4 +52,6 @@ class IVModelRender {
void DrawModelExecute(DrawModelState_t const& state, ModelRenderInfo_t const& info, matrix3x4_t* bone) {
GetVirtualFunction<void(*)(IVModelRender*, DrawModelState_t const&, ModelRenderInfo_t const&, matrix3x4_t*)>(this, 19)(this, state, info, bone);
}
};
};
extern IVModelRender* modelrender;