#pragma once #include #include #include "utils/globals.hpp" namespace Nimbin { class Game; enum class InputCommand : uint8_t { Jump, Click, FocusToggle, Drop, ShootAll, Compile, Run, DebugPrint, FreelookStart, FreelookEnd, NumberInc, NumberDec, TypingStart, TypingCommit, TypingCancel, SandboxRestore, ConnectPultSubmit, ConnectPultExit, }; struct FrameInput { bool forward = false; bool backward = false; bool left = false; bool right = false; bool pick = false; bool shoot = false;// X held: focus the faced wall bool vim_normal_keys = false; bool capture_typing = false; bool capture_vim = false; bool typing_mode = false; bool typing_commit = false; bool typing_cancel = false; int look_x = 0; int look_y = 0; double scroll_x = 0.0; double scroll_y = 0.0; std::string typing_buffer; DynArray vim_keys; DynArray commands; }; struct InputSystem { void handle_Event(Game& game, const SDL_Event& e, FrameInput& input); }; } // namespace Nimbin