From e6bc8b6d92a3965c24c1e4f80c807b9b17c94133 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 7 Jun 2024 08:43:08 -0800 Subject: [PATCH] Fixed selection bug --- makefile | 18 +++++++++++------- src/nasu.tal | 17 ++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/makefile b/makefile index d5be150..cb16433 100644 --- a/makefile +++ b/makefile @@ -2,27 +2,31 @@ ID=nasu DIR=~/roms ASM=uxncli ${DIR}/drifblim.rom LIN=uxncli ${DIR}/uxnlin.rom -EMU=uxnemu +EMU=uxn11 ROM=bin/${ID}.rom all: ${ROM} -clean: - @ rm -f ${ROM} ${ROM}.sym lint: @ ${LIN} src/${ID}.tal test: @ ${EMU} ${ROM} ako10x10.chr -run: ${ROM} +run: all @ ${EMU} ${ROM} -install: ${ROM} +clean: + @ rm -f ${ROM} ${ROM}.sym +install: all @ cp ${ROM} ${DIR} uninstall: @ rm -f ${DIR}/${ID}.rom -push: ${ROM} +push: all @ ~/bin/butler push ${ROM} hundredrabbits/${ID}:uxn +archive: all + @ cat src/${ID}.tal src/manifest.tal src/assets.tal | sed 's/~[^[:space:]]\+//' > bin/res.tal + @ ${ASM} bin/res.tal bin/res.rom && ${EMU} bin/res.rom + @ cp bin/res.tal ../oscean/etc/${ID}.tal.txt -.PHONY: all clean lint run install uninstall push +.PHONY: all clean lint run install uninstall push archive ${ROM}: src/* @ mkdir -p bin && ${ASM} src/${ID}.tal ${ROM} diff --git a/src/nasu.tal b/src/nasu.tal index dd708b1..f23e02a 100644 --- a/src/nasu.tal +++ b/src/nasu.tal @@ -7,7 +7,7 @@ |90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 -|0000 +|000 @state &timer $1 &changed $1 @settings &depth $1 &color $1 &blend $1 &ratio $1 &tool $1 &focus $2 &zoom $1 &brush $1 @@ -24,7 +24,7 @@ @tileview &x1 $2 &y1 $2 &x2 $2 &y2 $2 @nametableview &x $2 &y $2 &x2 $2 &y2 $2 -|0100 ( -> ) +|100 ( -> ) ( meta ) ;meta #06 DEO2 @@ -71,7 +71,7 @@ BRK ( name ) "Nasu 0a ( details ) "A 20 "Sprite 20 "Editor 0a ( author ) "By 20 "Hundred 20 "Rabbits 0a - ( date ) "13 20 "Dec 20 "2023 00 + ( date ) "6 20 "Jun 20 "2024 00 01 ( icon ) 83 =appicon @@ -1272,6 +1272,7 @@ JMP2r ( clear ) ;spritesheet #1300 mclr + load-theme ( spritesheet ) ;filepath .File/name DEO2 #1000 .File/length DEO2 @@ -1434,10 +1435,12 @@ JMP2r @move-down ( -- ) #0001 !mod-selection @move-left ( -- ) #ff00 !mod-selection @move-right ( -- ) #0100 !mod-selection -@move-dech ( -- ) #00ff !mod-selection -@move-inch ( -- ) #0001 !mod-selection -@move-decw ( -- ) #ff00 !mod-selection -@move-incw ( -- ) #0100 !mod-selection + +@move-dech ( -- ) #00ff !scale-selection +@move-inch ( -- ) #0001 !scale-selection +@move-decw ( -- ) #ff00 !scale-selection +@move-incw ( -- ) #0100 !scale-selection + @move-reset ( -- ) .selection/x1 LDZ2 .selection/x2 STZ2 !redraw @select-all ( -- )