From 40ce538aad9af8f7634c4ba7e9f12246fb23b31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Thu, 16 Mar 2017 10:34:54 +0100 Subject: [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 --- src/minimap.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/minimap.h') 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 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(); -- cgit v1.2.3