DIM starx
(1000), stary
(1000) _TITLE "Starfield Clock - by SierraKen - Up and down arrow keys (or W and S keys) for speed. Space Bar switches back and forth to Full Screen. Esc to quit." circ = 360
'Clock
clock
circ = circ - .1
IF fullscreen
= 1 THEN fs
= .75: fs2
= 25 IF fullscreen
= 0 THEN fs
= 1: fs2
= 0 circx
= (SIN(circ
) * (240 - fs2
)) + 500 circy
= (COS(circ
) * (240 - fs2
)) / fs
+ 400 cx = circx: cy = circy: c = col
'Chimes
IF hou
> 12 THEN hou
= hou
- 12 'FOR chime = 1 TO hou
''PLAY "MB L6 P1 O1 G"
'NEXT chime
done = 1
'====================================== #Dav
chimeflag = 1 '<<< time to chime flag
chimetimer
= TIMER '<<< start a TIMER '===========================================
'========================================== #Dav
'plays soundfile chime, if chime flag on
'Check chimetimer & TIMER values.
'Play sound every 1 second, and
'keep count how many times played.
'play a chime
'add to the count
chime = chime + 1
'set a new timer spot
'If chime count reached, reset chimeflag & count
chime = 0
chimeflag = 0
'================================================
'Starfield
fillCircle cx, cy, 5, c
warp = (sp * 100) + 1
s = s + 1
'Set starting position.
x
= (SIN(st
) * startx
) + 500 y
= (COS(st
) * starty
) + 400 starx(s) = x
stary(s) = y
'Set direction to move.
dx(s) = ((x - 500) / 30)
dy(s) = ((y - 400) / 30)
'Set size.
'Set speed
speed(s) = .1
speed(t) = speed(t) * (1.05 + sp)
stary(t) = stary(t) + dy(t) * speed(t)
starx(t) = starx(t) + dx(t) * speed(t)
cx = starx(t): cy = stary(t)
r = sz(t) + .5
fillCircle cx, cy, r, c
'skip:
'_ICON _DISPLAY '#Dav
minutes
= TIMER \
60 - hours
* 60 seconds
= (TIMER - hours
* 3600 - minutes
* 60) 'oldminu = minu
'Seconds
s = (60 - seconds) * 6 + 180
x
= INT(SIN(s
/ 180 * 3.141592) * 125) + 500 y
= INT(COS(s
/ 180 * 3.141592) * 125) + 400 'Minutes
m = 180 - minutes * 6
xx
= INT(SIN(m
/ 180 * 3.141592) * 120) + 500 yy
= INT(COS(m
/ 180 * 3.141592) * 120) + 400 'Hours
h = 360 - hours * 30 + 180
xxx
= INT(SIN(h
/ 180 * 3.141592) * 90) + 500 yyy
= INT(COS(h
/ 180 * 3.141592) * 90) + 400
'from Steve Gold standard
Radius
= ABS(R
): RadiusError
= -Radius: X
= Radius: Y
= 0 LINE (CX
- X
, CY
)-(CX
+ X
, CY
), C
, BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), C
, BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), C
, BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), C
, BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), C
, BF