(sliderule) Init
This commit is contained in:
parent
25b9639a36
commit
bc011d4e09
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
ID="sliderule"
|
||||
ASM="uxncli $HOME/roms/drifblim.rom"
|
||||
EMU="uxnemu"
|
||||
LIN="uxncli $HOME/roms/uxnlin.rom"
|
||||
SRC="${ID}.tal"
|
||||
DST="${ID}.rom"
|
||||
CPY="$HOME/roms"
|
||||
ARG=""
|
||||
|
||||
if [[ "$*" == *"--lint"* ]]
|
||||
then
|
||||
$LIN $SRC
|
||||
fi
|
||||
|
||||
$ASM $SRC $DST
|
||||
|
||||
if [[ "$*" == *"--save"* ]]
|
||||
then
|
||||
cp $DST $CPY
|
||||
fi
|
||||
|
||||
$EMU $DST $ARG
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
( uxnemu sliderule.rom )
|
||||
|
||||
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|
||||
|10 @Console &vector $2 &read $1 &pad $5 &write $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 &chord $1
|
||||
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||
|
||||
|0000
|
||||
|
||||
@cursor &x $2 &y $2
|
||||
@rods $a $1
|
||||
|
||||
|0100
|
||||
|
||||
@on-reset ( -> )
|
||||
( | theme )
|
||||
#a10f .System/r DEO2
|
||||
#a00f .System/g DEO2
|
||||
#a00f .System/b DEO2
|
||||
load-theme
|
||||
( | size )
|
||||
#0148 .Screen/width DEO2
|
||||
#0078 .Screen/height DEO2
|
||||
( | unlock )
|
||||
;on-mouse .Mouse/vector DEO2
|
||||
<redraw>
|
||||
BRK
|
||||
|
||||
(
|
||||
@|vectors )
|
||||
|
||||
@on-mouse ( -> )
|
||||
BRK
|
||||
|
||||
(
|
||||
@|core )
|
||||
|
||||
(
|
||||
@|drawing )
|
||||
|
||||
@<redraw> ( -- )
|
||||
<draw-sliderule>
|
||||
JMP2r
|
||||
|
||||
@<draw-sliderule> ( -- )
|
||||
#0020 .Screen/x DEO2
|
||||
#0020 .Screen/y DEO2
|
||||
( | cap )
|
||||
#25 .Screen/auto DEO
|
||||
;cap-chr .Screen/addr DEO2
|
||||
#85 .Screen/sprite DEO
|
||||
<draw-rule>
|
||||
<draw-rule>
|
||||
<draw-rule>
|
||||
JMP2r
|
||||
|
||||
@<draw-rule> ( -- )
|
||||
#2300
|
||||
&l ( -- )
|
||||
( | bg )
|
||||
#06 .Screen/auto DEO
|
||||
;bg-chr .Screen/addr DEO2
|
||||
[ LIT2 85 -Screen/sprite ] DEOk DEO
|
||||
|
||||
( | scale )
|
||||
#05 .Screen/auto DEO
|
||||
#00 OVR #40 SFT2 ;rule-chr ADD2 .Screen/addr DEO2
|
||||
[ LIT2 85 -Screen/sprite ] DEO
|
||||
( adjust ) .Screen/y DEI2k #0010 SUB2 ROT DEO2
|
||||
INC GTHk ?&l
|
||||
POP2
|
||||
( adjust ) .Screen/x DEI2k #0005 SUB2 ROT DEO2
|
||||
JMP2r
|
||||
|
||||
(
|
||||
@|utils )
|
||||
|
||||
@load-theme ( -- )
|
||||
;&path .File/name DEO2
|
||||
#0002 .File/length DEO2
|
||||
;&r .File/read DEO2
|
||||
;&g .File/read DEO2
|
||||
;&b .File/read DEO2
|
||||
.File/success DEI2 ORA #01 JCN
|
||||
JMP2r
|
||||
LIT2 &r $2
|
||||
.System/r DEO2
|
||||
LIT2 &g $2
|
||||
.System/g DEO2
|
||||
LIT2 &b $2
|
||||
.System/b DEO2
|
||||
JMP2r
|
||||
&path ".theme $1
|
||||
|
||||
(
|
||||
@|spritesheet )
|
||||
|
||||
@cursor-icn
|
||||
[ 80c0 e0f0 f8e0 1000 ]
|
||||
|
||||
@num-icn
|
||||
[
|
||||
3c66 6e76 6666 3c00 1838 1818 1818 7e00
|
||||
3c66 060c 1830 7e00 7e0c 180c 0666 3c00
|
||||
0c1c 3c6c 7e0c 0c00 7e60 7c06 0666 3c00
|
||||
3c60 607c 6666 3c00 7e06 0c18 3030 3000
|
||||
3c66 663c 6666 3c00 3c66 663e 060c 3800 ]
|
||||
|
||||
@bg-chr
|
||||
[
|
||||
00ff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff ]
|
||||
|
||||
@cap-chr
|
||||
[
|
||||
003f 7f7f 7f7f 7f7f 3f7f ffff ffff ffff
|
||||
7f7f 7f7f 7f7f 7f7f ffff ffff ffff ffff
|
||||
7f7f 7f7f 7f7f 3f00 ffff ffff ffff 7f3f ]
|
||||
|
||||
@rule-chr
|
||||
[
|
||||
7f7f 7f7f 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff fefe b6b6 ff00 ffff ffff ffff ffff
|
||||
ffff ffff dbdb ff00 ffff ffff ffff ffff
|
||||
fdfd fdfd 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff ffff b6b6 ff00 ffff ffff ffff ffff
|
||||
ffff fbfb dbdb ff00 ffff ffff ffff ffff
|
||||
ffff ffff 6d6d ff00 ffff ffff ffff ffff
|
||||
efef efef adad ff00 ffff ffff ffff ffff
|
||||
ffff ffff b6b6 ff00 ffff ffff ffff ffff
|
||||
ffff dfdf dbdb ff00 ffff ffff ffff ffff
|
||||
fefe fefe 6a6a ff00 ffff ffff ffff ffff
|
||||
ffff ffff dbdb ff00 ffff ffff ffff ffff
|
||||
ffff fdfd 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff ffff b5b5 ff00 ffff ffff ffff ffff
|
||||
dfdf dfdf 5b5b ff00 ffff ffff ffff ffff
|
||||
ffff ffff 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff bfbf b5b5 ff00 ffff ffff ffff ffff
|
||||
f7f7 f7f7 5656 ff00 ffff ffff ffff ffff
|
||||
ffff ffff dbdb ff00 ffff ffff ffff ffff
|
||||
ffff efef 6a6a ff00 ffff ffff ffff ffff
|
||||
fbfb fbfb abab ff00 ffff ffff ffff ffff
|
||||
ffff ffff 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff efef aaaa ff00 ffff ffff ffff ffff
|
||||
fbfb fbfb abab ff00 ffff ffff ffff ffff
|
||||
ffff ffff 6d6d ff00 ffff ffff ffff ffff
|
||||
ffff dfdf 5555 ff00 ffff ffff ffff ffff
|
||||
f7f7 f7f7 5656 ff00 ffff ffff ffff ffff
|
||||
ffff ffff d5d5 ff00 ffff ffff ffff ffff
|
||||
ffff 7f7f 5555 ff00 ffff ffff ffff ffff
|
||||
dfdf dfdf 5a5a ff00 ffff ffff ffff ffff
|
||||
ffff fbfb aaaa ff00 ffff ffff ffff ffff
|
||||
fefe fefe aaaa ff00 ffff ffff ffff ffff
|
||||
ffff ffff aaaa ff00 ffff ffff ffff ffff
|
||||
ffff bfbf aaaa ff00 ffff ffff ffff ffff
|
||||
e0e0 e0e0 a0a0 f000 f0f0 f0f0 f0f0 f0f0 ]
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue