Merge branch 'master' into AngledLighting

This commit is contained in:
Goodlyay 2025-09-24 06:01:20 -07:00
commit 49eaa532ce
274 changed files with 9784 additions and 3724 deletions

View File

@ -16,4 +16,5 @@ runs:
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: ${{ inputs.DEST_NAME }} name: ${{ inputs.DEST_NAME }}
path: ${{ inputs.SOURCE_FILE }} path: ${{ inputs.SOURCE_FILE }}
if-no-files-found: error

View File

@ -24,13 +24,6 @@ jobs:
run: | run: |
make 3ds make 3ds
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 3DS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -56,3 +49,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: '3ds' WORKFLOW_NAME: '3ds'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 3DS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -99,13 +99,6 @@ jobs:
# jarsigner -verbose # jarsigner -verbose
# create aligned .apk file # create aligned .apk file
#$TOOLS_ROOT/zipalign -f 4 cc-signed.apk $ROOT_DIR/src/cc.apk #$TOOLS_ROOT/zipalign -f 4 cc-signed.apk $ROOT_DIR/src/cc.apk
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile android build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -120,3 +113,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'android' WORKFLOW_NAME: 'android'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce android build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -34,13 +34,6 @@ jobs:
export PATH=/opt/toolchains/dc/kos/utils/:$PATH export PATH=/opt/toolchains/dc/kos/utils/:$PATH
make dreamcast make dreamcast
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Dreamcast build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -66,3 +59,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'dreamcast' WORKFLOW_NAME: 'dreamcast'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Dreamcast build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -43,7 +43,7 @@ jobs:
env: env:
LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo" LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo"
SRCS: "src/*.c third_party/bearssl/*.c" SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic" FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
PLAT32_FLAGS: "-fno-pie -fcf-protection=none -I freebsd32/include -L freebsd32/lib" PLAT32_FLAGS: "-fno-pie -fcf-protection=none -I freebsd32/include -L freebsd32/lib"
PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I freebsd64/include -L freebsd64/lib" PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I freebsd64/include -L freebsd64/lib"
@ -52,13 +52,6 @@ jobs:
i386-freebsd11-clang ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT32_FLAGS }} $LATEST_FLAG -o cc-fbsd32-gl1 ${{ env.LIBS }} i386-freebsd11-clang ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT32_FLAGS }} $LATEST_FLAG -o cc-fbsd32-gl1 ${{ env.LIBS }}
x86_64-freebsd11-clang ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT64_FLAGS }} $LATEST_FLAG -o cc-fbsd64-gl1 ${{ env.LIBS }} x86_64-freebsd11-clang ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT64_FLAGS }} $LATEST_FLAG -o cc-fbsd64-gl1 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile FreeBSD build(s)'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -79,3 +72,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'freebsd' WORKFLOW_NAME: 'freebsd'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce FreeBSD build(s)'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -28,12 +28,6 @@ jobs:
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror" COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror"
run: | run: |
x86_64-unknown-haiku-gcc ${{ env.SRCS }} -o ClassiCube-haiku ${{ env.COMMON_FLAGS }} ${{ env.LIBS }} x86_64-unknown-haiku-gcc ${{ env.SRCS }} -o ClassiCube-haiku ${{ env.COMMON_FLAGS }} ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Haiku build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -48,3 +42,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'haiku' WORKFLOW_NAME: 'haiku'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Haiku build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -27,12 +27,6 @@ jobs:
mkdir Payload mkdir Payload
mv ClassiCube.app Payload/ClassiCube.app mv ClassiCube.app Payload/ClassiCube.app
zip -r cc.ipa Payload zip -r cc.ipa Payload
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile iOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -46,3 +40,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'ios' WORKFLOW_NAME: 'ios'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce iOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -43,20 +43,13 @@ jobs:
env: env:
LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl" LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl"
SRCS: "src/*.c third_party/bearssl/*.c" SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic" FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
NIX32_FLAGS: "-no-pie -fno-pie -m32 -fcf-protection=none -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs" NIX32_FLAGS: "-no-pie -fno-pie -m32 -fcf-protection=none -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: | run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -o cc-nix32-gl1 ${{ env.LIBS }} gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -o cc-nix32-gl1 ${{ env.LIBS }}
gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-nix32-gl2 ${{ env.LIBS }} gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-nix32-gl2 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 32 bit Linux build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -78,6 +71,13 @@ jobs:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'linux32' WORKFLOW_NAME: 'linux32'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 32 bit Linux build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
#============================================ #============================================
# =============== 64 BIT LINUX ============== # =============== 64 BIT LINUX ==============
# =========================================== # ===========================================
@ -107,7 +107,7 @@ jobs:
env: env:
LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl" LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl"
SRCS: "src/*.c third_party/bearssl/*.c" SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic" FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
NIX64_FLAGS: "-no-pie -fno-pie -m64 -fcf-protection=none -rdynamic -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs" NIX64_FLAGS: "-no-pie -fno-pie -m64 -fcf-protection=none -rdynamic -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: | run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
@ -115,13 +115,6 @@ jobs:
gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -o cc-nix64-gl1 ${{ env.LIBS }} gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -o cc-nix64-gl1 ${{ env.LIBS }}
gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-nix64-gl2 ${{ env.LIBS }} gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-nix64-gl2 ${{ env.LIBS }}
#gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2 -o cc-sdl64-gl2 -lSDL2 ${{ env.LIBS }} #gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2 -o cc-sdl64-gl2 -lSDL2 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 64 bit Linux build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -136,11 +129,11 @@ jobs:
SOURCE_FILE: 'cc-nix64-gl2' SOURCE_FILE: 'cc-nix64-gl2'
DEST_NAME: 'ClassiCube-Linux64-ModernGL' DEST_NAME: 'ClassiCube-Linux64-ModernGL'
- uses: ./.github/actions/upload_build # - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} # if: ${{ always() && steps.compile.outcome == 'success' }}
with: # with:
SOURCE_FILE: 'cc-sdl64-gl2' # SOURCE_FILE: 'cc-sdl64-gl2'
DEST_NAME: 'ClassiCube-Linux64-SDL2' # DEST_NAME: 'ClassiCube-Linux64-SDL2'
- uses: ./.github/actions/notify_success - uses: ./.github/actions/notify_success
@ -148,3 +141,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'linux64' WORKFLOW_NAME: 'linux64'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 64 bit Linux build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -58,12 +58,6 @@ jobs:
run: | run: |
PATH=$PATH:/usr/local/compiler/target/bin PATH=$PATH:/usr/local/compiler/target/bin
i386-apple-darwin8-lipo -create -output cc-mac32-universal cc-mac32-gl1 cc-mac32-ppc i386-apple-darwin8-lipo -create -output cc-mac32-universal cc-mac32-gl1 cc-mac32-ppc
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 32 bit macOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -96,3 +90,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'mac32' WORKFLOW_NAME: 'mac32'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 32 bit macOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -36,12 +36,6 @@ jobs:
clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.ARM64_FLAGS }} $LATEST_FLAG -o cc-mac-arm64 ${{ env.LIBS }} clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.ARM64_FLAGS }} $LATEST_FLAG -o cc-mac-arm64 ${{ env.LIBS }}
# https://wiki.freepascal.org/Code_Signing_for_macOS#Ad_hoc_signing # https://wiki.freepascal.org/Code_Signing_for_macOS#Ad_hoc_signing
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 64 bit macOS builds'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -68,3 +62,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'mac64' WORKFLOW_NAME: 'mac64'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 64 bit macOS builds'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -27,13 +27,6 @@ jobs:
make macclassic_68k RETRO68=/Retro68-build/toolchain ARCH_68040=1 make macclassic_68k RETRO68=/Retro68-build/toolchain ARCH_68040=1
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Mac Classic build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
@ -58,3 +51,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'macclassic' WORKFLOW_NAME: 'macclassic'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Mac Classic build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -27,20 +27,13 @@ jobs:
- name: Compile MS dos build - name: Compile MS dos build
id: compile id: compile
run: | run: |
make CC=gcc dos RELEASE=1 make CC=gcc dos
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile MS DOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'ClassiCube.exe' SOURCE_FILE: 'CCDOS.EXE'
DEST_NAME: 'ClassiCube.exe' DEST_NAME: 'ClassiCube.exe'
@ -49,3 +42,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'msdos' WORKFLOW_NAME: 'msdos'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce MS DOS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -35,13 +35,6 @@ jobs:
make tools-install make tools-install
cd $REAL_DIR cd $REAL_DIR
make n64 make n64
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile N64 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -62,3 +55,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'n64' WORKFLOW_NAME: 'n64'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce N64 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -30,13 +30,6 @@ jobs:
make ds make ds
export BUILD_DSI=1 export BUILD_DSI=1
make ds make ds
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile NDS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -48,7 +41,7 @@ jobs:
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'build-nds/cc-arm9.elf' SOURCE_FILE: 'build/nds/cc-arm9.elf'
DEST_NAME: 'ClassiCube-nds.elf' DEST_NAME: 'ClassiCube-nds.elf'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -60,7 +53,7 @@ jobs:
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'build-dsi/cc-arm9.elf' SOURCE_FILE: 'build/dsi/cc-arm9.elf'
DEST_NAME: 'ClassiCube-dsi.elf' DEST_NAME: 'ClassiCube-dsi.elf'
@ -69,3 +62,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'nds' WORKFLOW_NAME: 'nds'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce NDS build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -37,19 +37,12 @@ jobs:
env: env:
LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo" LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo"
SRCS: "src/*.c third_party/bearssl/*.c" SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -Wl,-R/usr/X11R7/lib -fvisibility=hidden -rdynamic" FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -Wl,-R/usr/X11R7/lib -fvisibility=hidden -rdynamic -Werror"
PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I netbsd64/include -L netbsd64/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I netbsd64/include -L netbsd64/lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: | run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
x86_64-unknown-netbsd-gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT64_FLAGS }} $LATEST_FLAG -o cc-netbsd64-gl1 ${{ env.LIBS }} x86_64-unknown-netbsd-gcc ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.PLAT64_FLAGS }} $LATEST_FLAG -o cc-netbsd64-gl1 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile NetBSD build(s)'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -64,3 +57,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'netbsd' WORKFLOW_NAME: 'netbsd'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce NetBSD build(s)'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -31,17 +31,10 @@ jobs:
make ps1 make ps1
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile PS1 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'build-ps1/ClassiCube-PS1.elf' SOURCE_FILE: 'build/ps1/ClassiCube-ps1.elf'
DEST_NAME: 'ClassiCube-PS1.elf' DEST_NAME: 'ClassiCube-PS1.elf'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -68,3 +61,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'ps1' WORKFLOW_NAME: 'ps1'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce PS1 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -28,13 +28,6 @@ jobs:
run: | run: |
make ps2 make ps2
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile PS2 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -54,3 +47,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'ps2' WORKFLOW_NAME: 'ps2'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce PS2 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -34,13 +34,6 @@ jobs:
make ps3 make ps3
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile PS3 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
@ -65,3 +58,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'ps3' WORKFLOW_NAME: 'ps3'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce PS3 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -28,13 +28,6 @@ jobs:
run: | run: |
make psp make psp
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile PSP build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -54,3 +47,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'psp' WORKFLOW_NAME: 'psp'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce PSP build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -41,13 +41,6 @@ jobs:
LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\"
$CC ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.RPI32_FLAGS }} $LATEST_FLAG -o cc-rpi32 ${{ env.LIBS }} $CC ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.RPI32_FLAGS }} $LATEST_FLAG -o cc-rpi32 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile RPI 32 bit build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -64,6 +57,13 @@ jobs:
WORKFLOW_NAME: 'rpi32' WORKFLOW_NAME: 'rpi32'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce RPI 32 bit build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
#============================================ #============================================
# ================ 64 BIT RPI =============== # ================ 64 BIT RPI ===============
# =========================================== # ===========================================
@ -93,13 +93,6 @@ jobs:
LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\"
$CC ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.RPI64_FLAGS }} $LATEST_FLAG -o cc-rpi64 ${{ env.LIBS }} $CC ${{ env.SRCS }} ${{ env.FLAGS }} ${{ env.RPI64_FLAGS }} $LATEST_FLAG -o cc-rpi64 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile RPI 64 bit build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -114,3 +107,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'rpi64' WORKFLOW_NAME: 'rpi64'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce RPI 64 bit build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -16,30 +16,24 @@ jobs:
timeout-minutes: 10 timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ijacquez/yaul:1.0.10 image: ijacquez/yaul:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install prerequisites - name: Install prerequisites
run: | run: |
apt-get update apt-get --allow-releaseinfo-change update
apt-get -y install curl apt-get install -y curl
- name: Compile Saturn build - name: Compile Saturn build
id: compile id: compile
run: | run: |
make saturn make saturn
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Saturn build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'build-saturn/ClassiCube-saturn.elf' SOURCE_FILE: 'build/saturn/ClassiCube-saturn.elf'
DEST_NAME: 'ClassiCube-saturn.elf' DEST_NAME: 'ClassiCube-saturn.elf'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -60,3 +54,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'saturn' WORKFLOW_NAME: 'saturn'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Saturn build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -24,13 +24,6 @@ jobs:
run: | run: |
make switch make switch
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Switch build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -50,3 +43,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'switch' WORKFLOW_NAME: 'switch'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Switch build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -42,15 +42,16 @@ jobs:
SOURCE_FILE: 'misc/symbian/ClassiCube.sis' SOURCE_FILE: 'misc/symbian/ClassiCube.sis'
DEST_NAME: 'ClassiCube-Symbian.sis' DEST_NAME: 'ClassiCube-Symbian.sis'
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Symbian build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/notify_success - uses: ./.github/actions/notify_success
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'symbian' WORKFLOW_NAME: 'symbian'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Symbian build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -24,13 +24,6 @@ jobs:
run: | run: |
make vita make vita
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Vita build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -50,3 +43,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'vita' WORKFLOW_NAME: 'vita'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Vita build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -26,12 +26,6 @@ jobs:
run: | run: |
emcc ${{ env.SRCS }} -o ClassiCube.js -s WASM=0 -s NO_EXIT_RUNTIME=1 -s LEGACY_VM_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 -s ABORTING_MALLOC=0 -s ENVIRONMENT=web -s TOTAL_STACK=256Kb --js-library src/webclient/interop_web.js -Os -g2 -s SINGLE_FILE emcc ${{ env.SRCS }} -o ClassiCube.js -s WASM=0 -s NO_EXIT_RUNTIME=1 -s LEGACY_VM_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 -s ABORTING_MALLOC=0 -s ENVIRONMENT=web -s TOTAL_STACK=256Kb --js-library src/webclient/interop_web.js -Os -g2 -s SINGLE_FILE
sed -i 's#eventHandler.useCapture);#{ useCapture: eventHandler.useCapture, passive: false });#g' ClassiCube.js sed -i 's#eventHandler.useCapture);#{ useCapture: eventHandler.useCapture, passive: false });#g' ClassiCube.js
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Webclient'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -45,3 +39,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'webclient' WORKFLOW_NAME: 'webclient'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Webclient'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -31,13 +31,6 @@ jobs:
cp ClassiCube-wii.dol wiitest/apps/ClassiCube/boot.dol cp ClassiCube-wii.dol wiitest/apps/ClassiCube/boot.dol
cp misc/wii/icon.png wiitest/apps/ClassiCube/icon.png cp misc/wii/icon.png wiitest/apps/ClassiCube/icon.png
cp misc/wii/meta.xml wiitest/apps/ClassiCube/meta.xml cp misc/wii/meta.xml wiitest/apps/ClassiCube/meta.xml
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Wii/Gamecube build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -76,3 +69,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'wiigc' WORKFLOW_NAME: 'wiigc'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Wii/Gamecube build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -23,13 +23,6 @@ jobs:
id: compile id: compile
run: | run: |
make wiiu make wiiu
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile WiiU build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -56,3 +49,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'wiiu' WORKFLOW_NAME: 'wiiu'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce WiiU build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -35,18 +35,18 @@ jobs:
armv7-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN32_FLAGS }} -o cc-arm32-d3d11.exe $LATEST_FLAG ${{ env.LIBS }} armv7-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN32_FLAGS }} -o cc-arm32-d3d11.exe $LATEST_FLAG ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 32 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'cc-arm32-d3d11.exe' SOURCE_FILE: 'cc-arm32-d3d11.exe'
DEST_NAME: 'ClassiCube-arm32-Direct3D11.exe' DEST_NAME: 'ClassiCube-arm32-Direct3D11.exe'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 32 bit Windows-ARM build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
#============================================ #============================================
# ============== ARM64 WINDOWS ============== # ============== ARM64 WINDOWS ==============
# =========================================== # ===========================================
@ -72,13 +72,21 @@ jobs:
- uses: ./.github/actions/notify_failure - uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }} if: failure()
with: with:
NOTIFY_MESSAGE: 'Failed to compile 64 bit Windows build' NOTIFY_MESSAGE: 'Failed to produce 64 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'cc-arm64-d3d11.exe' SOURCE_FILE: 'cc-arm64-d3d11.exe'
DEST_NAME: 'ClassiCube-arm64-Direct3D11.exe' DEST_NAME: 'ClassiCube-arm64-Direct3D11.exe'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 64 bit Windows-ARM build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -46,13 +46,6 @@ jobs:
# mingw defaults to i686, but some really old CPUs only support i586 # mingw defaults to i686, but some really old CPUs only support i586
i686-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN32_FLAGS }} -march=i586 -o cc-w9x-ogl.exe $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL1 -DCC_BUILD_NOSTDLIB ${{ env.LIBS }} i686-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN32_FLAGS }} -march=i586 -o cc-w9x-ogl.exe $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL1 -DCC_BUILD_NOSTDLIB ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 32 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -85,6 +78,13 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'win32' WORKFLOW_NAME: 'win32'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 32 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
#============================================ #============================================
@ -118,13 +118,6 @@ jobs:
x86_64-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-w64-d3d11.exe $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_D3D11 ${{ env.LIBS }} x86_64-w64-mingw32-gcc ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-w64-d3d11.exe $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_D3D11 ${{ env.LIBS }}
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 64 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
@ -149,3 +142,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'win64' WORKFLOW_NAME: 'win64'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce 64 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -29,13 +29,6 @@ jobs:
eval $(/usr/src/nxdk/bin/activate -s) eval $(/usr/src/nxdk/bin/activate -s)
make xbox make xbox
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Xbox build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
@ -55,3 +48,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'xbox' WORKFLOW_NAME: 'xbox'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Xbox build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -31,12 +31,6 @@ jobs:
export DEVKITXENON=/usr/local/xenon export DEVKITXENON=/usr/local/xenon
export PATH=$PATH:$DEVKITXENON/bin:$DEVKITXENON/usr/bin export PATH=$PATH:$DEVKITXENON/bin:$DEVKITXENON/usr/bin
make xbox360 make xbox360
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Xbox 360 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
@ -57,3 +51,10 @@ jobs:
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'xbox360' WORKFLOW_NAME: 'xbox360'
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce Xbox 360 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

