Remove trailing spaces

This commit is contained in:
Ray
2026-03-29 01:17:25 +01:00
parent fb0f83bc91
commit da93ec4a21
13 changed files with 76 additions and 76 deletions

View File

@@ -28,20 +28,20 @@ jobs:
max-parallel: 1
matrix:
ARCH: ["arm64", "x86_64"]
env:
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
@@ -52,7 +52,7 @@ jobs:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Setup Environment
run: |
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
@@ -60,7 +60,7 @@ jobs:
mkdir include
mkdir lib
cd ../..
# Generating static + shared library for 64bit arquitectures and API version 29
- name: Build Library
run: |
@@ -69,7 +69,7 @@ jobs:
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@@ -80,7 +80,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
@@ -88,7 +88,7 @@ jobs:
path: |
./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: softprops/action-gh-release@v1
with:

View File

@@ -23,18 +23,18 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Environment
run: |
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
cd ..
- name: Build Examples
run: |
cd examples

View File

@@ -13,7 +13,7 @@ on:
- 'src/**'
- 'examples/**'
- '.github/workflows/windows_examples.yml'
permissions:
contents: read

View File

@@ -42,23 +42,23 @@ jobs:
ARCH_NAME: "arm64"
COMPILER_PATH: "/usr/bin"
runner: "ubuntu-24.04-arm"
runs-on: ${{ matrix.runner }}
env:
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
mkdir build
@@ -74,7 +74,7 @@ jobs:
run : |
sudo apt-get install gcc-multilib
if: matrix.bits == 32 && matrix.ARCH == 'i386'
# TODO: Support 32bit (i386) static/shared library building
- name: Build Library (32-bit)
run: |
@@ -91,7 +91,7 @@ jobs:
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 64 && matrix.ARCH == 'x86_64'
- name: Build Library (64-bit ARM)
run: |
cd src
@@ -99,7 +99,7 @@ jobs:
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 64 && matrix.ARCH == 'aarch64'
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@@ -110,7 +110,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
@@ -118,7 +118,7 @@ jobs:
path: |
./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: softprops/action-gh-release@v1
with:

View File

@@ -23,14 +23,14 @@ jobs:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
runs-on: macos-latest
env:
RELEASE_NAME: raylib-dev_macos
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
@@ -38,7 +38,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
@@ -46,47 +46,47 @@ jobs:
mkdir include
mkdir lib
cd ../..
# Generating static + shared library, note that i386 architecture is deprecated
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
- name: Build Library
run: |
cd src
clang --version
# Extract version numbers from Makefile
brew install grep
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
# Build raylib x86_64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
mv libraylib.a /tmp/libraylib_x86_64.a
make clean
# Build raylib arm64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
mv libraylib.a /tmp/libraylib_arm64.a
make clean
# Join x86_64 and arm64 static
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
# Build raylib x86_64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
make clean
# Build raylib arm64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
# Join x86_64 and arm64 dynamic
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
cd ..
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@@ -97,7 +97,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
@@ -105,7 +105,7 @@ jobs:
path: |
./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: softprops/action-gh-release@v1
with:

View File

@@ -12,11 +12,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:

View File

@@ -34,7 +34,7 @@ int main()
DrawFPS(10, 10);
EndDrawing();
}
CloseWindow();
return 0;
}

View File

@@ -19,7 +19,7 @@ int main()
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
@@ -44,7 +44,7 @@ int main()
}
// De-Initialization
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------

View File

