mirror of
https://github.com/mattrberry/crab.git
synced 2025-02-12 20:48:06 +01:00
use Slice#unsafe_slice_of for reading sprites from oam
This commit is contained in:
parent
b06c4f87ed
commit
ed1a8214c6
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,7 @@ module GBA
|
||||||
def render_sprites : Nil
|
def render_sprites : Nil
|
||||||
return unless @dispcnt.screen_display_obj
|
return unless @dispcnt.screen_display_obj
|
||||||
base = 0x10000_u32
|
base = 0x10000_u32
|
||||||
sprites = Slice(Sprite).new(@oam.to_unsafe.as(Sprite*), 128)
|
sprites = @oam.unsafe_slice_of(Sprite)
|
||||||
sprites.each do |sprite|
|
sprites.each do |sprite|
|
||||||
next if sprite.obj_shape == 3 # prohibited
|
next if sprite.obj_shape == 3 # prohibited
|
||||||
next if sprite.affine_mode == 0b10 # sprite disabled
|
next if sprite.affine_mode == 0b10 # sprite disabled
|
||||||
|
|
Loading…
Add table
Reference in a new issue