---Toutes les variables de tout les scripts--


--Fonts
sanssherif = Font.load("ms0:/PSP/GAME/F1Dumper & Manager/script/sanssherif.TTF")
sanssherif:setPixelSizes(10,12)

himfont = Font.load("ms0:/PSP/GAME/F1Dumper & Manager/script/Complete in Him.ttf")
himfont:setPixelSizes(16,18)

himfont1 = Font.load("ms0:/PSP/GAME/F1Dumper & Manager/script/Complete in Him.ttf")
himfont1:setPixelSizes(24,26)

--Sons
System.oaenable()

sonmenu = Sound.load("script/sonmenu.wav",false)

--Images
avantmenu = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/avantmenu.png")

usb1 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/usb1.png")
usb3 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/usb3.png")
disabled = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/usbdisabled.png")

screenfree = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/screenfree.png") 
 
batterie1 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/batterie1.png")
batterie2 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/batterie2.png")
batterie3 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/batterie3.png")
batterie4 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/batterie4.png")

choix1 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu1.png")
choix2 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu2.png")
choix3 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu3.png")
choix4 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu4.png")
choix5 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu5.png")
choix6 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu6.png")
choix7 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu7.png")
choix8 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu8.png")
choix9 = Image.load("ms0:/PSP/GAME/F1Dumper & Manager/images/menu9.png")

--Couleurs
noir = Color.new(0, 0, 0)
bleu = Color.new(0,0,255)
rouge = Color.new(255,0,0)
blanc = Color.new(255,255,255)

--Autre
tpsstart = Timer.new()
tpsstart:start()

--------------- Variables  alphavalue--------------
fader = Image.createEmpty(480,272)
alphaValue = 0
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)

-------------Header quick dump mode-------------------
--pad = Controls.read()

--if pad:hold()

--end

------------------------------------------------------------------
while true do

screen:clear()
screen:blit(0,0,avantmenu)

if tpsstart:time() > 4000 then


while true do

	screen:blit(0,0,fader)
	
	if alphaValue < 255 then
		alphaValue = alphaValue + 5
	else break
	end
	
	faderColor = Color.new(0,0,0,alphaValue)
	fader:clear(faderColor)
	screen.waitVblankStart()
	screen.flip()
end

    dofile("ms0:/PSP/GAME/F1Dumper & Manager/script/mainmenu.lua")
	avantmenu = nil
	fader = nil
end
screen.flip()
screen.waitVblankStart()
end