Skip to content

Commit

Permalink
Fix palettes for pokemon icons in trade animation
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed Jul 21, 2024
1 parent 989fc6f commit 9aefb90
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions engine/gfx/color.asm
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,19 @@ SetFirstOBJPalette::
ldh [hCGBPalUpdate], a
jp ApplyPals

SetSecondOBJPalette::
; input: e must contain the offset of the selected palette from PartyMenuOBPals
ld hl, PartyMenuOBPals
ld d, 0
add hl, de
ld de, wOBPals1 palette 1
ld bc, 1 palettes
ld a, BANK(wOBPals1)
call FarCopyWRAM
ld a, TRUE
ldh [hCGBPalUpdate], a
jmp ApplyPals

InitPokegearOBPal:
ld a, d
ld hl, PartyMenuOBPals
Expand Down
8 changes: 8 additions & 0 deletions engine/gfx/mon_icons.asm
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,16 @@ MoveList_InitAnimatedMonIcon:
ret

Trade_LoadMonIconGFX:
ld hl, wTempMonDVs
ld a, [wTempIconSpecies]
ld [wCurPartySpecies], a
ld [wCurIcon], a
call GetMenuMonIconPalette
add a
add a
add a
ld e, a
farcall SetSecondOBJPalette
ld a, $62
ld [wCurIconTile], a
ld de, wTempMonDVs
Expand Down

0 comments on commit 9aefb90

Please sign in to comment.