#ifndef CLIENT_H #define CLIENT_H // these two are not needed here but prevent further errors #include #include #include "client/engine/KeyManager.h" #include "client/engine/MouseManager.h" #include "client/engine/Clock.h" #include "client/engine/Shader.h" #include "client/engine/DirectRenderer.h" #include "client/rendering/gui/GUIs.h" #include "client/rendering/gui/GUI.h" #include "common/world/IChunkProvider.h" using namespace std; class GameClient : public IClient { public: GameClient(); virtual ~GameClient(); void tick() override; void render3DTick(float lag) override; void render2DTick(float lag) override; void onKeyEvent(int key, int scancode, int action, int mods) override; void onMouseMove(double x, double y) override; void onMouseClick(int button, int action, int mods) override; private: double transformMouse(double in); static const int KEY_LEFT = 0; static const int KEY_RIGHT = 1; static const int KEY_UP = 2; static const int KEY_DOWN = 3; static const int KEY_JUMP = 4; static const int KEY_SNEAK = 5; static const int KEY_TEST = 10; static const int MOUSE_LEFT = 0; double oldMouseX = 0; double oldMouseY = 0; double diffMouseX = 0; double diffMouseY = 0; bool mouseTrapped = true; const double MOUSE_BORDER = 1.0; Clock tps; Clock fps; KeyManager keyManager; MouseManager mouseManager; Shader shader; DirectRenderer directRenderer; GUI* activeGUI = nullptr; }; #endif