From fe2bee8a95de3e53b4ce2c9e391d3c601f2ae5f6 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 11 Feb 2024 09:15:18 -0800 Subject: [PATCH] Housekeeping --- gui/shaviankb/shaviankb.tal | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/gui/shaviankb/shaviankb.tal b/gui/shaviankb/shaviankb.tal index a2055c1..d236653 100644 --- a/gui/shaviankb/shaviankb.tal +++ b/gui/shaviankb/shaviankb.tal @@ -12,9 +12,9 @@ |0100 @on-reset ( -> ) - #9c0f .System/r DEO2 - #7c0f .System/g DEO2 - #de0f .System/b DEO2 + #ad0f .System/r DEO2 + #ac0f .System/g DEO2 + #ab0f .System/b DEO2 #0130 .Screen/width DEO2 #00d0 .Screen/height DEO2 ;on-mouse .Mouse/vector DEO2 @@ -34,11 +34,6 @@ ( @|core ) -@ ( id* -- ) - DUP2 .hover LDZ2 EQU2 ?{ .hover STZ2 - JMP2r } - POP2 JMP2r - @get-mouse-key ( -- id* ) ( x ) .Mouse/x DEI2 #0008 SUB2 #05 SFT2 ( y ) .Mouse/y DEI2 #0008 SUB2 #0030 DIV2 #0009 MUL2 ADD2 @@ -46,6 +41,11 @@ ( space ) DUP #1d SUB #04 GTH ?{ POP2 #001d } JMP2r +@ ( id* -- ) + DUP2 .hover LDZ2 EQU2 ?{ .hover STZ2 + JMP2r } + POP2 JMP2r + @ ( id* -- ) DUP2 #0009 DIV2 #0030 MUL2 #0008 ADD2 .Screen/y DEO2 DUP #1e NEQ ?{ POP2 #0007 } @@ -53,6 +53,9 @@ #0009 DIV2k MUL2 SUB2 #0020 MUL2 #0008 ADD2 .Screen/x DEO2 JMP2r +( +@|drawing ) + @ ( x* y* w h sprite* -- ) .Screen/addr DEO2 ,&h STR @@ -93,7 +96,7 @@ #0006 MUL2 ;layout ADD2 ( ) STH2k #0004 ADD2 LDA2 ( ) STH2kr #0002 ADD2 LDA2 - ( ) STH2r LDA2 + ( ) STH2r LDA2 ;btn-chr JMP2r @ ( addr* -- ) @@ -102,7 +105,7 @@ [ LIT2 0a -Screen/sprite ] DEO JMP2r -@ ( a* b* c* -- ) +@ ( a* b* c* frame* -- ) .Screen/x DEI2k #0002 SUB2 ROT DEO2 .Screen/y DEI2k #0024 SUB2 ROT DEO2 @@ -127,8 +130,9 @@ #03ee POP2 JMP2r -@ ( -- ) - .Screen/x DEI2 .Screen/y DEI2 #0204 ;btn-chr +@ ( frame* -- ) + STH2 + .Screen/x DEI2 .Screen/y DEI2 #0204 STH2r ;fill-icn .Screen/addr DEO2 [ LIT2 12 -Screen/auto ] DEO [ LIT2 03 -Screen/sprite ] DEOk DEOk DEOk DEO @@ -163,6 +167,6 @@ &c ( -- ) #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO JMP2r - + ~assets.tal