make gates use net state pointers

This commit is contained in:
Redo
2022-11-04 15:50:45 -06:00
parent caa9ed5de3
commit 5aa11f9e43
3 changed files with 20 additions and 4 deletions

View File

@@ -104,6 +104,10 @@ function GateDefinition.constructgate(def, objref, position, rotation)
gate.ports[port.idx] = port
gate.port_nets[port.idx] = nil
gate.port_states[port.idx] = 0
gate.port_net_state [port.idx] = ffi.cast("int*", 0)
gate.port_net_state_num[port.idx] = ffi.cast("int*", 0)
gate.port_net_in_queue [port.idx] = ffi.cast("int*", 0)
end
return gate