diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2016-10-06 19:20:12 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-10-06 22:37:26 +0200 |
commit | 155288ee981c70f505526347cb2bcda4df1c8e6b (patch) | |
tree | 582095bc50cb60d3dedb9f6a08e908324a3da365 /src/mapblock_mesh.h | |
parent | b66a5d2f8842cc84ae44257dc0ead255e5b0538f (diff) | |
download | minetest-155288ee981c70f505526347cb2bcda4df1c8e6b.tar.gz minetest-155288ee981c70f505526347cb2bcda4df1c8e6b.tar.bz2 minetest-155288ee981c70f505526347cb2bcda4df1c8e6b.zip |
use unordered containers where possible (patch 4 on X)
Also remove some unused parameters/functions
Diffstat (limited to 'src/mapblock_mesh.h')
-rw-r--r-- | src/mapblock_mesh.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mapblock_mesh.h b/src/mapblock_mesh.h index f89fbe669..8376468da 100644 --- a/src/mapblock_mesh.h +++ b/src/mapblock_mesh.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes_extrabloated.h" #include "client/tile.h" #include "voxel.h" +#include "util/cpp11_container.h" #include <map> class IGameDef; @@ -121,7 +122,7 @@ public: if(m_animation_force_timer > 0) m_animation_force_timer--; } - + void updateCameraOffset(v3s16 camera_offset); private: @@ -144,20 +145,20 @@ private: // Last crack value passed to animate() int m_last_crack; // Maps mesh buffer (i.e. material) indices to base texture names - std::map<u32, std::string> m_crack_materials; + UNORDERED_MAP<u32, std::string> m_crack_materials; // Animation info: texture animationi // Maps meshbuffers to TileSpecs - std::map<u32, TileSpec> m_animation_tiles; - std::map<u32, int> m_animation_frames; // last animation frame - std::map<u32, int> m_animation_frame_offsets; - + UNORDERED_MAP<u32, TileSpec> m_animation_tiles; + UNORDERED_MAP<u32, int> m_animation_frames; // last animation frame + UNORDERED_MAP<u32, int> m_animation_frame_offsets; + // Animation info: day/night transitions // Last daynight_ratio value passed to animate() u32 m_last_daynight_ratio; // For each meshbuffer, maps vertex indices to (day,night) pairs std::map<u32, std::map<u32, std::pair<u8, u8> > > m_daynight_diffs; - + // Camera offset info -> do we have to translate the mesh? v3s16 m_camera_offset; }; |