From 8b3d054408c9d22e65870c67ae856005c24ed389 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 21 Sep 2021 23:49:42 +0200 Subject: [PATCH 01/12] Minor reviews --- src/models.c | 1 - src/raudio.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models.c b/src/models.c index b8221498a..ee55a100d 100644 --- a/src/models.c +++ b/src/models.c @@ -70,7 +70,6 @@ #define CGLTF_IMPLEMENTATION #include "external/cgltf.h" // glTF file format loading - #include "external/stb_image.h" // glTF texture images loading #endif #if defined(SUPPORT_FILEFORMAT_VOX) diff --git a/src/raudio.c b/src/raudio.c index 5ed3de7c2..7c4e9ca3b 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -26,8 +26,9 @@ * supported by default, to remove support, just comment unrequired #define in this module * * DEPENDENCIES: -* miniaudio.h - Audio device management lib (https://github.com/dr-soft/miniaudio) +* miniaudio.h - Audio device management lib (https://github.com/mackron/miniaudio) * stb_vorbis.h - Ogg audio files loading (http://www.nothings.org/stb_vorbis/) +* dr_wav.h - WAV audio files loading (http://github.com/mackron/dr_libs) * dr_mp3.h - MP3 audio file loading (https://github.com/mackron/dr_libs) * dr_flac.h - FLAC audio file loading (https://github.com/mackron/dr_libs) * jar_xm.h - XM module file loading From 99ab4d6cb8efe1dc8f6bfb2307da218ee485e6c3 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 00:15:06 +0200 Subject: [PATCH 02/12] WARNING: MODULES RENAMING!!! raylib modules have been slightly renamed to add some identity and note that they are independent modules that can be used as standalone separate parts of raylib if required. The renamed modules are: - `core` -> `rcore` - `shapes` -> `rshapes` - `textures` -> `rtextures` - `text` -> `rtext` - `models` -> `rmodels` - `camera` -> `rcamera` - `gestures` -> `rgestures` - `core` -> `rcore` All the build systems has been adapted to this change. --- CMakeOptions.txt | 14 +++++++------- HISTORY.md | 10 +++++----- projects/Geany/raylib_compile_sources.bat | 10 +++++----- projects/Notepad++/npes_saved_mingw.txt | Bin 7390 -> 7400 bytes projects/Notepad++/npes_saved_tcc.txt | Bin 7426 -> 7436 bytes projects/VS2019/raylib/raylib.vcxproj | 14 +++++++------- projects/scripts/build-linux.sh | 2 +- projects/scripts/build-osx.sh | 2 +- projects/scripts/build-rpi.sh | 2 +- projects/scripts/build-windows.bat | 2 +- src/CMakeLists.txt | 10 +++++----- src/Makefile | 10 +++++----- src/config.h | 4 ++-- src/{camera.h => rcamera.h} | 6 +++--- src/{core.c => rcore.c} | 12 ++++++------ src/{gestures.h => rgestures.h} | 9 ++++----- src/{models.c => rmodels.c} | 2 +- src/{shapes.c => rshapes.c} | 2 +- src/{text.c => rtext.c} | 2 +- src/{textures.c => rtextures.c} | 2 +- 20 files changed, 57 insertions(+), 58 deletions(-) rename src/{camera.h => rcamera.h} (99%) rename src/{core.c => rcore.c} (99%) rename src/{gestures.h => rgestures.h} (98%) rename src/{models.c => rmodels.c} (99%) rename src/{shapes.c => rshapes.c} (99%) rename src/{text.c => rtext.c} (99%) rename src/{textures.c => rtextures.c} (99%) diff --git a/CMakeOptions.txt b/CMakeOptions.txt index c024965e9..f3b647848 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -27,9 +27,9 @@ endif() option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF) set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option") -# core.c -cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (camera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON) -cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON) +# rcore.c +cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (rcamera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON) +cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" OFF CUSTOMIZE_BUILD OFF) cmake_dependent_option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON CUSTOMIZE_BUILD ON) @@ -41,10 +41,10 @@ cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution cmake_dependent_option(SUPPORT_DATA_STORAGE "Support for persistent data storage" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON) -# shapes.c +# rshapes.c cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON) -# textures.c +# rtextures.c cmake_dependent_option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON CUSTOMIZE_BUILD ON) @@ -61,12 +61,12 @@ cmake_dependent_option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" cmake_dependent_option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF} CUSTOMIZE_BUILD OFF) cmake_dependent_option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF} CUSTOMIZE_BUILD OFF) -# text.c +# rtext.c cmake_dependent_option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_TEXT_MANIPULATION "Support text manipulation functions" ON CUSTOMIZE_BUILD ON) -# models.c +# rmodels.c cmake_dependent_option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON CUSTOMIZE_BUILD ON) cmake_dependent_option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON CUSTOMIZE_BUILD ON) diff --git a/HISTORY.md b/HISTORY.md index 073d183c6..3d598c289 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -33,7 +33,7 @@ Lots of code changes and lot of testing have concluded in this amazing new rayli notes on raylib 1.2 ------------------- -On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/). +On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/). It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch. @@ -54,9 +54,9 @@ On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This - Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files. - - A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c). + - A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/rcamera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c). - - New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs. + - New [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.h) module simplifies gestures detection on Android and HTML5 programs. - [raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional. @@ -77,7 +77,7 @@ On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For - [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline. - - [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code. + - [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code. - Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). Gamepad support has also been added (experimental). @@ -106,7 +106,7 @@ On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new - Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck. -Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms. +Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms. This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes. diff --git a/projects/Geany/raylib_compile_sources.bat b/projects/Geany/raylib_compile_sources.bat index c17ffba9a..a0fb17a25 100644 --- a/projects/Geany/raylib_compile_sources.bat +++ b/projects/Geany/raylib_compile_sources.bat @@ -18,11 +18,11 @@ cmd /c del /F libraylib.a :: > Compile raylib modules :: ------------------------------ gcc -O2 -c rglfw.c -Wall -I. -Iexternal/glfw/include -gcc -O2 -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP -D%GRAPHICS_API% -gcc -O2 -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP -gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP -gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP -gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP +gcc -O2 -c rcore.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP -D%GRAPHICS_API% +gcc -O2 -c rshapes.c -std=c99 -Wall -DPLATFORM_DESKTOP +gcc -O2 -c rtextures.c -std=c99 -Wall -DPLATFORM_DESKTOP +gcc -O2 -c rtext.c -std=c99 -Wall -DPLATFORM_DESKTOP +gcc -O2 -c rmodels.c -std=c99 -Wall -DPLATFORM_DESKTOP gcc -O2 -c raudio.c -std=c99 -Wall -DPLATFORM_DESKTOP gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP diff --git a/projects/Notepad++/npes_saved_mingw.txt b/projects/Notepad++/npes_saved_mingw.txt index 6363218fd402232f9b16113e4e44f42a0213d364..a6057862703634f199d0b9173ecaef80eeefec53 100644 GIT binary patch delta 38 pcmca-`NDETi7;c)ap6eMVPT@@@C=rKr&Fo8c24F*aOLvBIb-moBxY2a{vGlA`MLd delta 28 kcmeCNYO>m}MR@Wy;dzt8M64!H60w_nNyKb3mnahl0H_fPEdT%j diff --git a/projects/VS2019/raylib/raylib.vcxproj b/projects/VS2019/raylib/raylib.vcxproj index 7e3e99d65..51a3c4d8e 100644 --- a/projects/VS2019/raylib/raylib.vcxproj +++ b/projects/VS2019/raylib/raylib.vcxproj @@ -303,16 +303,16 @@ - - + + - - - + + + - + @@ -324,7 +324,7 @@ - + diff --git a/projects/scripts/build-linux.sh b/projects/scripts/build-linux.sh index 5a004dddf..4f3871d03 100644 --- a/projects/scripts/build-linux.sh +++ b/projects/scripts/build-linux.sh @@ -120,7 +120,7 @@ if [ ! -d "$TEMP_DIR" ]; then mkdir -p $TEMP_DIR cd $TEMP_DIR RAYLIB_DEFINES="-D_DEFAULT_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33" - RAYLIB_C_FILES="$RAYLIB_SRC/core.c $RAYLIB_SRC/shapes.c $RAYLIB_SRC/textures.c $RAYLIB_SRC/text.c $RAYLIB_SRC/models.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c $RAYLIB_SRC/rglfw.c" + RAYLIB_C_FILES="$RAYLIB_SRC/rcore.c $RAYLIB_SRC/rshapes.c $RAYLIB_SRC/rtextures.c $RAYLIB_SRC/rtext.c $RAYLIB_SRC/rmodels.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c $RAYLIB_SRC/rglfw.c" RAYLIB_INCLUDE_FLAGS="-I$RAYLIB_SRC -I$RAYLIB_SRC/external/glfw/include" if [ -n "$REALLY_QUIET" ]; then diff --git a/projects/scripts/build-osx.sh b/projects/scripts/build-osx.sh index 13a421f97..e7bf5cf92 100644 --- a/projects/scripts/build-osx.sh +++ b/projects/scripts/build-osx.sh @@ -120,7 +120,7 @@ if [ ! -d "$TEMP_DIR" ]; then mkdir -p $TEMP_DIR cd $TEMP_DIR RAYLIB_DEFINES="-D_DEFAULT_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33" - RAYLIB_C_FILES="$RAYLIB_SRC/core.c $RAYLIB_SRC/shapes.c $RAYLIB_SRC/textures.c $RAYLIB_SRC/text.c $RAYLIB_SRC/models.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c" + RAYLIB_C_FILES="$RAYLIB_SRC/rcore.c $RAYLIB_SRC/rshapes.c $RAYLIB_SRC/rtextures.c $RAYLIB_SRC/rtext.c $RAYLIB_SRC/rmodels.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c" RAYLIB_INCLUDE_FLAGS="-I$RAYLIB_SRC -I$RAYLIB_SRC/external/glfw/include" if [ -n "$REALLY_QUIET" ]; then diff --git a/projects/scripts/build-rpi.sh b/projects/scripts/build-rpi.sh index 85b39b044..7b4237f2f 100755 --- a/projects/scripts/build-rpi.sh +++ b/projects/scripts/build-rpi.sh @@ -120,7 +120,7 @@ if [ ! -d "$TEMP_DIR" ]; then mkdir -p $TEMP_DIR cd $TEMP_DIR RAYLIB_DEFINES="-D_DEFAULT_SOURCE -DPLATFORM_RPI -DGRAPHICS_API_OPENGL_ES2" - RAYLIB_C_FILES="$RAYLIB_SRC/core.c $RAYLIB_SRC/shapes.c $RAYLIB_SRC/textures.c $RAYLIB_SRC/text.c $RAYLIB_SRC/models.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c" + RAYLIB_C_FILES="$RAYLIB_SRC/rcore.c $RAYLIB_SRC/rshapes.c $RAYLIB_SRC/rtextures.c $RAYLIB_SRC/rtext.c $RAYLIB_SRC/rmodels.c $RAYLIB_SRC/utils.c $RAYLIB_SRC/raudio.c" RAYLIB_INCLUDE_FLAGS="-I$RAYLIB_SRC -I/opt/vc/include" if [ -n "$REALLY_QUIET" ]; then diff --git a/projects/scripts/build-windows.bat b/projects/scripts/build-windows.bat index 276572c22..37319491e 100644 --- a/projects/scripts/build-windows.bat +++ b/projects/scripts/build-windows.bat @@ -167,7 +167,7 @@ IF NOT EXIST !TEMP_DIR!\ ( cd !TEMP_DIR! REM Raylib's src folder set "RAYLIB_DEFINES=/D_DEFAULT_SOURCE /DPLATFORM_DESKTOP /DGRAPHICS_API_OPENGL_33" - set RAYLIB_C_FILES="!RAYLIB_SRC!\core.c" "!RAYLIB_SRC!\shapes.c" "!RAYLIB_SRC!\textures.c" "!RAYLIB_SRC!\text.c" "!RAYLIB_SRC!\models.c" "!RAYLIB_SRC!\utils.c" "!RAYLIB_SRC!\raudio.c" "!RAYLIB_SRC!\rglfw.c" + set RAYLIB_C_FILES="!RAYLIB_SRC!\rcore.c" "!RAYLIB_SRC!\rshapes.c" "!RAYLIB_SRC!\rtextures.c" "!RAYLIB_SRC!\rtext.c" "!RAYLIB_SRC!\rmodels.c" "!RAYLIB_SRC!\utils.c" "!RAYLIB_SRC!\raudio.c" "!RAYLIB_SRC!\rglfw.c" set RAYLIB_INCLUDE_FLAGS=/I"!RAYLIB_SRC!" /I"!RAYLIB_SRC!\external\glfw\include" IF DEFINED REALLY_QUIET ( diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3dcd96bfb..54bfc2c29 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,11 +30,11 @@ set(raylib_public_headers # Sources to be compiled set(raylib_sources - core.c - models.c - shapes.c - text.c - textures.c + rcore.c + rmodels.c + rshapes.c + rtext.c + rtextures.c utils.c ) diff --git a/src/Makefile b/src/Makefile index 38027a2a8..2be86e78f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -549,7 +549,7 @@ endif # Compile all modules with their prerequisites # Compile core module -core.o : core.c raylib.h rlgl.h utils.h raymath.h camera.h gestures.h +rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile rglfw module @@ -557,15 +557,15 @@ rglfw.o : rglfw.c $(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile shapes module -shapes.o : shapes.c raylib.h rlgl.h +rshapes.o : rshapes.c raylib.h rlgl.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile textures module -textures.o : textures.c raylib.h rlgl.h utils.h +rtextures.o : rtextures.c raylib.h rlgl.h utils.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile text module -text.o : text.c raylib.h utils.h +rtext.o : rtext.c raylib.h utils.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile utils module @@ -573,7 +573,7 @@ utils.o : utils.c utils.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) # Compile models module -models.o : models.c raylib.h rlgl.h raymath.h +rmodels.o : rmodels.c raylib.h rlgl.h raymath.h $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS) # Compile audio module diff --git a/src/config.h b/src/config.h index 39f8252cf..994900993 100644 --- a/src/config.h +++ b/src/config.h @@ -28,9 +28,9 @@ //------------------------------------------------------------------------------------ // Module: core - Configuration Flags //------------------------------------------------------------------------------------ -// Camera module is included (camera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital +// Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital #define SUPPORT_CAMERA_SYSTEM 1 -// Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag +// Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag #define SUPPORT_GESTURES_SYSTEM 1 // Mouse gestures are directly mapped like touches and processed by gestures system #define SUPPORT_MOUSE_GESTURES 1 diff --git a/src/camera.h b/src/rcamera.h similarity index 99% rename from src/camera.h rename to src/rcamera.h index 6aad6c2f4..2faf75d60 100644 --- a/src/camera.h +++ b/src/rcamera.h @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib.camera - Camera system with multiple modes support +* rcamera - Basic camera system for multiple camera modes * * NOTE: Memory footprint of this library is aproximately 52 bytes (global variables) * @@ -41,8 +41,8 @@ * **********************************************************************************************/ -#ifndef CAMERA_H -#define CAMERA_H +#ifndef RCAMERA_H +#define RCAMERA_H //---------------------------------------------------------------------------------- // Defines and Macros diff --git a/src/core.c b/src/rcore.c similarity index 99% rename from src/core.c rename to src/rcore.c index 6428a029a..3b549ca8c 100644 --- a/src/core.c +++ b/src/rcore.c @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.core - Basic functions to manage windows, OpenGL context and input on multiple platforms +* rcore - Basic functions to manage windows, OpenGL context and input on multiple platforms * * PLATFORMS SUPPORTED: * - PLATFORM_DESKTOP: Windows (Win32, Win64) @@ -39,10 +39,10 @@ * NOTE: If enabled, uses external module functions to load default raylib font (module: text) * * #define SUPPORT_CAMERA_SYSTEM -* Camera module is included (camera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital +* Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital * * #define SUPPORT_GESTURES_SYSTEM -* Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag +* Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag * * #define SUPPORT_MOUSE_GESTURES * Mouse gestures are directly mapped like touches and processed by gestures system. @@ -129,12 +129,12 @@ #if defined(SUPPORT_GESTURES_SYSTEM) #define GESTURES_IMPLEMENTATION - #include "gestures.h" // Gestures detection functionality + #include "rgestures.h" // Gestures detection functionality #endif #if defined(SUPPORT_CAMERA_SYSTEM) #define CAMERA_IMPLEMENTATION - #include "camera.h" // Camera system functionality + #include "rcamera.h" // Camera system functionality #endif #if defined(SUPPORT_GIF_RECORDING) @@ -6617,7 +6617,7 @@ static void PlayAutomationEvent(unsigned int frame) { CORE.Input.Gamepad.axisState[events[i].params[0]][events[i].params[1]] = ((float)events[i].params[2]/32768.0f); } break; - case INPUT_GESTURE: GESTURES.current = events[i].params[0]; break; // param[0]: gesture (enum Gesture) -> gestures.h: GESTURES.current + case INPUT_GESTURE: GESTURES.current = events[i].params[0]; break; // param[0]: gesture (enum Gesture) -> rgestures.h: GESTURES.current // Window events case WINDOW_CLOSE: CORE.Window.shouldClose = true; break; diff --git a/src/gestures.h b/src/rgestures.h similarity index 98% rename from src/gestures.h rename to src/rgestures.h index 9cf535364..bd8ad5e23 100644 --- a/src/gestures.h +++ b/src/rgestures.h @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.gestures - Gestures system, gestures processing based on input events (touch/mouse) +* rgestures - Gestures system, gestures processing based on input events (touch/mouse) * * NOTE: Memory footprint of this library is aproximately 128 bytes (global variables) * @@ -43,8 +43,8 @@ * **********************************************************************************************/ -#ifndef GESTURES_H -#define GESTURES_H +#ifndef RGESTURES_H +#define RGESTURES_H #ifndef PI #define PI 3.14159265358979323846 @@ -481,8 +481,7 @@ float GetGestureDragAngle(void) // Get distance between two pinch points Vector2 GetGesturePinchVector(void) { - // NOTE: The position values used for GESTURES.Pinch.distance are not modified like the position values of [core.c]-->GetTouchPosition(int index) - // NOTE: pinch distance is calculated on two touch points TOUCH_ACTION_MOVE + // NOTE: Pinch distance is calculated on two touch points TOUCH_ACTION_MOVE return GESTURES.Pinch.vector; } diff --git a/src/models.c b/src/rmodels.c similarity index 99% rename from src/models.c rename to src/rmodels.c index ee55a100d..3ee0d2433 100644 --- a/src/models.c +++ b/src/rmodels.c @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.models - Basic functions to deal with 3d shapes and 3d models +* rmodels - Basic functions to draw 3d shapes and load and draw 3d models * * CONFIGURATION: * diff --git a/src/shapes.c b/src/rshapes.c similarity index 99% rename from src/shapes.c rename to src/rshapes.c index 86e7c97a2..605cdad43 100644 --- a/src/shapes.c +++ b/src/rshapes.c @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.shapes - Basic functions to draw 2d Shapes and check collisions +* rshapes - Basic functions to draw 2d shapes and check collisions * * CONFIGURATION: * diff --git a/src/text.c b/src/rtext.c similarity index 99% rename from src/text.c rename to src/rtext.c index 7145a971a..a372ff1f8 100644 --- a/src/text.c +++ b/src/rtext.c @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.text - Basic functions to load Fonts and draw Text +* rtext - Basic functions to load fonts and draw text * * CONFIGURATION: * diff --git a/src/textures.c b/src/rtextures.c similarity index 99% rename from src/textures.c rename to src/rtextures.c index 6caaa5bb8..81efec2d7 100644 --- a/src/textures.c +++ b/src/rtextures.c @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib.textures - Basic functions to load and draw Textures (2d) +* rtextures - Basic functions to load and draw textures * * CONFIGURATION: * From 3caa15e69643e9e0c62433a262e21ec9a4253da6 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 00:55:46 +0200 Subject: [PATCH 03/12] Update webassembly.yml --- .github/workflows/webassembly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml index ce558647d..0e815a81c 100644 --- a/.github/workflows/webassembly.yml +++ b/.github/workflows/webassembly.yml @@ -43,7 +43,7 @@ jobs: run: | cd src emcc -v - make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-master" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" + make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-master" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B cd .. - name: Generate Artifacts From d8512084139a8518cb136e5916985225fd8ade94 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 00:56:58 +0200 Subject: [PATCH 04/12] Update linux.yml --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ea12e021f..19021752f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -55,7 +55,7 @@ jobs: - name: Build Library run: | cd src - make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-m32" + make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-m32" -B # make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B cd .. if: matrix.bits == 32 @@ -63,7 +63,7 @@ jobs: - name: Build Library run: | cd src - make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" + make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B cd .. if: matrix.bits == 64 From 23b827b66cb1f6dc04afa7ec1cc38018b0865408 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 00:57:42 +0200 Subject: [PATCH 05/12] Update macos.yml --- .github/workflows/macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 503694d57..579b72372 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -40,12 +40,12 @@ jobs: run: | cd src clang --version - make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" + make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" -B # make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" # make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B # lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a libraylib_x86_64.a libraylib_arm64.a make clean - make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" + make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" -B # make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" -B # make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target i686-apple-macos -DGL_SILENCE_DEPRECATION" -B # lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.3.1.0.dylib libraylib_x86_64.3.1.0.dylib libraylib_arm64.3.1.0.dylib From b5f281bacd3b843045e84b23eff3de5a22133aae Mon Sep 17 00:00:00 2001 From: Conifer <64596327+conifer-dev@users.noreply.github.com> Date: Wed, 22 Sep 2021 09:11:44 +0100 Subject: [PATCH 06/12] Update BINDINGS.md (#2003) Update the link to new and better Swift binding to Raylib by STREGAsGate --- BINDINGS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BINDINGS.md b/BINDINGS.md index c4864ad8d..5a1d0ef37 100644 --- a/BINDINGS.md +++ b/BINDINGS.md @@ -94,7 +94,7 @@ Some people ported raylib to other languages in form of bindings or wrappers to | raylib-smallBasic | 3.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib | | raylib-ats2 | 3.0 | [ATS2](http://www.ats-lang.org/) | https://github.com/mephistopheles-8/raylib-ats2 | | raylib-beef | 3.0 | [Beef](https://www.beeflang.org/) | https://github.com/M0n7y5/raylib-beef | -| raylib-swift | 3.5 | [Swift](https://swift.org/) | https://github.com/conifer-dev/raylib-swift | +| raylib-swift | 3.7 | [Swift](https://swift.org/) | https://github.com/STREGAsGate/Raylib | | raylib-never | 3.0 | [Never](https://github.com/never-lang/never) | https://github.com/never-lang/raylib-never | | hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib | | Relib | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | https://github.com/RedCubeDev-ByteSpace/Relib | From c1432386a5ddad1784a6cacaf1e8d5a96a5388b2 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 11:13:10 +0200 Subject: [PATCH 07/12] Update Makefile --- src/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index 2be86e78f..cdf37fc36 100644 --- a/src/Makefile +++ b/src/Makefile @@ -443,10 +443,10 @@ endif # OBJS = $(patsubst %.c, %.o, $(wildcard *.c)) # Define object required on compilation -OBJS = core.o \ - shapes.o \ - textures.o \ - text.o \ +OBJS = rcore.o \ + rshapes.o \ + rtextures.o \ + rtext.o \ utils.o ifeq ($(PLATFORM),PLATFORM_DESKTOP) @@ -455,7 +455,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(RAYLIB_MODULE_MODELS),TRUE) - OBJS += models.o + OBJS += rmodels.o endif ifeq ($(RAYLIB_MODULE_AUDIO),TRUE) OBJS += raudio.o From 37c047eabcb7a13b159ef0a995897cc46947ad17 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 11:28:52 +0200 Subject: [PATCH 08/12] Update rmodels.c --- src/rmodels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rmodels.c b/src/rmodels.c index 3ee0d2433..c97a20047 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4383,7 +4383,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *image, const char *texPath, Co unsigned char *data = DecodeBase64(image->uri + i + 1, &size); int width, height; - unsigned char *raw = stbi_load_from_memory(data, size, &width, &height, NULL, 4); + unsigned char *raw = LoadImageFromMemory(".png", data, size, &width, &height, NULL, 4); RL_FREE(data); rimage.data = raw; @@ -4417,7 +4417,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *image, const char *texPath, Co } int width, height; - unsigned char *raw = stbi_load_from_memory(data, (int)image->buffer_view->size, &width, &height, NULL, 4); + unsigned char *raw = LoadImageFromMemory(".png", data, (int)image->buffer_view->size, &width, &height, NULL, 4); RL_FREE(data); rimage.data = raw; From de173a93c86fbda92b7d93a5fc202e80d4a16f24 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 12:19:25 +0200 Subject: [PATCH 09/12] Update rmodels.c --- src/rmodels.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/rmodels.c b/src/rmodels.c index c97a20047..a4c0e9e56 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4382,16 +4382,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *image, const char *texPath, Co int size = 0; unsigned char *data = DecodeBase64(image->uri + i + 1, &size); - int width, height; - unsigned char *raw = LoadImageFromMemory(".png", data, size, &width, &height, NULL, 4); + rimage = LoadImageFromMemory(".png", data, size); RL_FREE(data); - rimage.data = raw; - rimage.width = width; - rimage.height = height; - rimage.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8; - rimage.mipmaps = 1; - // TODO: Tint shouldn't be applied here! ImageColorTint(&rimage, tint); } @@ -4416,16 +4409,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *image, const char *texPath, Co n += stride; } - int width, height; - unsigned char *raw = LoadImageFromMemory(".png", data, (int)image->buffer_view->size, &width, &height, NULL, 4); + rimage = LoadImageFromMemory(".png", data, size); RL_FREE(data); - rimage.data = raw; - rimage.width = width; - rimage.height = height; - rimage.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8; - rimage.mipmaps = 1; - // TODO: Tint shouldn't be applied here! ImageColorTint(&rimage, tint); } From 0e037555fe5d4eba775ba7fbc3fb89ec333a63f1 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 12:59:40 +0200 Subject: [PATCH 10/12] Update raylib.h --- src/raylib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index 8193cc4b1..b8d320b0d 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1109,7 +1109,7 @@ RLAPI int GetTouchPointId(int index); // Get touch point RLAPI int GetTouchPointCount(void); // Get number of touch points //------------------------------------------------------------------------------------ -// Gestures and Touch Handling Functions (Module: gestures) +// Gestures and Touch Handling Functions (Module: rgestures) //------------------------------------------------------------------------------------ RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags RLAPI bool IsGestureDetected(int gesture); // Check if a gesture have been detected @@ -1121,7 +1121,7 @@ RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch del RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle //------------------------------------------------------------------------------------ -// Camera System Functions (Module: camera) +// Camera System Functions (Module: rcamera) //------------------------------------------------------------------------------------ RLAPI void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available) RLAPI void UpdateCamera(Camera *camera); // Update camera position for selected mode From 8a434b4fd4dc8d59697ed005a7ef85346bd474e9 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 Sep 2021 13:02:44 +0200 Subject: [PATCH 11/12] Update rmodels.c --- src/rmodels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rmodels.c b/src/rmodels.c index a4c0e9e56..8319814b4 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4409,7 +4409,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *image, const char *texPath, Co n += stride; } - rimage = LoadImageFromMemory(".png", data, size); + rimage = LoadImageFromMemory(".png", data, (int)image->buffer_view->size); RL_FREE(data); // TODO: Tint shouldn't be applied here! From 9607ea5c0a28d1a3f5812c6fdc4822ab4b48cde2 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Wed, 22 Sep 2021 07:04:10 -0400 Subject: [PATCH 12/12] Use unsigned int for animation count. (#2002) LoadModelAnimations takes an `int` for the animation count parameter. The animation count should never be negative, so it makes sense to specify it as unsigned in the API. This matches the API for UnloadModelAnimations, which expects an unsigned int. Both GLTF and IQMM also store the animation count internally as unsigned, and we were casting to a signed int for no reason. GLTF actually uses `size_t` internally, so we're technically risking overflow, but having 2^32 animations seems unlikely. --- src/raylib.h | 2 +- src/rmodels.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index b8d320b0d..83e84a4f9 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1436,7 +1436,7 @@ RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh // Model animations loading/unloading functions -RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file +RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count); // Unload animation array data diff --git a/src/rmodels.c b/src/rmodels.c index 8319814b4..13aa11670 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -128,11 +128,11 @@ static Model LoadOBJ(const char *fileName); // Load OBJ mesh data #endif #if defined(SUPPORT_FILEFORMAT_IQM) static Model LoadIQM(const char *fileName); // Load IQM mesh data -static ModelAnimation *LoadIQMModelAnimations(const char *fileName, int *animCount); // Load IQM animation data +static ModelAnimation *LoadIQMModelAnimations(const char *fileName, unsigned int *animCount); // Load IQM animation data #endif #if defined(SUPPORT_FILEFORMAT_GLTF) static Model LoadGLTF(const char *fileName); // Load GLTF mesh data -static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCount); // Load GLTF animation data +static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, unsigned int *animCount); // Load GLTF animation data static void LoadGLTFMaterial(Model *model, const char *fileName, const cgltf_data *data); static void LoadGLTFMesh(cgltf_data *data, cgltf_mesh *mesh, Model *outModel, Matrix currentTransform, int *primitiveIndex, const char *fileName); static void LoadGLTFNode(cgltf_data *data, cgltf_node *node, Model *outModel, Matrix currentTransform, int *primitiveIndex, const char *fileName); @@ -1607,7 +1607,7 @@ void SetModelMeshMaterial(Model *model, int meshId, int materialId) } // Load model animations from file -ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount) +ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount) { ModelAnimation *animations = NULL; @@ -4072,7 +4072,7 @@ static Model LoadIQM(const char *fileName) } // Load IQM animation data -static ModelAnimation* LoadIQMModelAnimations(const char *fileName, int *animCount) +static ModelAnimation* LoadIQMModelAnimations(const char *fileName, unsigned int *animCount) { #define IQM_MAGIC "INTERQUAKEMODEL" // IQM file magic number #define IQM_VERSION 2 // only IQM version 2 supported @@ -5067,7 +5067,7 @@ static void BindGLTFPrimitiveToBones(Model *model, const cgltf_data *data, int p } // LoadGLTF loads in animation data from given filename -static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCount) +static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, unsigned int *animCount) { /*********************************************************************************** @@ -5102,7 +5102,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo result = cgltf_load_buffers(&options, data, fileName); if (result != cgltf_result_success) TRACELOG(LOG_WARNING, "MODEL: [%s] unable to load glTF animations data", fileName); animations = RL_MALLOC(data->animations_count*sizeof(ModelAnimation)); - *animCount = (int)data->animations_count; + *animCount = (unsigned int)data->animations_count; for (unsigned int a = 0; a < data->animations_count; a++) {