From 80a37c16beb71698903836e7bf583a03ea78c112 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 25 Sep 2024 13:35:52 -0400 Subject: [PATCH 1/7] Remove explicit symbol sizes in sym_common.txt --- common_syms/ereader_screen.txt | 1 + src/ereader_screen.c | 3 +++ sym_common.txt | 48 +++++----------------------------- 3 files changed, 11 insertions(+), 41 deletions(-) diff --git a/common_syms/ereader_screen.txt b/common_syms/ereader_screen.txt index 2189eedbc925..26b01f678de1 100644 --- a/common_syms/ereader_screen.txt +++ b/common_syms/ereader_screen.txt @@ -1 +1,2 @@ +gUnknownSpace gEReaderData diff --git a/src/ereader_screen.c b/src/ereader_screen.c index c625c78a9e3c..cb048d2ae359 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -40,6 +40,9 @@ struct EReaderData static void Task_EReader(u8); +// This belongs in COMMON somewhere between party_menu and ereader_screen, but it's unused so it's unclear where. +UNUSED u8 gUnknownSpace[64]; + struct EReaderData gEReaderData; extern const u8 gMultiBootProgram_EReader_Start[]; diff --git a/sym_common.txt b/sym_common.txt index 335af85a303f..e001c2ca59d5 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -1,37 +1,10 @@ - .space 0x8 - .include "main.o" - @ ../src/bg.o - .align 2 -gWindowTileAutoAllocEnabled: - .space 4 - @ ../src/window.o - .align 4 -gTransparentTileNumber: - .space 1 - .align 4 -gWindowBgTilemapBuffers: - .space 16 - @ ../src/text.o - .align 4 -gFonts: - .space 4 - .align 2 -gDisableTextPrinters: - .space 1 .align 4 -gCurGlyph: - .space 132 - .align 2 -gTextFlags: - .space 4 - @ ../src/sprite.o - .align 2 -gOamMatrixAllocBitmap: - .space 4 - .align 2 -gReservedSpritePaletteCount: - .space 1 + .include "main.o" + .include "bg.o" .align 4 + .include "window.o" + .include "text.o" + .include "sprite.o" .include "link.o" .include "AgbRfu_LinkManager.o" .include "link_rfu_2.o" @@ -53,9 +26,7 @@ gReservedSpritePaletteCount: .include "tv.o" .include "mauville_old_man.o" .include "image_processing_effects.o" - - .space 0x4 - + .align 4 .include "contest_painting.o" .include "field_specials.o" .include "evolution_scene.o" @@ -66,14 +37,9 @@ gReservedSpritePaletteCount: .include "battle_anim_throw.o" .include "battle_factory_screen.o" .include "apprentice.o" - - .space 0x8 - + .align 4 .include "list_menu.o" .include "party_menu.o" - - .space 0x44 - .include "ereader_screen.o" .include "m4a.o" .include "agb_flash.o" From 8e2c3ca3f2238765e993d005a00dbe4a6abf4a83 Mon Sep 17 00:00:00 2001 From: Scyrous <74797764+Scyrous@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:13:50 +0200 Subject: [PATCH 2/7] Bugfix for cable car sprite array count --- src/cable_car.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cable_car.c b/src/cable_car.c index 8a666a536e46..9a6166b59906 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -880,8 +880,12 @@ static void CreateCableCarSprites(void) // 1/64 chance for an NPC to appear hiking on the ground below the Cable Car if ((rval % 64) == 0) { - // Unclear if this was intentional, but the - 1 in the below ARRAY_COUNT means the Zigzagoon is never used + // BUGFIX: The - 1 in the below ARRAY_COUNT means the Zigzagoon is never used +#ifdef #BUGFIX + spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % ARRAY_COUNT(hikerGraphicsIds)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); +#else spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); +#endif if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.priority = 2; From 1dc85df1f0ab617dc402ee2da1f37097e3758461 Mon Sep 17 00:00:00 2001 From: Scyrous <74797764+Scyrous@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:38:08 +0200 Subject: [PATCH 3/7] Update cable_car.c --- src/cable_car.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cable_car.c b/src/cable_car.c index 9a6166b59906..522ea01a97ab 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -881,7 +881,7 @@ static void CreateCableCarSprites(void) if ((rval % 64) == 0) { // BUGFIX: The - 1 in the below ARRAY_COUNT means the Zigzagoon is never used -#ifdef #BUGFIX +#ifdef BUGFIX spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % ARRAY_COUNT(hikerGraphicsIds)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); #else spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); From c8cc0fa5a34f15b2ff1841dc380f215da677ff1f Mon Sep 17 00:00:00 2001 From: Jaizu Date: Tue, 1 Oct 2024 10:07:45 +0200 Subject: [PATCH 4/7] Ignore mGBA screenshots Everytime I make a new project I suffer, please merge. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9fa431e14320..f940d26b217b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ prefabs.json *.diff *.sym *.js +/pokeemerald-*.png +/pokeemerald_modern-*.png From 9a24c031bb21e5f9d198a93ef7b8acb66bbcdec7 Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:48:54 -0700 Subject: [PATCH 5/7] Replaced copyright magic numbers in intro.c with constants (#2035) --- src/intro.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/intro.c b/src/intro.c index 195374bba0c9..02c3a1f9488f 100644 --- a/src/intro.c +++ b/src/intro.c @@ -112,6 +112,12 @@ extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[]; +enum { + COPYRIGHT_INITIALIZE, + COPYRIGHT_START_FADE = 140, + COPYRIGHT_START_INTRO, +}; + #define TAG_VOLBEAT 1500 #define TAG_TORCHIC 1501 #define TAG_MANECTRIC 1502 @@ -1067,7 +1073,7 @@ static u8 SetUpCopyrightScreen(void) { switch (gMain.state) { - case 0: + case COPYRIGHT_INITIALIZE: SetVBlankCallback(NULL); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); @@ -1101,7 +1107,7 @@ static u8 SetUpCopyrightScreen(void) gMain.state++; GameCubeMultiBoot_Main(&gMultibootProgramStruct); break; - case 140: + case COPYRIGHT_START_FADE: GameCubeMultiBoot_Main(&gMultibootProgramStruct); if (gMultibootProgramStruct.gcmb_field_2 != 1) { @@ -1109,7 +1115,7 @@ static u8 SetUpCopyrightScreen(void) gMain.state++; } break; - case 141: + case COPYRIGHT_START_INTRO: if (UpdatePaletteFade()) break; CreateTask(Task_Scene1_Load, 0); From 9ad0018c176092ea3ff2a1884cf11ae1b5a194b7 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AreaZR@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:27:33 -0400 Subject: [PATCH 6/7] Fix typo: | should be || in Task_TryFieldPoisonWhiteOut Yes, this is honestly overkill, as it doesn't actually fix any behavioral bugs, but I was suggested to do this. This was a typo made in the source that GameFreak made, and the compiler warns against this. I opened a PR in pokeemerald expansion and was suggested to open one here. --- src/field_poison.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/field_poison.c b/src/field_poison.c index f254a6d142e4..d952b4b640a5 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -89,7 +89,11 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId) if (AllMonsFainted()) { // Battle facilities have their own white out script to handle the challenge loss +#ifdef BUGFIX + if (InBattlePyramid() || InBattlePike() || InTrainerHillChallenge()) +#else if (InBattlePyramid() | InBattlePike() || InTrainerHillChallenge()) +#endif gSpecialVar_Result = FLDPSN_FRONTIER_WHITEOUT; else gSpecialVar_Result = FLDPSN_WHITEOUT; From 6d24d8a78f4e0fb9bc139343a970b84beabb6560 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 11 Oct 2024 13:05:56 -0400 Subject: [PATCH 7/7] Fix libpng installation for workflow on Ubuntu 24.04 --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 283e6f8fb565..a99c99283ded 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,9 @@ jobs: repository: pret/agbcc - name: Install binutils - run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi - # build-essential, git, and libpng-dev are already installed + run: | + sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libpng-dev + # build-essential and git are already installed # gcc-arm-none-eabi is only needed for the modern build # as an alternative to dkP