uxn

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

commit 1f7a15d05b23b3387f12261bba9ed5df06ad5682
parent f2c644f68088c575ded3bfb24c40bbe0e0717879
Author: neauoire <aliceffekt@gmail.com>
Date:   Sat, 26 Mar 2022 18:29:38 -0700

(screen.tal) Improved layout

Diffstat:
Mprojects/examples/devices/screen.tal | 18+++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/projects/examples/devices/screen.tal b/projects/examples/devices/screen.tal @@ -35,7 +35,7 @@ BRK #01 .Screen/auto DEO .count LDZ2 INC2 [ DUP2 ] .count STZ2 - .center/x LDZ2 #0028 ADD2 .Screen/x DEO2 + .center/x LDZ2 #0050 ADD2 .Screen/x DEO2 .center/y LDZ2 #0048 SUB2 .Screen/y DEO2 ;draw-short JSR2 @@ -43,18 +43,26 @@ BRK @draw-sprites ( -- ) - .center/x LDZ2 #0068 SUB2 .Screen/x DEO2 + ( horizontal ) + .center/x LDZ2 #0060 SUB2 .Screen/x DEO2 .center/y LDZ2 #0048 SUB2 .Screen/y DEO2 ;font-hex .Screen/addr DEO2 #f6 .Screen/auto DEO #01 .Screen/sprite DEO + ( vertical ) + .center/x LDZ2 #0070 SUB2 .Screen/x DEO2 + .center/y LDZ2 #0038 SUB2 .Screen/y DEO2 + ;font-hex .Screen/addr DEO2 + #f5 .Screen/auto DEO + #01 .Screen/sprite DEO + #00 .Screen/auto DEO ( table ) ;preview_icn .Screen/addr DEO2 #00 #00 &loop ( move ) DUP #0f AND #40 SFT #01 SFT #00 SWP - .center/x LDZ2 #0068 SUB2 ADD2 .Screen/x DEO2 + .center/x LDZ2 #0060 SUB2 ADD2 .Screen/x DEO2 ( move ) DUP #f0 AND #01 SFT #00 SWP .center/y LDZ2 #0038 SUB2 ADD2 .Screen/y DEO2 ( draw ) DUP .Screen/sprite DEO @@ -71,7 +79,7 @@ JMP2r ( y ) DUP #02 SFT [ #00 SWP ] #40 SFT2 [ .center/y LDZ2 #0038 SUB2 ADD2 ] STH2 ( x ) DUP #03 AND [ #00 SWP ] #40 SFT2 #0040 ADD2 - [ .center/x LDZ2 #0018 SUB2 ADD2 ] + [ .center/x LDZ2 #0010 SUB2 ADD2 ] STH2r STHr #00 ,draw-circle JSR INC GTHk ,&loop JCN POP2 @@ -86,7 +94,7 @@ JMP2r ( y ) DUP #02 SFT [ #00 SWP ] #40 SFT2 [ .center/y LDZ2 #0008 ADD2 ADD2 ] STH2 ( x ) DUP #03 AND [ #00 SWP ] #40 SFT2 #0040 ADD2 - [ .center/x LDZ2 #0018 SUB2 ADD2 ] + [ .center/x LDZ2 #0010 SUB2 ADD2 ] STH2r STHr #80 ,draw-circle JSR INC GTHk ,&loop JCN POP2