Advertisement
joseleeph

Untitled

Feb 4th, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. WINDOWN_WIDTH = 1280
  2. WINDOW_HEIGHT = 720
  3.  
  4. VIRTUAL_WIDTH = 432
  5. VIRTUAL_HEIGHT = 243
  6.  
  7. Class = require 'class'
  8. push = require 'push'
  9.  
  10. require 'Util'
  11. require 'Map'
  12.  
  13. function love.load()
  14.  
  15. math.randomseed(os.time())
  16. map = Map()
  17.  
  18.  
  19. love.graphics.setDefaultFilter('nearest', 'nearest')
  20.  
  21. love.graphics.setFont(love.graphics.newFont('fonts/Stay and Shine.ttf',20))
  22.  
  23. push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOWN_WIDTH, WINDOW_HEIGHT,
  24. {
  25. fullscreen = false,
  26. resizable = false,
  27. vsync = true
  28. })
  29. end
  30.  
  31. function love.update(dt)
  32. map:update(dt)
  33. end
  34.  
  35. function love.draw()
  36. love.graphics.clear(108/255, 140/255, 255/255, 255/255)
  37. push:apply('start')
  38. love.graphics.translate(math.floor(-map.camX + 0.5), math.floor(-map.camY + 0.5))
  39.  
  40. love.graphics.print("hello, Mario!", VIRTUAL_WIDTH/2-50,VIRTUAL_HEIGHT/2, center)
  41.  
  42. map:render()
  43. push:apply('end')
  44. end
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement