]> git.localhorst.tv Git - blank.git/blob - src/app/Assets.hpp
load models from assets
[blank.git] / src / app / Assets.hpp
1 #ifndef BLANK_APP_ASSETS_HPP_
2 #define BLANK_APP_ASSETS_HPP_
3
4 #include "../graphics/Font.hpp"
5
6 #include <string>
7
8
9 namespace blank {
10
11 class ArrayTexture;
12 class BlockTypeRegistry;
13 class CubeMap;
14 class ModelRegistry;
15 class ShapeRegistry;
16 class Sound;
17 class Texture;
18 class TextureIndex;
19
20 class AssetLoader {
21
22 public:
23         explicit AssetLoader(const std::string &base);
24
25         void LoadBlockTypes(
26                 const std::string &set_name,
27                 BlockTypeRegistry &,
28                 TextureIndex &,
29                 const ShapeRegistry &) const;
30         CubeMap LoadCubeMap(const std::string &name) const;
31         Font LoadFont(const std::string &name, int size) const;
32         void LoadModels(
33                 const std::string &set_name,
34                 ModelRegistry &,
35                 TextureIndex &,
36                 const ShapeRegistry &) const;
37         void LoadShapes(const std::string &set_name, ShapeRegistry &) const;
38         Sound LoadSound(const std::string &name) const;
39         Texture LoadTexture(const std::string &name) const;
40         void LoadTexture(const std::string &name, ArrayTexture &, int layer) const;
41         void LoadTextures(const TextureIndex &, ArrayTexture &) const;
42
43 private:
44         std::string fonts;
45         std::string sounds;
46         std::string textures;
47         std::string data;
48
49 };
50
51 struct Assets {
52
53         Font large_ui_font;
54         Font small_ui_font;
55
56         Assets(const AssetLoader &);
57
58 };
59
60 }
61
62 #endif