From 78ade1816be4c1fed2752f1df786430a9eb0e865 Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Mon, 6 Jan 2025 22:27:47 +0000 Subject: [PATCH] some bug fixes and better instructions --- .devcontainer/Dockerfile | 2 +- .github/workflows/build.yml | 2 -- Makefile | 2 +- README.md | 4 +++- src/game/stage/intro.c | 11 +++++++++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8e03ecf80..a6b7c4b24 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,7 +5,7 @@ ARG VARIANT FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends binutils-arm-none-eabi gcc-arm-none-eabi libpng-dev build-essential clang-format-13 xorg-dev libsdl2-dev gcc-mingw-w64 + && apt-get -y install --no-install-recommends binutils-arm-none-eabi gcc-arm-none-eabi libpng-dev build-essential clang-format-13 xorg-dev libsdl2-dev gcc-mingw-w64 libarchive-tools WORKDIR /deps RUN git clone https://github.com/pret/agbcc.git && cd agbcc && ./build.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb9bceb8b..a5ea8b2c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,8 +123,6 @@ jobs: - name: Checkout if: ${{ github.event_name == 'push' }} uses: actions/checkout@master - - - run: find tools/_shared - name: Install tools run: | diff --git a/Makefile b/Makefile index ebe8c4906..9693f52a9 100644 --- a/Makefile +++ b/Makefile @@ -512,7 +512,7 @@ europe: ; @$(MAKE) GAME_REGION=EUROPE sdl: ; @$(MAKE) PLATFORM=sdl -sdl_win32: SDL2.dll $(SDL_MINGW_LIB) +sdl_win32: @$(MAKE) PLATFORM=sdl_win32 CPU_ARCH=i386 win32: ; @$(MAKE) PLATFORM=win32 CPU_ARCH=i386 diff --git a/README.md b/README.md index 9cdbfe56c..06ec8ad47 100644 --- a/README.md +++ b/README.md @@ -82,11 +82,13 @@ sa2.gba: OK ``` **Build the port** -On windows: `make sdl_win32` +On Windows: `make sdl_win32` On Linux and MacOS: `make sdl` **NOTE**: You can significantly speed up initial build times by passing the number of processes you wish to use for the build `make ... -j` +**NOTE**: When building for Windows, you'll need to [download](https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-devel-2.30.3-mingw.zip) and extract SDL2 to the `ext` folder in the root of the repo before building. You can use `make SDL2.dll` to do this for you. + ### Code formatting All C code in this repo is formatted with `clang-format-13`. If using the Dev Container this is installed automatically. diff --git a/src/game/stage/intro.c b/src/game/stage/intro.c index f78f1e748..8c5b6d501 100644 --- a/src/game/stage/intro.c +++ b/src/game/stage/intro.c @@ -256,8 +256,15 @@ struct Task *SetupStageIntro(void) gStageFlags |= STAGE_FLAG__ACT_START; gStageFlags |= STAGE_FLAG__100; - gPlayer.spriteInfoBody->s.frameFlags |= SPRITE_FLAG_MASK_18; - gPlayer.spriteInfoLimbs->s.frameFlags |= SPRITE_FLAG_MASK_18; + // These are null when super sonic +#ifdef BUG_FIX + if (gPlayer.spriteInfoBody) +#endif + gPlayer.spriteInfoBody->s.frameFlags |= SPRITE_FLAG_MASK_18; +#ifdef BUG_FIX + if (gPlayer.spriteInfoLimbs) +#endif + gPlayer.spriteInfoLimbs->s.frameFlags |= SPRITE_FLAG_MASK_18; gActiveBossTask = NULL;