Reconnected frame vector

This commit is contained in:
Devine Lu Linvega 2024-07-24 12:00:19 -07:00
parent 8a9bb7565a
commit e224acb8a6
1 changed files with 19 additions and 14 deletions

View File

@ -8,8 +8,6 @@
|000
@cursor &x $2 &y $2
@bar &height $1
@remaining-seconds $2
@last-second $1
@height $2
@ -29,27 +27,29 @@
( | screen size )
#0148 .Screen/width DEO2
#0110 .Screen/height DEO2
.DateTime/second DEI .last-second STZ
<redraw>
BRK
@on-frame-freeze ( -> )
[ LIT &lock $1 ] INCk ,&lock STR
?{ ;on-frame .Screen/vector DEO2 }
BRK
@on-frame ( -> )
BRK
.Mouse/state DEI ?{
.remaining-seconds LDZ2 #0000 EQU2 ?{
.DateTime/second DEI DUP .last-second LDZ EQU ?{
.last-second STZ
.remaining-seconds LDZ2 #0001 SUB2 DUP2 .remaining-seconds STZ2
#0007 DIV2 NIP .bar/height STZ
<draw-bar>
JMP2r }
POP } }
BRK
.remaining-seconds LDZ2 ORAk ?{ POP2 BRK }
[ LIT2 40 &f $1 ] INCk ,&f STR
NEQ ?{
[ LIT2 00 _&f ] STR
DUP2 #0001 SUB2 DUP2 .remaining-seconds STZ2
#0007 DIV2 .height STZ2
<redraw-bar> }
POP2 BRK
@on-mouse ( -> )
#4100 [ LIT2 00 -Mouse/state ] DEI NEQ #30 SFT2 ;hand-icn ADD2 <update-cursor>
.Mouse/state DEI ?{ BRK }
( | down )
<freeze-timer>
.Mouse/ylb DEI #10 SUB DUP #f0 GTH ?{ #00 OVR <set-distance> }
POP BRK
@ -63,6 +63,11 @@
(
@|core )
@<freeze-timer> ( -- )
;on-frame-freeze .Screen/vector DEO2
#c0 ;on-frame-freeze/lock STA
JMP2r
@<set-distance> ( distance* -- )
DUP2 .height EQU2k ?{
STZ2