setscreen ("graphics:v256")
setscreen ("graphics:640;480,nobuttonbar")
%declairations
var tim:string
var day:string
var ground:int
var ground1:int
var building:int
var moonphase:int
var moon:int
var light:int
var light1:int
%backdrop
for decreasing g : maxy .. 0
RGB.SetColour (1, 0, 0, g * (1 / maxy))%color fade of backdrop
Draw.Line (0, maxy - g, maxx, maxy - g, 1)%base of backdrop
end for
%stars
for a : 1 .. 750%number of stars
%declairation of star location/color
var ecks := Rand.Int (0, maxx)%x position, random (x, ecks... get it.. heh..eh?)
var wy := Rand.Int (150, maxy)%y position, random
var zee := Rand.Int (14, 31)%color
Draw.Dot (ecks, wy, zee)%draws the star
end for
%buildings
for i : 1 .. 125%affects number of buildings
ground:=Rand.Int (0, maxx)%beginning of buildings
ground1:=ground+Rand.Int (10,25)%width of buildings
building:=Rand.Int (0, 125)%height of buildings
drawbox (ground -1, 0, ground1+1, building+1, Rand.Int (15,20)) %Outlines buildings
drawfillbox (ground, 0,ground1, building, Rand.Int (15,29))%Draws the buildings
end for
%lights
for l:1..500
light:=Rand.Int (0,640)
light1:=Rand.Int (0,124)
if whatdotcolor (light,light1) = 15 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 16 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 17 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 18 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 19 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 20 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 21 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 22 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 23 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 24 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 25 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 26 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 27 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 28 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
elsif whatdotcolor (light,light1) = 29 then drawfillbox (light,light1,light+1,light1+1, Rand.Int(14,31))
end if
end for
%moon
moon:=Rand.Int (25,575)%Generates random moon location
moonphase:=Rand.Int (0,5)%Generates moon phase
%moonphases
if moonphase = 0
then
elsif moonphase = 1
then drawfilloval (moon,445,14,16,yellow)
elsif moonphase = 2
then drawfilloval (moon,445,16,16,yellow)
elsif moonphase = 3
then drawfilloval (moon,445,16,16,yellow)
drawfillbox (moon - 16,429,moon,461,black)
elsif moonphase = 4
then drawfilloval (moon,445,16,16,yellow)
drawfilloval (moon - 10,445,16,16,black)
elsif moonphase = 5
then drawfilloval (moon,445,16,16,yellow)
drawfilloval (moon - 2,445,16,16,black)
end if
loop
%twinkle effect
var twn1:int:=Rand.Int (0,600)
var twn :int:=Rand.Int (126,400)
if whatdotcolor (twn1,twn) = 14 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 15 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 16 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 17 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 18 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 19 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 20 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 21 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 22 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 23 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 24 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 25 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 26 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 27 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 28 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 29 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 30 then drawdot (twn1,twn,Rand.Int (14,31))
elsif whatdotcolor (twn1,twn) = 31 then drawdot (twn1,twn,Rand.Int (14,31))
end if
%Clock
date (day)%day of the year
time (tim)%time of day
colourback (black)%blends in the background
color (white)%For visibility
Text.LocateXY (5, 470)%Constatly places time over itself
put day, " " ,tim
delay (5)
end loop
|