mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-07 08:35:23 +13:00
Add Unown ! and ?
Taken from https://github.com/pret/pokecrystal/wiki/Add-a-new-Unown-form There's some embedded palette errors that need fixing.
This commit is contained in:
parent
bd817d99f9
commit
6a44f96575
29 changed files with 93 additions and 18 deletions
|
|
@ -1,3 +1,5 @@
|
|||
; Modified to add ! and ?
|
||||
; Used https://github.com/pret/pokecrystal/wiki/Add-a-new-Unown-form
|
||||
GetUnownLetter:
|
||||
; Return Unown letter in wUnownLetter based on DVs at hl
|
||||
|
||||
|
|
@ -31,20 +33,25 @@ GetUnownLetter:
|
|||
srl a
|
||||
or b
|
||||
|
||||
; Divide by 10 to get 0-25
|
||||
; Divide by 9 to get 0-28 - changed to add ! and ?
|
||||
ldh [hDividend + 3], a
|
||||
xor a
|
||||
ldh [hDividend], a
|
||||
ldh [hDividend + 1], a
|
||||
ldh [hDividend + 2], a
|
||||
ld a, $ff / NUM_UNOWN + 1
|
||||
ld a, 9
|
||||
ldh [hDivisor], a
|
||||
ld b, 4
|
||||
call Divide
|
||||
|
||||
; Increment to get 1-26
|
||||
; Increment to get 1-29
|
||||
ldh a, [hQuotient + 3]
|
||||
inc a
|
||||
; The valid range is 1-28, so use UNOWN_E (5) instead of 29
|
||||
cp NUM_UNOWN + 1
|
||||
jr c, .valid
|
||||
ld a, UNOWN_E
|
||||
.valid
|
||||
ld [wUnownLetter], a
|
||||
ret
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue