primera
parent
a6da26ea91
commit
20cbe5aae1
Binary file not shown.
@ -0,0 +1,52 @@
|
|||||||
|
love.mouse.setVisible(false)
|
||||||
|
love.window.setFullscreen(true)
|
||||||
|
|
||||||
|
logo = {}
|
||||||
|
logo.img = love.graphics.newImage("logo.png")
|
||||||
|
logo.width = 300
|
||||||
|
logo.height = 300
|
||||||
|
logo.scale = 1
|
||||||
|
|
||||||
|
ScreenSizeW = love.graphics.getWidth()
|
||||||
|
ScreenSizeH = love.graphics.getHeight()
|
||||||
|
font = love.graphics.newFont("fonts/amiga4ever.ttf", 12)
|
||||||
|
songData = love.sound.newSoundData("mods/0-wily.xm")
|
||||||
|
song = love.audio.newSource(songData)
|
||||||
|
song:play()
|
||||||
|
|
||||||
|
function love.load()
|
||||||
|
songPos = song:tell("samples")
|
||||||
|
songRate = songData:getSampleRate()
|
||||||
|
songSize = songData:getSampleCount()
|
||||||
|
end
|
||||||
|
|
||||||
|
function love.update(dt)
|
||||||
|
songPos = song:tell("samples")
|
||||||
|
songSam = songData:getSample(songPos)
|
||||||
|
love.draw()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function love.draw()
|
||||||
|
--love.graphics.draw(logo.img, (ScreenSizeW/2)-(logo.width/2), (ScreenSizeH/2)-(logo.height/2), 0, 1, 1)
|
||||||
|
love.graphics.setColor(88,0,100)
|
||||||
|
love.graphics.circle("fill", ScreenSizeW/2, ScreenSizeH/2, songSam * ScreenSizeW )
|
||||||
|
love.graphics.setColor(100,100,100)
|
||||||
|
love.graphics.circle("line", ScreenSizeW/2, ScreenSizeH/2, songSam * ScreenSizeW )
|
||||||
|
love.graphics.setColor(200,200,200)
|
||||||
|
love.graphics.circle("fill", ScreenSizeW/2, ScreenSizeH/2, songSam * (ScreenSizeW/2) )
|
||||||
|
love.graphics.setColor(49,2,49)
|
||||||
|
love.graphics.circle("fill", ScreenSizeW/2, ScreenSizeH/2, songSam * (ScreenSizeW/4) )
|
||||||
|
love.graphics.draw(logo.img, (ScreenSizeW/2)-(logo.width/2), (ScreenSizeH/2)-(logo.height/2), songSam, logo.scale, logo.scale)
|
||||||
|
|
||||||
|
love.graphics.setColor(255,255,255)
|
||||||
|
--love.graphics.setFont(font)
|
||||||
|
--love.graphics.printf("Sample Rate: " .. songRate, 10, 10, 400, left)
|
||||||
|
--love.graphics.printf("Position: " .. songPos .. "/" .. songSize, 10, 30, 400, left)
|
||||||
|
end
|
||||||
|
|
||||||
|
function love.keyreleased(key)
|
||||||
|
if key == "escape" then
|
||||||
|
love.event.quit()
|
||||||
|
end
|
||||||
|
end
|
Binary file not shown.
Loading…
Reference in New Issue