~rabbits/nasu

b1508954b34b4129469c61de60ea71c400f057ec — Devine Lu Linvega a month ago 117b52f
Open sub menus under items
1 files changed, 21 insertions(+), 1 deletions(-)

M src/manifest.tal
M src/manifest.tal => src/manifest.tal +21 -1
@@ 146,11 146,12 @@ JMP2r

	;draw-cat/sel LDA ;get-sub JSR2
	DUP2 #0000 EQU2 ,&skip JCN
	;draw-cat/sel LDA ;get-anchor JSR2 ,&anchor STR2
	#01 .Screen/auto DEO
	LDAk STH INC2 ;skip-str JSR2
	STHr #00
	&subcat
		#0000 .Screen/x DEO2
		[ LIT2 &anchor $2 ] .Screen/x DEO2
		#00 OVR INC #30 SFT2 .Screen/y DEO2
		SWP2 #0004 ADD2 ;draw-str JSR2 SWP2
		INC GTHk ,&subcat JCN


@@ 188,6 189,25 @@ JMP2r

JMP2r

@get-anchor ( cat -- x* )

	LIT2r 0000
	,&target STR
	#00 ,&id STR
	;manifest/menu
	&cat
		[ LIT &id 00 ] [ LIT &target $1 ] EQU ,&end JCN
		DUP2 INC2 ;slen JSR2 INC2 INC2 STH2 ADD2r
		;skip-sub JSR2
		,&id LDR INC ,&id STR
		LDAk ,&cat JCN
	POP2
	&end
	STH2r
	#30 SFT2

JMP2r

@draw-str ( str* -- str* )

	&while