diff options
author | Bottinator22 <bottinator22@gmail.com> | 2025-03-02 20:25:08 -0800 |
---|---|---|
committer | Bottinator22 <bottinator22@gmail.com> | 2025-03-02 20:25:08 -0800 |
commit | 33bb286cfb2a99ee785827c0f92e02acd2ec0cfd (patch) | |
tree | 3e248eef8bcb8439c7b5cf3e36808651f74d5f28 /source/base | |
parent | 1af60db5b25143a8dd937b512c3ddfd2e275a4ab (diff) |
improvement
Diffstat (limited to 'source/base')
-rw-r--r-- | source/base/StarAssets.cpp | 8 | ||||
-rw-r--r-- | source/base/StarAssets.hpp | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index 8622b87..5bb752e 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -23,14 +23,6 @@ #include "StarUtilityLuaBindings.hpp" namespace Star { - -EnumMap<AssetType> const AssetTypeNames{ - {AssetType::Json, "json"}, - {AssetType::Image, "image"}, - {AssetType::Audio, "audio"}, - {AssetType::Font, "font"}, - {AssetType::Bytes, "bytes"} -}; static void validateBasePath(std::string_view const& basePath) { if (basePath.empty() || basePath[0] != '/') 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; |