[keel] Cleanup
This commit is contained in:
parent
135f0e4ce8
commit
2062748676
@ -29,8 +29,8 @@ oxModelBegin(PreloadPtr)
|
|||||||
oxModelField(preloadAddr)
|
oxModelField(preloadAddr)
|
||||||
oxModelEnd()
|
oxModelEnd()
|
||||||
|
|
||||||
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept;
|
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept;
|
||||||
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::StringViewCR file) noexcept;
|
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept;
|
||||||
|
|
||||||
|
|
||||||
void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept;
|
void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept;
|
||||||
|
@ -208,15 +208,15 @@ void unloadRom(char*) noexcept {
|
|||||||
|
|
||||||
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept {
|
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept {
|
||||||
oxRequire(stat, ctx.rom->stat(path));
|
oxRequire(stat, ctx.rom->stat(path));
|
||||||
oxRequire(buff, static_cast<ox::MemFS*>(ctx.rom.get())->directAccess(path));
|
oxRequire(buff, static_cast<ox::MemFS&>(*ctx.rom).directAccess(path));
|
||||||
PreloadPtr p;
|
PreloadPtr p;
|
||||||
oxReturnError(ox::readMC({buff, static_cast<std::size_t>(stat.size)}, p));
|
oxReturnError(ox::readMC({buff, static_cast<std::size_t>(stat.size)}, p));
|
||||||
return static_cast<std::size_t>(p.preloadAddr) + ctx.preloadSectionOffset;
|
return static_cast<std::size_t>(p.preloadAddr) + ctx.preloadSectionOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept {
|
ox::Result<std::size_t> getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept {
|
||||||
oxRequire(stat, ctx.rom->stat(file));
|
oxRequire(stat, ctx.rom->stat(addr));
|
||||||
oxRequire(buff, static_cast<ox::MemFS*>(ctx.rom.get())->directAccess(file));
|
oxRequire(buff, static_cast<ox::MemFS&>(*ctx.rom).directAccess(addr));
|
||||||
PreloadPtr p;
|
PreloadPtr p;
|
||||||
oxReturnError(ox::readMC({buff, static_cast<std::size_t>(stat.size)}, p));
|
oxReturnError(ox::readMC({buff, static_cast<std::size_t>(stat.size)}, p));
|
||||||
return static_cast<std::size_t>(p.preloadAddr) + ctx.preloadSectionOffset;
|
return static_cast<std::size_t>(p.preloadAddr) + ctx.preloadSectionOffset;
|
||||||
|
Loading…
Reference in New Issue
Block a user