diff options
Diffstat (limited to 'source/base/StarAssets.hpp')
-rw-r--r-- | source/base/StarAssets.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/base/StarAssets.hpp b/source/base/StarAssets.hpp index 37e9a6c..f945cf8 100644 --- a/source/base/StarAssets.hpp +++ b/source/base/StarAssets.hpp @@ -187,7 +187,7 @@ public: // Scans all assets for files with the given extension, which is specially // indexed and much faster than a normal scan. Extension may contain leading // '.' character or it may be omitted. - StringList scanExtension(String const& extension) const; + StringSet const& scanExtension(String const& extension) const; // Get json asset with an optional sub-path. The sub-path portion of the // path refers to a key in the top-level object, and may use dot notation @@ -201,6 +201,7 @@ public: // Load all the given jsons using background processing. void queueJsons(StringList const& paths) const; + void queueJsons(StringSet const& paths) const; // Returns *either* an image asset or a sub-frame. Frame files are JSON // descriptor files that reference a particular image and label separate @@ -212,6 +213,7 @@ public: ImageConstPtr image(AssetPath const& path) const; // Load images using background processing void queueImages(StringList const& paths) const; + void queueImages(StringSet const& paths) const; // Return the given image *if* it is already loaded, otherwise queue it for // loading. ImageConstPtr tryImage(AssetPath const& path) const; @@ -226,6 +228,7 @@ public: AudioConstPtr audio(String const& path) const; // Load audios using background processing void queueAudios(StringList const& paths) const; + void queueAudios(StringSet const& paths) const; // Return the given audio *if* it is already loaded, otherwise queue it for // loading. AudioConstPtr tryAudio(String const& path) const; @@ -249,6 +252,8 @@ private: static FramesSpecification parseFramesSpecification(Json const& frameConfig, String path); void queueAssets(List<AssetId> const& assetIds) const; + //Lock before calling! + void queueAsset(AssetId const& assetId) const; shared_ptr<AssetData> tryAsset(AssetId const& id) const; shared_ptr<AssetData> getAsset(AssetId const& id) const; @@ -317,7 +322,7 @@ private: // Maps the source asset name to the source containing it CaseInsensitiveStringMap<AssetFileDescriptor> m_files; // Maps an extension to the files with that extension - CaseInsensitiveStringMap<StringList> m_filesByExtension; + CaseInsensitiveStringMap<StringSet> m_filesByExtension; ByteArray m_digest; |