[nostalgia/core/userland] Fix magic numbers
This commit is contained in:
parent
4f906f6e47
commit
014daa6b57
@ -24,7 +24,7 @@ struct TileSheetData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ox::Result<TileSheetData> loadTileSheet(Context *ctx, const CompactTileSheet &tilesheet) noexcept {
|
ox::Result<TileSheetData> 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;
|
const auto tiles = tilesheet.pixels.size() / bytesPerTile;
|
||||||
constexpr int width = 8;
|
constexpr int width = 8;
|
||||||
const int height = 8 * static_cast<int>(tiles);
|
const int height = 8 * static_cast<int>(tiles);
|
||||||
|
Loading…
Reference in New Issue
Block a user