summaryrefslogtreecommitdiff
path: root/src/player-input.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/player-input.hpp')
-rw-r--r--src/player-input.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/player-input.hpp b/src/player-input.hpp
index baa4327..a5e64be 100644
--- a/src/player-input.hpp
+++ b/src/player-input.hpp
@@ -5,12 +5,12 @@
#include "game-type-defs.hpp"
#include "macros.hpp"
-TypeSafeInt_H(InputEventHash, int16_t, 255);
-TypeSafeInt_H(InputEventType, int16_t, 255);
-TypeSafeInt_H(InputCursorEntered, int16_t, 255);
-TypeSafeInt_H(InputKeyboardKeyAction, int16_t, 255);
-TypeSafeInt_H(InputMouseButtonAction, int16_t, 255);
-TypeSafeInt_H(InputWindowFocused, int16_t, 255);
+TypeSafeInt_H(InputEventHash, int16_t, 0x0FFF);
+TypeSafeInt_H(InputEventType, int16_t, 0x0FFF);
+TypeSafeInt_H(InputCursorEntered, int16_t, 0x0FFF);
+TypeSafeInt_H(InputKeyboardKeyAction, int16_t, 0x0FFF);
+TypeSafeInt_H(InputMouseButtonAction, int16_t, 0x0FFF);
+TypeSafeInt_H(InputWindowFocused, int16_t, 0x0FFF);
const InputEventType PKE_INPUT_EVENT_TYPE_CURSOR_ENTER = InputEventType{0};
const InputEventType PKE_INPUT_EVENT_TYPE_CURSOR_POS = InputEventType{1};
@@ -48,9 +48,11 @@ struct PkeInputEvent {
int32_t button;
int32_t scanCode;
int32_t mods;
+ uint64_t tickCount;
};
void PkeInput_Tick(double delta);
+bool PkeInput_Query(const PkeInputEvent &mask);
void PkeInput_Init();
void PkeInput_Teardown();