SHARE
TWEET

Untitled

a guest Feb 20th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local game = require("game")
  2.  
  3. -- WIDTH, HEIGHT, FULLSCREEN = 1920, 1080, true
  4. WIDTH, HEIGHT, FULLSCREEN = 1600, 900, false
  5.  
  6. function love.load()
  7.     love.window.setMode(WIDTH, HEIGHT, {fullscreen=FULLSCREEN})
  8.     scFa = love.graphics.getWidth()/1920
  9.  
  10.     game.load()
  11. end
  12.  
  13. function love.update(dt)
  14.   game.update(dt)
  15. end
  16.  
  17. function love.draw()
  18.     love.graphics.scale(scFa, scFa)
  19.     game.draw()
  20. end
  21.  
  22. function love.mousepressed(x, y, button)
  23.     x = x/scFa
  24.     y = y/scFa
  25.     game.mousepressed(x, y, button)
  26. end
  27. function love.mousemoved(x, y, dx, dy)
  28.     x = x/scFa
  29.     y = y/scFa
  30.     game.mousemoved(x, y, dx, dy) end
  31. end
  32. function love.mousereleased(x, y, button)
  33.     x = x/scFa
  34.     y = y/scFa
  35.     game.mousereleased(x, y, button)
  36. end
  37. function love.wheelmoved(dx, dy)
  38.     game.wheelmoved(dx, dy)
  39. end
  40. function love.keypressed(key, scancode)
  41.     game.keypressed(key, scancode)
  42. end
  43. function love.keyreleased(key, scancode)
  44.     game.keyreleased(key, scancode)
  45. end
  46.  
  47. function getMouseX() return love.mouse.getX()/scFa end
  48. function getMouseY() return love.mouse.getY()/scFa end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top