contentpack remove feature WIP

This commit is contained in:
MihailRis
2024-02-29 23:47:07 +03:00
parent a1f313bedc
commit 3862dbda66
18 changed files with 541 additions and 433 deletions
+25 -27
View File
@@ -7,45 +7,43 @@
#include <string>
#include <vector>
#include <unordered_map>
#include "../typedefs.h"
typedef unsigned int uint;
const short KEYS_BUFFER_SIZE = 1036;
const short _MOUSE_KEYS_OFFSET = 1024;
inline constexpr short KEYS_BUFFER_SIZE = 1036;
class Events {
static bool keys[KEYS_BUFFER_SIZE];
static uint frames[KEYS_BUFFER_SIZE];
static uint currentFrame;
static bool cursor_drag;
public:
static bool _keys[KEYS_BUFFER_SIZE];
static uint _frames[KEYS_BUFFER_SIZE];
static uint _current;
static int scroll;
static glm::vec2 delta;
static glm::vec2 cursor;
static bool cursor_drag;
static bool _cursor_locked;
static std::vector<uint> codepoints;
static std::vector<keycode> pressedKeys;
static std::unordered_map<std::string, Binding> bindings;
static bool _cursor_locked;
static std::vector<uint> codepoints;
static std::vector<keycode> pressedKeys;
static std::unordered_map<std::string, Binding> bindings;
static void pollEvents();
static void pollEvents();
static bool pressed(keycode keycode);
static bool pressed(int keycode);
static bool jpressed(keycode keycode);
static bool jpressed(int keycode);
static bool pressed(keycode keycode);
static bool pressed(int keycode);
static bool jpressed(keycode keycode);
static bool jpressed(int keycode);
static bool clicked(mousecode button);
static bool clicked(int button);
static bool jclicked(mousecode button);
static bool jclicked(int button);
static bool clicked(mousecode button);
static bool clicked(int button);
static bool jclicked(mousecode button);
static bool jclicked(int button);
static void toggleCursor();
static void toggleCursor();
static void bind(std::string name, inputtype type, keycode code);
static void bind(std::string name, inputtype type, mousecode code);
static void bind(std::string name, inputtype type, int code);
static bool active(std::string name);
static bool jactive(std::string name);
static void bind(std::string name, inputtype type, keycode code);
static void bind(std::string name, inputtype type, mousecode code);
static void bind(std::string name, inputtype type, int code);
static bool active(std::string name);
static bool jactive(std::string name);
static void setKey(int key, bool b);
static void setButton(int button, bool b);