Yeah I got a little bored this afternoon and for whatever reason made this clock. I searched the forums and found about 10 other clocks, but did those clocks move around the screen? I think not. Anyway here is the source. Should work in both DBP and DBC
[Edit] Just noticed a pretty bad bug with the hours. Updated the code
hide mouse
set display mode 1024, 768, 32
white as dword
grey as dword
red as dword
black as dword
white = rgb(255, 255, 255)
grey = rgb(150, 150, 150)
red = rgb(255, 0, 0)
black = rgb(0, 0, 0)
rad = 300
x = screen width() / 2
y = screen height() / 2
set text size 48
xmove = 1
ymove = -1
do
cls
inc x, xmove
inc y, ymove
if x + rad > screen width() then xmove = -1
if x - rad < 0 then xmove = 1
if y + rad > screen height() then ymove = -1
if y - rad < 0 then ymove = 1
ink white, 0
circle x, y, rad
ink grey, 0
for z = 0 to 359 step 30
ox = sin(z) * rad
oy = cos(z) * rad
ox2 = sin(z) * (rad - 60)
oy2 = cos(z) * (rad - 60)
line x + ox, y + oy, x + ox2, y + oy2
next z
center text x, y + 50, get time$()
ink white, 0
minox = sin((val(left$(right$(get time$(), 5), 2)) * -6) - 180) * rad
minoy = cos((val(left$(right$(get time$(), 5), 2)) * -6) - 180) * rad
line x, y, x + minox, y + minoy
if val(right$(left$(get time$(), 2), 8)) <= 12
houox = sin((val(left$(right$(get time$(), 8), 2)) * -30) - 180) * (rad / 2)
houoy = cos((val(left$(right$(get time$(), 8), 2)) * -30) - 180) * (rad / 2)
line x, y, x + houox, y + houoy
else
hour = val(right$(left$(get time$(), 2), 8))
dec hour, 12
houox = sin(hour * -30 - 180) * (rad / 2)
houoy = cos(hour * -30 - 180) * (rad / 2)
line x, y, x + houox, y + houoy
endif
ink red, 0
secox = sin((val(right$(get time$(), 2)) * -6) - 180) * rad
secoy = cos((val(right$(get time$(), 2)) * -6) - 180) * rad
line x, y, x + secox, y + secoy
ink grey, 0
center text x, y - 224, "12"
center text x + 99, y - 193, "1"
center text x + 185, y - 123, "2"
center text x + 200, y - 25, "3"
center text x + 185, y + 74, "4"
center text x + 100, y + 153, "5"
center text x, y + 188, "6"
center text x - 99, y + 153, "7"
center text x - 185, y + 75, "8"
center text x - 200, y - 25, "9"
center text x - 185, y - 123, "10"
center text x - 100, y - 193, "11"
loop