[nostalgia] Style updates

This commit is contained in:
2023-12-03 21:14:20 -06:00
parent 34081a0414
commit 6b7c002a10
20 changed files with 126 additions and 138 deletions

View File

@@ -8,13 +8,13 @@
namespace nostalgia::core {
GbaContext::GbaContext(turbine::Context *tctx) noexcept: turbineCtx(tctx) {
GbaContext::GbaContext(turbine::Context &tctx) noexcept: turbineCtx(tctx) {
}
ox::Error initGfx(Context &ctx, InitParams const&) noexcept;
ox::Result<ox::UniquePtr<Context>> init(turbine::Context &tctx, InitParams const&params) noexcept {
auto ctx = ox::make_unique<GbaContext>(&tctx);
auto ctx = ox::make_unique<GbaContext>(tctx);
oxReturnError(initGfx(*ctx, params));
return ox::UPtr<Context>(std::move(ctx));
}

View File

@@ -10,13 +10,13 @@ namespace nostalgia::core {
struct GbaContext: public core::Context {
turbine::Context const*turbineCtx = nullptr;
turbine::Context &turbineCtx;
explicit GbaContext(turbine::Context *tctx) noexcept;
explicit GbaContext(turbine::Context &tctx) noexcept;
[[nodiscard]]
auto const&rom() const noexcept {
return *turbine::rom(*turbineCtx);
return *turbine::rom(turbineCtx);
}
};

View File

@@ -109,7 +109,7 @@ void setBgCbb(Context&, unsigned bgIdx, unsigned cbb) noexcept {
}
static ox::Error loadBgTileSheet(
const ox::MemFS &rom,
ox::MemFS const&rom,
unsigned cbb,
ox::FileAddress const&tilesheetAddr,
ox::FileAddress const&paletteAddr) noexcept {