-
Notifications
You must be signed in to change notification settings - Fork 42
/
InputManagerClass.h
42 lines (33 loc) · 1.04 KB
/
InputManagerClass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <GameOptionsClass.h>
#include <Helpers/CompileTime.h>
class InputManagerClass {
public:
static constexpr reference<InputManagerClass*, 0x87F770u> const Instance{};
byte DoSomething()
{ JMP_THIS(0x54F720); }
bool IsKeyPressed(int key) const
{ JMP_THIS(0x54F5C0); }
bool IsForceFireKeyPressed() const {
return this->IsKeyPressed(GameOptionsClass::Instance->KeyForceFire1)
|| this->IsKeyPressed(GameOptionsClass::Instance->KeyForceFire2);
}
bool IsForceMoveKeyPressed() const {
return this->IsKeyPressed(GameOptionsClass::Instance->KeyForceMove1)
|| this->IsKeyPressed(GameOptionsClass::Instance->KeyForceMove2);
}
bool IsForceSelectKeyPressed() const {
return this->IsKeyPressed(GameOptionsClass::Instance->KeyForceSelect1)
|| this->IsKeyPressed(GameOptionsClass::Instance->KeyForceSelect2);
}
protected:
int field_0;
int field_4;
int field_8;
int field_C;
int field_10;
byte Keycodes_b[256];
WORD Keycodes_w[256];
int field_314;
int field_318;
};