uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit dacd2ff26c4e4e55dbd674f117c5e0e4e682e7b0
parent 44789e4c00ff8c45dd0215a1540fc79c0b3e7e2a
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun, 23 Jan 2022 10:48:26 -0800

(dos.tal) Improved hx view

Diffstat:
Mprojects/software/dos.tal | 57+++++++++++++++++++++++++++++++++------------------------
1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/projects/software/dos.tal b/projects/software/dos.tal @@ -61,9 +61,9 @@ |0100 ( -> ) ( theme ) - #50f5 .System/r DEO2 - #c0f5 .System/g DEO2 - #a0f5 .System/b DEO2 + #0f55 .System/r DEO2 + #0fc5 .System/g DEO2 + #0fa5 .System/b DEO2 ( vectors ) ;on-button .Controller/vector DEO2 @@ -205,12 +205,19 @@ RTN ;&error-txt #02 ;draw-str JSR2 RTN &valid AUTO-YADDR - .Screen/x DEI2 ,&anchor STR2 - ;view #0014 ++ ;view + .File/success DEI2 #0000 &loop - LDAk #01 ;draw-byte JSR2 - LIT2 &anchor $2 .Screen/x DEO2 - .Screen/y DEI2k #0010 ++ ROT DEO2 + DUP2 ;view ++ LDA #01 ;draw-hex JSR2 + ( make shorts ) + DUP2 #0001 AND2 #0000 == ,&no-short JCN + .Screen/x DEI2k #0008 ++ ROT DEO2 + &no-short + ( make lines ) + DUP2 #000f AND2 #000f !! ,&no-lines JCN + .Screen/y DEI2k #0010 ++ ROT DEO2 + PAD .Screen/x DEO2 + .Screen/y DEI2 .Screen/height DEI2 PAD -- #0010 -- >> ,&end JCN + &no-lines INC2 GTH2k ,&loop JCN &end POP2 POP2 @@ -263,9 +270,9 @@ RTN ;commands/end ;commands &loop PAD .Screen/x DEO2 - LDA2k #06 ;draw-str JSR2 + ( name ) LDA2k #08 ;draw-str JSR2 PAD #0020 ++ .Screen/x DEO2 - DUP2 ;commands -- ;commands-docs ++ LDA2 #01 ;draw-str JSR2 + ( docs ) DUP2 ;commands -- ;commands-docs ++ LDA2 #01 ;draw-str JSR2 .Screen/y DEI2k #0010 ++ ROT DEO2 INC2 INC2 GTH2k ,&loop JCN &end @@ -287,6 +294,8 @@ RTN :cmd-hx/func :cmd-tx/func :cmd-do/func :cmd-tm/func &end :cmd-??/func +( gui ) + @draw-input ( color -- ) AUTO-YADDR @@ -307,20 +316,6 @@ RTN JMP2r -@draw-byte ( byte color -- ) - - STH - DUP #04 SFT ,&parse JSR STHkr ;draw-char JSR2 - #0f AND ,&parse JSR STHr ;draw-char JSR2 - RTN - &parse ( value -- char ) - DUP #09 > ,&above JCN - #30 + RTN - &above - #09 - #60 + RTN - -RTN - @draw-tx ( str* color -- ) AUTO-YADDR @@ -354,6 +349,20 @@ RTN RTN +@draw-hex ( byte color -- ) + + STH + DUP #04 SFT ,&parse JSR STHkr ,draw-char JSR + #0f AND ,&parse JSR STHr ,draw-char JSR + RTN + &parse ( value -- char ) + DUP #09 > ,&above JCN + #30 + RTN + &above + #09 - #60 + RTN + +RTN + @draw-str ( str* color -- ) AUTO-YADDR