Skip to content

Commit

Permalink
Temp Work for Unown
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitZeta committed Sep 26, 2024
1 parent 93bb36a commit 89eccde
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
7 changes: 4 additions & 3 deletions engine/gfx/load_pics.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ GetUnownLetter:
; Return Unown letter in wUnownLetter based on Personality Form at hl
ld a, [hl]
and FORM_MASK
jr nz, .not_zero
inc a ; PLAIN_FORM will render as A
.not_zero
ld [wUnownLetter], a
ret

Expand Down Expand Up @@ -117,6 +114,10 @@ GetPicIndirectPointer:

.unown
ld a, [wUnownLetter]
and a
jr nz, .is_letter
inc a ; PLAIN_FORM will render as A
.is_letter
ld c, a
ld b, 0
ld hl, UnownPicPointers - 6
Expand Down
8 changes: 8 additions & 0 deletions engine/gfx/pic_animation.asm
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ PokeAnim_InitPicAttributes:
ld a, BANK(wUnownLetter)
ld hl, wUnownLetter
call GetFarWRAMByte
and a
jr nz, .is_letter
inc a ; PLAIN_FORM will render as A
.is_letter
ld [wPokeAnimUnownLetter], a

call PokeAnim_GetSpeciesOrUnown
Expand Down Expand Up @@ -998,6 +1002,10 @@ PokeAnim_GetSpeciesOrUnown:
ret

.unown
and a
jr nz, .is_letter
inc a ; PLAIN_FORM will render as A
.is_letter
ld a, [wPokeAnimUnownLetter]
ret

Expand Down
5 changes: 5 additions & 0 deletions engine/pokemon/move_mon.asm
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ endr
rst AddNTimes
predef GetUnownLetter
farcall UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
jr nz, .done
ld a, [wUnownLetter]
ld [wFirstUnownSeen], a

.done
scf ; When this function returns, the carry flag indicates success vs failure.
Expand Down
17 changes: 6 additions & 11 deletions maps/PlayersHouse2F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,16 @@ if DEF(_DEBUG)
; givepokemove HEADBUTT, wPartyMon3, 2
; givepokemove WATERFALL, wPartyMon3, 3
; misc pokemon for testing
givepoke UNOWN, 50
givepoke UNOWN, UNOWN_D, 50
givepokemove FLY, wPartyMon1, 0
givepokemove MEGA_DRAIN, wPartyMon1, 1
givepokemove LEAF_BLADE, wPartyMon1, 2
givepokemove LEECH_SEED, wPartyMon1, 3
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke UNOWN, 50
givepoke WURMPLE, 50
givepoke WURMPLE, 50
givepoke WURMPLE, 50
givepoke WURMPLE, 50
givepoke WURMPLE, 50
; intro events
addcellnum PHONE_MOM
setmapscene PLAYERS_HOUSE_1F, $1
Expand Down

0 comments on commit 89eccde

Please sign in to comment.