summaryrefslogtreecommitdiff
path: root/src/client/minimap.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-10-19 20:38:15 +0200
committerGitHub <noreply@github.com>2020-10-19 20:38:15 +0200
commit660115c1abc76f3d4f6a6597ed0c4737465c6c55 (patch)
treef919584a87460f07d81fa994008e77bcb27a3cba /src/client/minimap.h
parentb826e3973065a0bb81269c8decb5a33073508164 (diff)
downloadminetest-660115c1abc76f3d4f6a6597ed0c4737465c6c55.tar.gz
minetest-660115c1abc76f3d4f6a6597ed0c4737465c6c55.tar.bz2
minetest-660115c1abc76f3d4f6a6597ed0c4737465c6c55.zip
Decouple entity minimap markers from nametags replacing with show_on_minimap property (#10443)
Diffstat (limited to 'src/client/minimap.h')
-rw-r--r--src/client/minimap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/minimap.h b/src/client/minimap.h
index 11374b116..4a2c462f8 100644
--- a/src/client/minimap.h
+++ b/src/client/minimap.h
@@ -48,6 +48,13 @@ struct MinimapModeDef {
u16 scale;
};
+struct MinimapMarker {
+ MinimapMarker(scene::ISceneNode *parent_node):
+ parent_node(parent_node)
+ {
+ }
+ scene::ISceneNode *parent_node;
+};
struct MinimapPixel {
//! The topmost node that the minimap displays.
MapNode n;
@@ -142,6 +149,9 @@ public:
scene::SMeshBuffer *getMinimapMeshBuffer();
+ MinimapMarker* addMarker(scene::ISceneNode *parent_node);
+ void removeMarker(MinimapMarker **marker);
+
void updateActiveMarkers();
void drawMinimap();
void drawMinimap(core::rect<s32> rect);
@@ -162,5 +172,6 @@ private:
u16 m_surface_mode_scan_height;
f32 m_angle;
std::mutex m_mutex;
+ std::list<MinimapMarker*> m_markers;
std::list<v2f> m_active_markers;
};