From 58250dbb6baf6622b4d1d8d40bf629828009be28 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 18:20:26 -0500 Subject: [PATCH 1/7] CI: Add non-matching build step to "build" action to verify non-matching files compile/link without issue --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02030bd66..e6820c689 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -73,6 +73,14 @@ jobs: name: ${{ matrix.version }}_previous path: build/${{ matrix.version }}/report.json + # Build and link non-matching files to verify lack of errors + - name: Build non-matching + run: | + python configure.py --non-matching --map \ + --version ${{ matrix.version }} \ + --binutils /binutils --compilers /compilers + ninja all_source + website: runs-on: ubuntu-latest permissions: From 5e7c3615a4c56503f9857a666acefde03ae22a61 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 18:20:59 -0500 Subject: [PATCH 2/7] xBehaveMgr: Fix issue related to improper destuctor and new/delete definitions --- src/SB/Core/x/xBehaveMgr.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/SB/Core/x/xBehaveMgr.h b/src/SB/Core/x/xBehaveMgr.h index f68b8b913..c58dfd8f3 100644 --- a/src/SB/Core/x/xBehaveMgr.h +++ b/src/SB/Core/x/xBehaveMgr.h @@ -12,8 +12,14 @@ struct xBehaveMgr : RyzMemData xPsyche* psypool; st_XORDEREDARRAY psylist; - xBehaveMgr(); - ~xBehaveMgr(); + xBehaveMgr() + { + } + + ~xBehaveMgr() + { + } + void Startup(S32, S32); void RegBuiltIn(); xPsyche* Subscribe(xBase* owner, S32 i); @@ -22,9 +28,6 @@ struct xBehaveMgr : RyzMemData void SceneFinish(); void SceneReset(); xFactory* GetFactory(); - - void* operator new(size_t amt, U32, RyzMemGrow*); - void operator delete(void*, U16); }; void xBehaveMgr_ScenePrepare(); From 4731f7d1bb5dddbbe062c3e1731f9fc8a49ec7f4 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 18:21:20 -0500 Subject: [PATCH 3/7] Build: Treat warnings as errors --- configure.py | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.py b/configure.py index f68943d26..bbf728d9a 100644 --- a/configure.py +++ b/configure.py @@ -187,6 +187,7 @@ "-enum int", "-fp hardware", "-Cpp_exceptions off", + "-W err", # "-W all", "-O4,p", "-inline auto", From 636dd917c69495fabcbbd51554c3f048f1a6c3b5 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 18:22:17 -0500 Subject: [PATCH 4/7] zPlatform: Add placeholder to SovlePaddleMotion return and resolve warning --- src/SB/Game/zPlatform.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SB/Game/zPlatform.cpp b/src/SB/Game/zPlatform.cpp index d48680be3..4a14bc0e2 100644 --- a/src/SB/Game/zPlatform.cpp +++ b/src/SB/Game/zPlatform.cpp @@ -467,6 +467,7 @@ U32 zMechIsStartingBack(zPlatform* ent, U16 param_2) static F32 SolvePaddleMotion(zPlatform* plat, F32* time, F32 tmr) { + return 0.0f; } void zPlatform_PaddleStartRotate(xEnt* entplat, S32 direction, S32 stutter) From b4044bc6567a4ea0e819a682edd5ebd4640e38ed Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 18:49:46 -0500 Subject: [PATCH 5/7] CI: Remove --map arg to speed up build; Fix Ninja invocation for non-matching build --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6820c689..b479494d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,10 +76,10 @@ jobs: # Build and link non-matching files to verify lack of errors - name: Build non-matching run: | - python configure.py --non-matching --map \ + python configure.py --non-matching \ --version ${{ matrix.version }} \ --binutils /binutils --compilers /compilers - ninja all_source + ninja website: runs-on: ubuntu-latest From 3518aa4637eab0e9995ff27f17eb1f62991cabc9 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 19:18:17 -0500 Subject: [PATCH 6/7] iTRC: Fix variable scope definitions to fix linker errors --- src/SB/Core/gc/iTRC.cpp | 11 +++++++++++ src/SB/Core/gc/iTRC.h | 14 +++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/SB/Core/gc/iTRC.cpp b/src/SB/Core/gc/iTRC.cpp index a43f14bd2..6f5ae9d80 100644 --- a/src/SB/Core/gc/iTRC.cpp +++ b/src/SB/Core/gc/iTRC.cpp @@ -6,6 +6,17 @@ namespace ResetButton { bool mResetEnabled = 1; + void (*mSndKill)(); +} + +namespace iTRCDisk +{ + void (*mSndSuspend)(); + void (*mSndResume)(); + void (*mPadStopRumbling)(); + void (*mSndKill)(); + void (*mMovieSuspendFunction)(); + void (*mMovieResumeFunction)(); } bool ROMFont::Init() diff --git a/src/SB/Core/gc/iTRC.h b/src/SB/Core/gc/iTRC.h index 2b430354f..a9f5a0dc3 100644 --- a/src/SB/Core/gc/iTRC.h +++ b/src/SB/Core/gc/iTRC.h @@ -29,12 +29,12 @@ namespace ROMFont namespace iTRCDisk { char mMessage[]; - void (*mPadStopRumbling)(); - void (*mSndSuspend)(); - void (*mSndResume)(); - void (*mSndKill)(); - void (*mMovieSuspendFunction)(); - void (*mMovieResumeFunction)(); + extern void (*mSndSuspend)(); + extern void (*mSndResume)(); + extern void (*mPadStopRumbling)(); + extern void (*mSndKill)(); + extern void (*mMovieSuspendFunction)(); + extern void (*mMovieResumeFunction)(); void SetPadStopRumblingFunction(void (*)(void)); void SetSndSuspendFunction(void (*)(void)); @@ -53,7 +53,7 @@ namespace iTRCDisk namespace ResetButton { - void (*mSndKill)(); + extern void (*mSndKill)(); void EnableReset(); void DisableReset(); From ce0c30dced963546902f2a85643c99daad9e1d47 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 27 Mar 2025 19:52:43 -0500 Subject: [PATCH 7/7] CI: Move non-matching build to earlier in the pipeline to fix sequencing issue --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b479494d9..9808e9607 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,14 @@ jobs: - name: Prepare run: cp -R /orig . + # Build and link non-matching files to verify lack of errors + - name: Build non-matching + run: | + python configure.py --non-matching \ + --version ${{ matrix.version }} \ + --binutils /binutils --compilers /compilers + ninja + # Build the project - name: Build run: | @@ -73,14 +81,6 @@ jobs: name: ${{ matrix.version }}_previous path: build/${{ matrix.version }}/report.json - # Build and link non-matching files to verify lack of errors - - name: Build non-matching - run: | - python configure.py --non-matching \ - --version ${{ matrix.version }} \ - --binutils /binutils --compilers /compilers - ninja - website: runs-on: ubuntu-latest permissions: