diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-10-09 18:39:48 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | a81bcb1942ddad5989115061338e72211443e633 (patch) | |
tree | cb1cc6feadb7dfb49f96cbc9b2a4f2bfb9ad8488 /src/AssetManager.hpp | |
parent | 2017-10-07 (diff) | |
download | AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.gz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.bz2 AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.lz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.xz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.zst AltCraft-a81bcb1942ddad5989115061338e72211443e633.zip |
Diffstat (limited to 'src/AssetManager.hpp')
-rw-r--r-- | src/AssetManager.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
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<ElementData> 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<std::string, BlockId> assetIds; |