LocalPlayer::accelerateHorizontal: cleanups
[oweals/minetest.git] / src / mapblock_mesh.h
index f32df39581b8428f7237a6325e65c255fcb3edb1..e2a66fbb909a9041972c7a6293af82ae9f47719e 100644 (file)
@@ -23,7 +23,6 @@ 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 Client;
@@ -40,10 +39,9 @@ struct MinimapMapblock;
 struct MeshMakeData
 {
        VoxelManipulator m_vmanip;
-       v3s16 m_blockpos;
-       v3s16 m_crack_pos_relative;
-       bool m_smooth_lighting;
-       bool m_show_hud;
+       v3s16 m_blockpos = v3s16(-1337,-1337,-1337);
+       v3s16 m_crack_pos_relative = v3s16(-1337,-1337,-1337);
+       bool m_smooth_lighting = false;
 
        Client *m_client;
        bool m_use_shaders;
@@ -139,8 +137,6 @@ public:
 private:
        scene::IMesh *m_mesh[MAX_TILE_LAYERS];
        MinimapMapblock *m_minimap_mapblock;
-       Client *m_client;
-       video::IVideoDriver *m_driver;
        ITextureSource *m_tsrc;
        IShaderSource *m_shdrsrc;
 
@@ -267,8 +263,10 @@ void final_color_blend(video::SColor *result,
 
 // Retrieves the TileSpec of a face of a node
 // Adds MATERIAL_FLAG_CRACK if the node is cracked
-TileSpec getNodeTileN(MapNode mn, v3s16 p, u8 tileindex, MeshMakeData *data);
-TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data);
+// TileSpec should be passed as reference due to the underlying TileFrame and its vector
+// TileFrame vector copy cost very much to client
+void getNodeTileN(MapNode mn, v3s16 p, u8 tileindex, MeshMakeData *data, TileSpec &tile);
+void getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data, TileSpec &tile);
 
 #endif