-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOmniScalerInput.cpp
57 lines (40 loc) · 992 Bytes
/
OmniScalerInput.cpp
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
////////////////////////////////////////////////////////////////////////////////
// Filename: OmniScalerInput.cpp
////////////////////////////////////////////////////////////////////////////////
#include "OmniScalerInput.h"
OmniScalerInput::OmniScalerInput()
{
}
OmniScalerInput::OmniScalerInput(const OmniScalerInput& other)
{
}
OmniScalerInput::~OmniScalerInput()
{
}
void OmniScalerInput::Initialize()
{
int i;
// Initialize all the keys to being released and not pressed.
for (i = 0; i < 256; i++)
{
m_keys[i] = false;
}
return;
}
void OmniScalerInput::KeyDown(unsigned int input)
{
// If a key is pressed then save that state in the key array.
m_keys[input] = true;
return;
}
void OmniScalerInput::KeyUp(unsigned int input)
{
// If a key is released then clear that state in the key array.
m_keys[input] = false;
return;
}
bool OmniScalerInput::IsKeyDown(unsigned int key)
{
// Return what state the key is in (pressed/not pressed).
return m_keys[key];
}