2021-12-25 22:36:38 +01:00
|
|
|
#pragma once
|
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "inputsystem/ButtonCode.h"
|
|
|
|
|
|
|
|
class CInputSystem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void EnableInput(bool bEnabled)// @0x14039F100 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
|
|
|
|
{
|
2022-01-23 18:26:48 +01:00
|
|
|
static int index = 10;
|
|
|
|
CallVFunc<void>(index, this, bEnabled);
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void EnableMessagePump(bool bEnabled) // @0x14039F110 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
|
|
|
|
{
|
2022-01-23 18:26:48 +01:00
|
|
|
static int index = 11;
|
|
|
|
CallVFunc<void>(index, this, bEnabled);
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool IsButtonDown(ButtonCode_t Button) // @0x1403A0140 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
|
|
|
|
{
|
2022-01-23 18:26:48 +01:00
|
|
|
static int index = 13;
|
|
|
|
return CallVFunc<bool>(index, this, Button);
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
char pad_0000[16]; //0x0000
|
|
|
|
public:
|
|
|
|
bool m_bEnabled; //0x0010 IsInputEnabled variable.
|
|
|
|
bool m_bPumpEnabled; //0x0011 EnabledMessagePump variable.
|
|
|
|
};
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
extern CInputSystem* g_pInputSystem
|
|
|
|
;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class HInputSystem : public IDetour
|
|
|
|
{
|
|
|
|
virtual void debugp()
|
|
|
|
{
|
|
|
|
std::cout << "| VAR: g_pInputSystem : 0x" << std::hex << std::uppercase << g_pInputSystem << std::setw(0) << " |" << std::endl;
|
|
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
REGISTER(HInputSystem);
|