Document GetTMHMName locals

This was documented in pokegold apparently
This commit is contained in:
mid-kid 2020-02-19 19:28:50 +01:00
parent c22e268083
commit 345b585a78

View File

@ -125,10 +125,10 @@ GetPokemonName::
ld e, a ld e, a
ld h, 0 ld h, 0
ld l, a ld l, a
add hl, hl ; hl = hl * 2 add hl, hl
add hl, hl ; hl = hl * 4 add hl, hl
add hl, de ; hl = (hl*4) + de add hl, de
add hl, hl ; hl = (5*hl) + (5*hl) add hl, hl
ld de, PokemonNames ld de, PokemonNames
add hl, de add hl, de
@ -185,13 +185,13 @@ GetTMHMName::
ld hl, .HMText ld hl, .HMText
ld bc, .HMTextEnd - .HMText ld bc, .HMTextEnd - .HMText
jr .asm_34a1 jr .copy
.TM: .TM:
ld hl, .TMText ld hl, .TMText
ld bc, .TMTextEnd - .TMText ld bc, .TMTextEnd - .TMText
.asm_34a1 .copy
ld de, wStringBuffer1 ld de, wStringBuffer1
call CopyBytes call CopyBytes
@ -205,20 +205,20 @@ GetTMHMName::
; HM numbers start from 51, not 1 ; HM numbers start from 51, not 1
pop af pop af
ld a, c ld a, c
jr c, .asm_34b9 jr c, .not_hm
sub NUM_TMS sub NUM_TMS
.asm_34b9 .not_hm
; Divide and mod by 10 to get the top and bottom digits respectively ; Divide and mod by 10 to get the top and bottom digits respectively
ld b, "0" ld b, "0"
.mod10 .mod10
sub 10 sub 10
jr c, .asm_34c2 jr c, .done_mod
inc b inc b
jr .mod10 jr .mod10
.asm_34c2
add 10
.done_mod
add 10
push af push af
ld a, b ld a, b
ld [de], a ld [de], a