summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-03 19:07:29 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-03 19:07:29 +0200
commit76552663f49578e1d231214916461ac7cd93a44f (patch)
tree6c9bb3dd2bc0b4e5226a3f7c443ce4175d0ecce6 /src/AssetManager.hpp
parentBlockModels are using asset tree now (diff)
downloadAltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar.gz
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar.bz2
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar.lz
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar.xz
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.tar.zst
AltCraft-76552663f49578e1d231214916461ac7cd93a44f.zip
Diffstat (limited to '')
-rw-r--r--src/AssetManager.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/AssetManager.hpp b/src/AssetManager.hpp
index cfeb91a..b8748ae 100644
--- a/src/AssetManager.hpp
+++ b/src/AssetManager.hpp
@@ -158,6 +158,12 @@ struct AssetBlockModel : Asset {
BlockModel blockModel;
};
+struct AssetTexture : Asset {
+ std::vector<unsigned char> textureData;
+ double x, y, w, h;
+ unsigned int realWidth, realHeight;
+};
+
class AssetManager {
Texture *textureAtlas;
std::map<std::string, BlockId> assetIds;
@@ -209,4 +215,8 @@ public:
void RecursiveWalkAsset(const std::string &assetPath, std::function<void(AssetTreeNode&)> fnc);
AssetTreeNode *GetAssetByAssetName(const std::string &assetName);
+
+ void LoadTextures();
+
+ void ParseAssetTexture(AssetTreeNode &node);
};