diff --git a/gui/notepad/build.sh b/gui/notepad/build.sh new file mode 100755 index 0000000..5278fb2 --- /dev/null +++ b/gui/notepad/build.sh @@ -0,0 +1,27 @@ +#!/bin/sh -e + +ASM="uxncli $HOME/roms/drifblim.rom" +EMU="uxnemu" +LIN="uxncli $HOME/roms/uxnlin.rom" + +ID="notepad" +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 + diff --git a/gui/notepad/cursor.tga b/gui/notepad/cursor.tga new file mode 100644 index 0000000..18b36bf Binary files /dev/null and b/gui/notepad/cursor.tga differ diff --git a/gui/notepad/cursor01x02.icn b/gui/notepad/cursor01x02.icn new file mode 100644 index 0000000..7320d70 Binary files /dev/null and b/gui/notepad/cursor01x02.icn differ diff --git a/gui/notepad/head.tga b/gui/notepad/head.tga new file mode 100644 index 0000000..73af8b1 Binary files /dev/null and b/gui/notepad/head.tga differ diff --git a/gui/notepad/head08x02.icn b/gui/notepad/head08x02.icn new file mode 100644 index 0000000..85b9314 Binary files /dev/null and b/gui/notepad/head08x02.icn differ diff --git a/gui/notepad/head09x02.icn b/gui/notepad/head09x02.icn new file mode 100644 index 0000000..0ffb829 Binary files /dev/null and b/gui/notepad/head09x02.icn differ diff --git a/gui/notepad/head0ax02.icn b/gui/notepad/head0ax02.icn new file mode 100644 index 0000000..62cd1b2 Binary files /dev/null and b/gui/notepad/head0ax02.icn differ diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal new file mode 100644 index 0000000..26226de --- /dev/null +++ b/gui/notepad/notepad.tal @@ -0,0 +1,111 @@ +|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 + +|0100 + + ( theme ) + #f00f .System/r DEO2 + #f00f .System/g DEO2 + #f00f .System/b DEO2 + ( size ) + #00e0 .Screen/width DEO2 + #00f4 .Screen/height DEO2 + ( unlock ) + ;on-console .Console/vector DEO2 + ;on-mouse .Mouse/vector DEO2 + + draw-header + +BRK + +@on-console ( -> ) + +BRK + +@on-mouse ( -> ) + +BRK + +( +@|drawing ) + +@draw-header ( -- ) + + #0000 + DUP2 .Screen/x DEO2 + .Screen/y DEO2 + ( a ) + #15 .Screen/auto DEO + ;bar-icn/a .Screen/addr DEO2 + #01 .Screen/sprite DEO + ( close ) + ;close-icn/default .Screen/addr DEO2 + #01 .Screen/sprite DEOk DEO + ( lead ) + #e9 &l + ;bar-icn/b .Screen/addr DEO2 + #01 .Screen/sprite DEO + INC DUP ?&l + POP + ;bar-icn/b .Screen/addr DEO2 + #01 .Screen/sprite DEOk DEO + ( title ) + #004b .Screen/x DEO2 + #86 .Screen/auto DEO + ;title-icn .Screen/addr DEO2 + #01 .Screen/sprite DEOk DEO + ( line ) + #d2 .Screen/auto DEO + #0000 .Screen/x DEO2 + #0010 .Screen/y DEO2 + ;line-icn .Screen/addr DEO2 + #01 .Screen/sprite DEO + #0070 .Screen/x DEO2 + #0010 .Screen/y DEO2 + #01 .Screen/sprite DEO + +JMP2r + +( +@|assets ) + +@bar-icn + &a [ + 0000 007e 007e 007e 007e 007e 007e 0000 ] + &b [ + 0000 00ff 00ff 00ff 00ff 00ff 00ff 0000 ] + &c [ + 0000 00fe 00fe 00fe 00fe 00fe 00fe 0000 ] +@close-icn + &default [ + 0000 00ff 8080 8080 8080 8080 80ff 0000 + 0000 00ef 202f 202f 202f 202f 20ef 0000 ] + &active [ + 0000 00ff 84a4 9580 f180 95a4 84ff 0000 + 0000 00ef 20af 202f e02f 20af 20ef 0000 ] +@title-icn [ + 0000 0080 0080 0080 0000 0000 82c2 e2f2 + 0000 0000 0000 3c66 0000 0000 3030 7831 + 0000 0000 0000 f098 0000 0000 1f19 1919 + 0000 0000 0080 8f91 0000 0000 0101 0f99 + 0000 0000 8080 8080 0080 0080 0080 0000 + ba9e 8e86 8200 0000 6666 6666 3c00 0000 + 3131 3131 1800 0000 98f8 8088 f000 0000 + 1f18 1818 1800 0000 0f19 1919 0f00 0000 + 9999 9999 8f00 0000 8080 8080 8000 0000 ] +@page-icn [ + 00ff 4020 1008 0402 00ff 0000 0000 0000 + 00ff 0101 0101 0101 0100 0000 0000 0000 + 0080 4020 1008 0402 0101 0101 0101 0101 + 0000 0000 0000 0000 0100 0000 0000 0000 + 0181 4121 1109 0503 0000 ff00 ff00 ffff + 0000 ff00 ff00 ffff 0100 ff00 ff00 ffff ] + &bottom [ + ff00 ff00 ff00 ffff ] +@line-icn [ + 00ff 0000 0000 0000 ] + diff --git a/gui/notepad/untitled10x10.chr b/gui/notepad/untitled10x10.chr new file mode 100644 index 0000000..3169273 Binary files /dev/null and b/gui/notepad/untitled10x10.chr differ