[nostalgia/core] Cleanup

This commit is contained in:
Gary Talent 2023-06-03 23:45:20 -05:00
parent 2887fa7819
commit 1bff41d9f1
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@ class Context {
Context(const Context &other) noexcept = delete;
Context(const Context &&other) noexcept = delete;
[[nodiscard]]
const auto &rom() const noexcept {
return *turbineCtx->rom;
}

View File

@ -104,8 +104,8 @@ ox::Error initConsole(Context *ctx) noexcept {
if (!ctx) {
ctx = new(ox_alloca(sizeof(Context))) Context;
oxRequire(rom, keel::loadRom());
ox::FileStore32 fs(rom, 32 * ox::units::MB);
auto romFs = new(ox_alloca(sizeof(ox::FileSystem32))) ox::FileSystem32(fs);
auto romFs = new(ox_alloca(sizeof(ox::FileSystem32)))
ox::FileSystem32(ox::FileStore32(rom, 32 * ox::units::MB));
oxRequireM(tctx, turbine::init(ox::UPtr<ox::FileSystem>(romFs), ""));
ctx->turbineCtx = tctx.release();
oxReturnError(loadBgTileSheet(ctx, 0, TilesheetAddr, PaletteAddr));