diff options
Diffstat (limited to 'src/minimap.h')
-rw-r--r-- | src/minimap.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/minimap.h b/src/minimap.h index 628be7489..743b2bff2 100644 --- a/src/minimap.h +++ b/src/minimap.h @@ -20,18 +20,20 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef MINIMAP_HEADER #define MINIMAP_HEADER -#include <map> -#include <string> -#include <vector> #include "irrlichttypes_extrabloated.h" #include "client.h" #include "voxel.h" -#include "jthread/jmutex.h" -#include "jthread/jsemaphore.h" +#include "threading/mutex.h" +#include "threading/semaphore.h" +#include <map> +#include <string> +#include <vector> +#include "camera.h" #define MINIMAP_MAX_SX 512 #define MINIMAP_MAX_SY 512 + enum MinimapMode { MINIMAP_MODE_OFF, MINIMAP_MODE_SURFACEx1, @@ -81,6 +83,7 @@ struct MinimapData { video::ITexture *minimap_overlay_round; video::ITexture *minimap_overlay_square; video::ITexture *player_marker; + video::ITexture *object_marker_red; }; struct QueuedMinimapUpdate { @@ -90,6 +93,7 @@ struct QueuedMinimapUpdate { class MinimapUpdateThread : public UpdateThread { public: + MinimapUpdateThread() : UpdateThread("Minimap") {} virtual ~MinimapUpdateThread(); void getMap(v3s16 pos, s16 size, s16 height, bool radar); @@ -105,11 +109,10 @@ public: MinimapData *data; protected: - const char *getName() { return "MinimapUpdateThread"; } virtual void doUpdate(); private: - JMutex m_queue_mutex; + Mutex m_queue_mutex; std::deque<QueuedMinimapUpdate> m_update_queue; std::map<v3s16, MinimapMapblock *> m_blocks_cache; }; @@ -137,9 +140,12 @@ public: video::IImage *heightmap_image); scene::SMeshBuffer *getMinimapMeshBuffer(); + + void updateActiveMarkers(); void drawMinimap(); video::IVideoDriver *driver; + Client* client; MinimapData *data; private: @@ -151,7 +157,8 @@ private: bool m_enable_shaders; u16 m_surface_mode_scan_height; f32 m_angle; - JMutex m_mutex; + Mutex m_mutex; + std::list<v2f> m_active_markers; }; #endif |