From abfb3f4760c125740309eb839bf7547854b8564c Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 10 Feb 2024 21:10:26 -0800 Subject: [PATCH] Draw frame --- gui/shaviankb/assets.tal | 10 +++++++ gui/shaviankb/shaviankb.tal | 50 ++++++++++++++++++++++---------- gui/shaviankb/untitled10x10.chr | Bin 4096 -> 4096 bytes 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/gui/shaviankb/assets.tal b/gui/shaviankb/assets.tal index 9dd6ca1..682dd88 100644 --- a/gui/shaviankb/assets.tal +++ b/gui/shaviankb/assets.tal @@ -39,6 +39,16 @@ @fill-icn [ ffff ffff ffff ffff ] @pointer-icn [ 80c0 e0f0 f8e0 1000 ] +@btn-chr [ + 0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f + 0000 ffff ffff ffff 00ff ffff ffff ffff + 0000 f8fc fcfc fcfc 00f8 fcfe fefe fefe + fcfc fcfc fcfc fcfc fefe fefe fefe fefe + 3f3f 3f3f 3f3f 3f3f 7f7f 7f7f 7f7f 7f7f + 3f3f 3f3f 3f1f 0000 7f7f 7f5f 4020 1f00 + ffff ffff ffff 0000 ffff ffff 0000 ff00 + fcfc fcfc fcf8 0000 fefe fefa 0204 f800 ] + @button-icn &top [ 0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f diff --git a/gui/shaviankb/shaviankb.tal b/gui/shaviankb/shaviankb.tal index 052ed97..0db7f78 100644 --- a/gui/shaviankb/shaviankb.tal +++ b/gui/shaviankb/shaviankb.tal @@ -53,11 +53,38 @@ #0009 DIV2k MUL2 SUB2 #0020 MUL2 #0008 ADD2 .Screen/x DEO2 JMP2r +@ ( x* y* w h sprite* -- ) + .Screen/addr DEO2 + ,&h STR + ,&w STR + DUP2 .Screen/y DEO2 + ,&y STR2 + DUP2 .Screen/x DEO2 + ,&x STR2 + #01 .Screen/auto DEO + #81 .Screen/sprite DEO + ,&next JSR [ LIT &w $1 ] ,&repeat JSR #02 .Screen/auto DEO + ,&next JSR #81 .Screen/sprite DEO + ,&next JSR [ LIT &h $1 ] ,&repeat JSR + ( left ) [ LIT2 &y $2 ] #0008 ADD2 .Screen/y DEO2 + [ LIT2 &x $2 ] .Screen/x DEO2 + ,&next JSR ,&h LDR ,&repeat JSR #01 .Screen/auto DEO + ,&next JSR #81 .Screen/sprite DEO + ,&next JSR ,&w LDR ,&repeat JSR ,&next JSR #81 .Screen/sprite DEO + ( fill ) ,&next JSR ,&x LDR2 #0008 ADD2 .Screen/x DEO2 + ,&y LDR2 #0008 ADD2 .Screen/y DEO2 + JMP2r + &next .Screen/addr DEI2k #0010 ADD2 ROT DEO2 + JMP2r + &repeat #00 &repeat-loop #81 .Screen/sprite DEO + INC GTHk ?&repeat-loop + POP2 JMP2r + @ ( -- ) #0020 #0000 &l ( -- ) DUP2 #00 - ( ) INC2 GTH2k ?&l + INC2 GTH2k ?&l POP2 POP2 JMP2r @ ( id* state -- ) @@ -77,8 +104,8 @@ @ ( a* b* c* -- ) - .Screen/x DEI2k #0006 ADD2 ROT DEO2 - .Screen/y DEI2k #0004 ADD2 ROT DEO2 + .Screen/x DEI2k #0002 SUB2 ROT DEO2 + .Screen/y DEI2k #0024 SUB2 ROT DEO2 ( | a ) .Screen/x DEI2k #0002 SUB2 ROT DEO2 @@ -105,19 +132,10 @@ JMP2r @ ( -- ) - .Screen/x DEI2 .Screen/y DEI2 - ( | draw ) - [ LIT2 36 -Screen/auto ] DEO - ;button-icn/top .Screen/addr DEO2 - [ LIT2 81 -Screen/sprite ] DEOk DEOk - ( ) ;button-icn/middle .Screen/addr DEO2 - DEOk - ( ) ;button-icn/middle .Screen/addr DEO2 - DEOk - ( ) ;button-icn/middle .Screen/addr DEO2 - DEOk DEO - .Screen/y DEO2 - .Screen/x DEO2 + .Screen/x DEI2 .Screen/y DEI2 #0204 ;btn-chr + ;fill-icn .Screen/addr DEO2 + [ LIT2 12 -Screen/auto ] DEO + [ LIT2 03 -Screen/sprite ] DEOk DEOk DEOk DEO JMP2r @ ( color addr* -- ) diff --git a/gui/shaviankb/untitled10x10.chr b/gui/shaviankb/untitled10x10.chr index 91f5994661adb2e230d68f99f427097e47392db7..33e5993ca190c0ea5295a6a28012b3422221236e 100644 GIT binary patch literal 4096 zcmeHH(Q3mm3>0DPH@rWo|0Ma7{B|g%+1<(7LhGb7gOPymK|(~1@6JMI=|UilgxM^V zG(XqVjj-uY5A0lz^SNJx5Bep4(eL_y`z0U!K%$0?`I3ce^Ctao=y4v$iQQwe>|?Tczv_Is59ReM^S1BSW1UJc0gTdRsP9X9fbR-qzTBUz&kVgkLRptN<~}q% q)-nIFKcnxgS^BZR*7l|A4|Uc386R724m1av1I>ZvKy%@~