]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/minimap.h
Turn off verbose info message introduced accidentally with ae9b1aa
[dragonfireclient.git] / src / minimap.h
index 58d05d6680ee65ca4b41356098bc184b8413d515..63a0541ab1a2538982bec18d7a79116e61f58f71 100644 (file)
@@ -17,22 +17,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef MINIMAP_HEADER
-#define MINIMAP_HEADER
+#pragma once
 
 #include "irrlichttypes_extrabloated.h"
-#include "client.h"
+#include "util/thread.h"
 #include "voxel.h"
-#include "threading/semaphore.h"
 #include <map>
 #include <string>
 #include <vector>
-#include "camera.h"
+
+class Client;
+class ITextureSource;
+class IShaderSource;
 
 #define MINIMAP_MAX_SX 512
 #define MINIMAP_MAX_SY 512
 
-
 enum MinimapMode {
        MINIMAP_MODE_OFF,
        MINIMAP_MODE_SURFACEx1,
@@ -63,7 +63,7 @@ struct MinimapPixel {
 };
 
 struct MinimapMapblock {
-       void getMinimapNodes(VoxelManipulator *vmanip, v3s16 pos);
+       void getMinimapNodes(VoxelManipulator *vmanip, const v3s16 &pos);
 
        MinimapPixel data[MAP_BLOCKSIZE * MAP_BLOCKSIZE];
 };
@@ -78,21 +78,19 @@ struct MinimapData {
        MinimapPixel minimap_scan[MINIMAP_MAX_SX * MINIMAP_MAX_SY];
        bool map_invalidated;
        bool minimap_shape_round;
-       video::IImage *minimap_image;
-       video::IImage *heightmap_image;
-       video::IImage *minimap_mask_round;
-       video::IImage *minimap_mask_square;
-       video::ITexture *texture;
-       video::ITexture *heightmap_texture;
-       video::ITexture *minimap_overlay_round;
-       video::ITexture *minimap_overlay_square;
-       video::ITexture *player_marker;
-       video::ITexture *object_marker_red;
+       video::IImage *minimap_mask_round = nullptr;
+       video::IImage *minimap_mask_square = nullptr;
+       video::ITexture *texture = nullptr;
+       video::ITexture *heightmap_texture = nullptr;
+       video::ITexture *minimap_overlay_round = nullptr;
+       video::ITexture *minimap_overlay_square = nullptr;
+       video::ITexture *player_marker = nullptr;
+       video::ITexture *object_marker_red = nullptr;
 };
 
 struct QueuedMinimapUpdate {
        v3s16 pos;
-       MinimapMapblock *data;
+       MinimapMapblock *data = nullptr;
 };
 
 class MinimapUpdateThread : public UpdateThread {
@@ -105,7 +103,7 @@ class MinimapUpdateThread : public UpdateThread {
        bool pushBlockUpdate(v3s16 pos, MinimapMapblock *data);
        bool popBlockUpdate(QueuedMinimapUpdate *update);
 
-       MinimapData *data;
+       MinimapData *data = nullptr;
 
 protected:
        virtual void doUpdate();
@@ -118,7 +116,7 @@ class MinimapUpdateThread : public UpdateThread {
 
 class Minimap {
 public:
-       Minimap(IrrlichtDevice *device, Client *client);
+       Minimap(Client *client);
        ~Minimap();
 
        void addBlock(v3s16 pos, MinimapMapblock *data);
@@ -163,5 +161,3 @@ class Minimap {
        std::mutex m_mutex;
        std::list<v2f> m_active_markers;
 };
-
-#endif