2024-07-24 13:40:14 -04:00
|
|
|
( teatimer )
|
|
|
|
|
|
|
|
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $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
|
2024-07-24 14:30:30 -04:00
|
|
|
|90 @Mouse &vector $2 &x $2 &y $1 &ylb $1 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1
|
2024-07-24 13:40:14 -04:00
|
|
|
|c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1
|
|
|
|
|
|
|
|
|000
|
2024-07-24 13:46:14 -04:00
|
|
|
|
2024-07-24 13:40:14 -04:00
|
|
|
@remaining-seconds $2
|
2024-07-24 14:30:30 -04:00
|
|
|
@height $2
|
2024-07-24 13:40:14 -04:00
|
|
|
|
2024-07-24 13:46:14 -04:00
|
|
|
|100
|
|
|
|
|
|
|
|
@on-reset ( -> )
|
2024-07-24 13:40:14 -04:00
|
|
|
( | meta )
|
|
|
|
;meta #06 DEO2
|
|
|
|
( | theme )
|
2024-07-24 15:33:30 -04:00
|
|
|
#b0f7 .System/r DEO2
|
|
|
|
#f0fc .System/g DEO2
|
|
|
|
#c0f8 .System/b DEO2
|
2024-07-24 13:40:14 -04:00
|
|
|
( | vector )
|
|
|
|
;on-frame .Screen/vector DEO2
|
|
|
|
;on-mouse .Mouse/vector DEO2
|
|
|
|
( | screen size )
|
2024-07-24 14:48:24 -04:00
|
|
|
#0148 .Screen/width DEO2
|
2024-07-24 14:30:30 -04:00
|
|
|
#0110 .Screen/height DEO2
|
|
|
|
<redraw>
|
2024-07-24 13:46:14 -04:00
|
|
|
BRK
|
2024-07-24 13:40:14 -04:00
|
|
|
|
2024-07-24 15:00:19 -04:00
|
|
|
@on-frame-freeze ( -> )
|
|
|
|
[ LIT &lock $1 ] INCk ,&lock STR
|
|
|
|
?{ ;on-frame .Screen/vector DEO2 }
|
2024-07-24 13:40:14 -04:00
|
|
|
BRK
|
|
|
|
|
2024-07-24 15:00:19 -04:00
|
|
|
@on-frame ( -> )
|
|
|
|
.remaining-seconds LDZ2 ORAk ?{ POP2 BRK }
|
|
|
|
[ LIT2 40 &f $1 ] INCk ,&f STR
|
|
|
|
NEQ ?{
|
|
|
|
[ LIT2 00 _&f ] STR
|
2024-07-24 15:02:59 -04:00
|
|
|
DUP2 #0001 SUB2 <set-seconds> }
|
2024-07-24 15:00:19 -04:00
|
|
|
POP2 BRK
|
|
|
|
|
2024-07-24 13:40:14 -04:00
|
|
|
@on-mouse ( -> )
|
2024-07-24 14:30:30 -04:00
|
|
|
#4100 [ LIT2 00 -Mouse/state ] DEI NEQ #30 SFT2 ;hand-icn ADD2 <update-cursor>
|
|
|
|
.Mouse/state DEI ?{ BRK }
|
|
|
|
( | down )
|
2024-07-24 15:00:19 -04:00
|
|
|
<freeze-timer>
|
2024-07-24 15:33:30 -04:00
|
|
|
.Mouse/y DEI2 #0010 SUB2 DUP2 #00f0 GTH2 ?{ DUP2 <set-height> }
|
|
|
|
POP2 BRK
|
2024-07-24 13:40:14 -04:00
|
|
|
|
2024-07-24 13:46:14 -04:00
|
|
|
@meta 00
|
|
|
|
( name ) "Tea 20 "Timer 0a
|
|
|
|
( details ) "Null
|
|
|
|
( author ) "By 20 "Dave 20 "Van 20 "Ee 0a
|
|
|
|
( date ) "12 20 "Jan 20 "2024 $1
|
|
|
|
( elements ) 00
|
2024-07-24 13:40:14 -04:00
|
|
|
|
2024-07-24 14:30:30 -04:00
|
|
|
(
|
|
|
|
@|core )
|
|
|
|
|
2024-07-24 15:00:19 -04:00
|
|
|
@<freeze-timer> ( -- )
|
|
|
|
;on-frame-freeze .Screen/vector DEO2
|
|
|
|
#c0 ;on-frame-freeze/lock STA
|
|
|
|
JMP2r
|
|
|
|
|
2024-07-24 15:33:30 -04:00
|
|
|
@<set-height> ( distance* -- )
|
|
|
|
#22 SFT2 #00f0 SWP2 SUB2 #02 SFT2 #001e MUL2
|
|
|
|
( >> )
|
2024-07-24 15:02:59 -04:00
|
|
|
|
2024-07-24 15:33:30 -04:00
|
|
|
@<set-seconds> ( seconds* -- )
|
|
|
|
DUP2 .remaining-seconds LDZ2 EQU2 ?{
|
|
|
|
DUP2 .remaining-seconds STZ2
|
|
|
|
#0007 DIV2 .height STZ2 !<redraw-bar> }
|
|
|
|
POP2 JMP2r
|
2024-07-24 14:30:30 -04:00
|
|
|
|
2024-07-24 13:40:14 -04:00
|
|
|
(
|
|
|
|
@|drawing )
|
2024-07-24 13:46:14 -04:00
|
|
|
|
2024-07-24 14:30:30 -04:00
|
|
|
@<redraw> ( -- )
|
2024-07-24 14:48:24 -04:00
|
|
|
<redraw-bar>
|
|
|
|
( | markers )
|
|
|
|
;tick-icn .Screen/addr DEO2
|
|
|
|
[ LIT2 f1 -Screen/auto ] DEO
|
|
|
|
#0030 .Screen/x DEO2
|
|
|
|
#0010 .Screen/y DEO2
|
2024-07-24 15:33:30 -04:00
|
|
|
[ LIT2r 0f -Screen/sprite ] DEOkr
|
2024-07-24 14:48:24 -04:00
|
|
|
[ LIT2 d1 -Screen/auto ] DEO
|
|
|
|
#0030 .Screen/x DEO2
|
|
|
|
#0090 .Screen/y DEO2
|
|
|
|
DEOr
|
|
|
|
( | labels )
|
2024-07-24 15:33:30 -04:00
|
|
|
#003a .Screen/x DEO2
|
2024-07-24 14:48:24 -04:00
|
|
|
#000c .Screen/y DEO2
|
|
|
|
[ LIT2 02 -Screen/auto ] DEO
|
|
|
|
[ LIT2r =label-tilemap ] #1f00
|
2024-07-24 15:02:59 -04:00
|
|
|
&>l ( -- )
|
2024-07-24 14:48:24 -04:00
|
|
|
LDAkr #00 STHr INC2r ;digits ADD2 .Screen/addr DEO2
|
|
|
|
[ LIT2 05 -Screen/sprite ] DEO
|
2024-07-24 15:02:59 -04:00
|
|
|
INC GTHk ?&>l
|
2024-07-24 14:48:24 -04:00
|
|
|
POP2
|
|
|
|
( | labels, cont )
|
2024-07-24 15:33:30 -04:00
|
|
|
#0042 .Screen/x DEO2
|
2024-07-24 14:48:24 -04:00
|
|
|
#000c .Screen/y DEO2
|
|
|
|
#1f00
|
2024-07-24 15:02:59 -04:00
|
|
|
&>ll ( -- )
|
2024-07-24 14:48:24 -04:00
|
|
|
LDAkr #00 STHr INC2r ;digits ADD2 .Screen/addr DEO2
|
|
|
|
[ LIT2 05 -Screen/sprite ] DEO
|
2024-07-24 15:02:59 -04:00
|
|
|
INC GTHk ?&>ll
|
2024-07-24 14:48:24 -04:00
|
|
|
POP2 POP2r JMP2r
|
2024-07-24 14:30:30 -04:00
|
|
|
|
|
|
|
@<redraw-bar> ( -- )
|
2024-07-24 13:40:14 -04:00
|
|
|
;fill-icn .Screen/addr DEO2
|
2024-07-24 14:30:30 -04:00
|
|
|
( | top )
|
|
|
|
#0010 .Screen/x DEO2
|
|
|
|
#0010 .Screen/y DEO2
|
|
|
|
[ LIT2 f1 -Screen/auto ] DEO
|
|
|
|
[ LIT2 03 -Screen/sprite ] DEOk DEOk DEOk DEO
|
|
|
|
( | bottom )
|
|
|
|
#0010 .Screen/x DEO2
|
|
|
|
#0090 .Screen/y DEO2
|
|
|
|
[ LIT2 d1 -Screen/auto ] DEO
|
|
|
|
[ LIT2 03 -Screen/sprite ] DEOk DEOk DEOk DEO
|
|
|
|
( >> )
|
|
|
|
|
|
|
|
@<draw-bar> ( -- )
|
|
|
|
#0010 .Screen/x DEO2
|
|
|
|
( | all )
|
|
|
|
[ LIT2 32 -Screen/auto ] DEO
|
|
|
|
;line-icn .Screen/addr DEO2
|
2024-07-24 15:33:30 -04:00
|
|
|
[ LIT2r 0a -Screen/sprite ] .height LDZ2 #0010 ADD2 #0010
|
2024-07-24 14:30:30 -04:00
|
|
|
&>l ( -- )
|
|
|
|
DUP2 .Screen/y DEO2
|
|
|
|
DEOkr
|
|
|
|
INC2 GTH2k ?&>l
|
|
|
|
POP2 POP2 POP2r JMP2r
|
2024-07-24 13:40:14 -04:00
|
|
|
|
2024-07-24 14:30:30 -04:00
|
|
|
@<update-cursor> ( color addr* -- )
|
|
|
|
[ LIT2 00 -Screen/auto ] DEO
|
|
|
|
;fill-icn .Screen/addr DEO2
|
|
|
|
#40 <draw-cursor>
|
|
|
|
.Screen/addr DEO2
|
|
|
|
.Mouse/x DEI2 ,<draw-cursor>/x STR2
|
|
|
|
.Mouse/y DEI2 ,<draw-cursor>/y STR2
|
|
|
|
( >> )
|
|
|
|
|
|
|
|
@<draw-cursor> ( color -- )
|
|
|
|
[ LIT2 &x $2 ] .Screen/x DEO2
|
|
|
|
[ LIT2 &y $2 ] .Screen/y DEO2
|
|
|
|
.Screen/sprite DEO
|
|
|
|
JMP2r
|
|
|
|
|
|
|
|
(
|
|
|
|
@|stdlib )
|
|
|
|
|
|
|
|
@<phex> ( short* -: )
|
|
|
|
SWP /b
|
|
|
|
&b ( byte -: )
|
|
|
|
DUP #04 SFT /c
|
|
|
|
&c ( byte -: )
|
|
|
|
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO
|
|
|
|
JMP2r
|
|
|
|
|
2024-07-24 13:40:14 -04:00
|
|
|
(
|
|
|
|
@|assets )
|
|
|
|
|
2024-07-24 14:30:30 -04:00
|
|
|
@hand-icn [ 4040 787c fcfc 7c38 ]
|
|
|
|
&down [ 0000 787c fcfc 7c38 ]
|
|
|
|
|
2024-07-24 14:41:26 -04:00
|
|
|
@tick-icn [ 7e00 0000 7000 0000 ]
|
2024-07-24 13:46:14 -04:00
|
|
|
|
|
|
|
@fill-icn [ ffff ffff ffff ffff ]
|
|
|
|
|
2024-07-24 14:30:30 -04:00
|
|
|
@line-icn [ ff00 0000 0000 0000 ]
|
|
|
|
|
2024-07-24 13:40:14 -04:00
|
|
|
@digits ( Emmaline by damieng )
|
2024-07-24 13:46:14 -04:00
|
|
|
[
|
|
|
|
0000 0000 0000 0000 3864 e2e2 e264 3800
|
|
|
|
0c3c 5c1c 1c1c 1c00 7c8e 8e1c 3870 fe00
|
|
|
|
fe8e 0c3c 8e8e 7c00 0c1c 3c5c 9cfe 1c00
|
|
|
|
3e40 7c0e 8e8e 7c00 3c62 e0ec e262 3c00
|
|
|
|
fe0e 0e1c 3870 7000 7ce2 f27c 9e8e 7c00
|
|
|
|
788c 8e6e 0e8c 7800 ]
|
|
|
|
|
|
|
|
@label-tilemap [
|
|
|
|
20 00 00 00 00 18 00 00 00 00 18 00 00 00 00 10
|
|
|
|
00 00 00 00 10 00 00 00 00 30 00 00 00 00 08 08
|
|
|
|
00 00 00 00 30 00 00 00 00 08 00 00 00 00 30 00
|
|
|
|
00 00 00 08 00 00 00 00 00 00 00 00 00 00 ]
|
|
|
|
|