diff --git a/asm/code_800F990.s b/asm/code_800F990.s index a510da1b9..d1f4e561d 100644 --- a/asm/code_800F990.s +++ b/asm/code_800F990.s @@ -1084,7 +1084,7 @@ sub_80101F8: adds r2, 0x50 adds r1, r3, 0 movs r3, 0 - bl CopyFormatString + bl FormatString b _08010220 .align 2, 0 _08010214: .4byte gUnknown_80D3EFC diff --git a/asm/dungeon_2.s b/asm/dungeon_2.s index a03cfca46..07c439874 100644 --- a/asm/dungeon_2.s +++ b/asm/dungeon_2.s @@ -103,7 +103,7 @@ _080903F2: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString b _08090430 .align 2, 0 _0809040C: .4byte gUnknown_8108F40 @@ -119,7 +119,7 @@ _0809041C: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString _08090430: adds r0, r7, 0 mov r1, sp @@ -158,7 +158,7 @@ _08090476: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -189,7 +189,7 @@ _080904BA: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -250,7 +250,7 @@ _08090536: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -332,7 +332,7 @@ _080905EA: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -432,7 +432,7 @@ _080906B6: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl CopyFormatString + bl FormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 diff --git a/include/string_format.h b/include/string_format.h index c274d8857..a360dba9b 100644 --- a/include/string_format.h +++ b/include/string_format.h @@ -57,7 +57,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me void sub_8014490(void); s32 sub_80144A4(s32 *a0); void DrawDialogueBoxString(void); -const u8 *CopyFormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags); +const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags); void PrintFormatStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr); void PrintFormatStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing); diff --git a/src/code_8015080.c b/src/code_8015080.c index 92a4214fd..1fa82dec3 100644 --- a/src/code_8015080.c +++ b/src/code_8015080.c @@ -64,7 +64,7 @@ bool8 sub_8015080(u8 *buffer, const MenuItem *menuItems) ResetUnusedInputStruct(); xxx_call_save_unk_text_struct_800641C(gUnknown_203B1F8->unk54, 1, 1); sub_80073B8(0); - CopyFormatString(buffer, gUnknown_203B1F8->buffer, gUnknown_203B1F8->buffer + 0x400, 0); + FormatString(buffer, gUnknown_203B1F8->buffer, gUnknown_203B1F8->buffer + 0x400, 0); PrintStringOnWindow(4, 4, gUnknown_203B1F8->buffer, 0, 0); sub_80073E0(0); sub_8012D60(&gUnknown_203B1F8->unk4, menuItems, 0, 0, -1, 2); diff --git a/src/code_801D014.c b/src/code_801D014.c index 2bfa19c5a..ca52641b0 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -579,7 +579,7 @@ static void sub_801D894(void) location = GetFriendAreaName(sUnknown_203B250->currFriendAreaLocation); // TODO this is def a hack - CopyFormatString(location, buffer, (u8 *)(&preload_string + 1), 0); + FormatString(location, buffer, (u8 *)(&preload_string + 1), 0); location_length = sub_8008ED0(buffer); x_coord = (128 - location_length) / 2; // Centers the location name CallPrepareTextbox_8008C54(1); diff --git a/src/code_809447C.c b/src/code_809447C.c index 3dfa346fa..e7b8a5b15 100644 --- a/src/code_809447C.c +++ b/src/code_809447C.c @@ -58,7 +58,7 @@ static void sub_80944BC(s16 moveID, u8 *buffer) moveID_u16 = moveID_s32; sub_8092AA8(&move, moveID_u16); sub_80928C0(gFormatBuffer_Items[0], &move, NULL); - CopyFormatString(*gUnknown_811383C, buffer, buffer + 200, 0); // $m0's $i0 + FormatString(*gUnknown_811383C, buffer, buffer + 200, 0); // $m0's $i0 } else { strncpy(buffer, gUnknown_8113080[moveID - 0x1F4].text, 200); } @@ -91,11 +91,11 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3) sub_80922B4(gFormatBuffer_Monsters[1], param_3->buffer2, POKEMON_NAME_LENGTH); if (sub_8094528(param_3->moveID) != 0) { // $m1 was defeated by - CopyFormatString(*gUnknown_8113868,buffer, buffer + sizeof(buffer),0); + FormatString(*gUnknown_8113868,buffer, buffer + sizeof(buffer),0); } else { // $m1 - CopyFormatString(*gUnknown_8113870,buffer, buffer + sizeof(buffer),0); + FormatString(*gUnknown_8113870,buffer, buffer + sizeof(buffer),0); } x = (0xb0 - sub_8008ED0(buffer)) / 2; diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 470ff08c8..13effc1d7 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -220,7 +220,7 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2) break; gDungeon->unk1BDD4.unk1C054[gDungeon->unk1BDD4.unk1C060] = r7; - str = CopyFormatString(str, txt, txt + 62, 128); + str = FormatString(str, txt, txt + 62, 128); if (*str == '\r') str++; if (*str == '\n') str++; CopyStringToMessageLog(txt, r7, r8); diff --git a/src/load_screen.c b/src/load_screen.c index 20ee55587..2e20aa6f3 100644 --- a/src/load_screen.c +++ b/src/load_screen.c @@ -312,7 +312,7 @@ void DrawLoadScreenText(void) { default: sprintfStatic(auStack356,gUnknown_80E7804,sub_8098FB4()); - CopyFormatString(auStack356,gLoadScreen->formattedLocation,gLoadScreen->formattedPlayTime,0); + FormatString(auStack356,gLoadScreen->formattedLocation,gLoadScreen->formattedPlayTime,0); break; case 0x7: case 0xB: diff --git a/src/string_format.c b/src/string_format.c index 53b6559b1..5375d8b1a 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -218,7 +218,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me { bool8 portraitOn = FALSE; - CopyFormatString(text, sDialogueTextBuffer, sDialogueTextBuffer + DIALOGUE_TEXT_BUFFER_SIZE - 1, flags); + FormatString(text, sDialogueTextBuffer, sDialogueTextBuffer + DIALOGUE_TEXT_BUFFER_SIZE - 1, flags); gUnknown_202E794 = sDialogueTextBuffer; gUnknown_202E748.unk24 = a1; gUnknown_202EC10 = a5; @@ -634,7 +634,7 @@ static void sub_8014A88(void) break; r5 += 12;; - CopyFormatString(menuItem->text, text, text + sizeof(text), 0); + FormatString(menuItem->text, text, text + sizeof(text), 0); val = sub_8008ED0(text); if (r7 < val) { r7 = val; @@ -683,7 +683,7 @@ static void UNUSED nullsub_35(void) { } -const u8 *CopyFormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) +const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) { u8 txtArray[60]; bool8 r10 = TRUE; @@ -874,7 +874,7 @@ void PrintFormatStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 te { u8 formatString[FORMAT_STR_MAX_LEN]; - CopyFormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); + FormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); formatString[FORMAT_STR_MAX_LEN - 1] = '\0'; PrintStringOnWindow(x, y, formatString, windowId, terminatingChr); } @@ -883,7 +883,7 @@ void PrintFormatStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 t { u8 formatString[FORMAT_STR_MAX_LEN]; - CopyFormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); + FormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); formatString[FORMAT_STR_MAX_LEN - 1] = '\0'; PrintStringOnWindow2(x, y, formatString, windowId, terminatingChr, lineSpacing); }