~rabbits/orca-toy

ce8f20138d8720d8668d46142afba9f90e968357 — neauoire 1 year, 8 months ago 038f4b5
Detect interface touch options
1 files changed, 27 insertions(+), 12 deletions(-)

M orca.tal
M orca.tal => orca.tal +27 -12
@@ 20,19 20,15 @@
%DEBUG2 { .Console/short DEO2 #0a .Console/char DEO }

%RTN { JMP2r }
%MOD { DUP2 / * - }
%MOD8 { #07 AND }
%MOD { DUP2 / * - } %MOD8 { #07 AND }
%TOB { SWP POP } %TOS { #00 SWP }
%INCR { SWP #01 + SWP }
%GET-ITERATORS { SWP2k POP SWP POP }
%TOGGLE { DUP LDZ #00 = SWP STZ }

%TOB { SWP POP } %TOS { #00 SWP }

%CHAR-DOT { #2e }

%DATA-CELLS { #2000 }
%DATA-LOCKS { #3000 }
%DATA-TYPES { #4000 }
%DATA-CELLS { #8000 }
%DATA-LOCKS { #9000 }
%DATA-TYPES { #a000 }

%IS-CHAR-KEY { STHk #20 > STHr #7b < #0101 == }



@@ 50,6 46,10 @@
%SET-PORT { } ( x y char -- )
%LDA-CELL-VALUE { LDA-CELL LDA-VALUE } ( x y -- b36 )

%CHAR-DOT { #2e }

%RELEASE-MOUSE { #00 .Mouse/state DEO }

( devices )

|00 @System     [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]


@@ 157,6 157,7 @@ BRK
	.Mouse/state DEI #00 EQU ,&no-touch JCN

		.Mouse/y DEI2 .Screen/height DEI2 #0008 -- -- #0008 << ;on-touch-bar JCN2
		.Mouse/y DEI2 .Screen/height DEI2 #0010 -- -- #0008 << ,&no-touch JCN

		.Mouse/x DEI2 #03 SFT2 SWP POP .selection/x1 STZ
		.Mouse/y DEI2 #03 SFT2 SWP POP .selection/y1 STZ


@@ 184,7 185,22 @@ BRK

@on-touch-bar ( -> )
	
	.Mouse/x DEI2 #03 SFT2 TOB DEBUG 
	.Screen/width DEI2 #03 SFT2 TOB .Mouse/x DEI2 #03 SFT2 TOB -
	DUP #01 ! ,&no-save JCN
		#aa DEBUG
		;save-file JSR2 &no-save
	DUP #03 ! ,&no-load JCN
		#bb DEBUG
		;load-file JSR2
		;redraw JSR22 &no-load
	DUP #04 ! ,&no-name JCN
		#cc DEBUG
		#20 ;draw-filepath JSR2
		;untitled-txt ;new-file JSR2
		;redraw JSR2 &no-name
	POP

	RELEASE-MOUSE

BRK



@@ 651,8 667,7 @@ RTN
@draw-filepath ( color -- )
	
	STH
	.Screen/x DEI2 #0048 ++ .Screen/x DEO2
	.Screen/y DEI2 .Screen/y DEO2
	#0068 .Screen/x DEO2
	;path/name
	&loop
		DUP2 LDA DUP #00 ! #20 * - TOS #0008 ** ;font ++ .Screen/addr DEO2