summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-08 04:30:01 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-08 04:43:23 +0200
commit55b5e60b189490c33b415e3c956800da21064e3b (patch)
tree6fdb92acbdaeb7ddb08f92b21fa5167242ab7721 /src/AssetManager.hpp
parentMore data saved in Settings (diff)
downloadAltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar.gz
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar.bz2
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar.lz
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar.xz
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.tar.zst
AltCraft-55b5e60b189490c33b415e3c956800da21064e3b.zip
Diffstat (limited to '')
-rw-r--r--src/AssetManager.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/AssetManager.hpp b/src/AssetManager.hpp
index 2940b5f..f3d0718 100644
--- a/src/AssetManager.hpp
+++ b/src/AssetManager.hpp
@@ -92,6 +92,24 @@ struct BlockModel {
std::vector<ParsedFace> parsedFaces;
};
+struct BlockStateVariant {
+ std::string variantName;
+
+ struct Model {
+ std::string modelName;
+ int x = 0;
+ int y = 0;
+ bool uvLock = false;
+ int weight = 1;
+ };
+
+ std::vector<Model> models;
+};
+
+struct BlockState {
+ std::map<std::string, BlockStateVariant> variants;
+};
+
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;
@@ -113,6 +131,10 @@ struct AssetBlockModel : Asset {
BlockModel blockModel;
};
+struct AssetBlockState : Asset {
+ BlockState blockState;
+};
+
struct AssetTexture : Asset {
std::vector<unsigned char> textureData;
unsigned int realWidth, realHeight;