System.memclean()
collectgarbage()

Curseur=Image.load("img/Curs.PNG")
fond=Image.load("img/fond.PNG")
IE=Image.load("img/ie.png")
b=Color.new(17,251,10)
umd=Image.load("img/umd.jpg")
exit=Image.load("img/shutdown.jpeg")
calc=Image.load("img/calc.png")
info=Image.load("img/info.png")
mp3 = Image.load("img/mp3.jpg")
ps1 = Image.load("img/ps1.png")
theme = Image.load("img/theme.jpg")












font = Font.load("police/police.ttf")
font:setPixelSizes(35,35)

number = 0

x=240
y=136

oldpad = Controls.read()



while true do

screen:clear()
pad = Controls.read()
screen:blit(0,0,fond)
screen:blit(50,50,IE)
screen:blit(99,50,umd)
screen:blit(148,50,exit)
screen:fontPrint(font,100,20,"Bienvenue  "..System.nickName().." .",b)
screen:blit(196,50,calc)
screen:blit(246,50,info)
screen:blit(296,50,mp3)
screen:blit(50,100,ps1)
screen:blit(101,100,theme)
screen:blit(x,y,Curseur,0,0,Curseur:width(),Curseur:height())

if pad:select() and not oldpad:select() then
number = number+1
screen:save("ms0:/PICTURE/capture"..number..".png")
end

if math.abs(pad:analogY()) > 15 then
y = y + pad:analogY() / 15
end

if math.abs(pad:analogX()) > 15 then
x = x + pad:analogX() / 15
end

if x < 0 then x = 0 elseif x+Curseur:width() > 480 then x = 480-Curseur:width() end

if y < 0 then y= 0 elseif y+Curseur:height() > 272 then y = 272-Curseur:height()
end

if x>=50 and x <99 and y>=50 and y<98 and pad:cross() then
dofile("ie.exe")
end

if x>=99 and x <148 and y>=50 and y<99 and pad:cross() then
dofile("umd.exe")
end 

if x>=148 and x <192 and y>=50 and y<94 and pad:cross() then
dofile("exit.exe")
end

if x>=196 and x <244 and y>=50 and y<98 and pad:cross() then
dofile("calc.exe")
end

if x>=246 and x <296 and y>=50 and y<100 and pad:cross() then
dofile("info.exe")
end 

if x>=296 and x <346 and y>=50 and y<100 and pad:cross() then  

dofile("mp3.exe")
end

if x>=50 and x <101 and y>=100 and y<151 and pad:cross() then

dofile("PSX.exe")
end

if x>=101 and x<151 and y>=100 and y<150 and pad:cross() then
dofile("theme.exe")
end

screen.waitVblankStart()
screen.flip()
end












































































































































































































































































































