diff --git a/BINDINGS.md b/BINDINGS.md index 7c393593c..f528c892a 100644 --- a/BINDINGS.md +++ b/BINDINGS.md @@ -103,7 +103,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause | | [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain | | [raylib-apl](https://github.com/Brian-ED/raylib-apl) | **5.0** | [Dyalog APL](https://www.dyalog.com/) | MIT | -| [raylib-jai](https://github.com/ahmedqarmout2/raylib-jai) | **5.5** | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | MIT | +| [raylib-jai](https://github.com/ahmedqarmout2/raylib-jai) | **6.0** | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | MIT | | [fnl-raylib](https://github.com/0riginaln0/fnl-raylib) | **5.5** | [Fennel](https://fennel-lang.org/) | MIT | | [Rayua](https://github.com/uiua-lang/rayua) | **5.5** | [Uiua](https://www.uiua.org/) | **???** | | [Target](https://github.com/FinnDemonCat/Target/tree/main/libs/raylib) | **5.5** | [Dart](https://dart.dev/) | Apache-2.0 license | diff --git a/CMakeLists.txt b/CMakeLists.txt index ca29ce0d6..637927400 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required(VERSION 3.22) -#this change avoid the warning that appear when we include raylib using Cmake fatch content project(raylib) # Avoid excessive expansion of variables in conditionals. In particular, if diff --git a/src/external/rlsw.h b/src/external/rlsw.h index b98a3f684..bb6e11679 100644 --- a/src/external/rlsw.h +++ b/src/external/rlsw.h @@ -1240,8 +1240,8 @@ static inline float sw_fract(float x) // Xtensa architecture optimization // Fast reciprocal: 1-ULP accurate in ~7 instructions using the -// hardware `recip0.s` seed + two Newton-Raphson refinement steps -// All work stays in FPU registers — no `__divsf3` software call +// hardware `recip0.s` seed + two Newton-Raphson refinement steps +// All work stays in FPU registers — no `__divsf3` software call // Hot-path divisions in the rasterizer (span/triangle setup, perspective divide, etc.) call this // On non-Xtensa targets it transparently expands to `1.0f / x`, so generated code is identical to before #if defined(__XTENSA__) @@ -5388,7 +5388,7 @@ static void SW_RASTER_TRIANGLE_SPAN(const sw_vertex_t *start, const sw_vertex_t if (xLoopStart >= xLoopEnd) return; // Nothing to draw // Get the current row and skip if outside the framebuffer - // Maybe this check is better suited elsewhere? + // Maybe this check is better suited elsewhere? int y = (int)start->position[1]; if (y < 0 || y >= RLSW.colorBuffer->height) return; diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index a2c005662..211917359 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -462,20 +462,22 @@ void RemapMouseToTouch(int touchAction); // --------------------------------------------------------------------------------- // RGFW Callbacks (instead of the older polling) // --------------------------------------------------------------------------------- -static void RGFW_cb_mousenotifyfunc(const RGFW_event* e) +static void RGFW_cb_mousenotifyfunc(const RGFW_event *e) { if (e->common.win != platform.window) return; CORE.Input.Mouse.cursorOnScreen = e->mouse.inWindow; } -// static void RGFW_cb_windowclosefunc(const RGFW_event* e) -// { -// if (e->common.win != platform.window) return; - -// // we don't want to close here. raylib handles it -// // RGFW_window_setShouldClose(platform.window, true); -// } -static void RGFW_cb_dropfunc(const RGFW_event* e) +/* +static void RGFW_cb_windowclosefunc(const RGFW_event *e) +{ + if (e->common.win != platform.window) return; + + // Don't want to close here, raylib handles it + //RGFW_window_setShouldClose(platform.window, true); +} +*/ +static void RGFW_cb_dropfunc(const RGFW_event *e) { if (e->common.win != platform.window) return; @@ -493,11 +495,11 @@ static void RGFW_cb_dropfunc(const RGFW_event* e) CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char)); strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], e->drop.value->data); - CORE.Window.dropFileCount++; + CORE.Window.dropFileCount++; } else TRACELOG(LOG_WARNING, "FILE: Maximum drag and drop files at once is limited to 1024 files!"); } -static void RGFW_cb_windowresizefunc(const RGFW_event* e) +static void RGFW_cb_windowresizefunc(const RGFW_event *e) { if (e->common.win != platform.window) return; @@ -506,7 +508,7 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e) #if defined(__APPLE__) if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI)) { - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio); CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f); @@ -551,7 +553,7 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e) #if defined(GRAPHICS_API_OPENGL_SOFTWARE) #if defined(__APPLE__) - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f); SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio); @@ -585,19 +587,19 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e) } #endif } -static void RGFW_cb_windowmaximizefunc(const RGFW_event* e) +static void RGFW_cb_windowmaximizefunc(const RGFW_event *e) { if (e->common.win != platform.window) return; FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was maximized } -static void RGFW_cb_windowminimizefunc(const RGFW_event* e) +static void RGFW_cb_windowminimizefunc(const RGFW_event *e) { if (e->common.win != platform.window) return; - + FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified } -static void RGFW_cb_windowrestorefunc(const RGFW_event* e) +static void RGFW_cb_windowrestorefunc(const RGFW_event *e) { if (e->common.win != platform.window) return; @@ -606,17 +608,17 @@ static void RGFW_cb_windowrestorefunc(const RGFW_event* e) if (RGFW_window_isMinimized(platform.window)) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored } -static void RGFW_cb_windowmovefunc(const RGFW_event* e) +static void RGFW_cb_windowmovefunc(const RGFW_event *e) { if (e->common.win != platform.window) return; CORE.Window.position.x = platform.window->x; CORE.Window.position.y = platform.window->x; } -static void RGFW_cb_keycharfunc(const RGFW_event* e) +static void RGFW_cb_keycharfunc(const RGFW_event *e) { if (e->common.win != platform.window) return; - + // NOTE: event.text.text data comes an UTF-8 text sequence but registering codepoints (int) // Check if there is space available in the queue if (CORE.Input.Keyboard.charPressedQueueCount < MAX_CHAR_PRESSED_QUEUE) @@ -626,14 +628,14 @@ static void RGFW_cb_keycharfunc(const RGFW_event* e) CORE.Input.Keyboard.charPressedQueueCount++; } } -static void RGFW_cb_scrollfunc(const RGFW_event* e) +static void RGFW_cb_scrollfunc(const RGFW_event *e) { if (e->common.win != platform.window) return; CORE.Input.Mouse.currentWheelMove.x += e->delta.x; CORE.Input.Mouse.currentWheelMove.y += e->delta.y; } -static void RGFW_cb_mousebuttonfunc(const RGFW_event* e) +static void RGFW_cb_mousebuttonfunc(const RGFW_event *e) { if (e->common.win != platform.window) return; @@ -658,7 +660,7 @@ static void RGFW_cb_mousebuttonfunc(const RGFW_event* e) RemapMouseToTouch(0); } } -static void RGFW_cb_mouserawmotionfunc(const RGFW_event* e) +static void RGFW_cb_mouserawmotionfunc(const RGFW_event *e) { if (!RGFW_window_isRawMouseMode(platform.window)) { @@ -686,7 +688,7 @@ static void RGFW_cb_mouserawmotionfunc(const RGFW_event* e) CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition; RemapMouseToTouch(2); } -static void RGFW_cb_mousemotionfunc(const RGFW_event* e) +static void RGFW_cb_mousemotionfunc(const RGFW_event *e) { if (RGFW_window_isRawMouseMode(platform.window)) { @@ -776,7 +778,7 @@ void ToggleFullscreen(void) CORE.Window.previousPosition.y = currentPosition.y; CORE.Window.previousScreen = CORE.Window.screen; - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); RGFW_monitor_scaleToWindow(currentMonitor, platform.window); RGFW_window_setFullscreen(platform.window, 1); } @@ -921,7 +923,7 @@ void SetWindowState(unsigned int flags) } if (FLAG_IS_SET(flags, FLAG_MSAA_4X_HINT)) { - RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL(); + RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL(); hints->samples = 4; RGFW_setGlobalHints_OpenGL(hints); } @@ -997,7 +999,7 @@ void ClearWindowState(unsigned int flags) } if (FLAG_IS_SET(flags, FLAG_MSAA_4X_HINT)) { - RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL(); + RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL(); hints->samples = 0; RGFW_setGlobalHints_OpenGL(hints); } @@ -1092,7 +1094,7 @@ void SetWindowSize(int width, int height) Vector2 scaleDpi = GetWindowScaleDPI(); #if defined(__APPLE__) - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f); CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio; @@ -1145,7 +1147,7 @@ void *GetWindowHandle(void) #elif defined(__linux__) #if defined(RGFW_X11) platform.windowHandleX11 = platform.window->src.window; // Type: Window (unsigned long) - handle = &platform.window->src.window; + handle = &platform.window->src.window; #elif defined(RGFW_WAYLAND) handle = (void *)platform.window->src.surface; // Type: struct wl_surface* #endif @@ -1643,7 +1645,7 @@ void PollInputEvents(void) case GAMEPAD_AXIS_RIGHT_TRIGGER: CORE.Input.Gamepad.axisState[gamepadIndex][axis] = platform.minigamepad.gamepads[gamepadIndex].axes[gamepad_event.axis].value; - /* trigger button press when axis is all the way */ + // Trigger button press when axis is all the way int button = (axis == GAMEPAD_AXIS_LEFT_TRIGGER) ? GAMEPAD_BUTTON_LEFT_TRIGGER_2 : GAMEPAD_BUTTON_RIGHT_TRIGGER_2; int pressed = (platform.minigamepad.gamepads[gamepadIndex].axes[gamepad_event.axis].value >= 1.0f); @@ -1763,7 +1765,7 @@ int InitPlatform(void) // NOTE: Some OpenGL context attributes must be set before window creation // Check selection OpenGL version - RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL(); + RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL(); if (rlGetVersion() == RL_OPENGL_21) { hints->major = 2; @@ -1838,7 +1840,7 @@ int InitPlatform(void) Vector2 scaleDpi = GetWindowScaleDPI(); #if defined(__APPLE__) - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f); CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio; @@ -1856,7 +1858,7 @@ int InitPlatform(void) #if defined(GRAPHICS_API_OPENGL_SOFTWARE) // apple always scales for retina #if defined(__APPLE__) - RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window); + RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window); CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f); CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio; @@ -2045,7 +2047,7 @@ void RemapMouseToTouch(int touchAction) gestureEvent.pointCount = 1; // Register touch points position, only one point registered - if (touchAction == 2 /* || realTouch */) gestureEvent.position[0] = CORE.Input.Touch.position[0]; + if (touchAction == 2 /*|| realTouch*/) gestureEvent.position[0] = CORE.Input.Touch.position[0]; else gestureEvent.position[0] = GetMousePosition(); // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index d568ec095..8ff17271f 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -56,7 +56,7 @@ #include "SDL3/SDL.h" #elif defined(USING_SDL2_PROJECT) #include "SDL2/SDL.h" - #include "SDL2/SDL_syswm.h" // Required to get window handlers + #include "SDL2/SDL_syswm.h" // Required to get window handlers #else #include "SDL.h" #endif diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index 16ac21e26..ef40caa9e 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -566,100 +566,100 @@ static KeyboardKey GetKeyFromWparam(WPARAM wparam) case 'X': return KEY_X; case 'Y': return KEY_Y; case 'Z': return KEY_Z; - /* case VK_LWIN: return KEY_; */ - /* case VK_RWIN: return KEY_; */ - /* case VK_APPS: return KEY_; */ - /* case VK_SLEEP: return KEY_; */ - /* case VK_NUMPAD0: return KEY_; */ - /* case VK_NUMPAD1: return KEY_; */ - /* case VK_NUMPAD2: return KEY_; */ - /* case VK_NUMPAD3: return KEY_; */ - /* case VK_NUMPAD4: return KEY_; */ - /* case VK_NUMPAD5: return KEY_; */ - /* case VK_NUMPAD6: return KEY_; */ - /* case VK_NUMPAD7: return KEY_; */ - /* case VK_NUMPAD8: return KEY_; */ - /* case VK_NUMPAD9: return KEY_; */ - /* case VK_MULTIPLY: return KEY_; */ - /* case VK_ADD: return KEY_; */ - /* case VK_SEPARATOR: return KEY_; */ - /* case VK_SUBTRACT: return KEY_; */ - /* case VK_DECIMAL: return KEY_; */ - /* case VK_DIVIDE: return KEY_; */ - /* case VK_F1: return KEY_; */ - /* case VK_F2: return KEY_; */ - /* case VK_F3: return KEY_; */ - /* case VK_F4: return KEY_; */ - /* case VK_F5: return KEY_; */ - /* case VK_F6: return KEY_; */ - /* case VK_F7: return KEY_; */ - /* case VK_F8: return KEY_; */ - /* case VK_F9: return KEY_; */ - /* case VK_F10: return KEY_; */ - /* case VK_F11: return KEY_; */ - /* case VK_F12: return KEY_; */ - /* case VK_F13: return KEY_; */ - /* case VK_F14: return KEY_; */ - /* case VK_F15: return KEY_; */ - /* case VK_F16: return KEY_; */ - /* case VK_F17: return KEY_; */ - /* case VK_F18: return KEY_; */ - /* case VK_F19: return KEY_; */ - /* case VK_F20: return KEY_; */ - /* case VK_F21: return KEY_; */ - /* case VK_F22: return KEY_; */ - /* case VK_F23: return KEY_; */ - /* case VK_F24: return KEY_; */ - /* case VK_NUMLOCK: return KEY_; */ - /* case VK_SCROLL: return KEY_; */ - /* case VK_LSHIFT: return KEY_; */ - /* case VK_RSHIFT: return KEY_; */ - /* case VK_LCONTROL: return KEY_; */ - /* case VK_RCONTROL: return KEY_; */ - /* case VK_LMENU: return KEY_; */ - /* case VK_RMENU: return KEY_; */ - /* case VK_BROWSER_BACK: return KEY_; */ - /* case VK_BROWSER_FORWARD: return KEY_; */ - /* case VK_BROWSER_REFRESH: return KEY_; */ - /* case VK_BROWSER_STOP: return KEY_; */ - /* case VK_BROWSER_SEARCH: return KEY_; */ - /* case VK_BROWSER_FAVORITES: return KEY_; */ - /* case VK_BROWSER_HOME: return KEY_; */ - /* case VK_VOLUME_MUTE: return KEY_; */ - /* case VK_VOLUME_DOWN: return KEY_; */ - /* case VK_VOLUME_UP: return KEY_; */ - /* case VK_MEDIA_NEXT_TRACK: return KEY_; */ - /* case VK_MEDIA_PREV_TRACK: return KEY_; */ - /* case VK_MEDIA_STOP: return KEY_; */ - /* case VK_MEDIA_PLAY_PAUSE: return KEY_; */ - /* case VK_LAUNCH_MAIL: return KEY_; */ - /* case VK_LAUNCH_MEDIA_SELECT: return KEY_; */ - /* case VK_LAUNCH_APP1: return KEY_; */ - /* case VK_LAUNCH_APP2: return KEY_; */ - /* case VK_OEM_1: return KEY_; */ - /* case VK_OEM_PLUS: return KEY_; */ - /* case VK_OEM_COMMA: return KEY_; */ - /* case VK_OEM_MINUS: return KEY_; */ - /* case VK_OEM_PERIOD: return KEY_; */ - /* case VK_OEM_2: return KEY_; */ - /* case VK_OEM_3: return KEY_; */ - /* case VK_OEM_4: return KEY_; */ - /* case VK_OEM_5: return KEY_; */ - /* case VK_OEM_6: return KEY_; */ - /* case VK_OEM_7: return KEY_; */ - /* case VK_OEM_8: return KEY_; */ - /* case VK_OEM_102: return KEY_; */ - /* case VK_PROCESSKEY: return KEY_; */ - /* case VK_PACKET: return KEY_; */ - /* case VK_ATTN: return KEY_; */ - /* case VK_CRSEL: return KEY_; */ - /* case VK_EXSEL: return KEY_; */ - /* case VK_EREOF: return KEY_; */ - /* case VK_PLAY: return KEY_; */ - /* case VK_ZOOM: return KEY_; */ - /* case VK_NONAME: return KEY_; */ - /* case VK_PA1: return KEY_; */ - /* case VK_OEM_CLEAR: return KEY_; */ + //case VK_LWIN: return KEY_; + //case VK_RWIN: return KEY_; + //case VK_APPS: return KEY_; + //case VK_SLEEP: return KEY_; + //case VK_NUMPAD0: return KEY_; + //case VK_NUMPAD1: return KEY_; + //case VK_NUMPAD2: return KEY_; + //case VK_NUMPAD3: return KEY_; + //case VK_NUMPAD4: return KEY_; + //case VK_NUMPAD5: return KEY_; + //case VK_NUMPAD6: return KEY_; + //case VK_NUMPAD7: return KEY_; + //case VK_NUMPAD8: return KEY_; + //case VK_NUMPAD9: return KEY_; + //case VK_MULTIPLY: return KEY_; + //case VK_ADD: return KEY_; + //case VK_SEPARATOR: return KEY_; + //case VK_SUBTRACT: return KEY_; + //case VK_DECIMAL: return KEY_; + //case VK_DIVIDE: return KEY_; + //case VK_F1: return KEY_; + //case VK_F2: return KEY_; + //case VK_F3: return KEY_; + //case VK_F4: return KEY_; + //case VK_F5: return KEY_; + //case VK_F6: return KEY_; + //case VK_F7: return KEY_; + //case VK_F8: return KEY_; + //case VK_F9: return KEY_; + //case VK_F10: return KEY_; + //case VK_F11: return KEY_; + //case VK_F12: return KEY_; + //case VK_F13: return KEY_; + //case VK_F14: return KEY_; + //case VK_F15: return KEY_; + //case VK_F16: return KEY_; + //case VK_F17: return KEY_; + //case VK_F18: return KEY_; + //case VK_F19: return KEY_; + //case VK_F20: return KEY_; + //case VK_F21: return KEY_; + //case VK_F22: return KEY_; + //case VK_F23: return KEY_; + //case VK_F24: return KEY_; + //case VK_NUMLOCK: return KEY_; + //case VK_SCROLL: return KEY_; + //case VK_LSHIFT: return KEY_; + //case VK_RSHIFT: return KEY_; + //case VK_LCONTROL: return KEY_; + //case VK_RCONTROL: return KEY_; + //case VK_LMENU: return KEY_; + //case VK_RMENU: return KEY_; + //case VK_BROWSER_BACK: return KEY_; + //case VK_BROWSER_FORWARD: return KEY_; + //case VK_BROWSER_REFRESH: return KEY_; + //case VK_BROWSER_STOP: return KEY_; + //case VK_BROWSER_SEARCH: return KEY_; + //case VK_BROWSER_FAVORITES: return KEY_; + //case VK_BROWSER_HOME: return KEY_; + //case VK_VOLUME_MUTE: return KEY_; + //case VK_VOLUME_DOWN: return KEY_; + //case VK_VOLUME_UP: return KEY_; + //case VK_MEDIA_NEXT_TRACK: return KEY_; + //case VK_MEDIA_PREV_TRACK: return KEY_; + //case VK_MEDIA_STOP: return KEY_; + //case VK_MEDIA_PLAY_PAUSE: return KEY_; + //case VK_LAUNCH_MAIL: return KEY_; + //case VK_LAUNCH_MEDIA_SELECT: return KEY_; + //case VK_LAUNCH_APP1: return KEY_; + //case VK_LAUNCH_APP2: return KEY_; + //case VK_OEM_1: return KEY_; + //case VK_OEM_PLUS: return KEY_; + //case VK_OEM_COMMA: return KEY_; + //case VK_OEM_MINUS: return KEY_; + //case VK_OEM_PERIOD: return KEY_; + //case VK_OEM_2: return KEY_; + //case VK_OEM_3: return KEY_; + //case VK_OEM_4: return KEY_; + //case VK_OEM_5: return KEY_; + //case VK_OEM_6: return KEY_; + //case VK_OEM_7: return KEY_; + //case VK_OEM_8: return KEY_; + //case VK_OEM_102: return KEY_; + //case VK_PROCESSKEY: return KEY_; + //case VK_PACKET: return KEY_; + //case VK_ATTN: return KEY_; + //case VK_CRSEL: return KEY_; + //case VK_EXSEL: return KEY_; + //case VK_EREOF: return KEY_; + //case VK_PLAY: return KEY_; + //case VK_ZOOM: return KEY_; + //case VK_NONAME: return KEY_; + //case VK_PA1: return KEY_; + //case VK_OEM_CLEAR: return KEY_; default: return KEY_NULL; } } diff --git a/src/platforms/rcore_memory.c b/src/platforms/rcore_memory.c index e7934bd96..14c56a591 100644 --- a/src/platforms/rcore_memory.c +++ b/src/platforms/rcore_memory.c @@ -366,7 +366,7 @@ double GetTime(void) #if defined(_WIN32) LARGE_INTEGER currentTicks = { 0 }; QueryPerformanceCounter(¤tTicks); - + time = (double)(currentTicks.QuadPart - CORE.Time.base)/(double)platform.timerFrequency.QuadPart; #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) struct timespec ts = { 0 }; diff --git a/src/platforms/rcore_web_emscripten.c b/src/platforms/rcore_web_emscripten.c index 71388e19b..ff78ac547 100644 --- a/src/platforms/rcore_web_emscripten.c +++ b/src/platforms/rcore_web_emscripten.c @@ -633,7 +633,7 @@ void SetWindowSize(int width, int height) // When resizing the canvas, several elements must be considered: // - CSS canvas size: Web layout size, logical pixels // - Canvas contained framebuffer resolution - // * Browser monitor, device pixel ratio (HighDPI) + // - Browser monitor, device pixel ratio (HighDPI) double canvasCssWidth = 0.0; double canvasCssHeight = 0.0; diff --git a/src/raudio.c b/src/raudio.c index 7963eb33d..094ea7533 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -344,7 +344,7 @@ typedef enum { // Audio buffer struct struct rAudioBuffer { ma_data_converter converter; // Audio data converter - unsigned char* converterResidual; // Cached residual input frames for use by the converter + unsigned char *converterResidual; // Cached residual input frames for use by the converter unsigned int converterResidualCount; // The number of valid frames sitting in converterResidual AudioCallback callback; // Audio buffer callback for buffer filling on audio threads diff --git a/src/raymath.h b/src/raymath.h index 4751cf00e..ff6bb8d00 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -2714,13 +2714,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio stabilizer = fmaxf(stabilizer, fabsf(matColumns[i].y)); stabilizer = fmaxf(stabilizer, fabsf(matColumns[i].z)); } - matColumns[0] = Vector3Scale(matColumns[0], 1.0f / stabilizer); - matColumns[1] = Vector3Scale(matColumns[1], 1.0f / stabilizer); - matColumns[2] = Vector3Scale(matColumns[2], 1.0f / stabilizer); + matColumns[0] = Vector3Scale(matColumns[0], 1.0f/stabilizer); + matColumns[1] = Vector3Scale(matColumns[1], 1.0f/stabilizer); + matColumns[2] = Vector3Scale(matColumns[2], 1.0f/stabilizer); // X Scale scl.x = Vector3Length(matColumns[0]); - if (scl.x > eps) matColumns[0] = Vector3Scale(matColumns[0], 1.0f / scl.x); + if (scl.x > eps) matColumns[0] = Vector3Scale(matColumns[0], 1.0f/scl.x); // Compute XY shear and make col2 orthogonal shear[0] = Vector3DotProduct(matColumns[0], matColumns[1]); @@ -2730,7 +2730,7 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio scl.y = Vector3Length(matColumns[1]); if (scl.y > eps) { - matColumns[1] = Vector3Scale(matColumns[1], 1.0f / scl.y); + matColumns[1] = Vector3Scale(matColumns[1], 1.0f/scl.y); shear[0] /= scl.y; // Correct XY shear } @@ -2744,7 +2744,7 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio scl.z = Vector3Length(matColumns[2]); if (scl.z > eps) { - matColumns[2] = Vector3Scale(matColumns[2], 1.0f / scl.z); + matColumns[2] = Vector3Scale(matColumns[2], 1.0f/scl.z); shear[1] /= scl.z; // Correct XZ shear shear[2] /= scl.z; // Correct YZ shear } diff --git a/src/rcore.c b/src/rcore.c index a37400cf1..7455e3597 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2263,11 +2263,11 @@ int FileMove(const char *srcPath, const char *dstPath) if (FileExists(srcPath)) { result = FileCopy(srcPath, dstPath); - + if (result == 0) { // Make sure file has been correctly copied before removing - if (FileExists(dstPath) && (GetFileLength(srcPath) == GetFileLength(dstPath))) + if (FileExists(dstPath) && (GetFileLength(srcPath) == GetFileLength(dstPath))) { result = FileRemove(srcPath); if (result != 0) TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to remove source file after copy", srcPath); diff --git a/src/rmodels.c b/src/rmodels.c index 21f69c92e..3198e47a4 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -7212,7 +7212,7 @@ static Model LoadM3D(const char *fileName) return model; } -#define M3D_ANIMDELAY 17 // Animation frames delay, (~1000 ms/60 FPS = 16.666666* ms) +#define M3D_ANIMDELAY 17 // Animation frames delay, (~1000 ms/60 FPS = 16.666666 ms) // Load M3D animation data static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCount) diff --git a/src/rtext.c b/src/rtext.c index a7f715ba3..ae28c2f98 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -580,7 +580,7 @@ Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int TRACELOG(LOG_INFO, "FONT: Data loaded successfully (%i pixel size | %i glyphs)", font.baseSize, font.glyphCount); } - else + else { TRACELOG(LOG_WARNING, "FONT: Font is not supported by LoadFontEx/LoadFontFromMemory or no glyphs found, reverted to default font"); font = GetFontDefault(); @@ -947,8 +947,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp // Security fix: check both lower and upper bounds if (destX >= 0 && destX < atlas.width && destY >= 0 && destY < atlas.height) { - ((unsigned char *)atlas.data)[destY * atlas.width + destX] = - ((unsigned char *)glyphs[i].image.data)[y * glyphs[i].image.width + x]; + ((unsigned char *)atlas.data)[destY*atlas.width + destX] = + ((unsigned char *)glyphs[i].image.data)[y*glyphs[i].image.width + x]; } } } diff --git a/src/rtextures.c b/src/rtextures.c index e982a9d55..724fe73cd 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -573,7 +573,7 @@ Image LoadImageFromTexture(Texture2D texture) image.format = texture.format; #endif image.mipmaps = 1; - + TRACELOG(LOG_INFO, "TEXTURE: [ID %i] Pixel data retrieved successfully", texture.id); } else TRACELOG(LOG_WARNING, "TEXTURE: [ID %i] Failed to retrieve pixel data", texture.id); @@ -1503,7 +1503,7 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co if ((codepoint != ' ') && (codepoint != '\t')) { Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; - ImageDrawImagePro(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, + ImageDrawImagePro(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, (Vector2){ 0 }, 0.0f, tint); } diff --git a/tools/rexm/rexm.c b/tools/rexm/rexm.c index 58ae835f7..f268a7d44 100644 --- a/tools/rexm/rexm.c +++ b/tools/rexm/rexm.c @@ -680,7 +680,7 @@ int main(int argc, char *argv[]) LOG("INFO: [%s] Building example for PLATFORM_WEB (Host: POSIX)\n", GetFileNameWithoutExt(inFileName)); #endif system(TextFormat("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exCategory, exName)); - + // Update generated .html metadata LOG("INFO: [%s] Updating HTML Metadata...\n", TextFormat("%s.html", exName)); UpdateWebMetadata(TextFormat("%s/%s/%s.html", exBasePath, exCategory, exName), @@ -1886,11 +1886,11 @@ int main(int argc, char *argv[]) printf(" test : Build and Test example for Desktop and Web platforms\n"); printf(" validate : Validate examples collection, generates report\n"); printf(" update : Validate and update examples collection, generates report\n\n"); - + printf("OPTIONS:\n\n"); printf(" -h, --help : Show tool version and command line usage help\n"); printf(" -v, --verbose : Verbose mode, show additional logs on processes\n"); - + printf("\nEXAMPLES:\n\n"); printf(" > rexm add shapes_custom_stars\n"); printf(" Add and updates new example provided \n\n");