]> git.localhorst.tv Git - blobs.git/blobdiff - src/app/Assets.hpp
load resources from data file
[blobs.git] / src / app / Assets.hpp
index 4ea7f57458f1f8c2435114eb561f40688c364bbc..3cfc1334371f7e2e491d3053113c6c0dd672a396 100644 (file)
@@ -5,18 +5,30 @@
 #include "../graphics/CreatureSkin.hpp"
 #include "../graphics/PlanetSurface.hpp"
 #include "../graphics/SunSurface.hpp"
+#include "../world/Resource.hpp"
+#include "../world/Set.hpp"
+#include "../world/TileType.hpp"
 
 #include <string>
 
 
 namespace blobs {
+namespace io {
+       class TokenStreamReader;
+}
 namespace app {
 
 struct Assets {
 
        std::string path;
-       std::string tile_path;
+       std::string data_path;
        std::string skin_path;
+       std::string tile_path;
+
+       struct {
+               world::Set<world::Resource> resources;
+               world::Set<world::TileType> tiles;
+       } data;
 
        struct {
                graphics::ArrayTexture tiles;
@@ -38,6 +50,9 @@ struct Assets {
        Assets(Assets &&) = delete;
        Assets &operator =(Assets &&) = delete;
 
+       void ReadResources(io::TokenStreamReader &);
+       void ReadTileTypes(io::TokenStreamReader &);
+
        void LoadTileTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;
        void LoadSkinTexture(const std::string &name, graphics::ArrayTexture &, int layer) const;