summaryrefslogtreecommitdiffstats
path: root/Display.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Display.hpp')
-rw-r--r--Display.hpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/Display.hpp b/Display.hpp
deleted file mode 100644
index 3d54482..0000000
--- a/Display.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include <SFML/Graphics.hpp>
-#include <thread>
-#include <mutex>
-#include <condition_variable>
-#include "World.hpp"
-
-class Display {
- sf::RenderWindow *window;
- std::map<PositionI, std::array<sf::Image,16>> sectionTextures;
- //std::map<PositionI, std::array<sf::Texture,16>> sectionTextures;
- World *world;
- bool isGameStarted = false;
- std::condition_variable &gameStartWaiter;
- std::mutex gameStartMutex;
-
- //utility methods
- void pollEvents();
-
- void renderWorld();
-
- void Update();
-
- sf::Image &GetSectionTexture(PositionI pos);
-
- //gameState vars
- sf::Vector2f mousePos;
- int renderLayer = 70;
- //int currentId = 0;
- bool isClicked = false;
- int coeff = 10;
- double frameTime = 0;
-public:
- Display(int w, int h, std::string title, World *world, std::condition_variable &gameStartWaiter);
-
- ~Display();
-
- bool IsClosed();
-
- void SetPlayerPos(float x, float z);
-
- void MainLoop();
-};
-