input, changes

This commit is contained in:
2026-03-16 08:21:04 +01:00
parent d522881358
commit f6a1e59ebb
12 changed files with 109 additions and 44 deletions

19
include/game/input.hpp Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <SDL3/SDL.h>
namespace Game {
class Input {
public:
Input() = delete;
static void update();
static bool isKeyPressed(SDL_Scancode key);
static bool isKeyJustPressed(SDL_Scancode key);
static bool isKeyJustReleased(SDL_Scancode key);
private:
static const bool* mCurrentKeyStates;
static bool* mPreviousKeyStates;
static int mNumKeys;
};
}