You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
Lua
54 lines
1.2 KiB
Lua
-- VARIABLES
|
|
pathWget="/usr/bin/wget"
|
|
pathDosbox="/usr/bin/dosbox"
|
|
|
|
screenSizeW = love.graphics.getWidth()
|
|
screenSizeH = love.graphics.getHeight()
|
|
|
|
love.window.setTitle( "FDD" )
|
|
|
|
font = love.graphics.newFont("res/fonts/old_computer_st.ttf", 12)
|
|
|
|
monitor = {}
|
|
monitor.img = love.graphics.newImage("res/imgs/disquete.png")
|
|
monitor.width = 200
|
|
monitor.height = 200
|
|
monitor.x = (screenSizeW/2)-(monitor.width/2)
|
|
monitor.y = (screenSizeH/2)-(monitor.height/2)
|
|
|
|
-- FUNCIONES
|
|
|
|
function file_check(file_name)
|
|
local f=io.open(file_name, "r")
|
|
if f==nil then print(file_name.." not found. Install it and try again") os.exit() else print(file_name..": OK") end
|
|
end
|
|
|
|
function check_dependencies()
|
|
file_check(pathDosbox)
|
|
file_check(pathWget)
|
|
end
|
|
|
|
function draw_floppyDiskName(floppydisk_name)
|
|
love.graphics.setColor(255,255,255)
|
|
love.graphics.setFont(font)
|
|
love.graphics.printf(floppydisk_name,(screenSizeW/2)-50,(screenSizeH/2)-3,400,left)
|
|
end
|
|
|
|
|
|
-- FUNCIONES LOVE
|
|
|
|
function love.load()
|
|
--os.execute("dosbox")
|
|
check_dependencies()
|
|
end
|
|
|
|
function love.update()
|
|
|
|
end
|
|
|
|
function love.draw()
|
|
love.graphics.setBackgroundColor( (170/255), (100/255), (70/255) )
|
|
love.graphics.draw(monitor.img,monitor.x,monitor.y)
|
|
draw_floppyDiskName("Darkseed")
|
|
end
|