Use NAME_LENGTH_JAPANESE more

This commit is contained in:
Remy Oukaour 2017-12-21 11:56:33 -05:00
parent 02609940db
commit d6dccb7df5
10 changed files with 24 additions and 24 deletions

View File

@ -107,7 +107,7 @@ Function170139: ; 170139
ld e, l
ld d, h
ld hl, PlayerName
ld bc, 5 ; Japanese name length
ld bc, NAME_LENGTH_JAPANESE - 1
call CopyBytes
ld bc, PlayerID
ld de, PlayerGender
@ -159,7 +159,7 @@ Function170139: ; 170139
ld a, $5
call GetSRAMBank
ld hl, $a894
ld bc, 6
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
ld hl, wMisc
ld de, $a948
@ -879,7 +879,7 @@ Function1704e1: ; 1704e1
ld de, wcd49
push bc
call PlaceString
ld de, 6
ld de, NAME_LENGTH_JAPANESE
add hl, de
pop bc
pop af
@ -1362,7 +1362,7 @@ BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e
jr nz, .not_egg
push hl
ld hl, PartyMonOT
ld de, $6 ; NAME_LENGTH
ld de, NAME_LENGTH_JAPANESE
ld a, b
and a
jr z, .skip
@ -1372,7 +1372,7 @@ BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e
jr nz, .loop2
.skip
ld de, String_1709a4
ld a, $6 ; NAME_LENGTH
ld a, NAME_LENGTH_JAPANESE
.compare_loop
push af
ld a, [de]

View File

@ -257,7 +257,7 @@ CopyMobileEZChatToC608: ; 11c156
sla c
rl b
add hl, bc
ld bc, 5 ; length of a string
ld bc, NAME_LENGTH_JAPANESE - 1
.copy_string
ld de, $c608
call CopyBytes
@ -3236,7 +3236,7 @@ EZChat_GetCategoryWordsByKana: ; 11d4aa
push hl
; skip to the attributes
ld hl, 5 ; length of a string
ld hl, NAME_LENGTH_JAPANESE - 1
add hl, de
; get the number of words in the category

View File

@ -381,7 +381,7 @@ Function89331: ; 89331
; Sets carry if it does not find a nonspace character.
; Returns the location of the following character in hl.
push bc
ld c, 5
ld c, NAME_LENGTH_JAPANESE - 1
.loop
ld a, [hli]
cp "@"
@ -410,12 +410,12 @@ Function89346: ; 89346 (22:5346)
jr _incave
Function8934a: ; 8934a
ld hl, 6
ld hl, NAME_LENGTH_JAPANESE
add hl, bc
_incave:
; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator. Sets carry if it does not find a nonspace character. Returns the location of the following character in hl.
push bc
ld c, 5
ld c, NAME_LENGTH_JAPANESE - 1
.loop
ld a, [hli]
cp "@"
@ -448,7 +448,7 @@ Function89363: ; 89363
._incave
push de
ld e, 6
ld e, NAME_LENGTH_JAPANESE
.loop
ld a, [hli]
cp -1
@ -2394,7 +2394,7 @@ Function89e9a: ; 89e9a (22:5e9a)
ld a, $5
ld [rSVBK], a
ld hl, Palette_89eb1
ld de, UnknBGPals + 5 palettes
ld de, UnknBGPals palette 5
ld bc, 1 palettes
call CopyBytes
pop af

View File

@ -2679,7 +2679,7 @@ LoadSelectedPartiesForColosseum: ; 1010f2
.CopyThreeSpecies: ; 101145
; Load the 3 choices to the buffer
push de
ld bc, StringBuffer2 + 6
ld bc, StringBuffer2 + NAME_LENGTH_JAPANESE
xor a
.party_loop
push af
@ -2695,7 +2695,7 @@ LoadSelectedPartiesForColosseum: ; 1010f2
ld a, 3
ld [de], a
inc de
ld hl, StringBuffer2 + 6
ld hl, StringBuffer2 + NAME_LENGTH_JAPANESE
ld bc, 3
call CopyBytes
ld a, $ff

View File

@ -947,7 +947,7 @@ MobileTradeAnim_GiveTrademon1: ; 108763
ld de, SFX_GIVE_TRADEMON
call PlaySFX
ld c, 40
ld hl, BGPals + 6 palettes
ld hl, BGPals palette 6
call Function1082f0
call Function108af4
.loop
@ -1179,7 +1179,7 @@ MobileTradeAnim_GetTrademon2: ; 108894
MobileTradeAnim_GetTrademon3: ; 10890a
ld c, 40
ld hl, BGPals + 6 palettes
ld hl, BGPals palette 6
call Function1082f0
call Function108af4
call GetMobileTradeAnimByte
@ -1718,7 +1718,7 @@ Function108c80: ; 108c80
; 108c9b
DebugMobileTrade: ; 108c9b
; localization error: NAME_LENGTH (11) should be 6 here
; localization error: NAME_LENGTH (11) should be NAME_LENGTH_JAPANESE (6) here
ld hl, .DebugTradeData
ld a, [hli]

View File

@ -1895,7 +1895,7 @@ Function114b55: ; 114b55
.asm_114b8c
pop hl
xor a
rept 6
rept NAME_LENGTH_JAPANESE
ld [hli], a
endr
jr .asm_114b82

View File

@ -523,12 +523,12 @@ Function116294: ; 116294
push af
ld a, $5
ld [rSVBK], a
ld hl, UnknBGPals + 8 * 6
ld hl, UnknBGPals palette 6
ld de, $c320
ld bc, 2 palettes
call CopyBytes
ld hl, Palette_11734e
ld de, UnknBGPals + 8 * 7
ld de, UnknBGPals palette 7
ld bc, 1 palettes
call CopyBytes
call SetPalettes

View File

@ -7103,7 +7103,7 @@ Mobile46_RunJumptable: ; 11b45c
Function11b483: ; 11b483
call .InitRAM
ld hl, PlayerName
ld a, $5 ; Japanese Name Length
ld a, NAME_LENGTH_JAPANESE - 1
.loop1
push af
ld a, [hli]

View File

@ -44,13 +44,13 @@ Function17005a: ; 17005a
ld [wOTTrademonSpecies], a
ld hl, $a827
ld de, wOTTrademonSenderName
ld bc, 5 ; Japanese Name Length
ld bc, NAME_LENGTH_JAPANESE - 1
call CopyBytes
ld a, "@"
ld [de], a
ld hl, $a85c
ld de, wOTTrademonOTName
ld bc, 5 ; Japanese Name Length
ld bc, NAME_LENGTH_JAPANESE - 1
call CopyBytes
ld a, "@"
ld [de], a

View File

@ -192,7 +192,7 @@ Function4a0c2: ; 4a0c2 (12:60c2)
call GetSRAMBank
ld hl, sPlayerData + PlayerName - wPlayerData
ld de, PlayerName
ld bc, 6 ; japanese name length
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
call CloseSRAM
callba _LoadData