From ec6fbe42630d41d4732f0836cf5b8c1e0ae5abc5 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 5 Jun 2024 07:50:39 -0800 Subject: [PATCH] Faster drawing routine --- gui/notepad/src/notepad.tal | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 8a9efce..f2083bf 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -38,7 +38,7 @@ ( name ) "Note 20 "Pad 0a ( details ) "Original 20 "by 20 "Donn 20 "Denman 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 ( @@ -251,12 +251,12 @@ STH2 STH2 ( | x ) - #0001 #ffff ,&x2 LDR2 STH2kr SUB2k abs2 ,&dx STR2 - SWP2 lts2 [ JMP SWP2 POP2 ] ,&sx STR2 + [ LIT2 ADD2r SUB2r ] ,&x2 LDR2 STH2kr SUB2k abs2 ,&dx STR2 + SWP2 lts2 [ JMP SWP POP ] ,&sx STR SWP2r ( | y ) - #0001 #ffff ,&y2 LDR2 STH2kr SUB2k abs2 #0000 SWP2 SUB2 ,&dy STR2 - SWP2 lts2 [ JMP SWP2 POP2 ] ,&sy STR2 + [ LIT2 ADD2r SUB2r ] ,&y2 LDR2 STH2kr SUB2k abs2 #0000 SWP2 SUB2 ,&dy STR2 + SWP2 lts2 [ JMP SWP POP ] ,&sy STR ,&dx LDR2 ,&dy LDR2 ADD2 &>while ( -- ) ( draw ) OVR2r STH2r STH2kr [ LIT &color $1 ] @@ -265,10 +265,10 @@ ( e -> e2 ) DUP2k ADD2 DUP2 ( y ) [ LIT2 &dy $2 ] lts2 ?{ ( 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 ?{ ( e+dx ) ,&dx LDR2 ADD2 - ( y1+sy ) [ LIT2r &sy $2 ] ADD2r } + ( y1+sy ) [ LIT2r 0001 ] [ &sy $1 ] } !&>while &end POP2 POP2r POP2r JMP2r