updated color range to be compatible for 11.1

This commit is contained in:
flamendless 2018-05-30 11:24:08 +08:00
parent 414b9b74c0
commit 4e4d61f737
4 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
function love.conf(t) function love.conf(t)
t.identity = nil -- The name of the save directory (string) t.identity = nil -- The name of the save directory (string)
t.version = "0.10.0" -- The LÖVE version this game was made for (string) t.version = "11.1" -- The LÖVE version this game was made for (string)
t.console = true -- Attach a console (boolean, Windows only) t.console = true -- Attach a console (boolean, Windows only)
t.window.title = "Untitled" -- The window title (string) t.window.title = "Untitled" -- The window title (string)

View File

@ -48,7 +48,7 @@ function normal_map.fromHeightMap(heightMap, strength)
end end
function normal_map.generateFlat(img, mode) function normal_map.generateFlat(img, mode)
local imgData = img:getData() local imgData = love.image.newImageData(img:getWidth(), img:getHeight())
local imgNormalData = love.image.newImageData(img:getWidth(), img:getHeight()) local imgNormalData = love.image.newImageData(img:getWidth(), img:getHeight())
local color local color

View File

@ -27,7 +27,7 @@ local util = require(_PACKAGE..'/util')
local post_shader = {} local post_shader = {}
post_shader.__index = post_shader post_shader.__index = post_shader
local files = love.filesystem.getDirectoryItems(_PACKAGE.."/shaders/postshaders") local files = love.filesystem.getInfo(_PACKAGE .. "/shaders/postshaders")
local shaders = {} local shaders = {}
for i,v in ipairs(files) do for i,v in ipairs(files) do

View File

@ -63,10 +63,10 @@ function exf.draw()
lightWorld:draw(function() lightWorld:draw(function()
love.graphics.setBackgroundColor(0, 0, 0) love.graphics.setBackgroundColor(0, 0, 0)
love.graphics.setColor(48, 156, 225) love.graphics.setColor(48/255, 156/255, 225/255)
love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight()) love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
love.graphics.setColor(255, 255, 255, 191) love.graphics.setColor(1, 1, 1, 191/255)
love.graphics.setFont(exf.bigfont) love.graphics.setFont(exf.bigfont)
love.graphics.print("Examples:", 50, 50) love.graphics.print("Examples:", 50, 50)
@ -75,7 +75,7 @@ function exf.draw()
exf.list:draw() exf.list:draw()
love.graphics.setColor(255, 255, 255) love.graphics.setColor(1, 1, 1)
love.graphics.draw(exf.bigball, 800 - 128, 600 - 128, love.timer.getTime(), 1, 1, exf.bigball:getWidth() * 0.5, exf.bigball:getHeight() * 0.5) love.graphics.draw(exf.bigball, 800 - 128, 600 - 128, love.timer.getTime(), 1, 1, exf.bigball:getWidth() * 0.5, exf.bigball:getHeight() * 0.5)
end) end)
end end
@ -158,7 +158,7 @@ end
function exf.clear() function exf.clear()
love.graphics.setBackgroundColor(0,0,0) love.graphics.setBackgroundColor(0,0,0)
love.graphics.setColor(255, 255, 255) love.graphics.setColor(1, 1, 1)
love.graphics.setLineWidth(1) love.graphics.setLineWidth(1)
love.graphics.setLineStyle("smooth") love.graphics.setLineStyle("smooth")
love.graphics.setBlendMode("alpha") love.graphics.setBlendMode("alpha")
@ -182,11 +182,11 @@ function exf.resume()
-- create light world -- create light world
lightWorld = LightWorld({ lightWorld = LightWorld({
ambient = {127, 127, 127} ambient = {127/255, 127/255, 127/255}
}) })
-- create light -- create light
lightMouse = lightWorld:newLight(0, 0, 255, 127, 63, 500) lightMouse = lightWorld:newLight(0, 0, 1, 127/255, 63/255, 500)
lightMouse:setSmooth(2) lightMouse:setSmooth(2)
-- create shadow bodys -- create shadow bodys
@ -337,7 +337,7 @@ function List:draw()
love.graphics.setLineStyle("rough") love.graphics.setLineStyle("rough")
love.graphics.setFont(self.font) love.graphics.setFont(self.font)
love.graphics.setColor(48, 156, 225) love.graphics.setColor(48/255, 156/255, 1)
local mx, my = love.mouse.getPosition() local mx, my = love.mouse.getPosition()
@ -357,17 +357,17 @@ function List:draw()
local hover = inside(mx, my, x, y, w, h) local hover = inside(mx, my, x, y, w, h)
if hover then if hover then
love.graphics.setColor(0, 0, 0, 127) love.graphics.setColor(0, 0, 0, 127/255)
else else
love.graphics.setColor(0, 0, 0, 63) love.graphics.setColor(0, 0, 0, 63/255)
end end
love.graphics.rectangle("fill", x+1, y+i+1, w-3, h) love.graphics.rectangle("fill", x+1, y+i+1, w-3, h)
if hover then if hover then
love.graphics.setColor(255, 255, 255) love.graphics.setColor(1, 1, 1, 1)
else else
love.graphics.setColor(255, 255, 255, 127) love.graphics.setColor(1, 1, 1, 127/255)
end end
local e_id = string.sub(self.items[i], 1, 5) local e_id = string.sub(self.items[i], 1, 5)
@ -385,15 +385,15 @@ function List:draw()
local hover = inside(mx, my, x, y, w, h) local hover = inside(mx, my, x, y, w, h)
if hover or self.bar_lock then if hover or self.bar_lock then
love.graphics.setColor(0, 0, 0, 127) love.graphics.setColor(0, 0, 0, 127/255)
else else
love.graphics.setColor(0, 0, 0, 63) love.graphics.setColor(0, 0, 0, 63/255)
end end
love.graphics.rectangle("fill", x, y, w, h) love.graphics.rectangle("fill", x, y, w, h)
end end
-- Border. -- Border.
love.graphics.setColor(0, 0, 0, 63) love.graphics.setColor(0, 0, 0, 63/255)
love.graphics.rectangle("line", self.x+self.width, self.y, self.bar_width, self.height) love.graphics.rectangle("line", self.x+self.width, self.y, self.bar_width, self.height)
love.graphics.rectangle("line", self.x, self.y, self.width, self.height) love.graphics.rectangle("line", self.x, self.y, self.width, self.height)
end end