blob: 0d288602136aa9f5ed0d873ef99089a6a346e66c (
plain) (
blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
//===========================================================================
// Copyright (C) 2000 Radical Entertainment Ltd. All rights reserved.
//
// Component: CheatInputHandler
//
// Description: Interface for the CheatInputHandler class.
//
// Authors: Tony Chu
//
// Revisions Date Author Revision
// 2002/09/19 TChu Created for SRR2
//
//===========================================================================
#ifndef CHEATINPUTHANDLER_H
#define CHEATINPUTHANDLER_H
//===========================================================================
// Nested Includes
//===========================================================================
#include <cheats/cheatinputs.h>
#include <input/mappable.h>
//===========================================================================
// Forward References
//===========================================================================
enum eAuxiliaryCheatInput
{
CHEAT_INPUT_LTRIGGER = NUM_CHEAT_INPUTS,
CHEAT_INPUT_RTRIGGER,
NUM_AUXILIARY_CHEAT_INPUTS
};
//===========================================================================
// Interface Definitions
//===========================================================================
class CheatInputHandler : public Mappable
{
public:
CheatInputHandler();
virtual ~CheatInputHandler();
void ResetTriggerStates()
{
m_LTriggerBitMask = 0;
m_RTriggerBitMask = 0;
}
void ResetInputSequence();
static const char* GetInputName( eCheatInput cheatInput );
// Implements Mappable Interface
//
virtual void OnButton( int controllerId, int buttonId, const IButton* pButton );
virtual void OnButtonUp( int controllerId, int buttonId, const IButton* pButton );
virtual void OnButtonDown( int controllerId, int buttonId, const IButton* pButton );
virtual void LoadControllerMappings( unsigned int controllerId );
private:
//---------------------------------------------------------------------
// Private Functions
//---------------------------------------------------------------------
// No copying or assignment. Declare but don't define.
//
CheatInputHandler( const CheatInputHandler& );
CheatInputHandler& operator= ( const CheatInputHandler& );
//---------------------------------------------------------------------
// Private Data
//---------------------------------------------------------------------
unsigned int m_LTriggerBitMask;
unsigned int m_RTriggerBitMask;
eCheatInput m_inputSequence[ NUM_CHEAT_SEQUENCE_INPUTS ];
unsigned int m_currentInputIndex;
};
#endif // CHEATINPUTHANDLER_H
|