add 'advanced' post-effect load configuration

This commit is contained in:
MihailRis
2025-06-13 23:28:16 +03:00
parent 9cc59c8848
commit 02a91e0b72
10 changed files with 49 additions and 21 deletions
+10 -6
View File
@@ -147,14 +147,12 @@ void AssetsLoader::processPreload(
add(tag, path, name);
return;
}
std::shared_ptr<AssetCfg> config = nullptr;
map.at("path").get(path);
switch (tag) {
case AssetType::SOUND: {
bool keepPCM = false;
add(tag,
path,
name,
std::make_shared<SoundCfg>(map.at("keep-pcm").get(keepPCM)));
config = std::make_shared<SoundCfg>(map.at("keep-pcm").get(keepPCM));
break;
}
case AssetType::ATLAS: {
@@ -164,13 +162,19 @@ void AssetsLoader::processPreload(
if (typeName == "separate") {
type = AtlasType::SEPARATE;
}
add(tag, path, name, std::make_shared<AtlasCfg>(type));
config = std::make_shared<AtlasCfg>(type);
break;
}
case AssetType::POST_EFFECT: {
bool advanced = false;
map.at("advanced").get(advanced);
config = std::make_shared<PostEffectCfg>(advanced);
break;
}
default:
add(tag, path, name);
break;
}
add(tag, path, name, std::move(config));
}
void AssetsLoader::processPreloadList(AssetType tag, const dv::value& list) {