diff options
Diffstat (limited to 'source/base/StarAssets.hpp')
-rw-r--r-- | source/base/StarAssets.hpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/base/StarAssets.hpp b/source/base/StarAssets.hpp index 203214a..a8e4480 100644 --- a/source/base/StarAssets.hpp +++ b/source/base/StarAssets.hpp @@ -38,14 +38,6 @@ struct FramesSpecification { StringMap<String> aliases; }; -enum class AssetType { - Json, - Image, - Audio, - Font, - Bytes -}; - // The assets system can load image, font, json, and data assets from a set of // sources. Each source is either a directory on the filesystem or a single // packed asset file. @@ -85,6 +77,14 @@ public: PostProcess, Load }; + + enum class AssetType { + Json, + Image, + Audio, + Font, + Bytes + }; struct AssetId { AssetType type; @@ -256,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; |