Blob Blame History Raw
From 6cac89f4282880e7f7e875658fa90b25f6a8c192 Mon Sep 17 00:00:00 2001
From: Mystro256 <alexjnewt@hotmail.com>
Date: Sun, 18 Mar 2018 18:57:45 -0400
Subject: [PATCH] Love 0.10.2 support

---
 blanket.lua      | 4 ++--
 conf.lua         | 4 ++--
 gameover.lua     | 4 ++--
 ingame.lua       | 2 +-
 introduction.lua | 4 ++--
 main.lua         | 6 ++----
 title.lua        | 4 ++--
 winscreen.lua    | 4 ++--
 8 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/blanket.lua b/blanket.lua
index d128a9d..dab319e 100644
--- a/blanket.lua
+++ b/blanket.lua
@@ -99,7 +99,7 @@ function Blanket:draw()
 end
 
 function Blanket:mousepressed(x, y, button)
-	if button ~= "l" then return end
+	if button ~= 1 then return end
 
 	if self.mousejoint then
 		self.mousejoint:destroy()
@@ -126,7 +126,7 @@ function Blanket:mousepressed(x, y, button)
 end
 
 function Blanket:mousereleased(x, y, button)
-	if button ~= "l" or self.mousejoint == nil then return end
+	if button ~= 1 or self.mousejoint == nil then return end
 
 	self.mousejoint:destroy()
 	self.mousejoint = nil
diff --git a/conf.lua b/conf.lua
index 91a954b..9f2b8bf 100644
--- a/conf.lua
+++ b/conf.lua
@@ -1,6 +1,6 @@
 function love.conf(t)
     t.identity = "safetyblanket"
-    t.version = "0.9.2"
+    t.version = "0.10.2"
     t.console = false
  
     t.window.title = "Safety Blanket"
@@ -12,7 +12,7 @@ function love.conf(t)
     t.window.minwidth = 1
     t.window.minheight = 1
     t.window.fullscreen = false
-    t.window.fullscreentype = "normal"
+    t.window.fullscreentype = "desktop"
     t.window.vsync = true
     t.window.fsaa = 0
     t.window.display = 1
diff --git a/gameover.lua b/gameover.lua
index b490cfc..603a227 100644
--- a/gameover.lua
+++ b/gameover.lua
@@ -55,7 +55,7 @@ function GameOver:draw()
 	end
 
 	local mx, my = love.mouse.getPosition()
-	if love.mouse.isDown("l") then
+	if love.mouse.isDown(1) then
 		love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12)
 	else
 		love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12)
@@ -70,7 +70,7 @@ function GameOver:mousepressed(x, y, button)
 end
 
 function GameOver:mousereleased(x, y, button)
-	if button == "l" and self.state == GameOver.STATE_FADEIN and self.fade < 0.5 then
+	if button == 1 and self.state == GameOver.STATE_FADEIN and self.fade < 0.5 then
 		self.state = GameOver.STATE_FADEOUT
 		self.fade = math.max(0, self.fade)
 		ResMgr.playSound("pageturn.wav")
diff --git a/ingame.lua b/ingame.lua
index 2f1426b..9bc365c 100644
--- a/ingame.lua
+++ b/ingame.lua
@@ -117,7 +117,7 @@ function Ingame:draw()
 	end
 
 	local mx, my = love.mouse.getPosition()
-	if love.mouse.isDown("l") then
+	if love.mouse.isDown(1) then
 		love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12)
 	else
 		love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12)
diff --git a/introduction.lua b/introduction.lua
index d3ac5ea..da8ac46 100644
--- a/introduction.lua
+++ b/introduction.lua
@@ -51,7 +51,7 @@ function Introduction:draw()
 	end
 
 	local mx, my = love.mouse.getPosition()
-	if love.mouse.isDown("l") then
+	if love.mouse.isDown(1) then
 		love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12)
 	else
 		love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12)
@@ -73,7 +73,7 @@ function Introduction:mousepressed(x, y, button)
 end
 
 function Introduction:mousereleased(x, y, button)
-	if button == "l" then
+	if button == 1 then
 		if self.state == Introduction.STATE_FADEIN then
 			self.state = Introduction.STATE_FADEOUT
 			self.fade = math.max(self.fade, 0)
diff --git a/main.lua b/main.lua
index ffdf413..3707bcb 100644
--- a/main.lua
+++ b/main.lua
@@ -24,9 +24,7 @@ function love.load()
 	love.graphics.setLineStyle("rough")
 	love.mouse.setVisible(false)
 
-	if love.graphics.isSupported("canvas") then
-		canvas = love.graphics.newCanvas(WIDTH, HEIGHT)
-	end
+	canvas = love.graphics.newCanvas(WIDTH, HEIGHT)
 
 	switchState(Title)
 end
@@ -42,7 +40,7 @@ end
 function love.draw()
 	love.graphics.push()
 
-	canvas:clear()
+	love.graphics.clear()
 	love.graphics.setCanvas(canvas)
 	state:draw()
 	love.graphics.scale(SCALE, SCALE)
diff --git a/title.lua b/title.lua
index 1842920..4bd3876 100644
--- a/title.lua
+++ b/title.lua
@@ -82,7 +82,7 @@ function Title:draw()
 		love.graphics.setColor(255, 255, 255, 255)
 	end
 
-	if love.mouse.isDown("l") then
+	if love.mouse.isDown(1) then
 		love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12)
 	else
 		love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12)
@@ -119,7 +119,7 @@ function Title:mousepressed(x, y, button)
 end
 
 function Title:mousereleased(x, y, button)
-	if button == "l" then
+	if button == 1 then
 		if self.state == Title.STATE_FADEIN then
 			if self.hasInf == true and x >= 208 and x <= 249 and y >= 7 and y <= 30 then
 				self.state = Title.STATE_FADEINF
diff --git a/winscreen.lua b/winscreen.lua
index 7ca185d..f1ae6d1 100644
--- a/winscreen.lua
+++ b/winscreen.lua
@@ -47,7 +47,7 @@ function Winscreen:draw()
 	end
 
 	local mx, my = love.mouse.getPosition()
-	if love.mouse.isDown("l") then
+	if love.mouse.isDown(1) then
 		love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12)
 	else
 		love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12)
@@ -63,7 +63,7 @@ function Winscreen:mousepressed(x, y, button)
 end
 
 function Winscreen:mousereleased(x, y, button)
-	if button == "l" then
+	if button == 1 then
 		if self.state == Winscreen.STATE_FADEIN then
 			self.state = Winscreen.STATE_FADEOUT
 			self.fade = math.max(self.fade, 0)
-- 
2.14.3