From a1c1dd0f32f950954b7c8bf7557135993627bed9 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 16 May 2016 17:56:31 +0200 Subject: :cloud: filter fixed --- assets/clouds.png | Bin 1009 -> 716 bytes cloud.lua | 12 +++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/assets/clouds.png b/assets/clouds.png index 0af72f9..102986b 100644 Binary files a/assets/clouds.png and b/assets/clouds.png 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 -- cgit v1.1