MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / tryImage

Method tryImage

source/base/StarAssets.cpp:534–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534ImageConstPtr Assets::tryImage(AssetPath const& path) const {
535 validatePath(path, true, true);
536
537 if (auto imageData = as<ImageData>(tryAsset(AssetId{AssetType::Image, path})))
538 return imageData->image;
539 else
540 return {};
541}
542
543FramesSpecificationConstPtr Assets::imageFrames(String const& path) const {
544 auto components = AssetPath::split(path);

Callers 2

loadTextureMethod · 0.80
drawDrawableMethod · 0.80

Calls 1

validatePathFunction · 0.85

Tested by

no test coverage detected