mirror of https://github.com/pret/pokecrystal.git
Add `assert PokemonPicPointers == UnownPicPointers` in `GetFrontpicPointer`
This commit is contained in:
parent
be7a5e09b5
commit
bd45cfd5fd
|
@ -49,28 +49,7 @@ GLOBAL PICS_FIX
|
||||||
|
|
||||||
.PicsBanks:
|
.PicsBanks:
|
||||||
db BANK("Pics 1") ; BANK("Pics 1") + 0
|
db BANK("Pics 1") ; BANK("Pics 1") + 0
|
||||||
db BANK("Pics 2") ; BANK("Pics 1") + 1
|
...
|
||||||
db BANK("Pics 3") ; BANK("Pics 1") + 2
|
|
||||||
db BANK("Pics 4") ; BANK("Pics 1") + 3
|
|
||||||
db BANK("Pics 5") ; BANK("Pics 1") + 4
|
|
||||||
db BANK("Pics 6") ; BANK("Pics 1") + 5
|
|
||||||
db BANK("Pics 7") ; BANK("Pics 1") + 6
|
|
||||||
db BANK("Pics 8") ; BANK("Pics 1") + 7
|
|
||||||
db BANK("Pics 9") ; BANK("Pics 1") + 8
|
|
||||||
db BANK("Pics 10") ; BANK("Pics 1") + 9
|
|
||||||
db BANK("Pics 11") ; BANK("Pics 1") + 10
|
|
||||||
db BANK("Pics 12") ; BANK("Pics 1") + 11
|
|
||||||
db BANK("Pics 13") ; BANK("Pics 1") + 12
|
|
||||||
db BANK("Pics 14") ; BANK("Pics 1") + 13
|
|
||||||
db BANK("Pics 15") ; BANK("Pics 1") + 14
|
|
||||||
db BANK("Pics 16") ; BANK("Pics 1") + 15
|
|
||||||
db BANK("Pics 17") ; BANK("Pics 1") + 16
|
|
||||||
db BANK("Pics 18") ; BANK("Pics 1") + 17
|
|
||||||
db BANK("Pics 19") ; BANK("Pics 1") + 18
|
|
||||||
db BANK("Pics 20") ; BANK("Pics 1") + 19
|
|
||||||
db BANK("Pics 21") ; BANK("Pics 1") + 20
|
|
||||||
db BANK("Pics 22") ; BANK("Pics 1") + 21
|
|
||||||
db BANK("Pics 23") ; BANK("Pics 1") + 22
|
|
||||||
db BANK("Pics 24") ; BANK("Pics 1") + 23
|
db BANK("Pics 24") ; BANK("Pics 1") + 23
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -121,18 +100,18 @@ Edit `GetFrontpicPointer`:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
cp UNOWN
|
cp UNOWN
|
||||||
jr z, .unown
|
jr z, .unown
|
||||||
ld a, [wCurPartySpecies]
|
|
||||||
+ ld hl, PokemonPicPointers
|
+ ld hl, PokemonPicPointers
|
||||||
|
ld a, [wCurPartySpecies]
|
||||||
ld d, BANK(PokemonPicPointers)
|
ld d, BANK(PokemonPicPointers)
|
||||||
jr .ok
|
jr .ok
|
||||||
|
|
||||||
.unown
|
.unown
|
||||||
ld a, [wUnownLetter]
|
|
||||||
+ ld hl, UnownPicPointers
|
+ ld hl, UnownPicPointers
|
||||||
|
ld a, [wUnownLetter]
|
||||||
ld d, BANK(UnownPicPointers)
|
ld d, BANK(UnownPicPointers)
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
- ld hl, PokemonPicPointers ; UnownPicPointers
|
- ; These are assumed to be at the same address in their respective banks.
|
||||||
|
- assert PokemonPicPointers == UnownPicPointers
|
||||||
|
- ld hl, PokemonPicPointers
|
||||||
dec a
|
dec a
|
||||||
ld bc, 6
|
ld bc, 6
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
|
@ -142,14 +121,14 @@ And `GetMonBackpic`:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
- ; These are assumed to be at the same address in their respective banks.
|
- ; These are assumed to be at the same address in their respective banks.
|
||||||
- ld hl, PokemonPicPointers ; UnownPicPointers
|
- assert PokemonPicPointers == UnownPicPointers
|
||||||
|
ld hl, PokemonPicPointers
|
||||||
ld a, b
|
ld a, b
|
||||||
+ ld hl, PokemonPicPointers
|
|
||||||
ld d, BANK(PokemonPicPointers)
|
ld d, BANK(PokemonPicPointers)
|
||||||
cp UNOWN
|
cp UNOWN
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld a, c
|
|
||||||
+ ld hl, UnownPicPointers
|
+ ld hl, UnownPicPointers
|
||||||
|
ld a, c
|
||||||
ld d, BANK(UnownPicPointers)
|
ld d, BANK(UnownPicPointers)
|
||||||
.ok
|
.ok
|
||||||
dec a
|
dec a
|
||||||
|
|
|
@ -109,13 +109,13 @@ GetFrontpicPointer:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld d, BANK(PokemonPicPointers)
|
ld d, BANK(PokemonPicPointers)
|
||||||
jr .ok
|
jr .ok
|
||||||
|
|
||||||
.unown
|
.unown
|
||||||
ld a, [wUnownLetter]
|
ld a, [wUnownLetter]
|
||||||
ld d, BANK(UnownPicPointers)
|
ld d, BANK(UnownPicPointers)
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
ld hl, PokemonPicPointers ; UnownPicPointers
|
; These are assumed to be at the same address in their respective banks.
|
||||||
|
assert PokemonPicPointers == UnownPicPointers
|
||||||
|
ld hl, PokemonPicPointers
|
||||||
dec a
|
dec a
|
||||||
ld bc, 6
|
ld bc, 6
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
|
|
Loading…
Reference in New Issue