[nostalgia/gfx] Style update
All checks were successful
Build / build (push) Successful in 1m15s

This commit is contained in:
2025-07-24 21:33:12 -05:00
parent 7372036a0a
commit c7bc2a954f
3 changed files with 49 additions and 49 deletions

View File

@ -11,7 +11,7 @@
namespace nostalgia::gfx { namespace nostalgia::gfx {
[[nodiscard]] [[nodiscard]]
constexpr std::size_t ptToIdx(int x, int y, int c, int scale = 1) noexcept { constexpr std::size_t ptToIdx(int const x, int const y, int const c, int const scale = 1) noexcept {
auto const tileWidth = TileWidth * scale; auto const tileWidth = TileWidth * scale;
auto const tileHeight = TileHeight * scale; auto const tileHeight = TileHeight * scale;
auto const pixelsPerTile = tileWidth * tileHeight; auto const pixelsPerTile = tileWidth * tileHeight;
@ -25,12 +25,12 @@ constexpr std::size_t ptToIdx(int x, int y, int c, int scale = 1) noexcept {
} }
[[nodiscard]] [[nodiscard]]
constexpr std::size_t ptToIdx(const ox::Point &pt, int c, int scale = 1) noexcept { constexpr std::size_t ptToIdx(ox::Point const &pt, int const c, int const scale = 1) noexcept {
return ptToIdx(pt.x, pt.y, c * TileWidth, scale); return ptToIdx(pt.x, pt.y, c * TileWidth, scale);
} }
[[nodiscard]] [[nodiscard]]
constexpr ox::Point idxToPt(int i, int c, int scale = 1) noexcept { constexpr ox::Point idxToPt(int const i, int c, int const scale = 1) noexcept {
auto const tileWidth = TileWidth * scale; auto const tileWidth = TileWidth * scale;
auto const tileHeight = TileHeight * scale; auto const tileHeight = TileHeight * scale;
auto const pixelsPerTile = tileWidth * tileHeight; auto const pixelsPerTile = tileWidth * tileHeight;