munin/munin.tal

128 lines
3.3 KiB
Tal
Raw Normal View History

2024-01-05 22:15:05 -05:00
|00 @System [
&vect $2 &expansion $2 &title $2 &metadata $2
&r $2 &g $2 &b $2 ]
|10 @Console [
&vect $2 &stdin $1 &pad1 $4 &type $1
&stdout $1 &stderr $1 &proc-put $1 &pad2 $1 &param $2 &opts $1 &host-put $1 ]
|20 @Screen [
&vect $2 &w $2 &h $2 &auto $1 &pad $1
&x $2 &y $2 &addr $2 &px $1 &sprite $1 ]
|80 @Controller [
&vect $2 &button $1 &key $1 &fn $1 ]
|90 @Mouse [
&vect $2 &x $2 &y $2 &state $1 &pad1 $1
&pad2 $2 &scrollx $2 &scrolly $2 &pad3 $2 ]
( |a0 @File1 [ )
( &vect $2 &ok $2 &stat $2 &del $1 &append $1 )
( &name $2 &len $2 &r $2 &w $2 ] )
( |b0 @File2 [ )
( &vect $2 &ok $2 &stat $2 &del $1 &append $1 )
( &name $2 &len $2 &r $2 &w $2 ] )
|0000
@cur-x $2
@cur-y $2
|0100
#17ef .System/r DEO2
#229e .System/g DEO2
#406e .System/b DEO2
;on-screen .Screen/vect DEO2
;on-mouse .Mouse/vect DEO2
;on-controller .Controller/vect DEO2
#0140 .Screen/w DEO2 #0100 .Screen/h DEO2 draw-ui
BRK
@draw-cursor ( tile* -> )
.Screen/addr DEO2
.cur-x LDZ2 .Screen/x DEO2
.cur-y LDZ2 .Screen/y DEO2
#c3 .Screen/sprite DEO JMP2r
@draw-str ( s* attr^ -> )
STH
&loop LDAk DUP ?{ POPr POP POP2 JMP2r }
#00 SWP #40 SFT2 ;tiles ADD2 .Screen/addr DEO2
STHkr .Screen/sprite DEO INC2 !&loop
@draw-ui ( -> )
#01 .Screen/auto DEO
#0000 #0000 goto
;tiles/nw load #81 .Screen/sprite DEO
;tiles/horiz load #0020 #81 draw-n
;tiles/ne load #81 .Screen/sprite DEO
#02 .Screen/auto DEO
;tiles/vert .Screen/addr DEO2
#0108 #0008 goto #0018 #81 draw-n
#0000 #0008 goto #0018 #81 draw-n
#01 .Screen/auto DEO
;tiles/sw load #81 .Screen/sprite DEO
;tiles/horiz load #0020 #81 draw-n
;tiles/se load #81 .Screen/sprite DEO
#01 .Screen/auto DEO
#0008 #0008 goto ;tiles/str2 ;tiles/lit-lock ;demo/RadioX draw-listing
#0008 #0008 goto ;tiles/str2 ;tiles/lit-lock ;demo/RadioX draw-listing
#0008 #0010 goto ;tiles/str2 ;tiles/lit-lock ;demo/interzone draw-listing
#0008 #0018 goto ;tiles/str1 ;tiles/dark-lock ;demo/bee_happy_ draw-listing
#0008 #0020 goto ;tiles/str1 ;tiles/lit-lock ;demo/DuckHunt draw-listing
#0008 #0028 goto ;tiles/str1 ;tiles/lit-lock ;demo/LINKSYS6672 draw-listing
#0008 #0030 goto ;tiles/str0 ;tiles/space ;demo/Public draw-listing
#0008 #0038 goto ;tiles/str0 ;tiles/space ;demo/Q-bert draw-listing
#0008 #0040 goto ;tiles/str0 ;tiles/dark-lock ;demo/xyzzy draw-listing
JMP2r
@draw-listing ( str* lock* name* -> )
( #01 .Screen/auto DEO ) STH2 STH2
#81 draw-tile STH2r #81 draw-tile STH2r #82 !draw-str
@demo
&RadioX "RadioX 00
&interzone "interzone 00
&bee_happy_ "bee_happy_ 00
&DuckHunt "DuckHunt 00
&LINKSYS6672 "LINKSYS6672 00
&Public "Public 00
&Q-bert "Q-bert 00
&xyzzy "xyzzy 00
@load ( tile* -> )
.Screen/addr DEO2 JMP2r
@goto ( x* y* -> )
.Screen/y DEO2 .Screen/x DEO2 JMP2r
@draw-tile ( tile* attr^ -> )
STH .Screen/addr DEO2 STHr .Screen/sprite DEO JMP2r
@on-screen ( -> BRK )
BRK
@on-mouse ( -> BRK )
;tiles/space draw-cursor
.Mouse/x DEI2 .cur-x STZ2
.Mouse/y DEI2 .cur-y STZ2
;tiles/cursor draw-cursor BRK
@on-controller ( -> BRK )
BRK
@draw-n ( n* attr^ -> )
STH #0000 SWP2 SUB2
&loop STHkr .Screen/sprite DEO INC2 ORAk ?&loop
POPr POP2 JMP2r
@tiles ~tiles.tal