make states numbers instead of booleans

This commit is contained in:
Redo0
2021-05-29 13:14:50 -05:00
parent b08c3cd0c4
commit 16c1a9f75f
309 changed files with 2819 additions and 2819 deletions

View File

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