X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FAssets.hpp;h=9766577c565dd0d11b9ce4f0c98db3bbae1094d4;hb=fd86376a8e7d3f1b09be3d018f772ef884937238;hp=65c72fe04d73ad30a1fcf9d215244ad3dfe4ec66;hpb=65dbb0391afb6867bd9b388c6351b947a022abad;p=blank.git diff --git a/src/app/Assets.hpp b/src/app/Assets.hpp index 65c72fe..9766577 100644 --- a/src/app/Assets.hpp +++ b/src/app/Assets.hpp @@ -10,21 +10,36 @@ namespace blank { class ArrayTexture; class BlockTypeRegistry; +class CubeMap; +class ModelRegistry; +class ResourceIndex; +class ShapeRegistry; class Sound; class Texture; -class TextureIndex; -class Assets { +class AssetLoader { public: - explicit Assets(const std::string &base); - - void LoadBlockTypes(const std::string &set_name, BlockTypeRegistry &, TextureIndex &) const; + explicit AssetLoader(const std::string &base); + + void LoadBlockTypes( + const std::string &set_name, + BlockTypeRegistry &, + ResourceIndex &snd, + ResourceIndex &tex, + const ShapeRegistry &) const; + CubeMap LoadCubeMap(const std::string &name) const; Font LoadFont(const std::string &name, int size) const; + void LoadModels( + const std::string &set_name, + ModelRegistry &, + ResourceIndex &, + const ShapeRegistry &) const; + void LoadShapes(const std::string &set_name, ShapeRegistry &) const; Sound LoadSound(const std::string &name) const; Texture LoadTexture(const std::string &name) const; void LoadTexture(const std::string &name, ArrayTexture &, int layer) const; - void LoadTextures(const TextureIndex &, ArrayTexture &) const; + void LoadTextures(const ResourceIndex &, ArrayTexture &) const; private: std::string fonts; @@ -32,11 +47,15 @@ private: std::string textures; std::string data; -public: - // common assets shared by may states +}; + +struct Assets { + Font large_ui_font; Font small_ui_font; + explicit Assets(const AssetLoader &); + }; }