1 #ifndef BLOBS_APP_ASSETS_HPP_
2 #define BLOBS_APP_ASSETS_HPP_
4 #include "../creature/NameGenerator.hpp"
5 #include "../graphics/AlphaSprite.hpp"
6 #include "../graphics/ArrayTexture.hpp"
7 #include "../graphics/Canvas.hpp"
8 #include "../graphics/CreatureSkin.hpp"
9 #include "../graphics/CubeMap.hpp"
10 #include "../graphics/Font.hpp"
11 #include "../graphics/PlanetSurface.hpp"
12 #include "../graphics/SkyBox.hpp"
13 #include "../graphics/SunSurface.hpp"
14 #include "../math/GaloisLFSR.hpp"
15 #include "../world/Resource.hpp"
16 #include "../world/Set.hpp"
17 #include "../world/TileType.hpp"
24 class TokenStreamReader;
31 std::string data_path;
32 std::string font_path;
33 std::string skin_path;
35 std::string tile_path;
37 math::GaloisLFSR random;
39 creature::NameGenerator name;
42 world::Set<world::Resource> resources;
43 world::Set<world::TileType> tile_types;
48 graphics::Font medium;
53 graphics::ArrayTexture tiles;
54 graphics::ArrayTexture skins;
55 graphics::CubeMap sky;
59 graphics::AlphaSprite alpha_sprite;
60 graphics::Canvas canvas;
61 graphics::PlanetSurface planet_surface;
62 graphics::SunSurface sun_surface;
63 graphics::CreatureSkin creature_skin;
64 graphics::SkyBox sky_box;
70 Assets(const Assets &) = delete;
71 Assets &operator =(const Assets &) = delete;
73 Assets(Assets &&) = delete;
74 Assets &operator =(Assets &&) = delete;
76 void ReadResources(io::TokenStreamReader &);
77 void ReadTileTypes(io::TokenStreamReader &);
79 void LoadTileTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
80 void LoadSkinTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
81 void LoadSkyTexture(const std::string &name, graphics::CubeMap &) const;