diff options
-rw-r--r-- | INSTALL.md | 2 | ||||
-rw-r--r-- | docs/bugs_and_glitches.md | 20 | ||||
-rw-r--r-- | src/battle_util.c | 2 | ||||
-rw-r--r-- | src/metatile_behavior.c | 4 | ||||
-rw-r--r-- | src/pokemon.c | 2 | ||||
-rw-r--r-- | src/scanline_effect.c | 8 |
6 files changed, 33 insertions, 5 deletions
diff --git a/INSTALL.md b/INSTALL.md index f16384450..20d55e134 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,7 +8,7 @@ [terminal]: https://docs.microsoft.com/windows/terminal/get-started [wsl]: https://docs.microsoft.com/windows/wsl/install-win10 -Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS. +Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng-dev` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS. Install the devkitARM toolchain of devkitPro as per [the instructions on their wiki](https://devkitpro.org/wiki/devkitPro_pacman). On Windows, follow the Linux instructions inside WSL as any steps about the Windows installer do not apply. diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index e23379cfb..3d294f5cf 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -42,6 +42,26 @@ And edit `AgbMain`: ... ``` +This restores the code of Ruby/Sapphire. + +**Alternate Fix:** Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c): + +```diff +void CB2_InitTitleScreen(void) +{ + switch (gMain.state) + { + default: + case 0: + SetVBlankCallback(NULL); ++ StartTimer1(); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + ... +``` +This matches with the code of FR/LG and does what GF originally wanted to do. + ## Scrolling through items in the bag causes the image to flicker **Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c): diff --git a/src/battle_util.c b/src/battle_util.c index eb3907157..31ed0b3fe 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -527,6 +527,8 @@ void HandleAction_ThrowPokeblock(void) gBattleStruct->safariPkblThrowCounter++; if (gBattleStruct->safariEscapeFactor > 1) { + // BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch. + // To fix that change the < in the if statement below to <=. if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]]) gBattleStruct->safariEscapeFactor = 1; else diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index dde4de329..51cc65c22 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -968,6 +968,10 @@ bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior) bool8 MetatileBehavior_IsUnableToEmerge(u8 metatileBehavior) { + // BUG: The player is unintentionally able to emerge on water doors. + // Also the narrower underwater door in the underwater tileset has the wrong metatile behavior. This causes the dive glitch. + // To fix that add || metatileBehavior == MB_WATER_DOOR to the if statement below and + // change the metatile behavior of the narrower water door with porymaps tileset editor. if (metatileBehavior == MB_NO_SURFACING || metatileBehavior == MB_SEAWEED_NO_SURFACING) return TRUE; diff --git a/src/pokemon.c b/src/pokemon.c index a0e655d1e..30f0b0e73 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2861,6 +2861,8 @@ void CalculateMonStats(struct Pokemon *mon) if (currentHP == 0 && oldMaxHP == 0) currentHP = newMaxHP; else if (currentHP != 0) + // BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. + // To fix that set currentHP = 1 if currentHP <= 0. currentHP += newMaxHP - oldMaxHP; else return; diff --git a/src/scanline_effect.c b/src/scanline_effect.c index 0a4b0b8fd..1d5814429 100644 --- a/src/scanline_effect.c +++ b/src/scanline_effect.c @@ -100,16 +100,16 @@ void ScanlineEffect_InitHBlankDmaTransfer(void) static void CopyValue16Bit(void) { - u16 *dest = (u16 *)gScanlineEffect.dmaDest; - u16 *src = (u16 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer]; + vu16 *dest = (vu16 *)gScanlineEffect.dmaDest; + vu16 *src = (vu16 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer]; *dest = *src; } static void CopyValue32Bit(void) { - u32 *dest = (u32 *)gScanlineEffect.dmaDest; - u32 *src = (u32 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer]; + vu32 *dest = (vu32 *)gScanlineEffect.dmaDest; + vu32 *src = (vu32 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer]; *dest = *src; } |