#1783 - GbaGuy - Thu Jan 23, 2003 2:12 am
I created this macro, but it doesn't work and I'm not sure why.
If anyone could figure out why, I'd appreciate it.
Thanks,
- GbaGuy
Code: |
@macro SetNumber Sprite, Number ldr r2,=(OAM+(Sprite*8))+4 ldr r4,[r2] ; att2&3 ldr r3,[r2] ; r3 = att2&3 mov r3,r3,lsl 16 ; r3 = att3 mov r4,r4,lsr 16 ; r4 = att2 and r4,r4,#0xFC000000 ; clear old tile number orr r4,r4,#Number ; put in new tile number mov r3,r3,lsr 16 ; put the atts in the right spot mov r4,r4,lsl 16 ; ditto orr r4,r4,r3 ; put them together str r4,[r2] ; store back in OAM @endm |
If anyone could figure out why, I'd appreciate it.
Thanks,
- GbaGuy