summaryrefslogtreecommitdiff
path: root/src/minimap.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-03-16 10:34:54 +0100
committerGitHub <noreply@github.com>2017-03-16 10:34:54 +0100
commit40ce538aad9af8f7634c4ba7e9f12246fb23b31c (patch)
treeda8788a581acbc18bb9f5e35a2be620ba0125471 /src/minimap.h
parenteb88e5dd4b181a90b382c036cf6c4f42e63e8cc2 (diff)
downloadminetest-40ce538aad9af8f7634c4ba7e9f12246fb23b31c.tar.gz
minetest-40ce538aad9af8f7634c4ba7e9f12246fb23b31c.tar.bz2
minetest-40ce538aad9af8f7634c4ba7e9f12246fb23b31c.zip
[CSM] Add minimap API modifiers (#5399)
* Rename Mapper (too generic) to Minimap * Add lua functions to get/set position, angle, mode for minimap * Client: rename m_mapper to m_minimap * Add minimap to core.ui namespace (core.ui.minimap) * Add various functions to manage minimap (show, hide, toggle_shape) * Cleanup trivial declaration in client
Diffstat (limited to 'src/minimap.h')
-rw-r--r--src/minimap.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/minimap.h b/src/minimap.h
index 60b80d833..eb0ae1cf4 100644
--- a/src/minimap.h
+++ b/src/minimap.h
@@ -112,19 +112,21 @@ private:
std::map<v3s16, MinimapMapblock *> m_blocks_cache;
};
-class Mapper {
+class Minimap {
public:
- Mapper(IrrlichtDevice *device, Client *client);
- ~Mapper();
+ Minimap(IrrlichtDevice *device, Client *client);
+ ~Minimap();
void addBlock(v3s16 pos, MinimapMapblock *data);
v3f getYawVec();
- MinimapMode getMinimapMode();
void setPos(v3s16 pos);
+ v3s16 getPos() const { return data->pos; }
void setAngle(f32 angle);
+ f32 getAngle() const { return m_angle; }
void setMinimapMode(MinimapMode mode);
+ MinimapMode getMinimapMode() const { return data->mode; }
void toggleMinimapShape();