X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FAssets.hpp;h=22b60878da42ed6663d5735fa338b13e8f71d061;hb=c51b3bbef5c9b8ab52f55d46f08c5992fe574f70;hp=05a45ac82abe211a9425b4fa7aa0bf5e194c29f6;hpb=7ae2bd120fd0e1800edc9cbeb61e72bd06ffcf10;p=blobs.git diff --git a/src/app/Assets.hpp b/src/app/Assets.hpp index 05a45ac..22b6087 100644 --- a/src/app/Assets.hpp +++ b/src/app/Assets.hpp @@ -1,8 +1,11 @@ #ifndef BLOBS_APP_ASSETS_HPP_ #define BLOBS_APP_ASSETS_HPP_ +#include "../graphics/AlphaSprite.hpp" #include "../graphics/ArrayTexture.hpp" +#include "../graphics/Canvas.hpp" #include "../graphics/CreatureSkin.hpp" +#include "../graphics/Font.hpp" #include "../graphics/PlanetSurface.hpp" #include "../graphics/SunSurface.hpp" #include "../world/Resource.hpp" @@ -13,25 +16,38 @@ namespace blobs { +namespace io { + class TokenStreamReader; +} namespace app { struct Assets { std::string path; - std::string tile_path; + std::string data_path; + std::string font_path; std::string skin_path; + std::string tile_path; struct { world::Set resources; - world::Set tiles; + world::Set tile_types; } data; + struct { + graphics::Font large; + graphics::Font medium; + graphics::Font small; + } fonts; + struct { graphics::ArrayTexture tiles; graphics::ArrayTexture skins; } textures; struct { + graphics::AlphaSprite alpha_sprite; + graphics::Canvas canvas; graphics::PlanetSurface planet_surface; graphics::SunSurface sun_surface; graphics::CreatureSkin creature_skin; @@ -46,6 +62,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;