summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AssetManager.hpp')
-rw-r--r--src/AssetManager.hpp7
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;