~rabbits/orca-toy

5e6d120b0d30235371797eb5aa02f0b93eeffd6b — Devine Lu Linvega 2 months ago 75bfd8a
Added Exit
2 files changed, 27 insertions(+), 11 deletions(-)

M src/manifest.tal
M src/orca.tal
M src/manifest.tal => src/manifest.tal +25 -8
@@ 56,8 56,8 @@ BRK
	DUP #ff EQU ,&no-clear JCN
		DUP #00 ;draw-sub JSR2
		#ff ;draw-menu/sel STA
		;draw-menu JSR2
		;redraw-all JSR2
		;draw-menu JSR2
	&no-clear
	POP



@@ 109,7 109,7 @@ BRK

	STH
	#00 ,&id STR
	;manifest/menu
	;draw-menu/manifest LDA2
	&cat
		[ LIT &id 00 ] STHkr EQU ,&end JCN
		;skip-sub JSR2


@@ 149,7 149,7 @@ JMP2r
	LIT2r 0000
	,&target STR
	#00 ,&id STR
	;manifest/menu
	;draw-menu/manifest LDA2
	&cat
		[ LIT &id 00 ] [ LIT &target $1 ] EQU ,&end JCN
		INC2k ;get-strw JSR2 #0008 ADD2 STH2 ADD2r


@@ 163,13 163,13 @@ JMP2r

JMP2r

@get-xcat ( x* -- cat )
@get-xcat ( x* -- <cat> )

	#0010 SUB2
	LIT2r 0000
	,&target STR2
	#00 ,&id STR
	;manifest/menu
	;draw-menu/manifest LDA2
	&cat
		INC2k ;get-strw JSR2 #0008 ADD2 STH2r ADD2
		DUP2 [ LIT2 &target $2 ] LTH2 ,&continue JCN


@@ 190,7 190,7 @@ JMP2r
	ORAk ,&no-null JCN JMP2r &no-null
	( not null )
	,&mk STR2
	;manifest/menu
	;draw-menu/manifest LDA2
	&cat
		LDAk STH INC2 ,skip-str JSR
		STHr #00


@@ 229,10 229,10 @@ JMP2r
	#0010 .Screen/x DEO2
	#0004 .Screen/y DEO2
	#00 ,&id STR
	;manifest/menu
	[ LIT2 &manifest :manifest ]
	&cat
		menu-sel menu-def [ LIT &sel ff ] [ LIT &id $1 ] EQU [ JMP SWP POP ] ;draw-chr/color STA
		INC2k ;draw-str JSR2 POP2 #00 .Screen/sprite DEO
		INC2k ;draw-str JSR2 POP2 #20 ;draw-chr JSR2
		;skip-sub JSR2
		,&id LDR INC ,&id STR
		LDAk ,&cat JCN


@@ 329,6 329,17 @@ JMP2r

JMP2r

@update-cursor ( color addr* -- )

	#00 .Screen/auto DEO
	#40 ,draw-cursor JSR
	.Mouse/x DEI2 DUP2 .cursor/x STZ2 .Screen/x DEO2
	.Mouse/y DEI2 DUP2 .cursor/y STZ2 .Screen/y DEO2
	.Screen/addr DEO2
	.Screen/sprite DEO

JMP2r

@draw-cursor ( color -- )

	.cursor/x LDZ2 .Screen/x DEO2


@@ 373,6 384,12 @@ JMP2r

JMP2r

@exit ( -- )

	#010f DEO

JMP2r

( assets )

@hand-icn

M src/orca.tal => src/orca.tal +2 -3
@@ 130,14 130,13 @@ BRK

@manifest

	&name "Orca $1
	&date "2022-07-02 $1
	&menu
		04 "File $1
		05 "Orca $1
			01 'n :file-new "New $1
			01 'r :file-rename "Rename $1
			01 'o :file-open "Open $1
			01 's :file-save "Save $1
			01 'q :exit "Exit $1
		06 "Edit $1
			01 'c :edit-copy "Copy $1
			01 'v :edit-paste "Paste $1