uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 3dec3e12645627d446f095833596a3e8e5572dd8
parent f3bf1a74db17151610327c134f6241b07bff7fb0
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Wed,  7 Apr 2021 22:12:10 +0100

Name things consistent with documentation

Diffstat:
Mprojects/examples/blank.usm | 1+
Mprojects/examples/dev.time.usm | 26+++++++++++++-------------
Mprojects/software/neralie.usm | 6+++---
3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/projects/examples/blank.usm b/projects/examples/blank.usm @@ -12,6 +12,7 @@ |0150 ;Mouse { x 2 y 2 state 1 chord 1 } |0160 ;File { pad 8 name 2 length 2 load 2 save 2 } |0180 ;Audio { wave 2 envelope 2 pad 4 volume 1 pitch 1 play 1 value 2 delay 2 finish 1 } +|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 } |01F0 ;System { pad 8 r 2 g 2 b 2 } ( vectors ) diff --git a/projects/examples/dev.time.usm b/projects/examples/dev.time.usm @@ -17,7 +17,7 @@ |0100 ;System { vector 2 pad 6 r 2 g 2 b 2 } |0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 } |0130 ;Sprite { vector 2 pad 6 x 2 y 2 addr 2 color 1 } -|01a0 ;Time { year 2 month 1 day 1 hour 1 minute 1 second 1 dow 1 doy 2 isdst 1 get 1 } +|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 } ( program ) @@ -30,11 +30,11 @@ BRK @FRAME - #00 =Time.get + #00 =DateTime.refresh ( only draw once per second ) - ~Time.second ~current.second NEQ #01 JNZ BRK - ~Time.second =current.second + ~DateTime.second ~current.second NEQ #01 JNZ BRK + ~DateTime.second =current.second ( clear ) #0080 SCALEX #0080 SCALEY ~needles.sx ~needles.sy #00 ,draw-line JSR2 @@ -42,13 +42,13 @@ BRK #0080 SCALEX #0080 SCALEY ~needles.hx ~needles.hy #00 ,draw-line JSR2 ( place ) - #00 ~Time.second #0002 MUL2 ,table ADD2 LDR2 + #00 ~DateTime.second #0002 MUL2 ,table ADD2 LDR2 #00 SWP SCALEY =needles.sy #00 SWP SCALEX =needles.sx - #00 ~Time.minute #0002 MUL2 ,table ADD2 LDR2 + #00 ~DateTime.minute #0002 MUL2 ,table ADD2 LDR2 #00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEY =needles.my #00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEX =needles.mx - #00 ~Time.hour 12HOURS #05 MUL #0002 MUL2 ,table ADD2 LDR2 + #00 ~DateTime.hour 12HOURS #05 MUL #0002 MUL2 ,table ADD2 LDR2 #00 SWP #0002 DIV2 #0040 ADD2 SCALEY =needles.hy #00 SWP #0002 DIV2 #0040 ADD2 SCALEX =needles.hx @@ -72,22 +72,22 @@ BRK ~Screen.height #0002 DIV2 #0048 ADD2 =Sprite.y ~Screen.width #0002 DIV2 DUP2 #0020 SUB2 =Sprite.x - ,font_hex #00 ~Time.hour #0a DIV #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.hour #0a DIV #08 MUL ADD2 =Sprite.addr #02 =Sprite.color DUP2 #0018 SUB2 =Sprite.x - ,font_hex #00 ~Time.hour #0a MOD #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.hour #0a MOD #08 MUL ADD2 =Sprite.addr #02 =Sprite.color DUP2 #0008 SUB2 =Sprite.x - ,font_hex #00 ~Time.minute #0a DIV #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.minute #0a DIV #08 MUL ADD2 =Sprite.addr #02 =Sprite.color DUP2 =Sprite.x - ,font_hex #00 ~Time.minute #0a MOD #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.minute #0a MOD #08 MUL ADD2 =Sprite.addr #02 =Sprite.color DUP2 #0010 ADD2 =Sprite.x - ,font_hex #00 ~Time.second #0a DIV #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.second #0a DIV #08 MUL ADD2 =Sprite.addr #02 =Sprite.color DUP2 #0018 ADD2 =Sprite.x - ,font_hex #00 ~Time.second #0a MOD #08 MUL ADD2 =Sprite.addr + ,font_hex #00 ~DateTime.second #0a MOD #08 MUL ADD2 =Sprite.addr #02 =Sprite.color POP2 diff --git a/projects/software/neralie.usm b/projects/software/neralie.usm @@ -15,7 +15,7 @@ |0110 ;Console { pad 8 char 1 byte 1 short 2 } |0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 } |0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 } -|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dow 1 doy 2 isdst 1 pad 4 get 1 } +|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 pad 4 refresh 1 } ( program ) @@ -81,7 +81,7 @@ ~DateTime.year #07d6 SUB2 #000a ,modf JSR2 ,digit JSR2 ,digit JSR2 - ~DateTime.doy + ~DateTime.doty #000e ,modf JSR2 ^letter JSR #000a ,modf JSR2 ^digit JSR ^digit JSR @@ -185,7 +185,7 @@ ^$loop JMP @update-fps ( -- ) - #00 =DateTime.get + #00 =DateTime.refresh ~fps.next #01 ADD =fps.next ~DateTime.second ~fps.second NEQ JMP JMP2r ~DateTime.second =fps.second