Use BANK("Pics #") for Pokémon and trainer pics

This commit is contained in:
Rangi 2021-05-06 23:04:00 -04:00
parent bb8fdd7f42
commit c8626595b4
3 changed files with 15 additions and 15 deletions

View file

@ -6308,6 +6308,7 @@ LoadPlayerBackPic:
ld de, OldManPicBack ld de, OldManPicBack
.next .next
ld a, BANK(RedPicBack) ld a, BANK(RedPicBack)
assert BANK(RedPicBack) == BANK(OldManPicBack)
call UncompressSpriteFromDE call UncompressSpriteFromDE
predef ScaleSpriteByTwo predef ScaleSpriteByTwo
ld hl, wOAMBuffer ld hl, wOAMBuffer
@ -6880,7 +6881,7 @@ _LoadTrainerPic:
ld d, a ; de contains pointer to trainer pic ld d, a ; de contains pointer to trainer pic
ld a, [wLinkState] ld a, [wLinkState]
and a and a
ld a, BANK(TrainerPics) ; this is where all the trainer pics are (not counting Red's) ld a, BANK("Pics 6") ; this is where all the trainer pics are (not counting Red's)
jr z, .loadSprite jr z, .loadSprite
ld a, BANK(RedPicFront) ld a, BANK(RedPicFront)
.loadSprite .loadSprite

View file

@ -327,7 +327,6 @@ VictreebelPicBack:: INCBIN "gfx/pokemon/back/victreebelb.pic"
SECTION "Pics 6", ROMX SECTION "Pics 6", ROMX
TrainerPics::
YoungsterPic:: INCBIN "gfx/trainers/youngster.pic" YoungsterPic:: INCBIN "gfx/trainers/youngster.pic"
BugCatcherPic:: INCBIN "gfx/trainers/bugcatcher.pic" BugCatcherPic:: INCBIN "gfx/trainers/bugcatcher.pic"
LassPic:: INCBIN "gfx/trainers/lass.pic" LassPic:: INCBIN "gfx/trainers/lass.pic"

View file

@ -9,14 +9,14 @@ UncompressMonSprite::
ld a, [hl] ld a, [hl]
ld [wSpriteInputPtr+1], a ld [wSpriteInputPtr+1], a
; define (by index number) the bank that a pokemon's image is in ; define (by index number) the bank that a pokemon's image is in
; index = Mew, bank 1 ; index = MEW: bank $1
; index = Kabutops fossil, bank $B ; index = FOSSIL_KABUTOPS: bank $B
; index < $1F, bank 9 ; index < $1F: bank $9 ("Pics 1")
; $1F ≤ index < $4A, bank $A ; $1F ≤ index < $4A: bank $A ("Pics 2")
; $4A ≤ index < $74, bank $B ; $4A ≤ index < $74: bank $B ("Pics 3")
; $74 ≤ index < $99, bank $C ; $74 ≤ index < $99: bank $C ("Pics 4")
; $99 ≤ index, bank $D ; $99 ≤ index: bank $D ("Pics 5")
ld a, [wcf91] ; XXX name for this ram location ld a, [wcf91]
ld b, a ld b, a
cp MEW cp MEW
ld a, BANK(MewPicFront) ld a, BANK(MewPicFront)
@ -27,21 +27,21 @@ UncompressMonSprite::
jr z, .GotBank jr z, .GotBank
ld a, b ld a, b
cp TANGELA + 1 cp TANGELA + 1
ld a, BANK(TangelaPicFront) ld a, BANK("Pics 1")
jr c, .GotBank jr c, .GotBank
ld a, b ld a, b
cp MOLTRES + 1 cp MOLTRES + 1
ld a, BANK(MoltresPicFront) ld a, BANK("Pics 2")
jr c, .GotBank jr c, .GotBank
ld a, b ld a, b
cp BEEDRILL + 2 cp BEEDRILL + 2
ld a, BANK(BeedrillPicFront) ld a, BANK("Pics 3")
jr c, .GotBank jr c, .GotBank
ld a, b ld a, b
cp STARMIE + 1 cp STARMIE + 1
ld a, BANK(StarmiePicFront) ld a, BANK("Pics 4")
jr c, .GotBank jr c, .GotBank
ld a, BANK(VictreebelPicFront) ld a, BANK("Pics 5")
.GotBank .GotBank
jp UncompressSpriteData jp UncompressSpriteData