@@ -15,9 +15,9 @@
<Param name="float alpha" />
</Overload>
</KeyWord>
NOTE: Generated XML text should be copied inside raylib\Notepad++\plugins\APIs\c.xml
WARNING: Be careful with functions that split parameters into several lines, it breaks the process!
LICENSE: zlib/libpng
@@ -42,13 +42,13 @@ int main(int argc, char *argv[])
{
FILE *rFile = fopen(argv[1], "rt");
FILE *rxmlFile = fopen("raylib_npp.xml", "wt");
if ((rFile == NULL) || (rxmlFile == NULL))
{
printf("File could not be opened.\n");
return 0;
}
char *buffer = (char *)calloc(MAX_BUFFER_SIZE, 1);
int count = 0;
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
{
// Read one full line
fgets(buffer, MAX_BUFFER_SIZE, rFile);
if (buffer[0] == '/') fprintf(rxmlFile, " <!--%.*s -->\n", strlen(buffer) - 3, buffer + 2);
else if (buffer[0] == '\n') fprintf(rxmlFile, "%s", buffer); // Direct copy of code comments
else if (strncmp(buffer, "RLAPI", 5) == 0) // raylib function declaration
@@ -65,33 +65,33 @@ int main(int argc, char *argv[])
char funcTypeAux[64];
char funcName[64];
char funcDesc[256];
char params[128];
char paramType[16][16];
char paramName[16][32];
int index = 0;
char *ptr = NULL;
sscanf(buffer, "RLAPI %s %[^(]s", funcType, funcName);
if (strcmp(funcType, "const") == 0)
{
{
sscanf(buffer, "RLAPI %s %s %[^(]s", funcType, funcTypeAux, funcName);
strcat(funcType, " ");
strcat(funcType, funcTypeAux);
}
ptr = strchr(buffer, '/');
index = (int)(ptr - buffer);
sscanf(buffer + index, "%[^\n]s", funcDesc); // Read function comment after declaration
ptr = strchr(buffer, '(');
if (ptr != NULL) index = (int)(ptr - buffer);
else printf("Character not found!\n");
sscanf(buffer + (index + 1), "%[^)]s", params); // Read what's inside '(' and ')'
// Scan params string for number of func params, type and name
@@ -102,23 +102,23 @@ int main(int argc, char *argv[])
if ((funcName[0] == '*') && (funcName[1] == '*')) fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 2);
else if (funcName[0] == '*') fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 1);
else fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName);
fprintf(rxmlFile, " <Overload retVal=\"%s\" descr=\"%s\">", funcType, funcDesc + 3);
bool paramsVoid = false;
char paramConst[8][16];
while (paramPtr[paramsCount] != NULL)
{
sscanf(paramPtr[paramsCount], "%s %s\n", paramType[paramsCount], paramName[paramsCount]);
if (strcmp(paramType[paramsCount], "void") == 0)
{
paramsVoid = true;
break;
}
if ((strcmp(paramType[paramsCount], "const") == 0) || (strcmp(paramType[paramsCount], "unsigned") == 0))
{
sscanf(paramPtr[paramsCount], "%s %s %s\n", paramConst[paramsCount], paramType[paramsCount], paramName[paramsCount]);
@@ -130,17 +130,17 @@ int main(int argc, char *argv[])
paramsCount++;
paramPtr[paramsCount] = strtok(NULL, ",");
}
fprintf(rxmlFile, "%s</Overload>\n", paramsVoid ? "" : "\n ");
fprintf(rxmlFile, " </KeyWord>\n");
count++;
printf("Function processed %02i: %s\n", count, funcName);
memset(buffer, 0, MAX_BUFFER_SIZE);
}
}
free(buffer);
fclose(rFile);
fclose(rxmlFile);

View File

@@ -2184,14 +2184,14 @@ void UpdateAudioStream(AudioStream stream, const void *data, int frameCount)
bool IsAudioStreamProcessed(AudioStream stream)
{
bool result = false;
if (stream.buffer != NULL)
{
ma_mutex_lock(&AUDIO.System.lock);
result = stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1];
ma_mutex_unlock(&AUDIO.System.lock);
}
return result;
}
@@ -2885,7 +2885,7 @@ static unsigned char *LoadFileData(const char *fileName, int *dataSize)
static bool SaveFileData(const char *fileName, void *data, int dataSize)
{
bool result = true;
if (fileName != NULL)
{
FILE *file = fopen(fileName, "wb");
@@ -2919,7 +2919,7 @@ static bool SaveFileData(const char *fileName, void *data, int dataSize)
static bool SaveFileText(const char *fileName, char *text)
{
bool result = true;
if (fileName != NULL)
{
FILE *file = fopen(fileName, "wt");

View File

@@ -2440,7 +2440,7 @@ bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2
float dx2 = (p1.x - (dotProduct*(dx))) - center.x;
float dy2 = (p1.y - (dotProduct*(dy))) - center.y;
float distanceSQ = ((dx2*dx2) + (dy2*dy2));
if (distanceSQ <= radius*radius) collision = true;
}

View File

@@ -1785,7 +1785,7 @@ char *TextReplace(const char *text, const char *search, const char *replacement)
// Count the number of replacements needed
insertPoint = (char *)text;
for (count = 0; (tempPtr = strstr(insertPoint, search)); count++) insertPoint = tempPtr + searchLen;
if ((textLen + count*(replaceLen - searchLen)) < (MAX_TEXT_BUFFER_LENGTH - 1))
{
// TODO: Allow copying data replaced up to maximum buffer size and stop
@@ -1971,7 +1971,7 @@ char *TextInsert(const char *text, const char *insert, int position)
{
int textLen = TextLength(text);
int insertLen = TextLength(insert);
if ((textLen + insertLen) < (MAX_TEXT_BUFFER_LENGTH - 1))
{
// TODO: Allow copying data inserted up to maximum buffer size and stop

View File

@@ -9,10 +9,10 @@
- struct AliasInfo
- struct EnumInfo
- struct FunctionInfo
WARNING: This parser is specifically designed to work with raylib.h, and has some contraints
in that regards. Still, it can also work with other header files that follow same file structure
conventions as raylib.h: rlgl.h, raymath.h, raygui.h, reasings.h
conventions as raylib.h: rlgl.h, raymath.h, raygui.h, reasings.h
CONSTRAINTS:
This parser is specifically designed to work with raylib.h, so, it has some constraints: