|
@@ -421,7 +421,7 @@ const List<uint32>& Window::Input::getUnicode() {
|
|
|
return input;
|
|
|
}*/
|
|
|
|
|
|
-Button coreControlsAdd(const char* name) {
|
|
|
+Button coreAddButton(const char* name) {
|
|
|
if(buttonIndex >= BUTTONS) {
|
|
|
return 0;
|
|
|
}
|
|
@@ -430,47 +430,47 @@ Button coreControlsAdd(const char* name) {
|
|
|
return b;
|
|
|
}
|
|
|
|
|
|
-void coreControlsBindKey(Button b, int key) {
|
|
|
+void coreBindKeyToButton(Button b, int key) {
|
|
|
if(key >= 0 && key < KEYS) {
|
|
|
keyToButton[key] = b;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void coreControlsBindGamepad(Button b, int gamepadButton) {
|
|
|
+void coreBindGamepadToButton(Button b, int gamepadButton) {
|
|
|
if(gamepadButton >= 0 && gamepadButton < GAMEPAD_BUTTONS) {
|
|
|
gamepadToButton[gamepadButton] = b;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void coreControlsBindMouse(Button b, int mouseButton) {
|
|
|
+void coreBindMouseToButton(Button b, int mouseButton) {
|
|
|
if(mouseButton >= 0 && mouseButton < MOUSE_BUTTONS) {
|
|
|
mouseToButton[mouseButton] = b;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-Vector2 coreControlsLastMousePosition(void) {
|
|
|
+Vector2 coreGetLastMousePosition(void) {
|
|
|
return lastMousePosition;
|
|
|
}
|
|
|
|
|
|
-Vector2 coreControlsMousePosition(void) {
|
|
|
+Vector2 coreGetMousePosition(void) {
|
|
|
return mousePosition;
|
|
|
}
|
|
|
|
|
|
-Vector2 coreControlsLeftGamepadAxis(void) {
|
|
|
+Vector2 coreGetLeftGamepadAxis(void) {
|
|
|
return (Vector2){{lastControllerState.axes[GLFW_GAMEPAD_AXIS_LEFT_X],
|
|
|
lastControllerState.axes[GLFW_GAMEPAD_AXIS_LEFT_Y]}};
|
|
|
}
|
|
|
|
|
|
-Vector2 coreControlsRightGamepadAxis(void) {
|
|
|
+Vector2 coreGetRightGamepadAxis(void) {
|
|
|
return (Vector2){{lastControllerState.axes[GLFW_GAMEPAD_AXIS_RIGHT_X],
|
|
|
lastControllerState.axes[GLFW_GAMEPAD_AXIS_RIGHT_Y]}};
|
|
|
}
|
|
|
|
|
|
-float coreControlsLeftGamepadTrigger(void) {
|
|
|
+float coreGetLeftGamepadTrigger(void) {
|
|
|
return lastControllerState.axes[GLFW_GAMEPAD_AXIS_LEFT_TRIGGER];
|
|
|
}
|
|
|
|
|
|
-float coreControlsRightGamepadTrigger(void) {
|
|
|
+float coreGetRightGamepadTrigger(void) {
|
|
|
return lastControllerState.axes[GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER];
|
|
|
}
|
|
|
|
|
@@ -478,18 +478,18 @@ static const ButtonData* getButton(Button id) {
|
|
|
return buttons + (id >= buttonIndex ? 0 : id);
|
|
|
}
|
|
|
|
|
|
-bool coreControlsDown(Button b) {
|
|
|
+bool coreIsButtonDown(Button b) {
|
|
|
return getButton(b)->downTime > 0;
|
|
|
}
|
|
|
|
|
|
-int coreControlsDownTime(Button b) {
|
|
|
+int coreGetButtonDownTime(Button b) {
|
|
|
return getButton(b)->downTime;
|
|
|
}
|
|
|
|
|
|
-bool coreControlsReleased(Button b) {
|
|
|
+bool coreWasButtonReleased(Button b) {
|
|
|
return getButton(b)->released;
|
|
|
}
|
|
|
|
|
|
-const char* coreControlsName(Button b) {
|
|
|
+const char* coreGetButtonName(Button b) {
|
|
|
return getButton(b)->name;
|
|
|
}
|