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

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

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

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


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


