mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-23 10:58:06 +11:00
Fix bitmap library issues, bugfixes to everest and glacier
This commit is contained in:
parent
1e3bf096d5
commit
3bc323e268
@ -3,7 +3,7 @@
|
||||
return {
|
||||
["neo"] = {
|
||||
desc = "KittenOS NEO Kernel & Base Libs",
|
||||
v = 4,
|
||||
v = 5,
|
||||
deps = {
|
||||
},
|
||||
dirs = {
|
||||
|
@ -142,10 +142,10 @@ local function doBackgroundLine(m, mg, bdx, bdy, bdl)
|
||||
local str = unicode.sub(statusLine, bdx, bdx + bdl - 1)
|
||||
local strl = unicode.len(str)
|
||||
pcall(mg.set, bdx, bdy, unicode.undoSafeTextFormat(str))
|
||||
pcall(mg.fill, bdx + strl, bdy, bdl - strl, 1, " ")
|
||||
pcall(mg.set, bdx + strl, bdy, (" "):rep(bdl - strl))
|
||||
else
|
||||
monitorGPUColours(m, mg, 0x000040, 0)
|
||||
pcall(mg.fill, bdx, bdy, bdl, 1, " ")
|
||||
pcall(mg.set, bdx, bdy, (" "):rep(bdl))
|
||||
end
|
||||
end
|
||||
|
||||
@ -778,7 +778,7 @@ while not shuttingDown do
|
||||
if os1 then
|
||||
changeFocus(os1)
|
||||
else
|
||||
changeFocus(surfaces[1])
|
||||
changeFocus()
|
||||
end
|
||||
end
|
||||
if s[1] == "x.neo.sys.screens" then
|
||||
|
@ -125,7 +125,7 @@ local mBase = {
|
||||
end
|
||||
return s
|
||||
end,
|
||||
delSetting = function ()
|
||||
delSetting = function (name)
|
||||
neo.ensureType(name, "string")
|
||||
local val = nil
|
||||
if name == "password" or name == "pub.clipboard" then val = "" end
|
||||
|
@ -153,20 +153,8 @@ return {
|
||||
local planes = get16(0x1A)
|
||||
local bpp = get16(0x1C)
|
||||
local compression = get32(0x1E)
|
||||
local paletteCol = 0
|
||||
local other = get32(0x2E)
|
||||
paletteCol = other
|
||||
-- postprocess
|
||||
local paletteCol = get32(0x2E)
|
||||
|
||||
-- The actual values used for addressing, for cMode to mess with
|
||||
local basePtr = 14 + hdrSize + (paletteCol * 4)
|
||||
local scanWB = math.ceil((bpp * width) / 32) * 4
|
||||
local monoWB = (math.ceil((bpp * width) / 32) * 4)
|
||||
local planeWB = scanWB * height
|
||||
|
||||
if not packed then
|
||||
basePtr = get32(0x0A) -- 'BM' header
|
||||
end
|
||||
-- negative height means sane coords
|
||||
local upDown = true
|
||||
if height >= 0x80000000 then
|
||||
@ -175,6 +163,18 @@ return {
|
||||
upDown = false
|
||||
end
|
||||
|
||||
-- postprocess
|
||||
|
||||
-- The actual values used for addressing, for cMode to mess with
|
||||
local basePtr = 14 + hdrSize + (paletteCol * 4)
|
||||
local scanWB = math.ceil((bpp * width) / 32) * 4
|
||||
local monoWB = math.ceil(width / 32) * 4
|
||||
local planeWB = scanWB * height
|
||||
|
||||
if not packed then
|
||||
basePtr = get32(0x0A) -- 'BM' header
|
||||
end
|
||||
|
||||
-- Cursor/Icon
|
||||
if cMode then
|
||||
height = math.floor(height / 2)
|
||||
|
Loading…
Reference in New Issue
Block a user