flash · 20300
ldr r0,=OBJ_ATTRIBUTE0(0) ldr r2, =(ATTR0_COLOR_16 | ATTR0_SQUARE) ldr r3,=576-32 sub r1,r3 cmp r1,#32 addmi r1,#256 sub r1,#32 and r1,#0xff @ Y is only 0-255 orr r2,r1 strh r2,[r0] @ Draw X adrl r0,[spriteX] @ get X coord mem space ldr r1,[r0] @ add ,rX for offsets cmp r1,#64 @ if less than 64, this is off left of screen addmi r1,#512 @ convert coord for offscreen (64 each side) sub r1,#64 @ Take 64 off our X ldr r3,=0x1ff @ Make sure 0-512 only as higher would affect attributes ldr r0,=OBJ_ATTRIBUTE1(0) ldr r2, =(ATTR1_SIZE_32) and r1,r3 orr r2,r1 strh r2,[r0]
What would be really nice is to be able to use hardware to rotate a sprite to a buffer and grab rotated data and dump that to an active sprite.
Would be nice to find a way to adress all 128 with rotation rather than the limited 32. Real shame.. Though I am sure there is a way round the limitation somewhere in the hardware.