--vmp3 by mrafenne



mov1 = 0
mov2 = 0

function nomvis1()
mov2 = 0
if preiw == "fasle" and next == "fasle" then
if mov1 <= 251 and mov1 >= 0 then
mov1 = mov1 +8
end
end
end


statut = "defaut"

while true do
screen:clear()

if pad:circle() then
statut = "affiche"
end
if statut == "affiche" then
nomvis1() 
screen:fillRect(40,mov1,400,1,white)
screen:fillRect(40,mov1,Mp3me.percent()*4,1,green)
screen:fontPrint(font,mov1+120,253,Mp3me.gettime(),green)
screen:fontPrint(font,mov1+120,270,Mp3me.songTime(),white)
screen:fontPrint(font,mov1-215,253,Mp3me.title(),white)
screen:fontPrint(font,mov1-215,270,Mp3me.album(),white)


end
if pad:square() then
statut = "defaut"
end

screen:drawLine(0,136,0,50+Mp3me.vis(0),green)
screen:drawLine(5,136,5,50+Mp3me.vis(1),green)
screen:drawLine(10,136,10,50+Mp3me.vis(2),green)
screen:drawLine(15,136,15,50+Mp3me.vis(3),green)
screen:drawLine(20,136,20,50+Mp3me.vis(4),green)
screen:drawLine(25,136,25,50+Mp3me.vis(5),green)
screen:drawLine(30,136,30,50+Mp3me.vis(6),green)
screen:drawLine(35,136,35,50+Mp3me.vis(7),green)
screen:drawLine(40,136,40,50+Mp3me.vis(8),green)
screen:drawLine(45,136,45,50+Mp3me.vis(9),green)
screen:drawLine(50,136,50,50+Mp3me.vis(10),green)
screen:drawLine(55,136,55,50+Mp3me.vis(11),green)
screen:drawLine(60,136,60,50+Mp3me.vis(12),green)
screen:drawLine(65,136,65,50+Mp3me.vis(13),green)
screen:drawLine(70,136,70,50+Mp3me.vis(14),green)
screen:drawLine(75,136,75,50+Mp3me.vis(15),green)
screen:drawLine(80,136,80,50+Mp3me.vis(16),green)
screen:drawLine(85,136,85,50+Mp3me.vis(17),green)
screen:drawLine(90,136,90,50+Mp3me.vis(18),green)
screen:drawLine(95,136,95,50+Mp3me.vis(19),green)
screen:drawLine(100,136,100,50+Mp3me.vis(20),green)
screen:drawLine(105,136,105,50+Mp3me.vis(21),green)
screen:drawLine(110,136,110,50+Mp3me.vis(22),green)
screen:drawLine(115,136,115,50+Mp3me.vis(23),green)
screen:drawLine(120,136,120,50+Mp3me.vis(24),green)
screen:drawLine(125,136,125,50+Mp3me.vis(25),green)
screen:drawLine(130,136,130,50+Mp3me.vis(26),green)
screen:drawLine(135,136,135,50+Mp3me.vis(27),green)
screen:drawLine(140,136,140,50+Mp3me.vis(28),green)
screen:drawLine(145,136,145,50+Mp3me.vis(29),green)
screen:drawLine(150,136,150,50+Mp3me.vis(30),green)
screen:drawLine(155,136,155,50+Mp3me.vis(31),green)
screen:drawLine(160,136,160,50+Mp3me.vis(32),green)
screen:drawLine(165,136,165,50+Mp3me.vis(33),green)
screen:drawLine(170,136,170,50+Mp3me.vis(34),green)
screen:drawLine(175,136,175,50+Mp3me.vis(35),green)
screen:drawLine(180,136,180,50+Mp3me.vis(36),green)
screen:drawLine(185,136,185,50+Mp3me.vis(37),green)
screen:drawLine(190,136,190,50+Mp3me.vis(38),green)
screen:drawLine(195,136,195,50+Mp3me.vis(39),green)
screen:drawLine(200,136,200,50+Mp3me.vis(40),green)
screen:drawLine(205,136,205,50+Mp3me.vis(41),green)
screen:drawLine(210,136,210,50+Mp3me.vis(42),green)
screen:drawLine(215,136,215,50+Mp3me.vis(43),green)
screen:drawLine(220,136,220,50+Mp3me.vis(44),green)
screen:drawLine(225,136,225,50+Mp3me.vis(45),green)
screen:drawLine(230,136,230,50+Mp3me.vis(46),green)
screen:drawLine(235,136,235,50+Mp3me.vis(47),green)
screen:drawLine(240,136,240,50+Mp3me.vis(48),green)
screen:drawLine(245,136,245,50+Mp3me.vis(49),green)
screen:drawLine(250,136,250,50+Mp3me.vis(50),green)
screen:drawLine(255,136,255,50+Mp3me.vis(51),green)
screen:drawLine(260,136,260,50+Mp3me.vis(52),green)
screen:drawLine(265,136,265,50+Mp3me.vis(53),green)
screen:drawLine(270,136,270,50+Mp3me.vis(54),green)
screen:drawLine(275,136,275,50+Mp3me.vis(55),green)
screen:drawLine(280,136,280,50+Mp3me.vis(56),green)
screen:drawLine(285,136,285,50+Mp3me.vis(57),green)
screen:drawLine(290,136,290,50+Mp3me.vis(58),green)
screen:drawLine(295,136,295,50+Mp3me.vis(59),green)
screen:drawLine(300,136,300,50+Mp3me.vis(60),green)
screen:drawLine(305,136,305,50+Mp3me.vis(61),green)
screen:drawLine(310,136,310,50+Mp3me.vis(62),green)
screen:drawLine(315,136,315,50+Mp3me.vis(63),green)
screen:drawLine(320,136,320,50+Mp3me.vis(64),green)
screen:drawLine(325,136,325,50+Mp3me.vis(65),green)
screen:drawLine(330,136,330,50+Mp3me.vis(66),green)
screen:drawLine(335,136,335,50+Mp3me.vis(67),green)
screen:drawLine(340,136,340,50+Mp3me.vis(68),green)
screen:drawLine(345,136,345,50+Mp3me.vis(69),green)
screen:drawLine(350,136,350,50+Mp3me.vis(70),green)
screen:drawLine(355,136,355,50+Mp3me.vis(71),green)
screen:drawLine(360,136,360,50+Mp3me.vis(72),green)
screen:drawLine(365,136,365,50+Mp3me.vis(73),green)
screen:drawLine(370,136,370,50+Mp3me.vis(74),green)
screen:drawLine(375,136,375,50+Mp3me.vis(75),green)
screen:drawLine(380,136,380,50+Mp3me.vis(76),green)
screen:drawLine(385,136,385,50+Mp3me.vis(77),green)
screen:drawLine(390,136,390,50+Mp3me.vis(78),green)
screen:drawLine(395,136,395,50+Mp3me.vis(79),green)
screen:drawLine(400,136,400,50+Mp3me.vis(80),green)
screen:drawLine(405,136,405,50+Mp3me.vis(81),green)
screen:drawLine(410,136,410,50+Mp3me.vis(82),green)
screen:drawLine(415,136,415,50+Mp3me.vis(83),green)
screen:drawLine(420,136,420,50+Mp3me.vis(84),green)
screen:drawLine(425,136,425,50+Mp3me.vis(85),green)
screen:drawLine(430,136,430,50+Mp3me.vis(86),green)
screen:drawLine(435,136,435,50+Mp3me.vis(87),green)
screen:drawLine(440,136,440,50+Mp3me.vis(88),green)
screen:drawLine(445,136,445,50+Mp3me.vis(89),green)
screen:drawLine(450,136,450,50+Mp3me.vis(90),green)
screen:drawLine(455,136,455,50+Mp3me.vis(91),green)
screen:drawLine(460,136,460,50+Mp3me.vis(92),green)
screen:drawLine(465,136,465,50+Mp3me.vis(93),green)
screen:drawLine(470,136,470,50+Mp3me.vis(94),green)
screen:drawLine(475,136,475,50+Mp3me.vis(95),green)
screen:drawLine(480,136,480,50+Mp3me.vis(96),green)


