From a81bcb1942ddad5989115061338e72211443e633 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Mon, 9 Oct 2017 21:39:48 +0500 Subject: 2017-10-09 --- src/AssetManager.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/AssetManager.hpp') diff --git a/src/AssetManager.hpp b/src/AssetManager.hpp index 50d9bbf..7cb7f8f 100644 --- a/src/AssetManager.hpp +++ b/src/AssetManager.hpp @@ -106,8 +106,9 @@ struct BlockModel { }; struct FaceData { struct Uv { - int x1, y1, x2, y2; + int x1, y1, x2, y2; } uv = { 0,0,0,0 }; + std::string texture; FaceDirection cullface = FaceDirection::none; int rotation = 0; @@ -120,6 +121,10 @@ struct BlockModel { std::vector Elements; }; +inline bool operator==(const BlockModel::ElementData::FaceData::Uv &lhs, const BlockModel::ElementData::FaceData::Uv &rhs) { + return lhs.x1 == rhs.x1 && lhs.y1 == rhs.y1 && lhs.x2 == rhs.x2 && lhs.y2 == rhs.y2; +} + class AssetManager { Texture *textureAtlas; std::map assetIds; -- cgit v1.2.3