diff --git a/src/olympic/keel/include/keel/media.hpp b/src/olympic/keel/include/keel/media.hpp index 728ee973..11a672f9 100644 --- a/src/olympic/keel/include/keel/media.hpp +++ b/src/olympic/keel/include/keel/media.hpp @@ -63,10 +63,8 @@ namespace detail { template constexpr auto makeLoader(Context &ctx) { return [&ctx](ox::StringView assetId) -> ox::Result { - ox::StringView path; oxRequire(p, ctx.uuidToPath.at(assetId)); - path = *p; - oxRequire(buff, ctx.rom->read(path)); + oxRequire(buff, ctx.rom->read(*p)); auto [obj, err] = readAsset(buff); if (err) { if (err != ox::Error_ClawTypeVersionMismatch && err != ox::Error_ClawTypeMismatch) { @@ -84,21 +82,17 @@ ox::Result> readObjFile( keel::Context &ctx, ox::StringView assetId, bool forceLoad) noexcept { - ox::UUIDStr uuidStr; if (beginsWith(assetId, "uuid://")) { assetId = substr(assetId, 7); - oxRequire(p, keel::uuidToPath(ctx, assetId)); } else { auto const [uuid, uuidErr] = getUuid(ctx, assetId); if (!uuidErr) { - uuidStr = uuid.toString(); - assetId = uuidStr; + assetId = uuid.toString(); } } if (forceLoad) { ctx.assetManager.initTypeManager(detail::makeLoader, ctx); - oxRequire(cached, ctx.assetManager.loadAsset(assetId)); - return cached; + return ctx.assetManager.loadAsset(assetId); } else { auto [cached, err] = ctx.assetManager.getAsset(assetId); if (err) {