diff --git a/src/nostalgia/core/gfx.hpp b/src/nostalgia/core/gfx.hpp index fdca87d2..e1768d3b 100644 --- a/src/nostalgia/core/gfx.hpp +++ b/src/nostalgia/core/gfx.hpp @@ -28,11 +28,13 @@ using Color16 = uint16_t; using Color32 = uint32_t; struct NostalgiaPalette { + static constexpr auto TypeName = "nostalgia::core::NostalgiaPalette"; static constexpr auto Fields = 1; ox::Vector colors; }; struct NostalgiaGraphic { + static constexpr auto TypeName = "nostalgia::core::NostalgiaGraphic"; static constexpr auto Fields = 6; int8_t bpp = 0; // rows and columns are really only used by TileSheetEditor @@ -45,14 +47,14 @@ struct NostalgiaGraphic { template ox::Error model(T *io, NostalgiaPalette *pal) { - io->setTypeInfo("nostalgia::core::NostalgiaPalette", NostalgiaPalette::Fields); + io->template setTypeInfo(); oxReturnError(io->field("colors", &pal->colors)); return OxError(0); } template ox::Error model(T *io, NostalgiaGraphic *ng) { - io->setTypeInfo("nostalgia::core::NostalgiaGraphic", NostalgiaGraphic::Fields); + io->template setTypeInfo(); oxReturnError(io->field("bpp", &ng->bpp)); oxReturnError(io->field("rows", &ng->rows)); oxReturnError(io->field("columns", &ng->columns));