~rabbits/left

30e5329d42cc965a3bd85fd42e067d12935c5fc4 — Devine Lu Linvega a month ago 2cccb88
Added pragma mark
3 files changed, 23 insertions(+), 20 deletions(-)

M src/assets.tal
M src/main.tal
M src/manifest.tal
M src/assets.tal => src/assets.tal +4 -4
@@ 213,14 213,14 @@
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 1020 2020 4020 2020 2010 0000 0000
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 2020 2020 2020 2020 2020 0000 0000
	0000 2020 2020 2020 2020 2020 2020 0000
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 4020 2020 1020 2020 2040 0000 0000
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 0000 0032 4c00 0000 0000 0000 0000
	0000 0000 0000 0000 0000 0000 0000 0000

@font-data-bold ( sans10-bold )
@font-bold ( sans10-bold )
	0000 0808 0808 0808 0810 0808 0808 0808
	0808 0808 0808 0808 0808 0808 0808 0808
	0405 070a 070e 0a04 0606 0707 0505 0507


@@ 229,7 229,7 @@
	080a 0807 0809 0a0d 0909 0806 0706 0707
	0508 0807 0808 0608 0804 0508 040c 0808
	0808 0606 0608 080c 0909 0706 0606 0808
	( glyphs )
	&glyphs
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 0000 0000 0000 0000 0000 0000 0000
	0000 0030 3030 3030 0030 3000 0000 0000


@@ 421,7 421,7 @@
	0000 0000 325a 4c00 0000 0000 0000 0000
	0000 0000 0000 0000 0000 0000 0000 0000

@font-data-fixed ( monaco12 )
@font-fixed ( monaco12 )
	0000 0707 0707 0707 070e 0707 0707 0707
	0707 0707 0707 0707 0707 0707 0707 0707
	0707 0707 0707 0707 0707 0707 0707 0707

M src/main.tal => src/main.tal +16 -15
@@ 279,7 279,7 @@ BRK

	.Mouse/state DEI [ JMP BRK ]
	.Mouse/y DEI2 #04 SFT2 NIP #02 SUB
	DUP [ .Screen/height DEI2 #04 SFT2 #02 SUB NIP ] GTH ,&skip JCN
	DUP .Screen/height DEI2 #04 SFT2 #02 SUB NIP GTH ,&skip JCN
		DUP ;jump-by JSR2
	&skip
	POP


@@ 824,7 824,7 @@ JMP2r

	[ LIT2 &x $2 ] .Screen/x DEO2
	[ LIT2 &y $2 ] .Screen/y DEO2
	;font-data-fixed .textarea/font STZ2
	;font-fixed .textarea/font STZ2
	STH SWP
	STHkr ,&draw-byte JSR
	STHr


@@ 930,9 930,9 @@ JMP2r
	&default
		;font .textarea/font STZ2 JMP2r
	&bold
		;font-data-bold .textarea/font STZ2 JMP2r
		;font-bold .textarea/font STZ2 JMP2r
	&fixed-width
		;font-data-fixed .textarea/font STZ2
		;font-fixed .textarea/font STZ2
	&end

JMP2r


@@ 1017,27 1017,28 @@ JMP2r

	;get-scope JSR2 ,&scope STR2
	#0020 .Screen/y DEO2
	.Screen/height DEI2 #04 SFT2 #02 SUB NIP #00 STH2
	;get-eof JSR2 .scroll/addr LDZ2 #40 ;find-prev-char JSR2 #0001 SUB2 ;text GTH2k [ JMP SWP2 POP2 ]
	&loop
		( reached bottom )
		LDA2k #0a LIT '@ NEQ2 ,&continue JCN
			#0010 .Screen/x DEO2
			( highlight ) DUP2 [ LIT2 &scope $2 ] EQU2 #30 SFT INC ;draw-chr/color STA
			( draw ) INC2 ;draw-word JSR2
			.Screen/y DEI2k #0010 ADD2 ROT DEO2
			EQUkr STHr ,&end JCN
			INCr
			( pragma ) INC2k INC2 LDA LIT '| EQU #03 MUL STH
			( highlight ) DUP2 [ LIT2 &scope $2 ] EQU2 #30 SFT STHr ADD INC ;draw-chr/color STA
			( draw ) INC2 INC2 ;draw-word JSR2
			.Screen/y DEI2k #0010 ADD2 STH2k ROT DEO2
			STH2r .Screen/height DEI2 GTH2 ,&end JCN
			&continue
		INC2 LDAk ,&loop JCN
	&end
	POP2 POP2
	STHr ,&not-empty JCN

	( check if empty )
	.Screen/y DEI2 #0020 NEQ2 ,&no-empty JCN
		#03 ;draw-chr/color STA
		#0010 .Screen/x DEO2
		#0020 .Screen/y DEO2
		;&empty-txt ;draw-word JSR2 POP2
		&not-empty
	POPr
		&no-empty

JMP2r
	&empty-txt "Empty $1


@@ 1047,7 1048,7 @@ JMP2r
	STH
	#04 ;get-catx JSR2 .Screen/x DEO2
	#0004 .Screen/y DEO2
	;filepath ;font-data-bold STHr ;draw-uf2 ( .. )
	;filepath ;font-bold STHr ;draw-uf2 ( .. )

JMP2



@@ 1056,7 1057,7 @@ JMP2
	STH
	#04 ;get-catx JSR2 .Screen/x DEO2
	#0004 .Screen/y DEO2
	;leap/buf ;font-data-bold STHr ;draw-uf2 ( .. )
	;leap/buf ;font-bold STHr ;draw-uf2 ( .. )

JMP2


M src/manifest.tal => src/manifest.tal +3 -1
@@ 348,7 348,9 @@ JMP2r
JMP2r
	&path ".theme $1

( stdlib )
(
@|stdlib
)

@scap ( str* -- end* ) LDAk #00 NEQ JMP JMP2r &w INC2 LDAk ,&w JCN JMP2r
@spop ( str* -- ) LDAk ,&n JCN POP2 JMP2r &n ,scap JSR #0001 SUB2 #00 ROT ROT STA JMP2r