summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-05-16 17:56:31 +0200
committerAki <nthirtyone@gmail.com>2016-05-16 17:56:31 +0200
commita1c1dd0f32f950954b7c8bf7557135993627bed9 (patch)
tree702cee47b4876593c17d215492b962ca383d8641
parent9ae261184c7c141fe78273c6e366be6e6ef33293 (diff)
downloadroflnauts-a1c1dd0f32f950954b7c8bf7557135993627bed9.zip
roflnauts-a1c1dd0f32f950954b7c8bf7557135993627bed9.tar.gz
roflnauts-a1c1dd0f32f950954b7c8bf7557135993627bed9.tar.bz2
:cloud: filter fixed
-rw-r--r--assets/clouds.pngbin1009 -> 716 bytes
-rw-r--r--cloud.lua12
2 files changed, 9 insertions, 3 deletions
diff --git a/assets/clouds.png b/assets/clouds.png
index 0af72f9..102986b 100644
--- a/assets/clouds.png
+++ b/assets/clouds.png
Binary files differ
diff --git a/cloud.lua b/cloud.lua
index c92824f..aed62fc 100644
--- a/cloud.lua
+++ b/cloud.lua
@@ -11,9 +11,9 @@ Cloud = {
v = 13, -- velocity
sprite = love.graphics.newImage("assets/clouds.png"),
quads = {
- [1] = love.graphics.newQuad( 1, 1, 158,47, 480,49),
- [2] = love.graphics.newQuad(161, 1, 158,47, 480,49),
- [3] = love.graphics.newQuad(321, 1, 158,47, 480,49)
+ [1] = love.graphics.newQuad( 1, 1, 158,47, 478,49),
+ [2] = love.graphics.newQuad(160, 1, 158,47, 478,49),
+ [3] = love.graphics.newQuad(319, 1, 158,47, 478,49)
}
}
@@ -23,6 +23,12 @@ function Cloud:new(x, y, t, v)
local o = {}
setmetatable(o, self)
self.__index = self
+ -- Fix for texture bug
+ local min, mag = self.sprite:getFilter()
+ if min ~= "nearest" or
+ mag ~= "nearest" then
+ self.sprite:setFilter("nearest", "nearest")
+ end
-- Init
o.x = x or self.x
o.y = y or self.y