commit 6b0dc51

neauoire  ·  2023-11-12 17:19:30 +0000 UTC
parent f98b698
Made a boundary testing file
2 files changed,  +64, -2
+62, -0
 1@@ -0,0 +1,62 @@
 2+|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1
 3+|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
 4+|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &pad $3 &scrollx $2 &scrolly $2
 5+
 6+|0100
 7+
 8+@on-reset ( -> )
 9+	#375e .System/r DEO2
10+	#286c .System/g DEO2
11+	#2358 .System/b DEO2
12+	;on-mouse .Mouse/vector DEO2
13+	BRK
14+
15+@on-mouse ( -> )
16+	( | clear background )
17+	#0000 DUP2 .Screen/x DEO2
18+	.Screen/y DEO2
19+	#80 .Screen/pixel DEO
20+	( | cursor )
21+	[ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;cursor-icn <update-cursor>
22+	( | draw portrait )
23+	[ LIT2 36 -Screen/auto ] DEO
24+	;portrait-chr .Screen/addr DEO2
25+	#81 .Screen/sprite DEOk DEOk DEOk DEO
26+	BRK
27+
28+@<update-cursor> ( color addr* -- )
29+	[ LIT2 00 -Screen/auto ] DEO
30+	;fill-icn .Screen/addr DEO2
31+	#40 <draw-cursor>
32+	.Mouse/x DEI2 ,<draw-cursor>/x STR2
33+	.Mouse/y DEI2 ,<draw-cursor>/y STR2
34+	.Screen/addr DEO2
35+
36+@<draw-cursor> ( color -- )
37+	[ LIT2 &x $2 ] .Screen/x DEO2
38+	[ LIT2 &y $2 ] .Screen/y DEO2
39+	.Screen/sprite DEO
40+	JMP2r
41+
42+@fill-icn [ ffff ffff ffff ffff ]
43+
44+@cursor-icn [ 80c0 e0f0 f8e0 1000 ]
45+
46+@portrait-chr [
47+	070f 1e1d 1b3b 3b3b f0e0 c0c0 d08b 8080
48+f76f cf9f 9f5f 5f5f 0000 0007 1c40 4040
49+fffb f975 7576 7667 0000 3164 0406 0607
50+efef efef eddd 9e1e 0060 8000 0000 0000
51+3b2b 280d 0105 0506 8080 8081 e1f1 f1f0
52+5f6c 639b 0f27 77ab 4060 639b 0f27 67ab
53+0dc8 b0e5 cded fdfc 0dc8 b0e4 ccec fcfc
54+5e1e 1c9c 9d1d 5d59 4000 0080 8000 4040
55+0607 0707 070e 0e0e f0f0 f0f0 f0e0 e0e0
56+fb73 7fb7 bbbf bfdd f373 7b37 3b3f 3f1c
57+ffff ffff ffff ffff ffff ffff ffff ff7f
58+dba7 97f7 f7ed dd9d c080 90f0 f0e0 c080
59+1e0e 0000 0000 0000 c0c0 f0ff ffff ffff
60+ee03 0000 0000 0000 0e12 fcff ffff ffff
61+fffc f30f 1f1f 1f3f 9f3c f30f dfdf dfbf
62+3c80 8080 80c0 c0e0 0003 3fbf bfbf dfef ]
63+
+2, -2
 1@@ -12,9 +12,9 @@ all: dest bin/uxnasm bin/uxncli bin/uxn11
 2 dest:
 3 	@ mkdir -p bin
 4 rom:
 5-	@ ./bin/uxnasm etc/polycat.tal bin/polycat.rom
 6+	@ ./bin/uxnasm etc/screen.bounds.tal bin/screen.bounds.rom
 7 run: bin/uxnasm bin/uxncli bin/uxn11 rom
 8-	@ ./bin/uxn11 bin/polycat.rom
 9+	@ ./bin/uxn11 bin/screen.bounds.rom
10 test: bin/uxnasm bin/uxncli bin/uxn11
11 	@ ./bin/uxnasm && ./bin/uxncli && ./bin/uxn11 && ./bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v
12 	@ ./bin/uxnasm etc/opctest.tal bin/opctest.rom