@sprite4 should work
This commit is contained in:
+28
-21
@@ -6,7 +6,11 @@
|
|||||||
BRK
|
BRK
|
||||||
|
|
||||||
@on-frame
|
@on-frame
|
||||||
LIT 'O ;drawc JSR2
|
LIT 'K ;putc JSR2
|
||||||
|
LIT 'O ;putc JSR2
|
||||||
|
LIT 'o ;putc JSR2
|
||||||
|
LIT 'L ;putc JSR2
|
||||||
|
SWP #10 SUB SWP
|
||||||
;&adv KP-A JMPKEY
|
;&adv KP-A JMPKEY
|
||||||
;&back KP-B JMPKEY
|
;&back KP-B JMPKEY
|
||||||
BRK
|
BRK
|
||||||
@@ -45,33 +49,36 @@ BRK
|
|||||||
SWP #04 SUB SWP ( restore x coord )
|
SWP #04 SUB SWP ( restore x coord )
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
( 4x4 sprite output from the memory )
|
( 4x4 sprite output from the short )
|
||||||
( x y addr* -- x y )
|
( x y sprval* -- x y )
|
||||||
@sprite4
|
@sprite4
|
||||||
( get sprite contents )
|
|
||||||
LDA2 ( x y sprval* -- )
|
|
||||||
SWP2 OVR2 ( sprval* x y sprval* -- )
|
SWP2 OVR2 ( sprval* x y sprval* -- )
|
||||||
#04 ( sprval* x y sprval* counter -- )
|
( line 1 )
|
||||||
&lp
|
#0c SFT2 NIP ( sprval* x y nibble -- )
|
||||||
DEC ( first effective counter value is 3 )
|
;line4 JSR2 ( sprval* x y -- )
|
||||||
DUP SWP2 ROT ( sprval* x y counter sprval* counter -- )
|
( line 2 )
|
||||||
GETNIBBLE ( sprval* x y counter nibble -- )
|
INC ( increment y coord )
|
||||||
SWP ( sprval* x y nibble counter -- )
|
OVR2 ( sprval* x y sprval* -- )
|
||||||
DBGBYTE
|
#08 SFT2 NIP #0f AND ( sprval* x y nibble -- )
|
||||||
STH ( sprval* x y nibble -- ) ( stash counter into return stack )
|
;line4 JSR2 ( sprval* x y -- )
|
||||||
;line4 JSR2 ( sprval* x y -- )
|
( line 3 )
|
||||||
INC ( increment y coord )
|
INC ( increment y coord )
|
||||||
STHr ( sprval* x y counter -- ) ( restore counter from return stack )
|
OVR2 ( sprval* x y sprval* -- )
|
||||||
DBGBYTE
|
#04 SFT2 NIP #0f AND ( sprval* x y nibble -- )
|
||||||
DUP ,&lp JCN
|
;line4 JSR2 ( sprval* x y -- )
|
||||||
POP SWP2 POP2 ( sprval* x y counter -- x y )
|
( line 4 )
|
||||||
#04 SUB ( restore y coord )
|
INC ( increment y coord )
|
||||||
|
OVR2 ( sprval* x y sprval* -- )
|
||||||
|
NIP #0f AND ( sprval* x y nibble -- )
|
||||||
|
;line4 JSR2 ( sprval* x y -- )
|
||||||
|
#03 SUB ( restore y coord )
|
||||||
|
SWP2 POP2 ( x y -- )
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
( nanofont character sprite output )
|
( nanofont character sprite output )
|
||||||
( x y char -- x y )
|
( x y char -- x y )
|
||||||
@drawc
|
@drawc
|
||||||
CHAR-TO-NF DBGSHORT ;sprite4 JSR2
|
CHAR-TO-NF LDA2 ;sprite4 JSR2
|
||||||
JMP2r
|
JMP2r
|
||||||
( same as drawc but auto increment x coord )
|
( same as drawc but auto increment x coord )
|
||||||
@putc
|
@putc
|
||||||
|
|||||||
Reference in New Issue
Block a user