Different routing of unknown glyphs

This commit is contained in:
Devine Lu Linvega 2023-01-25 10:38:12 -08:00
parent 2267e34de8
commit 3c764ffca8
2 changed files with 16 additions and 23 deletions

View File

@ -9,7 +9,7 @@ SRC="src/left.tal"
DST="bin/left.rom" DST="bin/left.rom"
CPY="$HOME/roms" CPY="$HOME/roms"
ARG="src/left.tal" ARG="untitled.txt"
APPID="hundredrabbits/left:uxn" APPID="hundredrabbits/left:uxn"

View File

@ -322,7 +322,6 @@ BRK
&ver-end &ver-end
POP2r POP2r
( goto x ) ( goto x )
#00 .textarea/fixed STZ
( b ) .Mouse/x DEI2 .scroll/x LDZ2 ADD2 #0090 SUB2 STH2 ( b ) .Mouse/x DEI2 .scroll/x LDZ2 ADD2 #0090 SUB2 STH2
( a ) LIT2r 0000 ( a ) LIT2r 0000
&hor &hor
@ -819,7 +818,6 @@ JMP2r
.selection/from LDZ2 get-current-marker .selection/from LDZ2 get-current-marker
get-marker ;walk-color/scope STA2 get-marker ;walk-color/scope STA2
#00 ;walk-color/c STA #00 ;walk-color/c STA
#00 .textarea/fixed STZ
( paint ) ( paint )
#0010 .scroll/x LDZ2 SUB2 #0080 ADD2 .Screen/x DEO2 #0010 .scroll/x LDZ2 SUB2 #0080 ADD2 .Screen/x DEO2
#0020 .Screen/y DEO2 #0020 .Screen/y DEO2
@ -831,7 +829,6 @@ JMP2r
GTH2k ?&l GTH2k ?&l
&end &end
POP2 POP2 POP2 POP2
#00 .textarea/fixed STZ
!draw-scrollbar !draw-scrollbar
( .. ) ( .. )
@ -868,8 +865,6 @@ JMP2r
@walk-color ( addr* -- addr* color ) @walk-color ( addr* -- addr* color )
.textarea/highlight LDZ ?&skip .textarea/highlight LDZ ?&skip
LDAk LIT "[ NEQ ?&no-fixed-start #01 .textarea/fixed STZ &no-fixed-start
LDAk LIT "] NEQ ?&no-fixed-end #00 .textarea/fixed STZ &no-fixed-end
LDAk LIT ") EQU ?&comment-end LDAk LIT ") EQU ?&comment-end
[ LIT &c $1 ] ?&comment [ LIT &c $1 ] ?&comment
LDAk LIT "( EQU ?&comment LDAk LIT "( EQU ?&comment
@ -892,8 +887,7 @@ JMP2r
@draw-ufx ( char color -- ) @draw-ufx ( char color -- )
;&color STA ;&color STA
DUP #0a EQU ?draw-space
DUP #20 SUB #5e GTH ?draw-special
( width ) DUP get-chrw NIP ( width ) DUP get-chrw NIP
( addr* ) SWP get-chr ( addr* ) SWP get-chr
@ -918,20 +912,14 @@ JMP2r
JMP2r JMP2r
@draw-special ( char -- ) @draw-space ( c -- )
[ #09 ] NEQk NIP ?&no-tab POP
POP #0e ;tab-icn !draw-ufx/seg #00 ;linebreak-icn draw-ufx/seg
&no-tab .Screen/y DEI2k #0010 ADD2 ROT DEO2
[ #0a ] NEQk NIP ?&no-linebreak #0010 .scroll/x LDZ2 SUB2 #0080 ADD2 .Screen/x DEO2
POP #07 ;linebreak-icn draw-ufx/seg
.Screen/y DEI2k #0010 ADD2 ROT DEO2
#0010 .scroll/x LDZ2 SUB2 #0080 ADD2 .Screen/x DEO2
JMP2r
&no-linebreak
POP #08 ;checkered-icn !draw-ufx/seg
( .. ) JMP2r
@draw-scrollbar ( -- ) @draw-scrollbar ( -- )
@ -1018,19 +1006,24 @@ JMP2r
@get-chr ( c -- addr* ) @get-chr ( c -- addr* )
.textarea/fixed LDZ ?&fixed DUP #09 EQU ?&tab
#00 SWP #20 SUB #50 SFT2 ;font/glyphs ADD2 #20 SUB
DUP #5f GTH ?&unknown
#00 SWP #50 SFT2 ;font/glyphs ADD2
JMP2r JMP2r
&fixed #00 SWP #20 SUB #40 SFT2 ;font-mono/glyphs ADD2 JMP2r &fixed #00 SWP #20 SUB #40 SFT2 ;font-mono/glyphs ADD2 JMP2r
&tab POP ;tab-icn JMP2r
&unknown POP ;checkered-icn JMP2r
@get-chrw ( c -- width* ) @get-chrw ( c -- width* )
.textarea/fixed LDZ ?&fixed DUP #7f GTH ?&unknown
#0000 ROT ;font ADD2 LDA #0000 ROT ;font ADD2 LDA
JMP2r JMP2r
&fixed #0000 ROT ;font-mono ADD2 LDA JMP2r &fixed #0000 ROT ;font-mono ADD2 LDA JMP2r
&unknown POP #0008 JMP2r
@get-strw ( str* -- width* ) @get-strw ( str* -- width* )