Reviewed formating and spacing

This commit is contained in:
Ray
2026-01-28 19:34:55 +01:00
parent af37fa2a96
commit 8a2da96eed

View File

@ -3831,7 +3831,6 @@ void PlayAutomationEvent(AutomationEvent event)
// Check if a key has been pressed once // Check if a key has been pressed once
bool IsKeyPressed(int key) bool IsKeyPressed(int key)
{ {
bool pressed = false; bool pressed = false;
if ((key > 0) && (key < MAX_KEYBOARD_KEYS)) if ((key > 0) && (key < MAX_KEYBOARD_KEYS))
@ -4055,12 +4054,10 @@ bool IsMouseButtonPressed(int button)
if ((button >= 0) && (button <= MOUSE_BUTTON_BACK)) if ((button >= 0) && (button <= MOUSE_BUTTON_BACK))
{ {
if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) pressed = true; if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) pressed = true;
// Map touches to mouse buttons checking // Map touches to mouse buttons checking
if ((CORE.Input.Touch.currentTouchState[button] == 1) && (CORE.Input.Touch.previousTouchState[button] == 0)) pressed = true; if ((CORE.Input.Touch.currentTouchState[button] == 1) && (CORE.Input.Touch.previousTouchState[button] == 0)) pressed = true;
} }
return pressed; return pressed;
@ -4073,12 +4070,10 @@ bool IsMouseButtonDown(int button)
if ((button >= 0) && (button <= MOUSE_BUTTON_BACK)) if ((button >= 0) && (button <= MOUSE_BUTTON_BACK))
{ {
if (CORE.Input.Mouse.currentButtonState[button] == 1) down = true; if (CORE.Input.Mouse.currentButtonState[button] == 1) down = true;
// NOTE: Touches are considered like mouse buttons // NOTE: Touches are considered like mouse buttons
if (CORE.Input.Touch.currentTouchState[button] == 1) down = true; if (CORE.Input.Touch.currentTouchState[button] == 1) down = true;
} }
return down; return down;
@ -4091,12 +4086,10 @@ bool IsMouseButtonReleased(int button)
if ((button >= 0) && (button <= MOUSE_BUTTON_BACK)) if ((button >= 0) && (button <= MOUSE_BUTTON_BACK))
{ {
if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) released = true; if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) released = true;
// Map touches to mouse buttons checking // Map touches to mouse buttons checking
if ((CORE.Input.Touch.currentTouchState[button] == 0) && (CORE.Input.Touch.previousTouchState[button] == 1)) released = true; if ((CORE.Input.Touch.currentTouchState[button] == 0) && (CORE.Input.Touch.previousTouchState[button] == 1)) released = true;
} }
return released; return released;
@ -4109,12 +4102,10 @@ bool IsMouseButtonUp(int button)
if ((button >= 0) && (button <= MOUSE_BUTTON_BACK)) if ((button >= 0) && (button <= MOUSE_BUTTON_BACK))
{ {
if (CORE.Input.Mouse.currentButtonState[button] == 0) up = true; if (CORE.Input.Mouse.currentButtonState[button] == 0) up = true;
// NOTE: Touches are considered like mouse buttons // NOTE: Touches are considered like mouse buttons
if (CORE.Input.Touch.currentTouchState[button] == 0) up = true; if (CORE.Input.Touch.currentTouchState[button] == 0) up = true;
} }
return up; return up;
@ -4124,6 +4115,7 @@ bool IsMouseButtonUp(int button)
int GetMouseX(void) int GetMouseX(void)
{ {
int mouseX = (int)((CORE.Input.Mouse.currentPosition.x + CORE.Input.Mouse.offset.x)*CORE.Input.Mouse.scale.x); int mouseX = (int)((CORE.Input.Mouse.currentPosition.x + CORE.Input.Mouse.offset.x)*CORE.Input.Mouse.scale.x);
return mouseX; return mouseX;
} }
@ -4131,6 +4123,7 @@ int GetMouseX(void)
int GetMouseY(void) int GetMouseY(void)
{ {
int mouseY = (int)((CORE.Input.Mouse.currentPosition.y + CORE.Input.Mouse.offset.y)*CORE.Input.Mouse.scale.y); int mouseY = (int)((CORE.Input.Mouse.currentPosition.y + CORE.Input.Mouse.offset.y)*CORE.Input.Mouse.scale.y);
return mouseY; return mouseY;
} }