128 static void TestCmd(
DataArray *pCommand,
void *pUserData);
140 static void LoadLongCheats(
DataArray *pCheats);
143 int GetCheatEntered()
const {
144 return mCheatEntered;
147 std::vector<LongCheat> mLongCheats;
149 std::deque<int> mHistory;
static void Init()
Create the one instance, listen to the controllers, load the long-cheats section, and register the te...
static constexpr int kMaxCheatButtons
Buttons one long cheat may have.
Definition cheatsmanager.h:30
CheatsManager()
Construct a manager with no cheat.
bool HandleButton(JoypadInputMsg *pMsg)
Add a press to the history and run every cheat it completes.
Combo
Combinations that select a table of mComboCheats.
Definition cheatsmanager.h:33
@ kComboCount
Definition cheatsmanager.h:36
@ kComboRight
Definition cheatsmanager.h:35
@ kComboLeft
Definition cheatsmanager.h:34
static constexpr int kMaxHistory
Presses mHistory retains.
Definition cheatsmanager.h:27
static void Terminate()
Stop listening to the controllers and delete the one instance.
static int IsCheatEntered()
Report whether a cheat that marks the game was entered.
void RunAction(DataArray *pAction, int nPad)
Run a cheat's script command, first storing the controller in its controller entry.
bool DispatchPriv(Message *pMsg) override
Handle controller button messages.
~CheatsManager() override=default
Destroy the object.
Reference-counted array of script data nodes.
Definition dataarray.h:20
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Receiver of engine messages.
Definition msgsink.h:21
A press made while a combination is held that runs a script command.
Definition cheatsmanager.h:47
int mButton
Definition cheatsmanager.h:48
DataArray * mAction
Definition cheatsmanager.h:49
A sequence of presses that runs a script command.
Definition cheatsmanager.h:40
DataArray * mAction
Definition cheatsmanager.h:42
std::vector< int > mButtons
Definition cheatsmanager.h:41
int mMarksEntered
Definition cheatsmanager.h:43