X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FAssets.hpp;h=3cfc1334371f7e2e491d3053113c6c0dd672a396;hb=5e82e61db8b9ed5b9a30c9706620b62b844ac734;hp=c80726a07c05adbd50058e6a41d6eea65e18cca9;hpb=c5556cf5f6813887a3503433c021ccd2e7fae865;p=blobs.git diff --git a/src/app/Assets.hpp b/src/app/Assets.hpp index c80726a..3cfc133 100644 --- a/src/app/Assets.hpp +++ b/src/app/Assets.hpp @@ -2,22 +2,43 @@ #define BLOBS_APP_ASSETS_HPP_ #include "../graphics/ArrayTexture.hpp" +#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 namespace blobs { +namespace io { + class TokenStreamReader; +} namespace app { struct Assets { + std::string path; + std::string data_path; + std::string skin_path; + std::string tile_path; + + struct { + world::Set resources; + world::Set tiles; + } data; + struct { graphics::ArrayTexture tiles; + graphics::ArrayTexture skins; } textures; struct { graphics::PlanetSurface planet_surface; graphics::SunSurface sun_surface; + graphics::CreatureSkin creature_skin; } shaders; Assets(); @@ -29,6 +50,12 @@ 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; + }; }