( Bifurcan ) |00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |90 @Mouse &vector $2 &x $2 &y $2 &state $1 &wheel $1 |c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 |80 @Controller &vector $2 &button $1 &key $1 |000 @style $1 @center/x $2 &y $2 |100 @on-reset ( -> ) ( | theme ) #0f3a .System/r DEO2 #0fda .System/g DEO2 #0faa .System/b DEO2 ( | vectors ) ;on-frame .Screen/vector DEO2 ;on-mouse .Mouse/vector DEO2 ;on-button .Controller/vector DEO2 ( | find center ) .Screen/width DEI2 #01 SFT2 #33 SFT2 .center/x STZ2 .Screen/height DEI2 #01 SFT2 #33 SFT2 .center/y STZ2 ( | background ) ;tiles BRK @on-frame ( -> ) [ LIT2 &last $1 -DateTime/second ] DEI NEQk ?{ } ,&last STR POP BRK @on-mouse ( -> ) .Mouse/state DEI ?{ BRK } [ LIT2 00 -Mouse/state ] DEO BRK @on-button ( -> ) .Controller/button DEI ?{ BRK } [ LIT2 00 -Controller/button ] DEO BRK @ ( -- ) .style LDZ INC #03 DIVk MUL SUB .style STZ ;tiles [ LIT2 00 -style ] LDZ #40 SFT ADD2 ( >> ) @ ( -- ) .center/x LDZ2 [ LITr -center/y ] LDZ2r ( | hrs ) DUP2 #0018 SUB2 STH2kr #0048 SUB2 .DateTime/hour DEI #0a DIV DUP2 #0008 ADD2 STH2kr #0048 SUB2 .DateTime/hour DEI ( | min ) DUP2 #0018 SUB2 STH2kr #0018 SUB2 .DateTime/minute DEI #0a DIV DUP2 #0008 ADD2 STH2kr #0018 SUB2 .DateTime/minute DEI ( | sec ) DUP2 #0018 SUB2 STH2kr #0018 ADD2 .DateTime/second DEI #0a DIV #0008 ADD2 STH2r #0018 ADD2 .DateTime/second DEI ( >> ) @ ( x* y* n -- ) #0a DIVk MUL SUB ,&digit STR ,&y STR2 ,&x STR2 [ LIT2 00 -Screen/auto ] DEO #0f00 [ LIT2r 01 -Screen/sprite ] &>loop ( save-x ) DUP #03 DIVk MUL SUB #00 SWP #30 SFT2 [ LIT2 &x $2 ] ADD2 .Screen/x DEO2 ( save-y ) DUP #03 DIV #00 SWP #30 SFT2 [ LIT2 &y $2 ] ADD2 .Screen/y DEO2 ( get digit* ) DUP [ LIT &digit $1 ] DUP ADD #00 SWP ;digits ADD2 LDA2 ( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2 ( set tile ) #30 SFT2 ;tiles ADD2 ( set style ) .style LDZ #40 SFT #00 SWP ADD2 .Screen/addr DEO2 ( draw ) DEOkr INC GTHk ?&>loop POP2 POP2r JMP2r @ ( addr* -- ) .Screen/addr DEO2 [ LIT2r 01 -Screen/sprite ] [ LIT2 01 -Screen/auto ] DEO #0000 .Screen/y DEO2 .Screen/width DEI2 #03 SFT2 SUB .Screen/height DEI2 #03 SFT2 SUB &>ver #0000 .Screen/x DEO2 OVR &>hor DEOkr INC DUP ?&>hor POP .Screen/y DEI2k #0008 ADD2 ROT DEO2 INC DUP ?&>ver POP2 POP2r JMP2r ( @|assets ) @digits [ 7b6f 2492 73e7 73cf 5bc9 79cf 49ef 7249 7bef 7bc9 ] @tiles [ 0102 0408 1020 4080 8040 2010 0804 0201 0718 2040 4080 8080 0101 0102 0204 18e0 0808 0810 e304 0808 0808 0804 e310 0808 ]