You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
660 B

import extern c "/home/alec/repos/unholy-jakt/include/input.h" {}
struct Input {
function key_down(scancode: u8) -> bool {
mut key_is_down = false;
unsafe {
cpp {
"key_is_down = input_key_down(scancode);";
}
}
return key_is_down;
}
function mouse_x() -> i64 {
mut x = 0
unsafe {
cpp {
"x = input_mouse_x();";
}
}
return x;
}
function mouse_y() -> i64 {
mut y = 0
unsafe {
cpp {
"y = input_mouse_y();";
}
}
return y;
}
}