uxn

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

commit 4a303fab90bb9d14eb2a5f3e4483015172527f4c
parent 17e6d4df227fcb925d5b44975fd0f639009471ee
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Mon, 15 Jan 2024 08:45:41 -0800

(bunnymark) Added controller input

Diffstat:
Mprojects/examples/demos/bunnymark.tal | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/projects/examples/demos/bunnymark.tal b/projects/examples/demos/bunnymark.tal @@ -4,6 +4,7 @@ |00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 &debug $1 &halt $1 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 +|80 @Controller &vector $2 &button $1 &key $1 |90 @Mouse &vector $2 &x $2 &y $2 &state $1 &wheel $1 |c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 @@ -45,6 +46,10 @@ .Mouse/state DEI ( ) DUP #01 NEQ ?{ add-bunny } ( ) #02 LTH ?{ remove-bunny } + ( | controller handling ) + .Controller/button DEI + ( ) DUP #01 NEQ ?{ add-bunny } + ( ) #02 LTH ?{ remove-bunny } ( | clear ) #0000 DUP2 .Screen/x DEO2 .Screen/y DEO2