~rabbits/orca-toy

3fd9dfa903a86581fd9775a83bdf2476b7c7f6ab — Devine Lu Linvega 9 months ago f9f91ad
Fixed clear tile issue
3 files changed, 14 insertions(+), 17 deletions(-)

M build.sh
M src/manifest.tal
M src/orca.tal
M build.sh => build.sh +3 -10
@@ 1,42 1,35 @@
#!/bin/sh -e

ID="orca"
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"

SRC="src/orca.tal"
DST="bin/orca.rom"

SRC="src/${ID}.tal"
DST="bin/${ID}.rom"
CPY="$HOME/roms"
ARG="etc/tests.orca"

STORE="$HOME/bin/butler push"
STOREID="hundredrabbits/orca:uxn"

echo ">> Cleaning"
rm -rf bin
mkdir bin

if [[ "$*" == *"--lint"* ]]
then
    echo ">> Linting $SRC"
	$LIN $SRC
fi

echo ">> Assembling $SRC"
$ASM $SRC $DST

if [[ "$*" == *"--save"* ]]
then
    echo ">> Saving $DST"
	cp $DST $CPY
fi

if [[ "$*" == *"--push"* ]]
then
    echo ">> Pushing $DST"
	$STORE $DST $STOREID
fi

echo ">> Running $DST"
$EMU $DST $ARG

M src/manifest.tal => src/manifest.tal +4 -1
@@ 260,7 260,7 @@ JMP2r
	.Screen/y DEI2
		.Screen/auto DEI
			#f2 .Screen/auto DEO
			;blank-icn .Screen/addr DEO2
			;fill-icn ;blank-icn ;draw-chr/color LDA #00 EQU [ JMP SWP2 POP2 ] .Screen/addr DEO2
			;draw-chr/color LDA .Screen/sprite DEOk DEO
		.Screen/auto DEO
	.Screen/y DEO2


@@ 309,6 309,7 @@ JMP2r
@update-cursor ( color addr* -- )

	#00 .Screen/auto DEO
	;fill-icn .Screen/addr DEO2
	#40 draw-cursor
	.Mouse/x DEI2 ,draw-cursor/x STR2
	.Mouse/y DEI2 ,draw-cursor/y STR2


@@ 361,5 362,7 @@ JMP2r
	2020 20b8 7c7c 3838 ]
@blank-icn [
	0000 0000 0000 0000 ]
@fill-icn [
	ffff ffff ffff ffff ]

~src/assets.tal

M src/orca.tal => src/orca.tal +7 -6
@@ 422,9 422,10 @@ BRK
	&grid
	;data/locks .grid/length LDZ2 #0000 mfil
	;data/types .grid/length LDZ2 #0000 mfil
	;variables #0024 [ LIT2 ".. ] mfil
	;variables #0024 [ LIT2 ".. ]

!mfil

JMP2r

@run ( -- )



@@ 752,7 753,7 @@ JMP2r
	&l
		DUP #20 SFT .voices ADD LDZk #00 EQU ?&no-voice
			( decrement ) LDZk #01 SUB OVR STZ
			LDZk #00 NEQ ?&no-voice
			LDZk ?&no-voice
			DUP release-voice
			&no-voice POP
		INC GTHk ?&l


@@ 1094,8 1095,8 @@ JMP2r
	.selection/x1 LDZ .selection/x2 LDZ EQU ?&skip
	.selection/y2 LDZ INC .selection/y1 LDZ
	&loop
		( l ) .selection/x1 LDZ ,&row JSR set-cell
		( r ) .selection/x2 LDZ ,&row JSR set-cell
		( l ) .selection/x1 LDZ edit-comment/row set-cell
		( r ) .selection/x2 LDZ edit-comment/row set-cell
		INC GTHk ?&loop
	POP2
	&skip


@@ 1207,7 1208,7 @@ JMP2r
@chrvel ( char -- vel )

	DUP LIT "0 EQU ?&silence
	chrb36 #03 MUL DUP #00 NEQ ?&has-vel POP #7f &has-vel
	chrb36 #03 MUL DUP ?&has-vel POP #7f &has-vel

JMP2r
	&silence POP #00 JMP2r