PCMStream, msvc build fix, sound is an asset now

This commit is contained in:
MihailRis
2024-02-28 12:37:53 +03:00
parent 96ad7664c4
commit 33b39dfece
8 changed files with 109 additions and 30 deletions
+7 -5
View File
@@ -14,11 +14,9 @@ class Font;
class Atlas;
class UiDocument;
struct LayoutCfg {
int env;
LayoutCfg(int env) : env(env) {}
};
namespace audio {
class Sound;
}
class Assets {
std::unordered_map<std::string, std::shared_ptr<Texture>> textures;
@@ -26,6 +24,7 @@ class Assets {
std::unordered_map<std::string, std::shared_ptr<Font>> fonts;
std::unordered_map<std::string, std::shared_ptr<Atlas>> atlases;
std::unordered_map<std::string, std::shared_ptr<UiDocument>> layouts;
std::unordered_map<std::string, std::shared_ptr<audio::Sound>> sounds;
std::vector<TextureAnimation> animations;
public:
~Assets();
@@ -41,6 +40,9 @@ public:
Atlas* getAtlas(std::string name) const;
void store(Atlas* atlas, std::string name);
audio::Sound* getSound(std::string name) const;
void store(audio::Sound* sound, std::string name);
const std::vector<TextureAnimation>& getAnimations();
void store(const TextureAnimation& animation);