From d6dccb7df57b4afa86483ed8c68dca605125fbdb Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 21 Dec 2017 11:56:33 -0500 Subject: [PATCH] Use NAME_LENGTH_JAPANESE more --- mobile/battle_tower_5c.asm | 10 +++++----- mobile/fixed_words.asm | 4 ++-- mobile/mobile_22.asm | 10 +++++----- mobile/mobile_40.asm | 4 ++-- mobile/mobile_42.asm | 6 +++--- mobile/mobile_45.asm | 2 +- mobile/mobile_45_sprite_engine.asm | 4 ++-- mobile/mobile_46.asm | 2 +- mobile/mobile_5c.asm | 4 ++-- mobile/mobile_menu.asm | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/mobile/battle_tower_5c.asm b/mobile/battle_tower_5c.asm index baa2e6159..85c7dcf31 100755 --- a/mobile/battle_tower_5c.asm +++ b/mobile/battle_tower_5c.asm @@ -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] diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index 56e53da91..d98470095 100755 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -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 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 08ba8cfd2..59a858bcd 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -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 diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index c476e4297..79cba8310 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -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 diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index b625d6bcf..98bbcf485 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -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] diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index d300a0373..6c581de87 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -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 diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index a85e7fce4..8493a3cf8 100755 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -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 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 986bf9509..19b255c34 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -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] diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm index f33ff7af4..3294cc3dc 100755 --- a/mobile/mobile_5c.asm +++ b/mobile/mobile_5c.asm @@ -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 diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm index 1bee0cced..6a4e6cf61 100755 --- a/mobile/mobile_menu.asm +++ b/mobile/mobile_menu.asm @@ -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