uxn

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

commit d00baaec6af7ea5953a3d4c51e1cbba338bd9aa5
parent 9b061bb9efe220c31a0b7e14cf3f0133e6badc3b
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Tue,  9 Nov 2021 07:14:43 +0000

Move clamps to select-file.

Diffstat:
Mprojects/software/boot.tal | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/projects/software/boot.tal b/projects/software/boot.tal @@ -100,7 +100,6 @@ BRK ( select choice ) .Mouse/y DEI2 - ( clamp ) #0010 GTH2k SWP2? POP2 10// NIP #01 - ;select-file JSR2 .Mouse/state DEI #00 = ,&no-click JCN @@ -113,11 +112,11 @@ BRK .Controller/button DEI DUP #10 ! ,&no-up JCN - #01 .browser/sel LDZ GTHk SWP? POP DEC ;select-file JSR2 + #01 .browser/sel LDZ DEC ;select-file JSR2 POP BRK &no-up DUP #20 ! ,&no-down JCN - .browser/sel LDZ ;dir/lines LDA LTHk SWP? POP INC ;select-file JSR2 + .browser/sel LDZ INC ;select-file JSR2 POP BRK &no-down DUP #01 ! ,&no-a JCN @@ -170,6 +169,11 @@ RTN RTN @select-file ( id -- ) + ( clamp id to useful values ) + DUP #fc LTH ,&not-negative JCN + DUP EOR + &not-negative + ;dir/lines LDA DEC LTHk SWP? POP DUP .browser/last LDZ ! ,&has-changed JCN POP RTN