1
1
зеркало из https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-09-27 14:45:18 -04:00

reduced redraw to two draw calls, four colour calls, and one get call: draw line, get character, invert colours for cell

Этот коммит содержится в:
XeonSquared 2020-06-11 13:34:59 +10:00
родитель b4db6c7226
Коммит 642eb9adf1

Просмотреть файл

@ -261,14 +261,7 @@ function buffer:read(...)
io.write("\27[s\27[8m")
local pos, buffer = 1, ""
local function redraw()
io.write("\27[u")
io.write(buffer.." ")
if pos < 1 then
io.write("\28[D")
else
io.write("\27[u")
io.write(buffer:sub(1,(#buffer-pos)+1))
end
io.write("\27[u"..buffer.." \27[u\27["..tostring((#buffer-pos)+1).."C")
end
while true do
char = readBytesOrChars(1)