]> git.localhorst.tv Git - blobs.git/blob - src/app/Assets.hpp
read (basic) tile information from file
[blobs.git] / src / app / Assets.hpp
1 #ifndef BLOBS_APP_ASSETS_HPP_
2 #define BLOBS_APP_ASSETS_HPP_
3
4 #include "../graphics/ArrayTexture.hpp"
5 #include "../graphics/CreatureSkin.hpp"
6 #include "../graphics/PlanetSurface.hpp"
7 #include "../graphics/SunSurface.hpp"
8 #include "../world/Resource.hpp"
9 #include "../world/Set.hpp"
10 #include "../world/TileType.hpp"
11
12 #include <string>
13
14
15 namespace blobs {
16 namespace io {
17         class TokenStreamReader;
18 }
19 namespace app {
20
21 struct Assets {
22
23         std::string path;
24         std::string data_path;
25         std::string skin_path;
26         std::string tile_path;
27
28         struct {
29                 world::Set<world::Resource> resources;
30                 world::Set<world::TileType> tiles;
31         } data;
32
33         struct {
34                 graphics::ArrayTexture tiles;
35                 graphics::ArrayTexture skins;
36         } textures;
37
38         struct {
39                 graphics::PlanetSurface planet_surface;
40                 graphics::SunSurface sun_surface;
41                 graphics::CreatureSkin creature_skin;
42         } shaders;
43
44         Assets();
45         ~Assets();
46
47         Assets(const Assets &) = delete;
48         Assets &operator =(const Assets &) = delete;
49
50         Assets(Assets &&) = delete;
51         Assets &operator =(Assets &&) = delete;
52
53         void ReadTileTypes(io::TokenStreamReader &);
54
55         void LoadTileTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
56         void LoadSkinTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
57
58 };
59
60 }
61 }
62
63 #endif