~rabbits/left

1feb3f33d935994119531d5539e35672157bde48 — Devine Lu Linvega a month ago 1f0adee
Faster rune drawing
1 files changed, 8 insertions(+), 16 deletions(-)

M src/left.tal
M src/left.tal => src/left.tal +8 -16
@@ 839,7 839,6 @@ JMP2r
	LDAk #21 LTH ?&whitespace

	( color ) walk-color ,&color STR
	( underline ) DUP2 is-rune ;draw-ufx/ul STA
	( rune ) draw-rune
	&w
		is-selected STH


@@ 861,24 860,17 @@ JMP2r

@draw-rune ( addr* -- addr* )

	;walk-color/c LDA ?&skip
	.textarea/highlight LDZ ?&skip

	LDAk ;runes cndx INC2k ORA ?&continue
		POP2 JMP2r
		&continue
	( set color )
	SWP2
	is-selected #0d01 ROT [ JMP SWP POP ]
		;draw-ufx/color STA
	SWP2
	( draw glyph )
	#50 SFT2 ;rune-icns ADD2 #08 ROT ROT
		draw-ufx/seg
	LDAk ;runes cndx
		DUP2 #ffff EQU2 ?&no-rune
		;walk-color/c LDA ?&no-rune
		.textarea/highlight LDZ ?&no-rune
	#01 ;draw-ufx/ul STA
	( color ) SWP2 is-selected #0c MUL INC ;draw-ufx/color STA
	( glyph ) SWP2 #50 SFT2 ;rune-icns ADD2 #08 ROT ROT draw-ufx/seg
	INC2
	&skip

JMP2r
	&no-rune ( addr* ffff* -- addr* ) POP2 #00 ;draw-ufx/ul STA JMP2r

@walk-color ( addr* -- addr* color )