pad = Controls.read()


if pad:r() and not oldpad:r() then
if fbrowser.s < (fbrowser.nf + 1) then
i = fbrowser.s + 1
if i < (fbrowser.nf + 1) then
if string.lower(string.sub(fbrowser.fl[i].name, -4)) == ".mp3" or
string.lower(string.sub(fbrowser.fl[i].name, -4)) == ".MP3" then
fbrowser.s = fbrowser.s + 1
Mp3me.stop()
screen:clear()
Mp3me.load(fbrowser.fl[fbrowser.s].name)
Mp3me.play()
end
end
end
end

if pad:l() and not oldpad:l() then
if fbrowser.s < (fbrowser.nf + 1) and fbrowser.s > 2 then
i = fbrowser.s - 1
if i < (fbrowser.nf + 1) and i > 2 then
if string.lower(string.sub(fbrowser.fl[i].name, -4)) == ".mp3" or
string.lower(string.sub(fbrowser.fl[i].name, -4)) == ".MP3" then
Mp3me.stop()
screen:clear()
fbrowser.s = fbrowser.s - 1
Mp3me.load(fbrowser.fl[fbrowser.s].name)
Mp3me.play()
end
end
end
end

if pad:cross() and not oldpad:cross() then
Mp3me.pause()
end

if pad:left() then
screen.waitVblankStart(50)
dofile("ms0:/PSP/GAME/vmp3 v1/Ibis/vmp35.lua")
end

if pad:right() then
screen.waitVblankStart(50)
dofile("ms0:/PSP/GAME/vmp3 v1/Ibis/vmp37.lua")
end

if pad:triangle() then
screen.waitVblankStart(50)
dofile("ms0:/PSP/GAME/vmp3 v1/menu.lua")
end


if pad:start() then 
screen.waitVblankStart(50)
dofile("ms0:/PSP/GAME/vmp3 v1/script1.lua")
exitMenu()
end


screen.waitVblankStart()
screen.flip()
oldpad = pad
end


