wavelength 1.0.0
Loading...
Searching...
No Matches
Cheats.h
Go to the documentation of this file.
1#pragma once
2
3#include <deque>
4#include <vector>
5
7#include "utl/Data.h"
8#include "utl/MsgSink.h"
9
15
17struct LongCheat {
18 std::vector<int> mButtons;
20 bool mFlag;
21};
22
31class CheatsManager : public MsgSink {
32public:
39
45 virtual ~CheatsManager();
46
54 virtual bool DispatchPriv(Message *msg);
55
63 void ExecuteCheat(DataArray *command, int pad);
64
73
74 std::vector<LongCheat> mLongCheats;
75 std::vector<QuickCheat>
77 std::deque<int> mButtons;
78 float mLastTime;
79 bool mFlags;
80};
81
89
void CheatsInit()
Create the cheats manager from the quick-cheats and long-cheats configuration, and register the test ...
void CheatsTerminate()
Destroy the cheats manager.
Listener of the controllers that recognises the cheat sequences of the long-cheats section.
Definition cheatsmanager.h:16
void ExecuteCheat(DataArray *command, int pad)
Run a cheat's command, first setting its controller entry to the controller.
bool OnButtonDown(JoypadButtonMsg *msg)
Run the cheats a button change completes.
virtual ~CheatsManager()
Destroy the cheats.
CheatsManager()
Create a manager with no cheats.
std::deque< int > mButtons
Definition Cheats.h:77
std::vector< QuickCheat > mQuickCheats[2]
Definition Cheats.h:76
float mLastTime
Definition Cheats.h:78
virtual bool DispatchPriv(Message *msg)
Handle a button message.
bool mFlags
Definition Cheats.h:79
Reference-counted array of script data nodes.
Definition dataarray.h:20
A change of a controller button.
Definition JoypadButtonMsg.h:17
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 command run by a sequence of buttons.
Definition Cheats.h:17
bool mFlag
Definition Cheats.h:20
std::vector< int > mButtons
Definition Cheats.h:18
DataArray * mCommand
Definition Cheats.h:19
A command run by one button while a modifier combination is held.
Definition Cheats.h:11
DataArray * mCommand
Definition Cheats.h:13
int mButton
Definition Cheats.h:12