Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3409fdfa73
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 38 lines (32 sloc) 0.836 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

game = {
  graphics = {
    fullscreen = false,
    mode = { height = love.graphics.getHeight(), width = love.graphics.getWidth() }
  },
  fonts = {},
  renderer = require('renderers/ascii')
}

function game:createFonts(offset)
  self.fonts = {
    lineHeight = (10 + offset) * 1.7,
    small = love.graphics.newFont(10 + offset),
    regular = love.graphics.newFont(14 + offset),
    large = love.graphics.newFont(24 + offset),
    very_large = love.graphics.newFont(48 + offset)
  }
end

function game:setMode(mode)
  self.graphics.mode = mode
  love.graphics.setMode(mode.width, mode.height)
  if self.graphics.mode.height < 600 then
    self:createFonts(-2)
  else
    self:createFonts(0)
  end
  if self.view.updateDisplay then
    self.view.updateDisplay()
  end
end


function game:start()
  game.current_state = MapState()
end
Something went wrong with that request. Please try again.