~rabbits/left

a8b53a366fb49e3c144476eb00d981522d97e560 — neauoire a month ago 11b75cc
Minor optimizations
1 files changed, 10 insertions(+), 11 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +10 -11
@@ 807,9 807,8 @@ RTN

@scan-font ( addr* )
		
	LDAk IS-SPACER #01 JCN [ RTN ]
	.textarea/font LDZ ,&fixed-width JCN
	DUP2 #0001 ++ LDA ( left-paren ) #28 ! ,&no-paren-open JCN
	LDAk ( left-paren ) #28 ! ,&no-paren-open JCN
		#01 ,&commented STR
		,&default JMP
		&no-paren-open


@@ 817,6 816,7 @@ RTN
		#00 ,&commented STR
		,&default JMP
		&no-paren-close
	LDAk IS-SPACER #01 JCN [ RTN ]
	,&commented LDR ,&end JCN
	DUP2 #0001 ++ LDA #40 < ,&bold JCN
	DUP2 #0001 ++ LDA IS-LABEL ,&bold JCN


@@ 837,8 837,7 @@ RTN
	DUP2 .selection/from LDZ2 == ,&selected JCN
	DUP2 .selection/to LDZ2 == ,&default JCN
	DUP2 .selection/from LDZ2 >> STH DUP2 .selection/to LDZ2 << STHr #0101 == ,&selected JCN
	LDAk IS-SPACER #01 JCN [ RTN ]
	DUP2 #0001 ++ LDA ( left-paren ) #28 ! ,&no-paren-open JCN
	LDAk ( left-paren ) #28 ! ,&no-paren-open JCN
		#01 ,&commented STR
		#23 ;draw-uf2-multiline/color STA RTN
		&no-paren-open


@@ 846,6 845,7 @@ RTN
		#00 ,&commented STR
		,&default JMP
		&no-paren-close
	LDAk IS-SPACER #01 JCN [ RTN ]
	,&commented LDR ,&end JCN
	DUP2 #0001 ++ LDA IS-LABEL ,&label JCN
	&default


@@ 860,12 860,11 @@ RTN

RTN

@clear-uf2-multiline ( x* y* text* color -- )
@clear-uf2-multiline ( x* y* text* -- )
	 
	;font-data-regular ;draw-uf2/font STA2
	SWP2 .Screen/y DEO2
	SWP2 .scroll/x LDZ2 -- DUP2 .Screen/x DEO2 SWP2
	( look behind ) #0001 -- ;scan-font JSR2 #0001 ++
	&while
		;scan-font JSR2
		( do not overdraw )


@@ 890,7 889,6 @@ RTN
	;font-data-regular ;draw-uf2/font STA2
	SWP2 .Screen/y DEO2
	SWP2 .scroll/x LDZ2 -- DUP2 .Screen/x DEO2 SWP2
	( look behind ) #0001 -- ;scan-font JSR2 #0001 ++
	&while
		;scan-color JSR2
		;scan-font JSR2


@@ 919,10 917,10 @@ RTN
	,&font STR2
	SWP2 .Screen/y DEO2
	SWP2 DUP2 .Screen/x DEO2 SWP2
	&loop
	&while
		( draw ) LDAk STHkr ,&sprite JSR
		( incr ) #0001 ++
		LDAk ,&loop JCN
		LDAk ,&while JCN
	POP2 POP2 POPr
	RTN



@@ 981,8 979,9 @@ RTN
	#0018 .Screen/height DEI2 #0008 --
	&loop
		( draw ) #23 .Screen/color DEO
		( incr ) SWP2 #0008 ++ DUP2 .Screen/y DEO2 SWP2
		OVR2 OVR2 LTH2 ,&loop JCN
		( incr ) SWP2 #0008 ++ SWP2
		OVR2 .Screen/y DEO2
		LTH2k ,&loop JCN
	POP2 POP2
 
	( position )