View File

@ -113,13 +113,6 @@ jobs:
make_unix_tar cc-linux32.tar.gz cc-linux-32 make_unix_tar cc-linux32.tar.gz cc-linux-32
make_unix_tar cc-linux64.tar.gz cc-linux-64 make_unix_tar cc-linux64.tar.gz cc-linux-64
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to produce release'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
# Generate Linux release files # Generate Linux release files
@ -218,4 +211,12 @@ jobs:
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
WORKFLOW_NAME: 'release' WORKFLOW_NAME: 'release'
# Log any failure
- uses: ./.github/actions/notify_failure
if: failure()
with:
NOTIFY_MESSAGE: 'Failed to produce release'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

25
.gitignore vendored
View File

@ -26,23 +26,14 @@ project.xcworkspace/
xcuserdata/ xcuserdata/
# Nintendo Console build results # Nintendo Console build results
build-3ds/
build-nds/ build-nds/
build-dsi/ build-dsi/
build-n64/ build-n64/
build-gc/
build-wii/
build-wiiu/
build-switch/
classicube.nds classicube.nds
# SEGA console build results # SEGA console build results
build-32x/
build-saturn/
build-dc/
IP.BIN IP.BIN
ISO_FILES/ ISO_FILES/
third_party/gldc/libGLdc.a
cd/ cd/
# Microsoft console build results # Microsoft console build results
@ -55,20 +46,12 @@ misc/xbox/vs_coloured.inl
misc/xbox/vs_textured.inl misc/xbox/vs_textured.inl
# Sony console build results # Sony console build results
build-ps2/
build-ps3/
build-ps4/
build-psp/
build-vita/
EBOOT.PBP EBOOT.PBP
PARAM.SFO PARAM.SFO
param.sfo param.sfo
eboot.bin eboot.bin
pkg.gp4 pkg.gp4
# Desktop build results
build-amiga-68k/
# Build results # Build results
[Dd]ebug/ [Dd]ebug/
[Rr]elease/ [Rr]elease/
@ -107,13 +90,19 @@ fontscache.txt
CWSDPMI.EXE CWSDPMI.EXE
CWSDPMI.SWP CWSDPMI.SWP
OPTIONS.TXT OPTIONS.TXT
CCDOS.EXE
# Android source files need to be included # Android source files need to be included
!android/app/src/main/java/com/classicube !android/app/src/main/java/com/classicube
# Flatpak wrapper which needs to be included # Flatpak wrapper needs to be included
!misc/flatpak/ClassiCubeLauncher !misc/flatpak/ClassiCubeLauncher
# UWP files needs to be included
!misc/UWP/ClassiCube-UWP.sln
!misc/UWP/ClassiCube-UWP.vcxproj
!misc/UWP/ClassiCube-UWP.vcxproj.filters
# CMake files # CMake files
CMakeFiles/ CMakeFiles/
CMakeCache.txt CMakeCache.txt

View File

@ -15,7 +15,7 @@ LDFLAGS = -g -rdynamic
ENAME = ClassiCube ENAME = ClassiCube
# Name of the final target file # Name of the final target file
# (usually this is the executable, but e.g. is the app bundle on macOS) # (usually this is the executable, but e.g. is the app bundle on macOS)
TARGET := $(ENAME) TARGET := $(ENAME)
# Enables dependency tracking (https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/) # Enables dependency tracking (https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/)
# This ensures that changing a .h file automatically results in the .c files using it being auto recompiled when next running make # This ensures that changing a .h file automatically results in the .c files using it being auto recompiled when next running make
@ -88,15 +88,16 @@ endif
ifeq ($(PLAT),hp-ux) ifeq ($(PLAT),hp-ux)
CC = gcc CC = gcc
CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_BSD_SOURCE
LDFLAGS = LDFLAGS =
LIBS = -lm -lX11 -lXi -lXext -L/opt/graphics/OpenGL/lib -lGL -lpthread LIBS = -lm -lX11 -lXi -lXext -L/opt/graphics/OpenGL/lib/hpux32 -lGL -lpthread
BUILD_DIR = build/hpux BUILD_DIR = build/hpux
endif endif
ifeq ($(PLAT),darwin) ifeq ($(PLAT),darwin)
OBJECTS += $(BUILD_DIR)/src/Window_cocoa.o OBJECTS += $(BUILD_DIR)/src/Window_cocoa.o
LIBS = LIBS =
LDFLAGS = -rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc LDFLAGS = -rdynamic -framework Security -framework Cocoa -framework OpenGL -framework IOKit -lobjc
BUILD_DIR = build/macos BUILD_DIR = build/macos
TARGET = $(ENAME).app TARGET = $(ENAME).app
endif endif
@ -172,28 +173,24 @@ ifeq ($(PLAT),riscos)
BUILD_DIR = build/riscos BUILD_DIR = build/riscos
endif endif
ifeq ($(PLAT),dos) ifeq ($(PLAT),wince)
CC = i586-pc-msdosdjgpp-gcc CC = arm-mingw32ce-gcc
LIBS =
LDFLAGS = -g
OEXT = .exe OEXT = .exe
BUILD_DIR = build/dos CFLAGS += -march=armv5tej -mcpu=arm926ej-s -DUNICODE -D_WIN32_WCE
BEARSSL = 0 LDFLAGS = -g
LIBS = -lcoredll -lws2
BUILD_DIRS += $(BUILD_DIR)/src/msdos BUILD_DIR = build/wince
C_SOURCES += $(wildcard src/msdos/*.c)
endif endif
ifdef BUILD_SDL2
ifdef SDL2
CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2 CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2
LIBS += -lSDL2 LIBS += -lSDL2
endif endif
ifdef SDL3 ifdef BUILD_SDL3
CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL3 CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL3
LIBS += -lSDL3 LIBS += -lSDL3
endif endif
ifdef TERMINAL ifdef BUILD_TERMINAL
CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_TERMINAL -DCC_GFX_BACKEND=CC_GFX_BACKEND_SOFTGPU CFLAGS += -DCC_WIN_BACKEND=CC_WIN_BACKEND_TERMINAL -DCC_GFX_BACKEND=CC_GFX_BACKEND_SOFTGPU
LIBS := $(subst mwindows,mconsole,$(LIBS)) LIBS := $(subst mwindows,mconsole,$(LIBS))
endif endif
@ -241,16 +238,16 @@ serenityos:
irix: irix:
$(MAKE) $(TARGET) PLAT=irix $(MAKE) $(TARGET) PLAT=irix
riscos: riscos:
$(MAKE) $(TARGET) PLAT=riscos $(MAKE) $(TARGET) PLAT=riscos
dos: wince:
$(MAKE) $(TARGET) PLAT=dos $(MAKE) $(TARGET) PLAT=wince
# Default overrides # Default overrides
sdl2: sdl2:
$(MAKE) $(TARGET) SDL2=1 $(MAKE) $(TARGET) BUILD_SDL2=1
sdl3: sdl3:
$(MAKE) $(TARGET) SDL3=1 $(MAKE) $(TARGET) BUILD_SDL3=1
terminal: terminal:
$(MAKE) $(TARGET) TERMINAL=1 $(MAKE) $(TARGET) BUILD_TERMINAL=1
release: release:
$(MAKE) $(TARGET) RELEASE=1 $(MAKE) $(TARGET) RELEASE=1
@ -283,7 +280,7 @@ n64:
gba: gba:
$(MAKE) -f misc/gba/Makefile $(MAKE) -f misc/gba/Makefile
ds: ds:
$(MAKE) -f misc/ds/Makefile $(MAKE) -f misc/nds/Makefile
3ds: 3ds:
$(MAKE) -f misc/3ds/Makefile $(MAKE) -f misc/3ds/Makefile
gamecube: gamecube:
@ -296,14 +293,18 @@ switch:
$(MAKE) -f misc/switch/Makefile $(MAKE) -f misc/switch/Makefile
os/2: os/2:
$(MAKE) -f misc/os2/Makefile $(MAKE) -f misc/os2/Makefile
dos:
$(MAKE) -f misc/msdos/Makefile
macclassic_68k: macclassic_68k:
$(MAKE) -f misc/macclassic/Makefile_68k $(MAKE) -f misc/macclassic/Makefile_68k
macclassic_ppc: macclassic_ppc:
$(MAKE) -f misc/macclassic/Makefile_ppc $(MAKE) -f misc/macclassic/Makefile_ppc
amiga_68k: amiga_gcc:
$(MAKE) -f misc/amiga/Makefile_68k $(MAKE) -f misc/amiga/Makefile_68k
amiga_ppc: amiga:
$(MAKE) -f misc/amiga/Makefile_ppc $(MAKE) -f misc/amiga/Makefile
atari_st:
$(MAKE) -f misc/atari_st/Makefile
# Cleans up all build .o files # Cleans up all build .o files
clean: clean:

View File

@ -122,7 +122,6 @@ extern "C" {
extern void fast_memcpy(void *dst, void *src, int len); extern void fast_memcpy(void *dst, void *src, int len);
extern void CacheControl(int mode); extern void CacheControl(int mode);
extern void CacheClearLine(void* ptr); extern void CacheClearLine(void* ptr);
extern void ScreenStretch(int src, int width, int height, int interp);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -29,19 +29,19 @@
! Master Vector Base Table at 0x06000000 ! Master Vector Base Table at 0x06000000
.long mstart /* Cold Start PC */ .long mstart /* 0, Cold Start PC */
.long 0x0603FC00 /* Cold Start SP */ .long 0x0603FC00 /* 1, Cold Start SP */
.long mstart /* Manual Reset PC */ .long mstart /* 2, Manual Reset PC */
.long 0x0603FC00 /* Manual Reset SP */ .long 0x0603FC00 /* 3, Manual Reset SP */
.long main_err /* Illegal instruction */ .long main_err /* 4, Illegal instruction */
.long 0x00000000 /* reserved */ .long _wdt_handler/* 5, reserved - repurposed for WDT */
.long main_err /* Invalid slot instruction */ .long main_err /* 6, Invalid slot instruction */
.long 0x20100400 /* reserved */ .long 0x20100400 /* 7, reserved */
.long 0x20100420 /* reserved */ .long 0x20100420 /* 8, reserved */
.long main_err /* CPU address error */ .long main_err /* 9, CPU address error */
.long main_err /* DMA address error */ .long main_err /* 10, DMA address error */
.long main_err /* NMI vector */ .long main_err /* 11, NMI vector */
.long main_err /* User break vector */ .long main_err /* 12, User break vector */
.space 76 /* reserved */ .space 76 /* reserved */
.long main_err /* TRAPA #32 */ .long main_err /* TRAPA #32 */
.long main_err /* TRAPA #33 */ .long main_err /* TRAPA #33 */
@ -637,81 +637,6 @@ _CacheControl:
_sh2_cctl: _sh2_cctl:
.long 0xFFFFFE92 .long 0xFFFFFE92
! void ScreenStretch(int src, int width, int height, int interp);
! On entry: r4 = src pointer, r5 = width, r6 = height, r7 = interpolate
.align 4
.global _ScreenStretch
_ScreenStretch:
cmp/pl r7
bt ss_interp
! stretch screen without interpolation
0:
mov r5,r3
shll r3
mov r3,r2
shll r2
add r4,r3
add r4,r2
1:
add #-2,r3
mov.w @r3,r0
extu.w r0,r1
shll16 r0
or r1,r0
mov.l r0,@-r2
cmp/eq r3,r4
bf 1b
/* next line */
mov.w ss_pitch,r0
dt r6
bf/s 0b
add r0,r4
rts
nop
ss_interp:
! stretch screen with interpolation
0:
mov r5,r3
shll r3
mov r3,r2
shll r2
add r4,r3
add r4,r2
mov #0,r7
1:
add #-2,r3
mov.w @r3,r0
mov.w ss_mask,r1
and r0,r1 /* masked curr pixel */
shll16 r0
add r1,r7 /* add to masked prev pixel */
shlr r7 /* blended pixel */
or r7,r0 /* curr pixel << 16 | blended pixel */
mov r1,r7 /* masked prev pixel = masked curr pixel */
mov.l r0,@-r2
cmp/eq r3,r4
bf 1b
/* next line */
mov.w ss_pitch,r0
dt r6
bf/s 0b
add r0,r4
rts
nop
ss_mask:
.word 0x7BDE
ss_pitch:
.word 640
.align 2 .align 2
.text .text

View File

@ -46,7 +46,7 @@ DEPFILES := $(OBJS:%.o=%.d)
# Code generation # Code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
ARCH = -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft ARCH = -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
CFLAGS = -g -Wall -O2 -mword-relocations -ffunction-sections $(ARCH) $(INCLUDE) -D__3DS__ CFLAGS = -g -Wall -O2 -mword-relocations -ffunction-sections $(ARCH) $(INCLUDE) -D__3DS__ -DPLAT_3DS
ASFLAGS = -g $(ARCH) ASFLAGS = -g $(ARCH)
LDFLAGS = -specs=3dsx.specs -g $(ARCH) LDFLAGS = -specs=3dsx.specs -g $(ARCH)
@ -121,7 +121,7 @@ $(BUILD_DIR)/%.shbin: misc/3ds/%.v.pica
$(PICASSO) $< -o $@ $(PICASSO) $< -o $@
$(BUILD_DIR)/%.shbin.o: $(BUILD_DIR)/%.shbin $(BUILD_DIR)/%.shbin.o: $(BUILD_DIR)/%.shbin
$(BIN2S) $< | $(ARM_AS) -o $@ $(BIN2S) $< | $(ARM_CC) -x assembler-with-cpp -c - -o $@
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

15
misc/3ds/README.md Normal file
View File

@ -0,0 +1,15 @@
To see debug log messages in Citra:
1) Make sure log level set to "Debug.Emulated:Debug"
---
Commands used to generate the .bin files:
`bannertool makebanner -i banner.png -a audio.wav -o banner.bin`
`bannertool makesmdh -s ClassiCube -l ClassiCube -p UnknownShadow200 -i icon.png -o icon.bin`
----
Debug log messages output to debug service, so may be possible to see from console via remote gdb

View File

@ -1,11 +1,15 @@
; Vertex shader for rendering coloured vertices for PICA200 GPU on the Nintendo 3DS ; Vertex shader for rendering coloured vertices for PICA200 GPU on the Nintendo 3DS
; ================================================================================== ; ==================================================================================
; Uniforms ; Uniforms (layout common to all shaders)
.fvec MVP[4]; .alias MVP_0 c0
.alias MVP_1 c1
.alias MVP_2 c2
.alias MVP_3 c3
.alias TEX_OFFSET c4
; Constants ; Constants (initialised in Graphics_3DS.c)
.constf ONE_DIV_255(0.003921568627, 0.003921568627, 0.003921568627, 0.003921568627) .alias ONE_DIV_255 c5
; Outputs ; Outputs
.out out_pos position .out out_pos position
@ -16,14 +20,11 @@
.alias in_col v1 .alias in_col v1
.proc main .proc main
; r0 = in_pos ; out_pos = MVP * in_pos
mov r0, in_pos dp4 out_pos.x, MVP_0, in_pos
dp4 out_pos.y, MVP_1, in_pos
; out_pos = MVP * r0 dp4 out_pos.z, MVP_2, in_pos
dp4 out_pos.x, MVP[0], r0 dp4 out_pos.w, MVP_3, in_pos
dp4 out_pos.y, MVP[1], r0
dp4 out_pos.z, MVP[2], r0
dp4 out_pos.w, MVP[3], r0
; out_col = in_col * ONE_DIV_255 ; out_col = in_col * ONE_DIV_255
mul out_col, ONE_DIV_255, in_col mul out_col, ONE_DIV_255, in_col

View File

@ -1,12 +1,15 @@
; Vertex shader for rendering textured vertices with an offset for PICA200 GPU on the Nintendo 3DS ; Vertex shader for rendering textured vertices with an offset for PICA200 GPU on the Nintendo 3DS
; ================================================================================== ; ==================================================================================
; Uniforms ; Uniforms (layout common to all shaders)
.fvec MVP[4]; .alias MVP_0 c0
.fvec tex_offset; .alias MVP_1 c1
.alias MVP_2 c2
.alias MVP_3 c3
.alias TEX_OFFSET c4
; Constants ; Constants (initialised in Graphics_3DS.c)
.constf ONE_DIV_255(0.003921568627, 0.003921568627, 0.003921568627, 0.003921568627) .alias ONE_DIV_255 c5
; Outputs ; Outputs
.out out_pos position .out out_pos position
@ -19,19 +22,16 @@
.alias in_tex v2 .alias in_tex v2
.proc main .proc main
; r0 = in_pos ; out_pos = MVP * in_pos
mov r0, in_pos dp4 out_pos.x, MVP_0, in_pos
dp4 out_pos.y, MVP_1, in_pos
; out_pos = MVP * r0 dp4 out_pos.z, MVP_2, in_pos
dp4 out_pos.x, MVP[0], r0 dp4 out_pos.w, MVP_3, in_pos
dp4 out_pos.y, MVP[1], r0
dp4 out_pos.z, MVP[2], r0
dp4 out_pos.w, MVP[3], r0
; out_col = in_col * ONE_DIV_255 ; out_col = in_col * ONE_DIV_255
mul out_col, ONE_DIV_255, in_col mul out_col, ONE_DIV_255, in_col
; out_tex = in_tex + tex_offset ; out_tex = in_tex + tex_offset
add out_tex, tex_offset, in_tex add out_tex, TEX_OFFSET, in_tex
end end
.end .end

View File

@ -1,5 +0,0 @@
Commands used to generate the .bin files:
`bannertool makebanner -i banner.png -a audio.wav -o banner.bin`
`bannertool makesmdh -s ClassiCube -l ClassiCube -p UnknownShadow200 -i icon.png -o icon.bin`

View File

