fuck this

This commit is contained in:
d
2025-05-01 10:08:28 +03:00
parent dab24fedf1
commit 640be9230d
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
local raster = import("raster") local raster = import("raster")
raster.drawPixel(4, 3, 0xFFFF00) raster.drawPixel(4, 3, 0xFFFF00)
raster.drawPixel(40, 34, nil, 0xFF00FF) raster.drawPixel(40, 34, nil, 0xFF00F)
raster.drawPixel(3, 3) raster.drawPixel(3, 1)
+4 -3
View File
@@ -21,12 +21,13 @@ function raster.drawPixel(x, y, newbg, newfg)
end end
ocelot.log(tostring(newi)) ocelot.log(tostring(newi))
newchar = char|(1<<newi) -- boom and its combined newchar = char|(1<<newi) -- boom and its combined
if newchar < 0x2800 then newchar = newchar+0x2800 end
ocelot.log(tostring(newchar)) ocelot.log(tostring(newchar))
-- termlib.cursorPosX = math.floor(x/2) -- math.floor() for good measure termlib.cursorPosX = math.floor(x/2) -- math.floor() for good measure
-- termlib.cursorPosY = math.floor(y/4) termlib.cursorPosY = math.floor(y/4)
if newbg == nil then gpu.setBackground(bg) else gpu.setBackground(newbg) end if newbg == nil then gpu.setBackground(bg) else gpu.setBackground(newbg) end
if newfg == nil then gpu.setForeground(fg) else gpu.setForeground(newfg) end if newfg == nil then gpu.setForeground(fg) else gpu.setForeground(newfg) end
print(string.byte(newchar), false, false) print(utf8.char(newchar), false, false)
-- print it without newline or wrapping -- print it without newline or wrapping
-- (in case someone wants to draw a pixel off-screen. why would you do that?) -- (in case someone wants to draw a pixel off-screen. why would you do that?)
end end