--Boot Loading Animation
boot = Image.load("IMG/bootimg.png")
bar = Image.load("IMG/load.png")

--Colors
black = Color.new(0,0,0)
blue = Color.new(0,0,255)
green = Color.new(0,255,0)
white = Color.new(255,255,255)
red = Color.new(255,0,0)



--animation
x1 = 170
x2 = 175
x3 = 180
x4 = 185
x5 = 190
x6 = 195
x7 = 200
x8 =  205
x9 = 210
x10 = 215
x11 = 220
bar1 = true
bar2 = true
bar3 = true
bar4 = true
bar5 = true
bar6 = true
bar8 = true
bar9 = true
bar10 = true
bar11 = true

--timer
counter = Timer.new()

while true do

pad = Controls.read()

screen:blit(0,0,boot)

currentTime = counter:time()

if currentTime > 600 then
if bar1 == true then
screen:blit(x1,211,bar)
end
end

if currentTime > 800 then
if bar2 == true then
screen:blit(x2,211,bar)
end
end

if currentTime > 1000 then
if bar3 == true then
screen:blit(x3,211,bar)
end
end

if currentTime > 1200 then
if bar4 == true then
screen:blit(x4,211,bar)
end
end

if currentTime > 1400 then
if bar5 == true then
screen:blit(x5,211,bar)
end
end

if currentTime > 1600 then
if bar6 == true then
screen:blit(x6,211,bar)
end
end
if currentTime > 1800 then
if bar7 == true then
screen:blit(x7,211,bar)
end
end
if currentTime > 2000 then
if bar8 == true then
screen:blit(x8,211,bar)
end
end
if currentTime > 2200 then
if bar9 == true then
screen:blit(x9,211,bar)
end
end
if currentTime > 2400 then
if bar10 == true then
screen:blit(x10,211,bar)
end
end
if currentTime > 2600 then
if bar11 == true then
screen:blit(x11,211,bar)
end
end

x1 = x1 + .3
x2 = x2 + .3
x3 = x3 + .3
x4 = x4 + .3
x5 = x5 + .3
x6 = x6 + .3
x7 = x7+ .3
x8=x8+.3
x9=x9+.3
x10=x10+.3
x11=x11+.3

if x1 >= 259 then
bar11 = false
end

if x1 >= 264 then
bar10 = false
end

if x1 >= 269 then
bar9 = false
end

if x1 >= 274 then
bar8 = false
end

if x1 >= 279 then
bar7 = false
end

if x1 >= 284 then
bar6 = false
end

if x1 >= 289 then
bar5 = false
end

if x1 >= 294 then
bar4 = false
end

if x1 >= 299 then
bar3 = false
dofile("screen.lua")
file:close()
end

screen.flip()
end