[nostalgia/gfx] Add isTileSheet function for checking paths against both file extensions
This commit is contained in:
@ -12,8 +12,13 @@ constexpr auto TileWidth = 8;
|
||||
constexpr auto TileHeight = 8;
|
||||
constexpr auto PixelsPerTile = TileWidth * TileHeight;
|
||||
|
||||
constexpr ox::StringLiteral FileExt_ng("ng");
|
||||
constexpr ox::StringLiteral FileExt_nts("nts");
|
||||
constexpr ox::StringLiteral FileExt_npal("npal");
|
||||
constexpr ox::StringLiteral FileExt_ng{"ng"};
|
||||
constexpr ox::StringLiteral FileExt_nts{"nts"};
|
||||
constexpr ox::StringLiteral FileExt_npal{"npal"};
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool isTileSheet(ox::StringViewCR path) noexcept {
|
||||
return endsWith(path, FileExt_nts) || endsWith(path, FileExt_ng);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user