From 8dd837b359c5ca102854c55d874a1f4cdf06cbdc Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 7 Sep 2024 23:20:04 -0500 Subject: [PATCH] [nostalgia/core] Add a valid function for CompactTileSheet --- .../modules/core/include/nostalgia/core/tilesheet.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nostalgia/modules/core/include/nostalgia/core/tilesheet.hpp b/src/nostalgia/modules/core/include/nostalgia/core/tilesheet.hpp index a1012dc5..fc31a47a 100644 --- a/src/nostalgia/modules/core/include/nostalgia/core/tilesheet.hpp +++ b/src/nostalgia/modules/core/include/nostalgia/core/tilesheet.hpp @@ -302,6 +302,11 @@ struct CompactTileSheetV1 { ox::Vector pixels; }; +[[nodiscard]] +constexpr bool valid(CompactTileSheetV1 const&ts) noexcept { + return ts.bpp == 4 || ts.bpp == 8; +} + using CompactTileSheet = CompactTileSheetV1; oxModelBegin(TileSheetV1)