uxn/examples/sprite.usm

43 lines
814 B
Plaintext

( comment )
:dev/w fff9 ( const write port )
|0100 @RESET
#01 =dev/w ( set dev/write to screen )
#02 =dev/w ( set dev/write to sprite )
#00 ,star_icn #0041 #0041 ,putsprite JSR
#00 ,star_icn #0031 #0021 ,putsprite JSR
#00 ,cursor_icn #0021 #0016 ,putsprite JSR
#00 ,star_icn #0055 #0042 ,putsprite JSR
#01 ,cursor_icn #0067 #0031 ,putsprite JSR
BRK
@putsprite
IOW2 ( y short )
IOW2 ( x short )
IOW2 ( sprite address )
IOW ( redraw byte )
RTS
@putpixel
IOW2 ( y short )
IOW2 ( x short )
IOW ( color byte )
IOW ( redraw byte )
RTS
|0200 @SPRITESHEET
@cursor_icn [ 80c0 e0f0 f8e0 1000 0000 0000 0000 0000 ]
@star_icn [ 1054 28c6 2854 1000 0000 0000 0000 0000 ]
BRK
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR