From aa092bebfecaa9104ab39a888d3744fd1ff3ce91 Mon Sep 17 00:00:00 2001 From: NepuShiro Date: Sat, 23 May 2026 11:20:57 -0500 Subject: [PATCH] fixes somethigns --- .github/workflows/main.yml | 16 +++++++++------- src/decomp/game/mario_misc.c | 7 ++++++- src/libsm64.c | 4 +--- src/libsm64.h | 3 +-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16a4126..d6fdf48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,8 +13,6 @@ jobs: os: ubuntu-latest - identifier: windows os: ubuntu-latest - - identifier: macos - os: macos-latest - identifier: web os: ubuntu-latest runs-on: ${{ matrix.os }} @@ -27,9 +25,13 @@ jobs: with: python-version: '3.10' - - name: (Windows) Set up MinGW + - name: (Windows) Install MinGW if: ${{ startsWith(matrix.identifier, 'windows') }} - uses: egor-tensin/setup-mingw@v2 + run: | + sudo apt-get update -y -qq + sudo apt-get install -y mingw-w64 + sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix + sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix - name: (Windows) Prepare cross compilation if: ${{ startsWith(matrix.identifier, 'windows') }} @@ -42,7 +44,7 @@ jobs: run: | sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" sudo apt-get update -y -qq - sudo apt-get install libsdl2-dev libglew-dev + sudo apt-get install -y libsdl2-dev libglew-dev - name: (Web) Set up Emscripten if: ${{ startsWith(matrix.identifier, 'web') }} @@ -62,7 +64,7 @@ jobs: make test -j`nproc` - name: Upload build - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: libsm64_${{ matrix.identifier }} path: | @@ -88,4 +90,4 @@ jobs: # title: "Snapshot Build" # files: | # ./README.md - # ./dist + # ./dist \ No newline at end of file diff --git a/src/decomp/game/mario_misc.c b/src/decomp/game/mario_misc.c index db63906..d2bc962 100644 --- a/src/decomp/game/mario_misc.c +++ b/src/decomp/game/mario_misc.c @@ -490,7 +490,12 @@ Gfx *geo_switch_mario_cap_effect(s32 callContext, struct GraphNode *node, UNUSED struct MarioBodyState *bodyState = &gBodyStates[switchCase->numCases]; if (callContext == GEO_CONTEXT_RENDER) { - switchCase->selectedCase = bodyState->modelState >> 8; + // switchCase->selectedCase = bodyState->modelState >> 8; + if (bodyState->modelState >> 8 >= 2){ // temporarily disables metal cap + switchCase->selectedCase = 0; + } else { + switchCase->selectedCase = bodyState->modelState >> 8; + } } return NULL; } diff --git a/src/libsm64.c b/src/libsm64.c index b7db0b1..74e12c2 100644 --- a/src/libsm64.c +++ b/src/libsm64.c @@ -259,9 +259,7 @@ SM64_LIB_FN void sm64_mario_tick( int32_t marioId, const struct SM64MarioInputs outState->forwardVelocity = gMarioState->forwardVel; outState->action = gMarioState->action; - struct AnimInfo animInfo = gMarioState->marioObj->header.gfx.animInfo; - outState->animID = animInfo.animID; - outState->animFrame = animInfo.animFrame; + outState->animInfo = &gMarioState->marioObj->header.gfx.animInfo; outState->flags = gMarioState->flags; outState->particleFlags = gMarioState->particleFlags; diff --git a/src/libsm64.h b/src/libsm64.h index 1f6c5e4..2c77448 100644 --- a/src/libsm64.h +++ b/src/libsm64.h @@ -61,8 +61,7 @@ struct SM64MarioState float forwardVelocity; int16_t health; uint32_t action; - int32_t animID; - int16_t animFrame; + struct AnimInfo* animInfo; uint32_t flags; uint32_t particleFlags; int16_t invincTimer;