]> git.localhorst.tv Git - blank.git/blobdiff - src/interface.hpp
noexcept all the things
[blank.git] / src / interface.hpp
index 68173050bbb036bdd95b0f6a0f76935678b95555..16ee89f46c37313578d4ca41583c82b4672d01af 100644 (file)
@@ -8,6 +8,7 @@
 #include "shader.hpp"
 
 #include <SDL.h>
+#include <glm/glm.hpp>
 
 
 namespace blank {
@@ -18,22 +19,34 @@ class World;
 class Interface {
 
 public:
-       explicit Interface(World &);
+       struct Config {
+               float move_velocity = 0.005f;
+               float pitch_sensitivity = -0.0025f;
+               float yaw_sensitivity = -0.001f;
+
+               bool keyboard_disabled = false;
+               bool mouse_disabled = false;
+               bool visual_disabled = false;
+       };
+
+       Interface(const Config &, World &);
 
        void Handle(const SDL_KeyboardEvent &);
        void Handle(const SDL_MouseMotionEvent &);
        void Handle(const SDL_MouseButtonEvent &);
        void Handle(const SDL_MouseWheelEvent &);
-       void Handle(const SDL_WindowEvent &);
+       void Handle(const SDL_WindowEvent &) noexcept;
 
        void FaceBlock();
        void TurnBlock();
 
        void PickBlock();
        void PlaceBlock();
-       void RemoveBlock();
+       void RemoveBlock() noexcept;
 
        void PrintBlockInfo();
+       void PrintChunkInfo();
+       void PrintLightInfo();
        void PrintSelectionInfo();
        void Print(const Block &);
 
@@ -42,7 +55,7 @@ public:
 
        void Update(int dt);
 
-       void Render(DirectionalLighting &);
+       void Render(DirectionalLighting &) noexcept;
 
 private:
        World &world;
@@ -56,14 +69,12 @@ private:
        OutlineModel outline;
        glm::mat4 outline_transform;
 
-       float move_velocity;
-       float pitch_sensitivity;
-       float yaw_sensitivity;
+       Config config;
 
        Block remove;
        Block selection;
 
-       bool front, back, left, right, up, down;
+       glm::tvec3<int> fwd, rev;
 
 };