summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2016-01-05 19:04:44 -0600
committerDavid McMackins II <contact@mcmackins.org>2016-01-05 19:05:29 -0600
commit3137bcc826417e6d4ff4846df097aa0fc1cbdf23 (patch)
tree60446c2dd493ec585fee113fae54f731fbe53cbe
parenta62605bce1e0ecf19ae76b9b0c5c2ead3417a75a (diff)
Remove window size function name hack
-rw-r--r--board.lua6
-rw-r--r--main.lua7
2 files changed, 5 insertions, 8 deletions
diff --git a/board.lua b/board.lua
index 02f399e..a9ae959 100644
--- a/board.lua
+++ b/board.lua
@@ -1,6 +1,6 @@
--
-- Agario Checkers - Checkers-like game with inspiration from agar.io
--- Copyright (C) 2015 Delwink, LLC
+-- Copyright (C) 2015-2016 Delwink, LLC
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
@@ -26,8 +26,8 @@ end
function getboardpos()
local halfsize = BOARD_SIZE / 2
- local xpos = love.window.getWidth()/2 - halfsize
- local ypos = love.window.getHeight()/2 - halfsize
+ local xpos = love.graphics.getWidth()/2 - halfsize
+ local ypos = love.graphics.getHeight()/2 - halfsize
return {x=xpos, y=ypos}
end
diff --git a/main.lua b/main.lua
index 339ee53..100f0a6 100644
--- a/main.lua
+++ b/main.lua
@@ -34,9 +34,6 @@ local authorlogo = love.graphics.newImage('res/author.png')
local mainfont = love.graphics.getFont()
local winfont = love.graphics.newFont(25)
-love.window.getWidth = love.graphics.getWidth or love.window.getWidth
-love.window.getHeight = love.graphics.getHeight or love.window.getHeight
-
local function initrow(start, y)
local board_dim = BOARD_SIZE / boardsqsize()
for i=0,3 do
@@ -301,8 +298,8 @@ function checkwinner()
end
function love.update(dt)
- wwidth = love.window.getWidth()
- wheight = love.window.getHeight()
+ wwidth = love.graphics.getWidth()
+ wheight = love.graphics.getHeight()
checkwinner()
if winner ~= 0 then