From b896892f29beda8774b09cc247a38cd0ad88c48b Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 5 Jul 2023 16:23:05 -0700 Subject: [PATCH] Working copy --- gui/sliderule/assets.tal | 7 ++++ gui/sliderule/sliderule.tal | 70 +++++++++++++++++++++++++++++++------ 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/gui/sliderule/assets.tal b/gui/sliderule/assets.tal index 1f80a6f..765e049 100644 --- a/gui/sliderule/assets.tal +++ b/gui/sliderule/assets.tal @@ -93,6 +93,13 @@ e0e0 0000 0000 0000 f0f0 e000 0000 0000 7f7f 7f7f 7f7f 7f7f ffff ffff ffff ffff 7f7f 7f7f 7f7f 3f00 ffff ffff ffff 7f3f ] +@cap-end-chr [ +00fc fefe fefe fefe fcfe ffff ffff ffff +fefe fefe fefe fefe ffff ffff ffff ffff +fefe fefe fefe fc00 ffff ffff ffff fefc + +] + @rule-chr [ 7f7f 7f7f 6d6d ff00 ffff ffff ffff ffff diff --git a/gui/sliderule/sliderule.tal b/gui/sliderule/sliderule.tal index 1ad7dda..19d94b4 100644 --- a/gui/sliderule/sliderule.tal +++ b/gui/sliderule/sliderule.tal @@ -44,11 +44,13 @@ SWP2 SUB2 @on-drag ( offset* -> ) - .Mouse/y DEI2 DUP2 #0020 LTH2 ?&cursor - DUP2 #0038 LTH2 ?&c - DUP2 #0060 LTH2 ?&d + .Mouse/y DEI2 + ( ) DUP2 #0020 LTH2 ?&cursor + ( ) DUP2 #0038 LTH2 ?&c + ( ) DUP2 #0050 LTH2 ?&d &cursor ( offset* y* -> ) - POP2 .state/cursor LDZ2 ADD2 .state/cursor STZ2 + POP2 DUP2 .state/c LDZ2 ADD2 .state/c STZ2 + .state/d LDZ2 ADD2 .state/d STZ2 BRK &c ( offset* y* -> ) @@ -76,7 +78,7 @@ JMP2r @ ( -- ) - #0050 .state/cursor LDZ2 ADD2 .Screen/x DEO2 + #0050 .Screen/x DEO2 #0018 .Screen/y DEO2 #76 .Screen/auto DEO ;cursor-chr .Screen/addr DEO2 @@ -96,15 +98,15 @@ + ( | cap ) + #25 .Screen/auto DEO + ;cap-end-chr .Screen/addr DEO2 + #85 .Screen/sprite DEO ( | numbers ) + #05 .Screen/auto DEO #0024 .state/c LDZ2 ADD2 .Screen/x DEO2 #0028 .Screen/y DEO2 - #00 - JMP2r - -@ ( num -- ) - #00 SWP #30 SFT2 ;num-icn ADD2 .Screen/addr DEO2 - #0a .Screen/sprite DEO + JMP2r @ ( -- ) @@ -117,6 +119,52 @@ + ( | cap ) + #25 .Screen/auto DEO + ;cap-end-chr .Screen/addr DEO2 + #85 .Screen/sprite DEO + ( | numbers ) + #05 .Screen/auto DEO + #0034 .state/d LDZ2 ADD2 .Screen/x DEO2 + #0041 .Screen/y DEO2 + + JMP2r + +@ ( -- ) + #01 + ( small ) #0900 + &l ( -- ) + #00 OVR STH2 .Screen/x DEI2k #0016 STH2r SUB2 ADD2 ROT DEO2 + INCk + INC GTHk ?&l + POP2 + ( | next ) + .Screen/x DEI2k #000d ADD2 ROT DEO2 + #02 + .Screen/x DEI2k #0083 ADD2 ROT DEO2 + #03 + .Screen/x DEI2k #006b ADD2 ROT DEO2 + #04 + .Screen/x DEI2k #0042 ADD2 ROT DEO2 + #05 + .Screen/x DEI2k #003a ADD2 ROT DEO2 + #06 + .Screen/x DEI2k #0036 ADD2 ROT DEO2 + #07 + .Screen/x DEI2k #002d ADD2 ROT DEO2 + #08 + .Screen/x DEI2k #0024 ADD2 ROT DEO2 + #09 + JMP2r + +@ ( num -- ) + #00 SWP #30 SFT2 ;num-icn ADD2 .Screen/addr DEO2 + #0a .Screen/sprite DEO + JMP2r + +@ ( num -- ) + #00 SWP #30 SFT2 ;num-icn ADD2 .Screen/addr DEO2 + #05 .Screen/sprite DEO JMP2r @ ( -- )