Skip to content

Commit

Permalink
QoL #2: unlink PokemonPicPointers and UnownPicPointers
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaaaa123456789 authored and vulcandth committed Aug 27, 2022
1 parent f8f7437 commit 9b9da7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions engine/gfx/load_pics.asm
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,14 @@ GetFrontpicPointer:
cp UNOWN
jr z, .unown
ld a, [wCurPartySpecies]
ld hl, PokemonPicPointers
ld d, BANK(PokemonPicPointers)
jr .ok
.unown
ld a, [wUnownLetter]
ld hl, UnownPicPointers
ld d, BANK(UnownPicPointers)
.ok
; These are assumed to be at the same address in their respective banks.
assert PokemonPicPointers == UnownPicPointers
ld hl, PokemonPicPointers
dec a
ld bc, 6
call AddNTimes
Expand Down Expand Up @@ -206,13 +205,12 @@ GetMonBackpic:
ldh [rSVBK], a
push de

; These are assumed to be at the same address in their respective banks.
assert PokemonPicPointers == UnownPicPointers
ld hl, PokemonPicPointers
ld a, b
ld d, BANK(PokemonPicPointers)
cp UNOWN
jr nz, .ok
ld hl, UnownPicPointers
ld a, c
ld d, BANK(UnownPicPointers)
.ok
Expand Down
2 changes: 0 additions & 2 deletions layout.link
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,9 @@ ROMX $46
ROMX $47
"Battle Tower"
ROMX $48
org $4000
"Pic Pointers"
"Pics 1"
ROMX $49
org $4000
"Unown Pic Pointers"
"Pics 2"
ROMX $4a
Expand Down

0 comments on commit 9b9da7e

Please sign in to comment.