fixed building on windows (clangd is moron)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "input.h"
|
||||
#include "console.h"
|
||||
#include "interface.h"
|
||||
#include "mainmenu.h"
|
||||
#include "tier0/lib.h"
|
||||
#include "tier1/commandline.h"
|
||||
@@ -105,10 +106,22 @@ EInputKey IInput_StringToKey( char *psz )
|
||||
};
|
||||
|
||||
|
||||
interface CInput: public IInput
|
||||
{
|
||||
public:
|
||||
virtual void Init() override;
|
||||
virtual void Frame() override;
|
||||
virtual void Deinit() override;
|
||||
virtual void KeyEvent( EInputKey key, EKeyEventType event ) override;
|
||||
virtual void AxisEvent( EInputAxis axis, float fValue ) override;
|
||||
};
|
||||
|
||||
DECLARE_ENGINE_INTERFACE(Input, CInput)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
void IInput::Init( void )
|
||||
void CInput::Init( void )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -134,7 +147,7 @@ CUtlVector<EInputMode> g_inputModeStack = {INPUT_MODE_GAME, INPUT_MODE_MENU};
|
||||
// INPUT FIELD:
|
||||
// Doesn't recieve any events except for KEY_ESCAPE and KEY_ENTER
|
||||
//-----------------------------------------------------------------------------
|
||||
void IInput::KeyEvent( EInputKey key, EKeyEventType event )
|
||||
void CInput::KeyEvent( EInputKey key, EKeyEventType event )
|
||||
{
|
||||
if (event == KEY_EVENT_TYPE_DOWN && key == KEY_ESCAPE)
|
||||
{
|
||||
@@ -213,7 +226,7 @@ void IInput::KeyEvent( EInputKey key, EKeyEventType event )
|
||||
// Axis events for the input devices such as mouse and controller.
|
||||
// Game needs to explicitly support all of the devices.
|
||||
//-----------------------------------------------------------------------------
|
||||
void IInput::AxisEvent( EInputAxis axis, float fValue )
|
||||
void CInput::AxisEvent( EInputAxis axis, float fValue )
|
||||
{
|
||||
if (g_inputModeStack[g_inputModeStack.GetSize()-1] == INPUT_MODE_GAME)
|
||||
{
|
||||
@@ -233,7 +246,7 @@ void IInput::AxisEvent( EInputAxis axis, float fValue )
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
void IInput::Frame( void )
|
||||
void CInput::Frame( void )
|
||||
{
|
||||
g_fAxisValues[AXIS_MOUSE_X] += g_fAxisModifiers[AXIS_CONTROLLER_PITCH];
|
||||
g_fAxisValues[AXIS_MOUSE_Y] += g_fAxisModifiers[AXIS_CONTROLLER_YAW];
|
||||
@@ -242,7 +255,7 @@ void IInput::Frame( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
void IInput::Deinit( void )
|
||||
void CInput::Deinit( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user