mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Use smart ptrs for Minimap's member vars
This commit is contained in:
parent
9827f9df1b
commit
24efd7dc91
2 changed files with 25 additions and 26 deletions
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include "../hud.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "irr_ptr.h"
|
||||
#include "util/thread.h"
|
||||
#include "voxel.h"
|
||||
#include <map>
|
||||
|
@ -148,7 +149,7 @@ public:
|
|||
void blitMinimapPixelsToImageSurface(video::IImage *map_image,
|
||||
video::IImage *heightmap_image);
|
||||
|
||||
scene::SMeshBuffer *getMinimapMeshBuffer();
|
||||
irr_ptr<scene::SMeshBuffer> createMinimapMeshBuffer();
|
||||
|
||||
MinimapMarker* addMarker(scene::ISceneNode *parent_node);
|
||||
void removeMarker(MinimapMarker **marker);
|
||||
|
@ -158,20 +159,20 @@ public:
|
|||
|
||||
video::IVideoDriver *driver;
|
||||
Client* client;
|
||||
MinimapData *data;
|
||||
std::unique_ptr<MinimapData> data;
|
||||
|
||||
private:
|
||||
ITextureSource *m_tsrc;
|
||||
IShaderSource *m_shdrsrc;
|
||||
const NodeDefManager *m_ndef;
|
||||
MinimapUpdateThread *m_minimap_update_thread = nullptr;
|
||||
scene::SMeshBuffer *m_meshbuffer;
|
||||
std::unique_ptr<MinimapUpdateThread> m_minimap_update_thread;
|
||||
irr_ptr<scene::SMeshBuffer> m_meshbuffer;
|
||||
bool m_enable_shaders;
|
||||
std::vector<MinimapModeDef> m_modes;
|
||||
size_t m_current_mode_index;
|
||||
u16 m_surface_mode_scan_height;
|
||||
f32 m_angle;
|
||||
std::mutex m_mutex;
|
||||
std::list<MinimapMarker*> m_markers;
|
||||
std::list<std::unique_ptr<MinimapMarker>> m_markers;
|
||||
std::list<v2f> m_active_markers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue