From c67980d5f80ac087910818a97855b1509aad296c Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Sun, 18 Sep 2016 23:23:58 +1000 Subject: [PATCH] fix incorrect refernce to SCREEN_WIDTH constant in ppu --- lib/waterfoul/gpu.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/waterfoul/gpu.rb b/lib/waterfoul/gpu.rb index 6726ace..764f7d2 100644 --- a/lib/waterfoul/gpu.rb +++ b/lib/waterfoul/gpu.rb @@ -173,7 +173,7 @@ module Waterfoul 0.upto(7) do |pixelx| buffer_addr = line_pixel_offset + pixelx + window_pos_x - next if buffer_addr < 0 || buffer_addr >= SCREEN_WIDTH + next if buffer_addr < 0 || buffer_addr >= Sreen::SCREEN_WIDTH shift = 0x1 << (7 - pixelx) @@ -210,7 +210,7 @@ module Waterfoul next if sprite_y > line || (sprite_y + sprite_size) <= line sprite_x = $mmu.read_byte(0xFE00 + sprite_offset + 1) - 8 - next if sprite_x < -7 || sprite_x >= SCREEN_WIDTH + next if sprite_x < -7 || sprite_x >= Screen::SCREEN_WIDTH sprite_tile_offset = ($mmu.read_byte(0xFE00 + sprite_offset + 2) & (sprite_size == 16 ? 0xFE : 0xFF)) * 16 sprite_flags = $mmu.read_byte(0xFE00 + sprite_offset + 3)