More precise seconds

This commit is contained in:
Devine Lu Linvega 2024-07-24 12:33:30 -07:00
parent 48be8013cd
commit c530e8a3be
1 changed files with 17 additions and 18 deletions

View File

@ -17,9 +17,9 @@
( | meta )
;meta #06 DEO2
( | theme )
#b0ff .System/r DEO2
#f0df .System/g DEO2
#c0bf .System/b DEO2
#b0f7 .System/r DEO2
#f0fc .System/g DEO2
#c0f8 .System/b DEO2
( | vector )
;on-frame .Screen/vector DEO2
;on-mouse .Mouse/vector DEO2
@ -47,8 +47,8 @@
.Mouse/state DEI ?{ BRK }
( | down )
<freeze-timer>
.Mouse/ylb DEI #10 SUB DUP #f0 GTH ?{ #00 OVR <set-distance> }
POP BRK
.Mouse/y DEI2 #0010 SUB2 DUP2 #00f0 GTH2 ?{ DUP2 <set-height> }
POP2 BRK
@meta 00
( name ) "Tea 20 "Timer 0a
@ -65,16 +65,15 @@
#c0 ;on-frame-freeze/lock STA
JMP2r
@<set-seconds> ( seconds* -- )
DUP2 .remaining-seconds STZ2
#0007 DIV2 .height STZ2
JMP2r
@<set-height> ( distance* -- )
#22 SFT2 #00f0 SWP2 SUB2 #02 SFT2 #001e MUL2
( >> )
@<set-distance> ( distance* -- )
DUP2 .height EQU2k ?{
STZ2
#0007 MUL2 .remaining-seconds STZ2 !<redraw-bar> }
POP2 POP2 JMP2r
@<set-seconds> ( seconds* -- )
DUP2 .remaining-seconds LDZ2 EQU2 ?{
DUP2 .remaining-seconds STZ2
#0007 DIV2 .height STZ2 !<redraw-bar> }
POP2 JMP2r
(
@|drawing )
@ -86,13 +85,13 @@
[ LIT2 f1 -Screen/auto ] DEO
#0030 .Screen/x DEO2
#0010 .Screen/y DEO2
[ LIT2r 05 -Screen/sprite ] DEOkr
[ LIT2r 0f -Screen/sprite ] DEOkr
[ LIT2 d1 -Screen/auto ] DEO
#0030 .Screen/x DEO2
#0090 .Screen/y DEO2
DEOr
( | labels )
#0038 .Screen/x DEO2
#003a .Screen/x DEO2
#000c .Screen/y DEO2
[ LIT2 02 -Screen/auto ] DEO
[ LIT2r =label-tilemap ] #1f00
@ -102,7 +101,7 @@
INC GTHk ?&>l
POP2
( | labels, cont )
#0040 .Screen/x DEO2
#0042 .Screen/x DEO2
#000c .Screen/y DEO2
#1f00
&>ll ( -- )
@ -130,7 +129,7 @@
( | all )
[ LIT2 32 -Screen/auto ] DEO
;line-icn .Screen/addr DEO2
[ LIT2r 05 -Screen/sprite ] .height LDZ2 #0010 ADD2 #0010
[ LIT2r 0a -Screen/sprite ] .height LDZ2 #0010 ADD2 #0010
&>l ( -- )
DUP2 .Screen/y DEO2
DEOkr