Advertisement
joseleeph

Untitled

Jan 4th, 2021
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 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. Class = require 'Util' -- we want to use Util in map so it must be called before map
  11.  
  12. Class = require 'Map'
  13.  
  14. function love.load()
  15. map = Map()
  16.  
  17. love.graphics.setDefaultFilter('nearest', 'nearest') -- it pixelates
  18. push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOWN_WIDTH, WINDOW_HEIGHT,
  19. {
  20. fullscreen = false,
  21. resizable = false,
  22. vsync = true
  23. })
  24. end
  25.  
  26. function love.update(dt)
  27. --we need to chop up the individual ties. we will use the quad funtion
  28. -- it makes sense to put this in a utility class, with the file Util.lua
  29. end
  30.  
  31. function love.draw() -- push apply start and end around the things to be drawn
  32. push:apply('start')
  33. love.graphics.clear(108/255, 140/255, 255/255, 255/255) -- clear screen with mario blue
  34. love.graphics.print("hello, World!", VIRTUAL_WIDTH/2-50,VIRTUAL_HEIGHT/2, center)
  35.  
  36. map:render()
  37. push:apply('end')
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement