init.lua 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 autoindent:
  2. -- kate: space-indent on; indent-width 4; mixedindent off;
  3. init = {}
  4. function init.load()
  5. -- a game key
  6. game_keyquit = "escape"
  7. -- Window (we expect the window's size not to change)
  8. love.window.setMode(1280, 1024, {resizable=false, vsync=true, minwidth=400, minheight=300})
  9. maxWidth = love.graphics.getWidth( )
  10. maxHeight = love.graphics.getHeight( )
  11. -- Rendering
  12. love.graphics.setBlendMode("screen")
  13. -- Canvas
  14. canvas = love.graphics.newCanvas(maxWidth, maxHeight)
  15. love.graphics.setCanvas(canvas)
  16. --canvas:clear()
  17. -- Some colors
  18. text_color = {250, 250, 250, 255}
  19. bg_color = {10, 10, 29, 255}
  20. border_color = {15, 15, 255, 255}
  21. -- setting up collision array
  22. collisionArray = {}
  23. for dummyX = 1,maxWidth do
  24. collisionArray[dummyX] = {}
  25. for dummyY = 1,maxHeight do
  26. collisionArray[dummyX][dummyY] = 0
  27. end
  28. end
  29. end