fixed pixel to use new callback system

This commit is contained in:
Redo
2019-05-10 19:59:26 -05:00
parent 7f1c5ea417
commit 5b5231a4b3
70 changed files with 28929 additions and 28935 deletions

View File

@@ -1,24 +1,24 @@
return function(gate, argv)
if argv[1]=="\\:" then argv[1] = ";" end
local keycode = keyboard_keyToCode[argv[1]] or keyboard_keyToCode["invalid"]
local status = keyboard_strToBool[argv[2]]
local code = keycode+(status and 128 or 0)
local function queueBit(bit)
table.insert(gate.queueBits, 1, bit)
end
queueBit(true)
for bitidx = 1, 8 do
local val = bit.band(code, 0x80)~=0
queueBit(val)
code = bit.lshift(code, 1)
end
queueBit(false)
gate:queue(0)
end
return function(gate, argv)
if argv[1]=="\\:" then argv[1] = ";" end
local keycode = keyboard_keyToCode[argv[1]] or keyboard_keyToCode["invalid"]
local status = keyboard_strToBool[argv[2]]
local code = keycode+(status and 128 or 0)
local function queueBit(bit)
table.insert(gate.queueBits, 1, bit)
end
queueBit(true)
for bitidx = 1, 8 do
local val = bit.band(code, 0x80)~=0
queueBit(val)
code = bit.lshift(code, 1)
end
queueBit(false)
gate:queue(0)
end