diff --git a/deps/nostalgia/src/nostalgia/modules/gfx/include/nostalgia/gfx/consts.hpp b/deps/nostalgia/src/nostalgia/modules/gfx/include/nostalgia/gfx/consts.hpp index 887c7cc..1b4bfe0 100644 --- a/deps/nostalgia/src/nostalgia/modules/gfx/include/nostalgia/gfx/consts.hpp +++ b/deps/nostalgia/src/nostalgia/modules/gfx/include/nostalgia/gfx/consts.hpp @@ -21,9 +21,28 @@ constexpr ox::Array FileExts_TileSheet{ FileExt_ng, }; +constexpr ox::Array FileExts_Palette{ + FileExt_npal, +}; + [[nodiscard]] constexpr bool isTileSheet(ox::StringViewCR path) noexcept { - return endsWith(path, FileExt_nts) || endsWith(path, FileExt_ng); + return ox::any_of( + FileExts_TileSheet.begin(), + FileExts_TileSheet.end(), + [path](ox::StringLiteral const &ext) { + return endsWith(path, ext); + }); +} + +[[nodiscard]] +constexpr bool isPalette(ox::StringViewCR path) noexcept { + return ox::any_of( + FileExts_Palette.begin(), + FileExts_Palette.end(), + [path](ox::StringLiteral const &ext) { + return endsWith(path, ext); + }); } }