Advertisement
joseleeph

Untitled

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