Skip to content

Instantly share code, notes, and snippets.

@kungfooman
Created June 19, 2017 07:06
Show Gist options
  • Save kungfooman/7900b67046d9f409270fed9535b458d9 to your computer and use it in GitHub Desktop.
Save kungfooman/7900b67046d9f409270fed9535b458d9 to your computer and use it in GitHub Desktop.
type keyboard_s
forward::Int32
backward::Int32
left::Int32
right::Int32
jump::Int32
end
thekeyboard = keyboard_s(1,2,3,4,5)
ptr = pointer_from_objref(thekeyboard)
samekeyboard = unsafe_pointer_to_objref(ptr)
samekeyboard.forward = 123
thekeyboard.forward == 123 # is true
thekeyboard.backward = 10000
samekeyboard.backward == 10000 # is true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment