1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef CLIENT_H
- #define CLIENT_H
- #include "common/utils/Types.h"
- namespace GameClient
- {
- void start(int width, int height, const char* windowName);
- }
- // these two are not needed here but prevent further errors
- /*#include <GL/glew.h>
- #include <GLFW/glfw3.h>
- #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
|