Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Input.h
Go to the documentation of this file.
1
#ifndef ULT_INPUT_H_INCLUDED
2
#define ULT_INPUT_H_INCLUDED
3
4
namespace
Ult
5
{
6
10
14
enum
INPUT_BUTTON
15
{
16
BUTTON_LEFT_SHOULDER
= 1,
17
BUTTON_RIGHT_SHOULDER
,
18
BUTTON_LEFT_TRIGGER
,
19
BUTTON_RIGHT_TRIGGER
,
20
BUTTON_LEFT_THUMB
,
21
BUTTON_RIGHT_THUMB
,
22
BUTTON_START
,
23
BUTTON_BACK
,
24
BUTTON_ARROW_UP
,
25
BUTTON_ARROW_DOWN
,
26
BUTTON_ARROW_LEFT
,
27
BUTTON_ARROW_RIGHT
,
28
BUTTON_A
,
29
BUTTON_B
,
30
BUTTON_X
,
31
BUTTON_Y
,
32
BUTTON_MOUSE_LEFT
,
33
BUTTON_MOUSE_RIGHT
,
34
BUTTON_0
,
35
BUTTON_1
,
36
BUTTON_2
,
37
BUTTON_3
,
38
BUTTON_4
,
39
BUTTON_5
,
40
BUTTON_6
,
41
BUTTON_7
,
42
BUTTON_8
,
43
BUTTON_9
,
44
//BUTTON_A, // conflict with xbox 360 controller buttons
45
//BUTTON_B,
46
BUTTON_C
,
47
BUTTON_D
,
48
BUTTON_E
,
49
BUTTON_F
,
50
BUTTON_G
,
51
BUTTON_H
,
52
BUTTON_I
,
53
BUTTON_J
,
54
BUTTON_K
,
55
BUTTON_L
,
56
BUTTON_M
,
57
BUTTON_N
,
58
BUTTON_O
,
59
BUTTON_P
,
60
BUTTON_Q
,
61
BUTTON_R
,
62
BUTTON_S
,
63
BUTTON_T
,
64
BUTTON_U
,
65
BUTTON_V
,
66
BUTTON_W
,
67
//BUTTON_X, // conflict with xbox 360 controller buttons
68
//BUTTON_Y,
69
BUTTON_Z
,
70
BUTTON_ESCAPE
,
71
BUTTON_SPACE
,
72
BUTTON_ENTER
,
73
BUTTON_TOTAL_BUTTONS
74
};
75
81
extern
bool
gShouldQuit
;
82
88
void
InitInput
();
89
94
void
UpdateInput
();
95
100
void
DeinitInput
();
101
107
bool
IsButtonDown
(
const
INPUT_BUTTON
btn);
108
113
bool
IsButtonUp
(
const
INPUT_BUTTON
btn,
const
bool
wasDown);
114
120
void
GetMousePosition
(
int
* mx,
int
* my);
121
127
bool
GetWindowResize
(
int
* width,
int
* height);
128
129
}
// namespace Ult
130
131
#endif
// ULT_INPUT_H_INCLUDED
132
Ult::GetMousePosition
void GetMousePosition(int *mx, int *my)
Definition
InputSdl2.cpp:150
Ult::InitInput
void InitInput()
Definition
InputSdl2.cpp:67
Ult::UpdateInput
void UpdateInput()
Definition
InputSdl2.cpp:80
Ult::GetWindowResize
bool GetWindowResize(int *width, int *height)
Definition
InputSdl2.cpp:156
Ult::INPUT_BUTTON
INPUT_BUTTON
Definition
Input.h:15
Ult::IsButtonUp
bool IsButtonUp(const INPUT_BUTTON btn, const bool wasDown)
Definition
InputSdl2.cpp:145
Ult::IsButtonDown
bool IsButtonDown(const INPUT_BUTTON btn)
Definition
InputSdl2.cpp:140
Ult::DeinitInput
void DeinitInput()
Definition
InputSdl2.cpp:135
Ult::gShouldQuit
bool gShouldQuit
Definition
InputSdl2.cpp:9
Ult::BUTTON_LEFT_TRIGGER
@ BUTTON_LEFT_TRIGGER
Definition
Input.h:18
Ult::BUTTON_RIGHT_SHOULDER
@ BUTTON_RIGHT_SHOULDER
Definition
Input.h:17
Ult::BUTTON_ESCAPE
@ BUTTON_ESCAPE
Definition
Input.h:70
Ult::BUTTON_G
@ BUTTON_G
Definition
Input.h:50
Ult::BUTTON_MOUSE_RIGHT
@ BUTTON_MOUSE_RIGHT
Definition
Input.h:33
Ult::BUTTON_2
@ BUTTON_2
Definition
Input.h:36
Ult::BUTTON_M
@ BUTTON_M
Definition
Input.h:56
Ult::BUTTON_T
@ BUTTON_T
Definition
Input.h:63
Ult::BUTTON_7
@ BUTTON_7
Definition
Input.h:41
Ult::BUTTON_N
@ BUTTON_N
Definition
Input.h:57
Ult::BUTTON_0
@ BUTTON_0
Definition
Input.h:34
Ult::BUTTON_MOUSE_LEFT
@ BUTTON_MOUSE_LEFT
Definition
Input.h:32
Ult::BUTTON_R
@ BUTTON_R
Definition
Input.h:61
Ult::BUTTON_O
@ BUTTON_O
Definition
Input.h:58
Ult::BUTTON_F
@ BUTTON_F
Definition
Input.h:49
Ult::BUTTON_SPACE
@ BUTTON_SPACE
Definition
Input.h:71
Ult::BUTTON_8
@ BUTTON_8
Definition
Input.h:42
Ult::BUTTON_C
@ BUTTON_C
Definition
Input.h:46
Ult::BUTTON_J
@ BUTTON_J
Definition
Input.h:53
Ult::BUTTON_LEFT_SHOULDER
@ BUTTON_LEFT_SHOULDER
Definition
Input.h:16
Ult::BUTTON_B
@ BUTTON_B
Definition
Input.h:29
Ult::BUTTON_ARROW_DOWN
@ BUTTON_ARROW_DOWN
Definition
Input.h:25
Ult::BUTTON_1
@ BUTTON_1
Definition
Input.h:35
Ult::BUTTON_9
@ BUTTON_9
Definition
Input.h:43
Ult::BUTTON_P
@ BUTTON_P
Definition
Input.h:59
Ult::BUTTON_ARROW_RIGHT
@ BUTTON_ARROW_RIGHT
Definition
Input.h:27
Ult::BUTTON_L
@ BUTTON_L
Definition
Input.h:55
Ult::BUTTON_RIGHT_TRIGGER
@ BUTTON_RIGHT_TRIGGER
Definition
Input.h:19
Ult::BUTTON_I
@ BUTTON_I
Definition
Input.h:52
Ult::BUTTON_BACK
@ BUTTON_BACK
Definition
Input.h:23
Ult::BUTTON_6
@ BUTTON_6
Definition
Input.h:40
Ult::BUTTON_Q
@ BUTTON_Q
Definition
Input.h:60
Ult::BUTTON_U
@ BUTTON_U
Definition
Input.h:64
Ult::BUTTON_K
@ BUTTON_K
Definition
Input.h:54
Ult::BUTTON_ENTER
@ BUTTON_ENTER
Definition
Input.h:72
Ult::BUTTON_Y
@ BUTTON_Y
Definition
Input.h:31
Ult::BUTTON_ARROW_LEFT
@ BUTTON_ARROW_LEFT
Definition
Input.h:26
Ult::BUTTON_H
@ BUTTON_H
Definition
Input.h:51
Ult::BUTTON_RIGHT_THUMB
@ BUTTON_RIGHT_THUMB
Definition
Input.h:21
Ult::BUTTON_4
@ BUTTON_4
Definition
Input.h:38
Ult::BUTTON_S
@ BUTTON_S
Definition
Input.h:62
Ult::BUTTON_ARROW_UP
@ BUTTON_ARROW_UP
Definition
Input.h:24
Ult::BUTTON_LEFT_THUMB
@ BUTTON_LEFT_THUMB
Definition
Input.h:20
Ult::BUTTON_X
@ BUTTON_X
Definition
Input.h:30
Ult::BUTTON_W
@ BUTTON_W
Definition
Input.h:66
Ult::BUTTON_D
@ BUTTON_D
Definition
Input.h:47
Ult::BUTTON_Z
@ BUTTON_Z
Definition
Input.h:69
Ult::BUTTON_A
@ BUTTON_A
Definition
Input.h:28
Ult::BUTTON_TOTAL_BUTTONS
@ BUTTON_TOTAL_BUTTONS
Definition
Input.h:73
Ult::BUTTON_V
@ BUTTON_V
Definition
Input.h:65
Ult::BUTTON_START
@ BUTTON_START
Definition
Input.h:22
Ult::BUTTON_5
@ BUTTON_5
Definition
Input.h:39
Ult::BUTTON_E
@ BUTTON_E
Definition
Input.h:48
Ult::BUTTON_3
@ BUTTON_3
Definition
Input.h:37
Ult
Definition
Archive.h:13
include
Ult
Input.h
Generated by
1.13.0