1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-27 04:38:06 +11:00

I dunno what this does.

This commit is contained in:
Jane Roxanne 2020-05-17 18:55:09 -05:00
parent 3b484d8c5c
commit 530796bf5f

View File

@ -18,9 +18,9 @@ do
if (depth == 4) then --pregen color if (depth == 4) then --pregen color
for i=0, 15 do for i=0, 15 do
local hi = i >> 3 local hi = i >> 3
local b = (i >> 2) & 1 local r = (i >> 2) & 1
local g = (i >> 1) & 1 local g = (i >> 1) & 1
local r = i & 1 local b = i & 1
local fr = (r * 0x7F) | (hi << 7) local fr = (r * 0x7F) | (hi << 7)
local fg = (g * 0x7F) | (hi << 7) local fg = (g * 0x7F) | (hi << 7)
local fb = (b * 0x7F) | (hi << 7) local fb = (b * 0x7F) | (hi << 7)
@ -29,6 +29,7 @@ do
end end
function colors(i) function colors(i)
if (i < 0) then i = 0 elseif (i > 15) then i = 15 end
if (depth == 1) then if (depth == 1) then
return ((i > 0) and 0xFFFFFF) or 0 return ((i > 0) and 0xFFFFFF) or 0
elseif (depth == 4) then elseif (depth == 4) then