uxn

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

commit c2fcede6cc783efd3b6862ba19d6a671ec15964d
parent 5dc0245c9ec0863e86cb08e86828bcf6c80439c4
Author: neauoire <aliceffekt@gmail.com>
Date:   Tue,  6 Apr 2021 10:51:13 -0700

Optimized nasu

Diffstat:
Mprojects/software/nasu.usm | 60++++++++++++++++++++++++++++--------------------------------
1 file changed, 28 insertions(+), 32 deletions(-)

diff --git a/projects/software/nasu.usm b/projects/software/nasu.usm @@ -45,9 +45,9 @@ |0200 @RESET ( theme ) #e0fc =System.r #30cc =System.g #30ac =System.b - ( vectors ) ,FRAME =Screen.vector - - ,FRAME =Screen.vector + ( vectors ) ,on-button =Controller.vector + ( vectors ) ,on-key =Keys.vector + ( vectors ) ,on-mouse =Mouse.vector ~Screen.width 2/ #008a SUB2 =bankview.x ~Screen.height 2/ #003f SUB2 =bankview.y @@ -63,40 +63,36 @@ BRK -@FRAME - - ( keyboard controls ) - - ~Keys.key #00 EQU ^$no-key JNZ - - ~Keys.key #31 LTH ^$no-key JNZ - ~Keys.key #33 GTH ^$no-key JNZ - ( select ) ~Keys.key #31 SUB =bankview.mode - ( release ) #00 =Keys.key - ,redraw JSR2 - - $no-key - - ~Controller.button #00 EQU ^$no-ctrl JNZ +@on-key - ~Controller.button - DUP #10 EQU ^$no-ctrl-up JNZ - ~tileview.addr #0080 ADD2 =tileview.addr $no-ctrl-up - DUP #20 EQU ^$no-ctrl-down JNZ - ~tileview.addr #0080 SUB2 =tileview.addr $no-ctrl-down - DUP #40 EQU ^$no-ctrl-left JNZ - ~tileview.addr 8+ =tileview.addr $no-ctrl-left - DUP #80 EQU ^$no-ctrl-right JNZ - ~tileview.addr 8- =tileview.addr $no-ctrl-right - POP + ~Keys.key #31 LTH ^$skip JNZ + ~Keys.key #33 GTH ^$skip JNZ + ( select ) ~Keys.key #31 SUB =bankview.mode + ( release ) #00 =Keys.key + ,redraw JSR2 + $skip - ~tileview.addr #0800 DIV2 #0800 MUL2 =bankview.addr - ,redraw JSR2 +BRK - $no-ctrl +@on-button + + ~Controller.button + DUP #10 EQU ^$no-ctrl-up JNZ + ~tileview.addr #0080 ADD2 =tileview.addr $no-ctrl-up + DUP #20 EQU ^$no-ctrl-down JNZ + ~tileview.addr #0080 SUB2 =tileview.addr $no-ctrl-down + DUP #40 EQU ^$no-ctrl-left JNZ + ~tileview.addr 8+ =tileview.addr $no-ctrl-left + DUP #80 EQU ^$no-ctrl-right JNZ + ~tileview.addr 8- =tileview.addr $no-ctrl-right + POP + ~tileview.addr #0800 DIV2 #0800 MUL2 =bankview.addr + ,redraw JSR2 - ( mouse controls ) +BRK +@on-mouse + ~Mouse.state #00 EQU ,$click-end JNZ2 ( toolbar )