Clean up bugs commented in the source code (#912)

Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
vulcandth
2022-07-09 16:12:02 -05:00
committed by GitHub
parent bd27c0d8dc
commit ef9b9bb437
49 changed files with 267 additions and 324 deletions

View File

@@ -37,13 +37,6 @@ HaircutOrGrooming:
call CopyPokemonName_Buffer1_Buffer3
pop hl
call Random
; Bug: Subtracting $ff from $ff fails to set c.
; This can result in overflow into the next data array.
; In the case of getting a grooming from Daisy, we bleed
; into CopyPokemonName_Buffer1_Buffer3, which passes
; $d0 to ChangeHappiness and returns $73 to the script.
; The end result is that there is a 0.4% chance your
; Pokemon's happiness will not change at all.
.loop
sub [hl]
jr c, .ok

View File

@@ -363,8 +363,9 @@ _HallOfFamePC:
call ClearBGPalettes
pop hl
call DisplayHOFMon
; BUG: A "HOF Master!" title for 200-Time Famers is defined but inaccessible (see docs/bugs_and_glitches.md)
ld a, [wHallOfFameTempWinCount]
cp HOF_MASTER_COUNT + 1 ; should be HOF_MASTER_COUNT
cp HOF_MASTER_COUNT + 1
jr c, .print_num_hof
ld de, .HOFMaster
hlcoord 1, 2

View File

@@ -278,12 +278,11 @@ CalcMagikarpLength:
ret
.BCLessThanDE:
; Intention: Return bc < de.
; Reality: Return b < d.
; BUG: Magikarp lengths can be miscalculated (see docs/bugs_and_glitches.md)
ld a, b
cp d
ret c
ret nc ; whoops
ret nc
ld a, c
cp e
ret

View File

@@ -400,6 +400,7 @@ SurfFromMenuScript:
special UpdateTimePals
UsedSurfScript:
; BUG: Surfing directly across a map connection does not load the new map (see docs/bugs_and_glitches.md)
writetext UsedSurfText ; "used SURF!"
waitbutton
closetext