added keybinds
This commit is contained in:
@@ -6,10 +6,8 @@
|
||||
#include "entitysystem.h"
|
||||
#include "baseentity.h"
|
||||
#include "game.h"
|
||||
#include "cglm/mat4.h"
|
||||
#include "cglm/cglm.h"
|
||||
#include "inetworkclient.h"
|
||||
#include "netprotocol.h"
|
||||
#include "userinput.h"
|
||||
#ifdef STEAM
|
||||
#include "steam/isteamgameserver.h"
|
||||
#include "steam/steam_gameserver.h"
|
||||
@@ -29,34 +27,6 @@ class CFunnyGameBridge: public IEngineBridge
|
||||
|
||||
};
|
||||
|
||||
class CFunnyInput: public IHumanDeviceInput
|
||||
{
|
||||
|
||||
virtual EInputType GetInputType() override { return k_EInput_Game; };
|
||||
|
||||
virtual void OnGameButton( EInputDeviceType eDevice, EInputButton eScancode, bool bIsPressed ) override;
|
||||
virtual void OnGameAxis( EInputDeviceType eDevice, EInputAxis eAxis, float fValue) override;
|
||||
virtual void OnGameAxisDiff( EInputDeviceType eDevice, EInputAxis eAxis, float fValue ) override;
|
||||
|
||||
virtual void OnButton( EInputDeviceType eDevice, EInputButton eScancode, bool bIsPressed ) override {};
|
||||
virtual void OnAxis( EInputDeviceType eDevice, EInputAxis eAxis, float fValue) override {};
|
||||
virtual void OnAxisDiff( EInputDeviceType eDevice, EInputAxis eAxis, float fValue ) override {};
|
||||
|
||||
virtual void OnTextWriteUTF8( uint32_t uCode ) override {};
|
||||
};
|
||||
|
||||
void CFunnyInput::OnGameButton( EInputDeviceType eDevice, EInputButton eScancode, bool bIsPressed )
|
||||
{
|
||||
|
||||
}
|
||||
void CFunnyInput::OnGameAxis( EInputDeviceType eDevice, EInputAxis eAxis, float fValue)
|
||||
{
|
||||
|
||||
}
|
||||
void CFunnyInput::OnGameAxisDiff( EInputDeviceType eDevice, EInputAxis eAxis, float fValue )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
IEngineBridge *EngineBridge()
|
||||
{
|
||||
@@ -66,10 +36,12 @@ IEngineBridge *EngineBridge()
|
||||
|
||||
EXPOSE_INTERFACE_FN(EngineBridge, IEngineBridge, ENGINE_BRIDGE_INTERFACE_VERSION)
|
||||
|
||||
static CFunnyInput s_mainInput;
|
||||
|
||||
void CFunnyGameBridge::Init()
|
||||
{
|
||||
Console()->AddCommand("exec game/core/default.cfg\n");
|
||||
Console()->Execute();
|
||||
|
||||
g_pWorldRenderer->Init();
|
||||
#ifdef STEAM
|
||||
if (g_pEngineConstants->m_bIsSteam)
|
||||
@@ -95,7 +67,7 @@ void CFunnyGameBridge::Init()
|
||||
g_pPhysics = (IPhysics*)fnPhysicsFactory(PHYSICS_INTERFACE_VERSION, NULL);
|
||||
g_pPhysicsWorld = g_pPhysics->CreateWorld();
|
||||
|
||||
g_pHumanDeviceManager->SetDefaultInput(&s_mainInput);
|
||||
g_pHumanDeviceManager->SetDefaultInput(g_pMainInput);
|
||||
}
|
||||
|
||||
void CFunnyGameBridge::Tick( float fDelta )
|
||||
|
||||
Reference in New Issue
Block a user