From 66537157953ee012146386cbf25605feae71a1b2 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 4 Jul 2022 12:33:41 -0500 Subject: [PATCH] [nostalgia/core/gba] Fix GBA for updated model system --- src/nostalgia/core/gba/gfx.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/nostalgia/core/gba/gfx.cpp b/src/nostalgia/core/gba/gfx.cpp index 7d3ca840..ea6aa51d 100644 --- a/src/nostalgia/core/gba/gfx.cpp +++ b/src/nostalgia/core/gba/gfx.cpp @@ -37,8 +37,7 @@ struct GbaTileMapTarget { volatile uint16_t *tileMap = nullptr; }; -template -constexpr ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept { +constexpr ox::Error model(auto *io, ox::CommonPtrWith auto *t) noexcept { io->template setTypeInfo(); const auto colorHandler = [t](std::size_t i, Color16 *c) { t->palette[i] = *c; @@ -47,8 +46,7 @@ constexpr ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept { return io->template field("colors", colorHandler); } -template -constexpr ox::Error modelRead(T *io, GbaTileMapTarget *t) noexcept { +constexpr ox::Error model(auto *io, ox::CommonPtrWith auto *t) noexcept { io->template setTypeInfo(); uint8_t bpp; oxReturnError(io->field("bpp", &bpp));