@ -1,11 +1,15 @@
; Vertex shader for rendering textured vertices for PICA200 GPU on the Nintendo 3DS ; Vertex shader for rendering textured vertices for PICA200 GPU on the Nintendo 3DS
; ================================================================================== ; ==================================================================================
; Uniforms ; Uniforms (layout common to all shaders)
.fvec MVP[4]; .alias MVP_0 c0
.alias MVP_1 c1
.alias MVP_2 c2
.alias MVP_3 c3
.alias TEX_OFFSET c4
; Constants ; Constants (initialised in Graphics_3DS.c)
.constf ONE_DIV_255(0.003921568627, 0.003921568627, 0.003921568627, 0.003921568627) .alias ONE_DIV_255 c5
; Outputs ; Outputs
.out out_pos position .out out_pos position
@ -18,14 +22,11 @@
.alias in_tex v2 .alias in_tex v2
.proc main .proc main
; r0 = in_pos ; out_pos = MVP * in_pos
mov r0, in_pos dp4 out_pos.x, MVP_0, in_pos
dp4 out_pos.y, MVP_1, in_pos
; out_pos = MVP * r0 dp4 out_pos.z, MVP_2, in_pos
dp4 out_pos.x, MVP[0], r0 dp4 out_pos.w, MVP_3, in_pos
dp4 out_pos.y, MVP[1], r0
dp4 out_pos.z, MVP[2], r0
dp4 out_pos.w, MVP[3], r0
; out_col = in_col * ONE_DIV_255 ; out_col = in_col * ONE_DIV_255
mul out_col, ONE_DIV_255, in_col mul out_col, ONE_DIV_255, in_col

View File

@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32002.261
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClassiCube-UWP", "ClassiCube-UWP.vcxproj", "{A901236D-C8EF-4041-966F-46F17511E342}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM.ActiveCfg = Debug|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM.Build.0 = Debug|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM.Deploy.0 = Debug|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM64.ActiveCfg = Debug|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM64.Build.0 = Debug|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|ARM64.Deploy.0 = Debug|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x64.ActiveCfg = Debug|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x64.Build.0 = Debug|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x64.Deploy.0 = Debug|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x86.ActiveCfg = Debug|Win32
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x86.Build.0 = Debug|Win32
{A901236D-C8EF-4041-966F-46F17511E342}.Debug|x86.Deploy.0 = Debug|Win32
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM.ActiveCfg = Release|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM.Build.0 = Release|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM.Deploy.0 = Release|ARM
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM64.ActiveCfg = Release|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM64.Build.0 = Release|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|ARM64.Deploy.0 = Release|ARM64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x64.ActiveCfg = Release|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x64.Build.0 = Release|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x64.Deploy.0 = Release|x64
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x86.ActiveCfg = Release|Win32
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x86.Build.0 = Release|Win32
{A901236D-C8EF-4041-966F-46F17511E342}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AB4A9C28-F91F-439E-8D2E-E54273138ADC}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,432 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{a901236d-c8ef-4041-966f-46f17511e342}</ProjectGuid>
<RootNamespace>ClassiCube_UWP</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.20348.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>Default</CompileAs>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Animations.c" />
<ClCompile Include="..\..\src\Audio.c" />
<ClCompile Include="..\..\src\Audio_OpenAL.c" />
<ClCompile Include="..\..\src\AxisLinesRenderer.c" />
<ClCompile Include="..\..\src\Bitmap.c" />
<ClCompile Include="..\..\src\Block.c" />
<ClCompile Include="..\..\src\BlockPhysics.c" />
<ClCompile Include="..\..\src\Builder.c" />
<ClCompile Include="..\..\src\Camera.c" />
<ClCompile Include="..\..\src\Certs.c" />
<ClCompile Include="..\..\src\Chat.c" />
<ClCompile Include="..\..\src\Commands.c" />
<ClCompile Include="..\..\src\Deflate.c" />
<ClCompile Include="..\..\src\Drawer.c" />
<ClCompile Include="..\..\src\Drawer2D.c" />
<ClCompile Include="..\..\src\Entity.c" />
<ClCompile Include="..\..\src\EntityComponents.c" />
<ClCompile Include="..\..\src\EntityRenderers.c" />
<ClCompile Include="..\..\src\EnvRenderer.c" />
<ClCompile Include="..\..\src\Event.c" />
<ClCompile Include="..\..\src\ExtMath.c" />
<ClCompile Include="..\..\src\FancyLighting.c" />
<ClCompile Include="..\..\src\Formats.c" />
<ClCompile Include="..\..\src\Game.c" />
<ClCompile Include="..\..\src\GameVersion.c" />
<ClCompile Include="..\..\src\Generator.c" />
<ClCompile Include="..\..\src\Graphics_D3D11.c" />
<ClCompile Include="..\..\src\Gui.c" />
<ClCompile Include="..\..\src\HeldBlockRenderer.c" />
<ClCompile Include="..\..\src\Http_Worker.c" />
<ClCompile Include="..\..\src\Input.c" />
<ClCompile Include="..\..\src\InputHandler.c" />
<ClCompile Include="..\..\src\Inventory.c" />
<ClCompile Include="..\..\src\IsometricDrawer.c" />
<ClCompile Include="..\..\src\Launcher.c" />
<ClCompile Include="..\..\src\LBackend.c" />
<ClCompile Include="..\..\src\LBackend_Android.c" />
<ClCompile Include="..\..\src\Lighting.c" />
<ClCompile Include="..\..\src\Logger.c" />
<ClCompile Include="..\..\src\LScreens.c" />
<ClCompile Include="..\..\src\LWeb.c" />
<ClCompile Include="..\..\src\LWidgets.c" />
<ClCompile Include="..\..\src\MapRenderer.c" />
<ClCompile Include="..\..\src\MenuOptions.c" />
<ClCompile Include="..\..\src\Menus.c" />
<ClCompile Include="..\..\src\Model.c" />
<ClCompile Include="..\..\src\Options.c" />
<ClCompile Include="..\..\src\PackedCol.c" />
<ClCompile Include="..\..\src\Particle.c" />
<ClCompile Include="..\..\src\Physics.c" />
<ClCompile Include="..\..\src\Picking.c" />
<ClCompile Include="..\..\src\Protocol.c" />
<ClCompile Include="..\..\src\Queue.c" />
<ClCompile Include="..\..\src\Resources.c" />
<ClCompile Include="..\..\src\Screens.c" />
<ClCompile Include="..\..\src\SelectionBox.c" />
<ClCompile Include="..\..\src\SelOutlineRenderer.c" />
<ClCompile Include="..\..\src\Server.c" />
<ClCompile Include="..\..\src\SSL.c" />
<ClCompile Include="..\..\src\Stream.c" />
<ClCompile Include="..\..\src\String.c" />
<ClCompile Include="..\..\src\SystemFonts.c" />
<ClCompile Include="..\..\src\TexturePack.c" />
<ClCompile Include="..\..\src\TouchUI.c" />
<ClCompile Include="..\..\src\Utils.c" />
<ClCompile Include="..\..\src\UWP\Platform_UWP.cpp" />
<ClCompile Include="..\..\src\UWP\Window_UWP.cpp" />
<ClCompile Include="..\..\src\Vectors.c" />
<ClCompile Include="..\..\src\Vorbis.c" />
<ClCompile Include="..\..\src\Widgets.c" />
<ClCompile Include="..\..\src\World.c" />
<ClCompile Include="..\..\third_party\bearssl\aesctr_drbg.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_cbcdec.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_cbcenc.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_ctr.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_ctrcbc.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_dec.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_enc.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_common.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_cbcdec.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_cbcenc.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_ctr.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_ctrcbc.c" />
<ClCompile Include="..\..\third_party\bearssl\asn1enc.c" />
<ClCompile Include="..\..\third_party\bearssl\ccm.c" />
<ClCompile Include="..\..\third_party\bearssl\ccopy.c" />
<ClCompile Include="..\..\third_party\bearssl\chacha20_ct.c" />
<ClCompile Include="..\..\third_party\bearssl\chacha20_sse2.c" />
<ClCompile Include="..\..\third_party\bearssl\dec32be.c" />
<ClCompile Include="..\..\third_party\bearssl\dec32le.c" />
<ClCompile Include="..\..\third_party\bearssl\dec64be.c" />
<ClCompile Include="..\..\third_party\bearssl\dec64le.c" />
<ClCompile Include="..\..\third_party\bearssl\dig_oid.c" />
<ClCompile Include="..\..\third_party\bearssl\dig_size.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_atr.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_default_vrfy_asn1.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_default_vrfy_raw.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_bits.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_vrfy_asn1.c" />
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_vrfy_raw.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_all_m31.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_i31.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m31.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m62.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m64.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_curve25519.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_default.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m31.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m62.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m64.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_prime_i31.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_secp256r1.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_secp384r1.c" />
<ClCompile Include="..\..\third_party\bearssl\ec_secp521r1.c" />
<ClCompile Include="..\..\third_party\bearssl\enc32be.c" />
<ClCompile Include="..\..\third_party\bearssl\enc32le.c" />
<ClCompile Include="..\..\third_party\bearssl\enc64be.c" />
<ClCompile Include="..\..\third_party\bearssl\enc64le.c" />
<ClCompile Include="..\..\third_party\bearssl\gcm.c" />
<ClCompile Include="..\..\third_party\bearssl\ghash_ctmul.c" />
<ClCompile Include="..\..\third_party\bearssl\ghash_ctmul64.c" />
<ClCompile Include="..\..\third_party\bearssl\ghash_pclmul.c" />
<ClCompile Include="..\..\third_party\bearssl\hmac.c" />
<ClCompile Include="..\..\third_party\bearssl\hmac_ct.c" />
<ClCompile Include="..\..\third_party\bearssl\hmac_drbg.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_add.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_bitlen.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_decmod.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_decode.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_decred.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_encode.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_fmont.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_iszero.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_moddiv.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_modpow.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_modpow2.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_montmul.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_mulacc.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_muladd.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_ninv31.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_reduce.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_rshift.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_sub.c" />
<ClCompile Include="..\..\third_party\bearssl\i31_tmont.c" />
<ClCompile Include="..\..\third_party\bearssl\i32_div32.c" />
<ClCompile Include="..\..\third_party\bearssl\i62_modpow2.c" />
<ClCompile Include="..\..\third_party\bearssl\md5.c" />
<ClCompile Include="..\..\third_party\bearssl\md5sha1.c" />
<ClCompile Include="..\..\third_party\bearssl\multihash.c" />
<ClCompile Include="..\..\third_party\bearssl\poly1305_ctmul.c" />
<ClCompile Include="..\..\third_party\bearssl\poly1305_ctmulq.c" />
<ClCompile Include="..\..\third_party\bearssl\prf.c" />
<ClCompile Include="..\..\third_party\bearssl\prf_md5sha1.c" />
<ClCompile Include="..\..\third_party\bearssl\prf_sha256.c" />
<ClCompile Include="..\..\third_party\bearssl\prf_sha384.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_default_pkcs1_vrfy.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_default_priv.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_default_pub.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_pkcs1_vrfy.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_priv.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_pub.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_pkcs1_vrfy.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_priv.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_pub.c" />
<ClCompile Include="..\..\third_party\bearssl\rsa_pkcs1_sig_unpad.c" />
<ClCompile Include="..\..\third_party\bearssl\sha1.c" />
<ClCompile Include="..\..\third_party\bearssl\sha2big.c" />
<ClCompile Include="..\..\third_party\bearssl\sha2small.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_client.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_client_default_rsapub.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_client_full.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aescbc.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aesccm.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aesgcm.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_chapol.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_ec.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_ecdsa.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_rsavrfy.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_hashes.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_hs_client.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_io.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_cbc.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_ccm.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_chapol.c" />
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_gcm.c" />
<ClCompile Include="..\..\third_party\bearssl\x509_minimal.c" />
<ClCompile Include="..\..\third_party\bearssl\x509_minimal_full.c" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\Square150x150Logo.scale-200.png">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="Assets\Square44x44Logo.scale-200.png">
<DeploymentContent>true</DeploymentContent>
</Image>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,445 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>a901236d-c8ef-4041-966f-46f17511e342</UniqueIdentifier>
</Filter>
<Filter Include="BearSSL">
<UniqueIdentifier>{93fa4266-80e4-4bbf-a7fa-c47e07da5098}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Animations.c" />
<ClCompile Include="..\..\src\Audio.c" />
<ClCompile Include="..\..\src\AxisLinesRenderer.c" />
<ClCompile Include="..\..\src\Bitmap.c" />
<ClCompile Include="..\..\src\Block.c" />
<ClCompile Include="..\..\src\BlockPhysics.c" />
<ClCompile Include="..\..\src\Builder.c" />
<ClCompile Include="..\..\src\Camera.c" />
<ClCompile Include="..\..\src\Chat.c" />
<ClCompile Include="..\..\src\Commands.c" />
<ClCompile Include="..\..\src\Deflate.c" />
<ClCompile Include="..\..\src\Drawer.c" />
<ClCompile Include="..\..\src\Drawer2D.c" />
<ClCompile Include="..\..\src\Entity.c" />
<ClCompile Include="..\..\src\EntityComponents.c" />
<ClCompile Include="..\..\src\EntityRenderers.c" />
<ClCompile Include="..\..\src\EnvRenderer.c" />
<ClCompile Include="..\..\src\Event.c" />
<ClCompile Include="..\..\src\ExtMath.c" />
<ClCompile Include="..\..\src\FancyLighting.c" />
<ClCompile Include="..\..\src\Formats.c" />
<ClCompile Include="..\..\src\Game.c" />
<ClCompile Include="..\..\src\GameVersion.c" />
<ClCompile Include="..\..\src\Generator.c" />
<ClCompile Include="..\..\src\Gui.c" />
<ClCompile Include="..\..\src\HeldBlockRenderer.c" />
<ClCompile Include="..\..\src\Http_Worker.c" />
<ClCompile Include="..\..\src\Input.c" />
<ClCompile Include="..\..\src\InputHandler.c" />
<ClCompile Include="..\..\src\Inventory.c" />
<ClCompile Include="..\..\src\IsometricDrawer.c" />
<ClCompile Include="..\..\src\Launcher.c" />
<ClCompile Include="..\..\src\LBackend.c" />
<ClCompile Include="..\..\src\LBackend_Android.c" />
<ClCompile Include="..\..\src\Lighting.c" />
<ClCompile Include="..\..\src\Logger.c" />
<ClCompile Include="..\..\src\LScreens.c" />
<ClCompile Include="..\..\src\LWeb.c" />
<ClCompile Include="..\..\src\LWidgets.c" />
<ClCompile Include="..\..\src\MapRenderer.c" />
<ClCompile Include="..\..\src\MenuOptions.c" />
<ClCompile Include="..\..\src\Menus.c" />
<ClCompile Include="..\..\src\Model.c" />
<ClCompile Include="..\..\src\Options.c" />
<ClCompile Include="..\..\src\PackedCol.c" />
<ClCompile Include="..\..\src\Particle.c" />
<ClCompile Include="..\..\src\Physics.c" />
<ClCompile Include="..\..\src\Picking.c" />
<ClCompile Include="..\..\src\Protocol.c" />
<ClCompile Include="..\..\src\Queue.c" />
<ClCompile Include="..\..\src\Resources.c" />
<ClCompile Include="..\..\src\Screens.c" />
<ClCompile Include="..\..\src\SelectionBox.c" />
<ClCompile Include="..\..\src\SelOutlineRenderer.c" />
<ClCompile Include="..\..\src\Server.c" />
<ClCompile Include="..\..\src\SSL.c" />
<ClCompile Include="..\..\src\Stream.c" />
<ClCompile Include="..\..\src\String.c" />
<ClCompile Include="..\..\src\SystemFonts.c" />
<ClCompile Include="..\..\src\TexturePack.c" />
<ClCompile Include="..\..\src\TouchUI.c" />
<ClCompile Include="..\..\src\Utils.c" />
<ClCompile Include="..\..\src\Vectors.c" />
<ClCompile Include="..\..\src\Vorbis.c" />
<ClCompile Include="..\..\src\Widgets.c" />
<ClCompile Include="..\..\src\World.c" />
<ClCompile Include="..\..\src\Graphics_D3D11.c" />
<ClCompile Include="..\..\src\UWP\Platform_UWP.cpp" />
<ClCompile Include="..\..\src\UWP\Window_UWP.cpp" />
<ClCompile Include="..\..\src\Audio_OpenAL.c" />
<ClCompile Include="..\..\src\Certs.c" />
<ClCompile Include="..\..\third_party\bearssl\aes_big_cbcdec.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_big_cbcenc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_big_ctr.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_big_ctrcbc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_big_dec.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_big_enc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_common.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_cbcdec.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_cbcenc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_ctr.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aes_x86ni_ctrcbc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\aesctr_drbg.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\asn1enc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ccm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ccopy.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\chacha20_ct.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\chacha20_sse2.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dec32be.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dec32le.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dec64be.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dec64le.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dig_oid.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\dig_size.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_all_m31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_i31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m62.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_c25519_m64.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_curve25519.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_default.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m62.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_p256_m64.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_prime_i31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_secp256r1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_secp384r1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ec_secp521r1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_atr.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_default_vrfy_asn1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_default_vrfy_raw.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_bits.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_vrfy_asn1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ecdsa_i31_vrfy_raw.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\enc32be.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\enc32le.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\enc64be.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\enc64le.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\gcm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ghash_ctmul.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ghash_ctmul64.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ghash_pclmul.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\hmac.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\hmac_ct.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\hmac_drbg.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_add.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_bitlen.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_decmod.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_decode.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_decred.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_encode.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_fmont.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_iszero.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_moddiv.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_modpow.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_modpow2.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_montmul.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_mulacc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_muladd.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_ninv31.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_reduce.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_rshift.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_sub.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i31_tmont.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i32_div32.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\i62_modpow2.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\md5.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\md5sha1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\multihash.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\poly1305_ctmul.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\poly1305_ctmulq.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\prf.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\prf_md5sha1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\prf_sha256.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\prf_sha384.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_default_pkcs1_vrfy.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_default_priv.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_default_pub.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_pkcs1_vrfy.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_priv.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i31_pub.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_pkcs1_vrfy.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_priv.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_i62_pub.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\rsa_pkcs1_sig_unpad.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\sha1.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\sha2big.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\sha2small.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_client.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_client_default_rsapub.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_client_full.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aescbc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aesccm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_aesgcm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_chapol.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_ec.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_ecdsa.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_engine_default_rsavrfy.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_hashes.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_hs_client.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_io.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_cbc.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_ccm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_chapol.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\ssl_rec_gcm.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\x509_minimal.c">
<Filter>BearSSL</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\bearssl\x509_minimal_full.c">
<Filter>BearSSL</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Image Include="Assets\Square44x44Logo.scale-200.png" />
<Image Include="Assets\Square150x150Logo.scale-200.png" />
</ItemGroup>
</Project>

42
misc/amiga/Makefile Normal file
View File

@ -0,0 +1,42 @@
TARGET := ClassiCube-amiga
BUILD_DIR := build/amiga
SOURCE_DIRS := src src/amiga
S_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.S))
C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o)))
#---------------------------------------------------------------------------------
# Code generation
#---------------------------------------------------------------------------------
CC = vc +aos68k
CFLAGS = -rmcfg-amiga-softfloat -O1 -DPLAT_AMIGA
AS = vasmm68k_mot
ASFLAGS = -Fvobj -m68000 -no-fpu
LDFLAGS = $(CFLAGS)
LDLIBS = -lamiga -lmsoft
#---------------------------------------------------------------------------------
# Main targets
#---------------------------------------------------------------------------------
default: $(BUILD_DIR) $(TARGET)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -final -o $@ $^ $(LDLIBS)
#---------------------------------------------------------------------------------
# object generation
#---------------------------------------------------------------------------------
$(BUILD_DIR)/%.o : src/%.c
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILD_DIR)/%.o : src/amiga/%.c
$(CC) $(CFLAGS) -c -o $@ $<

