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