From 5972d8acef2469cd66c7923518304b4aa147574d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 31 Jan 2024 23:17:28 -0600 Subject: [PATCH] [nostalgia/core] Fix TileSetEntry model --- src/nostalgia/modules/core/include/nostalgia/core/gfx.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nostalgia/modules/core/include/nostalgia/core/gfx.hpp b/src/nostalgia/modules/core/include/nostalgia/core/gfx.hpp index 90340117..ca017384 100644 --- a/src/nostalgia/modules/core/include/nostalgia/core/gfx.hpp +++ b/src/nostalgia/modules/core/include/nostalgia/core/gfx.hpp @@ -73,7 +73,7 @@ struct TileSheetSetEntrySection { oxModelBegin(TileSheetSetEntrySection) oxModelField(begin) - oxModelField(size) + oxModelField(tiles) oxModelEnd() struct TileSheetSetEntry { @@ -92,7 +92,7 @@ struct TileSheetSet { static constexpr auto TypeName = "net.drinkingtea.nostalgia.core.TileSheetSet"; static constexpr auto TypeVersion = 1; static constexpr auto Preloadable = true; - int bpp = 0; + int32_t bpp = 0; ox::Vector entries; }; @@ -101,6 +101,8 @@ oxModelBegin(TileSheetSet) oxModelField(entries) oxModelEnd() +void addEntry(TileSheetSet &set, ox::FileAddress path, int32_t begin = 0, int32_t size = -1) noexcept; + ox::Error loadBgPalette( Context &ctx, size_t palBank,