View File

@ -1,20 +1,23 @@
AS=m68k-amigaos-as TARGET := ClassiCube-amiga
CC=m68k-amigaos-gcc BUILD_DIR := build/amiga_68k
CXX=m68k-amigaos-g++ SOURCE_DIRS := src src/amiga
CFLAGS :=-O1 -fno-math-errno -DPLAT_AMIGA -DCC_BUILD_NOFPU S_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.S))
TARGET := ClassiCube-68k C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
BUILD_DIR := build-amiga-68k OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o)))
SOURCE_DIR := src
LDFLAGS :=
C_SOURCES := $(wildcard $(SOURCE_DIR)/*.c)
C_ASSEMS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.S, $(C_SOURCES)) #---------------------------------------------------------------------------------
C_OBJECTS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES)) # Code generation
#---------------------------------------------------------------------------------
AS := m68k-amigaos-as
CC := m68k-amigaos-gcc
CXX := m68k-amigaos-g++
CFLAGS := -O1 -fno-math-errno -DPLAT_AMIGA -DCC_BUILD_NOFPU
# Dependency tracking # Dependency tracking
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d
DEPFILES := $(C_OBJECTS:%.o=%.d) DEPFILES := $(OBJS:%.o=%.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -32,10 +35,13 @@ $(TARGET).exe: $(C_OBJECTS)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# object generation # object generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(C_OBJECTS): $(BUILD_DIR)/%.o : $(BUILD_DIR)/%.S $(BUILD_DIR)/%.o : src/amiga/%.S
$(AS) $< -o $@ $(AS) $< -o $@
$(C_ASSEMS): $(BUILD_DIR)/%.S : $(SOURCE_DIR)/%.c $(BUILD_DIR)/%.o : src/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -S -c $< -o $@
$(BUILD_DIR)/%.o : src/amiga/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -S -c $< -o $@ $(CC) $(CFLAGS) $(DEPFLAGS) -S -c $< -o $@
# Dependency tracking # Dependency tracking

42
misc/atari_st/Makefile Normal file
View File

@ -0,0 +1,42 @@
TARGET := ClassiCube-atari
BUILD_DIR := build/atari_st
SOURCE_DIRS := src src/atari_st
S_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.S))
C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o)))
#---------------------------------------------------------------------------------
# Code generation
#---------------------------------------------------------------------------------
CC = vc +tos
CFLAGS = -O1 -DPLAT_ATARIOS
AS = vasmm68k_mot
ASFLAGS = -Fvobj -m68000 -no-fpu
LDFLAGS = $(CFLAGS)
LDLIBS = -lm
#---------------------------------------------------------------------------------
# Main targets
#---------------------------------------------------------------------------------
default: $(BUILD_DIR) $(TARGET).tos
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(TARGET).tos: $(OBJS)
$(CC) $(LDFLAGS) -final -o $@ $^ $(LDLIBS)
#---------------------------------------------------------------------------------
# object generation
#---------------------------------------------------------------------------------
$(BUILD_DIR)/%.o : src/%.c
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILD_DIR)/%.o : src/atari_st/%.c
$(CC) $(CFLAGS) -c -o $@ $<

View File

@ -31,7 +31,7 @@ DEPFILES := $(OBJS:%.o=%.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Code generation # Code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
CFLAGS = -g -DNDEBUG -O3 -fipa-pta -fno-pie -flto=auto -fomit-frame-pointer -fbuiltin -ffast-math -ffp-contract=fast -mfsrra -mfsca -pipe -fno-math-errno CFLAGS = -g -DNDEBUG -O3 -fipa-pta -fno-pie -flto=auto -fomit-frame-pointer -fbuiltin -ffast-math -ffp-contract=fast -mfsrra -mfsca -pipe -fno-math-errno -DPLAT_DREAMCAST
LDFLAGS = -g LDFLAGS = -g
# Additional libraries to link against # Additional libraries to link against

3
misc/gba/README.md Normal file
View File

@ -0,0 +1,3 @@
To see debug log messages in mGBA:
1) In the UI, make sure in Tools > Logging, that Debugger is enabled

View File

@ -33,7 +33,7 @@ DEPFILES := $(OBJS:%.o=%.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
MACHDEP = -DGEKKO -mogc -mcpu=750 -meabi -mhard-float MACHDEP = -DGEKKO -mogc -mcpu=750 -meabi -mhard-float
CFLAGS = -g -O2 -Wall $(MACHDEP) -I$(DEVKITPRO)/libogc/include CFLAGS = -g -O2 -Wall $(MACHDEP) -I$(DEVKITPRO)/libogc/include -DPLAT_GCWII
LDFLAGS = -g $(MACHDEP) -L$(DEVKITPRO)/libogc/lib/cube LDFLAGS = -g $(MACHDEP) -L$(DEVKITPRO)/libogc/lib/cube
# Additional libraries to link against # Additional libraries to link against

5
misc/gc/README.md Normal file
View File

@ -0,0 +1,5 @@
To see debug log messages in Dolphin:
1) In the UI, make sure 'Show log configuration' checkbox is checked in View menu
2) Make sure "OSReport EXI (OSREPORT)" log type is enabled
3) In the UI, make sure 'Show log' checkbox is checked in View menu

View File

@ -18,6 +18,16 @@
<string>1.0</string> <string>1.0</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>GCSupportsGameMode</key>
<true/>
<key>LSSupportsGameMode</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<false/> <false/>
<key>NSPhotoLibraryAddUsageDescription</key> <key>NSPhotoLibraryAddUsageDescription</key>
@ -138,4 +148,4 @@
</dict> </dict>
</array> </array>
</dict> </dict>
</plist> </plist>

View File

@ -16,5 +16,11 @@
<string>APPL</string> <string>APPL</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>ClassiCube</string> <string>ClassiCube</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>GCSupportsGameMode</key>
<true/>
<key>LSSupportsGameMode</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -19,7 +19,7 @@ ifdef ARCH_68040
else else
TARGET := ClassiCube-68k TARGET := ClassiCube-68k
BUILD_DIR := build/mac_68k BUILD_DIR := build/mac_68k
CFLAGS += -DCC_BUILD_NOFPU -DCC_BUILD_TINYMEM CFLAGS += -DCC_BUILD_NOFPU -DCC_BUILD_TINYMEM -DCC_GFX_BACKEND=CC_GFX_BACKEND_SOFTMIN
endif endif
SOURCE_DIR := src SOURCE_DIR := src

49
misc/msdos/Makefile Normal file
View File

@ -0,0 +1,49 @@
CC=i586-pc-msdosdjgpp-gcc
CFLAGS =-O1 -fno-math-errno -Werror -Wno-error=missing-braces -Wno-error=strict-aliasing
LDFLAGS=-g
TARGET := CCDOS
BUILD_DIR := build/msdos
SOURCE_DIRS := src src/msdos
C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o)))
# Dependency tracking
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d
DEPFILES := $(C_OBJECTS:%.o=%.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
default: $(BUILD_DIR) $(TARGET).EXE
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
#---------------------------------------------------------------------------------
# executable generation
#---------------------------------------------------------------------------------
$(TARGET).EXE: $(OBJS)
$(CC) $(OBJS) -o $@ $(LDFLAGS)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
#---------------------------------------------------------------------------------
# object generation
#---------------------------------------------------------------------------------
$(BUILD_DIR)/%.o : src/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
$(BUILD_DIR)/%.o : src/msdos/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
# Dependency tracking
$(DEPFILES):
include $(wildcard $(DEPFILES))

View File

@ -4,16 +4,24 @@ N64_ROM_TITLE = "ClassiCube"
N64_ROM_RTC = true N64_ROM_RTC = true
TARGET = ClassiCube-n64 TARGET = ClassiCube-n64
N64_MKDFS_ROOT = "misc/n64/files" N64_MKDFS_ROOT = "misc/n64/files"
SRC_DIRS =
CFILES := $(notdir $(wildcard src/*.c)) CFILES := $(notdir $(wildcard src/*.c))
OFILES := $(CFILES:.c=.o) rsp_gpu.o OFILES := $(CFILES:.c=.o) rsp_gpu.o
OBJS := $(addprefix $(BUILD_DIR)/,$(OFILES)) OBJS := $(addprefix $(BUILD_DIR)/,$(OFILES))
CFLAGS := -Wno-error=missing-braces -Wno-error=strict-aliasing -Wno-error=incompatible-pointer-types CFLAGS := -Wno-error=missing-braces -Wno-error=strict-aliasing -Wno-error=incompatible-pointer-types -DPLAT_N64
default: $(BUILD_DIR) $(TARGET).z64
clean:
rm -rf $(BUILD_DIR) $(TARGET).z64
$(BUILD_DIR):
mkdir -p $@
default: $(TARGET).z64
$(BUILD_DIR)/%.o: src/%.c $(BUILD_DIR)/%.o: src/%.c
@mkdir -p $(dir $@)
@echo " [CC] $<" @echo " [CC] $<"
$(CC) -c $(CFLAGS) -o $@ $< $(CC) -c $(CFLAGS) -o $@ $<
@ -26,8 +34,4 @@ $(BUILD_DIR)/filesystem.dfs: misc/n64/files/default.zip
$(BUILD_DIR)/ClassiCube-n64.elf: $(OBJS) $(BUILD_DIR)/ClassiCube-n64.elf: $(OBJS)
clean:
rm -rf $(BUILD_DIR) $(TARGET).z64
.PHONY: clean
-include $(wildcard $(BUILD_DIR)/*.d) -include $(wildcard $(BUILD_DIR)/*.d)

View File

@ -294,14 +294,17 @@ GL_TnL:
ssv vcspos_i.W, SCREEN_VTX_W+0, vtx2 ssv vcspos_i.W, SCREEN_VTX_W+0, vtx2
ssv vcspos_f.W, SCREEN_VTX_W+2, vtx2 ssv vcspos_f.W, SCREEN_VTX_W+2, vtx2
// Perspective division
vmudl v___, vcspos_f, vinvw_f.wwwwWWWW vmudl v___, vcspos_f, vinvw_f.wwwwWWWW
vmadm v___, vcspos_i, vinvw_f.wwwwWWWW vmadm v___, vcspos_i, vinvw_f.wwwwWWWW
vmadn vscreenpos_f, vcspos_f, vinvw_i.wwwwWWWW vmadn vscreenpos_f, vcspos_f, vinvw_i.wwwwWWWW
vmadh vscreenpos_i, vcspos_i, vinvw_i.wwwwWWWW vmadh vscreenpos_i, vcspos_i, vinvw_i.wwwwWWWW
// Clip against guard planes
vch v___, vguard_i, vguard_i.wwwwWWWW vch v___, vguard_i, vguard_i.wwwwWWWW
vcl v___, vguard_f, vguard_f.wwwwWWWW vcl v___, vguard_f, vguard_f.wwwwWWWW
// Viewport transform
vmudn v___, vscreenpos_f, vviewscale vmudn v___, vscreenpos_f, vviewscale
vmadh v___, vscreenpos_i, vviewscale vmadh v___, vscreenpos_i, vviewscale
vmadh vscreenpos_i, vviewoff, K1 vmadh vscreenpos_i, vviewoff, K1

View File

@ -7,7 +7,7 @@ export BLOCKSDSEXT ?= /opt/wonderful/thirdparty/blocksds/external
GAME_TITLE := ClassiCube GAME_TITLE := ClassiCube
GAME_SUBTITLE := Built with BlocksDS GAME_SUBTITLE := Built with BlocksDS
GAME_AUTHOR := ClassiCube team GAME_AUTHOR := ClassiCube team
GAME_ICON := misc/ds/icon.bmp GAME_ICON := misc/nds/icon.bmp
GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_SUBTITLE);$(GAME_AUTHOR) GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_SUBTITLE);$(GAME_AUTHOR)
@ -36,15 +36,15 @@ endif
all: $(ROM) all: $(ROM)
clean: clean:
$(MAKE) -f Makefile.arm9 clean --no-print-directory $(MAKE) -f misc/nds/Makefile.arm9 clean --no-print-directory
$(MAKE) -f Makefile.arm7 clean --no-print-directory $(MAKE) -f misc/nds/Makefile.arm7 clean --no-print-directory
$(RM) $(ROM) $(BUILDDIR) $(SDIMAGE) $(RM) $(ROM) $(BUILDDIR) $(SDIMAGE)
arm9: arm9:
$(MAKE) -f misc/ds/Makefile.arm9 --no-print-directory $(MAKE) -f misc/nds/Makefile.arm9 --no-print-directory
arm7: arm7:
$(MAKE) -f misc/ds/Makefile.arm7 --no-print-directory $(MAKE) -f misc/nds/Makefile.arm7 --no-print-directory
$(ROM): arm9 arm7 $(ROM): arm9 arm7

View File

@ -6,7 +6,7 @@ export BLOCKSDSEXT ?= /opt/wonderful/thirdparty/blocksds/external
export WONDERFUL_TOOLCHAIN ?= /opt/wonderful export WONDERFUL_TOOLCHAIN ?= /opt/wonderful
ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/ ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/
SOURCEDIRS := misc/ds SOURCEDIRS := misc/nds
INCLUDEDIRS := INCLUDEDIRS :=
DSIWIFI := third_party/dsiwifi DSIWIFI := third_party/dsiwifi

View File

@ -6,7 +6,7 @@ export BLOCKSDSEXT ?= /opt/wonderful/thirdparty/blocksds/external
export WONDERFUL_TOOLCHAIN ?= /opt/wonderful export WONDERFUL_TOOLCHAIN ?= /opt/wonderful
ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/ ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/
SOURCEDIRS := src SOURCEDIRS := src src/nds
INCLUDEDIRS := INCLUDEDIRS :=
DSIWIFI := third_party/dsiwifi DSIWIFI := third_party/dsiwifi

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -42,6 +42,8 @@ typedef cc_uintptr GLpointer;
#define GL_TRIANGLES 0x0004 #define GL_TRIANGLES 0x0004
#define GL_QUADS 0x0007 #define GL_QUADS 0x0007
#define GL_ZERO 0
#define GL_ONE 1
#define GL_BLEND 0x0BE2 #define GL_BLEND 0x0BE2
#define GL_SRC_ALPHA 0x0302 #define GL_SRC_ALPHA 0x0302
#define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_ONE_MINUS_SRC_ALPHA 0x0303

View File

@ -139,6 +139,10 @@ $(BUILD_DIR)/%.o: src/ps3/%.S
$(BUILD_DIR)/%.o: third_party/bearssl/%.c $(BUILD_DIR)/%.o: third_party/bearssl/%.c
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
# prevent the .asm files from being deleted
.PRECIOUS: $(BUILD_DIR)/%.vpo $(BUILD_DIR)/%.fpo
$(BUILD_DIR)/%.vpo: $(SHADERS)/%.vcg $(BUILD_DIR)/%.vpo: $(SHADERS)/%.vcg
$(CGCOMP) -v $(CGCFLAGS) $^ $@ $(CGCOMP) -v $(CGCFLAGS) $^ $@
$(BUILD_DIR)/%.fpo: $(SHADERS)/%.fcg $(BUILD_DIR)/%.fpo: $(SHADERS)/%.fcg

View File

@ -1,53 +1,76 @@
# Package metadata. ifeq ($(strip $(OO_PS4_TOOLCHAIN)),)
TITLE := OpenOrbis Hello World Sample $(error "Please set OO_PS4_TOOLCHAIN in your environment. export OO_PS4_TOOLCHAIN=<path>")
endif
TOOLCHAIN := $(OO_PS4_TOOLCHAIN)
.SUFFIXES:
#---------------------------------------------------------------------------------
# Configurable options
#---------------------------------------------------------------------------------
BUILD_DIR = build/ps4
SOURCE_DIRS = src src/ps4 third_party/bearssl
TARGET = ClassiCube-PS4
TITLE := ClassiCube
VERSION := 1.00 VERSION := 1.00
TITLE_ID := BREW00083 TITLE_ID := BREW00083
CONTENT_ID := IV0000-BREW00083_00-HELLOWORLD000000 CONTENT_ID := IV0000-BREW00083_00-HELLOWORLD000000
# Libraries linked into the ELF. #---------------------------------------------------------------------------------
# Compilable files
#---------------------------------------------------------------------------------
CPP_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.cpp))
C_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS = $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(CPP_FILES:%.cpp=%.o)))
# Dependency tracking
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d
DEPFILES := $(OBJS:%.o=%.d)
#---------------------------------------------------------------------------------
# Code generation
#--------------------------------------------------------------------------------
LIBS := -lc -lkernel -lc++ -lSceVideoOut -lSceNet LIBS := -lc -lkernel -lc++ -lSceVideoOut -lSceNet
# Additional compile flags.
#EXTRAFLAGS :=
# Asset and module directories.
LIBMODULES := $(wildcard sce_module/*)
# You likely won't need to touch anything below this point.
# Root vars
TOOLCHAIN := $(OO_PS4_TOOLCHAIN)
PROJDIR := src
INTDIR := build-ps4
# Define objects to build
CFILES := $(wildcard $(PROJDIR)/*.c)
CPPFILES := $(wildcard $(PROJDIR)/*.cpp)
OBJS := $(patsubst $(PROJDIR)/%.c, $(INTDIR)/%.o, $(CFILES)) $(patsubst $(PROJDIR)/%.cpp, $(INTDIR)/%.o, $(CPPFILES))
# Define final C/C++ flags
CFLAGS := --target=x86_64-pc-freebsd12-elf -fPIC -funwind-tables -c $(EXTRAFLAGS) -isysroot $(TOOLCHAIN) -isystem $(TOOLCHAIN)/include -isystem $(TOOLCHAIN)/include/orbis -DPLAT_PS4 CFLAGS := --target=x86_64-pc-freebsd12-elf -fPIC -funwind-tables -c $(EXTRAFLAGS) -isysroot $(TOOLCHAIN) -isystem $(TOOLCHAIN)/include -isystem $(TOOLCHAIN)/include/orbis -DPLAT_PS4
CXXFLAGS := $(CFLAGS) -isystem $(TOOLCHAIN)/include/c++/v1 CXXFLAGS := $(CFLAGS) -isystem $(TOOLCHAIN)/include/c++/v1
LDFLAGS := -m elf_x86_64 -pie --script $(TOOLCHAIN)/link.x --eh-frame-hdr -L$(TOOLCHAIN)/lib $(LIBS) $(TOOLCHAIN)/lib/crt1.o LDFLAGS := -m elf_x86_64 -pie --script $(TOOLCHAIN)/link.x --eh-frame-hdr -L$(TOOLCHAIN)/lib $(LIBS) $(TOOLCHAIN)/lib/crt1.o
# Create the intermediate directory incase it doesn't already exist.
_unused := $(shell mkdir -p $(INTDIR))
#---------------------------------------------------------------------------------
# Compiler tools
#---------------------------------------------------------------------------------
CC := clang CC := clang
CCX := clang++ CCX := clang++
LD := ld.lld LD := ld.lld
CDIR := linux CDIR := linux
all: $(CONTENT_ID).pkg
#---------------------------------------------------------------------------------
# Main targets
#---------------------------------------------------------------------------------
all: $(BUILD_DIR) $(CONTENT_ID).pkg
clean:
rm -f $(CONTENT_ID).pkg pkg.gp4 pkg/sce_sys/param.sfo eboot.bin \
$(BUILD_DIR)/$(PROJDIR).elf $(BUILD_DIR)/$(PROJDIR).oelf $(OBJS)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
#---------------------------------------------------------------------------------
# Executable generation
#---------------------------------------------------------------------------------
$(CONTENT_ID).pkg: pkg.gp4 $(CONTENT_ID).pkg: pkg.gp4
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core pkg_build $< . $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core pkg_build $< .
pkg.gp4: eboot.bin pkg.gp4: eboot.bin $(BUILD_DIR)/sce_sys/param.sfo
cd misc/ps4 $(TOOLCHAIN)/bin/$(CDIR)/create-gp4 -out $@ --content-id=$(CONTENT_ID) --files "eboot.bin sce_sys/about/right.sprx sce_sys/param.sfo sce_sys/icon0.png"
$(TOOLCHAIN)/bin/$(CDIR)/create-gp4 -out $@ --content-id=$(CONTENT_ID) --files "sce_sys/about/right.sprx sce_sys/param.sfo sce_sys/icon0.png"
misc/ps4/sce_sys/param.sfo: Makefile $(BUILD_DIR)/sce_sys/param.sfo:
mkdir -p $(BUILD_DIR)/sce_sys
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_new $@ $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_new $@
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ APP_TYPE --type Integer --maxsize 4 --value 1 $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ APP_TYPE --type Integer --maxsize 4 --value 1
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ APP_VER --type Utf8 --maxsize 8 --value '$(VERSION)' $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ APP_VER --type Utf8 --maxsize 8 --value '$(VERSION)'
@ -60,16 +83,32 @@ misc/ps4/sce_sys/param.sfo: Makefile
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ TITLE_ID --type Utf8 --maxsize 12 --value '$(TITLE_ID)' $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ TITLE_ID --type Utf8 --maxsize 12 --value '$(TITLE_ID)'
$(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ VERSION --type Utf8 --maxsize 8 --value '$(VERSION)' $(TOOLCHAIN)/bin/$(CDIR)/PkgTool.Core sfo_setentry $@ VERSION --type Utf8 --maxsize 8 --value '$(VERSION)'
eboot.bin: $(INTDIR) $(OBJS) $(BUILD_DIR)/$(TARGET).elf: $(OBJS)
$(LD) $(INTDIR)/*.o -o $(INTDIR)/$(PROJDIR).elf $(LDFLAGS) $(LD) $(OBJS) -o $(BUILD_DIR)/$(TARGET).elf $(LDFLAGS)
$(TOOLCHAIN)/bin/$(CDIR)/create-fself -in=$(INTDIR)/$(PROJDIR).elf -out=$(INTDIR)/$(PROJDIR).oelf --eboot "eboot.bin" --paid 0x3800000000000011
$(INTDIR)/%.o: $(PROJDIR)/%.c eboot.bin: $(BUILD_DIR)/$(TARGET).elf
$(CC) $(CFLAGS) -o $@ $< $(TOOLCHAIN)/bin/$(CDIR)/create-fself -in=$(BUILD_DIR)/$(TARGET).elf -out=$(BUILD_DIR)/$(TARGET).oelf --eboot "eboot.bin" --paid 0x3800000000000011
$(INTDIR)/%.o: $(PROJDIR)/%.cpp
$(CCX) $(CXXFLAGS) -o $@ $<
clean: #---------------------------------------------------------------------------------
rm -f $(CONTENT_ID).pkg pkg.gp4 pkg/sce_sys/param.sfo eboot.bin \ # Object generation
$(INTDIR)/$(PROJDIR).elf $(INTDIR)/$(PROJDIR).oelf $(OBJS) #---------------------------------------------------------------------------------
$(BUILD_DIR)/%.o: src/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
$(BUILD_DIR)/%.o: src/%.cpp
$(CCX) $(CXXFLAGS) $(DEPFLAGS) -c $< -o $@
$(BUILD_DIR)/%.o: src/ps4/%.c
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
$(BUILD_DIR)/%.o: third_party/bearssl/%.c
$(CC) $(CFLAGS) -c $< -o $@
#---------------------------------------------------------------------------------
# Dependency tracking
#---------------------------------------------------------------------------------
$(DEPFILES):
include $(wildcard $(DEPFILES))

View File

@ -18,7 +18,9 @@ SOURCE_DIRS = src src/psp third_party/bearssl
# Directory where object files are placed # Directory where object files are placed
BUILD_DIR = build/psp BUILD_DIR = build/psp
PSP_EBOOT_TITLE = ClassiCube SFO_TITLE = ClassiCube
SFO_DISCID = CUBE02000
PSP_EBOOT_ICON = misc/psp/ICON0.png PSP_EBOOT_ICON = misc/psp/ICON0.png
PSP_EBOOT_SFO = PARAM.SFO PSP_EBOOT_SFO = PARAM.SFO
PSP_EBOOT_ICON1 = NULL PSP_EBOOT_ICON1 = NULL
@ -36,7 +38,7 @@ S_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.S))
C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o))) OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o)))
CFLAGS := -I$(PSPSDK)/include -g -O1 -fno-math-errno -D_PSP_FW_VERSION=600 CFLAGS := -I$(PSPSDK)/include -g -O1 -fno-math-errno -D_PSP_FW_VERSION=600 -DPLAT_PSP
ASFLAGS := -I$(PSPSDK)/include -g ASFLAGS := -I$(PSPSDK)/include -g
LDFLAGS := -L$(PSPSDK)/lib -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx -Wl,-zmax-page-size=128 LDFLAGS := -L$(PSPSDK)/lib -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx -Wl,-zmax-page-size=128
@ -82,7 +84,7 @@ $(TARGET).prx: $(TARGET).elf
$(PRXGEN) $< $@ $(PRXGEN) $< $@
$(PSP_EBOOT_SFO): $(PSP_EBOOT_SFO):
$(MKSFO) -d MEMSIZE=1 '$(PSP_EBOOT_TITLE)' $@ $(MKSFO) -d MEMSIZE=1 -s DISC_ID="$(SFO_DISCID)" '$(SFO_TITLE)' $@
$(PSP_EBOOT): $(TARGET).prx $(PSP_EBOOT_SFO) $(PSP_EBOOT): $(TARGET).prx $(PSP_EBOOT_SFO)
$(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \ $(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \

4
misc/psp/README.md Normal file
View File

@ -0,0 +1,4 @@
To see debug log messages in PPSSPP:
1) Make sure 'printf' log level in Logging Channels is set to "Debug"

View File

@ -37,7 +37,7 @@ DEPFILES := $(OBJS:%.o=%.d)
# Code generation # Code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
ARCH = -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE ARCH = -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
CFLAGS = -g -Wall -O2 -ffunction-sections $(ARCH) -D__SWITCH__ CFLAGS = -g -Wall -O2 -ffunction-sections $(ARCH) -D__SWITCH__ -DPLAT_SWITCH
ASFLAGS = -g $(ARCH) ASFLAGS = -g $(ARCH)
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH)

View File

@ -10,7 +10,7 @@
:"ClassiCube" :"ClassiCube"
; Check OpenC versions ; Check OpenC versions
IF( version(0x20009a80, <, 1, 5, 0) ) AND NOT (EXISTS("Z:\sys\bin\libc.dll") OR EXISTS("C:\sys\bin\libc.dll")) IF version(0x20009a80, <, 1, 5, 0) AND NOT EXISTS("C:\sys\bin\libc.dll")
"incompatible_openc.txt"-"", FT, FORCEABORT "incompatible_openc.txt"-"", FT, FORCEABORT
ENDIF ENDIF

View File

@ -17,8 +17,8 @@ SOURCE_DIRS = src src/psvita third_party/bearssl
# Directory where object files are placed # Directory where object files are placed
BUILD_DIR = build/vita BUILD_DIR = build/vita
PROJECT_TITLE = ClassiCube SFO_TITLE = ClassiCube
PROJECT_TITLEID = CUBE00200 SFO_TITLEID = CUBE00200
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -35,7 +35,7 @@ DEPFILES := $(OBJS:%.o=%.d)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Code generation # Code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
CFLAGS = -O1 CFLAGS = -O1 -DPLAT_VITA -fno-math-errno
LDFLAGS = -Wl,-q LDFLAGS = -Wl,-q
LIBS = -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub -lSceCommonDialog_stub -lSceAppUtil_stub LIBS = -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub -lSceCommonDialog_stub -lSceAppUtil_stub
@ -78,7 +78,7 @@ eboot.bin: $(TARGET).velf
$(MAKE_FSELF) $(TARGET).velf eboot.bin $(MAKE_FSELF) $(TARGET).velf eboot.bin
param.sfo: param.sfo:
$(MKSOFEX) -s TITLE_ID="$(PROJECT_TITLEID)" "$(PROJECT_TITLE)" param.sfo $(MKSOFEX) -s TITLE_ID="$(SFO_TITLEID)" "$(SFO_TITLE)" param.sfo
$(TARGET).velf: $(TARGET).elf $(TARGET).velf: $(TARGET).elf
$(VITA_STRIP) -g $< $(VITA_STRIP) -g $<

View File

@ -32,7 +32,7 @@ DEPFILES := $(OBJS:%.o=%.d)
# Code generation # Code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS = -g -O2 -Wall $(MACHDEP) -I$(DEVKITPRO)/libogc/include CFLAGS = -g -O2 -Wall $(MACHDEP) -I$(DEVKITPRO)/libogc/include -DPLAT_GCWII
LDFLAGS = -g $(MACHDEP) -L$(DEVKITPRO)/libogc/lib/wii LDFLAGS = -g $(MACHDEP) -L$(DEVKITPRO)/libogc/lib/wii
# Additional libraries to link against # Additional libraries to link against

5
misc/wii/README.md Normal file
View File

@ -0,0 +1,5 @@
To see debug log messages in Dolphin:
1) In the UI, make sure 'Show log configuration' checkbox is checked in View menu
2) Make sure "OSReport EXI (OSREPORT)" log type is enabled
3) In the UI, make sure 'Show log' checkbox is checked in View menu

View File

@ -1,170 +1,123 @@
#-------------------------------------------------------------------------------
.SUFFIXES:
#-------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPRO)),) ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro") $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif endif
TOPDIR ?= $(CURDIR) .SUFFIXES:
#-------------------------------------------------------------------------------
# APP_NAME sets the long name of the application
# APP_SHORTNAME sets the short name of the application
# APP_AUTHOR sets the author of the application
#-------------------------------------------------------------------------------
APP_NAME := ClassiCube
APP_SHORTNAME := ClassiCube
APP_AUTHOR := ClassiCube team
include $(DEVKITPRO)/wut/share/wut_rules #---------------------------------------------------------------------------------
# Configurable options
#---------------------------------------------------------------------------------
# Name of the final output
TARGET = ClassiCube-wiiu
# List of directories containing source code
SOURCE_DIRS = src src/wiiu third_party/bearssl
# Directory where object files are placed
BUILD_DIR = build/wiiu
# Directory where shader files are
SHADERS = misc/wiiu
#------------------------------------------------------------------------------- WUHB_OPTIONS = \
# TARGET is the name of the output --name "ClassiCube" \
# BUILD is the directory where object files & intermediate files will be placed --short-name "ClassiCube" \
# SOURCES is a list of directories containing source code --author "ClassiCube team" \
# DATA is a list of directories containing data files --icon=misc/wiiu/icon.png
# INCLUDES is a list of directories containing header files
# CONTENT is the path to the bundled folder that will be mounted as /vol/content/
# ICON is the game icon, leave blank to use default rule
# TV_SPLASH is the image displayed during bootup on the TV, leave blank to use default rule
# DRC_SPLASH is the image displayed during bootup on the DRC, leave blank to use default rule
#-------------------------------------------------------------------------------
TARGET := ClassiCube-wiiu
BUILD := build-wiiu
SOURCES := src third_party/bearssl
SHADERS := misc/wiiu
DATA := data
INCLUDES :=
CONTENT :=
ICON :=
TV_SPLASH :=
DRC_SPLASH :=
#------------------------------------------------------------------------------- #WUHB_OPTIONS += --tv-image=misc/wiiu/tv_splash.png
# options for code generation #WUHB_OPTIONS += --drc-image=misc/wiiu/drc_splash.png
#-------------------------------------------------------------------------------
CFLAGS := -g -Wall -O2 -ffunction-sections -fno-math-errno \
$(MACHDEP)
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
CXXFLAGS := $(CFLAGS) #---------------------------------------------------------------------------------
# Compilable files
#---------------------------------------------------------------------------------
S_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.S))
C_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS = $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o) $(S_FILES:%.S=%.o)))
ASFLAGS := -g $(ARCH) BINFILES := $(foreach dir,$(SHADERS),$(wildcard $(dir)/*.gsh))
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) OBJS += $(addprefix $(BUILD_DIR)/, $(notdir $(BINFILES:%.gsh=%.gsh.o)))
LIBS := -lwut -lm
#-------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level
# containing include and lib
#-------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(WUT_ROOT)
#-------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#-------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#-------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export TOPDIR := $(CURDIR)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(SHADERS),$(notdir $(wildcard $(dir)/*.gsh)))
export LD := $(CC)
export OFILES_BIN := $(addsuffix .o,$(BINFILES)) export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ # Dependency tracking
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \ DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d
-I$(CURDIR)/$(BUILD) DEPFILES := $(OBJS:%.o=%.d)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
ifneq (,$(strip $(CONTENT))) #---------------------------------------------------------------------------------
export APP_CONTENT := $(TOPDIR)/$(CONTENT) # Code generation
endif #---------------------------------------------------------------------------------
MACHDEP = -DESPRESSO -mcpu=750 -meabi -mhard-float
CFLAGS = -g -Wall -O2 -ffunction-sections -fno-math-errno $(MACHDEP) \
-I $(DEVKITPRO)/wut/include \
-D__WIIU__ -D__WUT__ -DPLAT_WIIU
ifneq (,$(strip $(ICON))) LDFLAGS = -g $(MACHDEP) -specs=$(DEVKITPRO)/wut/share/wut.specs \
export APP_ICON := $(TOPDIR)/$(ICON) -L $(DEVKITPRO)/wut/lib
else ifneq (,$(wildcard $(TOPDIR)/$(TARGET).png)) # Additional libraries to link against
export APP_ICON := $(TOPDIR)/$(TARGET).png LIBS = -lwut -lm
else ifneq (,$(wildcard $(TOPDIR)/icon.png))
export APP_ICON := $(TOPDIR)/icon.png
endif
ifneq (,$(strip $(TV_SPLASH)))
export APP_TV_SPLASH := $(TOPDIR)/$(TV_SPLASH)
else ifneq (,$(wildcard $(TOPDIR)/tv-splash.png))
export APP_TV_SPLASH := $(TOPDIR)/tv-splash.png
else ifneq (,$(wildcard $(TOPDIR)/splash.png))
export APP_TV_SPLASH := $(TOPDIR)/splash.png
endif
ifneq (,$(strip $(DRC_SPLASH))) #---------------------------------------------------------------------------------
export APP_DRC_SPLASH := $(TOPDIR)/$(DRC_SPLASH) # Compiler tools
else ifneq (,$(wildcard $(TOPDIR)/drc-splash.png)) #---------------------------------------------------------------------------------
export APP_DRC_SPLASH := $(TOPDIR)/drc-splash.png PREFIX := $(DEVKITPRO)/devkitPPC/bin/powerpc-eabi-
else ifneq (,$(wildcard $(TOPDIR)/splash.png)) PPC_AS := $(PREFIX)as
export APP_DRC_SPLASH := $(TOPDIR)/splash.png PPC_CC := $(PREFIX)gcc
endif PPC_CXX := $(PREFIX)g++
.PHONY: $(BUILD) clean all ELF2RPL := $(DEVKITPRO)/tools/bin/elf2rpl
WUHBTOOL := $(DEVKITPRO)/tools/bin/wuhbtool
BIN2S := $(DEVKITPRO)/tools/bin/bin2s
#-------------------------------------------------------------------------------
all: $(BUILD)
$(BUILD): #---------------------------------------------------------------------------------
@[ -d $@ ] || mkdir -p $@ # Main targets
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/misc/wiiu/Makefile #---------------------------------------------------------------------------------
default: $(BUILD_DIR) $(TARGET).wuhb
#-------------------------------------------------------------------------------
clean: clean:
@echo clean ... rm $(TARGET).wuhb $(TARGET).rpx $(TARGET).elf $(OBJS)
@rm -fr $(BUILD) $(TARGET).wuhb $(TARGET).rpx $(TARGET).elf
#------------------------------------------------------------------------------- $(BUILD_DIR):
else mkdir -p $(BUILD_DIR)
.PHONY: all
DEPENDS := $(OFILES:.o=.d)
#------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# main targets # Executable generation
#------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
all : $(OUTPUT).wuhb $(TARGET).elf: $(OBJS)
$(PPC_CC) $(LDFLAGS) $^ -o $@ $(LIBS)
$(TARGET).rpx: $(TARGET).elf
$(ELF2RPL) $< $@
$(TARGET).wuhb: $(TARGET).rpx
$(WUHBTOOL) $< $@ $(WUHB_OPTIONS)
$(OUTPUT).wuhb : $(OUTPUT).rpx
$(OUTPUT).rpx : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES)
# you need a rule like this for each extension you use as binary data #---------------------------------------------------------------------------------
#------------------------------------------------------------------------------- # Object generation
%.bin.o %_bin.h : %.bin #---------------------------------------------------------------------------------
#------------------------------------------------------------------------------- $(BUILD_DIR)/%.o: src/%.c
@echo $(notdir $<) $(PPC_CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
@$(bin2o)
#-------------------------------------------------------------------------------
%.gsh.o %_gsh.h : ../misc/wiiu/%.gsh
#-------------------------------------------------------------------------------
echo $(notdir $<)
$(bin2o)
-include $(DEPENDS) $(BUILD_DIR)/%.o: src/wiiu/%.S
$(PPC_CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
#------------------------------------------------------------------------------- $(BUILD_DIR)/%.o: src/wiiu/%.c
endif $(PPC_CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
#-------------------------------------------------------------------------------
$(BUILD_DIR)/%.o: third_party/bearssl/%.c
$(PPC_CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/%.gsh.o : misc/wiiu/%.gsh
$(BIN2S) $< | $(PPC_CC) -x assembler-with-cpp -c - -o $@
#---------------------------------------------------------------------------------
# Dependency tracking
#---------------------------------------------------------------------------------
$(DEPFILES):
include $(wildcard $(DEPFILES))

BIN
misc/wiiu/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -15,7 +15,7 @@ XBE_TITLE = ClassiCube
# List of directories containing source code # List of directories containing source code
SOURCE_DIRS = src src/xbox third_party/bearssl SOURCE_DIRS = src src/xbox third_party/bearssl
# Shader objects # Shader objects
SHADER_OBJS = misc/xbox/vs_coloured.inl misc/xbox/vs_textured.inl misc/xbox/ps_coloured.inl misc/xbox/ps_textured.inl SHADER_OBJS = misc/xbox/vs_coloured.inl misc/xbox/vs_textured.inl misc/xbox/vs_offset.inl misc/xbox/ps_coloured.inl misc/xbox/ps_textured.inl
# Directory where object files are placed # Directory where object files are placed
BUILD_DIR = build/xbox BUILD_DIR = build/xbox
@ -82,7 +82,7 @@ $(BUILD_DIR):
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Executable generation # Executable generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(OBJS) : $(SHADER_OBJS) $(BUILD_DIR)/Graphics_Xbox.o : $(SHADER_OBJS)
$(TARGET).iso: $(TARGET).xbe $(TARGET).iso: $(TARGET).xbe
mkdir -p $(BUILD_DIR)/cd mkdir -p $(BUILD_DIR)/cd
@ -111,15 +111,21 @@ $(BUILD_DIR)/%.o: src/xbox/%.S
$(BUILD_DIR)/%.o: third_party/bearssl/%.c $(BUILD_DIR)/%.o: third_party/bearssl/%.c
nxdk-cc $(NXDK_CFLAGS) $(CFLAGS) -c $< -o $@ nxdk-cc $(NXDK_CFLAGS) $(CFLAGS) -c $< -o $@
%.inl: %.vs.cg
$(CGC) -profile vp20 -o $@.$$$$ $< && \
$(VP20COMPILER) $@.$$$$ > $@ && \
rm -rf $@.$$$$
%.inl: %.ps.cg # prevent the .asm files from being deleted
$(CGC) -profile fp20 -o $@.$$$$ $< && \ .PRECIOUS: vs_%.asm ps_%.asm
$(FP20COMPILER) $@.$$$$ > $@ && \
rm -rf $@.$$$$ vs_%.inl: vs_%.asm
$(VP20COMPILER) $< > $@
vs_%.asm: vs_%.cg
$(CGC) -profile vp20 $< -o $@
ps_%.inl: ps_%.asm
$(FP20COMPILER) $< > $@
ps_%.asm: ps_%.cg
$(CGC) -profile fp20 $< -o $@
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

11
misc/xbox/README.md Normal file
View File

@ -0,0 +1,11 @@
To see debug log messages in Xemu:
1) Launch Xemu as `xemu -device lpc47m157 -serial stdio`
----
To launch directly, `-dvd_path cc-xbox.iso`
####
The .asm files are auto generated from the .cg files, and shouldn't be manually edited.

14
misc/xbox/ps_coloured.asm Normal file
View File

@ -0,0 +1,14 @@
// nvparse 1.0 output generated by NVIDIA Cg compiler
// cgc version 3.1.0013, build date Apr 24 2012
// command line args: -profile fp20
// source file: misc/xbox/ps_coloured.cg
//vendor NVIDIA Corporation
//version 3.1.0.13
//profile fp20
//program main
//var float4 input.color : $vin.COLOR : COLOR0 : 0 : 1
//var float4 main : $vout.COLOR : COLOR : -1 : 1
!!RC1.0
out.rgb = unsigned(col0.rgb);
out.a = unsigned(col0.a);
// 0 instructions

30
misc/xbox/ps_textured.asm Normal file
View File

@ -0,0 +1,30 @@
// nvparse 1.0 output generated by NVIDIA Cg compiler
// cgc version 3.1.0013, build date Apr 24 2012
// command line args: -profile fp20
// source file: misc/xbox/ps_textured.cg
//vendor NVIDIA Corporation
//version 3.1.0.13
//profile fp20
//program main
//semantic main.tex
//var sampler2D tex : : 0 : 1 : 1
//var float4 input.color : $vin.COLOR : COLOR0 : 0 : 1
//var float2 input.tex0 : $vin.TEXCOORD0 : TEXCOORD0 : 0 : 1
//var float4 main : $vout.COLOR : COLOR : -1 : 1
!!TS1.0
texture_2d();
// End of program
!!RC1.0
{
rgb
{
col0 = tex0.rgb * col0.rgb;
}
alpha
{
col0 = tex0.a * col0.a;
}
}
out.rgb = unsigned(col0.rgb);
out.a = unsigned(col0.a);
// 3 instructions

24
misc/xbox/vs_coloured.asm Normal file
View File

@ -0,0 +1,24 @@
!!VP1.1
# cgc version 3.1.0013, build date Apr 24 2012
# command line args: -profile vp20
# source file: misc/xbox/vs_coloured.cg
#vendor NVIDIA Corporation
#version 3.1.0.13
#profile vp20
#program main
#semantic main.mvp
#var float4 input.col : $vin.DIFFUSE : ATTR3 : 0 : 1
#var float4 input.pos : $vin.POSITION : ATTR0 : 0 : 1
#var float4x4 mvp : : c[0], 4 : 1 : 1
#var float4 main.col : $vout.COLOR : COL0 : -1 : 1
#var float4 main.pos : $vout.POSITION : HPOS : -1 : 1
MUL R0, v[0].y, c[1];
MAD R0, v[0].x, c[0], R0;
MAD R0, v[0].z, c[2], R0;
ADD R0, R0, c[3];
RCP R1.x, R0.w;
MUL o[HPOS].xyz, R0, R1.x;
MOV o[COL0], v[3];
MOV o[HPOS].w, R0;
END
# 8 instructions, 0 R-regs

View File

@ -1,6 +1,6 @@
struct vIn { struct vIn {
float4 color : DIFFUSE; float4 col : DIFFUSE;
float4 position : POSITION; float4 pos : POSITION;
}; };
struct vOut { struct vOut {
@ -16,11 +16,11 @@ vOut main(
vOut result; vOut result;
float4 position; float4 position;
position = float4(input.position.xyz, 1.0f); position = float4(input.pos.xyz, 1.0f);
position = mul(position, mvp); position = mul(position, mvp);
position.xyz = position.xyz / position.w; position.xyz = position.xyz / position.w;
result.pos = position; result.pos = position;
result.col = input.color; result.col = input.col;
return result; return result;
} }

29
misc/xbox/vs_offset.asm Normal file
View File

@ -0,0 +1,29 @@
!!VP1.1
# cgc version 3.1.0013, build date Apr 24 2012
# command line args: -profile vp20
# source file: misc/xbox/vs_offset.cg
#vendor NVIDIA Corporation
#version 3.1.0.13
#profile vp20
#program main
#semantic main.mvp
#semantic main.tex_offset
#var float4 input.tex : $vin.TEXCOORD : TEXCOORD0 : 0 : 1
#var float4 input.col : $vin.DIFFUSE : ATTR3 : 0 : 1
#var float4 input.pos : $vin.POSITION : ATTR0 : 0 : 1
#var float4x4 mvp : : c[0], 4 : 1 : 1
#var float4 tex_offset : : c[4] : 2 : 1
#var float4 main.pos : $vout.POSITION : HPOS : -1 : 1
#var float4 main.col : $vout.COLOR : COL0 : -1 : 1
#var float4 main.tex : $vout.TEXCOORD0 : TEX0 : -1 : 1
MUL R0, v[0].y, c[1];
MAD R0, v[0].x, c[0], R0;
MAD R0, v[0].z, c[2], R0;
ADD R0, R0, c[3];
RCP R1.x, R0.w;
MUL o[HPOS].xyz, R0, R1.x;
MOV o[HPOS].w, R0;
MOV o[COL0], v[3];
ADD o[TEX0], v[8], c[4];
END
# 9 instructions, 0 R-regs

30
misc/xbox/vs_offset.cg Normal file
View File

@ -0,0 +1,30 @@
struct vIn {
float4 tex : TEXCOORD;
float4 col : DIFFUSE;
float4 pos : POSITION;
};
struct vOut {
float4 pos : POSITION;
float4 col : COLOR;
float4 tex : TEXCOORD0;
};
vOut main(
vIn input,
uniform float4x4 mvp,
uniform float4 tex_offset
)
{
vOut result;
float4 position;
position = float4(input.pos.xyz, 1.0f);
position = mul(position, mvp);
position.xyz = position.xyz / position.w;
result.pos = position;
result.col = input.col;
result.tex = input.tex + tex_offset;
return result;
}

27
misc/xbox/vs_offset.inl Normal file
View File

@ -0,0 +1,27 @@
// cgc version 3.1.0013, build date Apr 24 2012
// command line args: -profile vp20
// source file: misc/xbox/vs_offset.cg
//vendor NVIDIA Corporation
//version 3.1.0.13
//profile vp20
//program main
//semantic main.mvp
//semantic main.tex_offset
//var float4 input.tex : $vin.TEXCOORD : TEXCOORD0 : 0 : 1
//var float4 input.col : $vin.DIFFUSE : ATTR3 : 0 : 1
//var float4 input.pos : $vin.POSITION : ATTR0 : 0 : 1
//var float4x4 mvp : : c[0], 4 : 1 : 1
//var float4 tex_offset : : c[4] : 2 : 1
//var float4 main.pos : $vout.POSITION : HPOS : -1 : 1
//var float4 main.col : $vout.COLOR : COL0 : -1 : 1
//var float4 main.tex : $vout.TEXCOORD0 : TEX0 : -1 : 1
// 9 instructions, 0 R-regs
0x00000000, 0x004c2055, 0x0836186c, 0x2f0007f8,
0x00000000, 0x008c0000, 0x0836186c, 0x1f0007f8,
0x00000000, 0x008c40aa, 0x0836186c, 0x1f0007f8,
0x00000000, 0x006c601b, 0x0436106c, 0x3f0007f8,
0x00000000, 0x0400001b, 0x08361300, 0x101807f8,
0x00000000, 0x0040001b, 0x0400286c, 0x2070e800,
0x00000000, 0x0020001b, 0x0436106c, 0x20701800,
0x00000000, 0x0020061b, 0x0836106c, 0x2070f818,
0x00000000, 0x006c921b, 0x0836106c, 0x3070f849,

27
misc/xbox/vs_textured.asm Normal file
View File

@ -0,0 +1,27 @@
!!VP1.1
# cgc version 3.1.0013, build date Apr 24 2012
# command line args: -profile vp20
# source file: misc/xbox/vs_textured.cg
#vendor NVIDIA Corporation
#version 3.1.0.13
#profile vp20
#program main
#semantic main.mvp
#var float4 input.tex : $vin.TEXCOORD : TEXCOORD0 : 0 : 1
#var float4 input.col : $vin.DIFFUSE : ATTR3 : 0 : 1
#var float4 input.pos : $vin.POSITION : ATTR0 : 0 : 1
#var float4x4 mvp : : c[0], 4 : 1 : 1
#var float4 main.pos : $vout.POSITION : HPOS : -1 : 1
#var float4 main.col : $vout.COLOR : COL0 : -1 : 1
#var float4 main.tex : $vout.TEXCOORD0 : TEX0 : -1 : 1
MUL R0, v[0].y, c[1];
MAD R0, v[0].x, c[0], R0;
MAD R0, v[0].z, c[2], R0;
ADD R0, R0, c[3];
RCP R1.x, R0.w;
MUL o[HPOS].xyz, R0, R1.x;
MOV o[HPOS].w, R0;
MOV o[COL0], v[3];
MOV o[TEX0], v[8];
END
# 9 instructions, 0 R-regs

View File

@ -1,7 +1,7 @@
struct vIn { struct vIn {
float4 tex : TEXCOORD; float4 tex : TEXCOORD;
float4 color : DIFFUSE; float4 col : DIFFUSE;
float4 position : POSITION; float4 pos : POSITION;
}; };
struct vOut { struct vOut {
@ -18,12 +18,12 @@ vOut main(
vOut result; vOut result;
float4 position; float4 position;
position = float4(input.position.xyz, 1.0f); position = float4(input.pos.xyz, 1.0f);
position = mul(position, mvp); position = mul(position, mvp);
position.xyz = position.xyz / position.w; position.xyz = position.xyz / position.w;
result.pos = position; result.pos = position;
result.col = input.color; result.col = input.col;
result.tex = input.tex; result.tex = input.tex;
return result; return result;
} }

View File

@ -74,6 +74,7 @@ And also runs on:
* Haiku - needs <code>openal</code> package (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_haiku.yml)) * Haiku - needs <code>openal</code> package (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_haiku.yml))
* BeOS - untested on actual hardware * BeOS - untested on actual hardware
* IRIX - needs <code>openal</code> packages * IRIX - needs <code>openal</code> packages
* HPUX - tested on 11v3 IA64
* SerenityOS - needs <code>SDL2</code> * SerenityOS - needs <code>SDL2</code>
* Classic Mac OS (System 7 and later) * Classic Mac OS (System 7 and later)
* Dreamcast - unfinished, but usable (can [download from here](https://www.classicube.net/download/dreamcast)) * Dreamcast - unfinished, but usable (can [download from here](https://www.classicube.net/download/dreamcast))
@ -110,7 +111,7 @@ If you get a `The Windows SDK version 5.1 was not found` compilation error, [see
##### Using Visual Studio (command line) ##### Using Visual Studio (command line)
1. Use 'Developer Tools for Visual Studio' from Start Menu 1. Use 'Developer Tools for Visual Studio' from Start Menu
2. Navigate to the directory with ClassiCube's source code 2. Navigate to the directory with ClassiCube's source code
3. Run `cl.exe *.c /link user32.lib gdi32.lib winmm.lib dbghelp.lib shell32.lib comdlg32.lib /out:ClassiCube.exe` 3. Run `cl.exe src\*.c third_party\bearssl\*.c /link user32.lib gdi32.lib winmm.lib dbghelp.lib shell32.lib comdlg32.lib /out:ClassiCube.exe`
##### Using MinGW-w64 ##### Using MinGW-w64
Assuming that you used the installer from https://sourceforge.net/projects/mingw-w64/ : Assuming that you used the installer from https://sourceforge.net/projects/mingw-w64/ :
@ -138,8 +139,7 @@ Setting up TCC:
Compiling with TCC: Compiling with TCC:
1. Navigate to the directory with ClassiCube's source code 1. Navigate to the directory with ClassiCube's source code
2. In `ExtMath.c`, change `fabsf` to `fabs` and `sqrtf` to `sqrt` 2. Run `tcc.exe -o ClassiCube.exe src/*.c third_party/bearssl/*.c -lwinmm -lgdi32 -luser32 -lcomdlg32 -lshell32`<br>
3. Run `tcc.exe -o ClassiCube.exe src/*.c third_party/bearssl/*.c -lwinmm -lgdi32 -luser32 -lcomdlg32 -lshell32`<br>
(Note: You may need to specify the full path to `tcc.exe` instead of just `tcc.exe`) (Note: You may need to specify the full path to `tcc.exe` instead of just `tcc.exe`)
## Compiling - Linux ## Compiling - Linux
@ -420,7 +420,7 @@ Further information (e.g. style) for ClassiCube's source code can be found in th
#### Tips #### Tips
* Press escape (after joining a world) or pause to switch to the pause menu. * Press escape (after joining a world) or pause to switch to the pause menu.
* Pause menu -> Options -> Controls lists all of the key combinations used by the client. * Pause menu -> Options -> Controls lists all of the key combinations used by the client.
* Note that toggling 'vsync' to on will minimise CPU usage, while off will maximimise chunk loading speed. * Note that toggling 'vsync' to on will minimise CPU usage, while off will maximise chunk loading speed.
* Press F to cycle view distance. Lower view distances can improve performance. * Press F to cycle view distance. Lower view distances can improve performance.
* If the server has disabled hacks, key combinations such as fly and speed will not do anything. * If the server has disabled hacks, key combinations such as fly and speed will not do anything.
@ -477,3 +477,4 @@ Further information (e.g. style) for ClassiCube's source code can be found in th
## Sound Credits ## Sound Credits
ClassiCube uses sounds from [Freesound.org](https://freesound.org)<br> ClassiCube uses sounds from [Freesound.org](https://freesound.org)<br>
Full credits are listed in [doc/sound-credits.md](doc/sound-credits.md) Full credits are listed in [doc/sound-credits.md](doc/sound-credits.md)

View File

@ -1,4 +1,9 @@
#define OVERRIDE_MEM_FUNCTIONS #define OVERRIDE_MEM_FUNCTIONS
#define CC_NO_UPDATER
#define CC_NO_DYNLIB
#define CC_NO_SOCKETS
#define CC_NO_THREADING
#include "../_PlatformBase.h" #include "../_PlatformBase.h"
#include "../Stream.h" #include "../Stream.h"
#include "../ExtMath.h" #include "../ExtMath.h"
@ -11,7 +16,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "../_PlatformConsole.h"
#include "../../misc/32x/32x.h" #include "../../misc/32x/32x.h"
#include "../../misc/32x/hw_32x.h" #include "../../misc/32x/hw_32x.h"
@ -27,24 +31,43 @@ const cc_result ReturnCode_SocketDropped = -1;
const char* Platform_AppNameSuffix = " 32x"; const char* Platform_AppNameSuffix = " 32x";
cc_bool Platform_ReadonlyFilesystem = true; cc_bool Platform_ReadonlyFilesystem = true;
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
/*########################################################################################################################*
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
*#########################################################################################################################*/
#include "../main_impl.h"
int main(int argc, char** argv) {
SetupProgram(argc, argv);
while (Window_Main.Exists) {
RunGame();
}
Window_Free();
return 0;
}
/*########################################################################################################################* /*########################################################################################################################*
*---------------------------------------------------------Memory----------------------------------------------------------* *---------------------------------------------------------Memory----------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
void* Mem_Set(void* dst, cc_uint8 value, unsigned numBytes) { return memset( dst, value, numBytes); }
void* Mem_Copy(void* dst, const void* src, unsigned numBytes) { return memcpy( dst, src, numBytes); }
void* Mem_Move(void* dst, const void* src, unsigned numBytes) { return memmove(dst, src, numBytes); }
void* Mem_TryAlloc(cc_uint32 numElems, cc_uint32 elemsSize) { void* Mem_TryAlloc(cc_uint32 numElems, cc_uint32 elemsSize) {
cc_uint32 size = CalcMemSize(numElems, elemsSize); cc_uint32 size = CalcMemSize(numElems, elemsSize);
Platform_Log1(" MALLOC: %i", &size);
void* ptr = size ? ta_alloc(size) : NULL; void* ptr = size ? ta_alloc(size) : NULL;
Platform_Log1("MALLOCED: %x", &ptr); Platform_Log2("MALLOCED: %x (%i bytes)", &ptr, &size);
return ptr; return ptr;
} }
void* Mem_TryAllocCleared(cc_uint32 numElems, cc_uint32 elemsSize) { void* Mem_TryAllocCleared(cc_uint32 numElems, cc_uint32 elemsSize) {
cc_uint32 size = CalcMemSize(numElems, elemsSize); cc_uint32 size = CalcMemSize(numElems, elemsSize);
Platform_Log1(" CALLOC: %i", &size);
void* ptr = size ? ta_alloc(size) : NULL; void* ptr = size ? ta_alloc(size) : NULL;
Platform_Log1("CALLOCED: %x", &ptr); Platform_Log2("CALLOCED: %x (%i bytes)", &ptr, &size);
if (ptr) Mem_Set(ptr, 0, size); if (ptr) Mem_Set(ptr, 0, size);
return ptr; return ptr;
@ -95,13 +118,30 @@ void Process_Abort2(cc_result result, const char* raw_msg) {
/*########################################################################################################################* /*########################################################################################################################*
*--------------------------------------------------------Stopwatch--------------------------------------------------------* *--------------------------------------------------------Stopwatch--------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
cc_uint64 Stopwatch_Measure(void) { #include "../saturn/sh2_wdt.h"
return 0;
static void Stopwatch_Init(void) {
wdt_stop();
wdt_set_irq_number(5); // hardcoded in sh2_crt0.s
wdt_set_irq_priority(15);
wdt_enable();
} }
cc_uint64 Stopwatch_Measure(void) {
return wdt_total_ticks();
}
#define US_PER_SEC 1000000
#define NTSC_CPU_CLOCK 23011360 // TODO
cc_uint64 Stopwatch_ElapsedMicroseconds(cc_uint64 beg, cc_uint64 end) { cc_uint64 Stopwatch_ElapsedMicroseconds(cc_uint64 beg, cc_uint64 end) {
if (end < beg) return 0; if (end < beg) return 0;
return 1000 * 1000; cc_uint64 delta = end - beg;
// TODO still completely wrong?? PAL detection ???
return (delta * US_PER_SEC) / (NTSC_CPU_CLOCK / 1024);
} }
@ -113,6 +153,8 @@ void Platform_EncodePath(cc_filepath* dst, const cc_string* path) {
String_EncodeUtf8(str, path); String_EncodeUtf8(str, path);
} }
void Directory_GetCachePath(cc_string* path) { }
cc_result Directory_Create(const cc_filepath* path) { cc_result Directory_Create(const cc_filepath* path) {
return ReturnCode_DirectoryExists; return ReturnCode_DirectoryExists;
} }
@ -170,80 +212,6 @@ void Thread_Sleep(cc_uint32 milliseconds) {
Hw32xDelay(1); Hw32xDelay(1);
} }
void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) {
*handle = NULL;
}
void Thread_Detach(void* handle) {
}
void Thread_Join(void* handle) {
}
void* Mutex_Create(const char* name) {
return NULL;
}
void Mutex_Free(void* handle) {
}
void Mutex_Lock(void* handle) {
}
void Mutex_Unlock(void* handle) {
}
void* Waitable_Create(const char* name) {
return NULL;
}
void Waitable_Free(void* handle) {
}
void Waitable_Signal(void* handle) {
}
void Waitable_Wait(void* handle) {
}
void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) {
}
/*########################################################################################################################*
*---------------------------------------------------------Socket----------------------------------------------------------*
*#########################################################################################################################*/
cc_result Socket_ParseAddress(const cc_string* address, int port, cc_sockaddr* addrs, int* numValidAddrs) {
return ERR_NOT_SUPPORTED;
}
cc_result Socket_Create(cc_socket* s, cc_sockaddr* addr, cc_bool nonblocking) {
return ERR_NOT_SUPPORTED;
}
cc_result Socket_Connect(cc_socket s, cc_sockaddr* addr) {
return ERR_NOT_SUPPORTED;
}
cc_result Socket_Read(cc_socket s, cc_uint8* data, cc_uint32 count, cc_uint32* modified) {
return ERR_NOT_SUPPORTED;
}
cc_result Socket_Write(cc_socket s, const cc_uint8* data, cc_uint32 count, cc_uint32* modified) {
return ERR_NOT_SUPPORTED;
}
void Socket_Close(cc_socket s) {
}
cc_result Socket_CheckReadable(cc_socket s, cc_bool* readable) {
return ERR_NOT_SUPPORTED;
}
cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
return ERR_NOT_SUPPORTED;
}
/*########################################################################################################################* /*########################################################################################################################*
*--------------------------------------------------------Platform---------------------------------------------------------* *--------------------------------------------------------Platform---------------------------------------------------------*
@ -259,6 +227,8 @@ void Platform_Init(void) {
int size = (int)(heap_end - heap_beg); int size = (int)(heap_end - heap_beg);
Platform_Log3("HEAP SIZE: %i bytes (%x -> %x)", &size, &heap_beg, &heap_end); Platform_Log3("HEAP SIZE: %i bytes (%x -> %x)", &size, &heap_beg, &heap_end);
Stopwatch_Init();
} }
void Platform_Free(void) { } void Platform_Free(void) { }
@ -280,3 +250,21 @@ cc_result Platform_Decrypt(const void* data, int len, cc_string* dst) {
return ERR_NOT_SUPPORTED; return ERR_NOT_SUPPORTED;
} }
/*########################################################################################################################*
*-----------------------------------------------------Process/Module------------------------------------------------------*
*#########################################################################################################################*/
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
return 0;
}
int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, cc_string* args) {
return 0;
}
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
return 0;
}
void Process_Exit(cc_result code) { _exit(code); }

