Faster drawing routine

This commit is contained in:
Devine Lu Linvega 2024-06-05 07:50:39 -08:00
parent 094d01d149
commit ec6fbe4263
1 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@
( name ) "Note 20 "Pad 0a ( name ) "Note 20 "Pad 0a
( details ) "Original 20 "by 20 "Donn 20 "Denman 0a ( details ) "Original 20 "by 20 "Donn 20 "Denman 0a
( author ) "By 20 "Devine 20 "Lu 20 "Linvega 0a ( author ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
( date ) "3 20 "Jun, 20 "2024 00 01 ( date ) "6 20 "Jun, 20 "2024 00 01
( icon ) 83 =appicon ( icon ) 83 =appicon
( (
@ -251,12 +251,12 @@
STH2 STH2
STH2 STH2
( | x ) ( | x )
#0001 #ffff ,&x2 LDR2 STH2kr SUB2k abs2 ,&dx STR2 [ LIT2 ADD2r SUB2r ] ,&x2 LDR2 STH2kr SUB2k abs2 ,&dx STR2
SWP2 lts2 [ JMP SWP2 POP2 ] ,&sx STR2 SWP2 lts2 [ JMP SWP POP ] ,&sx STR
SWP2r SWP2r
( | y ) ( | y )
#0001 #ffff ,&y2 LDR2 STH2kr SUB2k abs2 #0000 SWP2 SUB2 ,&dy STR2 [ LIT2 ADD2r SUB2r ] ,&y2 LDR2 STH2kr SUB2k abs2 #0000 SWP2 SUB2 ,&dy STR2
SWP2 lts2 [ JMP SWP2 POP2 ] ,&sy STR2 SWP2 lts2 [ JMP SWP POP ] ,&sy STR
,&dx LDR2 ,&dy LDR2 ADD2 ,&dx LDR2 ,&dy LDR2 ADD2
&>while ( -- ) &>while ( -- )
( draw ) OVR2r STH2r STH2kr [ LIT &color $1 ] <set-pixel> ( draw ) OVR2r STH2r STH2kr [ LIT &color $1 ] <set-pixel>
@ -265,10 +265,10 @@
( e -> e2 ) DUP2k ADD2 DUP2 ( e -> e2 ) DUP2k ADD2 DUP2
( y ) [ LIT2 &dy $2 ] lts2 ?{ ( y ) [ LIT2 &dy $2 ] lts2 ?{
( e+dy ) SWP2 ,&dy LDR2 ADD2 SWP2 ( e+dy ) SWP2 ,&dy LDR2 ADD2 SWP2
( x1+sx ) SWP2r [ LIT2r &sx $2 ] ADD2r SWP2r } ( x1+sx ) SWP2r [ LIT2r 0001 ] [ &sx $1 ] SWP2r }
( x ) [ LIT2 &dx $2 ] gts2 ?{ ( x ) [ LIT2 &dx $2 ] gts2 ?{
( e+dx ) ,&dx LDR2 ADD2 ( e+dx ) ,&dx LDR2 ADD2
( y1+sy ) [ LIT2r &sy $2 ] ADD2r } ( y1+sy ) [ LIT2r 0001 ] [ &sy $1 ] }
!&>while !&>while
&end POP2 POP2r POP2r JMP2r &end POP2 POP2r POP2r JMP2r