summaryrefslogtreecommitdiff
path: root/lib/nes/sys/ppu.cc
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-02-04 19:59:47 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-02-04 19:59:47 +0100
commit9c45e9c7df1efa5bc1c8e73b6eaef4726b828d3e (patch)
tree4be985efa8e697fd6ef5838eec69c32c40c5d4a5 /lib/nes/sys/ppu.cc
parente791ac9a46095e0241181da89c35a7c702982c21 (diff)
add span type
Diffstat (limited to 'lib/nes/sys/ppu.cc')
-rw-r--r--lib/nes/sys/ppu.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nes/sys/ppu.cc b/lib/nes/sys/ppu.cc
index c9e6f11..2419030 100644
--- a/lib/nes/sys/ppu.cc
+++ b/lib/nes/sys/ppu.cc
@@ -239,7 +239,7 @@ namespace nes::sys
sprite_count_ = 0;
for (auto i = u32{ 0 }; i < sprite_max_count; ++i)
{
- auto const s = sprite{ &oam_[i * 4] };
+ auto const s = sprite{ span{ oam_ }.subspan<4>(i * 4) };
auto const row = static_cast<int>(scanline_) - static_cast<int>(s.get_y());
if (row < 0 || static_cast<u32>(row) >= height) { continue; }