[nostalgia/core/gba] Fix GBA for updated model system

This commit is contained in:
Gary Talent 2022-07-04 12:33:41 -05:00
parent 8d01882ed5
commit 6653715795

View File

@ -37,8 +37,7 @@ struct GbaTileMapTarget {
volatile uint16_t *tileMap = nullptr; volatile uint16_t *tileMap = nullptr;
}; };
template<typename T> constexpr ox::Error model(auto *io, ox::CommonPtrWith<GbaPaletteTarget> auto *t) noexcept {
constexpr ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept {
io->template setTypeInfo<Palette>(); io->template setTypeInfo<Palette>();
const auto colorHandler = [t](std::size_t i, Color16 *c) { const auto colorHandler = [t](std::size_t i, Color16 *c) {
t->palette[i] = *c; t->palette[i] = *c;
@ -47,8 +46,7 @@ constexpr ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept {
return io->template field<Color16, decltype(colorHandler)>("colors", colorHandler); return io->template field<Color16, decltype(colorHandler)>("colors", colorHandler);
} }
template<typename T> constexpr ox::Error model(auto *io, ox::CommonPtrWith<GbaTileMapTarget> auto *t) noexcept {
constexpr ox::Error modelRead(T *io, GbaTileMapTarget *t) noexcept {
io->template setTypeInfo<CompactTileSheet>(); io->template setTypeInfo<CompactTileSheet>();
uint8_t bpp; uint8_t bpp;
oxReturnError(io->field("bpp", &bpp)); oxReturnError(io->field("bpp", &bpp));