[keel,nostalgia,studio,turbine] Make turbine::Context have a keel::Context instead of being one
This commit is contained in:
@@ -16,7 +16,7 @@ struct GbaContext: public core::Context {
|
||||
|
||||
[[nodiscard]]
|
||||
const auto &rom() const noexcept {
|
||||
return *turbineCtx->rom;
|
||||
return *turbine::rom(*turbineCtx);
|
||||
}
|
||||
|
||||
};
|
||||
|
@@ -133,18 +133,20 @@ static ox::Error loadBgTileSheet(
|
||||
return {};
|
||||
}
|
||||
|
||||
ox::Error loadBgTileSheet(Context *ctx,
|
||||
unsigned cbb,
|
||||
const ox::FileAddress &tilesheetAddr,
|
||||
const ox::FileAddress &paletteAddr) noexcept {
|
||||
ox::Error loadBgTileSheet(
|
||||
Context *ctx,
|
||||
unsigned cbb,
|
||||
const ox::FileAddress &tilesheetAddr,
|
||||
const ox::FileAddress &paletteAddr) noexcept {
|
||||
auto &gctx = static_cast<GbaContext&>(*ctx);
|
||||
auto &rom = static_cast<const ox::MemFS&>(gctx.rom());
|
||||
return loadBgTileSheet(rom, cbb, tilesheetAddr, paletteAddr);
|
||||
}
|
||||
|
||||
ox::Error loadSpriteTileSheet(Context *ctx,
|
||||
const ox::FileAddress &tilesheetAddr,
|
||||
const ox::FileAddress &paletteAddr) noexcept {
|
||||
ox::Error loadSpriteTileSheet(
|
||||
Context *ctx,
|
||||
const ox::FileAddress &tilesheetAddr,
|
||||
const ox::FileAddress &paletteAddr) noexcept {
|
||||
auto &gctx = static_cast<GbaContext&>(*ctx);
|
||||
oxRequire(tsStat, gctx.rom().stat(tilesheetAddr));
|
||||
oxRequire(ts, static_cast<const ox::MemFS&>(gctx.rom()).directAccess(tilesheetAddr));
|
||||
|
Reference in New Issue
Block a user