diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..96287af --- /dev/null +++ b/main.lua @@ -0,0 +1,53 @@ +-- 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 diff --git a/res/fonts/old_computer_st.ttf b/res/fonts/old_computer_st.ttf new file mode 100644 index 0000000..f8ba46e Binary files /dev/null and b/res/fonts/old_computer_st.ttf differ diff --git a/res/imgs/disquete.png b/res/imgs/disquete.png new file mode 100644 index 0000000..7a92643 Binary files /dev/null and b/res/imgs/disquete.png differ diff --git a/res/imgs/edge-crt.png b/res/imgs/edge-crt.png new file mode 100644 index 0000000..6b600a4 Binary files /dev/null and b/res/imgs/edge-crt.png differ