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/Font.hpp"
10 #include "../graphics/PlanetSurface.hpp"
11 #include "../graphics/SunSurface.hpp"
12 #include "../math/GaloisLFSR.hpp"
13 #include "../world/Resource.hpp"
14 #include "../world/Set.hpp"
15 #include "../world/TileType.hpp"
22 class TokenStreamReader;
29 std::string data_path;
30 std::string font_path;
31 std::string skin_path;
32 std::string tile_path;
34 math::GaloisLFSR random;
36 creature::NameGenerator name;
39 world::Set<world::Resource> resources;
40 world::Set<world::TileType> tile_types;
45 graphics::Font medium;
50 graphics::ArrayTexture tiles;
51 graphics::ArrayTexture skins;
55 graphics::AlphaSprite alpha_sprite;
56 graphics::Canvas canvas;
57 graphics::PlanetSurface planet_surface;
58 graphics::SunSurface sun_surface;
59 graphics::CreatureSkin creature_skin;
65 Assets(const Assets &) = delete;
66 Assets &operator =(const Assets &) = delete;
68 Assets(Assets &&) = delete;
69 Assets &operator =(Assets &&) = delete;
71 void ReadResources(io::TokenStreamReader &);
72 void ReadTileTypes(io::TokenStreamReader &);
74 void LoadTileTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
75 void LoadSkinTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;