diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index 9c1069185..25004a944 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -19,11 +19,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Retrieve dependencies + shell: bash + run: | + mkdir build-tools + wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/build-tools.zip + unzip build-tools.zip -d build-tools + chmod +x build-tools/aapt + chmod +x build-tools/dx + chmod +x build-tools/zipalign + - name: Compile android builds shell: bash id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" DROID_FLAGS: "-fPIC -shared -s -O1 -fvisibility=hidden -rdynamic -funwind-tables" DROID_LIBS: "-lGLESv2 -lEGL -lm -landroid -llog" run: | @@ -36,13 +46,6 @@ jobs: NDK_ROOT="/opt/android-sdk-linux/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin" TOOLS_ROOT=$ROOT_DIR/build-tools SDK_ROOT="/opt/android-sdk-linux/platforms/android-34" - - mkdir build-tools - wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/build-tools.zip - unzip build-tools.zip -d build-tools - chmod +x build-tools/aapt - chmod +x build-tools/dx - chmod +x build-tools/zipalign cd $ROOT_DIR/src $NDK_ROOT/armv7a-linux-androideabi19-clang *.c $DROID_FLAGS -march=armv5 -rtlib=libgcc -L $ROOT_DIR/build-tools/runtime $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_16 diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml index 9b967253e..93cae34fe 100644 --- a/.github/workflows/build_freebsd.yml +++ b/.github/workflows/build_freebsd.yml @@ -18,29 +18,32 @@ jobs: image: empterdose/freebsd-cross-build:11.4 steps: - uses: actions/checkout@v4 + - name: Install prerequisites - run: apk add bash wget + run: apk add bash wget curl + - name: Retrieve OpenGL and X11 dev files (64 bit) run: | mkdir src/freebsd64 cd src/freebsd64 wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/freebsd64.zip unzip freebsd64.zip + - name: Retrieve OpenGL and X11 dev files (32 bit) run: | mkdir src/freebsd32 cd src/freebsd32 wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/freebsd32.zip unzip freebsd32.zip + - name: Compile FreeBSD builds id: compile shell: bash env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" PLAT32_FLAGS: "-fno-pie -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -I freebsd32/include -L freebsd32/lib" PLAT64_FLAGS: "-fno-pie -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -I freebsd64/include -L freebsd64/lib" run: | - apk add curl LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" cd src @@ -77,4 +80,4 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'freebsd' \ No newline at end of file + WORKFLOW_NAME: 'freebsd' diff --git a/.github/workflows/build_haiku.yml b/.github/workflows/build_haiku.yml index 99e50d868..665375800 100644 --- a/.github/workflows/build_haiku.yml +++ b/.github/workflows/build_haiku.yml @@ -18,10 +18,11 @@ jobs: image: haiku/cross-compiler:x86_64-r1beta4 steps: - uses: actions/checkout@v4 + - name: Compile haiku build id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" run: | cd src x86_64-unknown-haiku-gcc *.c Platform_BeOS.cpp Window_BeOS.cpp -o ClassiCube-haiku ${{ env.COMMON_FLAGS }} -lm -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker @@ -45,4 +46,4 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'haiku' \ No newline at end of file + WORKFLOW_NAME: 'haiku' diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 629f739c8..394e4fc7c 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -23,20 +23,26 @@ jobs: image: ubuntu:20.04 steps: - uses: actions/checkout@v4 + - name: Install packages shell: bash run: | apt-get -y update apt-get -y install gcc-multilib wget curl unzip + + - name: Retrieve dependencies + shell: bash + run: | + wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/linux32.zip + unzip linux32.zip + - name: Compile 32 bit Linux builds shell: bash id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" NIX32_FLAGS: "-no-pie -fno-pie -m32 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -L ../lib -Wl,--unresolved-symbols=ignore-in-shared-libs" run: | - wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/linux32.zip - unzip linux32.zip LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" cd src @@ -79,20 +85,26 @@ jobs: image: ubuntu:20.04 steps: - uses: actions/checkout@v4 + - name: Install packages shell: bash run: | apt-get -y update apt-get -y install gcc wget curl unzip + + - name: Retrieve dependencies + shell: bash + run: | + wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/linux64.zip + unzip linux64.zip + - name: Compile 64 bit Linux builds shell: bash id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" NIX64_FLAGS: "-no-pie -fno-pie -m64 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -L ../lib -Wl,--unresolved-symbols=ignore-in-shared-libs" run: | - wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/linux64.zip - unzip linux64.zip LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" cd src diff --git a/.github/workflows/build_netbsd.yml b/.github/workflows/build_netbsd.yml index 28fb77810..b26f017bb 100644 --- a/.github/workflows/build_netbsd.yml +++ b/.github/workflows/build_netbsd.yml @@ -22,17 +22,19 @@ jobs: run: | apt-get update apt-get -y install zip wget + - name: Retrieve OpenGL and X11 dev files (64 bit) run: | mkdir src/netbsd64 cd src/netbsd64 wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/netbsd64.zip unzip netbsd64.zip + - name: Compile NetBSD builds id: compile shell: bash env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" PLAT64_FLAGS: "-fno-pie -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -I netbsd64/include -L netbsd64/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" run: | LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" @@ -60,4 +62,4 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'netbsd' \ No newline at end of file + WORKFLOW_NAME: 'netbsd' diff --git a/.github/workflows/build_rpi.yml b/.github/workflows/build_rpi.yml index 0f8390a8e..1e46af3a6 100644 --- a/.github/workflows/build_rpi.yml +++ b/.github/workflows/build_rpi.yml @@ -21,16 +21,18 @@ jobs: image: dockcross/linux-armv6-lts steps: - uses: actions/checkout@v4 + - name: Retrieve OpenGL and X11 dev files run: | mkdir src/rpi cd src/rpi wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/rpi32.zip unzip rpi32.zip + - name: Compile RPI 32 bit build id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" RPI32_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON -DCC_BUILD_RPI -I rpi/include -L rpi/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" run: | LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" @@ -69,16 +71,18 @@ jobs: image: dockcross/linux-arm64-lts steps: - uses: actions/checkout@v4 + - name: Retrieve OpenGL and X11 dev files run: | mkdir src/rpi cd src/rpi wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/rpi64.zip unzip rpi64.zip + - name: Compile RPI 64 bit build id: compile env: - COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" RPI64_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON -DCC_BUILD_RPI -I rpi/include -L rpi/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" run: | LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" @@ -105,4 +109,4 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'rpi64' \ No newline at end of file + WORKFLOW_NAME: 'rpi64' diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 6790e9a18..6c2d1c74b 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -21,6 +21,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install packages + shell: bash + run: | + sudo apt-get -y install gcc-mingw-w64-i686 + - name: Compile 32 bit Windows builds shell: bash id: compile @@ -28,7 +34,6 @@ jobs: COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" WIN32_FLAGS: "-mwindows -nostartfiles -Wl,-e_main_real -DCC_NOMAIN CCicon_32.res" run: | - sudo apt-get -y install gcc-mingw-w64-i686 LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\" cp misc/windows/CCicon_32.res src/CCicon_32.res @@ -87,6 +92,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install packages + shell: bash + run: | + sudo apt-get -y install gcc-mingw-w64-x86-64 + - name: Compile 64 bit Windows builds shell: bash id: compile @@ -94,7 +105,6 @@ jobs: COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" WIN64_FLAGS: "-mwindows -nostartfiles -Wl,-emain_real -DCC_NOMAIN CCicon_64.res" run: | - sudo apt-get -y install gcc-mingw-w64-x86-64 LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\" cp misc/windows/CCicon_64.res src/CCicon_64.res diff --git a/src/Graphics_GL1.c b/src/Graphics_GL1.c index 43fa20577..342d453bf 100644 --- a/src/Graphics_GL1.c +++ b/src/Graphics_GL1.c @@ -480,7 +480,9 @@ static void Gfx_RestoreState(void) { gfx_format = -1; _glHint(GL_FOG_HINT, GL_NICEST); +#if defined CC_BUILD_SYMBIAN _glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); +#endif _glAlphaFunc(GL_GREATER, 0.5f); _glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);