X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FAssets.hpp;h=5f971c689ddba201d7cbc700a6b1c1e79c975692;hb=8f6530c75730f901efd6708e4fde7e68a178adf1;hp=ed3c2e2605d8dd6bda3c16f0d4962d34fcfb1fd7;hpb=be413456f57da06e918ae7bf4c4f35e5198ff7ce;p=blobs.git diff --git a/src/app/Assets.hpp b/src/app/Assets.hpp index ed3c2e2..5f971c6 100644 --- a/src/app/Assets.hpp +++ b/src/app/Assets.hpp @@ -1,21 +1,59 @@ #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 "../math/GaloisLFSR.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 font_path; + std::string skin_path; + std::string tile_path; + + math::GaloisLFSR random; + + struct { + world::Set resources; + 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; } shaders; Assets(); @@ -27,6 +65,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; + }; }