diff --git a/src/olympic/keel/include/keel/media.hpp b/src/olympic/keel/include/keel/media.hpp index 800c3461..728ee973 100644 --- a/src/olympic/keel/include/keel/media.hpp +++ b/src/olympic/keel/include/keel/media.hpp @@ -29,8 +29,8 @@ oxModelBegin(PreloadPtr) oxModelField(preloadAddr) oxModelEnd() -ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept; -ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR file) noexcept; +ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept; +ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept; void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept; diff --git a/src/olympic/keel/src/media.cpp b/src/olympic/keel/src/media.cpp index 7f2b7cbc..857e9a5e 100644 --- a/src/olympic/keel/src/media.cpp +++ b/src/olympic/keel/src/media.cpp @@ -208,15 +208,15 @@ void unloadRom(char*) noexcept { ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept { oxRequire(stat, ctx.rom->stat(path)); - oxRequire(buff, static_cast(ctx.rom.get())->directAccess(path)); + oxRequire(buff, static_cast(*ctx.rom).directAccess(path)); PreloadPtr p; oxReturnError(ox::readMC({buff, static_cast(stat.size)}, p)); return static_cast(p.preloadAddr) + ctx.preloadSectionOffset; } -ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept { - oxRequire(stat, ctx.rom->stat(file)); - oxRequire(buff, static_cast(ctx.rom.get())->directAccess(file)); +ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept { + oxRequire(stat, ctx.rom->stat(addr)); + oxRequire(buff, static_cast(*ctx.rom).directAccess(addr)); PreloadPtr p; oxReturnError(ox::readMC({buff, static_cast(stat.size)}, p)); return static_cast(p.preloadAddr) + ctx.preloadSectionOffset;