aboutsummaryrefslogtreecommitdiff
path: root/src/client/mapblock_mesh.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-06 09:54:04 +0200
committersfan5 <sfan5@live.de>2022-05-08 19:12:10 +0200
commita66e6d4dff0b1dad065297442981718d7f7aec55 (patch)
tree29e67e98495380862ac0368db64b499910e5e282 /src/client/mapblock_mesh.h
parent1fa4f58080b068920d7611291709377072d0cd00 (diff)
downloadminetest-a66e6d4dff0b1dad065297442981718d7f7aec55.tar.gz
minetest-a66e6d4dff0b1dad065297442981718d7f7aec55.tar.bz2
minetest-a66e6d4dff0b1dad065297442981718d7f7aec55.zip
Consolidate some data structures in MapBlockMesh
Diffstat (limited to 'src/client/mapblock_mesh.h')
-rw-r--r--src/client/mapblock_mesh.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/mapblock_mesh.h b/src/client/mapblock_mesh.h
index cfc39ade2..72d128038 100644
--- a/src/client/mapblock_mesh.h
+++ b/src/client/mapblock_mesh.h
@@ -219,7 +219,14 @@ public:
{
return this->m_transparent_buffers;
}
+
private:
+ struct AnimationInfo {
+ int frame; // last animation frame
+ int frame_offset;
+ TileLayer tile;
+ };
+
scene::IMesh *m_mesh[MAX_TILE_LAYERS];
MinimapMapblock *m_minimap_mapblock;
ITextureSource *m_tsrc;
@@ -238,12 +245,10 @@ private:
// Maps mesh and mesh buffer (i.e. material) indices to base texture names
std::map<std::pair<u8, u32>, std::string> m_crack_materials;
- // Animation info: texture animationi
+ // Animation info: texture animation
// Maps mesh and mesh buffer indices to TileSpecs
// Keys are pairs of (mesh index, buffer index in the mesh)
- std::map<std::pair<u8, u32>, TileLayer> m_animation_tiles;
- std::map<std::pair<u8, u32>, int> m_animation_frames; // last animation frame
- std::map<std::pair<u8, u32>, int> m_animation_frame_offsets;
+ std::map<std::pair<u8, u32>, AnimationInfo> m_animation_info;
// Animation info: day/night transitions
// Last daynight_ratio value passed to animate()