View File

@ -94,12 +94,29 @@ void Window_DisableRawMouse(void) { Input.RawMode = false; }
/*########################################################################################################################* /*########################################################################################################################*
*-------------------------------------------------------Gamepads----------------------------------------------------------* *-------------------------------------------------------Gamepads----------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
static const BindMapping pad_defaults[BIND_COUNT] = {
[BIND_LOOK_UP] = { CCPAD_2, CCPAD_UP },
[BIND_LOOK_DOWN] = { CCPAD_2, CCPAD_DOWN },
[BIND_LOOK_LEFT] = { CCPAD_2, CCPAD_LEFT },
[BIND_LOOK_RIGHT] = { CCPAD_2, CCPAD_RIGHT },
[BIND_FORWARD] = { CCPAD_UP, 0 },
[BIND_BACK] = { CCPAD_DOWN, 0 },
[BIND_LEFT] = { CCPAD_LEFT, 0 },
[BIND_RIGHT] = { CCPAD_RIGHT, 0 },
[BIND_JUMP] = { CCPAD_1, 0 },
[BIND_INVENTORY] = { CCPAD_3, 0 },
[BIND_PLACE_BLOCK] = { CCPAD_L, 0 },
[BIND_DELETE_BLOCK] = { CCPAD_R, 0 },
[BIND_HOTBAR_LEFT] = { CCPAD_4, CCPAD_LEFT },
[BIND_HOTBAR_RIGHT] = { CCPAD_4, CCPAD_RIGHT }
};
void Gamepads_Init(void) { void Gamepads_Init(void) {
Input.Sources |= INPUT_SOURCE_GAMEPAD; Input.Sources |= INPUT_SOURCE_GAMEPAD;
} }
void Gamepads_Process(float delta) { void Gamepads_Process(float delta) {
int port = Gamepad_Connect(0x32, PadBind_Defaults); int port = Gamepad_Connect(0x32, pad_defaults);
int mods = HwMdReadPad(0); int mods = HwMdReadPad(0);
Gamepad_SetButton(port, CCPAD_L, mods & SEGA_CTRL_X); Gamepad_SetButton(port, CCPAD_L, mods & SEGA_CTRL_X);

View File

@ -7,6 +7,13 @@
#define BUFFER_BASE_PADDR OS_VRAM_PADDR // VRAM physical address #define BUFFER_BASE_PADDR OS_VRAM_PADDR // VRAM physical address
#include "../../third_party/citro3d.c" #include "../../third_party/citro3d.c"
#include "gsp_gpu.h"
#include "pica_gpu.h"
// See the .v.pica shader files in misc/3ds
#define CONST_MVP 0 // c0-c3
#define CONST_TEX 4 // c4
#define CONST_255 5 // c5
// autogenerated from the .v.pica files by Makefile // autogenerated from the .v.pica files by Makefile
extern const u8 coloured_shbin[]; extern const u8 coloured_shbin[];
extern const u32 coloured_shbin_size; extern const u32 coloured_shbin_size;
@ -33,17 +40,12 @@ static cc_bool rendering3D;
*------------------------------------------------------Vertex shaders-----------------------------------------------------* *------------------------------------------------------Vertex shaders-----------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
#define UNI_MVP_MATRIX (1 << 0) #define UNI_MVP_MATRIX (1 << 0)
#define UNI_TEX_OFFSETS (1 << 1)
// cached uniforms (cached for multiple programs)
static C3D_Mtx _mvp; static C3D_Mtx _mvp;
static float texOffsetX, texOffsetY; static int texOffset, dirty_mvp;
static int texOffset;
struct CCShader { struct CCShader {
DVLB_s* dvlb; DVLB_s* dvlb;
shaderProgram_s program; shaderProgram_s program;
int uniforms; // which associated uniforms need to be resent to GPU
int locations[2]; // location of uniforms (not constant)
}; };
static struct CCShader* gfx_activeShader; static struct CCShader* gfx_activeShader;
static struct CCShader shaders[3]; static struct CCShader shaders[3];
@ -52,9 +54,6 @@ static void Shader_Alloc(struct CCShader* shader, const u8* binData, int binSize
shader->dvlb = DVLB_ParseFile((u32*)binData, binSize); shader->dvlb = DVLB_ParseFile((u32*)binData, binSize);
shaderProgramInit(&shader->program); shaderProgramInit(&shader->program);
shaderProgramSetVsh(&shader->program, &shader->dvlb->DVLE[0]); shaderProgramSetVsh(&shader->program, &shader->dvlb->DVLE[0]);
shader->locations[0] = shaderInstanceGetUniformLocation(shader->program.vertexShader, "MVP");
shader->locations[1] = shaderInstanceGetUniformLocation(shader->program.vertexShader, "tex_offset");
} }
static void Shader_Free(struct CCShader* shader) { static void Shader_Free(struct CCShader* shader) {
@ -62,28 +61,14 @@ static void Shader_Free(struct CCShader* shader) {
DVLB_Free(shader->dvlb); DVLB_Free(shader->dvlb);
} }
// Marks a uniform as changed on all programs static void UpdateMVP(void) {
static void DirtyUniform(int uniform) {
for (int i = 0; i < Array_Elems(shaders); i++)
{
shaders[i].uniforms |= uniform;
}
}
// Sends changed uniforms to the GPU for current program
static void ReloadUniforms(void) {
struct CCShader* s = gfx_activeShader; struct CCShader* s = gfx_activeShader;
dirty_mvp = true;
if (!s) return; // NULL if context is lost if (!s) return; // NULL if context is lost
if (s->uniforms & UNI_MVP_MATRIX) { if (dirty_mvp) {
C3D_FVUnifMtx4x4(s->locations[0], &_mvp); pica_upload_mat4_constant(CONST_MVP, &_mvp);
s->uniforms &= ~UNI_MVP_MATRIX; dirty_mvp = false;
}
if (s->uniforms & UNI_TEX_OFFSETS) {
C3D_FVUnifSet(s->locations[1],
texOffsetX, texOffsetY, 0.0f, 0.0f);
s->uniforms &= ~UNI_TEX_OFFSETS;
} }
} }
@ -101,7 +86,7 @@ static void SwitchProgram(void) {
gfx_activeShader = shader; gfx_activeShader = shader;
C3D_BindProgram(&shader->program); C3D_BindProgram(&shader->program);
} }
ReloadUniforms(); UpdateMVP();
} }
@ -137,9 +122,7 @@ static aptHookCookie hookCookie;
static void AptEventHook(APT_HookType hookType, void* param) { static void AptEventHook(APT_HookType hookType, void* param) {
if (hookType == APTHOOK_ONSUSPEND) { if (hookType == APTHOOK_ONSUSPEND) {
C3Di_RenderQueueWaitDone(); C3Di_RenderQueueWaitDone();
C3Di_RenderQueueDisableVBlank();
} else if (hookType == APTHOOK_ONRESTORE) { } else if (hookType == APTHOOK_ONRESTORE) {
C3Di_RenderQueueEnableVBlank();
C3Di_OnRestore(); C3Di_OnRestore();
} }
} }
@ -169,6 +152,8 @@ static void InitCitro3D(void) {
gfxSetDoubleBuffering(GFX_TOP, true); gfxSetDoubleBuffering(GFX_TOP, true);
SetDefaultState(); SetDefaultState();
AllocShaders(); AllocShaders();
GSP_setup();
} }
static GfxResourceID white_square; static GfxResourceID white_square;
@ -201,7 +186,7 @@ void Gfx_Free(void) {
cc_bool Gfx_TryRestoreContext(void) { return true; } cc_bool Gfx_TryRestoreContext(void) { return true; }
void Gfx_RestoreState(void) { static void Gfx_RestoreState(void) {
InitDefaultResources(); InitDefaultResources();
// 8x8 dummy white texture // 8x8 dummy white texture
@ -213,7 +198,7 @@ void Gfx_RestoreState(void) {
white_square = Gfx_CreateTexture(&bmp, 0, false); white_square = Gfx_CreateTexture(&bmp, 0, false);
} }
void Gfx_FreeState(void) { static void Gfx_FreeState(void) {
FreeDefaultResources(); FreeDefaultResources();
Gfx_DeleteTexture(&white_square); Gfx_DeleteTexture(&white_square);
} }
@ -563,7 +548,7 @@ void Gfx_SetVSync(cc_bool vsync) {
void Gfx_BeginFrame(void) { void Gfx_BeginFrame(void) {
rendering3D = false; rendering3D = false;
// wait for vblank for both screens TODO move to end? // wait for vblank for both screens TODO move to end?
if (gfx_vsync) C3D_FrameSync(); if (gfx_vsync) GSP_wait_for_full_vblank();
C3D_FrameBegin(0); C3D_FrameBegin(0);
topTarget = &topTargetLeft; topTarget = &topTargetLeft;
@ -571,6 +556,17 @@ void Gfx_BeginFrame(void) {
extern void C3Di_UpdateContext(void); extern void C3Di_UpdateContext(void);
C3Di_UpdateContext(); C3Di_UpdateContext();
static C3D_FVec _1_div_255 = { .x = 1/255.0f, .y = 1/255.0f, .z = 1/255.0f, .w = 1/255.0f };
pica_upload_vec4_constant(CONST_255, &_1_div_255);
// NOTE: GPUREG_VERTEX_OFFSET only works when drawing non-indexed arrays
GPUCMD_AddWrite(GPUREG_VERTEX_OFFSET, 0);
// https://github.com/devkitPro/citro3d/issues/47
// "Fyi the permutation specifies the order in which the attributes are stored in the buffer, LSB first. So 0x210 indicates attributes 0, 1 & 2."
// This just maps array attrib 0 = vertex attrib 0, array attrib 1 = vertex attrib 1, etc
pica_set_attrib_array0_mapping(0x210);
} }
void Gfx_ClearBuffers(GfxBuffers buffers) { void Gfx_ClearBuffers(GfxBuffers buffers) {
@ -860,8 +856,7 @@ void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) {
} }
Mtx_Multiply(&_mvp, &_proj, &_view); Mtx_Multiply(&_mvp, &_proj, &_view);
DirtyUniform(UNI_MVP_MATRIX); UpdateMVP();
ReloadUniforms();
} }
@ -882,9 +877,8 @@ void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) {
Matrix_Mul(&_proj, matrix, &rot); // TODO avoid Matrix_Mul ? Matrix_Mul(&_proj, matrix, &rot); // TODO avoid Matrix_Mul ?
} }
Mtx_Multiply(&_mvp, &_proj, &_view);
UpdateMVP(); UpdateMVP();
DirtyUniform(UNI_MVP_MATRIX);
ReloadUniforms();
}*/ }*/
void Gfx_LoadMVP(const struct Matrix* view, const struct Matrix* proj, struct Matrix* mvp) { void Gfx_LoadMVP(const struct Matrix* view, const struct Matrix* proj, struct Matrix* mvp) {
@ -893,14 +887,16 @@ void Gfx_LoadMVP(const struct Matrix* view, const struct Matrix* proj, struct Ma
Matrix_Mul(mvp, view, proj); Matrix_Mul(mvp, view, proj);
} }
static C3D_FVec tex_offset;
void Gfx_EnableTextureOffset(float x, float y) { void Gfx_EnableTextureOffset(float x, float y) {
texOffset = true; texOffset = true;
texOffsetX = x; tex_offset.x = x;
texOffsetY = y; tex_offset.y = y;
shaders[2].uniforms |= UNI_TEX_OFFSETS;
SwitchProgram(); SwitchProgram();
pica_upload_vec4_constant(CONST_TEX, &tex_offset);
} }
void Gfx_DisableTextureOffset(void) { void Gfx_DisableTextureOffset(void) {
texOffset = false; texOffset = false;
SwitchProgram(); SwitchProgram();
@ -914,17 +910,25 @@ void Gfx_DisableTextureOffset(void) {
cc_bool Gfx_WarnIfNecessary(void) { return false; } cc_bool Gfx_WarnIfNecessary(void) { return false; }
cc_bool Gfx_GetUIOptions(struct MenuOptionsScreen* s) { return false; } cc_bool Gfx_GetUIOptions(struct MenuOptionsScreen* s) { return false; }
static void UpdateAttribFormat(VertexFormat fmt) { static void UpdateAttribFormat(void) {
C3D_AttrInfo* attrInfo = C3D_GetAttrInfo(); C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();
AttrInfo_Init(attrInfo); AttrInfo_Init(attrInfo);
AttrInfo_AddLoader(attrInfo, 0, GPU_FLOAT, 3); // in_pos AttrInfo_AddLoader(attrInfo, 0, GPU_FLOAT, 3); // in_pos
AttrInfo_AddLoader(attrInfo, 1, GPU_UNSIGNED_BYTE, 4); // in_col AttrInfo_AddLoader(attrInfo, 1, GPU_UNSIGNED_BYTE, 4); // in_col
if (fmt == VERTEX_FORMAT_TEXTURED) { if (gfx_format == VERTEX_FORMAT_TEXTURED) {
AttrInfo_AddLoader(attrInfo, 2, GPU_FLOAT, 2); // in_tex AttrInfo_AddLoader(attrInfo, 2, GPU_FLOAT, 2); // in_tex
} }
} }
static void UpdateAttribConfig(void) {
if (gfx_format == VERTEX_FORMAT_TEXTURED) {
pica_set_attrib_array0_format(3, SIZEOF_VERTEX_TEXTURED);
} else {
pica_set_attrib_array0_format(2, SIZEOF_VERTEX_COLOURED);
}
}
static void UpdateTexEnv(VertexFormat fmt) { static void UpdateTexEnv(VertexFormat fmt) {
int func, source; int func, source;
@ -951,7 +955,8 @@ void Gfx_SetVertexFormat(VertexFormat fmt) {
gfx_stride = strideSizes[fmt]; gfx_stride = strideSizes[fmt];
SwitchProgram(); SwitchProgram();
UpdateAttribFormat(fmt); UpdateAttribFormat();
UpdateAttribConfig();
UpdateTexEnv(fmt); UpdateTexEnv(fmt);
} }
@ -960,32 +965,10 @@ void Gfx_DrawVb_Lines(int verticesCount) {
} }
static void SetVertexSource(int startVertex) { static void SetVertexSource(int startVertex) {
// https://github.com/devkitPro/citro3d/issues/47 const void* data = (cc_uint8*)gfx_vertices + startVertex * gfx_stride;
// "Fyi the permutation specifies the order in which the attributes are stored in the buffer, LSB first. So 0x210 indicates attributes 0, 1 & 2."
const void* data;
int stride, attribs, permutation;
if (gfx_format == VERTEX_FORMAT_TEXTURED) {
data = (struct VertexTextured*)gfx_vertices + startVertex;
stride = SIZEOF_VERTEX_TEXTURED;
attribs = 3;
permutation = 0x210;
} else {
data = (struct VertexColoured*)gfx_vertices + startVertex;
stride = SIZEOF_VERTEX_COLOURED;
attribs = 2;
permutation = 0x10;
}
u32 pa = osConvertVirtToPhys(data); u32 pa = osConvertVirtToPhys(data);
u32 args[3]; // GPUREG_ATTRIBBUFFER0_OFFSET, GPUREG_ATTRIBBUFFER0_CONFIG1, GPUREG_ATTRIBBUFFER0_CONFIG2 GPUCMD_AddWrite(GPUREG_ATTRIBBUFFER0_OFFSET, pa - BUFFER_BASE_PADDR);
args[0] = pa - BUFFER_BASE_PADDR;
args[1] = permutation;
args[2] = (stride << 16) | (attribs << 28);
GPUCMD_AddIncrementalWrites(GPUREG_ATTRIBBUFFER0_OFFSET, args, 3);
// NOTE: Can't use GPUREG_VERTEX_OFFSET, it only works when drawing non-indexed arrays
} }
void Gfx_DrawVb_IndexedTris_Range(int verticesCount, int startVertex, DrawHints hints) { void Gfx_DrawVb_IndexedTris_Range(int verticesCount, int startVertex, DrawHints hints) {

View File

@ -1,4 +1,7 @@
#define CC_XTEA_ENCRYPTION #define CC_XTEA_ENCRYPTION
#define CC_NO_UPDATER
#define CC_NO_DYNLIB
#include "../_PlatformBase.h" #include "../_PlatformBase.h"
#include "../Stream.h" #include "../Stream.h"
#include "../ExtMath.h" #include "../ExtMath.h"
@ -50,7 +53,6 @@ unsigned int __stacksize__ = 256 * 1024;
*------------------------------------------------------Logging/Time-------------------------------------------------------* *------------------------------------------------------Logging/Time-------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
void Platform_Log(const char* msg, int len) { void Platform_Log(const char* msg, int len) {
// output to debug service (visible in Citra with log level set to "Debug.Emulated:Debug", or on console via remote gdb)
svcOutputDebugString(msg, len); svcOutputDebugString(msg, len);
} }
@ -110,6 +112,8 @@ void Platform_EncodePath(cc_filepath* dst, const cc_string* path) {
String_EncodeUtf8(str, path); String_EncodeUtf8(str, path);
} }
void Directory_GetCachePath(cc_string* path) { }
cc_result Directory_Create(const cc_filepath* path) { cc_result Directory_Create(const cc_filepath* path) {
return mkdir(path->buffer, 0666) == -1 ? errno : 0; // FS has no permissions anyways return mkdir(path->buffer, 0666) == -1 ? errno : 0; // FS has no permissions anyways
} }
@ -451,6 +455,8 @@ cc_result Process_StartOpen(const cc_string* args) {
return ERR_NOT_SUPPORTED; return ERR_NOT_SUPPORTED;
} }
void Process_Exit(cc_result code) { exit(code); }
/*########################################################################################################################* /*########################################################################################################################*
*-------------------------------------------------------Encryption--------------------------------------------------------* *-------------------------------------------------------Encryption--------------------------------------------------------*

View File

@ -128,6 +128,27 @@ void Window_UpdateRawMouse(void) { }
/*########################################################################################################################* /*########################################################################################################################*
*-------------------------------------------------------Gamepads----------------------------------------------------------* *-------------------------------------------------------Gamepads----------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
static const BindMapping defaults_3ds[BIND_COUNT] = {
[BIND_FORWARD] = { CCPAD_UP },
[BIND_BACK] = { CCPAD_DOWN },
[BIND_LEFT] = { CCPAD_LEFT },
[BIND_RIGHT] = { CCPAD_RIGHT },
[BIND_JUMP] = { CCPAD_1 },
[BIND_SET_SPAWN] = { CCPAD_START },
[BIND_CHAT] = { CCPAD_4 },
[BIND_INVENTORY] = { CCPAD_3 },
[BIND_SEND_CHAT] = { CCPAD_START },
[BIND_PLACE_BLOCK] = { CCPAD_L },
[BIND_DELETE_BLOCK] = { CCPAD_R },
[BIND_SPEED] = { CCPAD_2, CCPAD_L },
[BIND_FLY] = { CCPAD_2, CCPAD_R },
[BIND_NOCLIP] = { CCPAD_2, CCPAD_3 },
[BIND_FLY_UP] = { CCPAD_2, CCPAD_UP },
[BIND_FLY_DOWN] = { CCPAD_2, CCPAD_DOWN },
[BIND_HOTBAR_LEFT] = { CCPAD_ZL },
[BIND_HOTBAR_RIGHT] = { CCPAD_ZR }
};
static Result irrst_result; static Result irrst_result;
void Gamepads_Init(void) { void Gamepads_Init(void) {
@ -167,7 +188,7 @@ static void ProcessCircleInput(int port, int axis, circlePosition* pos, float de
void Gamepads_Process(float delta) { void Gamepads_Process(float delta) {
u32 mods = hidKeysDown() | hidKeysHeld(); u32 mods = hidKeysDown() | hidKeysHeld();
int port = Gamepad_Connect(0x3D5, PadBind_Defaults); int port = Gamepad_Connect(0x3D5, defaults_3ds);
HandleButtons(port, mods); HandleButtons(port, mods);
circlePosition hid_pos; circlePosition hid_pos;

25
src/3ds/gsp_gpu.h Normal file
View File

@ -0,0 +1,25 @@
static volatile uint32_t vblanks_0;
static volatile uint32_t vblanks_1;
static void handle_vblank(void* ptr) {
uint32_t* counter = (uint32_t*)ptr;
(*counter)++;
}
static void GSP_setup(void) {
// Start listening for VBLANK events
gspSetEventCallback(GSPGPU_EVENT_VBlank0, handle_vblank, (void*)&vblanks_0, false);
gspSetEventCallback(GSPGPU_EVENT_VBlank1, handle_vblank, (void*)&vblanks_1, false);
}
// Waits for VBLANK for both top and bottom screens
static void GSP_wait_for_full_vblank(void) {
uint32_t init0 = vblanks_0;
uint32_t init1 = vblanks_1;
for (;;) {
gspWaitForAnyEvent();
if (vblanks_0 != init0 && vblanks_1 != init1) return;
}
}

33
src/3ds/pica_gpu.h Normal file
View File

@ -0,0 +1,33 @@
/*########################################################################################################################*
*--------------------------------------------------Vertex attribute config------------------------------------------------*
*#########################################################################################################################*/
// https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_ATTRIBBUFFERi_CONFIG1
// Sets how to map first 8 vertex array components to vertex attributes (or padding)
static CC_INLINE void pica_set_attrib_array0_mapping(u32 mapping) {
GPUCMD_AddWrite(GPUREG_ATTRIBBUFFER0_CONFIG1, mapping);
}
// https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_ATTRIBBUFFERi_CONFIG2
// Sets how to map last 4 vertex array components to vertex attributes, bytes per vertex, components count
static CC_INLINE void pica_set_attrib_array0_format(u32 num_attribs, u32 stride) {
GPUCMD_AddWrite(GPUREG_ATTRIBBUFFER0_CONFIG2, (stride << 16) | (num_attribs << 28));
}
/*########################################################################################################################*
*--------------------------------------------------Vertex shader constants------------------------------------------------*
*#########################################################################################################################*/
// https://www.3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_FLOATUNIFORM_INDEX
// https://www.3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_FLOATUNIFORM_DATAi
#define UPLOAD_TYPE_F32 0x80000000
static CC_INLINE void pica_upload_mat4_constant(int offset, C3D_Mtx* value) {
GPUCMD_AddWrite(GPUREG_VSH_FLOATUNIFORM_CONFIG, offset | UPLOAD_TYPE_F32);
GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA, (u32*)value, 16);
}
static CC_INLINE void pica_upload_vec4_constant(int offset, C3D_FVec* value) {
GPUCMD_AddWrite(GPUREG_VSH_FLOATUNIFORM_CONFIG, offset | UPLOAD_TYPE_F32);
GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA, (u32*)value, 4);
}

View File

@ -64,7 +64,7 @@ void Bitmap_Scale(struct Bitmap* dst, struct Bitmap* src,
/*########################################################################################################################* /*########################################################################################################################*
*------------------------------------------------------PNG decoder--------------------------------------------------------* *------------------------------------------------------PNG common---------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
#define PNG_IHDR_SIZE 13 #define PNG_IHDR_SIZE 13
#define PNG_PALETTE 256 #define PNG_PALETTE 256
@ -79,7 +79,6 @@ enum PngFilter {
PNG_FILTER_NONE, PNG_FILTER_SUB, PNG_FILTER_UP, PNG_FILTER_AVERAGE, PNG_FILTER_PAETH PNG_FILTER_NONE, PNG_FILTER_SUB, PNG_FILTER_UP, PNG_FILTER_AVERAGE, PNG_FILTER_PAETH
}; };
typedef void (*Png_RowExpander)(int width, BitmapCol* palette, cc_uint8* src, BitmapCol* dst);
static const cc_uint8 pngSig[PNG_SIG_SIZE] = { 137, 80, 78, 71, 13, 10, 26, 10 }; static const cc_uint8 pngSig[PNG_SIG_SIZE] = { 137, 80, 78, 71, 13, 10, 26, 10 };
/* 5.2 PNG signature */ /* 5.2 PNG signature */
@ -87,6 +86,17 @@ cc_bool Png_Detect(const cc_uint8* data, cc_uint32 len) {
return len >= PNG_SIG_SIZE && Mem_Equal(data, pngSig, PNG_SIG_SIZE); return len >= PNG_SIG_SIZE && Mem_Equal(data, pngSig, PNG_SIG_SIZE);
} }
/*########################################################################################################################*
*------------------------------------------------------PNG decoder--------------------------------------------------------*
*#########################################################################################################################*/
#if !defined CC_BUILD_COMPRESSION
cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
return ERR_NOT_SUPPORTED;
}
#else
typedef void (*Png_RowExpander)(int width, BitmapCol* palette, cc_uint8* src, BitmapCol* dst);
/* 9 Filtering */ /* 9 Filtering */
/* 13.9 Filtering */ /* 13.9 Filtering */
static void Png_ReconstructFirst(cc_uint8 type, cc_uint8 bytesPerPixel, cc_uint8* line, cc_uint32 lineLen) { static void Png_ReconstructFirst(cc_uint8 type, cc_uint8 bytesPerPixel, cc_uint8* line, cc_uint32 lineLen) {
@ -329,11 +339,6 @@ static BitmapCol ExpandRGB(cc_uint8 bitsPerSample, int r, int g, int b) {
return BitmapCol_Make(r, g, b, 0); return BitmapCol_Make(r, g, b, 0);
} }
#ifdef CC_BUILD_32X
cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
return ERR_NOT_SUPPORTED;
}
#else
cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) { cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
cc_uint8 tmp[64]; cc_uint8 tmp[64];
cc_uint32 dataSize, fourCC; cc_uint32 dataSize, fourCC;
@ -559,7 +564,13 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
/*########################################################################################################################* /*########################################################################################################################*
*------------------------------------------------------PNG encoder--------------------------------------------------------* *------------------------------------------------------PNG encoder--------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
#ifdef CC_BUILD_FILESYSTEM #if !defined CC_BUILD_FILESYSTEM
/* No point including encoding code when can't save screenshots anyways */
cc_result Png_Encode(struct Bitmap* bmp, struct Stream* stream,
Png_RowGetter getRow, cc_bool alpha, void* ctx) {
return ERR_NOT_SUPPORTED;
}
#else
static void Png_Filter(cc_uint8 filter, const cc_uint8* cur, const cc_uint8* prior, cc_uint8* best, int lineLen, int bpp) { static void Png_Filter(cc_uint8 filter, const cc_uint8* cur, const cc_uint8* prior, cc_uint8* best, int lineLen, int bpp) {
/* 3 bytes per pixel constant */ /* 3 bytes per pixel constant */
cc_uint8 a, b, c; cc_uint8 a, b, c;
@ -667,7 +678,7 @@ static cc_result Png_EncodeCore(struct Bitmap* bmp, struct Stream* stream, cc_ui
cc_uint8* curLine = buffer + (bmp->width * 4) * 1; cc_uint8* curLine = buffer + (bmp->width * 4) * 1;
cc_uint8* bestLine = buffer + (bmp->width * 4) * 2; cc_uint8* bestLine = buffer + (bmp->width * 4) * 2;
#if CC_BUILD_MAXSTACK <= (50 * 1024) #if CC_BUILD_MAXSTACK <= (64 * 1024)
struct ZLibState* zlState = (struct ZLibState*)Mem_TryAlloc(1, sizeof(struct ZLibState)); struct ZLibState* zlState = (struct ZLibState*)Mem_TryAlloc(1, sizeof(struct ZLibState));
#else #else
struct ZLibState _zlState; struct ZLibState _zlState;
@ -678,6 +689,7 @@ static cc_result Png_EncodeCore(struct Bitmap* bmp, struct Stream* stream, cc_ui
int y, lineSize; int y, lineSize;
cc_result res; cc_result res;
if (!zlState) return ERR_OUT_OF_MEMORY;
/* stream may not start at 0 (e.g. when making default.zip) */ /* stream may not start at 0 (e.g. when making default.zip) */
if ((res = stream->Position(stream, &stream_beg))) return res; if ((res = stream->Position(stream, &stream_beg))) return res;
@ -749,11 +761,5 @@ cc_result Png_Encode(struct Bitmap* bmp, struct Stream* stream,
Mem_Free(buffer); Mem_Free(buffer);
return res; return res;
} }
#else
/* No point including encoding code when can't save screenshots anyways */
cc_result Png_Encode(struct Bitmap* bmp, struct Stream* stream,
Png_RowGetter getRow, cc_bool alpha, void* ctx) {
return ERR_NOT_SUPPORTED;
}
#endif #endif

View File

@ -249,19 +249,22 @@ static void Physics_HandleSapling(int index, BlockID block) {
below = BLOCK_AIR; below = BLOCK_AIR;
if (y > 0) below = World.Blocks[index - World.OneY]; if (y > 0) below = World.Blocks[index - World.OneY];
if (below != BLOCK_GRASS) return; /* Saplings stay alive on dirt */
if (below == BLOCK_DIRT) return;
/* Saplings grow if on grass in light, otherwise turn to air */
Game_UpdateBlock(x, y, z, BLOCK_AIR);
if (below != BLOCK_GRASS || !Lighting.IsLit(x, y, z)) return;
height = 5 + Random_Next(&physics_rnd, 3); height = 5 + Random_Next(&physics_rnd, 3);
Game_UpdateBlock(x, y, z, BLOCK_AIR);
if (TreeGen_CanGrow(x, y, z, height)) { if (TreeGen_CanGrow(x, y, z, height)) {
count = TreeGen_Grow(x, y, z, height, coords, blocks); count = TreeGen_Grow(x, y, z, height, coords, blocks);
for (i = 0; i < count; i++) { for (i = 0; i < count; i++)
{
Game_UpdateBlock(coords[i].x, coords[i].y, coords[i].z, blocks[i]); Game_UpdateBlock(coords[i].x, coords[i].y, coords[i].z, blocks[i]);
} }
} else {
Game_UpdateBlock(x, y, z, BLOCK_SAPLING);
} }
} }

View File

@ -378,7 +378,7 @@ static void OnInit(void) {
#ifdef CC_BUILD_WIN #ifdef CC_BUILD_WIN
Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 40); Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 40);
#elif defined CC_BUILD_SYMBIAN_3 || defined CC_BUILD_SYMBIAN_S60V5 #elif defined CC_BUILD_SYMBIAN_3 || defined CC_BUILD_SYMBIAN_S60V5 || defined CC_BUILD_WINCE
Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 70); Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 70);
#else #else
Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 30); Camera.Sensitivity = Options_GetInt(OPT_SENSITIVITY, 1, 200, 30);

View File

@ -89,7 +89,7 @@ static int (*_X509_STORE_CTX_init)(X509_STORE_CTX* ctx, X509_STORE* store,
#if defined CC_BUILD_WIN #if defined CC_BUILD_WIN
static const cc_string cryptoLib = String_FromConst("libcrypto.dll"); static const cc_string cryptoLib = String_FromConst("libcrypto.dll");
#elif defined CC_BUILD_HAIKU #elif defined CC_BUILD_HAIKU || defined CC_BUILD_LINUX
static const cc_string cryptoLib = String_FromConst("libcrypto.so.3"); static const cc_string cryptoLib = String_FromConst("libcrypto.so.3");
static const cc_string cryptoAlt = String_FromConst("libcrypto.so"); static const cc_string cryptoAlt = String_FromConst("libcrypto.so");
#else #else

Some files were not shown because too many files have changed in this diff Show More