From 014daa6b57334c4c7c9de5ebdc7c9f6a9cdf09fa Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 8 Feb 2023 21:37:25 -0600 Subject: [PATCH] [nostalgia/core/userland] Fix magic numbers --- src/nostalgia/core/userland/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nostalgia/core/userland/gfx.cpp b/src/nostalgia/core/userland/gfx.cpp index e33d5a19..759f4c7c 100644 --- a/src/nostalgia/core/userland/gfx.cpp +++ b/src/nostalgia/core/userland/gfx.cpp @@ -24,7 +24,7 @@ struct TileSheetData { }; ox::Result loadTileSheet(Context *ctx, const CompactTileSheet &tilesheet) noexcept { - const unsigned bytesPerTile = tilesheet.bpp == 8 ? 64 : 32; + const unsigned bytesPerTile = tilesheet.bpp == 8 ? PixelsPerTile : PixelsPerTile / 2; const auto tiles = tilesheet.pixels.size() / bytesPerTile; constexpr int width = 8; const int height = 8 * static_cast(tiles);