Fix trainer sprite loading

Moved Yujirou to the end of the file and made the bank switching code more efficient, was swamp code before.
This commit is contained in:
May Evans 2023-04-02 21:37:57 +01:00
parent bd23dfa61e
commit fc597000fb
5 changed files with 11 additions and 13 deletions

View file

@ -6954,11 +6954,9 @@ _LoadTrainerPic:
ld d, a ; de contains pointer to trainer pic
ld a, [wLinkState]
and a
;ld a, BANK("Pics 6") ; this is where all the trainer pics are (not counting Red's)
;jr z, .loadSprite
jr nz, .useRed ; New Trainer Pic code, credit to Rangi's Red*/Blue* hack
jr nz, .useRed
ld a, [wTrainerClass]
cp YUJIROU ; first trainer class in "Pics 10"
cp YUJIROU ; first trainer class in "Pics 10" - Rangi's code to load more trainer pics
ld a, Bank("Pics 10")
jr nc, .loadSprite
ld a, Bank("Pics 6")