mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-23 19:08:05 +11:00
Update logo and app-klogo slightly to work fine on monochrome monitors.
This commit is contained in:
parent
0fc497c13f
commit
491f5ad3cc
@ -60,11 +60,20 @@ lcWidth = bitmap.dsSpan
|
|||||||
|
|
||||||
local running = true
|
local running = true
|
||||||
|
|
||||||
local function decodeRGB(rgb, igp)
|
local function decodeRGB(rgb, igp, col)
|
||||||
if igp and bitmap.bpp > 24 then
|
if igp and bitmap.bpp > 24 then
|
||||||
rgb = math.floor(rgb / 256)
|
rgb = math.floor(rgb / 256)
|
||||||
end
|
end
|
||||||
return math.floor(rgb / 65536) % 256, math.floor(rgb / 256) % 256, rgb % 256
|
local r, g, b = math.floor(rgb / 65536) % 256, math.floor(rgb / 256) % 256, rgb % 256
|
||||||
|
-- the new KittenOS NEO logo is 'sensitive' to dithering, so disable it
|
||||||
|
if not col then
|
||||||
|
-- ...and the palette is a bit odd, oh well
|
||||||
|
if math.max(r, g, b) < 0xC0 then
|
||||||
|
return 0, 0, 0
|
||||||
|
end
|
||||||
|
return 255, 255, 255
|
||||||
|
end
|
||||||
|
return r, g, b
|
||||||
end
|
end
|
||||||
|
|
||||||
local bW, bH = math.ceil(bitmap.width / 2), math.ceil(bitmap.height / 4)
|
local bW, bH = math.ceil(bitmap.width / 2), math.ceil(bitmap.height / 4)
|
||||||
@ -74,9 +83,9 @@ local fp = neoux.tcwindow(bW, bH, {
|
|||||||
selectable = true,
|
selectable = true,
|
||||||
get = function (window, x, y, bg, fg, selected, colour)
|
get = function (window, x, y, bg, fg, selected, colour)
|
||||||
if bitmap.ignoresPalette then
|
if bitmap.ignoresPalette then
|
||||||
return decodeRGB(bitmap.getPixel(x - 1, y - 1, 0), true)
|
return decodeRGB(bitmap.getPixel(x - 1, y - 1, 0), true, colour)
|
||||||
end
|
end
|
||||||
return decodeRGB(bitmap.getPalette(bitmap.getPixel(x - 1, y - 1, 0)), false)
|
return decodeRGB(bitmap.getPalette(bitmap.getPixel(x - 1, y - 1, 0)), false, colour)
|
||||||
end
|
end
|
||||||
}, 1)
|
}, 1)
|
||||||
}, function (w)
|
}, function (w)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue
Block a user