diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-03 19:07:29 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-03 19:07:29 +0200 |
commit | 76552663f49578e1d231214916461ac7cd93a44f (patch) | |
tree | 6c9bb3dd2bc0b4e5226a3f7c443ce4175d0ecce6 /src/AssetManager.hpp | |
parent | BlockModels are using asset tree now (diff) | |
download | AltCraft-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 'src/AssetManager.hpp')
-rw-r--r-- | src/AssetManager.hpp | 10 |
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); }; |