From 5c3669e0cd49ccc210d7c57228820685fef11230 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:43:20 +0200 Subject: Bug documenting --- docs/bugs_and_glitches.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index e23379cfb..e7b40a089 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -42,6 +42,24 @@ And edit `AgbMain`: ... ``` +**Altenate 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); + ... +``` +That matches 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): -- cgit v1.2.3 From 3e95f837a6b3fdc606b24fc069f0b2994279ebac Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:44:39 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index e7b40a089..0f4a85cc0 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -42,7 +42,7 @@ And edit `AgbMain`: ... ``` -**Altenate Fix:**Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c): +**Altenate 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) @@ -52,7 +52,7 @@ void CB2_InitTitleScreen(void) default: case 0: SetVBlankCallback(NULL); - + StartTimer1(); ++ StartTimer1(); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); -- cgit v1.2.3 From 84acc5c6db99d7b57b1619f89f56b5bf8f3fea35 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:47:10 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 0f4a85cc0..0da23af4b 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -52,11 +52,11 @@ void CB2_InitTitleScreen(void) default: case 0: SetVBlankCallback(NULL); -+ StartTimer1(); - SetGpuReg(REG_OFFSET_BLDCNT, 0); ++ StartTimer1(); + SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); - ... + ... ``` That matches the code of FR/LG and does what GF originally wanted to do. -- cgit v1.2.3 From 7377c2f192ab46479f9a0cc23edfd8c07f186d0c Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:48:57 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 0da23af4b..f0e1005b8 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -52,11 +52,11 @@ void CB2_InitTitleScreen(void) default: case 0: SetVBlankCallback(NULL); -+ StartTimer1(); - SetGpuReg(REG_OFFSET_BLDCNT, 0); ++ StartTimer1(); + SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); - ... + ... ``` That matches the code of FR/LG and does what GF originally wanted to do. -- cgit v1.2.3 From 4c4c2ea41bf6841753002f2fd6f527a4fecc363d Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:49:55 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index f0e1005b8..9f80992d2 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -52,8 +52,8 @@ void CB2_InitTitleScreen(void) default: case 0: SetVBlankCallback(NULL); -+ StartTimer1(); - SetGpuReg(REG_OFFSET_BLDCNT, 0); ++ StartTimer1(); + SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); ... -- cgit v1.2.3 From f84702e50bc57549c76500f7394500baadd61501 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:52:00 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 9f80992d2..fc993e678 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -47,15 +47,15 @@ And edit `AgbMain`: ```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); + switch (gMain.state) + { + default: + case 0: + SetVBlankCallback(NULL); ++ StartTimer1(); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); ... ``` That matches the code of FR/LG and does what GF originally wanted to do. -- cgit v1.2.3 From 50139aa00ce2bbc65641fb6f2a37b2ddbfcca9ab Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:53:09 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index fc993e678..b5f8a3276 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -58,7 +58,7 @@ void CB2_InitTitleScreen(void) SetGpuReg(REG_OFFSET_BLDY, 0); ... ``` -That matches the code of FR/LG and does what GF originally wanted to do. +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 -- cgit v1.2.3 From f861b70fe74d064ab7f476ed5a3d0f2d3415c1a6 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:53:59 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index b5f8a3276..fccdd5a2b 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -42,7 +42,7 @@ And edit `AgbMain`: ... ``` -**Altenate Fix:** Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c): +**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) -- cgit v1.2.3 From a130c2dc4adc114a5bf57383046077f2bf66e271 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 20:02:27 +0200 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index fccdd5a2b..3d294f5cf 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -42,6 +42,8 @@ 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 -- cgit v1.2.3 From 56ec5c65a89a3f13fa30ec5fca055346c9470ee4 Mon Sep 17 00:00:00 2001 From: Sierra A <6080951+Sierraffinity@users.noreply.github.com> Date: Sat, 12 Dec 2020 22:41:46 -0800 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 3d294f5cf..d5531caf2 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1,7 +1,7 @@ # Bugs and Glitches -These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. +These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` preprocessor variable will fix some of these automatically. Fixes are written in the `diff` format. If you've used Git before, this should look familiar: @@ -60,7 +60,7 @@ void CB2_InitTitleScreen(void) SetGpuReg(REG_OFFSET_BLDY, 0); ... ``` -This matches with the code of FR/LG and does what GF originally wanted to do. +This matches what FRLG does and obtains the seed differently than RS, independently of the RTC. ## Scrolling through items in the bag causes the image to flicker @@ -95,3 +95,21 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p if (a != -2) ... ``` + +## Pokémon that have an affine transform as part of their entry animation glitch when going in and out of Poké Balls without a screen transition in between + +**Fix:** Edit sub_817F77C in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028) and remove the ifdef/endif lines: + +```diff + ... +-#ifdef BUGFIX + else + { + // FIX: Reset these back to normal after they were changed so Poké Ball catch/release + // animations without a screen transition in between don't break + sprite->affineAnimPaused = FALSE; + sprite->affineAnims = gUnknown_082FF694; + } +-#endif // BUGFIX +} +``` -- cgit v1.2.3 From f24307346f1d8f0540aefc84db7463bfaa85e3ee Mon Sep 17 00:00:00 2001 From: Sierra A <6080951+Sierraffinity@users.noreply.github.com> Date: Sat, 12 Dec 2020 22:42:02 -0800 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index d5531caf2..670950c1c 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -98,7 +98,7 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p ## Pokémon that have an affine transform as part of their entry animation glitch when going in and out of Poké Balls without a screen transition in between -**Fix:** Edit sub_817F77C in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028) and remove the ifdef/endif lines: +**Fix:** Edit `sub_817F77C` in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028) and remove the ifdef/endif lines: ```diff ... -- cgit v1.2.3 From 70310686419fb34a16b5dfba27b6cd15f65913cc Mon Sep 17 00:00:00 2001 From: Sierra A <6080951+Sierraffinity@users.noreply.github.com> Date: Sat, 12 Dec 2020 22:42:29 -0800 Subject: Update bugs_and_glitches.md --- docs/bugs_and_glitches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 670950c1c..285718598 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -98,7 +98,7 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p ## Pokémon that have an affine transform as part of their entry animation glitch when going in and out of Poké Balls without a screen transition in between -**Fix:** Edit `sub_817F77C` in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028) and remove the ifdef/endif lines: +**Fix:** Edit `sub_817F77C` in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028): ```diff ... -- cgit v1.2.3