resonance
1.0.1
Loading...
Searching...
No Matches
inputcheatdetector.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
5
#include "
game/rawcontroller.h
"
6
#include "
os/hxstr.h
"
7
25
class
InputCheatDetector
:
public
RawController
{
26
public
:
39
struct
CheatSequence
{
40
HxStr
mName
;
41
std::vector<int>
mButtons
;
42
};
43
57
explicit
InputCheatDetector
(std::vector<CheatSequence> *pCheats);
58
74
virtual
void
OnControllerReading
(
int
nType,
int
nSlot,
int
nButton,
float
flValue);
75
83
virtual
void
UnusedHook
() = 0;
84
85
private
:
93
void
RegisterCheats();
94
104
void
AddGameCheat(
const
CheatSequence
&cheat);
105
112
void
AddMetCheat(
const
CheatSequence
&cheat);
113
114
// The table the constructor stores. +0x04
115
std::vector<CheatSequence> *mCheats;
116
};
117
127
extern
std::vector<InputCheatDetector::CheatSequence>
g_metCheatSequences
;
128
138
extern
std::vector<InputCheatDetector::CheatSequence>
g_gameCheatSequences
;
HxStr
Heap-allocated NUL-terminated string.
Definition
hxstr.h:41
InputCheatDetector::UnusedHook
virtual void UnusedHook()=0
A hook that does nothing.
InputCheatDetector::InputCheatDetector
InputCheatDetector(std::vector< CheatSequence > *pCheats)
Attach the detector to a table of cheats.
InputCheatDetector::OnControllerReading
virtual void OnControllerReading(int nType, int nSlot, int nButton, float flValue)
Match one controller reading against the table.
RawController
Base of every object that reads a controller directly.
Definition
rawcontroller.h:19
hxstr.h
g_gameCheatSequences
std::vector< InputCheatDetector::CheatSequence > g_gameCheatSequences
Cheats a game session detects.
g_metCheatSequences
std::vector< InputCheatDetector::CheatSequence > g_metCheatSequences
Cheats the front end detects.
rawcontroller.h
InputCheatDetector::CheatSequence
One cheat, as InputCheatDetector::RegisterCheats() at 0x001dabc8 builds it.
Definition
inputcheatdetector.h:39
InputCheatDetector::CheatSequence::mButtons
std::vector< int > mButtons
Definition
inputcheatdetector.h:41
InputCheatDetector::CheatSequence::mName
HxStr mName
Definition
inputcheatdetector.h:40
src
game
inputcheatdetector.h
Generated by
1.15.0