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