From 5a7b4a65a1d93744e4a5e6cc6df4244f61b81f68 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 14 Jan 2025 18:17:54 -0500 Subject: chore: fix compiler warnings + extra includes --- src/player-input.hpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/player-input.hpp') diff --git a/src/player-input.hpp b/src/player-input.hpp index b8bd9a4..f67e966 100644 --- a/src/player-input.hpp +++ b/src/player-input.hpp @@ -1,7 +1,6 @@ #ifndef PKE_PLAYER_INPUT_HPP #define PKE_PLAYER_INPUT_HPP -#include "game-type-defs.hpp" #include "pk.h" #include @@ -55,41 +54,37 @@ const InputEventHash PKE_INPUT_HASH_ALL_WINDOW_FOCUS_EVENTS = | PKE_INPUT_HASH_WINDOW_FOCUSED_FALSE | PKE_INPUT_HASH_WINDOW_FOCUSED_FALSE; -struct PkeInputEventBase { }; +struct PkeInputEventBase { + InputActionSetHandle sourceSet; +}; struct PkeInputEventHolder { InputEventHash type = InputEventHash{0}; PkeInputEventBase *ptr = nullptr; }; struct PkeCursorEnterEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; bool isEntered; }; struct PkeCursorPosEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; double xMotion; double yMotion; }; struct PkeKeyEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; bool isPressed; bool thisTick; int32_t button; int32_t mods; }; struct PkeMouseButtonEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; bool isPressed; bool thisTick; int32_t button; int32_t mods; }; struct PkeScrollEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; double xMotion; double yMotion; }; struct PkeWindowFocusEvent : public PkeInputEventBase { - InputActionSetHandle sourceSet; bool isFocused; }; @@ -99,7 +94,7 @@ struct PkeInputEventMask { int32_t mods = 0; }; -constexpr uint64_t PKE_INPUT_ACTION_MASK_COUNT = 1; +constexpr int64_t PKE_INPUT_ACTION_MASK_COUNT = 1; struct PkeInputAction { const char *name; union { @@ -110,7 +105,7 @@ struct PkeInputAction { }; struct PkeInputSet { const char *title; - uint64_t actionCount; + int64_t actionCount; PkeInputAction *actions; }; -- cgit v1.2.3