diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-03-05 21:18:53 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-05 21:18:53 +1100 |
commit | b77101f031e7fc49abf6bfa269b1036d368b552c (patch) | |
tree | 52f7b44b44c19dd9cafaba5f463b82ee32d6c1df /source/base/StarAssets.hpp | |
parent | 149d9fb606cbbc0d316e9836945630708a6558bc (diff) | |
parent | 33bb286cfb2a99ee785827c0f92e02acd2ec0cfd (diff) |
Merge pull request #206 from Bottinator22/main
Allow persistently preloading assets
Diffstat (limited to 'source/base/StarAssets.hpp')
-rw-r--r-- | source/base/StarAssets.hpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source/base/StarAssets.hpp b/source/base/StarAssets.hpp index 6ffcb05..a8e4480 100644 --- a/source/base/StarAssets.hpp +++ b/source/base/StarAssets.hpp @@ -71,20 +71,20 @@ public: StringList digestIgnore; }; - enum class AssetType { - Json, - Image, - Audio, - Font, - Bytes - }; - enum class QueuePriority { None, Working, PostProcess, Load }; + + enum class AssetType { + Json, + Image, + Audio, + Font, + Bytes + }; struct AssetId { AssetType type; @@ -107,6 +107,7 @@ public: double time = 0.0; bool needsPostProcessing = false; + bool forcePersist = false; }; struct JsonData : AssetData { @@ -255,6 +256,14 @@ public: void cleanup(); private: + EnumMap<AssetType> const AssetTypeNames{ + {AssetType::Json, "json"}, + {AssetType::Image, "image"}, + {AssetType::Audio, "audio"}, + {AssetType::Font, "font"}, + {AssetType::Bytes, "bytes"} + }; + static FramesSpecification parseFramesSpecification(Json const& frameConfig, String path); void queueAssets(List<AssetId> const& assetIds) const; |