diff options
author | IIMarckus <iimarckus@gmail.com> | 2013-05-12 21:56:09 -0600 |
---|---|---|
committer | IIMarckus <iimarckus@gmail.com> | 2013-05-12 21:56:09 -0600 |
commit | 9f4f3b62a48be8f520303f795019b534300aba3d (patch) | |
tree | 4b90aa4929d99e98196f9bcfa6e3a6000fb12f42 | |
parent | 2cc0aef0e98f4e47e724e9e5d739a5f50b765a39 (diff) |
Make the pic bank calculations more readable.
-rw-r--r-- | constants.asm | 2 | ||||
-rw-r--r-- | main.asm | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/constants.asm b/constants.asm index a85bc9bd..648f955d 100644 --- a/constants.asm +++ b/constants.asm @@ -1447,6 +1447,8 @@ SQUIRTLE EQU $B1 CHARMELEON EQU $B2 WARTORTLE EQU $B3 CHARIZARD EQU $B4 +FOSSIL_KABUTOPS EQU $B6 +FOSSIL_AERODACTYL EQU $B7 MON_GHOST EQU $B8 ODDISH EQU $B9 GLOOM EQU $BA @@ -3324,14 +3324,14 @@ GetMonHeader: ; 1537 (0:1537) ld [$d11e],a ld de,FossilKabutopsPic ld b,$66 ; size of Kabutops fossil and Ghost sprites - cp a,$b6 ; Kabutops fossil + cp a,FOSSIL_KABUTOPS ; Kabutops fossil jr z,.specialID ld de,GhostPic - cp a,$b8 ; Ghost + cp a,MON_GHOST ; Ghost jr z,.specialID ld de,FossilAerodactylPic ld b,$77 ; size of Aerodactyl fossil sprite - cp a,$b7 ; Aerodactyl fossil + cp a,FOSSIL_AERODACTYL ; Aerodactyl fossil jr z,.specialID cp a,MEW jr z,.mew @@ -3490,30 +3490,30 @@ UncompressMonSprite: ; 1627 (0:1627) ; $99 ≤ index, bank $D ld a,[$CF91] ; XXX name for this ram location ld b,a - cp $15 - ld a,$01 + cp MEW + ld a,BANK(MewPicFront) jr z,.GotBank ld a,b - cp $B6 - ld a,$0B + cp FOSSIL_KABUTOPS + ld a,BANK(FossilKabutopsPic) jr z,.GotBank ld a,b - cp $1F - ld a,$09 + cp TANGELA + 1 + ld a,BANK(TangelaPicFront) jr c,.GotBank ld a,b - cp $4A - ld a,$0A + cp MOLTRES + 1 + ld a,BANK(MoltresPicFront) jr c,.GotBank ld a,b - cp $74 - ld a,$0B + cp BEEDRILL + 2 + ld a,BANK(BeedrillPicFront) jr c,.GotBank ld a,b - cp $99 - ld a,$0C + cp STARMIE + 1 + ld a,BANK(StarmiePicFront) jr c,.GotBank - ld a,$0D + ld a,BANK(VictreebelPicFront) .GotBank jp UncompressSpriteData |