]> git.localhorst.tv Git - blank.git/blob - src/app/Assets.hpp
collect and load textures required by block types
[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 Sound;
14 class Texture;
15 class TextureIndex;
16
17 class Assets {
18
19 public:
20         explicit Assets(const std::string &base);
21
22         void LoadBlockTypes(const std::string &set_name, BlockTypeRegistry &, TextureIndex &) const;
23         Font LoadFont(const std::string &name, int size) const;
24         Sound LoadSound(const std::string &name) const;
25         Texture LoadTexture(const std::string &name) const;
26         void LoadTexture(const std::string &name, ArrayTexture &, int layer) const;
27         void LoadTextures(const TextureIndex &, ArrayTexture &) const;
28
29 private:
30         std::string fonts;
31         std::string sounds;
32         std::string textures;
33         std::string data;
34
35 public:
36         // common assets shared by may states
37         Font large_ui_font;
38         Font small_ui_font;
39
40 };
41
42 }
43
44 #endif