remove unused variable and one extra call to to_u32

This commit is contained in:
Matthew Berry 2021-05-27 00:09:34 -07:00
parent 92c33f5872
commit 1372453133

View file

@ -184,7 +184,6 @@ module GBA
def render_aff_bg(bg : Int) : Nil def render_aff_bg(bg : Int) : Nil
return unless bit?(@dispcnt.value, 8 + bg) return unless bit?(@dispcnt.value, 8 + bg)
pal_buf = @layer_palettes[bg] pal_buf = @layer_palettes[bg]
row = @vcount.to_u32
bgcnt = @bgcnt[bg] bgcnt = @bgcnt[bg]
dx, _, dy, _ = @bgaff[bg - 2].map &.num dx, _, dy, _ = @bgaff[bg - 2].map &.num
@ -194,7 +193,7 @@ module GBA
size_pixels = size << 3 size_pixels = size << 3
screen_base = 0x800_u32 * bgcnt.screen_base_block screen_base = 0x800_u32 * bgcnt.screen_base_block
character_base = bgcnt.character_base_block.to_u32 * 0x4000 character_base = 0x4000_u32 * bgcnt.character_base_block
240.times do |col| 240.times do |col|
x = int_x >> 8 x = int_x >> 8
y = int_y >> 8 y = int_y >> 8