[nostalgia/core] Add largestPage function for Palette

This commit is contained in:
Gary Talent 2024-01-31 23:17:46 -06:00
parent 5972d8acef
commit 2667be88f6

View File

@ -60,6 +60,15 @@ constexpr size_t colors(Palette const&pal, size_t page = 0) noexcept {
return 0;
}
[[nodiscard]]
constexpr size_t largestPage(Palette const&pal) noexcept {
size_t out{};
for (auto const&page : pal.pages) {
out = ox::max(out, page.size());
}
return out;
}
oxModelBegin(NostalgiaPalette)
oxModelField(colors)
oxModelEnd()