Attempt to get rid of white image artifact

It only shows up on CC:Tweaked, not on CCEmuX. It makes all the images look bad.
This commit is contained in:
LDDestroier 2019-02-23 16:33:12 -05:00 committed by GitHub
parent c1fc932c6b
commit 53100eee34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -413,8 +413,21 @@ local images = {
}
}
for k,v in pairs(images) do
-- give them easy-to-access x and y sizes
v.x = #v[1][1]
v.y = #v[1]
-- remove all that white bullshit that artifacts on cc:tweaked
for y = 1, v.y do
for x = 1, v.x do
if v[2][y]:sub(x,x) ~= "" and v[3][y]:sub(x,x) ~= "" then
if (v[2][y]:sub(x,x) == " " and v[3][y]:sub(x,x) ~= " ") then
images[k][2][y] = v[2][y]:sub(1, x - 1) .. "f" .. v[2][y]:sub(x + 1)
elseif (v[2][y]:sub(x,x) ~= " " and v[3][y]:sub(x,x) == " ") then
images[k][3][y] = v[3][y]:sub(1, x - 1) .. "f" .. v[3][y]:sub(x + 1)
end
end
end
end
end
local drawImage = function(im, x, y)