From 5486e6d0313822f673de7230a36b2a9e2ada7ddf Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 26 Apr 2023 21:03:54 -0700 Subject: [PATCH] Optimized drawing --- gui/notepad/notepad.tal | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index 27c20b4..ce53b1d 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -419,35 +419,21 @@ JMP2r #15 .Screen/auto DEO #0008 .Screen/x DEO2 #0018 .Screen/y DEO2 - ;mem #00 .page LDZ #2000 MUL2 ADD2 &while - ( wrap ) - LDAk #20 GTH ?&no-wrap - DUP2 word-length .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap - draw-linebreak - INC2 LDAk ?&while - &no-wrap - - LDAk #20 SUB #00 SWP - DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 - ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2 - - OVR2 is-selected STH #0701 STHr JMP SWP POP .Screen/sprite DEOk DEO - - ( display cursor ) + ( draw char ) + LDAk #20 SUB #00 SWP #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 + DUP2 is-selected STH #0701 STHr JMP SWP POP .Screen/sprite DEOk DEO + .Screen/x DEI2k #0010 SUB2 ROT DEO2 + ( draw selector ) .selection/from LDZ2 .selection/to LDZ2 NEQ2 ?&block - OVR2 .selection/from LDZ2 NEQ2 ?&block + DUP2 .selection/from LDZ2 NEQ2 ?&block ;on-frame/last LDA #01 AND ?&block ;blink-icn .Screen/addr DEO2 - .Screen/x DEI2k #0010 SUB2 ROT DEO2 #05 .Screen/sprite DEO + .Screen/x DEI2k #0008 SUB2 ROT DEO2 &block - .Screen/x DEO2 - - ( tab ) LDAk #09 NEQ ?&no-tab draw-tab &no-tab - ( linebreak ) LDAk #0a NEQ ?&no-lb draw-linebreak &no-lb - + walk-char POP INC2 LDAk ?&while POP2