From 9968f7fbf86dab1b2da4120573d30e923afed53e Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Tue, 24 Nov 2015 11:59:32 -0800 Subject: [PATCH] update disasm --- asm/emerald.s | 6413 +++++++++++++++++++++++++------------------------ asm/gpu_obj.s | 16 +- asm/window.s | 2 +- 3 files changed, 3261 insertions(+), 3170 deletions(-) diff --git a/asm/emerald.s b/asm/emerald.s index 566158231..d469e78f4 100644 --- a/asm/emerald.s +++ b/asm/emerald.s @@ -22,8 +22,9 @@ Start: .include "asm/text_renderer.s" .include "asm/gpu_obj.s" - thumb_func_start strcpy_limit_10_chars -strcpy_limit_10_chars: ; 8008B10 + thumb_func_start CopyString_Limit10 +; u8 *CopyString_Limit10(u8 *dest, u8 *src) +CopyString_Limit10: ; 8008B10 push {r4,r5,lr} adds r4, r0, 0 movs r5, 0xA @@ -52,10 +53,11 @@ strcpy_limit_10_chars: ; 8008B10 pop {r4,r5} pop {r1} bx r1 - thumb_func_end strcpy_limit_10_chars + thumb_func_end CopyString_Limit10 - thumb_func_start get_end_of_string_ptr_limit_10_chars -get_end_of_string_ptr_limit_10_chars: ; 8008B44 + thumb_func_start GetStringEnd_Limit7 +; u8 *GetStringEnd_Limit7(u8 *s) +GetStringEnd_Limit7: ; 8008B44 push {r4,lr} adds r3, r0, 0 movs r4, 0xA @@ -80,10 +82,11 @@ get_end_of_string_ptr_limit_10_chars: ; 8008B44 pop {r4} pop {r1} bx r1 - thumb_func_end get_end_of_string_ptr_limit_10_chars + thumb_func_end GetStringEnd_Limit7 - thumb_func_start strcpy_limit_7_chars -strcpy_limit_7_chars: ; 8008B70 + thumb_func_start CopyString_Limit7 +; u8 *CopyString_Limit7(u8 *dest, u8 *src) +CopyString_Limit7: ; 8008B70 push {r4,r5,lr} adds r4, r0, 0 movs r5, 0x7 @@ -110,10 +113,11 @@ strcpy_limit_7_chars: ; 8008B70 pop {r4,r5} pop {r1} bx r1 - thumb_func_end strcpy_limit_7_chars + thumb_func_end CopyString_Limit7 - thumb_func_start gf_strcpy -gf_strcpy: ; 8008BA0 + thumb_func_start CopyString +; u8 *CopyString(u8 *dest, u8 *src) +CopyString: ; 8008BA0 push {lr} adds r3, r0, 0 b @08008BAC @@ -131,10 +135,11 @@ gf_strcpy: ; 8008BA0 adds r0, r3, 0 pop {r1} bx r1 - thumb_func_end gf_strcpy + thumb_func_end CopyString - thumb_func_start gf_strcat -gf_strcat: ; 8008BC0 + thumb_func_start AppendString +; u8 *AppendString(u8 *dest, u8 *src) +AppendString: ; 8008BC0 push {lr} adds r2, r0, 0 b @08008BC8 @@ -145,13 +150,14 @@ gf_strcat: ; 8008BC0 cmp r0, 0xFF bne @08008BC6 adds r0, r2, 0 - bl gf_strcpy + bl CopyString pop {r1} bx r1 - thumb_func_end gf_strcat + thumb_func_end AppendString - thumb_func_start gf_strncpy -gf_strncpy: ; 8008BD8 + thumb_func_start CopyString_LimitN +; u8 *CopyString_LimitN(u8 *dest, u8 *src, u8 n) +CopyString_LimitN: ; 8008BD8 push {r4-r6,lr} adds r4, r0, 0 adds r6, r1, 0 @@ -177,10 +183,11 @@ gf_strncpy: ; 8008BD8 pop {r4-r6} pop {r1} bx r1 - thumb_func_end gf_strncpy + thumb_func_end CopyString_LimitN - thumb_func_start sub_8008C08 -sub_8008C08: ; 8008C08 + thumb_func_start AppendString_LimitN +; u8 *AppendString_LimitN(u8 *dest, u8 *src, u8 n) +AppendString_LimitN: ; 8008C08 push {lr} adds r3, r0, 0 lsls r2, 24 @@ -193,13 +200,14 @@ sub_8008C08: ; 8008C08 cmp r0, 0xFF bne @08008C12 adds r0, r3, 0 - bl gf_strncpy + bl CopyString_LimitN pop {r1} bx r1 - thumb_func_end sub_8008C08 + thumb_func_end AppendString_LimitN - thumb_func_start sub_8008C24 -sub_8008C24: ; 8008C24 + thumb_func_start GetStringLength +; u16 GetStringLength(u8 *s) +GetStringLength: ; 8008C24 push {lr} adds r2, r0, 0 movs r1, 0 @@ -218,10 +226,11 @@ sub_8008C24: ; 8008C24 adds r0, r1, 0 pop {r1} bx r1 - thumb_func_end sub_8008C24 + thumb_func_end GetStringLength - thumb_func_start sub_8008C44 -sub_8008C44: ; 8008C44 + thumb_func_start CompareString +; u8 CompareString(u8 *s1, u8 *s2) +CompareString: ; 8008C44 push {lr} adds r2, r0, 0 b @08008C56 @@ -244,10 +253,11 @@ sub_8008C44: ; 8008C44 @08008C64: pop {r1} bx r1 - thumb_func_end sub_8008C44 + thumb_func_end CompareString - thumb_func_start sub_8008C68 -sub_8008C68: ; 8008C68 + thumb_func_start StringCompare_LimitN +; u8 StringCompare_LimitN(u8 *s1, u8 *s2, u32 n) +StringCompare_LimitN: ; 8008C68 push {r4,lr} adds r3, r0, 0 b @08008C80 @@ -274,10 +284,11 @@ sub_8008C68: ; 8008C68 pop {r4} pop {r1} bx r1 - thumb_func_end sub_8008C68 + thumb_func_end StringCompare_LimitN - thumb_func_start sub_8008C94 -sub_8008C94: ; 8008C94 + thumb_func_start IsStringLengthLessThanN +; BOOL IsStringLengthLessThanN(u8 *s, s32 n) +IsStringLengthLessThanN: ; 8008C94 push {lr} adds r3, r0, 0 movs r2, 0 @@ -303,11 +314,11 @@ sub_8008C94: ; 8008C94 @08008CBA: pop {r1} bx r1 - thumb_func_end sub_8008C94 + thumb_func_end IsStringLengthLessThanN - thumb_func_start decimal_int_to_string -; int decimal_int_to_string(char *dest, int decimal_num, int mode, int max_digits) -decimal_int_to_string: ; 8008CC0 + thumb_func_start ConvertIntToDecimalString +; u8 *ConvertIntToDecimalString(u8 *dest, s32 value, u8 mode, u8 numDigits) +ConvertIntToDecimalString: ; 8008CC0 push {r4-r7,lr} mov r7, r8 push {r7} @@ -403,10 +414,11 @@ decimal_int_to_string: ; 8008CC0 pop {r4-r7} pop {r1} bx r1 - thumb_func_end decimal_int_to_string + thumb_func_end ConvertIntToDecimalString - thumb_func_start sub_8008D70 -sub_8008D70: ; 8008D70 + thumb_func_start ConvertUnsignedIntToDecimalString +; u8 *ConvertUnsignedIntToDecimalString(u8 *dest, u32 value, u8 mode, u8 numDigits) +ConvertUnsignedIntToDecimalString: ; 8008D70 push {r4-r7,lr} mov r7, r8 push {r7} @@ -502,10 +514,11 @@ sub_8008D70: ; 8008D70 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_8008D70 + thumb_func_end ConvertUnsignedIntToDecimalString - thumb_func_start sub_8008E20 -sub_8008E20: ; 8008E20 + thumb_func_start ConvertIntToHexString +; u8 *ConvertIntToHexString(u8 *dest, s32 value, u8 mode, u8 numDigits) +ConvertIntToHexString: ; 8008E20 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -612,11 +625,11 @@ sub_8008E20: ; 8008E20 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_8008E20 + thumb_func_end ConvertIntToHexString - thumb_func_start ExpandTextCodes -; char *ExpandTextCodes(char *dest, char *src) -ExpandTextCodes: ; 8008EE0 + thumb_func_start ExpandStringRefs +; u8 *ExpandStringRefs(u8 *dest, u8 *src) +ExpandStringRefs: ; 8008EE0 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -645,10 +658,10 @@ ExpandTextCodes: ; 8008EE0 @08008F18: ldrb r0, [r5] adds r5, 0x1 - bl get_fcode_buffer + bl GetExpandedStringRef adds r1, r0, 0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r4, r0, 0 b @08008EE6 @08008F2C: @@ -718,9 +731,10 @@ ExpandTextCodes: ; 8008EE0 pop {r4,r5} pop {r1} bx r1 - thumb_func_end ExpandTextCodes + thumb_func_end ExpandStringRefs thumb_func_start sub_8008FCC +; u8 *sub_8008FCC(u8 *dest, u8 *src) sub_8008FCC: ; 8008FCC push {r4-r6,lr} sub sp, 0xC @@ -738,7 +752,7 @@ sub_8008FCC: ; 8008FCC adds r0, r5, 0 mov r1, sp @08008FEE: - bl gf_strcpy + bl CopyString adds r5, r0, 0 @08008FF4: ldrb r0, [r6] @@ -770,49 +784,55 @@ sub_8008FCC: ; 8008FCC bx r1 thumb_func_end sub_8008FCC - thumb_func_start sub_800902C -sub_800902C: ; 800902C + thumb_func_start StringRef_GetPossiblyUnusedStringVar +; u8 *StringRef_GetPossiblyUnusedStringVar() +StringRef_GetPossiblyUnusedStringVar: ; 800902C ldr r0, =0x020223ac bx lr .align 2, 0 .pool - thumb_func_end sub_800902C + thumb_func_end StringRef_GetPossiblyUnusedStringVar - thumb_func_start sub_8009034 -sub_8009034: ; 8009034 + thumb_func_start StringRef_GetPlayerName +; u8 *StringRef_GetPlayerName() +StringRef_GetPlayerName: ; 8009034 ldr r0, =0x03005d90 ldr r0, [r0] bx lr .align 2, 0 .pool - thumb_func_end sub_8009034 + thumb_func_end StringRef_GetPlayerName - thumb_func_start sub_8009040 -sub_8009040: ; 8009040 + thumb_func_start StringRef_GetStringVar1 +; u8 *StringRef_GetStringVar1() +StringRef_GetStringVar1: ; 8009040 ldr r0, =0x02021cc4 bx lr .align 2, 0 .pool - thumb_func_end sub_8009040 + thumb_func_end StringRef_GetStringVar1 - thumb_func_start sub_8009048 -sub_8009048: ; 8009048 + thumb_func_start StringRef_GetStringVar2 +; u8 *StringRef_GetStringVar2() +StringRef_GetStringVar2: ; 8009048 ldr r0, =0x02021dc4 bx lr .align 2, 0 .pool - thumb_func_end sub_8009048 + thumb_func_end StringRef_GetStringVar2 - thumb_func_start sub_8009050 -sub_8009050: ; 8009050 + thumb_func_start StringRef_GetStringVar3 +; u8 *StringRef_GetStringVar3() +StringRef_GetStringVar3: ; 8009050 ldr r0, =0x02021ec4 bx lr .align 2, 0 .pool - thumb_func_end sub_8009050 + thumb_func_end StringRef_GetStringVar3 - thumb_func_start sub_8009058 -sub_8009058: ; 8009058 + thumb_func_start StringRef_GetDummiedOutGenderDependentString +; u8 *StringRef_GetDummiedOutGenderDependentString() +StringRef_GetDummiedOutGenderDependentString: ; 8009058 push {lr} ldr r0, =0x03005d90 ldr r0, [r0] @@ -830,10 +850,11 @@ sub_8009058: ; 8009058 bx r1 .align 2, 0 .pool - thumb_func_end sub_8009058 + thumb_func_end StringRef_GetDummiedOutGenderDependentString - thumb_func_start sub_800907C -sub_800907C: ; 800907C + thumb_func_start StringRef_GetRivalName +; u8 *StringRef_GetRivalName() +StringRef_GetRivalName: ; 800907C push {lr} ldr r0, =0x03005d90 ldr r0, [r0] @@ -851,66 +872,74 @@ sub_800907C: ; 800907C bx r1 .align 2, 0 .pool - thumb_func_end sub_800907C + thumb_func_end StringRef_GetRivalName - thumb_func_start sub_80090A0 -sub_80090A0: ; 80090A0 + thumb_func_start StringRef_GetEmeraldString +; u8 *StringRef_GetEmeraldString() +StringRef_GetEmeraldString: ; 80090A0 ldr r0, =gUnknown_085E8229 bx lr .align 2, 0 .pool - thumb_func_end sub_80090A0 + thumb_func_end StringRef_GetEmeraldString - thumb_func_start sub_80090A8 -sub_80090A8: ; 80090A8 + thumb_func_start StringRef_GetAquaString +; u8 *StringRef_GetAquaString() +StringRef_GetAquaString: ; 80090A8 ldr r0, =gUnknown_085E8231 bx lr .align 2, 0 .pool - thumb_func_end sub_80090A8 + thumb_func_end StringRef_GetAquaString - thumb_func_start sub_80090B0 -sub_80090B0: ; 80090B0 + thumb_func_start StringRef_GetMagmaString +; u8 *StringRef_GetMagmaString() +StringRef_GetMagmaString: ; 80090B0 ldr r0, =gUnknown_085E8236 bx lr .align 2, 0 .pool - thumb_func_end sub_80090B0 + thumb_func_end StringRef_GetMagmaString - thumb_func_start sub_80090B8 -sub_80090B8: ; 80090B8 + thumb_func_start StringRef_GetArchieString +; u8 *StringRef_GetArchieString() +StringRef_GetArchieString: ; 80090B8 ldr r0, =gUnknown_085E823C bx lr .align 2, 0 .pool - thumb_func_end sub_80090B8 + thumb_func_end StringRef_GetArchieString - thumb_func_start sub_80090C0 -sub_80090C0: ; 80090C0 + thumb_func_start StringRef_GetMaxieString +; u8 *StringRef_GetMaxieString() +StringRef_GetMaxieString: ; 80090C0 ldr r0, =gUnknown_085E8243 bx lr .align 2, 0 .pool - thumb_func_end sub_80090C0 + thumb_func_end StringRef_GetMaxieString - thumb_func_start sub_80090C8 -sub_80090C8: ; 80090C8 + thumb_func_start StringRef_GetKyogreString +; u8 *StringRef_GetKyogreString() +StringRef_GetKyogreString: ; 80090C8 ldr r0, =gUnknown_085E8249 bx lr .align 2, 0 .pool - thumb_func_end sub_80090C8 + thumb_func_end StringRef_GetKyogreString - thumb_func_start sub_80090D0 -sub_80090D0: ; 80090D0 + thumb_func_start StringRef_GetGroudonString +; u8 *StringRef_GetGroudonString() +StringRef_GetGroudonString: ; 80090D0 ldr r0, =gUnknown_085E8250 bx lr .align 2, 0 .pool - thumb_func_end sub_80090D0 + thumb_func_end StringRef_GetGroudonString - thumb_func_start get_fcode_buffer -get_fcode_buffer: ; 80090D8 + thumb_func_start GetExpandedStringRef +; u8 *GetExpandedStringRef(u8 code) +GetExpandedStringRef: ; 80090D8 push {lr} cmp r0, 0xD bhi @080090F0 @@ -929,10 +958,10 @@ get_fcode_buffer: ; 80090D8 bx r1 .align 2, 0 .pool - thumb_func_end get_fcode_buffer + thumb_func_end GetExpandedStringRef thumb_func_start RepeatChar -; int RepeatChar(char *dest, char c, u16 length) +; u8 *RepeatChar(u8 *dest, u8 c, u16 n) RepeatChar: ; 80090FC push {lr} adds r3, r0, 0 @@ -959,8 +988,9 @@ RepeatChar: ; 80090FC bx r1 thumb_func_end RepeatChar - thumb_func_start sub_8009128 -sub_8009128: ; 8009128 + thumb_func_start CopyStringPadded +; u8 *CopyStringPadded(u8 *dest, u8 *src, u8 c, u16 n) +CopyStringPadded: ; 8009128 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -1007,10 +1037,11 @@ sub_8009128: ; 8009128 bx r1 .align 2, 0 .pool - thumb_func_end sub_8009128 + thumb_func_end CopyStringPadded - thumb_func_start sub_800917C -sub_800917C: ; 800917C + thumb_func_start RepeatStringTerminator +; u8 *RepeatStringTerminator(u8 *dest, u16 n) +RepeatStringTerminator: ; 800917C push {lr} lsls r2, r1, 16 lsrs r2, 16 @@ -1018,10 +1049,11 @@ sub_800917C: ; 800917C bl RepeatChar pop {r1} bx r1 - thumb_func_end sub_800917C + thumb_func_end RepeatStringTerminator - thumb_func_start sub_800918C -sub_800918C: ; 800918C + thumb_func_start StringCopy_LimitN_Multibyte +; u8 *StringCopy_LimitN_Multibyte(u8 *dest, u8 *src, u32 n) +StringCopy_LimitN_Multibyte: ; 800918C push {r4,r5,lr} adds r4, r0, 0 adds r3, r1, 0 @@ -1057,10 +1089,11 @@ sub_800918C: ; 800918C pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_800918C + thumb_func_end StringCopy_LimitN_Multibyte - thumb_func_start sub_80091CC -sub_80091CC: ; 80091CC + thumb_func_start GetStringLength_Multibyte +; u32 GetStringLength_Multibyte(u8 *s) +GetStringLength_Multibyte: ; 80091CC push {lr} adds r2, r0, 0 movs r3, 0 @@ -1080,10 +1113,11 @@ sub_80091CC: ; 80091CC adds r0, r3, 0 pop {r1} bx r1 - thumb_func_end sub_80091CC + thumb_func_end GetStringLength_Multibyte - thumb_func_start sub_80091EC -sub_80091EC: ; 80091EC + thumb_func_start WriteColorChangeControlCode +; u8 *WriteColorChangeControlCode(u8 *dest, u8 colorType, u8 color) +WriteColorChangeControlCode: ; 80091EC push {lr} adds r3, r0, 0 lsls r2, 24 @@ -1118,9 +1152,10 @@ sub_80091EC: ; 80091EC adds r0, r3, 0 pop {r1} bx r1 - thumb_func_end sub_80091EC + thumb_func_end WriteColorChangeControlCode thumb_func_start sub_8009228 +; BOOL sub_8009228(u8 *s) sub_8009228: ; 8009228 push {lr} adds r2, r0, 0 @@ -1147,6 +1182,7 @@ sub_8009228: ; 8009228 thumb_func_end sub_8009228 thumb_func_start sub_800924C +; BOOL sub_800924C(u8 *s, u32 n) sub_800924C: ; 800924C push {r4,lr} adds r3, r0, 0 @@ -1179,8 +1215,9 @@ sub_800924C: ; 800924C bx r1 thumb_func_end sub_800924C - thumb_func_start sub_800927C -sub_800927C: ; 800927C + thumb_func_start GetExtendedControlCodeLength +; u8 GetExtendedControlCodeLength(u8 command) +GetExtendedControlCodeLength: ; 800927C push {lr} lsls r0, 24 lsrs r1, r0, 24 @@ -1195,17 +1232,18 @@ sub_800927C: ; 800927C bx r1 .align 2, 0 .pool - thumb_func_end sub_800927C + thumb_func_end GetExtendedControlCodeLength - thumb_func_start sub_8009298 -sub_8009298: ; 8009298 + thumb_func_start SkipExtendedControlCode +; u8 *SkipExtendedControlCode(u8 *s) +SkipExtendedControlCode: ; 8009298 push {r4,lr} adds r4, r0, 0 b @080092AC @0800929E: adds r4, 0x1 ldrb r0, [r4] - bl sub_800927C + bl GetExtendedControlCodeLength lsls r0, 24 lsrs r0, 24 adds r4, r0 @@ -1217,10 +1255,11 @@ sub_8009298: ; 8009298 pop {r4} pop {r1} bx r1 - thumb_func_end sub_8009298 + thumb_func_end SkipExtendedControlCode - thumb_func_start sub_80092BC -sub_80092BC: ; 80092BC + thumb_func_start CompareStringWithoutExtendedControlCodes +; u8 CompareStringWithoutExtendedControlCodes(u8 *s1, u8 *s2) +CompareStringWithoutExtendedControlCodes: ; 80092BC push {r4-r6,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -1242,10 +1281,10 @@ sub_80092BC: ; 80092BC adds r5, 0x1 @080092DE: adds r0, r4, 0 - bl sub_8009298 + bl SkipExtendedControlCode adds r4, r0, 0 adds r0, r5, 0 - bl sub_8009298 + bl SkipExtendedControlCode adds r5, r0, 0 ldrb r1, [r4] ldrb r0, [r5] @@ -1260,19 +1299,20 @@ sub_80092BC: ; 80092BC pop {r4-r6} pop {r1} bx r1 - thumb_func_end sub_80092BC + thumb_func_end CompareStringWithoutExtendedControlCodes - thumb_func_start sub_8009308 -sub_8009308: ; 8009308 + thumb_func_start StopMusicWhileStringIsPrinted +; void StopMusicWhileStringIsPrinted(u8 *s, BOOL stopMusic) +StopMusicWhileStringIsPrinted: ; 8009308 push {r4,lr} adds r4, r0, 0 lsls r1, 24 lsrs r1, 24 cmp r1, 0x1 bne @08009368 - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 24 lsrs r2, r0, 24 adds r1, r2, 0 @@ -1316,10 +1356,11 @@ sub_8009308: ; 8009308 pop {r4} pop {r0} bx r0 - thumb_func_end sub_8009308 + thumb_func_end StopMusicWhileStringIsPrinted - thumb_func_start sub_8009370 -sub_8009370: ; 8009370 + thumb_func_start StripExtendedControlCodes +; void StripExtendedControlCodes(u8 *s) +StripExtendedControlCodes: ; 8009370 push {r4-r6,lr} adds r5, r0, 0 movs r4, 0 @@ -1337,7 +1378,7 @@ sub_8009370: ; 8009370 lsrs r4, r0, 16 adds r0, r5, r4 ldrb r0, [r0] - bl sub_800927C + bl GetExtendedControlCodeLength lsls r0, 24 lsrs r0, 24 adds r0, r4, r0 @@ -1369,7 +1410,7 @@ sub_8009370: ; 8009370 pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_8009370 + thumb_func_end StripExtendedControlCodes thumb_func_start sub_80093CC sub_80093CC: ; 80093CC @@ -1658,7 +1699,7 @@ sub_8009638: ; 8009638 str r2, [r5, 0x4] adds r0, r5, 0 adds r0, 0x8 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldrb r0, [r0, 0x8] strb r0, [r5, 0x13] @@ -1681,7 +1722,7 @@ sub_8009638: ; 8009638 bl sub_809D42C strb r0, [r5, 0x10] ldr r0, =0x0000087f - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0800969E @@ -4355,7 +4396,7 @@ sub_800AB18: ; 800AB18 mov r1, r8 adds r0, r2, r1 adds r1, r2, r7 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @0800AB6A @0800AB5A: @@ -5522,7 +5563,7 @@ sub_800B524: ; 800B524 adds r2, 0x8 ldrb r1, [r0, 0x1A] adds r0, r2, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r0} bx r0 thumb_func_end sub_800B524 @@ -10885,7 +10926,7 @@ sub_800DD94: ; 800DD94 ands r1, r0 strb r1, [r7] ldr r0, =0x0000087f - bl flag_check + bl FlagGet lsls r0, 7 ldrb r1, [r7] ands r4, r1 @@ -10898,7 +10939,7 @@ sub_800DD94: ; 800DD94 orrs r5, r0 strb r5, [r7, 0x1] ldr r0, =0x00000864 - bl flag_check + bl FlagGet ands r6, r0 lsls r6, 1 ldrb r1, [r7, 0x1] @@ -11528,7 +11569,7 @@ sub_800E378: ; 800E378 push {lr} stm r0!, {r1} adds r1, r2, 0 - bl gf_strcpy + bl CopyString pop {r0} bx r0 thumb_func_end sub_800E378 @@ -11614,7 +11655,7 @@ sub_800E3A8: ; 800E3A8 ldr r0, [sp, 0x1C] add r0, r10 str r3, [sp, 0x18] - bl sub_8008C44 + bl CompareString ldr r3, [sp, 0x18] cmp r0, 0 bne @0800E428 @@ -11772,7 +11813,7 @@ sub_800E540: ; 800E540 adds r0, r4 adds r0, 0x4 mov r1, r9 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @0800E584 ldr r0, [r6] @@ -16972,7 +17013,7 @@ sub_8010F48: ; 8010F48 ldr r0, =0x02022b22 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -18720,7 +18761,7 @@ sub_8011CE4: ; 8011CE4 adds r1, r5 adds r1, 0x15 ldr r0, [sp] - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @08011D4C cmp r10, r6 @@ -19063,7 +19104,7 @@ sub_8011FC8: ; 8011FC8 adds r4, r0 adds r0, r4, 0 adds r1, r6, 0 - bl gf_strcpy + bl CopyString strh r5, [r4, 0x10] pop {r4-r6} pop {r0} @@ -19271,7 +19312,7 @@ sub_8012188: ; 8012188 ldr r1, =0x00000119 adds r0, r6, r1 adds r1, r3, 0 - bl gf_strcpy + bl CopyString movs r1, 0x85 lsls r1, 1 adds r0, r6, r1 @@ -19804,7 +19845,7 @@ sub_80125BC: ; 80125BC bl sub_80173E0 ldr r1, =gUnknown_082ED8CC add r0, sp, 0x8 - bl gf_strcpy + bl CopyString adds r5, r0, 0 ldr r0, [r6] adds r0, 0xA @@ -19815,7 +19856,7 @@ sub_80125BC: ; 80125BC adds r0, r5, 0 movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x11 str r0, [sp] mov r0, r8 @@ -19883,7 +19924,7 @@ sub_801262C: ; 801262C @080126B8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_082ED960 - bl ExpandTextCodes + bl ExpandStringRefs @080126C0: pop {r0} bx r0 @@ -20196,7 +20237,7 @@ sub_8012780: ; 8012780 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022c2d ldrb r2, [r0] lsrs r0, r2, 4 @@ -20212,14 +20253,14 @@ sub_8012780: ; 8012780 beq @08012A18 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082ED990 - bl ExpandTextCodes + bl ExpandStringRefs b @08012A34 .align 2, 0 .pool @08012A18: ldr r0, =0x02021fc4 ldr r1, =gUnknown_082ED960 - bl ExpandTextCodes + bl ExpandStringRefs b @08012A34 .align 2, 0 .pool @@ -20559,7 +20600,7 @@ sub_8012780: ; 8012780 bl sub_8018404 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EDC9C - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0xD strb r0, [r6, 0xC] @08012CE0: @@ -20973,14 +21014,14 @@ sub_8012FC4: ; 8012FC4 ldr r1, =gUnknown_082EDC0C @0801305A: adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @08013070 .align 2, 0 .pool @08013068: ldr r1, =gUnknown_082EDC34 adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08013070: pop {r0} bx r0 @@ -21009,13 +21050,13 @@ sub_8013078: ; 8013078 b @080130AA @08013098: ldr r1, =gUnknown_082EE560 - bl ExpandTextCodes + bl ExpandStringRefs b @080130AA .align 2, 0 .pool @080130A4: ldr r1, =gUnknown_082EE57C - bl ExpandTextCodes + bl ExpandStringRefs @080130AA: pop {r0} bx r0 @@ -21072,14 +21113,14 @@ sub_80130B4: ; 80130B4 @08013140: ldr r1, =gUnknown_082EFC3C adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @08013158 .align 2, 0 .pool @08013150: ldr r1, =gUnknown_082EFC54 adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08013158: pop {r0} bx r0 @@ -21136,14 +21177,14 @@ sub_8013160: ; 8013160 @080131EC: ldr r1, =gUnknown_082EDDF4 adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @08013204 .align 2, 0 .pool @080131FC: ldr r1, =gUnknown_082EDE0C adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08013204: pop {r0} bx r0 @@ -21772,7 +21813,7 @@ sub_80134E8: ; 80134E8 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r0, 0x12 @08013756: strb r0, [r6, 0x8] @@ -21957,10 +21998,10 @@ sub_80134E8: ; 80134E8 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_082EDE48 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @080139EC .align 2, 0 .pool @@ -23097,7 +23138,7 @@ sub_8014290: ; 8014290 lsrs r5, 16 ldr r0, =0x00004087 adds r1, r3, 0 - bl var_set + bl VarSet ldr r6, =0x03005d8c ldr r1, [r6] movs r0, 0x4 @@ -23156,7 +23197,7 @@ sub_8014304: ; 8014304 ldr r0, =0x020375e0 strh r1, [r0] ldr r0, =0x00004087 - bl var_set + bl VarSet bl sub_8009FCC ldr r1, =0x03005db8 strb r0, [r1] @@ -24023,7 +24064,7 @@ sub_8014A40: ; 8014A40 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02021fc4 ldrb r1, [r4] bl sub_801262C @@ -24202,7 +24243,7 @@ sub_8014A40: ; 8014A40 bl sub_8018404 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EDC9C - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x9 strb r0, [r5, 0xC] bl sub_800EF38 @@ -25233,7 +25274,7 @@ sub_8015664: ; 8015664 cmp r3, r0 beq @0801567E adds r1, r3, 0 - bl ExpandTextCodes + bl ExpandStringRefs @0801567E: pop {r0} bx r0 @@ -25253,7 +25294,7 @@ sub_801568C: ; 801568C cmp r2, r0 beq @080156A4 adds r1, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs @080156A4: pop {r0} bx r0 @@ -25572,7 +25613,7 @@ sub_80156E0: ; 80156E0 ldr r0, =0x02021cc4 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r1, 0 movs r0, 0x2A b @08015A02 @@ -25643,7 +25684,7 @@ sub_80156E0: ; 80156E0 ldr r0, =0x02021cc4 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r0, 0x2D bl @08016876 .align 2, 0 @@ -25902,7 +25943,7 @@ sub_80156E0: ; 80156E0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r0, 0x20 bl @08016876 .align 2, 0 @@ -25942,7 +25983,7 @@ sub_80156E0: ; 80156E0 @08015D34: ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EEB88 - bl gf_strcpy + bl CopyString movs r0, 0x24 bl @08016876 .align 2, 0 @@ -26012,7 +26053,7 @@ sub_80156E0: ; 80156E0 bne @08015DF4 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EEB88 - bl gf_strcpy + bl CopyString movs r0, 0x1C bl @08016876 .align 2, 0 @@ -26129,7 +26170,7 @@ sub_80156E0: ; 80156E0 ldr r4, =0x020229f0 adds r1, r4 adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldrh r0, [r4, 0x18] adds r4, 0x1C adds r1, r4, 0 @@ -26140,7 +26181,7 @@ sub_80156E0: ; 80156E0 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x21 bl @08016876 .align 2, 0 @@ -26372,7 +26413,7 @@ sub_80156E0: ; 80156E0 ldr r0, =0x02021cc4 ldr r4, =0x02022a0c adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 subs r0, 0x24 ldrh r0, [r0, 0x20] @@ -26384,7 +26425,7 @@ sub_80156E0: ; 80156E0 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandTextCodes + bl ExpandStringRefs b @08016878 .align 2, 0 .pool @@ -26425,7 +26466,7 @@ sub_80156E0: ; 80156E0 bl sub_8011DE0 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EE598 - bl gf_strcpy + bl CopyString movs r0, 0x24 b @08016876 .align 2, 0 @@ -26514,7 +26555,7 @@ sub_80156E0: ; 80156E0 strb r0, [r6, 0x14] ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EEC14 - bl gf_strcpy + bl CopyString b @08016878 .align 2, 0 .pool @@ -26687,7 +26728,7 @@ sub_80156E0: ; 80156E0 bne @08016408 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EF590 - bl gf_strcpy + bl CopyString b @0801643E .align 2, 0 .pool @@ -26702,7 +26743,7 @@ sub_80156E0: ; 80156E0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02021dc4 bl sub_800F7DC ldrb r1, [r0, 0xB] @@ -26710,10 +26751,10 @@ sub_80156E0: ; 80156E0 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EF564 - bl ExpandTextCodes + bl ExpandStringRefs @0801643E: ldr r1, =0x02021fc4 movs r0, 0x2C @@ -27021,7 +27062,7 @@ sub_80156E0: ; 80156E0 subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_082EF6E4 b @0801671E .align 2, 0 @@ -27040,7 +27081,7 @@ sub_80156E0: ; 80156E0 subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_082EF718 @0801671E: movs r0, 0x2E @@ -27444,7 +27485,7 @@ task00_081199FC: ; 801697C @08016A84: ldr r0, =0x02022c20 mov r1, sp - bl gf_strcpy + bl CopyString b @08016AC8 .align 2, 0 .pool @@ -27490,7 +27531,7 @@ sp182_move_string: ; 8016AD4 @08016AE8: ldr r0, =0x02021cc4 adds r1, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0xFF strb r0, [r4] movs r0, 0x1 @@ -28192,7 +28233,7 @@ sub_8017020: ; 8017020 bl sub_81973C4 ldr r0, =0x02021fc4 adds r1, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0x1 bl sub_819735C @@ -28238,7 +28279,7 @@ sub_8017064: ; 8017064 bl sub_81973C4 ldr r0, =0x02021fc4 adds r1, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl sub_8197310 ldrb r0, [r4] @@ -29229,10 +29270,10 @@ sub_80177B8: ; 80177B8 adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_082ED8C8 adds r0, r5, 0 - bl gf_strcat + bl AppendString str r7, [sp] movs r0, 0 str r0, [sp, 0x4] @@ -29274,13 +29315,13 @@ sub_80177B8: ; 80177B8 add r0, sp, 0x8 movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_082ED8CC adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r5, 0 add r1, sp, 0x8 - bl gf_strcat + bl AppendString movs r0, 0x1 adds r1, r5, 0 movs r2, 0x88 @@ -29350,13 +29391,13 @@ sub_80178A0: ; 80178A0 add r0, sp, 0x8 movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_082ED8CC adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 add r1, sp, 0x8 - bl gf_strcat + bl AppendString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x68 @@ -29509,7 +29550,7 @@ sub_80179D4: ; 80179D4 adds r1, r2 adds r1, r3 ldr r1, [r1] - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 b @08017B2A .align 2, 0 @@ -29617,14 +29658,14 @@ sub_80179D4: ; 80179D4 ldr r1, [r0] @08017B0E: adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @08017B28 .align 2, 0 .pool @08017B20: ldr r0, =0x02021fc4 ldr r1, =gUnknown_082EE6C8 - bl ExpandTextCodes + bl ExpandStringRefs @08017B28: movs r0, 0 @08017B2A: @@ -29705,7 +29746,7 @@ sub_8017B3C: ; 8017B3C mov r1, r9 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString str r5, [sp] str r4, [sp, 0x4] adds r0, r6, 0 @@ -29989,7 +30030,7 @@ sub_8017D9C: ; 8017D9C ldr r1, =gUnknown_082EF7B0 @08017DDA: adds r0, r3, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @08017DF6 .align 2, 0 .pool @@ -29999,7 +30040,7 @@ sub_8017D9C: ; 8017D9C adds r1, r0 ldr r1, [r1] adds r0, r3, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08017DF6: pop {r0} bx r0 @@ -30065,7 +30106,7 @@ sub_8017E00: ; 8017E00 adds r1, r2 ldr r1, [r1] adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @08017E94 .align 2, 0 .pool @@ -30082,7 +30123,7 @@ sub_8017E00: ; 8017E00 adds r1, r2 ldr r1, [r1] adds r0, r5, 0 - bl gf_strcpy + bl CopyString @08017E94: pop {r4-r6} pop {r0} @@ -30142,7 +30183,7 @@ sub_8017EA0: ; 8017EA0 ldrh r1, [r4, 0xC] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 adds r0, 0x68 ldrh r2, [r4, 0xA] @@ -30150,7 +30191,7 @@ sub_8017EA0: ; 8017EA0 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString movs r4, 0 b @08017F2E .align 2, 0 @@ -30172,7 +30213,7 @@ sub_8017EA0: ; 8017EA0 adds r0, 0x78 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldrh r1, [r5, 0x2] movs r0, 0xB muls r1, r0 @@ -30180,7 +30221,7 @@ sub_8017EA0: ; 8017EA0 adds r1, r0 adds r0, r6, 0 adds r0, 0x88 - bl gf_strcpy + bl CopyString ldrh r5, [r5, 0x2] mov r8, r5 @08017F64: @@ -30190,7 +30231,7 @@ sub_8017EA0: ; 8017EA0 bne @08017F84 ldr r1, =gUnknown_082EE4F0 adds r0, r7, 0 - bl gf_strcpy + bl CopyString b @08017FB4 .align 2, 0 .pool @@ -30217,7 +30258,7 @@ sub_8017EA0: ; 8017EA0 ldr r1, =gUnknown_082EE380 @08017FAE: adds r0, r7, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08017FB4: movs r2, 0x1 b @08017FC6 @@ -30226,7 +30267,7 @@ sub_8017EA0: ; 8017EA0 @08017FBC: ldr r1, =gUnknown_082EE544 adds r0, r7, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r2, 0x2 @08017FC6: adds r0, r2, 0 @@ -30596,7 +30637,7 @@ sub_8018220: ; 8018220 ldr r0, =gTrainerClassNames adds r1, r0 adds r0, r6, 0 - bl gf_strcpy + bl CopyString movs r0, 0 adds r1, r6, 0 bl sub_81AFC0C @@ -30614,7 +30655,7 @@ sub_8018220: ; 8018220 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x2 adds r1, r4, 0 bl sub_81AFC0C @@ -30625,7 +30666,7 @@ sub_8018220: ; 8018220 adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x3 adds r1, r5, 0 bl sub_81AFC0C @@ -30637,7 +30678,7 @@ sub_8018220: ; 8018220 mov r0, r10 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r4, r9 adds r4, 0xFC mov r2, r8 @@ -30645,7 +30686,7 @@ sub_8018220: ; 8018220 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x4 mov r1, r10 bl sub_81AFC0C @@ -30660,7 +30701,7 @@ sub_8018220: ; 8018220 bl sub_81AFC28 ldr r0, =0x02021fc4 adds r1, r4, 0 - bl gf_strcpy + bl CopyString mov r0, r8 ldrh r1, [r0, 0x14] ldr r4, =0x0000270f @@ -30671,7 +30712,7 @@ sub_8018220: ; 8018220 adds r0, r6, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0 adds r1, r6, 0 bl sub_81AFC0C @@ -30686,7 +30727,7 @@ sub_8018220: ; 8018220 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x2 adds r1, r4, 0 bl sub_81AFC0C @@ -30695,7 +30736,7 @@ sub_8018220: ; 8018220 adds r0, r5, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x3 adds r1, r5, 0 bl sub_81AFC0C @@ -30708,7 +30749,7 @@ sub_8018220: ; 8018220 @08018360: ldrh r1, [r5] adds r0, r4, 0 - bl sub_811EBBC + bl CopyEasyChatWord lsrs r0, r6, 24 adds r1, r4, 0 bl sub_81AFC0C @@ -30729,7 +30770,7 @@ sub_8018220: ; 8018220 ldr r5, =0x02021fc4 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString ldr r0, [sp] cmp r0, 0x1 bne @080183D0 @@ -30738,7 +30779,7 @@ sub_8018220: ; 8018220 bl sub_81AFC28 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString b @080183F0 .align 2, 0 .pool @@ -30756,7 +30797,7 @@ sub_8018220: ; 8018220 bl sub_81AFC28 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString @080183F0: add sp, 0x4 pop {r3-r5} @@ -30776,12 +30817,12 @@ sub_8018404: ; 8018404 adds r5, r0, 0 adds r4, r1, 0 adds r1, 0x10 - bl strcpy_limit_7_chars + bl CopyString_Limit7 ldrb r1, [r4] lsls r1, 28 lsrs r1, 28 adds r0, r5, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r4,r5} pop {r0} bx r0 @@ -31301,7 +31342,7 @@ sub_8018884: ; 8018884 adds r1, r0, 0 ldr r4, =0x02021fc4 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0x11 bl Window_FastFillPixels @@ -31653,7 +31694,7 @@ sub_8018B08: ; 8018B08 b @08018C3E @08018B30: ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs cmp r6, 0 bne @08018B48 ldr r0, =gUnknown_082F05C8 @@ -31802,14 +31843,14 @@ sub_8018C4C: ; 8018C4C bne @08018C84 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EF2FC - bl ExpandTextCodes + bl ExpandStringRefs b @08018C8C .align 2, 0 .pool @08018C84: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EF330 - bl ExpandTextCodes + bl ExpandStringRefs @08018C8C: ldr r0, =gUnknown_082F05D8 bl Window_AddFromTemplate @@ -32840,7 +32881,7 @@ task00_mystery_gift: ; 80191F4 strb r0, [r5, 0x8] ldr r0, =0x02021cc4 ldr r1, =0x020229f0 - bl gf_strcpy + bl CopyString b @08019922 .align 2, 0 .pool @@ -32957,7 +32998,7 @@ task00_mystery_gift: ; 80191F4 bne @080195AA ldr r0, =0x02021cc4 ldr r1, =0x020229f0 - bl gf_strcpy + bl CopyString @080195AA: movs r0, 0xF strb r0, [r5, 0x8] @@ -33338,7 +33379,7 @@ task00_mystery_gift: ; 80191F4 bl task_add_05_task_del_08FA224_when_no_RfuFunc ldr r0, =0x02021cc4 ldr r1, =0x02022a0c - bl gf_strcpy + bl CopyString movs r0, 0x22 strb r0, [r5, 0x8] b @08019922 @@ -33569,7 +33610,7 @@ sub_8019A30: ; 8019A30 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -33585,7 +33626,7 @@ flag_set_x63: ; 8019A4C adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -33599,7 +33640,7 @@ flag_clear_x63: ; 8019A64 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -33615,7 +33656,7 @@ sub_8019A7C: ; 8019A7C lsrs r0, 16 lsls r1, 16 lsrs r1, 16 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -35282,7 +35323,7 @@ sub_801A6C0: ; 801A6C0 adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString cmp r4, 0x3 beq @0801A7CC lsrs r0, r7, 24 @@ -36804,7 +36845,7 @@ sub_801B3F8: ; 801B3F8 lsls r0, 1 adds r0, r1 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -37105,7 +37146,7 @@ sub_801B580: ; 801B580 mov r2, r8 ldr r1, [r2] adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x03005d8c ldr r0, [r0] ldr r3, =0x00002bb0 @@ -38273,7 +38314,7 @@ sub_801BEF8: ; 801BEF8 ldr r1, [r1, 0x4] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r6, r4, 0 @0801BF66: ldr r2, [r6] @@ -38485,7 +38526,7 @@ sub_801BEF8: ; 801BEF8 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r0, r8 ldr r1, [r0] adds r0, r1, r7 @@ -41888,7 +41929,7 @@ sub_801DBC0: ; 801DBC0 strb r1, [r0] strb r1, [r0, 0x1] ldr r0, =0x0000402e - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -41899,7 +41940,7 @@ sub_801DBC0: ; 801DBC0 sub_801DBDC: ; 801DBDC push {r4,lr} ldr r0, =0x0000402e - bl var_get_pointer + bl GetVarPointer adds r4, r0, 0 bl sub_801B044 adds r2, r0, 0 @@ -42198,7 +42239,7 @@ sub_801DDD0: ; 801DDD0 ldr r1, [r7] adds r1, r6 adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r6, 0x15 adds r4, 0x15 subs r5, 0x1 @@ -44048,14 +44089,14 @@ sub_801EC94: ; 801EC94 adds r1, 0xB9 adds r1, r5, r1 mov r0, sp - bl gf_strcpy + bl CopyString movs r1, 0 strb r1, [r0] movs r1, 0xFF strb r1, [r0, 0x1] mov r4, sp mov r0, sp - bl sub_80091CC + bl GetStringLength_Multibyte adds r5, r0, 0 @0801ED02: ldr r6, =0x02022c84 @@ -44198,7 +44239,7 @@ sub_801EDE0: ; 801EDE0 adds r2, r3 adds r2, 0xB9 adds r0, r2 - bl gf_strcpy + bl CopyString ldr r1, [r4] movs r0, 0x1 strb r0, [r1, 0x18] @@ -44243,7 +44284,7 @@ sub_801EE2C: ; 801EE2C adds r0, r5 ldr r1, [r7] adds r1, r6 - bl gf_strcpy + bl CopyString adds r6, 0x15 adds r5, 0x15 subs r4, 0x1 @@ -44332,7 +44373,7 @@ sub_801EED8: ; 801EED8 ldr r4, =0x02022c84 ldr r0, [r4] adds r0, 0x1A - bl sub_80091CC + bl GetStringLength_Multibyte adds r2, r0, 0 ldr r0, [r4] adds r1, r0, 0 @@ -44381,7 +44422,7 @@ sub_801EF24: ; 801EF24 adds r0, r4, 0x1 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022c84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -44402,13 +44443,13 @@ sub_801EF4C: ; 801EF4C adds r0, r4, 0x1 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r4, 0x9 ldr r0, =0x02022c84 ldr r1, [r0] adds r1, 0x1A adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -44425,7 +44466,7 @@ sub_801EF7C: ; 801EF7C adds r0, r4, 0x1 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022c84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -44447,7 +44488,7 @@ sub_801EFA8: ; 801EFA8 adds r0, r4, 0x1 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022c84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -44468,7 +44509,7 @@ sub_801EFD0: ; 801EFD0 adds r0, r4, 0x1 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022c84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -44521,7 +44562,7 @@ sub_801EFF8: ; 801EFF8 @0801F044: adds r0, r6, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString movs r1, 0xFC strb r1, [r0] adds r0, 0x1 @@ -44535,7 +44576,7 @@ sub_801EFF8: ; 801EFF8 strb r1, [r0] adds r0, 0x1 adds r1, r5, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 b @0801F0AA @0801F06E: @@ -44543,7 +44584,7 @@ sub_801EFF8: ; 801EFF8 ldr r0, [r0] adds r0, 0x79 adds r1, r4, 0 - bl gf_strcpy + bl CopyString @0801F07A: ldr r0, =0x02022c84 ldr r0, [r0] @@ -44608,7 +44649,7 @@ sub_801F0D0: ; 801F0D0 sub_801F0DC: ; 801F0DC push {lr} bl sub_801F0D0 - bl sub_80091CC + bl GetStringLength_Multibyte pop {r1} bx r1 thumb_func_end sub_801F0DC @@ -44778,52 +44819,52 @@ copy_strings_to_sav1: ; 801F1DC ldr r1, =0x00003c88 adds r0, r1 ldr r1, =gUnknown_085ED40F - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003c9d adds r0, r1 ldr r1, =gUnknown_085ED415 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003cb2 adds r0, r1 ldr r1, =gUnknown_085ED41D - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003cc7 adds r0, r1 ldr r1, =gUnknown_085ED423 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003cdc adds r0, r1 ldr r1, =gUnknown_085ED42A - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003cf1 adds r0, r1 ldr r1, =gUnknown_085ED430 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003d06 adds r0, r1 ldr r1, =gUnknown_085ED434 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003d1b adds r0, r1 ldr r1, =gUnknown_085ED43A - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003d30 adds r0, r1 ldr r1, =gUnknown_085ED440 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00003d45 adds r0, r1 ldr r1, =gUnknown_085ED44A - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -45669,7 +45710,7 @@ sub_801F8DC: ; 801F8DC lsrs r4, 16 bl sub_801F114 adds r5, r0, 0 - bl sub_80091CC + bl GetStringLength_Multibyte adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -45753,7 +45794,7 @@ sub_801F984: ; 801F984 lsrs r4, 16 bl sub_801F114 adds r5, r0, 0 - bl sub_80091CC + bl GetStringLength_Multibyte adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -46761,7 +46802,7 @@ sub_8020118: ; 8020118 mov r0, sp adds r0, 0x13 mov r1, r10 - bl gf_strcpy + bl CopyString mov r0, r9 lsls r2, r0, 27 lsrs r2, 24 @@ -46839,7 +46880,7 @@ sub_80201A4: ; 80201A4 @08020206: mov r0, sp adds r0, 0x13 - bl gf_strcpy + bl CopyString lsls r3, r6, 24 lsrs r3, 24 add r1, sp, 0xC @@ -46900,7 +46941,7 @@ sub_80201A4: ; 80201A4 b @08020300 @08020286: adds r0, r5, 0 - bl sub_80091CC + bl GetStringLength_Multibyte adds r4, r0, 0 mov r1, sp adds r1, 0x10 @@ -46922,7 +46963,7 @@ sub_80201A4: ; 80201A4 adds r0, r6, 0 adds r1, r5, 0 adds r2, r4, 0 - bl sub_800918C + bl StringCopy_LimitN_Multibyte movs r0, 0 adds r1, r6, 0 movs r2, 0 @@ -48569,7 +48610,7 @@ sub_8020FC4: ; 8020FC4 lsls r1, 2 ldr r2, =0x020229f0 adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -49965,12 +50006,12 @@ sub_8021A28: ; 8021A28 ldr r0, =0x02021fc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =gUnknown_082F43B4 adds r0, r4, r0 ldr r1, [r0] ldr r0, =0x02021fc4 - bl gf_strcat + bl AppendString ldr r4, [sp, 0x14] subs r4, 0x4 lsls r2, r6, 24 @@ -50018,7 +50059,7 @@ sub_8021A28: ; 8021A28 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r7, 0 ldrb r0, [r4] movs r3, 0xF @@ -50069,13 +50110,13 @@ sub_8021A28: ; 8021A28 adds r1, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =gUnknown_082F43B4 ldr r2, [sp, 0x28] adds r0, r2, r0 ldr r1, [r0] ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs b @08021C5E .align 2, 0 .pool @@ -50097,11 +50138,11 @@ sub_8021A28: ; 8021A28 ldr r0, =gBerries adds r1, r0 ldr r0, =0x02021cc4 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_082F43B4 ldr r1, [r0, 0x8] ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs ldr r4, [sp, 0x14] subs r4, 0x4 lsls r0, r6, 24 @@ -50143,14 +50184,14 @@ sub_8021A28: ; 8021A28 bne @08021CC0 ldr r0, =0x02021ec4 ldr r1, =gUnknown_085ED7D4 - bl gf_strcpy + bl CopyString b @08021CC8 .align 2, 0 .pool @08021CC0: ldr r0, =0x02021ec4 ldr r1, =gUnknown_085ED7E0 - bl gf_strcpy + bl CopyString @08021CC8: ldr r4, =0x02021ec4 mov r3, r9 @@ -50274,7 +50315,7 @@ sub_8021D34: ; 8021D34 ldr r0, =0x02021cc4 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 movs r1, 0xA0 lsls r1, 1 @@ -50283,11 +50324,11 @@ sub_8021D34: ; 8021D34 ldrsh r1, [r1, r2] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085ED838 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 adds r1, r5, 0 movs r2, 0x1 @@ -50335,10 +50376,10 @@ sub_8021D34: ; 8021D34 ldr r0, =0x02021cc4 movs r2, 0x2 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085ED82C adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 adds r1, r5, 0 movs r2, 0x1 @@ -50432,7 +50473,7 @@ sub_8021D34: ; 8021D34 lsrs r1, r2, 8 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 ldr r1, =0x000f4240 ldr r0, [sp, 0xC] @@ -50441,11 +50482,11 @@ sub_8021D34: ; 8021D34 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085ED848 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r2, 0x1 negs r2, r2 movs r0, 0x2 @@ -50518,11 +50559,11 @@ sub_8021D34: ; 8021D34 ldrh r1, [r4, 0x8] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085ED85C adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r2, 0x1 negs r2, r2 movs r0, 0x2 @@ -50902,10 +50943,10 @@ sub_8022250: ; 8022250 ldr r0, =0x02021cc4 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021fc4 ldr r1, =gUnknown_085ED8F4 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r0, [r6, 0x2] ldr r1, =gUnknown_082F32D8 str r1, [sp] @@ -50979,7 +51020,7 @@ sub_8022250: ; 8022250 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [sp, 0xC] ldr r1, =0x000f4240 bl __udivsi3 @@ -50987,10 +51028,10 @@ sub_8022250: ; 8022250 ldr r0, =0x02021dc4 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021fc4 ldr r1, =gUnknown_085ED848 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 ldr r1, =0x02021fc4 movs r2, 0x1 @@ -52162,7 +52203,7 @@ sub_8022D14: ; 8022D14 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r3, [r7, 0xB] str r6, [sp] mov r0, r8 @@ -54110,7 +54151,7 @@ sub_8023BC0: ; 8023BC0 ldr r1, [r5, 0x1C] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r4, 0 str r4, [sp] adds r0, r6, 0 @@ -54685,14 +54726,14 @@ sub_8024048: ; 8024048 ldr r1, [r5, 0x1C] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 bl sub_80247BC adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r4, 0 str r4, [sp] adds r0, r6, 0 @@ -55644,7 +55685,7 @@ sub_80247D4: ; 80247D4 mov r9, r0 movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString str r4, [sp] str r5, [sp, 0x4] movs r0, 0 @@ -62412,7 +62453,7 @@ sub_8027BEC: ; 8027BEC ldrb r3, [r0] mov r0, r8 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 mov r1, r8 movs r2, 0x1 @@ -62502,7 +62543,7 @@ sub_8027D38: ; 8027D38 lsls r1, r4, 2 adds r1, r5 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0x1 lsls r0, 24 lsrs r4, r0, 24 @@ -65920,7 +65961,7 @@ sub_80296A8: ; 80296A8 mov r1, r9 movs r2, 0 movs r3, 0x7 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x1 @@ -66179,7 +66220,7 @@ sub_802988C: ; 802988C adds r1, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 mov r1, r10 movs r2, 0x1 @@ -70514,7 +70555,7 @@ sub_802BD84: ; 802BD84 ldr r1, =0x020229f0 add r1, r9 adds r0, r7, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 strh r0, [r5] ldrh r0, [r6, 0x2] @@ -73966,7 +74007,7 @@ sub_802D7E8: ; 802D7E8 adds r1, r4, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 ldr r1, [r5] adds r1, 0x26 @@ -75737,7 +75778,7 @@ sub_802E500: ; 802E500 adds r0, r5, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r5, 0 bl sub_802E620 movs r0, 0x1 @@ -77608,20 +77649,20 @@ sub_802F40C: ; 802F40C adds r6, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r4, 0xF0 strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -77636,20 +77677,20 @@ sub_802F444: ; 802F444 adds r6, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_8008E20 + bl ConvertIntToHexString movs r4, 0xF0 strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_8008E20 + bl ConvertIntToHexString strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_8008E20 + bl ConvertIntToHexString movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -77678,20 +77719,20 @@ sub_802F494: ; 802F494 adds r6, r3, 0 movs r2, 0x2 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r4, 0xAE strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -77706,20 +77747,20 @@ sub_802F4CC: ; 802F4CC adds r6, r3, 0 movs r2, 0x2 movs r3, 0x4 - bl sub_8008E20 + bl ConvertIntToHexString movs r4, 0xAE strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_8008E20 + bl ConvertIntToHexString strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_8008E20 + bl ConvertIntToHexString movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -80091,7 +80132,7 @@ task_new_game_prof_birch_speech_3: ; 8030928 bl sub_8032318 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C897B - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r0, =task_new_game_prof_birch_speech_4 @@ -80128,7 +80169,7 @@ task_new_game_prof_birch_speech_4: ; 80309CC str r1, [r0] ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E8692 - bl ExpandTextCodes + bl ExpandStringRefs ldr r1, =sub_80323A0 movs r0, 0x1 bl sub_8197A9C @@ -80153,7 +80194,7 @@ task_new_game_prof_birch_speech_5: ; 8030A2C bne @08030A58 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8A1F - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r1, =0x03005e00 @@ -80353,7 +80394,7 @@ task_new_game_prof_birch_speech_6: ; 8030BCC strb r1, [r0] ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8BD0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r1, =0x03005e00 @@ -80599,7 +80640,7 @@ task_new_game_prof_birch_speech_11: ; 8030DC8 bl sub_8032318 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8BDD - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r1, =0x03005e00 @@ -80858,7 +80899,7 @@ task_new_game_prof_birch_speech_14: ; 8030FD4 bl sub_8032318 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8BFF - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r1, =0x03005e00 @@ -80999,7 +81040,7 @@ task_new_game_prof_birch_speech_part2_2: ; 8031104 bl sub_8032318 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8C1C - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r1, =0x03005e00 @@ -81248,7 +81289,7 @@ task_new_game_prof_birch_speech_part2_6: ; 8031258 bl sub_8032318 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8C2A - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r0, =task_new_game_prof_birch_speech_part2_7 @@ -81437,7 +81478,7 @@ task_new_game_prof_birch_speech_part2_8: ; 80313E4 bl sub_8031D34 ldr r0, =0x02021fc4 ldr r1, =gUnknown_082C8C7A - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r0, =task_new_game_prof_birch_speech_part2_9 @@ -82610,7 +82651,7 @@ fmt_time: ; 8031E94 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EDCC3 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -82653,7 +82694,7 @@ fmt_player: ; 8031EF8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EDCCA adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -82671,7 +82712,7 @@ fmt_player: ; 8031EF8 add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xF0 strb r1, [r0] adds r0, 0x1 @@ -82679,7 +82720,7 @@ fmt_player: ; 8031EF8 ldrb r1, [r1, 0x10] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 add r1, sp, 0xC movs r2, 0xD0 @@ -82708,7 +82749,7 @@ fmt_pokedex: ; 8031F7C push {r4-r7,lr} sub sp, 0x2C ldr r0, =0x00000861 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -82730,7 +82771,7 @@ fmt_pokedex: ; 8031F7C ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EDCCF adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -82746,7 +82787,7 @@ fmt_pokedex: ; 8031F7C adds r1, r7, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x64 @@ -82780,7 +82821,7 @@ fmt_badges: ; 8032014 @0803201C: lsls r0, r4, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08032030 @@ -82795,7 +82836,7 @@ fmt_badges: ; 8032014 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EDCD7 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -82811,7 +82852,7 @@ fmt_badges: ; 8032014 adds r1, r7, 0 movs r2, 0x2 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 add r1, sp, 0xC movs r2, 0xD0 @@ -87447,7 +87488,7 @@ call_LZZUnCompVram: ; 8034524 thumb_func_end call_LZZUnCompVram thumb_func_start gpu_tile_obj_decompress_and_load -; u16 gpu_tile_obj_decompress_and_load(struct rom_obj_tile_data *x) +; u16 gpu_tile_obj_decompress_and_load(struct obj_tiles *x) gpu_tile_obj_decompress_and_load: ; 8034530 push {r4,r5,lr} sub sp, 0x8 @@ -87475,7 +87516,7 @@ gpu_tile_obj_decompress_and_load: ; 8034530 thumb_func_end gpu_tile_obj_decompress_and_load thumb_func_start gpu_tile_obj_decompress_and_load2 -; void gpu_tile_obj_decompress_and_load2(struct rom_obj_tile_data *x, void *dest) +; void gpu_tile_obj_decompress_and_load2(struct obj_tiles *x, void *dest) gpu_tile_obj_decompress_and_load2: ; 8034564 push {r4,r5,lr} sub sp, 0x8 @@ -88070,7 +88111,7 @@ sub_8034974: ; 8034974 thumb_func_end sub_8034974 thumb_func_start gpu_tile_obj_decompress_and_load3 -; u16 gpu_tile_obj_decompress_and_load3(struct rom_obj_tile_data *x) +; u16 gpu_tile_obj_decompress_and_load3(struct obj_tiles *x) gpu_tile_obj_decompress_and_load3: ; 8034988 push {r4,r5,lr} sub sp, 0x8 @@ -89903,8 +89944,8 @@ sub_803570C: ; 803570C .pool thumb_func_end sub_803570C - thumb_func_start sub_8035770 -sub_8035770: ; 8035770 + thumb_func_start load_battle_oval_graphics +load_battle_oval_graphics: ; 8035770 push {r4,r5,lr} ldr r0, =0x02022fec ldr r1, [r0] @@ -90160,7 +90201,7 @@ sub_8035770: ; 8035770 bx r0 .align 2, 0 .pool - thumb_func_end sub_8035770 + thumb_func_end load_battle_oval_graphics thumb_func_start sub_8035AA4 sub_8035AA4: ; 8035AA4 @@ -90181,7 +90222,7 @@ sub_8035AA4: ; 8035AA4 movs r2, 0x40 bl decompress_palette bl sub_803570C - bl sub_8035770 + bl load_battle_oval_graphics pop {r0} bx r0 .align 2, 0 @@ -91861,7 +91902,7 @@ sub_80367D4: ; 80367D4 ldrh r1, [r0] adds r0, r4, 0 movs r2, 0x1 - bl sub_80385E8 + bl LoadTrainerParty ldr r0, [r5] movs r1, 0x80 lsls r1, 8 @@ -91874,7 +91915,7 @@ sub_80367D4: ; 80367D4 ldr r1, =0x02038bcc ldrh r1, [r1] movs r2, 0 - bl sub_80385E8 + bl LoadTrainerParty @080369E4: bl sub_806EA68 @080369E8: @@ -92012,7 +92053,7 @@ sub_8036A5C: ; 8036A5C lsrs r1, r6, 8 strb r1, [r0] ldr r0, =0x000008d2 - bl flag_check + bl FlagGet ldr r1, [r4] adds r1, r5 lsls r0, 7 @@ -92092,7 +92133,7 @@ sub_8036B44: ; 8036B44 bl berryid_from_itemid lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo adds r3, r0, 0 movs r2, 0 movs r0, 0xC6 @@ -92230,7 +92271,7 @@ berry_801017C: ; 8036C08 bl berryid_from_itemid lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo adds r6, r0, 0 movs r5, 0 ldr r4, =0x02024404 @@ -93758,7 +93799,7 @@ sub_80379F8: ; 80379F8 bl pokemon_get_gender strb r0, [r6, 0x1C] adds r0, r7, 0 - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 movs r1, 0x3 bl pokemon_getattr @@ -95078,8 +95119,8 @@ sub_8038538: ; 8038538 .pool thumb_func_end sub_8038538 - thumb_func_start sub_80385E8 -sub_80385E8: ; 80385E8 + thumb_func_start LoadTrainerParty +LoadTrainerParty: ; 80385E8 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -95608,7 +95649,7 @@ sub_80385E8: ; 80385E8 bx r1 .align 2, 0 .pool - thumb_func_end sub_80385E8 + thumb_func_end LoadTrainerParty thumb_func_start sub_8038A04 sub_8038A04: ; 8038A04 @@ -96301,7 +96342,7 @@ sub_8038F34: ; 8038F34 cmp r4, r3 bne @080390AC ldr r0, =0x000008d2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08039074 @@ -96981,7 +97022,7 @@ sub_803939C: ; 803939C bl audio_play ldr r0, =gUnknown_085CD2CB @08039686: - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -97110,7 +97151,7 @@ shedinja_something: ; 803976C bl pokemon_getattr ldr r1, =gUnknown_0831ACA0 mov r0, sp - bl sub_80092BC + bl CompareStringWithoutExtendedControlCodes cmp r0, 0 bne @080397B4 adds r0, r4, 0 @@ -103785,7 +103826,7 @@ b_first_side: ; 803CF10 cmp r0, 0 bne @0803D074 ldr r0, =0x00000869 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0803D074 @@ -103890,7 +103931,7 @@ b_first_side: ; 803CF10 cmp r0, 0 bne @0803D15C ldr r0, =0x00000869 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0803D15C @@ -105453,7 +105494,7 @@ c4_overworld: ; 803DF70 adds r0, r4, 0 bl sub_806DCB4 adds r0, r4, 0 - bl atkE5_pickupitemcalculation + bl sub_806DEC4 @0803DF8C: ldr r4, [r6] adds r0, r4, 0 @@ -114365,7 +114406,7 @@ ability_something: ; 8042828 beq @08042DDC ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC70 - bl gf_strcpy + bl CopyString @08042DDC: ldr r0, [r5] movs r1, 0x7 @@ -114374,7 +114415,7 @@ ability_something: ; 8042828 beq @08042DEE ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC78 - bl gf_strcpy + bl CopyString @08042DEE: ldr r0, [r5] movs r1, 0x40 @@ -114383,7 +114424,7 @@ ability_something: ; 8042828 beq @08042E00 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC80 - bl gf_strcpy + bl CopyString @08042E00: ldr r0, [r5] movs r1, 0x10 @@ -114392,7 +114433,7 @@ ability_something: ; 8042828 beq @08042E12 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC88 - bl gf_strcpy + bl CopyString @08042E12: ldr r0, [r5] movs r1, 0x20 @@ -114401,7 +114442,7 @@ ability_something: ; 8042828 beq @08042E24 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC90 - bl gf_strcpy + bl CopyString @08042E24: str r4, [r5] mov r1, r8 @@ -115660,7 +115701,7 @@ ability_something: ; 8042828 @08043A96: ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC98 - bl gf_strcpy + bl CopyString movs r2, 0x2 mov r9, r2 b @08043B9C @@ -115704,7 +115745,7 @@ ability_something: ; 8042828 str r0, [r2] ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC78 - bl gf_strcpy + bl CopyString movs r0, 0x1 mov r9, r0 b @08043B9C @@ -115725,7 +115766,7 @@ ability_something: ; 8042828 beq @08043B96 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC88 - bl gf_strcpy + bl CopyString movs r2, 0x1 mov r9, r2 b @08043B9C @@ -115747,7 +115788,7 @@ ability_something: ; 8042828 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC90 @08043B5C: - bl gf_strcpy + bl CopyString movs r5, 0x1 mov r9, r5 b @08043B9C @@ -115769,7 +115810,7 @@ ability_something: ; 8042828 beq @08043B96 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BCA0 - bl gf_strcpy + bl CopyString movs r2, 0x3 mov r9, r2 @08043B96: @@ -118283,7 +118324,7 @@ berry_effects_maybe: ; 80444DC beq @080450B2 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC70 - bl gf_strcpy + bl CopyString movs r0, 0x1 mov r10, r0 @080450B2: @@ -118302,7 +118343,7 @@ berry_effects_maybe: ; 80444DC str r0, [r2] ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC78 - bl gf_strcpy + bl CopyString movs r2, 0x1 add r10, r2 @080450D8: @@ -118313,7 +118354,7 @@ berry_effects_maybe: ; 80444DC beq @080450EE ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC80 - bl gf_strcpy + bl CopyString movs r3, 0x1 add r10, r3 @080450EE: @@ -118324,7 +118365,7 @@ berry_effects_maybe: ; 80444DC beq @08045104 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC88 - bl gf_strcpy + bl CopyString movs r0, 0x1 add r10, r0 @08045104: @@ -118335,7 +118376,7 @@ berry_effects_maybe: ; 80444DC beq @0804511A ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC90 - bl gf_strcpy + bl CopyString movs r1, 0x1 add r10, r1 @0804511A: @@ -118347,7 +118388,7 @@ berry_effects_maybe: ; 80444DC beq @08045132 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC98 - bl gf_strcpy + bl CopyString movs r3, 0x1 add r10, r3 @08045132: @@ -118405,7 +118446,7 @@ berry_effects_maybe: ; 80444DC str r2, [r1] ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BCA0 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_082DB794 bl b_call_bc_move_exec ldr r1, =0x02024332 @@ -118738,7 +118779,7 @@ berry_effects_maybe: ; 80444DC str r1, [r2] ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BCA0 - bl gf_strcpy + bl CopyString bl b_movescr_stack_push_cursor ldr r1, =0x02024332 movs r0, 0 @@ -118779,7 +118820,7 @@ berry_effects_maybe: ; 80444DC beq @08045558 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC70 - bl gf_strcpy + bl CopyString @08045558: ldr r0, [r6] movs r2, 0x7 @@ -118795,7 +118836,7 @@ berry_effects_maybe: ; 80444DC str r0, [r2] ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC78 - bl gf_strcpy + bl CopyString @08045578: ldr r0, [r6] movs r1, 0x40 @@ -118804,7 +118845,7 @@ berry_effects_maybe: ; 80444DC beq @0804558A ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC80 - bl gf_strcpy + bl CopyString @0804558A: ldr r0, [r6] movs r1, 0x10 @@ -118813,7 +118854,7 @@ berry_effects_maybe: ; 80444DC beq @0804559C ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC88 - bl gf_strcpy + bl CopyString @0804559C: ldr r0, [r6] movs r1, 0x20 @@ -118822,7 +118863,7 @@ berry_effects_maybe: ; 80444DC beq @080455AE ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC90 - bl gf_strcpy + bl CopyString @080455AE: adds r5, r4 ldr r0, [r5] @@ -118832,7 +118873,7 @@ berry_effects_maybe: ; 80444DC beq @080455C2 ldr r0, =0x02022f58 ldr r1, =gUnknown_0831BC98 - bl gf_strcpy + bl CopyString @080455C2: movs r4, 0 str r4, [r6] @@ -119638,27 +119679,27 @@ sub_8045CBC: ; 8045CBC cmp r0, 0 beq @08045DAC ldr r0, =0x0000086e - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08045DAC movs r6, 0xA ldr r0, =0x00000868 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08045D5A movs r6, 0x1E @08045D5A: ldr r0, =0x0000086a - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08045D68 movs r6, 0x32 @08045D68: ldr r0, =0x0000086c - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08045D76 @@ -137180,7 +137221,7 @@ sub_804F220: ; 804F220 mov r1, r8 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 subs r4, r5, r4 movs r2, 0x4 @@ -137196,11 +137237,11 @@ sub_804F220: ; 804F220 bne @0804F300 movs r1, 0 movs r2, 0xC - bl sub_80091EC + bl WriteColorChangeControlCode adds r5, r0, 0 movs r1, 0x1 movs r2, 0xD - bl sub_80091EC + bl WriteColorChangeControlCode adds r5, r0, 0 movs r0, 0xB5 b @0804F318 @@ -137210,11 +137251,11 @@ sub_804F220: ; 804F220 adds r0, r5, 0 movs r1, 0 movs r2, 0xE - bl sub_80091EC + bl WriteColorChangeControlCode adds r5, r0, 0 movs r1, 0x1 movs r2, 0xF - bl sub_80091EC + bl WriteColorChangeControlCode adds r5, r0, 0 movs r0, 0xB6 @0804F318: @@ -138290,7 +138331,7 @@ sub_804F7AC: ; 804F7AC lsls r0, 2 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0x16 bl battle_show_message_maybe @@ -144839,7 +144880,7 @@ atkAD_reducepprandom: ; 8053260 adds r1, r6, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString strb r5, [r4] movs r0, 0x1 strb r0, [r4, 0x1] @@ -149664,8 +149705,8 @@ sub_8055B48: ; 8055B48 .pool thumb_func_end sub_8055B48 - thumb_func_start sub_8055C00 -sub_8055C00: ; 8055C00 + thumb_func_start atkE5_pickupitemcalculation +atkE5_pickupitemcalculation: ; 8055C00 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -149740,7 +149781,7 @@ sub_8055C00: ; 8055C00 lsls r0, 16 cmp r0, 0 bne @08055CB6 - bl sub_81AAAE0 + bl CalculateBattlePyramidPickupItemId strh r0, [r7] movs r0, 0x64 muls r0, r6 @@ -149903,7 +149944,7 @@ sub_8055C00: ; 8055C00 bx r0 .align 2, 0 .pool - thumb_func_end sub_8055C00 + thumb_func_end atkE5_pickupitemcalculation thumb_func_start atkE6_castform_transform atkE6_castform_transform: ; 8055DFC @@ -150929,13 +150970,13 @@ atkF0_catch_pokemon: ; 80566A8 strb r1, [r0, 0x5] ldr r4, =0x02021cc4 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrb r0, [r5] eors r0, r6 lsls r0, 1 @@ -150952,13 +150993,13 @@ atkF0_catch_pokemon: ; 80566A8 @08056734: ldr r4, =0x02021cc4 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrb r0, [r5] eors r0, r6 lsls r0, 1 @@ -150976,13 +151017,13 @@ atkF0_catch_pokemon: ; 80566A8 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =0x02024332 movs r0, 0x2 strb r0, [r1, 0x5] @0805677E: ldr r0, =0x000008ab - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08056792 @@ -151965,7 +152006,7 @@ sub_8056F28: ; 8056F28 cmp r0, 0 beq @08056FFA ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r2, =0x03005d8c @@ -156906,7 +156947,7 @@ sub_8059AAC: ; 8059AAC ldr r0, =gMoveNames adds r1, r0 adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r1, r5, 0x3 lsls r1, 24 lsrs r1, 24 @@ -156936,7 +156977,7 @@ sub_8059B18: ; 8059B18 ldr r4, =0x02022e2c ldr r1, =gUnknown_085CCA6F adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0x7 bl battle_show_message_maybe @@ -156975,7 +157016,7 @@ sub_8059B3C: ; 8059B3C adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -156987,7 +157028,7 @@ sub_8059B3C: ; 8059B3C ldrb r1, [r4] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 movs r1, 0x9 bl battle_show_message_maybe @@ -157010,7 +157051,7 @@ sub_8059BB0: ; 8059BB0 ldr r6, =0x02022e2c ldr r1, =gUnknown_085CCA73 adds r0, r6, 0 - bl gf_strcpy + bl CopyString movs r1, 0xFC strb r1, [r0] adds r0, 0x1 @@ -157037,7 +157078,7 @@ sub_8059BB0: ; 8059BB0 subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r6, 0 movs r1, 0xA bl battle_show_message_maybe @@ -157664,7 +157705,7 @@ dp01_getattr_by_ch1_for_player_pokemon_: ; 8059E68 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -161251,7 +161292,7 @@ dp01t_12_6_battle_menu: ; 805C044 movs r1, 0 bl sub_8059CB4 ldr r0, =gUnknown_085CC9F3 - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0x1 bl battle_show_message_maybe @@ -169080,7 +169121,7 @@ sub_8060004: ; 8060004 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -178734,7 +178775,7 @@ dp01_getattr_by_ch1_for_opponent_pokemon: ; 8065154 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -184194,7 +184235,7 @@ sub_806819C: ; 806819C adds r1, r6, 0 adds r1, 0x20 add r0, sp, 0x10 - bl gf_strcpy + bl CopyString add r0, sp, 0x10 ldrb r0, [r0] cmp r0, 0xFC @@ -184207,7 +184248,7 @@ sub_806819C: ; 806819C mov r1, r9 strb r0, [r1] add r0, sp, 0x10 - bl sub_8009370 + bl StripExtendedControlCodes b @08068236 @08068230: movs r0, 0x2 @@ -184428,7 +184469,7 @@ sub_8068338: ; 8068338 bl pokemon_setattr add r0, sp, 0x10 ldr r1, [sp, 0x54] - bl gf_strcpy + bl CopyString add r0, sp, 0x10 ldrb r0, [r0] cmp r0, 0xFC @@ -184441,7 +184482,7 @@ sub_8068338: ; 8068338 mov r1, r9 strb r0, [r1] add r0, sp, 0x10 - bl sub_8009370 + bl StripExtendedControlCodes b @08068430 @0806842A: movs r0, 0x2 @@ -187790,7 +187831,7 @@ sub_8069ED8: ; 8069ED8 beq @08069F1C @08069F10: adds r0, r5, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08069F2C @@ -188642,7 +188683,7 @@ pokemon_data_permutator: ; 806A270 thumb_func_end pokemon_data_permutator thumb_func_start pokemon_getattr -; int pokemon_getattr(pokemon *mon, enum pokemon_data_request req, void *data) +; int pokemon_getattr(pokemon *mon, enum pokemon_data_request req) pokemon_getattr: ; 806A518 push {r4,lr} adds r4, r0, 0 @@ -189002,9 +189043,9 @@ pokemon_getattr_encrypted: ; 806A674 beq @0806A8BC ldr r1, =gUnknown_085E8264 adds r0, r6, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r4, r0, 16 b @0806AC8C @@ -190615,7 +190656,7 @@ pokemon_add_to_pc: ; 806B490 push {r7} mov r8, r0 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl set_unknown_box_id @@ -190652,12 +190693,12 @@ pokemon_add_to_pc: ; 806B490 cmp r0, r5 beq @0806B4F4 ldr r0, =0x000008d7 - bl flag_clear + bl FlagReset @0806B4F4: lsls r1, r5, 16 ldr r0, =0x00004036 lsrs r1, 16 - bl var_set + bl VarSet movs r0, 0x1 b @0806B530 .align 2, 0 @@ -190908,8 +190949,9 @@ sub_806B694: ; 806B694 .pool thumb_func_end sub_806B694 - thumb_func_start sub_806B6D8 -sub_806B6D8: ; 806B6D8 + thumb_func_start GetMonAbility +; u8 GetMonAbility(pokemon *mon) +GetMonAbility: ; 806B6D8 push {r4,r5,lr} adds r5, r0, 0 movs r1, 0xB @@ -190932,7 +190974,7 @@ sub_806B6D8: ; 806B6D8 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_806B6D8 + thumb_func_end GetMonAbility thumb_func_start create_enemy_party create_enemy_party: ; 806B70C @@ -191625,7 +191667,7 @@ battle_data_fill: ; 806B9FC adds r0, 0x24 adds r0, r5, r0 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 mov r2, r10 adds r2, 0x30 adds r2, r5, r2 @@ -193911,12 +193953,12 @@ sub_806CF24: ; 806CF24 adds r0, r2 ldr r1, [r0] adds r0, r3, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02022f68 ldr r1, =gUnknown_085CB38A - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085CB3AA - bl sub_814E6F0 + bl get_battle_strings_ pop {r0} bx r0 .align 2, 0 @@ -194002,7 +194044,7 @@ sub_806CF78: ; 806CF78 mov r1, r8 strb r0, [r1] ldr r0, =gUnknown_085CA459 - bl sub_814E6F0 + bl get_battle_strings_ @0806D02E: adds r6, 0x2 adds r5, 0x1 @@ -194018,7 +194060,7 @@ sub_806CF78: ; 806CF78 ldrb r0, [r0] strb r0, [r1] ldr r0, =gUnknown_085CA424 - bl sub_814E6F0 + bl get_battle_strings_ @0806D04E: ldr r0, =0x02022e2c pop {r3} @@ -195023,7 +195065,7 @@ sub_806D778: ; 806D778 ldr r4, =gSpeciesNames adds r0, r4 mov r1, r9 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @0806D7D4 mov r2, r8 @@ -195141,8 +195183,8 @@ sub_806D864: ; 806D864 bx r1 thumb_func_end sub_806D864 - thumb_func_start sub_806D888 -sub_806D888: ; 806D888 + thumb_func_start read_trainer_data_byte2 +read_trainer_data_byte2: ; 806D888 push {r4,r5,lr} lsls r0, 16 lsrs r4, r0, 16 @@ -195180,7 +195222,7 @@ sub_806D888: ; 806D888 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_806D888 + thumb_func_end read_trainer_data_byte2 thumb_func_start nature_stat_mod nature_stat_mod: ; 806D8D4 @@ -195973,8 +196015,8 @@ sub_806DE44: ; 806DE44 .pool thumb_func_end sub_806DE44 - thumb_func_start atkE5_pickupitemcalculation -atkE5_pickupitemcalculation: ; 806DEC4 + thumb_func_start sub_806DEC4 +sub_806DEC4: ; 806DEC4 push {r4-r7,lr} sub sp, 0x4 adds r7, r0, 0 @@ -196058,7 +196100,7 @@ atkE5_pickupitemcalculation: ; 806DEC4 pop {r4-r7} pop {r0} bx r0 - thumb_func_end atkE5_pickupitemcalculation + thumb_func_end sub_806DEC4 thumb_func_start sub_806DF74 sub_806DF74: ; 806DF74 @@ -196886,7 +196928,7 @@ song_id_for_battle: ; 806E42C ldr r1, =gTrainers + 0x4 ; name offset adds r0, r1 ldr r1, =gUnknown_085CCB98 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @0806E63C b @0806E5F2 @@ -197427,7 +197469,7 @@ sub_806E994: ; 806E994 strb r0, [r4, 0x4] ldr r0, =gUnknown_085CB2A1 ldr r1, =0x02021fc4 - bl sub_814E764 + bl get_battle_strings pop {r4,r5} pop {r0} bx r0 @@ -197498,7 +197540,7 @@ sub_806EA68: ; 806EA68 cmp r0, 0 bne @0806EAC6 adds r0, r5, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0xE @@ -199599,7 +199641,7 @@ pokemon_get_nick: ; 806FA2C bl pokemon_getattr adds r0, r4, 0 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 add sp, 0x14 pop {r4} pop {r1} @@ -199616,7 +199658,7 @@ pokemon_get_nick_: ; 806FA4C bl pokemon_getattr_encrypted adds r0, r4, 0 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 add sp, 0x14 pop {r4} pop {r1} @@ -199754,14 +199796,14 @@ sub_806FB38: ; 806FB38 adds r0, 0x74 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r4, r5, 0 adds r4, 0x7C adds r0, r6, 0 adds r1, r4, 0 bl pokemon_get_nick adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes adds r4, 0xB ldrb r1, [r4] movs r0, 0x10 @@ -200131,7 +200173,7 @@ sub_806FE54: ; 806FE54 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =0x02021cc4 adds r0, r5, 0 bl pokemon_get_nick_ @@ -200161,7 +200203,7 @@ sub_806FE88: ; 806FE88 adds r1, r4, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 pop {r4,r5} pop {r1} @@ -200561,7 +200603,7 @@ sub_8070114: ; 8070114 str r4, [r0] @080701AC: movs r0, 0x86 - bl flag_set + bl FlagSet pop {r4-r7} pop {r0} bx r0 @@ -200583,7 +200625,7 @@ sub_80701B8: ; 80701B8 lsrs r0, 16 str r0, [r4] movs r0, 0x86 - bl flag_set + bl FlagSet pop {r4} pop {r0} bx r0 @@ -201903,7 +201945,7 @@ sub_8070C04: ; 8070C04 bl pokemon_getattr_encrypted ldr r0, =0x02021ec4 mov r1, sp - bl gf_strcpy + bl CopyString @08070C2E: adds r4, 0x8C adds r0, r4, 0 @@ -202252,7 +202294,7 @@ sp0B9_daycare_relationship_comment: ; 8070E8C lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -202366,7 +202408,7 @@ sub_8070F48: ; 8070F48 ldr r1, =gUnknown_0832DACB @08070F86: adds r0, r4, 0 - bl gf_strcat + bl AppendString pop {r4} pop {r1} bx r1 @@ -202427,20 +202469,20 @@ sub_8070FB4: ; 8070FB4 bls @08070FCC adds r0, r7, 0 mov r1, sp - bl gf_strcpy + bl CopyString ldr r4, =gUnknown_085EF881 adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString adds r0, r7, 0 mov r1, r9 - bl gf_strcat + bl AppendString adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString ldr r1, =gUnknown_085EF883 adds r0, r7, 0 - bl gf_strcat + bl AppendString add sp, 0x28 pop {r3,r4} mov r8, r3 @@ -202464,7 +202506,7 @@ sub_8071038: ; 8071038 @08071046: adds r0, r4, 0 ldr r1, =gUnknown_085EF888 - bl gf_strcat + bl AppendString movs r0, 0x8C adds r2, r5, 0 muls r2, r0 @@ -202480,13 +202522,13 @@ sub_8071038: ; 8071038 mov r0, sp movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 mov r1, sp - bl gf_strcat + bl AppendString adds r0, r4, 0 ldr r1, =gUnknown_085EF881 - bl gf_strcat + bl AppendString adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -202604,7 +202646,7 @@ sub_8071148: ; 8071148 lsrs r5, 24 ldr r1, =gUnknown_085EF888 mov r0, sp - bl gf_strcpy + bl CopyString movs r0, 0x8C adds r1, r6, 0 muls r1, r0 @@ -202620,10 +202662,10 @@ sub_8071148: ; 8071148 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r0, sp adds r1, r4, 0 - bl gf_strcat + bl AppendString movs r0, 0x1 mov r1, sp movs r2, 0x70 @@ -203114,7 +203156,7 @@ sub_807158C: ; 807158C adds r6, 0x7C mov r0, sp adds r1, r6, 0 - bl sub_80092BC + bl CompareStringWithoutExtendedControlCodes adds r5, r4, 0 adds r5, 0x74 cmp r0, 0 @@ -203122,13 +203164,13 @@ sub_807158C: ; 807158C ldr r0, =0x03005d90 ldr r0, [r0] adds r1, r5, 0 - bl sub_80092BC + bl CompareStringWithoutExtendedControlCodes cmp r0, 0 beq @08071608 @080715CE: ldr r0, =0x02021cc4 mov r1, sp - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r4, 0x87 ldrb r2, [r4] @@ -203824,7 +203866,7 @@ sub_8071A94: ; 8071A94 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085ED5A5 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, [r5] ldrb r0, [r0, 0x8] movs r1, 0xFF @@ -203877,7 +203919,7 @@ sub_8071A94: ; 8071A94 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085ED5BE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, [r5] ldrb r0, [r0, 0x8] movs r1, 0x1 @@ -204619,7 +204661,7 @@ sub_807228C: ; 807228C cmp r0, 0 bne @080722CC adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x28 @@ -205778,7 +205820,7 @@ healthbar_draw_level: ; 8072B94 adds r0, 0x6 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r1, r0, 0 subs r1, 0x2 add r0, sp, 0x4 @@ -205882,7 +205924,7 @@ heathbar_draw_hp: ; 8072C38 add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r0, sp, 0x24 str r0, [sp] add r0, sp, 0x4 @@ -205904,7 +205946,7 @@ heathbar_draw_hp: ; 8072C38 add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r1, sp, 0x4 movs r0, 0xBA strb r0, [r1, 0x3] @@ -205998,7 +206040,7 @@ heathbar_draw_hp: ; 8072C38 asrs r1, 16 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x020244d4 ldr r0, [r0] movs r1, 0xBA @@ -206114,7 +206156,7 @@ sub_8072E0C: ; 8072E0C add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r0, sp, 0x28 str r0, [sp] add r0, sp, 0x4 @@ -206148,7 +206190,7 @@ sub_8072E0C: ; 8072E0C add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r1, sp, 0x4 movs r0, 0xBA strb r0, [r1, 0x3] @@ -206214,12 +206256,12 @@ sub_8072E0C: ; 8072E0C asrs r1, 16 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r3, r8 cmp r3, 0 bne @08072F82 ldr r1, =gUnknown_085E8D3E - bl gf_strcpy + bl CopyString @08072F82: ldr r0, =0x020244d4 ldr r0, [r0] @@ -206417,7 +206459,7 @@ sub_80730D4: ; 80730D4 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 movs r1, 0x9 mov r2, sp @@ -206553,14 +206595,14 @@ sub_80730D4: ; 80730D4 adds r0, 0x6 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r5] adds r0, 0x7B ldrb r1, [r0] ldr r0, [sp, 0x1C] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r1, sp movs r0, 0 strb r0, [r1, 0x5] @@ -208484,16 +208526,16 @@ sub_80741E8: ; 80741E8 ldr r5, =0x02022e2c ldr r1, =gUnknown_085ED228 adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0x2 add r2, sp, 0x4 bl pokemon_getattr add r0, sp, 0x4 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r5, 0 add r1, sp, 0x4 - bl gf_strcat + bl AppendString adds r5, r0, 0 adds r0, r4, 0 bl pokemon_get_gender @@ -208515,7 +208557,7 @@ sub_80741E8: ; 80741E8 ldr r0, =gSpeciesNames adds r1, r0 add r0, sp, 0x4 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @0807424A movs r6, 0x64 @@ -208537,7 +208579,7 @@ sub_80741E8: ; 80741E8 ldr r1, =gUnknown_085ED233 @08074272: adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02022e2c add r1, sp, 0x10 str r1, [sp] @@ -209155,12 +209197,12 @@ sub_80747D8: ; 80747D8 lsrs r4, 24 ldr r1, =gUnknown_085CCB3C add r0, sp, 0x4 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a04c ldrb r1, [r1] movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0 add r1, sp, 0x4 movs r2, 0x2F @@ -216833,7 +216875,7 @@ shedinja_maker_maybe: ; 8078458 bl pokemon_getattr mov r0, sp ldr r1, =gUnknown_0832DF94 - bl sub_80092BC + bl CompareStringWithoutExtendedControlCodes cmp r0, 0 bne @08078766 adds r0, r4, 0 @@ -219200,7 +219242,7 @@ sub_8079A3C: ; 8079A3C @08079A74: adds r0, r4, 0 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 movs r0, 0 movs r1, 0x2 bl fbox_get_field @@ -219278,7 +219320,7 @@ sub_8079AA4: ; 8079AA4 bls @08079ADE ldr r1, =gUnknown_0832DABC adds r0, r6, 0 - bl gf_strcpy + bl CopyString movs r4, 0 @08079B20: lsls r0, r4, 1 @@ -219293,11 +219335,11 @@ sub_8079AA4: ; 8079AA4 ldr r0, =gMoveNames adds r1, r0 adds r0, r6, 0 - bl gf_strcat + bl AppendString @08079B3C: adds r0, r6, 0 ldr r1, =gUnknown_0832DAD2 - bl gf_strcat + bl AppendString adds r0, r4, 0x1 lsls r0, 16 lsrs r4, r0, 16 @@ -219309,10 +219351,10 @@ sub_8079AA4: ; 8079AA4 @08079B5C: ldr r1, =gUnknown_0832DABC adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_0832DADF adds r0, r6, 0 - bl gf_strcat + bl AppendString @08079B6C: add sp, 0x8 pop {r3,r4} @@ -219400,7 +219442,7 @@ sub_8079BE0: ; 8079BE0 bl pokemon_getattr adds r0, r5, 0 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r6, 0 adds r1, r4, 0 adds r2, r5, 0 @@ -222278,7 +222320,7 @@ sub_807B270: ; 807B270 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r5, =0x02024744 adds r0, r5, 0 movs r1, 0x7 @@ -222287,7 +222329,7 @@ sub_807B270: ; 807B270 adds r0, r4, 0 adds r0, 0x1C mov r1, sp - bl gf_strcpy + bl CopyString subs r4, 0x8 movs r0, 0 mov r8, r0 @@ -223130,7 +223172,7 @@ sub_807BAD8: ; 807BAD8 ldr r0, =0x020229f0 adds r1, r0 adds r0, r3, 0 - bl gf_strcpy + bl CopyString ldr r5, =0x02032298 ldrb r0, [r5, 0x1] movs r1, 0x6 @@ -223146,7 +223188,7 @@ sub_807BAD8: ; 807BAD8 bl pokemon_getattr ldr r0, =0x02021ec4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldrb r0, [r5] muls r0, r4 ldr r1, =0x020244ec @@ -223156,7 +223198,7 @@ sub_807BAD8: ; 807BAD8 bl pokemon_getattr ldr r0, =0x02021dc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 b @0807BBA4 .align 2, 0 .pool @@ -223171,10 +223213,10 @@ sub_807BAD8: ; 807BAD8 ldr r0, =0x02021cc4 adds r1, r4, 0 adds r1, 0x2B - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r4, 0 - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x020375e2 ldrh r1, [r0] movs r0, 0x64 @@ -223186,7 +223228,7 @@ sub_807BAD8: ; 807BAD8 bl pokemon_getattr ldr r0, =0x02021dc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 @0807BBA4: add sp, 0x14 pop {r4,r5} @@ -223609,7 +223651,7 @@ sub_807BBEC: ; 807BBEC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE942 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -223676,7 +223718,7 @@ sub_807BBEC: ; 807BBEC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE959 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -225118,7 +225160,7 @@ sub_807BBEC: ; 807BBEC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE966 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -225192,7 +225234,7 @@ sub_807BBEC: ; 807BBEC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE977 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -225725,7 +225767,7 @@ sub_807CFC8: ; 807CFC8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE942 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -225792,7 +225834,7 @@ sub_807CFC8: ; 807CFC8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE959 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -227278,7 +227320,7 @@ sub_807CFC8: ; 807CFC8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE966 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -227352,7 +227394,7 @@ sub_807CFC8: ; 807CFC8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE977 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -227908,12 +227950,12 @@ sub_807E73C: ; 807E73C muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r4, 0xC] muls r1, r6 adds r1, r5 - bl gf_strcpy + bl CopyString ldrh r0, [r4, 0x38] pop {r4-r6} pop {r1} @@ -227944,14 +227986,14 @@ sub_807E784: ; 807E784 bl pokemon_getattr ldr r0, =0x02021cc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x02021dc4 ldrh r2, [r4, 0xC] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString add sp, 0x20 pop {r4} pop {r0} @@ -228159,7 +228201,7 @@ sub_807E974: ; 807E974 adds r1, r6, 0 adds r1, 0x2B adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0 bl sub_81DB4DC @@ -228550,7 +228592,7 @@ sub_807EB50: ; 807EB50 ldr r1, =gUnknown_082C8959 @0807EDA6: adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -228989,7 +229031,7 @@ sub_807F14C: ; 807F14C cmp r5, 0 beq @0807F18A ldr r0, =0x0000089b - bl flag_set + bl FlagSet @0807F18A: pop {r4,r5} pop {r0} @@ -229396,7 +229438,7 @@ sub_807F464: ; 807F464 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF6D2 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -229432,7 +229474,7 @@ sub_807F464: ; 807F464 ldr r4, =0x02021fc4 ldr r1, =gUnknown_082C8959 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -230459,12 +230501,12 @@ sub_807FE14: ; 807FE14 adds r0, 0x7C lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo adds r4, r0, 0 strh r5, [r6] adds r0, r6, 0x2 adds r1, r4, 0 - bl gf_strcpy + bl CopyString ldrb r0, [r4, 0x15] strb r0, [r6, 0x9] ldrb r0, [r4, 0x16] @@ -230518,10 +230560,10 @@ sub_807FE54: ; 807FE54 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0xD0 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @0807FEC8 @@ -230529,7 +230571,7 @@ sub_807FE54: ; 807FE54 adds r0, 0x1C ldr r1, =gUnknown_083397D0 ldr r1, [r1, 0xC] - bl gf_strcpy + bl CopyString b @0807FED4 .align 2, 0 .pool @@ -230538,7 +230580,7 @@ sub_807FE54: ; 807FE54 adds r0, 0x1C ldr r1, =gUnknown_083397D0 ldr r1, [r1] - bl gf_strcpy + bl CopyString @0807FED4: ldr r1, =0x020229e8 movs r0, 0x2 @@ -230559,16 +230601,16 @@ sub_807FE54: ; 807FE54 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r6, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 adds r0, 0x1C ldr r4, =gUnknown_083397D0 ldr r1, [r4, 0x10] - bl gf_strcpy + bl CopyString adds r0, r6, 0 adds r0, 0x38 ldr r1, [r4, 0x8] - bl gf_strcpy + bl CopyString adds r0, r6, 0 subs r0, 0x8 strh r5, [r0, 0x1A] @@ -230590,20 +230632,20 @@ sub_807FE54: ; 807FE54 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r5, 0 adds r0, 0x1C ldr r4, =gUnknown_083397D0 ldr r1, [r4, 0x14] - bl gf_strcpy + bl CopyString adds r0, r5, 0 adds r0, 0x38 ldr r1, [r4, 0x4] - bl gf_strcpy + bl CopyString adds r0, r5, 0 adds r0, 0x54 ldr r1, [r4, 0x8] - bl gf_strcpy + bl CopyString adds r0, r5, 0 subs r0, 0x8 movs r1, 0x2 @@ -231480,7 +231522,7 @@ sub_8080674: ; 8080674 ldrb r5, [r0] movs r0, 0xD0 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @0808071A @@ -231660,7 +231702,7 @@ sub_80807BC: ; 80807BC ldr r0, =0x020229f0 adds r1, r0 add r0, sp, 0x8 - bl gf_strcpy + bl CopyString movs r0, 0x1 add r1, sp, 0x8 movs r2, 0x38 @@ -232204,7 +232246,7 @@ sub_80808D4: ; 80808D4 bne @08080D44 movs r0, 0xD0 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08080D30 @@ -233662,7 +233704,7 @@ help_system_is_not_first_time: ; 8081964 bne @080819A2 adds r0, r4, 0x2 adds r1, r5, 0x2 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @080819B0 ldr r0, [r4, 0x8] @@ -235389,7 +235431,7 @@ sub_8082644: ; 8082644 ldr r0, =0x020229f0 adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_083398DD b @08082740 .align 2, 0 @@ -235410,11 +235452,11 @@ sub_8082644: ; 8082644 ldr r0, =0x020229f0 adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_083398B0 @08082740: adds r0, r4, 0 - bl gf_strcat + bl AppendString b @080828DC .align 2, 0 .pool @@ -235702,7 +235744,7 @@ sub_8082924: ; 8082924 strh r2, [r0] ldr r0, =0x02021fc4 ldr r1, =gUnknown_08339896 - bl gf_strcpy + bl CopyString b @08082A92 .align 2, 0 .pool @@ -235719,7 +235761,7 @@ sub_8082924: ; 8082924 strh r2, [r0] ldr r0, =0x02021fc4 ldr r1, =gUnknown_08339858 - bl gf_strcpy + bl CopyString b @08082A92 .align 2, 0 .pool @@ -237207,15 +237249,15 @@ sub_8083450: ; 8083450 mov r1, r8 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl gf_strcat + bl AppendString ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_085E8D5E - bl gf_strcat + bl AppendString ldr r0, [r7] adds r0, 0x9F lsls r4, r5, 3 @@ -237223,7 +237265,7 @@ sub_8083450: ; 8083450 lsls r4, 2 ldr r3, =0x020229f0 adds r1, r4, r3 - bl gf_strcat + bl AppendString ldr r1, [r7] adds r1, 0x9F mov r0, r9 @@ -237246,17 +237288,17 @@ sub_8083450: ; 8083450 lsls r1, 1 adds r5, r1 adds r1, r5, 0 - bl gf_strcpy + bl CopyString ldr r0, [r7] adds r0, 0x9F ldr r2, =0x020229e8 adds r4, r2 ldrb r1, [r4, 0x1A] - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339914 - bl gf_strcat + bl AppendString ldr r1, [r7] adds r1, 0x9F movs r3, 0xFF @@ -237303,11 +237345,11 @@ sub_8083450: ; 8083450 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl gf_strcat + bl AppendString ldr r0, [r6] adds r0, 0x4E ldrh r0, [r0] @@ -237319,15 +237361,15 @@ sub_8083450: ; 8083450 ldr r0, [sp, 0x48] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r6] adds r0, 0x9F ldr r1, [sp, 0x48] - bl gf_strcat + bl AppendString ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_0833993C - bl gf_strcat + bl AppendString ldr r1, [r6] adds r1, 0x9F movs r0, 0x1 @@ -237377,19 +237419,19 @@ sub_8083450: ; 8083450 adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339921 - bl gf_strcat + bl AppendString adds r1, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339928 - bl gf_strcat + bl AppendString ldr r1, [r6] adds r1, 0x9F movs r0, 0x1 @@ -237566,13 +237608,13 @@ sub_80838AC: ; 80838AC adds r0, r1 ldr r1, [r0] adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_0833979D adds r0, r6, 0 - bl gf_strcat + bl AppendString ldr r1, =gUnknown_08339943 adds r0, r6, 0 - bl gf_strcat + bl AppendString adds r0, r5, 0 bl sub_8136EA4 adds r4, r0, 0 @@ -237585,32 +237627,32 @@ sub_80838AC: ; 80838AC lsrs r5, 24 ldr r1, =gUnknown_0833994F adds r0, r6, 0 - bl gf_strcat + bl AppendString mov r0, sp adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 mov r1, sp - bl gf_strcat + bl AppendString ldr r1, =gUnknown_0833995D adds r0, r6, 0 - bl gf_strcat + bl AppendString mov r0, sp adds r1, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 mov r1, sp - bl gf_strcat + bl AppendString ldr r1, =gUnknown_08339970 adds r0, r6, 0 - bl gf_strcat + bl AppendString ldr r1, =gUnknown_0833979B adds r0, r6, 0 - bl gf_strcat + bl AppendString add sp, 0xC pop {r4-r6} pop {r0} @@ -238048,15 +238090,15 @@ sub_8083B08: ; 8083B08 mov r1, r8 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl gf_strcat + bl AppendString ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_085E8D5E - bl gf_strcat + bl AppendString ldr r0, [r7] adds r0, 0x9F lsls r1, r5, 3 @@ -238064,7 +238106,7 @@ sub_8083B08: ; 8083B08 lsls r1, 2 ldr r2, =0x020229f0 adds r1, r2 - bl gf_strcat + bl AppendString ldr r1, [r7] adds r1, 0x9F ldr r0, [sp, 0x8] @@ -238091,7 +238133,7 @@ sub_8083B08: ; 8083B08 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -238112,7 +238154,7 @@ sub_8083B08: ; 8083B08 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -238133,7 +238175,7 @@ sub_8083B08: ; 8083B08 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -238285,10 +238327,10 @@ sub_8083E24: ; 8083E24 add r0, sp, 0xC movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 ldr r1, =gUnknown_08339941 - bl gf_strcat + bl AppendString adds r5, r0, 0 adds r0, r4, 0 movs r1, 0x64 @@ -238297,10 +238339,10 @@ sub_8083E24: ; 8083E24 adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 ldr r1, =gUnknown_0833993C - bl gf_strcat + bl AppendString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x8C @@ -238439,7 +238481,7 @@ sub_8083F94: ; 8083F94 ldr r5, =0x020229f0 adds r1, r5 adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 bl sub_81370B4 strb r0, [r7, 0xB] @@ -238494,7 +238536,7 @@ sub_8083F94: ; 8083F94 ldr r5, =0x020229f0 adds r1, r5 adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 bl sub_81370B4 strb r0, [r7, 0xB] @@ -239214,15 +239256,15 @@ flag_var_implications_of_teleport_: ; 8084660 push {lr} bl player_avatar_init_params_reset ldr r0, =0x0000088b - bl flag_clear + bl FlagReset ldr r0, =0x0000088d - bl flag_clear + bl FlagReset ldr r0, =0x0000088c - bl flag_clear + bl FlagReset ldr r0, =0x00000889 - bl flag_clear + bl FlagReset ldr r0, =0x00000888 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -239234,15 +239276,15 @@ new_game: ; 808469C push {lr} bl player_avatar_init_params_reset ldr r0, =0x0000088b - bl flag_clear + bl FlagReset ldr r0, =0x0000088d - bl flag_clear + bl FlagReset ldr r0, =0x0000088c - bl flag_clear + bl FlagReset ldr r0, =0x00000889 - bl flag_clear + bl FlagReset ldr r0, =0x00000888 - bl flag_clear + bl FlagReset ldr r0, =gUnknown_08271862 bl script_env_2_execute_new_script pop {r0} @@ -239256,15 +239298,15 @@ flagmods_08054D70: ; 80846E4 push {lr} bl player_avatar_init_params_reset ldr r0, =0x0000088b - bl flag_clear + bl FlagReset ldr r0, =0x0000088d - bl flag_clear + bl FlagReset ldr r0, =0x0000088c - bl flag_clear + bl FlagReset ldr r0, =0x00000889 - bl flag_clear + bl FlagReset ldr r0, =0x00000888 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -239276,28 +239318,28 @@ sub_8084720: ; 8084720 push {r4,lr} bl player_avatar_init_params_reset ldr r0, =0x0000088b - bl flag_clear + bl FlagReset ldr r0, =0x0000088d - bl flag_clear + bl FlagReset ldr r0, =0x0000088c - bl flag_clear + bl FlagReset ldr r0, =0x00000889 - bl flag_clear + bl FlagReset ldr r0, =0x00000888 - bl flag_clear + bl FlagReset ldr r4, =0x00004039 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 bne @08084764 adds r0, r4, 0 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x00004037 movs r1, 0 - bl var_set + bl VarSet @08084764: pop {r4} pop {r0} @@ -239310,7 +239352,7 @@ sub_8084720: ; 8084720 sub_8084788: ; 8084788 push {lr} ldr r0, =0x0000088c - bl flag_clear + bl FlagReset bl sub_8085B2C bl wild_pokemon_reroll bl mapnumbers_history_shift_sav1_0_2_4_out @@ -240709,7 +240751,7 @@ mli0_load_map: ; 8085160 cmp r5, 0 beq @08085200 ldr r0, =0x00000888 - bl flag_clear + bl FlagReset @08085200: bl update_sav1_flash_used_on_map bl sav1_reset_x2C @@ -240862,7 +240904,7 @@ sub_808532C: ; 808532C cmp r4, 0x8 beq @08085348 ldr r0, =0x0000088d - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08085382 @@ -240876,7 +240918,7 @@ sub_808532C: ; 808532C @08085354: lsls r0, r5, 24 lsrs r0, 24 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -240916,7 +240958,7 @@ sub_808538C: ; 808538C lsls r3, 24 lsrs r5, r3, 24 ldr r0, =0x0000088d - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080853AC @@ -241064,7 +241106,7 @@ update_sav1_flash_used_on_map: ; 8085494 .pool @080854B0: ldr r0, =0x00000888 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080854D0 @@ -241163,7 +241205,7 @@ sub_8085558: ; 8085558 push {r4,lr} adds r4, r0, 0 ldr r0, =0x0000088a - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080855AC @@ -241183,7 +241225,7 @@ sub_8085558: ; 8085558 bge @0808559E @08085584: ldr r0, =0x0000405e - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x3 @@ -241212,7 +241254,7 @@ sub_80855B4: ; 80855B4 push {r4,lr} adds r4, r0, 0 ldr r0, =0x000040ca - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -241243,7 +241285,7 @@ sub_80855E8: ; 80855E8 push {r4,lr} adds r4, r0, 0 ldr r0, =0x000040b3 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @08085606 @@ -241273,12 +241315,12 @@ sub_8085618: ; 8085618 adds r5, r0, 0 ldr r4, =0x0000405d adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @0808564C adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -241540,7 +241582,7 @@ sav1_reset_x2C: ; 8085800 sub_8085810: ; 8085810 push {r4-r6,lr} ldr r0, =0x00004001 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -241670,7 +241712,7 @@ music_something: ; 8085910 lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x00004001 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -241684,7 +241726,7 @@ music_something: ; 8085910 cmp r5, r0 bne @08085972 ldr r0, =0x000040ca - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -241759,7 +241801,7 @@ sub_80859BC: ; 80859BC bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 beq @08085A2C @@ -241874,7 +241916,7 @@ wild_encounter_related: ; 8085A3C cmp r0, 0 bne @08085AB6 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x44 @@ -248574,8 +248616,8 @@ sub_8088DF0: ; 8088DF0 bx r1 thumb_func_end sub_8088DF0 - thumb_func_start is_tile_x38 -is_tile_x38: ; 8088E14 + thumb_func_start MetatileBehavior_IsJumpEast +MetatileBehavior_IsJumpEast: ; 8088E14 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248588,10 +248630,10 @@ is_tile_x38: ; 8088E14 @08088E24: pop {r1} bx r1 - thumb_func_end is_tile_x38 + thumb_func_end MetatileBehavior_IsJumpEast - thumb_func_start is_tile_x39 -is_tile_x39: ; 8088E28 + thumb_func_start MetatileBehavior_IsJumpWest +MetatileBehavior_IsJumpWest: ; 8088E28 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248604,10 +248646,10 @@ is_tile_x39: ; 8088E28 @08088E38: pop {r1} bx r1 - thumb_func_end is_tile_x39 + thumb_func_end MetatileBehavior_IsJumpWest - thumb_func_start is_tile_x3A -is_tile_x3A: ; 8088E3C + thumb_func_start MetatileBehavior_IsJumpNorth +MetatileBehavior_IsJumpNorth: ; 8088E3C push {lr} lsls r0, 24 lsrs r0, 24 @@ -248620,10 +248662,10 @@ is_tile_x3A: ; 8088E3C @08088E4C: pop {r1} bx r1 - thumb_func_end is_tile_x3A + thumb_func_end MetatileBehavior_IsJumpNorth - thumb_func_start is_tile_x3B -is_tile_x3B: ; 8088E50 + thumb_func_start MetatileBehavior_IsJumpSouth +MetatileBehavior_IsJumpSouth: ; 8088E50 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248636,7 +248678,7 @@ is_tile_x3B: ; 8088E50 @08088E60: pop {r1} bx r1 - thumb_func_end is_tile_x3B + thumb_func_end MetatileBehavior_IsJumpSouth thumb_func_start sub_8088E64 sub_8088E64: ; 8088E64 @@ -248676,8 +248718,8 @@ is_x21_or_x2B: ; 8088E80 bx r1 thumb_func_end is_x21_or_x2B - thumb_func_start zero_0 -zero_0: ; 8088E98 + thumb_func_start MetatileBehavior_IsDeepSand +MetatileBehavior_IsDeepSand: ; 8088E98 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248690,10 +248732,10 @@ zero_0: ; 8088E98 @08088EA8: pop {r1} bx r1 - thumb_func_end zero_0 + thumb_func_end MetatileBehavior_IsDeepSand - thumb_func_start is_water_tile_2 -is_water_tile_2: ; 8088EAC + thumb_func_start MetatileBehavior_IsReflective +MetatileBehavior_IsReflective: ; 8088EAC push {lr} lsls r0, 24 lsrs r0, 24 @@ -248717,10 +248759,10 @@ is_water_tile_2: ; 8088EAC @08088ED0: pop {r1} bx r1 - thumb_func_end is_water_tile_2 + thumb_func_end MetatileBehavior_IsReflective - thumb_func_start is_tile_x23_2 -is_tile_x23_2: ; 8088ED4 + thumb_func_start MetatileBehavior_IsIce +MetatileBehavior_IsIce: ; 8088ED4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248733,7 +248775,7 @@ is_tile_x23_2: ; 8088ED4 @08088EE4: pop {r1} bx r1 - thumb_func_end is_tile_x23_2 + thumb_func_end MetatileBehavior_IsIce thumb_func_start is_tile_x69_2_warp_door is_tile_x69_2_warp_door: ; 8088EE8 @@ -248858,8 +248900,8 @@ sub_8088F74: ; 8088F74 bx r1 thumb_func_end sub_8088F74 - thumb_func_start is_tile_grass_maybe -is_tile_grass_maybe: ; 8088F88 + thumb_func_start is_tile_water_maybe +is_tile_water_maybe: ; 8088F88 push {lr} lsls r0, 24 lsrs r0, 24 @@ -248879,7 +248921,7 @@ is_tile_grass_maybe: ; 8088F88 @08088FA6: pop {r1} bx r1 - thumb_func_end is_tile_grass_maybe + thumb_func_end is_tile_water_maybe thumb_func_start is_tile_x62_warp_arrow_right is_tile_x62_warp_arrow_right: ; 8088FAC @@ -249795,8 +249837,8 @@ is_tile_x02_or_xD1: ; 8089448 bx r1 thumb_func_end is_tile_x02_or_xD1 - thumb_func_start is_tile_tallgrass -is_tile_tallgrass: ; 808945C + thumb_func_start MetatileBehavior_IsLongGrass +MetatileBehavior_IsLongGrass: ; 808945C push {lr} lsls r0, 24 lsrs r0, 24 @@ -249809,10 +249851,10 @@ is_tile_tallgrass: ; 808945C @0808946C: pop {r1} bx r1 - thumb_func_end is_tile_tallgrass + thumb_func_end MetatileBehavior_IsLongGrass - thumb_func_start is_tile_xA0 -is_tile_xA0: ; 8089470 + thumb_func_start MetatileBehavior_IsBerryTreeSoil +MetatileBehavior_IsBerryTreeSoil: ; 8089470 push {lr} lsls r0, 24 lsrs r0, 24 @@ -249825,10 +249867,10 @@ is_tile_xA0: ; 8089470 @08089480: pop {r1} bx r1 - thumb_func_end is_tile_xA0 + thumb_func_end MetatileBehavior_IsBerryTreeSoil - thumb_func_start sub_8089484 -sub_8089484: ; 8089484 + thumb_func_start MetatileBehavior_IsAsh +MetatileBehavior_IsAsh: ; 8089484 push {lr} lsls r0, 24 lsrs r0, 24 @@ -249841,7 +249883,7 @@ sub_8089484: ; 8089484 @08089494: pop {r1} bx r1 - thumb_func_end sub_8089484 + thumb_func_end MetatileBehavior_IsAsh thumb_func_start sub_8089498 sub_8089498: ; 8089498 @@ -249947,7 +249989,7 @@ sub_808952C: ; 808952C lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @08089550 @@ -249973,7 +250015,7 @@ sub_8089558: ; 8089558 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -250167,7 +250209,7 @@ sub_8089660: ; 8089660 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 beq @08089682 @@ -253029,7 +253071,7 @@ cur_mapdata_get_door_sound_at: ; 808A930 sub_808A964: ; 808A964 push {lr} ldr r0, =0x00004002 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0808A990 @@ -253871,7 +253913,7 @@ sub_808AF00: ; 808AF00 beq @0808AFB0 movs r0, 0x8C lsls r0, 4 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0808AFB0 @@ -254056,7 +254098,7 @@ sub_808B094: ; 808B094 asrs r7, r4, 16 adds r1, r7, 0 adds r2, r6, 0 - bl sub_808B214 + bl ShouldDoJump lsls r0, 24 cmp r0, 0 beq @0808B108 @@ -254206,8 +254248,8 @@ sub_808B1BC: ; 808B1BC bx r1 thumb_func_end sub_808B1BC - thumb_func_start sub_808B214 -sub_808B214: ; 808B214 + thumb_func_start ShouldDoJump +ShouldDoJump: ; 808B214 push {lr} lsls r2, 24 lsrs r2, 24 @@ -254215,7 +254257,7 @@ sub_808B214: ; 808B214 asrs r0, 16 lsls r1, 16 asrs r1, 16 - bl cur_mapdata_role_x38_to_x3B__by_direction + bl GetJumpDirection lsls r0, 24 cmp r0, 0 bne @0808B230 @@ -254226,7 +254268,7 @@ sub_808B214: ; 808B214 @0808B232: pop {r1} bx r1 - thumb_func_end sub_808B214 + thumb_func_end ShouldDoJump thumb_func_start sub_808B238 sub_808B238: ; 808B238 @@ -254240,7 +254282,7 @@ sub_808B238: ; 808B238 lsls r2, 24 lsrs r7, r2, 24 ldr r0, =0x00000889 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0808B2D8 @@ -254505,7 +254547,7 @@ sub_808B440: ; 808B440 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -254527,7 +254569,7 @@ sub_808B46C: ; 808B46C lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -254552,7 +254594,7 @@ sub_808B4A0: ; 808B4A0 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -254568,8 +254610,8 @@ sub_808B4A0: ; 808B4A0 bx r0 thumb_func_end sub_808B4A0 - thumb_func_start sub_808B4D8 -sub_808B4D8: ; 808B4D8 + thumb_func_start get_on_surf_blob +get_on_surf_blob: ; 808B4D8 push {r4,lr} adds r4, r0, 0 movs r0, 0x3 @@ -254578,7 +254620,7 @@ sub_808B4D8: ; 808B4D8 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -254607,7 +254649,7 @@ sub_808B4D8: ; 808B4D8 bx r0 .align 2, 0 .pool - thumb_func_end sub_808B4D8 + thumb_func_end get_on_surf_blob thumb_func_start sub_808B534 sub_808B534: ; 808B534 @@ -254619,7 +254661,7 @@ sub_808B534: ; 808B534 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -255681,8 +255723,9 @@ sub_808BD3C: ; 808BD3C .pool thumb_func_end sub_808BD3C - thumb_func_start sub_808BD54 -sub_808BD54: ; 808BD54 + thumb_func_start GetPlayerAvatarFieldObjectType +; u8 GetPlayerAvatarFieldObjectType(u8 state, u8 gender) +GetPlayerAvatarFieldObjectType: ; 808BD54 lsls r0, 24 lsls r1, 24 lsrs r1, 24 @@ -255694,7 +255737,7 @@ sub_808BD54: ; 808BD54 bx lr .align 2, 0 .pool - thumb_func_end sub_808BD54 + thumb_func_end GetPlayerAvatarFieldObjectType thumb_func_start sub_808BD6C sub_808BD6C: ; 808BD6C @@ -255727,7 +255770,7 @@ sub_808BD8C: ; 808BD8C lsrs r0, 24 ldr r1, =0x02037590 ldrb r1, [r1, 0x7] - bl sub_808BD54 + bl GetPlayerAvatarFieldObjectType lsls r0, 24 lsrs r0, 24 pop {r1} @@ -256062,6 +256105,7 @@ sub_808BFB0: ; 808BFB0 thumb_func_end sub_808BFB0 thumb_func_start player_avatar_init +; void player_avatar_init(u16 a1, u16 a2, u8 a3, u8 gender) player_avatar_init: ; 808BFE0 push {r4-r6,lr} mov r6, r9 @@ -256089,7 +256133,7 @@ player_avatar_init: ; 808BFE0 strb r0, [r1] movs r0, 0 mov r1, r8 - bl sub_808BD54 + bl GetPlayerAvatarFieldObjectType mov r1, sp movs r3, 0 strb r0, [r1, 0x1] @@ -256226,7 +256270,7 @@ sub_808C114: ; 808C114 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r5, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -256261,7 +256305,7 @@ sub_808C15C: ; 808C15C lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r0, [r6, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -256303,7 +256347,7 @@ sub_808C1B4: ; 808C1B4 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r0, [r6, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -256353,7 +256397,7 @@ sub_808C228: ; 808C228 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r0, [r6, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -256540,8 +256584,8 @@ sub_808C3A4: ; 808C3A4 .pool thumb_func_end sub_808C3A4 - thumb_func_start sub_808C3C4 -sub_808C3C4: ; 808C3C4 + thumb_func_start do_jump_landing_dust +do_jump_landing_dust: ; 808C3C4 push {r4-r6,lr} adds r6, r0, 0 adds r5, r1, 0 @@ -256624,7 +256668,7 @@ sub_808C3C4: ; 808C3C4 bx r1 .align 2, 0 .pool - thumb_func_end sub_808C3C4 + thumb_func_end do_jump_landing_dust thumb_func_start sub_808C484 sub_808C484: ; 808C484 @@ -257082,7 +257126,7 @@ sub_808C814: ; 808C814 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r0, [r4, 0x18] lsls r0, 28 lsrs r0, 28 @@ -257408,7 +257452,7 @@ sub_808CABC: ; 808CABC adds r0, 0x1 strh r0, [r5, 0x8] movs r6, 0 - bl sub_80B56FC + bl GetFishingWildMonListHeader lsls r0, 24 cmp r0, 0 bne @0808CADC @@ -257423,7 +257467,7 @@ sub_808CABC: ; 808CABC cmp r0, 0 bne @0808CB14 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x15 @@ -257685,7 +257729,7 @@ fishA_wait_for_a_pressed: ; 808CCA8 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -257902,7 +257946,7 @@ sub_808CE8C: ; 808CE8C lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 @@ -258898,8 +258942,9 @@ npc_id_by_local_id_ignore_map: ; 808D608 bx r1 thumb_func_end npc_id_by_local_id_ignore_map - thumb_func_start sub_808D644 -sub_808D644: ; 808D644 + thumb_func_start npc_set_data +; u8 npc_set_data(struct rom_npc *romNpc, u8 mapId, u8 mapGroupId) +npc_set_data: ; 808D644 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -258914,7 +258959,7 @@ sub_808D644: ; 808D644 adds r1, r6, 0 adds r2, r7, 0 mov r3, sp - bl sub_808D810 + bl FindMapObjectIndexByLocalId lsls r0, 24 cmp r0, 0 beq @0808D66E @@ -259052,7 +259097,7 @@ sub_808D644: ; 808D644 bx r1 .align 2, 0 .pool - thumb_func_end sub_808D644 + thumb_func_end npc_set_data thumb_func_start sub_808D77C sub_808D77C: ; 808D77C @@ -259087,7 +259132,7 @@ sub_808D77C: ; 808D77C ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] adds r0, r4, 0 - bl sub_808D644 + bl npc_set_data lsls r0, 24 lsrs r0, 24 b @0808D800 @@ -259112,7 +259157,7 @@ sub_808D77C: ; 808D77C cmp r0, r8 bne @0808D7F4 ldrh r0, [r4, 0x14] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0808D7B4 @@ -259134,8 +259179,9 @@ sub_808D77C: ; 808D77C .pool thumb_func_end sub_808D77C - thumb_func_start sub_808D810 -sub_808D810: ; 808D810 + thumb_func_start FindMapObjectIndexByLocalId +; _BOOL1 FindMapObjectIndexByLocalId(u16 localId, u8 mapId, u8 mapGroupId, u8 *mapObjectIndex) +FindMapObjectIndexByLocalId: ; 808D810 push {r4-r7,lr} mov r12, r3 lsls r0, 16 @@ -259223,7 +259269,7 @@ sub_808D810: ; 808D810 bx r1 .align 2, 0 .pool - thumb_func_end sub_808D810 + thumb_func_end FindMapObjectIndexByLocalId thumb_func_start npc_hide npc_hide: ; 808D8B0 @@ -259258,7 +259304,7 @@ npc_hide_by_local_id_and_map: ; 808D8C4 bl rom_npc_id_in_script_by_npc_id lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -259281,7 +259327,7 @@ npc_delete_obj_and_free_tiles_for_npc_type: ; 808D90C sub sp, 0x8 adds r4, r0, 0 ldrb r0, [r4, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrh r2, [r0, 0x6] ldr r1, =0xffff0000 ldr r0, [sp, 0x4] @@ -259341,6 +259387,7 @@ npc_hide_all_but_player: ; 808D958 thumb_func_end npc_hide_all_but_player thumb_func_start npc_spawn_with_provided_template +; signed int npc_spawn_with_provided_template(struct rom_npc *romNpc, struct objtemplate *objTemplate, int mapId, int mapGroupId, s16 a5, s16 a6) npc_spawn_with_provided_template: ; 808D98C push {r4-r7,lr} mov r7, r10 @@ -259363,7 +259410,7 @@ npc_spawn_with_provided_template: ; 808D98C lsls r4, 16 lsrs r4, 16 str r4, [sp] - bl sub_808D644 + bl npc_set_data lsls r0, 24 lsrs r0, 24 mov r9, r0 @@ -259379,7 +259426,7 @@ npc_spawn_with_provided_template: ; 808D98C ldr r1, =0x02037350 adds r6, r0, r1 ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r7, r0, 0 ldrb r0, [r7, 0xC] lsls r0, 28 @@ -259557,6 +259604,7 @@ npc_spawn_with_provided_template: ; 808D98C thumb_func_end npc_spawn_with_provided_template thumb_func_start npc_instanciation_something +; signed int npc_instanciation_something(struct rom_npc *romNpc, u8 mapId, u8 mapGroupId) npc_instanciation_something: ; 808DB40 push {r4-r7,lr} mov r7, r9 @@ -259582,7 +259630,7 @@ npc_instanciation_something: ; 808DB40 str r0, [sp, 0x20] mov r1, r9 ldrb r0, [r1, 0x1] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r7, r0, 0 add r2, sp, 0x20 mov r0, r9 @@ -259786,6 +259834,7 @@ show_sprite: ; 808DCAC thumb_func_end show_sprite thumb_func_start sub_808DCFC +; void sub_808DCFC(u8 a1, int func, struct objtemplate *a3, int a4) sub_808DCFC: ; 808DCFC push {r4-r6,lr} adds r5, r1, 0 @@ -259793,7 +259842,7 @@ sub_808DCFC: ; 808DCFC adds r6, r3, 0 lsls r0, 24 lsrs r0, 24 - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrh r1, [r0] strh r1, [r4] ldrh r1, [r0, 0x2] @@ -259815,6 +259864,7 @@ sub_808DCFC: ; 808DCFC thumb_func_end sub_808DCFC thumb_func_start npc_to_objtemplate__with_indexed_objfunc +; void npc_to_objtemplate__with_indexed_objfunc(u16 graphicsId, u16 functionIndex, struct objtemplate *a3, int a4) npc_to_objtemplate__with_indexed_objfunc: ; 808DD30 push {r4,lr} lsls r0, 16 @@ -259833,6 +259883,7 @@ npc_to_objtemplate__with_indexed_objfunc: ; 808DD30 thumb_func_end npc_to_objtemplate__with_indexed_objfunc thumb_func_start rom_npc_to_template +; void rom_npc_to_template(struct rom_npc *romNpc, struct objtemplate *objTemplate, int a3) rom_npc_to_template: ; 808DD50 push {r4,r5,lr} adds r4, r0, 0 @@ -259954,7 +260005,7 @@ sprite_new: ; 808DE0C lsrs r4, 24 mov r10, r4 adds r0, r5, 0 - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r4, r0, 0 ldr r1, =sub_8097AC8 add r3, sp, 0x1C @@ -260205,7 +260256,7 @@ npc_culling_maybe: ; 808DF80 cmp r0, r1 blt @0808E06E ldrh r0, [r4, 0x14] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @0808E06E @@ -260446,7 +260497,7 @@ sub_808E1B8: ; 808E1B8 movs r0, 0 str r0, [sp, 0x20] ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r5, r0, 0 ldrh r2, [r5, 0x6] ldr r1, =0xffff0000 @@ -260684,8 +260735,9 @@ sub_808E3C4: ; 808E3C4 .pool thumb_func_end sub_808E3C4 - thumb_func_start sub_808E3F8 -sub_808E3F8: ; 808E3F8 + thumb_func_start set_field_object_graphics +; void set_field_object_graphics(npc_state *npcState, u8 graphicsId) +set_field_object_graphics: ; 808E3F8 push {r4-r7,lr} mov r7, r8 push {r7} @@ -260694,7 +260746,7 @@ sub_808E3F8: ; 808E3F8 lsrs r1, 24 mov r8, r1 mov r0, r8 - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r6, r0, 0 ldrb r1, [r7, 0x4] lsls r0, r1, 4 @@ -260816,7 +260868,7 @@ sub_808E3F8: ; 808E3F8 pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_808E3F8 + thumb_func_end set_field_object_graphics thumb_func_start sub_808E504 sub_808E504: ; 808E504 @@ -260843,7 +260895,7 @@ sub_808E504: ; 808E504 ldr r1, =0x02037350 adds r0, r1 adds r1, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics @0808E538: add sp, 0x4 pop {r4} @@ -260947,8 +260999,9 @@ sub_808E5D4: ; 808E5D4 .pool thumb_func_end sub_808E5D4 - thumb_func_start sub_808E5F4 -sub_808E5F4: ; 808E5F4 + thumb_func_start get_berry_tree_graphics +; void get_berry_tree_graphics(npc_state *npcState, struct obj *obj) +get_berry_tree_graphics: ; 808E5F4 push {r4-r7,lr} adds r5, r0, 0 adds r7, r1, 0 @@ -260963,7 +261016,7 @@ sub_808E5F4: ; 808E5F4 orrs r0, r1 strb r0, [r4] ldrb r0, [r5, 0x1D] - bl sub_80E19C8 + bl get_berry_tree_stage lsls r0, 24 lsrs r6, r0, 24 cmp r6, 0 @@ -260979,7 +261032,7 @@ sub_808E5F4: ; 808E5F4 ands r0, r1 strb r0, [r4] ldrb r0, [r5, 0x1D] - bl sub_80E19AC + bl get_berry_tree_type subs r0, 0x1 lsls r0, 24 lsrs r4, r0, 24 @@ -260997,7 +261050,7 @@ sub_808E5F4: ; 808E5F4 adds r0, r6 ldrb r1, [r0] adds r0, r5, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldr r0, =gBerryTreePicTablePointers adds r0, r4, r0 ldr r0, [r0] @@ -261022,10 +261075,11 @@ sub_808E5F4: ; 808E5F4 bx r0 .align 2, 0 .pool - thumb_func_end sub_808E5F4 + thumb_func_end get_berry_tree_graphics - thumb_func_start npc_get_type -npc_get_type: ; 808E694 + thumb_func_start GetFieldObjectGraphicsInfo +; npc_type *GetFieldObjectGraphicsInfo(u8 graphicsId) +GetFieldObjectGraphicsInfo: ; 808E694 push {lr} lsls r0, 24 lsrs r1, r0, 24 @@ -261035,7 +261089,7 @@ npc_get_type: ; 808E694 adds r0, 0x10 lsls r0, 24 lsrs r0, 24 - bl var_load_x4010_plus_r0 + bl VarGetFieldObjectGraphicsId adds r1, r0, 0 @0808E6AC: cmp r1, 0x45 @@ -261063,7 +261117,7 @@ npc_get_type: ; 808E694 bx r1 .align 2, 0 .pool - thumb_func_end npc_get_type + thumb_func_end GetFieldObjectGraphicsInfo thumb_func_start sub_808E6DC sub_808E6DC: ; 808E6DC @@ -261075,7 +261129,7 @@ sub_808E6DC: ; 808E6DC adds r0, 0x10 lsls r0, 24 lsrs r0, 24 - bl var_load_x4010_plus_r0 + bl VarGetFieldObjectGraphicsId strb r0, [r4, 0x5] @0808E6F2: pop {r4} @@ -261386,6 +261440,7 @@ sub_808E8F4: ; 808E8F4 thumb_func_end sub_808E8F4 thumb_func_start pal_patch_for_npc +; void pal_patch_for_npc(u16 tag, u8 slot) pal_patch_for_npc: ; 808E91C push {r4,lr} adds r4, r1, 0 @@ -261415,6 +261470,7 @@ pal_patch_for_npc: ; 808E91C thumb_func_end pal_patch_for_npc thumb_func_start pal_patch_for_npc_range +; void pal_patch_for_npc_range(u16 *tags, u8 minSlot, u8 maxSlot) pal_patch_for_npc_range: ; 808E954 push {r4-r6,lr} adds r5, r0, 0 @@ -261482,6 +261538,7 @@ npc_pal_idx_for_given_tag: ; 808E980 thumb_func_end npc_pal_idx_for_given_tag thumb_func_start npc_load_two_palettes__no_record +; void npc_load_two_palettes__no_record(u16 tag, u8 slot) npc_load_two_palettes__no_record: ; 808E9C8 push {r4-r6,lr} lsls r0, 16 @@ -261535,6 +261592,7 @@ npc_load_two_palettes__no_record: ; 808E9C8 thumb_func_end npc_load_two_palettes__no_record thumb_func_start npc_load_two_palettes__and_record +; void npc_load_two_palettes__and_record(u16 tag, u8 slot) npc_load_two_palettes__and_record: ; 808EA38 push {r4-r6,lr} lsls r0, 16 @@ -261664,7 +261722,7 @@ sub_808EB08: ; 808EB08 ldr r1, =0x02020630 adds r7, r0, r1 ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo mov r8, r0 lsls r4, 16 asrs r4, 16 @@ -264365,7 +264423,7 @@ sub_808FE2C: ; 808FE2C bne @0808FE58 adds r0, r5, 0 adds r1, r4, 0 - bl sub_808E5F4 + bl get_berry_tree_graphics ldrh r1, [r4, 0x3C] movs r0, 0x1 orrs r0, r1 @@ -264401,8 +264459,8 @@ sub_808FE70: ; 808FE70 .pool thumb_func_end sub_808FE70 - thumb_func_start sub_808FE90 -sub_808FE90: ; 808FE90 + thumb_func_start do_berry_tree_growth_sparkle_1 +do_berry_tree_growth_sparkle_1: ; 808FE90 push {r4-r7,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -264418,7 +264476,7 @@ sub_808FE90: ; 808FE90 orrs r0, r1 strb r0, [r6] ldrb r0, [r4, 0x1D] - bl sub_80E19C8 + bl get_berry_tree_stage lsls r0, 24 lsrs r7, r0, 24 cmp r7, 0 @@ -264477,7 +264535,7 @@ sub_808FE90: ; 808FE90 bne @0808FF3C adds r0, r4, 0 adds r1, r5, 0 - bl sub_808E5F4 + bl get_berry_tree_graphics adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x39 @@ -264493,7 +264551,7 @@ sub_808FE90: ; 808FE90 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_808FE90 + thumb_func_end do_berry_tree_growth_sparkle_1 thumb_func_start sub_808FF48 sub_808FF48: ; 808FF48 @@ -264515,8 +264573,8 @@ sub_808FF48: ; 808FF48 bx r1 thumb_func_end sub_808FF48 - thumb_func_start sub_808FF68 -sub_808FF68: ; 808FF68 + thumb_func_start do_berry_tree_growth_sparkle_2 +do_berry_tree_growth_sparkle_2: ; 808FF68 push {r4,lr} ldrb r2, [r0] movs r3, 0x2 @@ -264554,7 +264612,7 @@ sub_808FF68: ; 808FF68 bx r1 .align 2, 0 .pool - thumb_func_end sub_808FF68 + thumb_func_end do_berry_tree_growth_sparkle_2 thumb_func_start sub_808FFB4 sub_808FFB4: ; 808FFB4 @@ -264589,7 +264647,7 @@ sub_808FFB4: ; 808FFB4 @0808FFEC: adds r0, r3, 0 adds r1, r4, 0 - bl sub_808E5F4 + bl get_berry_tree_graphics movs r0, 0x4 strh r0, [r4, 0x30] movs r0, 0 @@ -268971,7 +269029,7 @@ sub_8091F94: ; 8091F94 lsls r2, 24 lsrs r5, r2, 24 adds r6, r5, 0 - bl sub_81D49E8 + bl is_faraway_island_mew lsls r0, 24 cmp r0, 0 beq @08091FFC @@ -269662,8 +269720,8 @@ mss_08062EA4: ; 80924D8 .pool thumb_func_end mss_08062EA4 - thumb_func_start sub_809253C -sub_809253C: ; 809253C + thumb_func_start do_ninja_boy_tree_disguise +do_ninja_boy_tree_disguise: ; 809253C push {r4-r6,lr} adds r5, r0, 0 movs r1, 0x2E @@ -269715,7 +269773,7 @@ sub_809253C: ; 809253C bx r0 .align 2, 0 .pool - thumb_func_end sub_809253C + thumb_func_end do_ninja_boy_tree_disguise thumb_func_start sub_80925AC sub_80925AC: ; 80925AC @@ -269726,8 +269784,8 @@ sub_80925AC: ; 80925AC bx r1 thumb_func_end sub_80925AC - thumb_func_start sub_80925B8 -sub_80925B8: ; 80925B8 + thumb_func_start do_ninja_boy_mountain_disguise +do_ninja_boy_mountain_disguise: ; 80925B8 push {r4-r6,lr} adds r5, r0, 0 movs r1, 0x2E @@ -269779,7 +269837,7 @@ sub_80925B8: ; 80925B8 bx r0 .align 2, 0 .pool - thumb_func_end sub_80925B8 + thumb_func_end do_ninja_boy_mountain_disguise thumb_func_start sub_8092628 sub_8092628: ; 8092628 @@ -271616,6 +271674,7 @@ npc_get_state_or_xFF: ; 80932A8 thumb_func_end npc_get_state_or_xFF thumb_func_start meta_step +; void meta_step(npc_state *npcState, int a2, int func_ptr) meta_step: ; 80932C0 push {r4-r6,lr} adds r4, r0, 0 @@ -272449,6 +272508,7 @@ state_to_direction: ; 809384C thumb_func_end state_to_direction thumb_func_start npc_obj_exec_an_2 +; void npc_obj_exec_an_2(npc_state *npcState, int a2) npc_obj_exec_an_2: ; 809388C push {r4,lr} adds r4, r0, 0 @@ -273617,6 +273677,7 @@ maybe_shadow_1: ; 8094080 thumb_func_end maybe_shadow_1 thumb_func_start sub_80940C4 +; int sub_80940C4(int a1, int a2, int a3) sub_80940C4: ; 80940C4 push {r4-r7,lr} mov r7, r8 @@ -276452,12 +276513,13 @@ sub_8095480: ; 8095480 thumb_func_end sub_8095480 thumb_func_start sub_8095490 +; int sub_8095490(npc_state *npcState, int a2) sub_8095490: ; 8095490 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 ldrb r0, [r4, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrb r1, [r0, 0xC] lsls r1, 25 lsrs r1, 31 @@ -276498,8 +276560,8 @@ sub_80954CC: ; 80954CC bx lr thumb_func_end sub_80954CC - thumb_func_start sub_80954DC -sub_80954DC: ; 80954DC + thumb_func_start do_exclamation_mark_bubble_1 +do_exclamation_mark_bubble_1: ; 80954DC push {r4,lr} adds r4, r1, 0 ldr r1, =0x02038c08 @@ -276516,10 +276578,10 @@ sub_80954DC: ; 80954DC bx r1 .align 2, 0 .pool - thumb_func_end sub_80954DC + thumb_func_end do_exclamation_mark_bubble_1 - thumb_func_start sub_8095500 -sub_8095500: ; 8095500 + thumb_func_start do_exclamation_mark_bubble_2 +do_exclamation_mark_bubble_2: ; 8095500 push {r4,lr} adds r4, r1, 0 ldr r1, =0x02038c08 @@ -276536,10 +276598,10 @@ sub_8095500: ; 8095500 bx r1 .align 2, 0 .pool - thumb_func_end sub_8095500 + thumb_func_end do_exclamation_mark_bubble_2 - thumb_func_start sub_8095524 -sub_8095524: ; 8095524 + thumb_func_start do_heart_bubble +do_heart_bubble: ; 8095524 push {r4,lr} adds r4, r1, 0 ldr r1, =0x02038c08 @@ -276556,7 +276618,7 @@ sub_8095524: ; 8095524 bx r1 .align 2, 0 .pool - thumb_func_end sub_8095524 + thumb_func_end do_heart_bubble thumb_func_start sub_8095548 sub_8095548: ; 8095548 @@ -278866,7 +278928,7 @@ sub_8096530: ; 8096530 ands r0, r1 strb r0, [r5, 0x1] ldrb r0, [r5, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r6, r0, 0 adds r0, r4, 0 adds r0, 0x3E @@ -279068,6 +279130,7 @@ dp03_build_bits_1: ; 8096680 thumb_func_end dp03_build_bits_1 thumb_func_start npc_analyze_ground +; void npc_analyze_ground(struct npc_state *fieldObject, struct obj *object) npc_analyze_ground: ; 80966D8 push {r4,r5,lr} adds r4, r0, 0 @@ -279216,7 +279279,7 @@ dp03_build_bits_tall_grass_1: ; 80967EC push {r4,lr} adds r4, r1, 0 ldrb r0, [r0, 0x1E] - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @08096804 @@ -279235,7 +279298,7 @@ dp03_build_bits_tall_grass_0: ; 809680C push {r4,lr} adds r4, r1, 0 ldrb r0, [r0, 0x1E] - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @08096824 @@ -279255,7 +279318,7 @@ dp03_build_bits_sand: ; 809682C adds r4, r0, 0 adds r5, r1, 0 ldrb r0, [r4, 0x1F] - bl zero_0 + bl MetatileBehavior_IsDeepSand lsls r0, 24 cmp r0, 0 beq @08096846 @@ -279292,12 +279355,12 @@ dp03_build_bits_unknown_1: ; 809686C adds r4, r0, 0 adds r5, r1, 0 ldrb r0, [r4, 0x1E] - bl zero_0 + bl MetatileBehavior_IsDeepSand lsls r0, 24 cmp r0, 0 beq @080968AA ldrb r0, [r4, 0x1F] - bl zero_0 + bl MetatileBehavior_IsDeepSand lsls r0, 24 cmp r0, 0 beq @080968AA @@ -279536,6 +279599,7 @@ dp03_build_bits_bubbles: ; 8096A10 thumb_func_end dp03_build_bits_bubbles thumb_func_start dp03_build_bits_by_block_behaviour +; void dp03_build_bits_by_block_behaviour(struct npc_state *fieldObject, struct obj *object) dp03_build_bits_by_block_behaviour: ; 8096A30 push {r4-r7,lr} mov r7, r8 @@ -279593,7 +279657,7 @@ npcs_and_water_something: ; 8096A8C sub sp, 0x8 adds r5, r0, 0 ldrb r0, [r5, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo movs r2, 0x8 ldrsh r1, [r0, r2] adds r1, 0x8 @@ -279626,7 +279690,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 mov r9, r4 @@ -279641,7 +279705,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -279669,7 +279733,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -279684,7 +279748,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -279699,7 +279763,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -279714,7 +279778,7 @@ npcs_and_water_something: ; 8096A8C bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl is_reflective_tile + bl MetatileBehavior_GetReflectionType lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -279747,13 +279811,13 @@ npcs_and_water_something: ; 8096A8C bx r1 thumb_func_end npcs_and_water_something - thumb_func_start is_reflective_tile -is_reflective_tile: ; 8096BDC + thumb_func_start MetatileBehavior_GetReflectionType +MetatileBehavior_GetReflectionType: ; 8096BDC push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl is_tile_x23_2 + bl MetatileBehavior_IsIce lsls r0, 24 cmp r0, 0 beq @08096BF2 @@ -279761,7 +279825,7 @@ is_reflective_tile: ; 8096BDC b @08096C04 @08096BF2: adds r0, r4, 0 - bl is_water_tile_2 + bl MetatileBehavior_IsReflective lsls r0, 24 cmp r0, 0 bne @08096C02 @@ -279773,10 +279837,10 @@ is_reflective_tile: ; 8096BDC pop {r4} pop {r1} bx r1 - thumb_func_end is_reflective_tile + thumb_func_end MetatileBehavior_GetReflectionType - thumb_func_start cur_mapdata_role_x38_to_x3B__by_direction -cur_mapdata_role_x38_to_x3B__by_direction: ; 8096C0C + thumb_func_start GetJumpDirection +GetJumpDirection: ; 8096C0C push {r4,lr} lsls r0, 16 lsrs r3, r0, 16 @@ -279824,10 +279888,11 @@ cur_mapdata_role_x38_to_x3B__by_direction: ; 8096C0C pop {r4} pop {r1} bx r1 - thumb_func_end cur_mapdata_role_x38_to_x3B__by_direction + thumb_func_end GetJumpDirection - thumb_func_start npc_shuffle_bits_in_tall_grass -npc_shuffle_bits_in_tall_grass: ; 8096C68 + thumb_func_start npc_priority_in_long_grass +; void npc_priority_in_long_grass(struct npc_state *fieldObject, struct obj *object) +npc_priority_in_long_grass: ; 8096C68 push {r4-r6,lr} adds r5, r0, 0 adds r4, r1, 0 @@ -279836,12 +279901,12 @@ npc_shuffle_bits_in_tall_grass: ; 8096C68 cmp r0, 0 blt @08096CBC ldrb r0, [r5, 0x1E] - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @08096CBC ldrb r0, [r5, 0x1F] - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @08096CBC @@ -279871,7 +279936,7 @@ npc_shuffle_bits_in_tall_grass: ; 8096C68 pop {r4-r6} pop {r0} bx r0 - thumb_func_end npc_shuffle_bits_in_tall_grass + thumb_func_end npc_priority_in_long_grass thumb_func_start cur_mapdata_height_mismatch cur_mapdata_height_mismatch: ; 8096CC4 @@ -279909,6 +279974,7 @@ cur_mapdata_height_mismatch: ; 8096CC4 thumb_func_end cur_mapdata_height_mismatch thumb_func_start sub_8096D00 +; void sub_8096D00(struct npc_state *fieldObject, struct obj *object) sub_8096D00: ; 8096D00 push {r4,r5,lr} adds r4, r0, 0 @@ -280305,23 +280371,23 @@ sub_8096FCC: ; 8096FCC bx r0 thumb_func_end sub_8096FCC - thumb_func_start sub_8096FD8 -sub_8096FD8: ; 8096FD8 + thumb_func_start do_feet_in_flowing_water_effect +do_feet_in_flowing_water_effect: ; 8096FD8 push {lr} adds r1, r0, 0 movs r0, 0x22 bl oe_exec_and_other_stuff pop {r0} bx r0 - thumb_func_end sub_8096FD8 + thumb_func_end do_feet_in_flowing_water_effect - thumb_func_start sub_8096FE8 -sub_8096FE8: ; 8096FE8 + thumb_func_start step_sand_light +step_sand_light: ; 8096FE8 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 ldrb r0, [r4, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldr r1, =gUnknown_0850E654 ldrb r0, [r0, 0xD] lsls r0, 2 @@ -280336,7 +280402,7 @@ sub_8096FE8: ; 8096FE8 bx r0 .align 2, 0 .pool - thumb_func_end sub_8096FE8 + thumb_func_end step_sand_light thumb_func_start dp03_step_sand_heavy dp03_step_sand_heavy: ; 8097014 @@ -280344,7 +280410,7 @@ dp03_step_sand_heavy: ; 8097014 adds r4, r0, 0 adds r5, r1, 0 ldrb r0, [r4, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldr r1, =gUnknown_0850E654 ldrb r0, [r0, 0xD] lsls r0, 2 @@ -280366,8 +280432,8 @@ nullsub_93: ; 8097040 bx lr thumb_func_end nullsub_93 - thumb_func_start sub_8097044 -sub_8097044: ; 8097044 + thumb_func_start do_sand_step_footprint_effect +do_sand_step_footprint_effect: ; 8097044 push {r4,r5,lr} sub sp, 0x4 adds r5, r0, 0 @@ -280403,10 +280469,10 @@ sub_8097044: ; 8097044 bx r0 .align 2, 0 .pool - thumb_func_end sub_8097044 + thumb_func_end do_sand_step_footprint_effect - thumb_func_start sub_8097094 -sub_8097094: ; 8097094 + thumb_func_start do_sand_step_bike_tire_tracks_effect +do_sand_step_bike_tire_tracks_effect: ; 8097094 push {r4,lr} adds r4, r0, 0 ldr r1, [r4, 0x10] @@ -280445,15 +280511,15 @@ sub_8097094: ; 8097094 bx r0 .align 2, 0 .pool - thumb_func_end sub_8097094 + thumb_func_end do_sand_step_bike_tire_tracks_effect - thumb_func_start sub_80970E4 -sub_80970E4: ; 80970E4 + thumb_func_start step_puddle +step_puddle: ; 80970E4 push {lr} - bl sub_8097E14 + bl do_puddle_step_effect pop {r0} bx r0 - thumb_func_end sub_80970E4 + thumb_func_end step_puddle thumb_func_start dp03_step_splash_small dp03_step_splash_small: ; 80970F0 @@ -280631,15 +280697,15 @@ dp03_step_grass_tiny: ; 8097220 bx r0 thumb_func_end dp03_step_grass_tiny - thumb_func_start sub_8097230 -sub_8097230: ; 8097230 + thumb_func_start do_hot_springs_water_effect +do_hot_springs_water_effect: ; 8097230 push {lr} adds r1, r0, 0 movs r0, 0x2A bl oe_exec_and_other_stuff pop {r0} bx r0 - thumb_func_end sub_8097230 + thumb_func_end do_hot_springs_water_effect thumb_func_start dp03_step_bubbles dp03_step_bubbles: ; 8097240 @@ -280667,7 +280733,7 @@ ground_call_by_bits: ; 8097260 adds r6, r0, 0 adds r7, r1, 0 adds r5, r2, 0 - bl sub_81D49E8 + bl is_faraway_island_mew lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -280779,7 +280845,7 @@ dp03_something_2: ; 8097310 bl dp03_build_bits_2 adds r0, r4, 0 adds r1, r5, 0 - bl npc_shuffle_bits_in_tall_grass + bl npc_priority_in_long_grass ldr r2, [sp] adds r0, r4, 0 adds r1, r5, 0 @@ -280818,7 +280884,7 @@ dp03_something: ; 809735C bl dp03_build_bits_1 adds r0, r4, 0 adds r1, r5, 0 - bl npc_shuffle_bits_in_tall_grass + bl npc_priority_in_long_grass adds r0, r4, 0 mov r1, sp bl sub_80972BC @@ -280842,6 +280908,7 @@ dp03_something: ; 809735C thumb_func_end dp03_something thumb_func_start ground_effects +; void ground_effects(struct npc_state *fieldObject, struct obj *object) ground_effects: ; 80973B0 push {r4,r5,lr} sub sp, 0x4 @@ -280860,7 +280927,7 @@ ground_effects: ; 80973B0 bl npc_analyze_ground adds r0, r4, 0 adds r1, r5, 0 - bl npc_shuffle_bits_in_tall_grass + bl npc_priority_in_long_grass adds r0, r4, 0 mov r1, sp bl ground_bits_filter_small_splashes @@ -281993,7 +282060,7 @@ sub_8097BB4: ; 8097BB4 ldr r1, =0x02020630 adds r4, r0, r1 adds r0, r5, 0 - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrh r3, [r4, 0x4] lsls r3, 22 ldr r1, [r0, 0x10] @@ -282322,12 +282389,12 @@ do_animation_x03: ; 8097DF8 bx r0 thumb_func_end do_animation_x03 - thumb_func_start sub_8097E14 -sub_8097E14: ; 8097E14 + thumb_func_start do_puddle_step_effect +do_puddle_step_effect: ; 8097E14 push {r4,lr} adds r4, r1, 0 ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldr r2, =0x02038c08 movs r3, 0x20 ldrsh r1, [r4, r3] @@ -282351,7 +282418,7 @@ sub_8097E14: ; 8097E14 bx r0 .align 2, 0 .pool - thumb_func_end sub_8097E14 + thumb_func_end do_puddle_step_effect thumb_func_start sub_8097E50 sub_8097E50: ; 8097E50 @@ -282484,7 +282551,7 @@ sub_8097EF0: ; 8097EF0 cmp r7, 0x1 bne @08097F68 ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrb r1, [r0, 0xC] lsls r1, 25 lsrs r1, 31 @@ -282924,7 +282991,7 @@ sub_8098238: ; 8098238 bne @08098270 ldr r0, =0x02021fc4 adds r1, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, =sub_8098214 movs r1, 0 bl AddTask @@ -283011,7 +283078,7 @@ textbox_fdecode_auto_and_task_add: ; 80982DC adds r4, r1, 0 ldr r0, =0x02021fc4 adds r1, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 @@ -284797,10 +284864,10 @@ mapheader_get_first_match_from_tagged_ptr_list: ; 8098FE0 orrs r5, r0 adds r6, 0x2 adds r0, r1, 0 - bl var_get + bl VarGet adds r4, r0, 0 adds r0, r5, 0 - bl var_get + bl VarGet lsls r4, 16 lsls r0, 16 cmp r4, r0 @@ -285220,7 +285287,7 @@ s26_extended_cmd_setvar: ; 8099318 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r6, r0, 0 ldr r4, =gUnknown_081DBA64 adds r0, r5, 0 @@ -285794,7 +285861,7 @@ s16_u16_gvar_to_const: ; 8099720 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r4, r0, 0 adds r0, r5, 0 bl script_read_halfword @@ -285812,13 +285879,13 @@ s19_u16_gvar_gvar: ; 8099744 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer ldrh r0, [r0] strh r0, [r5] movs r0, 0 @@ -285834,13 +285901,13 @@ s1A_u16_gvar_gvar: ; 8099770 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet strh r0, [r5] movs r0, 0 pop {r4,r5} @@ -286011,7 +286078,7 @@ s21_cmp_u16_gvar_const: ; 80998B0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer ldrh r5, [r0] adds r0, r4, 0 bl script_read_halfword @@ -286034,13 +286101,13 @@ s22_cmp_u16_gvar_gvar: ; 80998E0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer ldrh r2, [r5] ldrh r1, [r0] adds r0, r2, 0 @@ -286059,7 +286126,7 @@ s17_u16_gvar_add_const: ; 8099914 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r4, r0, 0 adds r0, r5, 0 bl script_read_halfword @@ -286079,13 +286146,13 @@ sub_809993C: ; 809993C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldrh r1, [r5] subs r1, r0 strh r1, [r5] @@ -286101,7 +286168,7 @@ s8F_get_random_val: ; 809996C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286127,7 +286194,7 @@ sub_80999A0: ; 80999A0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286135,7 +286202,7 @@ sub_80999A0: ; 80999A0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 ldr r5, =0x020375f0 lsls r1, 24 @@ -286160,7 +286227,7 @@ sub_80999E4: ; 80999E4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286168,7 +286235,7 @@ sub_80999E4: ; 80999E4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 ldr r5, =0x020375f0 lsls r1, 24 @@ -286193,7 +286260,7 @@ sub_8099A28: ; 8099A28 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286201,7 +286268,7 @@ sub_8099A28: ; 8099A28 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 ldr r5, =0x020375f0 lsls r1, 24 @@ -286226,7 +286293,7 @@ sub_8099A6C: ; 8099A6C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286234,7 +286301,7 @@ sub_8099A6C: ; 8099A6C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 ldr r5, =0x020375f0 lsls r1, 24 @@ -286258,7 +286325,7 @@ s48_get_item_type: ; 8099AB0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r4, =0x020375f0 @@ -286281,7 +286348,7 @@ sub_8099ADC: ; 8099ADC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286289,7 +286356,7 @@ sub_8099ADC: ; 8099ADC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -286314,7 +286381,7 @@ sub_8099B20: ; 8099B20 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286322,7 +286389,7 @@ sub_8099B20: ; 8099B20 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -286346,7 +286413,7 @@ sub_8099B64: ; 8099B64 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -286368,7 +286435,7 @@ sub_8099B90: ; 8099B90 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -286390,7 +286457,7 @@ sub_8099BBC: ; 8099BBC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -286412,7 +286479,7 @@ sub_8099BE8: ; 8099BE8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -286435,7 +286502,7 @@ s29_flag_set: ; 8099C14 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet movs r0, 0 pop {r1} bx r1 @@ -286448,7 +286515,7 @@ s2A_flag_clear: ; 8099C28 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl flag_clear + bl FlagReset movs r0, 0 pop {r1} bx r1 @@ -286462,7 +286529,7 @@ s2B_flag_check: ; 8099C3C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet strb r0, [r4, 0x2] movs r0, 0 pop {r4} @@ -286508,7 +286575,7 @@ s99_unknown: ; 8099C8C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_80854EC @@ -286683,7 +286750,7 @@ s2C_unknown: ; 8099DD8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -286691,7 +286758,7 @@ s2C_unknown: ; 8099DD8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -286745,7 +286812,7 @@ sA4_set_weather_data: ; 8099E54 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_80AED7C @@ -286796,7 +286863,7 @@ sA7_set_new_map_footer: ; 8099EA0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_8085524 @@ -286830,7 +286897,7 @@ s39_warp_sfx: ; 8099EBC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286838,7 +286905,7 @@ s39_warp_sfx: ; 8099EBC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -286895,7 +286962,7 @@ s3A_warp_new_music: ; 8099F44 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286903,7 +286970,7 @@ s3A_warp_new_music: ; 8099F44 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -286960,7 +287027,7 @@ s3B_warp_keep_music: ; 8099FCC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -286968,7 +287035,7 @@ s3B_warp_keep_music: ; 8099FCC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287083,7 +287150,7 @@ s3D_warp_v4: ; 809A0C8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287091,7 +287158,7 @@ s3D_warp_v4: ; 809A0C8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287147,7 +287214,7 @@ sub_809A150: ; 809A150 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287155,7 +287222,7 @@ sub_809A150: ; 809A150 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287211,7 +287278,7 @@ s3E_set_new_map: ; 809A1D8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287219,7 +287286,7 @@ s3E_set_new_map: ; 809A1D8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287273,7 +287340,7 @@ s3F_set_new_map_DMA: ; 809A258 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287281,7 +287348,7 @@ s3F_set_new_map_DMA: ; 809A258 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287337,7 +287404,7 @@ sub_809A2DC: ; 809A2DC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287345,7 +287412,7 @@ sub_809A2DC: ; 809A2DC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287399,7 +287466,7 @@ sub_809A35C: ; 809A35C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287407,7 +287474,7 @@ sub_809A35C: ; 809A35C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287461,7 +287528,7 @@ sC4_unknown: ; 809A3DC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287469,7 +287536,7 @@ sC4_unknown: ; 809A3DC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -287507,13 +287574,13 @@ s42_get_map_camera_pos: ; 809A45C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer ldr r2, =0x03005d8c ldr r1, [r2] ldrh r1, [r1] @@ -287736,7 +287803,7 @@ s4F_execute_movement: ; 809A5E8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287767,7 +287834,7 @@ s50_execute_movement_remote: ; 809A62C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287819,7 +287886,7 @@ s51_waitmove: ; 809A698 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -287855,7 +287922,7 @@ s52_waitmove_remote: ; 809A6EC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -287891,7 +287958,7 @@ s53_hide_sprite: ; 809A740 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 ldr r1, =0x03005d8c @@ -287913,7 +287980,7 @@ s54_hide_sprite_set_coords: ; 809A768 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r4, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -287936,7 +288003,7 @@ s55_show_sprite: ; 809A798 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 ldr r1, =0x03005d8c @@ -287958,7 +288025,7 @@ s56_show_sprite_set_coords: ; 809A7C0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r4, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -287983,7 +288050,7 @@ s57_move_sprites: ; 809A7F0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -287991,7 +288058,7 @@ s57_move_sprites: ; 809A7F0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -287999,7 +288066,7 @@ s57_move_sprites: ; 809A7F0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r5, 24 lsrs r5, 24 ldr r1, =0x03005d8c @@ -288030,7 +288097,7 @@ s63_new_sprite_location_permanent: ; 809A858 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -288038,7 +288105,7 @@ s63_new_sprite_location_permanent: ; 809A858 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -288046,7 +288113,7 @@ s63_new_sprite_location_permanent: ; 809A858 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r2, r0, 0 lsls r5, 24 lsrs r5, 24 @@ -288069,7 +288136,7 @@ s64_set_sprite_top_left_corner: ; 809A8B0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 ldr r1, =0x03005d8c @@ -288091,7 +288158,7 @@ s58_npc_f1_clear_x20: ; 809A8D8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r4, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -288116,7 +288183,7 @@ s59_npc_f1_set_x20: ; 809A908 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r4, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -288141,7 +288208,7 @@ sA8_unknown: ; 809A938 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r5, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -288171,7 +288238,7 @@ sA9_unknown: ; 809A974 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r3, [r4, 0x8] ldrb r2, [r3] adds r3, 0x1 @@ -288224,7 +288291,7 @@ s5B_npc_set_direction: ; 809A9DC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r1, [r4, 0x8] ldrb r3, [r1] adds r1, 0x1 @@ -288251,7 +288318,7 @@ s65_set_sprite_behaviour: ; 809AA10 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r2, [r4, 0x8] ldrb r1, [r2] adds r2, 0x1 @@ -288284,7 +288351,7 @@ sAA_create_new_sprite: ; 809AA38 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -288292,7 +288359,7 @@ sAA_create_new_sprite: ; 809AA38 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r3, r0, 0 ldr r0, [r5, 0x8] ldrb r2, [r0] @@ -288794,7 +288861,7 @@ sub_809ADF8: ; 809ADF8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r3, [r4, 0x8] @@ -288861,7 +288928,7 @@ sub_809AE6C: ; 809AE6C ldr r4, =0x02021fc4 adds r1, 0x6 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r2, 0x1 negs r2, r2 movs r0, 0x6 @@ -289027,7 +289094,7 @@ s7D_load_pokename: ; 809AFBC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_085102D4 @@ -289039,7 +289106,7 @@ s7D_load_pokename: ; 809AFBC ldr r0, =gSpeciesNames adds r1, r0 adds r0, r2, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289074,7 +289141,7 @@ s7E_load_first_pokenames: ; 809AFFC ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289093,7 +289160,7 @@ s7F_load_pokename_team: ; 809B048 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -289108,7 +289175,7 @@ s7F_load_pokename_team: ; 809B048 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 movs r0, 0 pop {r4} pop {r1} @@ -289127,7 +289194,7 @@ s80_load_item_name: ; 809B090 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_085102D4 @@ -289155,7 +289222,7 @@ sub_809B0C4: ; 809B0C4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -289163,7 +289230,7 @@ sub_809B0C4: ; 809B0C4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r2, r0, 0 lsls r2, 16 lsrs r2, 16 @@ -289191,7 +289258,7 @@ sub_809B114: ; 809B114 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 ldr r0, =gUnknown_085102D4 @@ -289201,7 +289268,7 @@ sub_809B114: ; 809B114 lsrs r1, 11 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289220,7 +289287,7 @@ s82_load_item_name: ; 809B150 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_085102D4 @@ -289232,7 +289299,7 @@ s82_load_item_name: ; 809B150 ldr r0, =gMoveNames adds r1, r0 adds r0, r2, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289251,7 +289318,7 @@ s83_load_textvar_var: ; 809B190 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -289266,7 +289333,7 @@ s83_load_textvar_var: ; 809B190 ldr r0, [r5] adds r1, r4, 0 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0 pop {r4,r5} pop {r1} @@ -289285,7 +289352,7 @@ s84_load_textvar_std_expression: ; 809B1D4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 ldr r1, =gUnknown_085102D4 lsls r4, 2 @@ -289296,7 +289363,7 @@ s84_load_textvar_std_expression: ; 809B1D4 adds r0, r1 ldr r1, [r0] adds r0, r2, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289315,7 +289382,7 @@ sub_809B214: ; 809B214 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 ldr r0, =gUnknown_085102D4 lsls r4, 2 @@ -289345,7 +289412,7 @@ s85_load_textvar_pointer: ; 809B248 lsls r4, 2 adds r4, r0 ldr r0, [r4] - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289363,7 +289430,7 @@ sBE_virtual_load_text: ; 809B270 ldr r0, [r0] subs r1, r0 ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 pop {r1} bx r1 @@ -289387,7 +289454,7 @@ sBF_virtual_load_textbuffer: ; 809B294 lsls r4, 2 adds r4, r0 ldr r0, [r4] - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289406,7 +289473,7 @@ sC6_load_textvar_box_label: ; 809B2C8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r1, =gUnknown_085102D4 lsls r4, 2 adds r4, r1 @@ -289416,7 +289483,7 @@ sC6_load_textvar_box_label: ; 809B2C8 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -289436,7 +289503,7 @@ s79_give_pokemon: ; 809B304 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r6, r0, 0 lsls r6, 16 lsrs r6, 16 @@ -289449,7 +289516,7 @@ s79_give_pokemon: ; 809B304 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -289491,7 +289558,7 @@ s7A_create_egg: ; 809B384 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r4, =0x020375f0 @@ -289856,7 +289923,7 @@ s60_check_trainer_flag: ; 809B618 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl trainer_flag_check @@ -289873,7 +289940,7 @@ s61_set_trainer_flag: ; 809B63C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl trainer_flag_set @@ -289888,7 +289955,7 @@ s62_unset_trainer_flag: ; 809B658 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl trainer_flag_clear @@ -289972,7 +290039,7 @@ s89_open_casino_game1: ; 809B6F4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 ldr r1, =c2_exit_to_overworld_1_continue_scripts_restart_music @@ -290025,7 +290092,7 @@ sub_809B758: ; 809B758 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -290091,7 +290158,7 @@ s9C_execute_HM: ; 809B7CC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =0x020375d0 @@ -290116,7 +290183,7 @@ s9D_set_HM_animation_data: ; 809B7F4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r1, =0x02038c08 lsls r4, 2 adds r4, r1 @@ -290158,7 +290225,7 @@ s9E_checkarray_HM_animation: ; 809B844 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet ldr r1, =0x020375d0 strh r0, [r1] ldr r1, =sub_809B824 @@ -290178,7 +290245,7 @@ s9F_changeposition_fly: ; 809B870 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_8084D1C @@ -290207,7 +290274,7 @@ sA1_play_cry: ; 809B8A4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290215,7 +290282,7 @@ sA1_play_cry: ; 809B8A4 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -290246,28 +290313,28 @@ sA2_setmaptile: ; 809B8F0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r7, r0, 16 adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 adds r1, r6, 0x7 lsls r1, 16 @@ -290305,7 +290372,7 @@ sAC_open_door: ; 809B970 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -290313,7 +290380,7 @@ sAC_open_door: ; 809B970 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 adds r5, 0x7 @@ -290345,7 +290412,7 @@ sub_809B9C8: ; 809B9C8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290353,7 +290420,7 @@ sub_809B9C8: ; 809B9C8 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 adds r4, 0x7 @@ -290406,7 +290473,7 @@ sub_809BA38: ; 809BA38 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290414,7 +290481,7 @@ sub_809BA38: ; 809BA38 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 adds r4, 0x7 @@ -290439,7 +290506,7 @@ sub_809BA7C: ; 809BA7C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290447,7 +290514,7 @@ sub_809BA7C: ; 809BA7C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 adds r4, 0x7 @@ -290476,17 +290543,17 @@ sub_809BAC0: ; 809BAC0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r0, r4, 0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet movs r0, 0 pop {r4} pop {r1} @@ -290505,7 +290572,7 @@ sB3_get_coin_amount: ; 809BB00 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get_pointer + bl GetVarPointer adds r4, r0, 0 bl sub_8145C30 strh r0, [r4] @@ -290521,7 +290588,7 @@ sub_809BB20: ; 809BB20 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_8145C80 @@ -290552,7 +290619,7 @@ sub_809BB58: ; 809BB58 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_8145CCC @@ -290583,7 +290650,7 @@ sub_809BB90: ; 809BB90 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_81A89A0 @@ -290611,7 +290678,7 @@ sub_809BBC0: ; 809BBC0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_81A8934 @@ -290687,7 +290754,7 @@ sCD_set_obedient_bit: ; 809BC44 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 movs r1, 0x64 @@ -290711,7 +290778,7 @@ sCE_check_obedient_bit: ; 809BC7C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r4, =0x020375f0 @@ -290778,7 +290845,7 @@ sD1_warp_v5: ; 809BCDC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290786,7 +290853,7 @@ sD1_warp_v5: ; 809BCDC bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -290830,7 +290897,7 @@ sub_809BD70: ; 809BD70 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r3, r0, 16 ldr r0, [r4, 0x8] @@ -290884,7 +290951,7 @@ sub_809BDD0: ; 809BDD0 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_085102D4 @@ -290894,7 +290961,7 @@ sub_809BDD0: ; 809BDD0 bl sub_806F07C adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -290913,7 +290980,7 @@ sub_809BE0C: ; 809BE0C bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_085102D4 @@ -290923,7 +290990,7 @@ sub_809BE0C: ; 809BE0C bl sub_806F0B0 adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0 pop {r4} pop {r1} @@ -290965,7 +291032,7 @@ sub_809BE54: ; 809BE54 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -290973,7 +291040,7 @@ sub_809BE54: ; 809BE54 bl script_read_halfword lsls r0, 16 lsrs r0, 16 - bl var_get + bl VarGet mov r1, r9 lsls r1, 24 asrs r1, 24 @@ -291426,7 +291493,7 @@ sub_809C1FC: ; 809C1FC lsrs r2, 24 lsls r1, 24 lsrs r1, 24 - bl onpress_a_get_script + bl TryGetScriptOnPressingA adds r4, r0, 0 cmp r4, 0 bne @0809C214 @@ -291468,8 +291535,8 @@ sub_809C1FC: ; 809C1FC .pool thumb_func_end sub_809C1FC - thumb_func_start onpress_a_get_script -onpress_a_get_script: ; 809C270 + thumb_func_start TryGetScriptOnPressingA +TryGetScriptOnPressingA: ; 809C270 push {r4-r7,lr} mov r7, r8 push {r7} @@ -291482,25 +291549,25 @@ onpress_a_get_script: ; 809C270 adds r7, r4, 0 adds r1, r5, 0 adds r2, r4, 0 - bl sub_809C384 + bl TryGetMapObjectScript cmp r0, 0 bne @0809C2BC adds r0, r6, 0 adds r1, r5, 0 adds r2, r4, 0 - bl sub_809C458 + bl TryGetInvisibleMapObjectScript cmp r0, 0 bne @0809C2BC adds r0, r6, 0 adds r1, r5, 0 adds r2, r4, 0 - bl sub_809C538 + bl TryGetMetatileBehaviorScript cmp r0, 0 bne @0809C2BC adds r0, r6, 0 mov r1, r8 adds r2, r7, 0 - bl sub_809C7EC + bl TryGetFieldMoveScript cmp r0, 0 bne @0809C2BC movs r0, 0 @@ -291510,7 +291577,7 @@ onpress_a_get_script: ; 809C270 pop {r4-r7} pop {r1} bx r1 - thumb_func_end onpress_a_get_script + thumb_func_end TryGetScriptOnPressingA thumb_func_start sub_809C2C8 sub_809C2C8: ; 809C2C8 @@ -291604,8 +291671,8 @@ sub_809C2C8: ; 809C2C8 .pool thumb_func_end sub_809C2C8 - thumb_func_start sub_809C384 -sub_809C384: ; 809C384 + thumb_func_start TryGetMapObjectScript +TryGetMapObjectScript: ; 809C384 push {r4-r7,lr} adds r5, r0, 0 lsls r1, 24 @@ -291704,10 +291771,11 @@ sub_809C384: ; 809C384 bx r1 .align 2, 0 .pool - thumb_func_end sub_809C384 + thumb_func_end TryGetMapObjectScript - thumb_func_start sub_809C458 -sub_809C458: ; 809C458 + thumb_func_start TryGetInvisibleMapObjectScript +; signed int TryGetInvisibleMapObjectScript(int a1, int a2, u8 playerFacingDirection) +TryGetInvisibleMapObjectScript: ; 809C458 push {r4,r5,lr} lsls r2, 24 lsrs r5, r2, 24 @@ -291722,7 +291790,7 @@ sub_809C458: ; 809C458 lsrs r2, 16 ldrb r3, [r0, 0x4] adds r0, r4, 0 - bl sub_809D11C + bl FindInvisibleMapObjectByPosition cmp r0, 0 beq @0809C4CC ldr r2, [r0, 0x8] @@ -291782,7 +291850,7 @@ sub_809C458: ; 809C458 ldr r0, =0x020375e2 strh r2, [r0] ldrh r0, [r1] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -291810,10 +291878,10 @@ sub_809C458: ; 809C458 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_809C458 + thumb_func_end TryGetInvisibleMapObjectScript - thumb_func_start sub_809C538 -sub_809C538: ; 809C538 + thumb_func_start TryGetMetatileBehaviorScript +TryGetMetatileBehaviorScript: ; 809C538 push {r4-r6,lr} adds r6, r0, 0 lsls r1, 24 @@ -292136,15 +292204,15 @@ sub_809C538: ; 809C538 pop {r4-r6} pop {r1} bx r1 - thumb_func_end sub_809C538 + thumb_func_end TryGetMetatileBehaviorScript - thumb_func_start sub_809C7EC -sub_809C7EC: ; 809C7EC + thumb_func_start TryGetFieldMoveScript +TryGetFieldMoveScript: ; 809C7EC push {r4,lr} lsls r1, 24 lsrs r4, r1, 24 ldr r0, =0x0000086b - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -292171,7 +292239,7 @@ sub_809C7EC: ; 809C7EC cmp r0, 0x1 bne @0809C860 ldr r0, =0x0000086e - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -292196,13 +292264,13 @@ sub_809C7EC: ; 809C7EC pop {r4} pop {r1} bx r1 - thumb_func_end sub_809C7EC + thumb_func_end TryGetFieldMoveScript thumb_func_start sub_809C868 sub_809C868: ; 809C868 push {lr} ldr r0, =0x0000086d - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809C894 @@ -292228,7 +292296,7 @@ sub_809C868: ; 809C868 sub_809C89C: ; 809C89C push {lr} ldr r0, =0x0000086d - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809C8D4 @@ -292546,7 +292614,7 @@ sub_809CB30: ; 809CB30 push {lr} ldr r0, =0x0000402a movs r1, 0 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -292557,7 +292625,7 @@ sub_809CB30: ; 809CB30 happiness_algorithm_step: ; 809CB44 push {r4,r5,lr} ldr r0, =0x0000402a - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -292590,7 +292658,7 @@ overworld_poison_timer_set: ; 809CB80 push {lr} ldr r0, =0x0000402b movs r1, 0 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -292605,7 +292673,7 @@ overworld_poison_step: ; 809CB94 cmp r0, 0x9 beq @0809CBD4 ldr r0, =0x0000402b - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -293222,14 +293290,14 @@ trigger_activate: ; 809D04C cmp r1, 0 bne @0809D062 ldrb r0, [r4, 0x6] - bl trigger_activate_alternative__deprecated + bl trigger_activate_weather b @0809D082 @0809D062: ldrh r0, [r4, 0x6] cmp r0, 0 beq @0809D07C ldrh r0, [r4, 0x6] - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldrb r1, [r4, 0x8] @@ -293329,8 +293397,9 @@ sub_809D0F4: ; 809D0F4 .pool thumb_func_end sub_809D0F4 - thumb_func_start sub_809D11C -sub_809D11C: ; 809D11C + thumb_func_start FindInvisibleMapObjectByPosition +; int FindInvisibleMapObjectByPosition(struct mapheader *mapHeader, u16 x, u16 y, u8 elevation) +FindInvisibleMapObjectByPosition: ; 809D11C push {r4-r7,lr} lsls r1, 16 lsrs r7, r1, 16 @@ -293375,7 +293444,7 @@ sub_809D11C: ; 809D11C pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_809D11C + thumb_func_end FindInvisibleMapObjectByPosition thumb_func_start dive_warp dive_warp: ; 809D16C @@ -293538,7 +293607,7 @@ sub_809D280: ; 809D280 lsrs r1, 24 mov r0, sp adds r2, r4, 0 - bl sub_809C384 + bl TryGetMapObjectScript add sp, 0x8 pop {r4,r5} pop {r1} @@ -293622,16 +293691,16 @@ sub_809D344: ; 809D344 movs r2, 0x20 bl memset ldr r0, =0x000008ad - bl flag_clear + bl FlagReset ldr r0, =0x000008ae - bl flag_clear + bl FlagReset ldr r0, =0x00000889 - bl flag_clear + bl FlagReset ldr r0, =0x000008c1 - bl flag_clear + bl FlagReset movs r0, 0x88 lsls r0, 4 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293658,14 +293727,14 @@ sub_809D3A0: ; 809D3A0 sub_809D3C0: ; 809D3C0 push {lr} ldr r0, =0x00004046 - bl var_get_pointer + bl GetVarPointer ldr r1, =0x03005d90 ldr r2, [r1] movs r1, 0 strb r1, [r2, 0x1A] strh r1, [r0] ldr r0, =0x00000896 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293676,7 +293745,7 @@ sub_809D3C0: ; 809D3C0 sub_809D3E8: ; 809D3E8 push {r4,r5,lr} ldr r0, =0x00004046 - bl var_get_pointer + bl GetVarPointer ldr r4, =0x03005d90 ldr r2, [r4] movs r5, 0 @@ -293686,7 +293755,7 @@ sub_809D3E8: ; 809D3E8 adds r1, r2, 0 strh r1, [r0] ldr r0, =0x00000896 - bl flag_set + bl FlagSet ldr r1, [r4] movs r0, 0x1 strb r0, [r1, 0x19] @@ -293709,13 +293778,13 @@ sub_809D42C: ; 809D42C cmp r0, 0xDA bne @0809D468 ldr r0, =0x00004046 - bl var_get + bl VarGet lsls r0, 16 ldr r1, =0x03020000 cmp r0, r1 bne @0809D468 ldr r0, =0x00000896 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809D468 @@ -293734,7 +293803,7 @@ sub_809D42C: ; 809D42C sub_809D470: ; 809D470 push {lr} ldr r0, =0x000008ac - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293745,7 +293814,7 @@ sub_809D470: ; 809D470 sub_809D480: ; 809D480 push {lr} ldr r0, =0x000008ac - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -293756,7 +293825,7 @@ sub_809D480: ; 809D480 sub_809D490: ; 809D490 push {lr} ldr r0, =0x000008ac - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -293769,7 +293838,7 @@ sub_809D490: ; 809D490 sub_809D4A4: ; 809D4A4 push {lr} ldr r0, =0x000008db - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293780,7 +293849,7 @@ sub_809D4A4: ; 809D4A4 sub_809D4B4: ; 809D4B4 push {lr} ldr r0, =0x000008db - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -293791,7 +293860,7 @@ sub_809D4B4: ; 809D4B4 sub_809D4C4: ; 809D4C4 push {lr} ldr r0, =0x000008db - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -293805,44 +293874,44 @@ sub_809D4D8: ; 809D4D8 push {lr} movs r0, 0xF2 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001e5 - bl flag_clear + bl FlagReset movs r0, 0xF3 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001e7 - bl flag_clear + bl FlagReset movs r0, 0xF4 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001e9 - bl flag_clear + bl FlagReset movs r0, 0xF5 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001eb - bl flag_clear + bl FlagReset movs r0, 0xF6 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001ed - bl flag_clear + bl FlagReset movs r0, 0xF7 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001ef - bl flag_clear + bl FlagReset movs r0, 0xF8 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001f1 - bl flag_clear + bl FlagReset movs r0, 0xF9 lsls r0, 1 - bl flag_clear + bl FlagReset ldr r0, =0x000001f3 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293854,28 +293923,28 @@ sub_809D570: ; 809D570 push {lr} ldr r0, =0x000040dd movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040de movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040df movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040e0 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040e1 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040e2 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040e3 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040e4 movs r1, 0 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -293887,9 +293956,9 @@ sub_809D5D8: ; 809D5D8 push {lr} ldr r0, =0x0000402c movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000008c2 - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -293902,9 +293971,9 @@ sub_809D5F4: ; 809D5F4 ldr r0, =0x0000402c movs r1, 0x92 lsls r1, 4 - bl var_set + bl VarSet ldr r0, =0x000008c2 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -293915,12 +293984,12 @@ sub_809D5F4: ; 809D5F4 sub_809D614: ; 809D614 push {lr} ldr r0, =0x000008c2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809D640 ldr r0, =0x0000402c - bl var_get + bl VarGet lsls r0, 16 movs r1, 0x92 lsls r1, 20 @@ -293937,9 +294006,9 @@ sub_809D614: ; 809D614 bx r1 thumb_func_end sub_809D614 - thumb_func_start var_get_pointer -; u16 *var_get_pointer(u16 var_id) -var_get_pointer: ; 809D648 + thumb_func_start GetVarPointer +; u16 *GetVarPointer(u16 varId) +GetVarPointer: ; 809D648 push {lr} lsls r0, 16 lsrs r1, r0, 16 @@ -293976,16 +294045,16 @@ var_get_pointer: ; 809D648 bx r1 .align 2, 0 .pool - thumb_func_end var_get_pointer + thumb_func_end GetVarPointer - thumb_func_start var_get -; u16 var_get(u16 var_id) -var_get: ; 809D694 + thumb_func_start VarGet +; u16 VarGet(u16 varId) +VarGet: ; 809D694 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 - bl var_get_pointer + bl GetVarPointer cmp r0, 0 beq @0809D6A8 ldrh r0, [r0] @@ -293996,17 +294065,17 @@ var_get: ; 809D694 pop {r4} pop {r1} bx r1 - thumb_func_end var_get + thumb_func_end VarGet - thumb_func_start var_set -; bool var_set(u16 var_id, u16 value) -var_set: ; 809D6B0 + thumb_func_start VarSet +; BOOL VarSet(u16 varId, u16 value) +VarSet: ; 809D6B0 push {r4,lr} lsls r0, 16 lsrs r0, 16 lsls r1, 16 lsrs r4, r1, 16 - bl var_get_pointer + bl GetVarPointer cmp r0, 0 beq @0809D6C8 strh r4, [r0] @@ -294018,28 +294087,29 @@ var_set: ; 809D6B0 pop {r4} pop {r1} bx r1 - thumb_func_end var_set + thumb_func_end VarSet - thumb_func_start var_load_x4010_plus_r0 -var_load_x4010_plus_r0: ; 809D6D0 + thumb_func_start VarGetFieldObjectGraphicsId +; u8 VarGetFieldObjectGraphicsId(u8 index) +VarGetFieldObjectGraphicsId: ; 809D6D0 push {lr} lsls r0, 24 lsrs r0, 8 ldr r1, =0x40100000 adds r0, r1 lsrs r0, 16 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 pop {r1} bx r1 .align 2, 0 .pool - thumb_func_end var_load_x4010_plus_r0 + thumb_func_end VarGetFieldObjectGraphicsId - thumb_func_start flag_get_pointer -; u8 *flag_get_pointer(u16 flag_id) -flag_get_pointer: ; 809D6EC + thumb_func_start GetFlagPointer +; u8 *GetFlagPointer(u16 flagId) +GetFlagPointer: ; 809D6EC push {lr} lsls r1, r0, 16 lsrs r2, r1, 16 @@ -294077,16 +294147,16 @@ flag_get_pointer: ; 809D6EC bx r1 .align 2, 0 .pool - thumb_func_end flag_get_pointer + thumb_func_end GetFlagPointer - thumb_func_start flag_set -; bool flag_set(u16 flag_id) -flag_set: ; 809D740 + thumb_func_start FlagSet +; BOOL FlagSet(u16 flagId) +FlagSet: ; 809D740 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 - bl flag_get_pointer + bl GetFlagPointer adds r2, r0, 0 cmp r2, 0 beq @0809D760 @@ -294102,16 +294172,16 @@ flag_set: ; 809D740 pop {r4} pop {r1} bx r1 - thumb_func_end flag_set + thumb_func_end FlagSet - thumb_func_start flag_clear -; bool flag_clear(u16 flag_id) -flag_clear: ; 809D768 + thumb_func_start FlagReset +; BOOL FlagReset(u16 flagId) +FlagReset: ; 809D768 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 - bl flag_get_pointer + bl GetFlagPointer adds r2, r0, 0 cmp r2, 0 beq @0809D788 @@ -294127,16 +294197,16 @@ flag_clear: ; 809D768 pop {r4} pop {r1} bx r1 - thumb_func_end flag_clear + thumb_func_end FlagReset - thumb_func_start flag_check -; bool flag_check(u16 flag_id) -flag_check: ; 809D790 + thumb_func_start FlagGet +; BOOL FlagGet(u16 flagId) +FlagGet: ; 809D790 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 - bl flag_get_pointer + bl GetFlagPointer cmp r0, 0 beq @0809D7B4 ldrb r0, [r0] @@ -294155,7 +294225,7 @@ flag_check: ; 809D790 pop {r4} pop {r1} bx r1 - thumb_func_end flag_check + thumb_func_end FlagGet thumb_func_start sub_809D7BC sub_809D7BC: ; 809D7BC @@ -294274,8 +294344,8 @@ sub_809D84C: ; 809D84C bx r0 thumb_func_end sub_809D84C - thumb_func_start trigger_activate_alternative__deprecated -trigger_activate_alternative__deprecated: ; 809D858 + thumb_func_start trigger_activate_weather +trigger_activate_weather: ; 809D858 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -294304,7 +294374,7 @@ trigger_activate_alternative__deprecated: ; 809D858 pop {r4} pop {r0} bx r0 - thumb_func_end trigger_activate_alternative__deprecated + thumb_func_end trigger_activate_weather thumb_func_start task_per_step_callback_manager task_per_step_callback_manager: ; 809D88C @@ -295465,7 +295535,7 @@ sub_809E14C: ; 809E14C lsls r0, r4, 1 adds r0, r1 ldrh r0, [r0] - bl var_get_pointer + bl GetVarPointer subs r2, r5, 0x3 movs r1, 0x1 lsls r1, r2 @@ -295496,7 +295566,7 @@ sub_809E184: ; 809E184 lsls r0, r4, 1 adds r0, r1 ldrh r0, [r0] - bl var_get + bl VarGet lsls r0, 16 subs r2, r5, 0x3 movs r1, 0x80 @@ -295646,7 +295716,7 @@ sub_809E224: ; 809E224 lsls r4, 16 lsrs r4, 16 ldr r0, =0x00004022 - bl var_get_pointer + bl GetVarPointer adds r6, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -295813,7 +295883,7 @@ sub_809E3B4: ; 809E3B4 bl cur_mapdata_block_get_role_at lsls r0, 24 lsrs r0, 24 - bl sub_8089484 + bl MetatileBehavior_IsAsh lsls r0, 24 cmp r0, 0 beq @0809E47A @@ -295855,7 +295925,7 @@ sub_809E3B4: ; 809E3B4 cmp r0, 0 beq @0809E47A ldr r0, =0x00004048 - bl var_get_pointer + bl GetVarPointer adds r2, r0, 0 ldrh r1, [r2] ldr r0, =0x0000270e @@ -295967,7 +296037,7 @@ sub_809E4CC: ; 809E4CC beq @0809E556 ldr r0, =0x00004022 movs r1, 0 - bl var_set + bl VarSet @0809E556: mov r0, sp ldrh r2, [r0] @@ -296000,7 +296070,7 @@ sub_809E4CC: ; 809E4CC beq @0809E59A ldr r0, =0x00004022 movs r1, 0 - bl var_set + bl VarSet @0809E59A: movs r1, 0x8 ldrsh r0, [r5, r1] @@ -296257,7 +296327,7 @@ sub_809E638: ; 809E638 sub_809E778: ; 809E778 push {lr} ldr r0, =0x00000895 - bl flag_set + bl FlagSet bl sub_802F588 ldr r0, =0x03005d90 ldr r2, [r0] @@ -296269,7 +296339,7 @@ sub_809E778: ; 809E778 str r1, [r2, 0x4] ldr r0, =0x00004040 ldrh r1, [r3] - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -296280,7 +296350,7 @@ sub_809E778: ; 809E778 sub_809E7B0: ; 809E7B0 push {r4,lr} ldr r0, =0x00000895 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809E7DA @@ -296307,7 +296377,7 @@ sub_809E7E8: ; 809E7E8 push {r4-r6,lr} adds r5, r0, 0 ldr r0, =0x00004040 - bl var_get_pointer + bl GetVarPointer adds r6, r0, 0 ldrh r0, [r6] movs r2, 0 @@ -296834,47 +296904,47 @@ sub_809EBC4: ; 809EBC4 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r7, r0, 0 ldr r1, =gUnknown_085EE68A - bl gf_strcpy + bl CopyString adds r7, r0, 0 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r7, r0, 0 ldr r5, =gUnknown_085EE68E adds r1, r5, 0 - bl gf_strcpy + bl CopyString adds r7, r0, 0 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r7, r0, 0 adds r1, r5, 0 - bl gf_strcpy + bl CopyString adds r7, r0, 0 adds r0, r4, 0 mov r1, r8 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString ldr r2, =0x02021fc4 mov r0, r9 str r0, [sp] @@ -297701,7 +297771,7 @@ sub_809F200: ; 809F200 str r1, [r2, 0x4] ldr r0, =0x00004040 ldrh r1, [r4] - bl var_set + bl VarSet bl sub_809D5D8 ldr r0, =gUnknown_085ECA4F bl sub_809F0C0 @@ -297773,12 +297843,12 @@ sub_809F200: ; 809F200 sub_809F41C: ; 809F41C push {lr} ldr r0, =0x00000861 - bl flag_set + bl FlagSet movs r0, 0x86 lsls r0, 4 - bl flag_set + bl FlagSet ldr r0, =0x00000862 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -297857,7 +297927,7 @@ sub_809F4B0: ; 809F4B0 sub_809F4CC: ; 809F4CC push {lr} ldr r0, =0x00000861 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -297867,7 +297937,7 @@ sub_809F4CC: ; 809F4CC @0809F4E2: movs r0, 0x86 lsls r0, 4 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -297878,7 +297948,7 @@ sub_809F4CC: ; 809F4CC movs r0, 0x2 bl sub_809F4B0 ldr r0, =0x00000862 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -297929,7 +297999,7 @@ sub_809F568: ; 809F568 movs r0, 0x2 bl sub_809F4B0 ldr r0, =0x00000862 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -297957,7 +298027,7 @@ sub_809F5A4: ; 809F5A4 movs r0, 0x2 bl sub_809F4B0 ldr r0, =0x00000862 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -298048,11 +298118,11 @@ sub_809F654: ; 809F654 ldrb r1, [r1] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EE6FF adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r0, [r4] movs r1, 0x1 str r1, [sp] @@ -298113,11 +298183,11 @@ sub_809F6C8: ; 809F6C8 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EE716 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r0, [r4] movs r1, 0x1 str r1, [sp] @@ -298225,7 +298295,7 @@ sub_809F7C0: ; 809F7C0 adds r0, r3, r1 ldr r1, [r0] mov r0, r10 - bl ExpandTextCodes + bl ExpandStringRefs bl sub_8197A08 lsls r0, 24 lsrs r0, 24 @@ -298790,7 +298860,7 @@ sub_809FC8C: ; 809FC8C .pool @0809FCC8: ldr r0, =0x000008d2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0809FCE4 @@ -299152,7 +299222,7 @@ sub_809FF98: ; 809FF98 adds r4, r1, 0 ldr r0, =0x02021fc4 adds r1, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0x1 bl sub_819786C @@ -300061,7 +300131,7 @@ sub_80A06B4: ; 80A06B4 str r1, [sp, 0x10] ldr r0, =0x00000861 mov r10, r0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080A06EC @@ -300165,7 +300235,7 @@ sub_80A06B4: ; 80A06B4 adds r2, r5, 0 bl Print mov r0, r10 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -309365,7 +309435,7 @@ dp01t_11_3_message_for_player_only: ; 80A5090 bl sub_80D7724 b @080A50A6 @080A50A2: - bl sub_8035770 + bl load_battle_oval_graphics @080A50A6: pop {r0} bx r0 @@ -331774,7 +331844,7 @@ sub_80B06BC: ; 80B06BC beq @080B06F2 ldr r0, =0x0000400e movs r1, 0 - bl var_set + bl VarSet ldr r0, [r4] movs r1, 0x80 lsls r1, 14 @@ -331885,7 +331955,7 @@ sub_80B07B4: ; 80B07B4 thumb_func_start task_add_01_battle_start_with_music_and_stats task_add_01_battle_start_with_music_and_stats: ; 80B0804 push {lr} - bl sub_80B0F34 + bl reads_trainer_data_byte1_byte0x18 lsls r0, 24 lsrs r0, 24 movs r1, 0 @@ -332336,7 +332406,7 @@ sub_80B0BD0: ; 80B0BD0 b @080B0D1A @080B0C06: adds r0, r4, 0 - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @080B0C16 @@ -332384,7 +332454,7 @@ sub_80B0BD0: ; 80B0BD0 b @080B0D1A @080B0C78: adds r0, r4, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @080B0CE0 @@ -332396,7 +332466,7 @@ sub_80B0BD0: ; 80B0BD0 @080B0C8C: lsls r0, r5, 24 lsrs r0, 24 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @080B0CF2 @@ -332410,7 +332480,7 @@ sub_80B0BD0: ; 80B0BD0 cmp r0, 0 bne @080B0CF2 adds r0, r4, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @080B0CE0 @@ -332498,7 +332568,7 @@ sub_80B0D24: ; 80B0D24 @080B0D54: lsls r0, r4, 24 lsrs r0, 24 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @080B0D7C @@ -332576,8 +332646,8 @@ sub_80B0D88: ; 80B0D88 .pool thumb_func_end sub_80B0D88 - thumb_func_start sub_80B0DE8 -sub_80B0DE8: ; 80B0DE8 + thumb_func_start reads_trainer_data_byte0 +reads_trainer_data_byte0: ; 80B0DE8 push {r4,r5,lr} lsls r0, 16 lsrs r0, 16 @@ -332700,7 +332770,7 @@ sub_80B0DE8: ; 80B0DE8 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_80B0DE8 + thumb_func_end reads_trainer_data_byte0 thumb_func_start sub_80B0EC8 sub_80B0EC8: ; 80B0EC8 @@ -332757,8 +332827,8 @@ sub_80B0EC8: ; 80B0EC8 bx r1 thumb_func_end sub_80B0EC8 - thumb_func_start sub_80B0F34 -sub_80B0F34: ; 80B0F34 + thumb_func_start reads_trainer_data_byte1_byte0x18 +reads_trainer_data_byte1_byte0x18: ; 80B0F34 push {r4-r6,lr} ldr r4, =0x02038bca ldrh r1, [r4] @@ -332843,7 +332913,7 @@ sub_80B0F34: ; 80B0F34 lsrs r6, r0, 24 ldrh r0, [r4] adds r1, r5, 0 - bl sub_80B0DE8 + bl reads_trainer_data_byte0 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -332871,7 +332941,7 @@ sub_80B0F34: ; 80B0F34 bx r1 .align 2, 0 .pool - thumb_func_end sub_80B0F34 + thumb_func_end reads_trainer_data_byte1_byte0x18 thumb_func_start sub_80B100C sub_80B100C: ; 80B100C @@ -332922,7 +332992,7 @@ sub_80B100C: ; 80B100C .pool @080B106C: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x3 @@ -332966,7 +333036,7 @@ sub_80B100C: ; 80B100C .pool @080B10C8: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x3 @@ -333034,7 +333104,7 @@ sub_80B1158: ; 80B1158 push {lr} sub sp, 0x8 ldr r0, =0x00004023 - bl var_get_pointer + bl GetVarPointer ldr r2, =0x020375f0 ldrh r1, [r2] strh r1, [r0] @@ -333138,8 +333208,8 @@ sub_80B1234: ; 80B1234 bx r0 thumb_func_end sub_80B1234 - thumb_func_start sub_80B1250 -sub_80B1250: ; 80B1250 + thumb_func_start battle_load32 +battle_load32: ; 80B1250 adds r2, r0, 0 ldrb r0, [r2] ldrb r1, [r2, 0x1] @@ -333152,23 +333222,23 @@ sub_80B1250: ; 80B1250 lsls r1, 24 orrs r0, r1 bx lr - thumb_func_end sub_80B1250 + thumb_func_end battle_load32 - thumb_func_start sub_80B1268 -sub_80B1268: ; 80B1268 + thumb_func_start battle_load16 +battle_load16: ; 80B1268 adds r1, r0, 0 ldrb r0, [r1] ldrb r1, [r1, 0x1] lsls r1, 8 orrs r0, r1 bx lr - thumb_func_end sub_80B1268 + thumb_func_end battle_load16 - thumb_func_start ldrb -ldrb: ; 80B1274 + thumb_func_start battle_load8 +battle_load8: ; 80B1274 ldrb r0, [r0] bx lr - thumb_func_end ldrb + thumb_func_end battle_load8 thumb_func_start trainerflag_opponent trainerflag_opponent: ; 80B1278 @@ -333314,21 +333384,21 @@ battle_load_arguments: ; 80B1370 .4byte @080B13EC @080B13A8: adds r0, r5, 0 - bl ldrb + bl battle_load8 ldr r1, [r4] strb r0, [r1] adds r5, 0x1 b @080B13E8 @080B13B6: adds r0, r5, 0 - bl sub_80B1268 + bl battle_load16 ldr r1, [r4] strh r0, [r1] adds r5, 0x2 b @080B13E8 @080B13C4: adds r0, r5, 0 - bl sub_80B1250 + bl battle_load32 ldr r1, [r4] str r0, [r1] adds r5, 0x4 @@ -333390,7 +333460,7 @@ battle_configure_by_script: ; 80B1430 bl sub_80B12FC ldr r4, =0x02038bc8 adds r0, r5, 0 - bl ldrb + bl battle_load8 lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -333656,13 +333726,13 @@ sub_80B16A4: ; 80B16A4 sub_80B16B8: ; 80B16B8 push {lr} adds r0, 0x2 - bl sub_80B1268 + bl battle_load16 lsls r0, 16 movs r1, 0xA0 lsls r1, 19 adds r0, r1 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -333704,8 +333774,9 @@ sub_80B170C: ; 80B170C .pool thumb_func_end sub_80B170C - thumb_func_start sub_80B1718 -sub_80B1718: ; 80B1718 + thumb_func_start check_trainer_flag +; pokescrcmd +check_trainer_flag: ; 80B1718 push {lr} bl sub_81A9E40 lsls r0, 24 @@ -333724,7 +333795,7 @@ sub_80B1718: ; 80B1718 bl trainerflag_opponent lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet b @080B1752 @080B174A: ldr r0, =0x03005df0 @@ -333737,7 +333808,7 @@ sub_80B1718: ; 80B1718 bx r1 .align 2, 0 .pool - thumb_func_end sub_80B1718 + thumb_func_end check_trainer_flag thumb_func_start rom_npc_set_flag_for_script_id rom_npc_set_flag_for_script_id: ; 80B1760 @@ -333749,12 +333820,12 @@ rom_npc_set_flag_for_script_id: ; 80B1760 bl sub_80B1290 lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet @080B1776: bl trainerflag_opponent lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -333767,7 +333838,7 @@ sub_80B178C: ; 80B178C bl trainerflag_opponent lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet pop {r0} bx r0 thumb_func_end sub_80B178C @@ -333780,7 +333851,7 @@ trainer_flag_check: ; 80B17A0 lsls r1, 19 adds r0, r1 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -333795,7 +333866,7 @@ trainer_flag_set: ; 80B17B8 lsls r1, 19 adds r0, r1 lsrs r0, 16 - bl flag_set + bl FlagSet pop {r0} bx r0 thumb_func_end trainer_flag_set @@ -333808,7 +333879,7 @@ trainer_flag_clear: ; 80B17CC lsls r1, 19 adds r0, r1 lsrs r0, 16 - bl flag_clear + bl FlagReset pop {r0} bx r0 thumb_func_end trainer_flag_clear @@ -333836,7 +333907,7 @@ sub_80B17E0: ; 80B17E0 beq @080B1884 ldr r0, =0x0000400e movs r1, 0 - bl var_set + bl VarSet ldr r2, =0x02022fec ldr r0, [r2] movs r1, 0x80 @@ -334209,8 +334280,8 @@ sub_80B1B60: ; 80B1B60 bx r0 thumb_func_end sub_80B1B60 - thumb_func_start sub_80B1B70 -sub_80B1B70: ; 80B1B70 + thumb_func_start get_prebattle_song_id +get_prebattle_song_id: ; 80B1B70 push {lr} ldr r0, =0x02038bfc ldrb r0, [r0] @@ -334231,7 +334302,7 @@ sub_80B1B70: ; 80B1B70 cmp r0, 0x8 beq @080B1C62 adds r0, r1, 0 - bl sub_806D888 + bl read_trainer_data_byte2 lsls r0, 24 lsrs r0, 24 cmp r0, 0xD @@ -334330,7 +334401,7 @@ sub_80B1B70: ; 80B1B70 bx r0 .align 2, 0 .pool - thumb_func_end sub_80B1B70 + thumb_func_end get_prebattle_song_id thumb_func_start sub_80B1C6C sub_80B1C6C: ; 80B1C6C @@ -334388,7 +334459,7 @@ sub_80B1CA4: ; 80B1CA4 bl sub_80B1C6C adds r1, r0, 0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 pop {r4} pop {r1} @@ -334406,7 +334477,7 @@ sub_80B1CE0: ; 80B1CE0 bl sub_80B1C6C adds r1, r0, 0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 pop {r4} pop {r1} @@ -334517,7 +334588,7 @@ sub_80B1D94: ; 80B1D94 cmp r0, 0x40 bne @080B1DB6 movs r0, 0x7E - bl flag_check + bl FlagGet movs r1, 0 lsls r0, 24 cmp r0, 0 @@ -334610,7 +334681,7 @@ sub_80B1DFC: ; 80B1DFC adds r0, r5, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080B1E74 @@ -334962,7 +335033,7 @@ sub_80B208C: ; 80B208C sub_80B20BC: ; 80B20BC push {lr} ldr r0, =0x0000012f - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080B20E2 @@ -334975,7 +335046,7 @@ sub_80B20BC: ; 80B20BC beq @080B20E2 lsls r0, r1, 16 lsrs r0, 16 - bl flag_set + bl FlagSet @080B20E2: pop {r0} bx r0 @@ -335020,7 +335091,7 @@ sub_80B2128: ; 80B2128 ldr r4, =gUnknown_08550584 @080B2130: ldrh r0, [r4] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -335370,7 +335441,7 @@ sub_80B23B0: ; 80B23B0 ldr r0, =0x02021cc4 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 @@ -335379,7 +335450,7 @@ sub_80B23B0: ; 80B23B0 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EE667 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r5, 0 movs r2, 0x58 @@ -335510,7 +335581,7 @@ sub_80B2478: ; 80B2478 adds r0, r4, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x4 b @080B24F2 .align 2, 0 @@ -335880,7 +335951,7 @@ sub_80B275C: ; 80B275C adds r1, r5, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =gUnknown_082780F2 bl box_related_two__3 mov r0, r9 @@ -336267,7 +336338,7 @@ sub_80B2AF4: ; 80B2AF4 muls r1, r0 add r1, r9 ldr r0, =0x02021cc4 - bl gf_strcpy + bl CopyString movs r2, 0x1 @080B2B48: cmp r7, 0x1 @@ -336277,7 +336348,7 @@ sub_80B2AF4: ; 80B2AF4 muls r1, r0 add r1, r9 ldr r0, =0x02021dc4 - bl gf_strcpy + bl CopyString movs r2, 0x1 @080B2B5C: adds r7, 0x1 @@ -338043,7 +338114,7 @@ sub_80B39D4: ; 80B39D4 lsls r1, 2 ldr r2, =0x020229f0 adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80C4904 lsls r0, 24 @@ -338056,7 +338127,7 @@ sub_80B39D4: ; 80B39D4 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r0, 0x1 b @080B3A2A .align 2, 0 @@ -339706,6 +339777,7 @@ sub_80B4690: ; 80B4690 thumb_func_end sub_80B4690 thumb_func_start sub_80B46D8 +; void sub_80B46D8(struct obj *object, s16 a2, u8 a3) sub_80B46D8: ; 80B46D8 push {r4,lr} lsls r2, 24 @@ -340497,7 +340569,7 @@ sub_80B4C74: ; 80B4C74 cmp r0, 0 bne @080B4CEA adds r0, r5, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x37 @@ -340565,7 +340637,7 @@ get_wild_data_index_for_map: ; 80B4CF8 cmp r0, r6 bne @080B4D44 ldr r0, =0x0000403e - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x8 @@ -340686,7 +340758,7 @@ sub_80B4D78: ; 80B4D78 cmp r0, 0 bne @080B4E4C adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x1C @@ -340759,7 +340831,7 @@ sub_80B4E68: ; 80B4E68 cmp r0, 0 bne @080B4F28 adds r0, r5, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x38 @@ -340860,7 +340932,7 @@ sub_80B4F4C: ; 80B4F4C movs r1, 0x8 movs r2, 0x2A mov r3, sp - bl sub_80B5A50 + bl TryGetAbilityInfluencedWildMonIndex lsls r0, 24 cmp r0, 0 bne @080B4FBA @@ -340868,7 +340940,7 @@ sub_80B4F4C: ; 80B4F4C movs r1, 0xD movs r2, 0x9 mov r3, sp - bl sub_80B5A50 + bl TryGetAbilityInfluencedWildMonIndex lsls r0, 24 cmp r0, 0 bne @080B4FBA @@ -340879,7 +340951,7 @@ sub_80B4F4C: ; 80B4F4C movs r1, 0xD movs r2, 0x9 mov r3, sp - bl sub_80B5A50 + bl TryGetAbilityInfluencedWildMonIndex lsls r0, 24 cmp r0, 0 bne @080B4FBA @@ -340918,7 +340990,7 @@ sub_80B4F4C: ; 80B4F4C cmp r0, 0 beq @080B5008 adds r0, r4, 0 - bl sub_80B5934 + bl DoKeenEyeIntimidateWildEncounterTest lsls r0, 24 cmp r0, 0 bne @080B5008 @@ -341080,8 +341152,8 @@ sub_80B50DC: ; 80B50DC bx r1 thumb_func_end sub_80B50DC - thumb_func_start sub_80B5144 -sub_80B5144: ; 80B5144 + thumb_func_start DoWildEncounterRateDiceRoll +DoWildEncounterRateDiceRoll: ; 80B5144 push {r4,lr} adds r4, r0, 0 lsls r4, 16 @@ -341104,10 +341176,10 @@ sub_80B5144: ; 80B5144 pop {r4} pop {r1} bx r1 - thumb_func_end sub_80B5144 + thumb_func_end DoWildEncounterRateDiceRoll - thumb_func_start sub_80B5170 -sub_80B5170: ; 80B5170 + thumb_func_start DoWildEncounterRateTest +DoWildEncounterRateTest: ; 80B5170 push {r4,lr} sub sp, 0x4 str r0, [sp] @@ -341129,9 +341201,9 @@ sub_80B5170: ; 80B5170 str r0, [sp] @080B519A: mov r0, sp - bl sub_80B5AB0 + bl affects_encounter_rate_based_on_flags mov r0, sp - bl sub_80B5AF0 + bl ApplyCleanseTagWildEncounterRateReduction cmp r4, 0 bne @080B5216 ldr r4, =0x020244ec @@ -341141,7 +341213,7 @@ sub_80B5170: ; 80B5170 cmp r0, 0 bne @080B5216 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341197,7 +341269,7 @@ sub_80B5170: ; 80B5170 ldr r0, [sp] lsls r0, 16 lsrs r0, 16 - bl sub_80B5144 + bl DoWildEncounterRateDiceRoll lsls r0, 24 lsrs r0, 24 add sp, 0x4 @@ -341206,10 +341278,10 @@ sub_80B5170: ; 80B5170 bx r1 .align 2, 0 .pool - thumb_func_end sub_80B5170 + thumb_func_end DoWildEncounterRateTest - thumb_func_start sub_80B523C -sub_80B523C: ; 80B523C + thumb_func_start DoGlobalWildEncounterDiceRoll +DoGlobalWildEncounterDiceRoll: ; 80B523C push {lr} bl GenerateRandomNumber lsls r0, 16 @@ -341227,7 +341299,7 @@ sub_80B523C: ; 80B523C @080B525A: pop {r1} bx r1 - thumb_func_end sub_80B523C + thumb_func_end DoGlobalWildEncounterDiceRoll thumb_func_start sub_80B5260 sub_80B5260: ; 80B5260 @@ -341240,7 +341312,7 @@ sub_80B5260: ; 80B5260 cmp r1, r0 bne @080B5280 movs r0, 0x53 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @080B5282 @@ -341288,7 +341360,7 @@ is_it_battle_time_2: ; 80B5288 lsrs r5, r0, 24 cmp r7, r6 beq @080B52D8 - bl sub_80B523C + bl DoGlobalWildEncounterDiceRoll lsls r0, 24 cmp r0, 0 bne @080B52D8 @@ -341303,7 +341375,7 @@ is_it_battle_time_2: ; 80B5288 ldr r0, [r4] ldrb r0, [r0] movs r1, 0 - bl sub_80B5170 + bl DoWildEncounterRateTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341344,7 +341416,7 @@ is_it_battle_time_2: ; 80B5288 ldrh r5, [r0] cmp r7, r6 beq @080B5352 - bl sub_80B523C + bl DoGlobalWildEncounterDiceRoll lsls r0, 24 cmp r0, 0 bne @080B5352 @@ -341359,7 +341431,7 @@ is_it_battle_time_2: ; 80B5288 ldr r0, [r4] ldrb r0, [r0] movs r1, 0 - bl sub_80B5170 + bl DoWildEncounterRateTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341403,7 +341475,7 @@ is_it_battle_time_2: ; 80B5288 @080B53C4: cmp r7, r6 beq @080B53D4 - bl sub_80B523C + bl DoGlobalWildEncounterDiceRoll lsls r0, 24 cmp r0, 0 bne @080B53D4 @@ -341417,7 +341489,7 @@ is_it_battle_time_2: ; 80B5288 ldr r0, [r0] ldrb r0, [r0] movs r1, 0 - bl sub_80B5170 + bl DoWildEncounterRateTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341493,7 +341565,7 @@ is_it_battle_time_2: ; 80B5288 beq @080B54FE cmp r8, r9 beq @080B5492 - bl sub_80B523C + bl DoGlobalWildEncounterDiceRoll lsls r0, 24 cmp r0, 0 beq @080B54FE @@ -341506,7 +341578,7 @@ is_it_battle_time_2: ; 80B5288 ldr r0, [r4] ldrb r0, [r0] movs r1, 0 - bl sub_80B5170 + bl DoWildEncounterRateTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341555,8 +341627,8 @@ is_it_battle_time_2: ; 80B5288 bx r1 thumb_func_end is_it_battle_time_2 - thumb_func_start sub_80B550C -sub_80B550C: ; 80B550C + thumb_func_start rock_smash_wild_pokemon_encounter +rock_smash_wild_pokemon_encounter: ; 80B550C push {r4,lr} bl get_wild_data_index_for_map lsls r0, 16 @@ -341575,7 +341647,7 @@ sub_80B550C: ; 80B550C beq @080B5554 ldrb r0, [r4] movs r1, 0x1 - bl sub_80B5170 + bl DoWildEncounterRateTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -341605,7 +341677,7 @@ sub_80B550C: ; 80B550C bx r0 .align 2, 0 .pool - thumb_func_end sub_80B550C + thumb_func_end rock_smash_wild_pokemon_encounter thumb_func_start sub_80B5578 sub_80B5578: ; 80B5578 @@ -341784,8 +341856,8 @@ sub_80B5578: ; 80B5578 bx r1 thumb_func_end sub_80B5578 - thumb_func_start sub_80B56FC -sub_80B56FC: ; 80B56FC + thumb_func_start GetFishingWildMonListHeader +GetFishingWildMonListHeader: ; 80B56FC push {lr} bl get_wild_data_index_for_map lsls r0, 16 @@ -341811,7 +341883,7 @@ sub_80B56FC: ; 80B56FC @080B572E: pop {r1} bx r1 - thumb_func_end sub_80B56FC + thumb_func_end GetFishingWildMonListHeader thumb_func_start sub_80B5734 sub_80B5734: ; 80B5734 @@ -341986,7 +342058,7 @@ sub_80B5870: ; 80B5870 beq @080B58C4 ldr r5, =0x00004021 adds r0, r5, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0 @@ -341996,7 +342068,7 @@ sub_80B5870: ; 80B5870 lsrs r4, 16 adds r0, r5, 0 adds r1, r4, 0 - bl var_set + bl VarSet cmp r4, 0 bne @080B58C4 ldr r0, =gUnknown_082A4B2A @@ -342019,7 +342091,7 @@ sub_80B58CC: ; 80B58CC lsls r0, 24 lsrs r6, r0, 24 ldr r0, =0x00004021 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080B5912 @@ -342066,8 +342138,9 @@ sub_80B58CC: ; 80B58CC bx r1 thumb_func_end sub_80B58CC - thumb_func_start sub_80B5934 -sub_80B5934: ; 80B5934 + thumb_func_start DoKeenEyeIntimidateWildEncounterTest +; _BOOL1 DoKeenEyeIntimidateWildEncounterTest(u8 wildMonLevel) +DoKeenEyeIntimidateWildEncounterTest: ; 80B5934 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -342078,7 +342151,7 @@ sub_80B5934: ; 80B5934 cmp r0, 0 bne @080B5988 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x33 @@ -342113,10 +342186,11 @@ sub_80B5934: ; 80B5934 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_80B5934 + thumb_func_end DoKeenEyeIntimidateWildEncounterTest - thumb_func_start sub_80B5990 -sub_80B5990: ; 80B5990 + thumb_func_start TryGetRandomWildMonIndexByType +; _BOOL1 TryGetRandomWildMonIndexByType(WildMonEntry *mons, u8 type, u8 numMons, u8 *monIndex) +TryGetRandomWildMonIndexByType: ; 80B5990 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -342218,10 +342292,11 @@ sub_80B5990: ; 80B5990 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_80B5990 + thumb_func_end TryGetRandomWildMonIndexByType - thumb_func_start sub_80B5A50 -sub_80B5A50: ; 80B5A50 + thumb_func_start TryGetAbilityInfluencedWildMonIndex +; _BOOL1 TryGetAbilityInfluencedWildMonIndex(WildMonEntry *mons, u8 type, u8 abilityId, u8 *monIndex) +TryGetAbilityInfluencedWildMonIndex: ; 80B5A50 push {r4-r7,lr} mov r7, r8 push {r7} @@ -342238,7 +342313,7 @@ sub_80B5A50: ; 80B5A50 cmp r0, 0 bne @080B5AA4 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, r5 @@ -342254,7 +342329,7 @@ sub_80B5A50: ; 80B5A50 adds r1, r6, 0 movs r2, 0xC mov r3, r8 - bl sub_80B5990 + bl TryGetRandomWildMonIndexByType lsls r0, 24 lsrs r0, 24 b @080B5AA6 @@ -342268,14 +342343,15 @@ sub_80B5A50: ; 80B5A50 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_80B5A50 + thumb_func_end TryGetAbilityInfluencedWildMonIndex - thumb_func_start sub_80B5AB0 -sub_80B5AB0: ; 80B5AB0 + thumb_func_start affects_encounter_rate_based_on_flags +; void affects_encounter_rate_based_on_flags(u32 *val) +affects_encounter_rate_based_on_flags: ; 80B5AB0 push {r4,lr} adds r4, r0, 0 ldr r0, =0x000008ad - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -342288,7 +342364,7 @@ sub_80B5AB0: ; 80B5AB0 .pool @080B5AD0: ldr r0, =0x000008ae - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -342303,10 +342379,10 @@ sub_80B5AB0: ; 80B5AB0 bx r0 .align 2, 0 .pool - thumb_func_end sub_80B5AB0 + thumb_func_end affects_encounter_rate_based_on_flags - thumb_func_start sub_80B5AF0 -sub_80B5AF0: ; 80B5AF0 + thumb_func_start ApplyCleanseTagWildEncounterRateReduction +ApplyCleanseTagWildEncounterRateReduction: ; 80B5AF0 push {r4,lr} adds r4, r0, 0 ldr r0, =0x020244ec @@ -342325,7 +342401,7 @@ sub_80B5AF0: ; 80B5AF0 bx r0 .align 2, 0 .pool - thumb_func_end sub_80B5AF0 + thumb_func_end ApplyCleanseTagWildEncounterRateReduction thumb_func_start oe_exec oe_exec: ; 80B5B18 @@ -348899,7 +348975,7 @@ sub_80B8EA8: ; 80B8EA8 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics adds r0, r4, 0 bl sub_8093284 ldrb r0, [r4, 0x18] @@ -349485,7 +349561,7 @@ sub_80B9390: ; 80B9390 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r4, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -350087,7 +350163,7 @@ sub_80B9804: ; 80B9804 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics bl sub_808EEDC adds r0, r4, 0 movs r1, 0x3 @@ -350364,7 +350440,7 @@ fishE: ; 80B9A60 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics adds r0, r4, 0 movs r1, 0x1 bl npc_turn @@ -356941,7 +357017,7 @@ sub_80BD23C: ; 80BD23C adds r3, r6, 0 bl sub_80BCE2C adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 24 lsrs r0, 24 add sp, 0x4 @@ -361425,11 +361501,11 @@ sub_80BF82C: ; 80BF82C @080BF93C: ldr r1, =gUnknown_085E8723 add r0, sp, 0x4 - bl gf_strcpy + bl CopyString ldr r0, =0x03005d90 ldr r1, [r0] add r0, sp, 0x4 - bl gf_strcat + bl AppendString movs r0, 0x1 add r1, sp, 0x4 movs r2, 0xF0 @@ -362474,11 +362550,11 @@ sub_80C020C: ; 80C020C @080C0250: ldr r1, =gUnknown_085E8D4F mov r0, sp - bl gf_strcpy + bl CopyString adds r1, r5, 0 movs r2, 0x2 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r0, sp movs r1, 0x60 movs r2, 0x19 @@ -367868,13 +367944,13 @@ sub_80C2DFC: ; 80C2DFC lsls r4, r5, 1 ldr r1, =0x000008c4 adds r0, r4, r1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080C2E1E ldr r1, =0x000008c5 adds r0, r4, r1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080C2E2C @@ -368016,7 +368092,7 @@ sub_80C2EC4: ; 80C2EC4 strh r0, [r5, 0xA] @080C2F14: ldr r0, =0x00000861 - bl flag_check + bl FlagGet strb r0, [r5, 0x2] bl sub_80C08E4 strb r0, [r5, 0x3] @@ -368070,7 +368146,7 @@ sub_80C2EC4: ; 80C2EC4 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r7, 0 - bl gf_strcpy + bl CopyString mov r0, r8 cmp r0, 0x1 beq @080C3004 @@ -368399,7 +368475,7 @@ sub_80C3190: ; 80C3190 @080C3228: lsls r0, r4, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080C3244 @@ -368780,20 +368856,20 @@ sub_80C3574: ; 80C3574 sub sp, 0x2C ldr r1, =gUnknown_085ECF71 add r0, sp, 0xC - bl gf_strcpy + bl CopyString adds r5, r0, 0 ldr r4, =0x02039ce8 ldr r1, [r4] ldr r0, =0x00000564 adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00007caa adds r0, r1 ldrb r1, [r0] adds r0, r5, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, [r4] ldr r1, =0x0000052a adds r0, r1 @@ -368843,7 +368919,7 @@ sub_80C3608: ; 80C3608 sub sp, 0x2C ldr r1, =gUnknown_085ECF78 add r0, sp, 0xC - bl gf_strcpy + bl CopyString ldr r4, =0x02039ce8 ldr r1, [r4] ldr r2, =0x00000542 @@ -368851,7 +368927,7 @@ sub_80C3608: ; 80C3608 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] ldr r1, =0x0000052a adds r0, r1 @@ -368943,11 +369019,11 @@ sub_80C3684: ; 80C3684 ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E969C adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, [r4] ldr r1, =0x0000052b adds r0, r1 @@ -369013,7 +369089,7 @@ sub_80C378C: ; 80C378C push {r4,r5,lr} sub sp, 0xC ldr r0, =0x00000861 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080C386E @@ -369063,9 +369139,9 @@ sub_80C378C: ; 80C378C adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085ECF8E - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x0000052b adds r0, r1 @@ -369222,7 +369298,7 @@ sub_80C3880: ; 80C3880 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r2, r7, 24 lsrs r2, 24 ldr r0, =gUnknown_0856FB0C @@ -369260,7 +369336,7 @@ sub_80C3880: ; 80C3880 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r2, r7, 24 lsrs r2, 24 mov r0, r8 @@ -369391,14 +369467,14 @@ sub_80C3AF0: ; 80C3AF0 adds r0, 0x4D ldr r2, =0x00000564 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, [r4] adds r0, r1, 0 adds r0, 0x4D ldr r2, =0x00007caa adds r1, r2 ldrb r1, [r1] - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r1, [r4] ldr r2, =0x0000052a adds r0, r1, r2 @@ -369407,11 +369483,11 @@ sub_80C3AF0: ; 80C3AF0 beq @080C3B30 ldr r0, =0x02021cc4 adds r1, 0x4D - bl gf_strcpy + bl CopyString ldr r0, [r4] adds r0, 0x4D ldr r1, =gUnknown_085ECFA6 - bl ExpandTextCodes + bl ExpandStringRefs @080C3B30: pop {r4} pop {r0} @@ -369490,7 +369566,7 @@ sub_80C3BC4: ; 80C3BC4 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 ldr r1, [r4] ldr r2, =0x0000053c @@ -369498,7 +369574,7 @@ sub_80C3BC4: ; 80C3BC4 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021ec4 ldr r1, [r4] ldr r2, =0x0000053e @@ -369506,11 +369582,11 @@ sub_80C3BC4: ; 80C3BC4 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] adds r0, 0x93 ldr r1, =gUnknown_0856FB4C - bl ExpandTextCodes + bl ExpandStringRefs @080C3C0E: pop {r4} pop {r0} @@ -369625,7 +369701,7 @@ sub_80C3CF4: ; 80C3CF4 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r1, [r4] ldr r2, =0x00000165 adds r0, r1, r2 @@ -369635,7 +369711,7 @@ sub_80C3CF4: ; 80C3CF4 ldrh r1, [r1] movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, [r4] ldr r2, =0x000001ab adds r0, r1, r2 @@ -369644,7 +369720,7 @@ sub_80C3CF4: ; 80C3CF4 ldrh r1, [r1] movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080C3D40: pop {r4} pop {r0} @@ -369664,16 +369740,16 @@ sub_80C3D60: ; 80C3D60 ldr r0, =0x02021cc4 ldr r2, =0x00000165 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, [r5] ldr r2, =0x000001ab adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085ECFED adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r1, [r5] adds r1, 0xD9 ldr r3, =gUnknown_0856FB0C @@ -369703,7 +369779,7 @@ sub_80C3DC0: ; 80C3DC0 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080C3DDE: pop {r0} bx r0 @@ -369752,7 +369828,7 @@ sub_80C3E20: ; 80C3E20 adds r0, r2, r3 movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080C3E48: pop {r0} bx r0 @@ -369807,7 +369883,7 @@ sub_80C3E98: ; 80C3E98 adds r0, r2, r3 movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080C3EBE: pop {r0} bx r0 @@ -369862,12 +369938,12 @@ sub_80C3F14: ; 80C3F14 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] ldr r1, =0x00000395 adds r0, r1 ldr r1, =gUnknown_085ED096 - bl ExpandTextCodes + bl ExpandStringRefs @080C3F46: pop {r4} pop {r0} @@ -369925,7 +370001,7 @@ sub_80C3FA4: ; 80C3FA4 ldrh r1, [r2] movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080C3FCE: pop {r0} bx r0 @@ -369988,7 +370064,7 @@ sub_80C4020: ; 80C4020 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 ldr r1, [r4] ldr r2, =0x0000054e @@ -369996,12 +370072,12 @@ sub_80C4020: ; 80C4020 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 ldr r1, =gUnknown_085ED0E0 - bl ExpandTextCodes + bl ExpandStringRefs b @080C40B6 .align 2, 0 .pool @@ -370015,12 +370091,12 @@ sub_80C4020: ; 80C4020 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 ldr r1, =gUnknown_085ED0C8 - bl ExpandTextCodes + bl ExpandStringRefs @080C40B6: pop {r4} pop {r0} @@ -370227,7 +370303,7 @@ sub_80C41D8: ; 80C41D8 cmp r0, 0 beq @080C428E movs r1, 0 - bl sub_80D3020 + bl GetMonIconTiles adds r1, r0, 0 lsls r3, r4, 20 movs r0, 0x80 @@ -371780,7 +371856,7 @@ sub_80C4EE4: ; 80C4EE4 adds r1, r3 adds r1, r2 ldrh r1, [r1] - bl sub_811EBBC + bl CopyEasyChatWord adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -372181,7 +372257,7 @@ sub_80C51F0: ; 80C51F0 lsls r5, r4, 1 ldr r1, =0x000008c4 adds r0, r5, r1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080C52A2 @@ -372194,7 +372270,7 @@ sub_80C51F0: ; 80C51F0 @080C52A2: ldr r2, =0x000008c5 adds r0, r5, r2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080C52BC @@ -373587,7 +373663,7 @@ sub_80C5DB8: ; 80C5DB8 adds r0, r4, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x8 adds r1, r4, 0 movs r2, 0x5B @@ -375595,7 +375671,7 @@ sub_80C6EAC: ; 80C6EAC str r0, [sp, 0x18] str r1, [sp, 0x1C] ldr r0, [sp, 0x20] - bl sub_80091CC + bl GetStringLength_Multibyte lsls r0, 24 ldr r2, =0x00ffffff ldr r1, [sp, 0x18] @@ -375879,7 +375955,7 @@ sub_80C70FC: ; 80C70FC adds r5, r0, 0 lsls r4, r2, 16 lsrs r4, 16 - bl gf_strcpy + bl CopyString adds r1, r0, 0 adds r5, r4 cmp r1, r5 @@ -376714,12 +376790,12 @@ sub_80C7770: ; 80C7770 lsrs r0, 24 bl sav3_get_box_name ldr r1, =gUnknown_085EBCC1 - bl gf_strcpy + bl CopyString adds r4, r5, 0x1 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r4, 16 lsrs r5, r4, 16 cmp r5, 0xD @@ -377317,10 +377393,10 @@ sub_80C7BE4: ; 80C7BE4 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_08571737 add r0, sp, 0xC - bl gf_strcat + bl AppendString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x40 @@ -382854,14 +382930,14 @@ sub_80CABE0: ; 80CABE0 cmp r1, r0 beq @080CAC0A ldr r0, =0x000008d7 - bl flag_clear + bl FlagReset ldr r4, =0x00004036 bl get_preferred_box adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl var_set + bl VarSet @080CAC0A: pop {r4} pop {r0} @@ -382972,7 +383048,7 @@ sub_80CAC58: ; 80CAC58 ldr r2, =0x00000d65 adds r1, r2 @080CAD00: - bl gf_strcpy + bl CopyString adds r2, r0, 0 b @080CAD16 .align 2, 0 @@ -385618,7 +385694,7 @@ sub_80CC124: ; 80CC124 lsrs r4, 16 adds r0, r3, 0 movs r1, 0x1 - bl sub_80D3020 + bl GetMonIconTiles lsls r1, r4, 5 ldr r2, =0x06010000 adds r1, r2 @@ -386876,7 +386952,7 @@ sub_80CCB50: ; 80CCB50 adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl sub_8009128 + bl CopyStringPadded mov r4, r10 ldr r1, [r4] adds r5, r1, r5 @@ -387044,7 +387120,7 @@ sub_80CCCFC: ; 80CCCFC adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl sub_8009128 + bl CopyStringPadded mov r7, r8 ldr r1, [r7] adds r5, r1, r5 @@ -389608,7 +389684,7 @@ sub_80CE250: ; 80CE250 adds r0, r1, r2 ldr r2, =0x00000cee adds r1, r2 - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -390796,7 +390872,7 @@ sub_80CEC00: ; 80CEC00 bl pokemon_getattr ldr r0, [r4] adds r0, r5 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r6, 0 movs r1, 0x38 bl pokemon_getattr @@ -390898,7 +390974,7 @@ sub_80CEC00: ; 80CEC00 bl pokemon_getattr_encrypted ldr r0, [r5] adds r0, r4 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r7, 0 bl sub_80690C0 ldr r1, [r5] @@ -391009,7 +391085,7 @@ sub_80CEC00: ; 80CEC00 adds r1, r3 movs r2, 0 movs r3, 0x5 - bl sub_8009128 + bl CopyStringPadded b @080CEECE .align 2, 0 .pool @@ -391019,7 +391095,7 @@ sub_80CEC00: ; 80CEC00 ldr r1, =gUnknown_085E8264 movs r2, 0 movs r3, 0x8 - bl sub_8009128 + bl CopyStringPadded @080CEECE: ldr r4, =0x02039d08 ldr r0, [r4] @@ -391061,7 +391137,7 @@ sub_80CEC00: ; 80CEC00 adds r1, r3 movs r2, 0 movs r3, 0x5 - bl sub_8009128 + bl CopyStringPadded ldr r1, [r4] ldr r0, =0x00000d1d adds r2, r1, r0 @@ -391080,7 +391156,7 @@ sub_80CEC00: ; 80CEC00 adds r0, r2, 0 movs r2, 0 movs r3, 0x5 - bl sub_8009128 + bl CopyStringPadded ldr r4, [r4] ldr r3, =0x00000d41 adds r2, r4, r3 @@ -391185,7 +391261,7 @@ sub_80CEC00: ; 80CEC00 adds r0, r2, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r2, r0, 0 strb r5, [r2] movs r0, 0xFF @@ -391203,7 +391279,7 @@ sub_80CEC00: ; 80CEC00 adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl sub_8009128 + bl CopyStringPadded b @080CF0B8 .align 2, 0 .pool @@ -393056,7 +393132,7 @@ sub_80CFF34: ; 80CFF34 ldr r0, [r0] str r0, [r1] str r3, [r1, 0x4] - bl sub_8008C24 + bl GetStringLength lsls r0, 24 lsrs r1, r0, 24 ldr r0, [r4] @@ -398044,7 +398120,7 @@ sub_80D255C: ; 80D255C ldr r0, [r0] ldr r2, =0x00003d74 adds r0, r2 - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -399163,7 +399239,7 @@ sub_80D2D78: ; 80D2D78 adds r1, r2 strh r1, [r3, 0x14] ldr r1, [sp, 0x30] - bl sub_80D3020 + bl GetMonIconTiles str r0, [sp, 0x4] lsls r4, 16 asrs r4, 16 @@ -399325,7 +399401,7 @@ sub_80D2EDC: ; 80D2EDC lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 - bl sub_80D3020 + bl GetMonIconTiles pop {r4} pop {r1} bx r1 @@ -399496,8 +399572,8 @@ sub_80D3014: ; 80D3014 bx r0 thumb_func_end sub_80D3014 - thumb_func_start sub_80D3020 -sub_80D3020: ; 80D3020 + thumb_func_start GetMonIconTiles +GetMonIconTiles: ; 80D3020 push {lr} adds r3, r1, 0 lsls r0, 16 @@ -399521,7 +399597,7 @@ sub_80D3020: ; 80D3020 bx r1 .align 2, 0 .pool - thumb_func_end sub_80D3020 + thumb_func_end GetMonIconTiles thumb_func_start sub_80D304C sub_80D304C: ; 80D304C @@ -400491,7 +400567,7 @@ sub_80D3718: ; 80D3718 muls r0, r1 ldr r1, =0x020244ec adds r0, r1 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 str r0, [sp, 0xC] @@ -400589,7 +400665,7 @@ sub_80D3718: ; 80D3718 cmp r0, 0x1 beq @080D3846 adds r0, r4, 0 - bl sub_8089484 + bl MetatileBehavior_IsAsh lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -400770,7 +400846,7 @@ sub_80D3718: ; 80D3718 cmp r0, 0x1 beq @080D39BC adds r0, r4, 0 - bl sub_8089484 + bl MetatileBehavior_IsAsh lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -402585,7 +402661,7 @@ sub_80D47E4: ; 80D47E4 push {r4,lr} movs r0, 0x80 lsls r0, 7 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -402838,7 +402914,7 @@ sub_80D49B0: ; 80D49B0 ldr r1, [r0] @080D49F2: adds r0, r4, 0 - bl gf_strcpy + bl CopyString b @080D4A18 .align 2, 0 .pool @@ -406434,7 +406510,7 @@ itemid_get_name: ; 80D6644 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -406459,7 +406535,7 @@ sub_80D6660: ; 80D6660 ldr r1, =gUnknown_085EFCD4 @080D667E: adds r0, r4, 0 - bl gf_strcpy + bl CopyString b @080D66BE .align 2, 0 .pool @@ -406485,7 +406561,7 @@ sub_80D6660: ; 80D6660 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString @080D66BE: pop {r4} pop {r0} @@ -406500,12 +406576,12 @@ sub_80D66C4: ; 80D66C4 bhi @080D66CE ldr r4, =gUnknown_085EFCDF @080D66CE: - bl gf_strcpy + bl CopyString movs r1, 0 strb r1, [r0] adds r0, 0x1 adds r1, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -406566,7 +406642,7 @@ sub_80D6724: ; 80D6724 cmp r0, 0 bne @080D6752 ldr r0, =0x00004004 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -406691,7 +406767,7 @@ sub_80D6800: ; 80D6800 cmp r0, 0 bne @080D6838 ldr r0, =0x00004004 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -406848,7 +406924,7 @@ bag_add_item: ; 80D6928 cmp r0, 0 bne @080D6964 ldr r0, =0x00004004 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -407036,7 +407112,7 @@ sub_80D6AA4: ; 80D6AA4 cmp r0, 0 bne @080D6AE0 ldr r0, =0x00004004 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -407099,7 +407175,7 @@ sub_80D6AA4: ; 80D6AA4 bne @080D6B70 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 2 @@ -407108,10 +407184,10 @@ sub_80D6AA4: ; 80D6AA4 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet ldr r0, =0x000040ed mov r1, r8 - bl var_set + bl VarSet @080D6B70: mov r0, r9 bl sub_81ABB2C @@ -410057,7 +410133,7 @@ sub_80D833C: ; 80D833C adds r1, 0x1 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02039f25 ldrb r0, [r0] bl sub_80DBCA8 @@ -410066,20 +410142,20 @@ sub_80D833C: ; 80D833C bne @080D83CC ldr r0, =0x02022e2c ldr r1, =gUnknown_0827D507 - bl gf_strcpy + bl CopyString b @080D83D4 .align 2, 0 .pool @080D83CC: ldr r0, =0x02022e2c ldr r1, =gUnknown_0827D531 - bl gf_strcpy + bl CopyString @080D83D4: bl sub_80DB89C ldr r4, =0x02021fc4 ldr r1, =0x02022e2c adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -410260,7 +410336,7 @@ sub_80D8490: ; 80D8490 add r0, sp, 0x4 ldr r1, =gUnknown_085ED1A7 @080D8566: - bl gf_strcpy + bl CopyString adds r5, r0, 0 @080D856C: movs r0, 0xD @@ -410269,7 +410345,7 @@ sub_80D8490: ; 80D8490 ldr r0, =gMoveNames adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r4, r6, 0x5 lsls r0, r4, 24 lsrs r0, 24 @@ -410402,7 +410478,7 @@ sub_80D8610: ; 80D8610 adds r1, 0x1 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02039f25 ldrb r0, [r0] bl sub_80DBCA8 @@ -410411,20 +410487,20 @@ sub_80D8610: ; 80D8610 bne @080D86DC ldr r0, =0x02022e2c ldr r1, =gUnknown_0827D507 - bl gf_strcpy + bl CopyString b @080D86E4 .align 2, 0 .pool @080D86DC: ldr r0, =0x02022e2c ldr r1, =gUnknown_0827D531 - bl gf_strcpy + bl CopyString @080D86E4: bl sub_80DB89C ldr r4, =0x02021fc4 ldr r1, =0x02022e2c adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_80DEC30 @@ -411303,7 +411379,7 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString mov r2, r9 ldr r0, [r2] ldr r0, [r0, 0x4] @@ -411319,7 +411395,7 @@ sub_80D8B38: ; 80D8B38 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString b @080D8F48 .align 2, 0 .pool @@ -411330,12 +411406,12 @@ sub_80D8B38: ; 80D8B38 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString @080D8F48: ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827D55A adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -412265,11 +412341,11 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E793 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -412380,11 +412456,11 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E2FE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -412521,11 +412597,11 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E6E3 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -412684,7 +412760,7 @@ sub_80D8B38: ; 80D8B38 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString b @080D9AAE .align 2, 0 .pool @@ -412700,7 +412776,7 @@ sub_80D8B38: ; 80D8B38 lsrs r1, 27 adds r1, r3 ldr r1, [r1] - bl gf_strcpy + bl CopyString @080D9AAE: ldr r5, [sp] lsls r0, r5, 24 @@ -412726,7 +412802,7 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02039f34 ldr r0, [r4] ldr r1, [r0] @@ -412759,7 +412835,7 @@ sub_80D8B38: ; 80D8B38 bge @080D9B48 ldr r0, =0x02021fc4 ldr r1, =gUnknown_0827E73C - bl ExpandTextCodes + bl ExpandStringRefs b @080D9B74 .align 2, 0 .pool @@ -412775,14 +412851,14 @@ sub_80D8B38: ; 80D8B38 bgt @080D9B6C ldr r0, =0x02021fc4 ldr r1, =gUnknown_0827E717 - bl ExpandTextCodes + bl ExpandStringRefs b @080D9B74 .align 2, 0 .pool @080D9B6C: ldr r0, =0x02021fc4 ldr r1, =gUnknown_0827E76A - bl ExpandTextCodes + bl ExpandStringRefs @080D9B74: ldr r0, =0x02021fc4 movs r1, 0x1 @@ -413107,11 +413183,11 @@ sub_80D8B38: ; 80D8B38 lsls r1, 6 ldr r4, =0x02039e02 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021cc4 lsls r1, r6, 6 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, [r5] ldr r2, [r1, 0x4] @@ -413124,11 +413200,11 @@ sub_80D8B38: ; 80D8B38 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E7EA adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -413153,7 +413229,7 @@ sub_80D8B38: ; 80D8B38 ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E817 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -413205,7 +413281,7 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 mov r2, r9 ldr r1, [r2] @@ -413216,11 +413292,11 @@ sub_80D8B38: ; 80D8B38 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827E58A adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -413361,11 +413437,11 @@ sub_80D8B38: ; 80D8B38 lsls r1, r6, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827D56F adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -413848,14 +413924,14 @@ sub_80DA3CC: ; 80DA3CC lsls r1, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r5, =0x02021fc4 ldr r0, =gUnknown_08587D90 lsls r4, 2 adds r4, r0 ldr r1, [r4] adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r5, 0 movs r1, 0x1 bl sub_80DEC30 @@ -414135,7 +414211,7 @@ sub_80DA5E8: ; 80DA5E8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_0827D597 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -414424,7 +414500,7 @@ sub_80DA8C8: ; 80DA8C8 ldr r6, =0x03005d90 ldr r1, [r6] mov r0, sp - bl gf_strcpy + bl CopyString ldr r0, =0x02039f2a ldrb r1, [r0] movs r0, 0x1 @@ -414491,7 +414567,7 @@ sub_80DA8C8: ; 80DA8C8 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 ldr r0, =0x02039f2a ldrb r1, [r0] movs r0, 0x1 @@ -414516,7 +414592,7 @@ sub_80DA8C8: ; 80DA8C8 lsls r0, 6 adds r0, r4 mov r1, sp - bl gf_strcpy + bl CopyString adds r0, r5, 0 movs r1, 0x16 bl pokemon_getattr @@ -414759,7 +414835,7 @@ sub_80DAB8C: ; 80DAB8C movs r7, 0 bl sub_80DA884 ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080DABC0 @@ -415189,13 +415265,13 @@ sub_80DAED4: ; 80DAED4 lsrs r4, 24 ldr r0, =0x02022e2c ldr r1, =gUnknown_085ED1AB - bl gf_strcpy + bl CopyString adds r1, r0, 0 subs r0, r1, 0x1 strb r4, [r0] adds r0, r1, 0 adds r1, r5, 0 - bl gf_strcpy + bl CopyString adds r1, r0, 0 pop {r4,r5} pop {r1} @@ -415231,12 +415307,12 @@ sub_80DAF1C: ; 80DAF1C lsrs r4, 24 ldr r1, =gUnknown_085E8D3E add r0, sp, 0x4 - bl gf_strcpy + bl CopyString lsls r1, r5, 6 ldr r0, =0x02039e0d adds r1, r0 add r0, sp, 0x4 - bl gf_strcat + bl AppendString add r0, sp, 0x4 adds r1, r4, 0 bl sub_80DAED4 @@ -419159,7 +419235,7 @@ sub_80DCD48: ; 80DCD48 lsrs r4, r0, 16 adds r0, r2, 0 ldr r1, =gUnknown_085E8D40 - bl gf_strcpy + bl CopyString adds r2, r0, 0 @080DCDBC: lsls r1, r4, 16 @@ -419167,7 +419243,7 @@ sub_80DCD48: ; 80DCD48 adds r0, r2, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02039f26 adds r0, r5, r0 ldrb r0, [r0] @@ -419202,7 +419278,7 @@ sub_80DCD48: ; 80DCD48 lsrs r4, r0, 16 adds r0, r2, 0 ldr r1, =gUnknown_085E8D40 - bl gf_strcpy + bl CopyString adds r2, r0, 0 @080DCE14: lsls r1, r4, 16 @@ -419210,7 +419286,7 @@ sub_80DCD48: ; 80DCD48 adds r0, r2, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02039f26 adds r0, r5, r0 ldrb r0, [r0] @@ -420051,7 +420127,7 @@ sub_80DD45C: ; 80DD45C lsls r1, r4, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r5, =0x02039f34 ldr r1, [r5] @@ -420065,7 +420141,7 @@ sub_80DD45C: ; 80DD45C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r3, =gContestMoves ldr r1, [r5] ldr r0, [r1, 0x8] @@ -420084,7 +420160,7 @@ sub_80DD45C: ; 80DD45C bne @080DD4DC ldr r0, =0x02021ec4 ldr r1, =gUnknown_0827E837 - bl gf_strcpy + bl CopyString b @080DD52C .align 2, 0 .pool @@ -420094,7 +420170,7 @@ sub_80DD45C: ; 80DD45C bne @080DD4F4 ldr r0, =0x02021ec4 ldr r1, =gUnknown_0827E83F - bl gf_strcpy + bl CopyString b @080DD52C .align 2, 0 .pool @@ -420104,7 +420180,7 @@ sub_80DD45C: ; 80DD45C bne @080DD50C ldr r0, =0x02021ec4 ldr r1, =gUnknown_0827E847 - bl gf_strcpy + bl CopyString b @080DD52C .align 2, 0 .pool @@ -420114,14 +420190,14 @@ sub_80DD45C: ; 80DD45C bne @080DD524 ldr r0, =0x02021ec4 ldr r1, =gUnknown_0827E850 - bl gf_strcpy + bl CopyString b @080DD52C .align 2, 0 .pool @080DD524: ldr r0, =0x02021ec4 ldr r1, =gUnknown_0827E85A - bl gf_strcpy + bl CopyString @080DD52C: ldr r4, =0x02021fc4 ldr r1, =gUnknown_08587E10 @@ -420129,7 +420205,7 @@ sub_80DD45C: ; 80DD45C adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs bl sub_80DB89C adds r0, r4, 0 movs r1, 0x1 @@ -423301,7 +423377,7 @@ sub_80DEDA8: ; 80DEDA8 adds r0, 0xB adds r1, r4, 0x2 adds r1, r5, r1 - bl gf_strcpy + bl CopyString mov r2, r10 ldr r0, [r2] adds r0, r6 @@ -423309,7 +423385,7 @@ sub_80DEDA8: ; 80DEDA8 adds r4, 0xD adds r5, r4 adds r1, r5, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02039f2a ldrb r1, [r0] movs r0, 0x1 @@ -423385,13 +423461,13 @@ sub_80DEDA8: ; 80DEDA8 adds r0, 0xB adds r1, r4, 0x2 adds r1, r5, r1 - bl gf_strcpy + bl CopyString adds r0, r6, 0 adds r0, 0x16 adds r4, 0xD adds r5, r4 adds r1, r5, 0 - bl gf_strcpy + bl CopyString mov r2, r8 strb r2, [r6, 0xA] @080DEF8E: @@ -424482,7 +424558,7 @@ sub_80DF750: ; 80DF750 @080DF7AE: add r0, sp, 0x4 ldr r1, =gUnknown_085ED1B2 - bl gf_strcpy + bl CopyString adds r5, r0, 0 ldr r0, =0x02039f26 adds r0, r7, r0 @@ -424508,7 +424584,7 @@ sub_80DF750: ; 80DF750 adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 lsrs r4, 1 lsls r0, r6, 24 @@ -424580,7 +424656,7 @@ sub_80DF750: ; 80DF750 @080DF884: add r0, sp, 0x4 ldr r1, =gUnknown_085ED1B5 - bl gf_strcpy + bl CopyString ldr r0, =0x02039f34 ldr r0, [r0] ldr r1, [r0, 0x1C] @@ -424597,7 +424673,7 @@ sub_80DF750: ; 80DF750 adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 lsrs r4, 1 lsls r0, r6, 24 @@ -424684,7 +424760,7 @@ sub_80DF940: ; 80DF940 b @080DF9CC @080DF956: adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 @@ -424765,7 +424841,7 @@ sub_80DF9E0: ; 80DF9E0 push {r4,r5,lr} adds r5, r0, 0 adds r4, r1, 0 - bl sub_8009370 + bl StripExtendedControlCodes cmp r4, 0x1 bne @080DF9F8 movs r0, 0xFF @@ -424798,7 +424874,7 @@ sub_80DFA08: ; 80DFA08 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @080DFA3E @080DFA28: ldrb r0, [r4, 0xA] @@ -424806,7 +424882,7 @@ sub_80DFA08: ; 80DFA08 bne @080DFA38 adds r0, r4, 0 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @080DFA3E @080DFA38: strb r0, [r4, 0x5] @@ -425433,7 +425509,7 @@ GetShopItemNames: ; 80DFF2C ldr r0, [r4] adds r0, r5 ldr r1, =gUnknown_085E8CF7 - bl gf_strcpy + bl CopyString ldr r2, =0x02039f74 ldr r0, [r2] lsls r1, r6, 3 @@ -425506,7 +425582,7 @@ GetShopItemName: ; 80E0000 ldr r0, =gUnknown_085A5C09 adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString @080E002C: str r5, [r6] str r4, [r6, 0x4] @@ -425652,7 +425728,7 @@ PrintShopBuyPrice: ; 80E0114 adds r1, r4, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString b @080E0176 .align 2, 0 .pool @@ -425664,12 +425740,12 @@ PrintShopBuyPrice: ; 80E0114 ldrh r1, [r1, 0x14] movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString @080E0176: ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E969C adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x7 adds r1, r4, 0 movs r2, 0x78 @@ -426609,7 +426685,7 @@ sub_80E08F0: ; 80E08F0 lsls r0, 2 add r0, r10 ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo mov r4, r8 ldr r3, [r4] ldr r2, =0x00002010 @@ -426949,7 +427025,7 @@ sub_80E0AC8: ; 80E0AC8 ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085E9417 b @080E0C26 .align 2, 0 @@ -426969,7 +427045,7 @@ sub_80E0AC8: ; 80E0AC8 lsls r1, r5, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 mov r3, r8 ldr r1, [r3] @@ -426977,20 +427053,20 @@ sub_80E0AC8: ; 80E0AC8 ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldrb r0, [r4, 0xF] cmp r0, 0x1 bne @080E0C7C ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9468 - bl ExpandTextCodes + bl ExpandStringRefs b @080E0C84 .align 2, 0 .pool @080E0C7C: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9493 - bl ExpandTextCodes + bl ExpandStringRefs @080E0C84: ldr r1, =0x02021fc4 ldr r2, =sub_80E0EAC @@ -427031,11 +427107,11 @@ sub_80E0CA4: ; 80E0CA4 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E93D5 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -427173,7 +427249,7 @@ sub_80E0D88: ; 80E0D88 ldrsh r1, [r5, r2] movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021ec4 ldr r1, [r7] movs r2, 0x80 @@ -427182,7 +427258,7 @@ sub_80E0D88: ; 80E0D88 ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085E943F ldr r2, =sub_80E0EAC adds r0, r6, 0 @@ -427509,11 +427585,11 @@ sub_80E10EC: ; 80E10EC ldrsh r1, [r4, r2] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -428199,8 +428275,9 @@ sub_80E162C: ; 80E162C bx r1 thumb_func_end sub_80E162C - thumb_func_start sub_80E167C -sub_80E167C: ; 80E167C + thumb_func_start GetRomBerryInfo +; struct berry_info *GetRomBerryInfo(u8 berryId) +GetRomBerryInfo: ; 80E167C push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -428234,7 +428311,7 @@ sub_80E167C: ; 80E167C bx r1 .align 2, 0 .pool - thumb_func_end sub_80E167C + thumb_func_end GetRomBerryInfo thumb_func_start sub_80E16C0 sub_80E16C0: ; 80E16C0 @@ -428320,7 +428397,7 @@ sub_80E1738: ; 80E1738 bl sub_808F110 lsls r0, 24 lsrs r0, 24 - bl sub_80E19C8 + bl get_berry_tree_stage lsls r0, 24 cmp r0, 0 bne @080E1768 @@ -428633,8 +428710,8 @@ sub_80E1984: ; 80E1984 .pool thumb_func_end sub_80E1984 - thumb_func_start sub_80E19AC -sub_80E19AC: ; 80E19AC + thumb_func_start get_berry_tree_type +get_berry_tree_type: ; 80E19AC lsls r0, 24 ldr r1, =0x03005d8c ldr r1, [r1] @@ -428646,10 +428723,10 @@ sub_80E19AC: ; 80E19AC bx lr .align 2, 0 .pool - thumb_func_end sub_80E19AC + thumb_func_end get_berry_tree_type - thumb_func_start sub_80E19C8 -sub_80E19C8: ; 80E19C8 + thumb_func_start get_berry_tree_stage +get_berry_tree_stage: ; 80E19C8 lsls r0, 24 ldr r1, =0x03005d8c ldr r1, [r1] @@ -428663,7 +428740,7 @@ sub_80E19C8: ; 80E19C8 bx lr .align 2, 0 .pool - thumb_func_end sub_80E19C8 + thumb_func_end get_berry_tree_stage thumb_func_start berryid_from_itemid berryid_from_itemid: ; 80E19E8 @@ -428719,7 +428796,7 @@ sub_80E1A38: ; 80E1A38 adds r4, r1, 0 lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo adds r1, r0, 0 adds r0, r4, 0 movs r2, 0x6 @@ -428738,7 +428815,7 @@ sub_80E1A58: ; 80E1A58 adds r5, r2, 0 lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo adds r1, r0, 0 adds r0, r4, 0 adds r2, r5, 0 @@ -428864,7 +428941,7 @@ sub_80E1B38: ; 80E1B38 push {r4-r6,lr} adds r4, r0, 0 ldrb r0, [r4] - bl sub_80E167C + bl GetRomBerryInfo ldrb r6, [r0, 0xB] ldrb r5, [r0, 0xA] adds r0, r4, 0 @@ -428903,7 +428980,7 @@ sub_80E1B7C: ; 80E1B7C push {lr} lsls r0, 24 lsrs r0, 24 - bl sub_80E167C + bl GetRomBerryInfo ldrb r1, [r0, 0x14] lsls r0, r1, 4 subs r0, r1 @@ -428922,7 +428999,7 @@ sub_80E1B94: ; 80E1B94 lsls r0, 24 lsrs r5, r0, 24 adds r0, r5, 0 - bl sub_80E19AC + bl get_berry_tree_type lsls r0, 24 lsrs r6, r0, 24 adds r0, r5, 0 @@ -428946,7 +429023,7 @@ sub_80E1B94: ; 80E1B94 @080E1BE0: ldr r4, =0x020375e0 adds r0, r5, 0 - bl sub_80E19C8 + bl get_berry_tree_stage lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -428982,7 +429059,7 @@ sub_80E1C2C: ; 80E1C2C bl sub_808F110 lsls r0, 24 lsrs r0, 24 - bl sub_80E19AC + bl get_berry_tree_type lsls r0, 24 lsrs r0, 24 ldr r1, =0x02021cc4 @@ -429003,7 +429080,7 @@ sub_80E1C54: ; 80E1C54 lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 - bl sub_80E19AC + bl get_berry_tree_type adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 @@ -429069,7 +429146,7 @@ sub_80E1CDC: ; 80E1CDC lsls r5, 24 lsrs r5, 24 adds r0, r5, 0 - bl sub_80E19AC + bl get_berry_tree_type lsls r0, 24 lsrs r0, 24 ldr r6, =0x020375e0 @@ -429313,7 +429390,7 @@ sub_80E1EB8: ; 80E1EB8 bne @080E1EEC ldr r0, =0x03005d90 ldr r0, [r0] - bl sub_8008C24 + bl GetStringLength adds r0, r5, r0 lsls r0, 16 lsrs r5, r0, 16 @@ -429941,7 +430018,7 @@ CreatePCMenu: ; 80E239C bls @080E23AC ldr r6, =0x00000864 adds r0, r6, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080E23D4 @@ -429955,7 +430032,7 @@ CreatePCMenu: ; 80E239C lsls r0, 24 lsrs r4, r0, 24 adds r0, r6, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r5, r0, 24 cmp r5, 0 @@ -430020,7 +430097,7 @@ CreatePCMenu: ; 80E239C bl Print @080E247A: ldr r0, =0x000008ab - bl flag_check + bl FlagGet lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -430054,7 +430131,7 @@ CreatePCMenu: ; 80E239C ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EB183 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r6, 0 adds r1, r4, 0 adds r2, r7, 0 @@ -430169,7 +430246,7 @@ sub_80E2578: ; 80E2578 lsrs r5, r0, 24 movs r0, 0xE8 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x1 @@ -430188,7 +430265,7 @@ sub_80E2578: ; 80E2578 cmp r0, 0x1 bne @080E2630 ldr r0, =0x000008b3 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -430211,7 +430288,7 @@ sub_80E2578: ; 80E2578 movs r4, 0xD7 lsls r4, 1 adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080E2630 @@ -430223,7 +430300,7 @@ sub_80E2578: ; 80E2578 lsls r0, 24 lsrs r5, r0, 24 adds r0, r4, 0 - bl flag_set + bl FlagSet @080E2630: movs r0, 0xB9 lsls r0, 1 @@ -430235,7 +430312,7 @@ sub_80E2578: ; 80E2578 bne @080E2690 movs r0, 0x8E lsls r0, 4 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -430257,7 +430334,7 @@ sub_80E2578: ; 80E2578 bne @080E2690 ldr r4, =0x000001db adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080E2690 @@ -430269,7 +430346,7 @@ sub_80E2578: ; 80E2578 lsls r0, 24 lsrs r5, r0, 24 adds r0, r4, 0 - bl flag_set + bl FlagSet @080E2690: ldr r0, =0x00000173 movs r1, 0x1 @@ -430279,7 +430356,7 @@ sub_80E2578: ; 80E2578 cmp r0, 0x1 bne @080E26EC ldr r0, =0x000008d5 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -430301,7 +430378,7 @@ sub_80E2578: ; 80E2578 bne @080E26EC ldr r4, =0x000001af adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080E26EC @@ -430313,7 +430390,7 @@ sub_80E2578: ; 80E2578 lsls r0, 24 lsrs r5, r0, 24 adds r0, r4, 0 - bl flag_set + bl FlagSet @080E26EC: movs r0, 0xBC lsls r0, 1 @@ -430324,7 +430401,7 @@ sub_80E2578: ; 80E2578 cmp r0, 0x1 bne @080E274C ldr r0, =0x000008d6 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -430347,7 +430424,7 @@ sub_80E2578: ; 80E2578 movs r4, 0xD8 lsls r4, 1 adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080E274C @@ -430359,7 +430436,7 @@ sub_80E2578: ; 80E2578 lsls r0, 24 lsrs r5, r0, 24 adds r0, r4, 0 - bl flag_set + bl FlagSet @080E274C: ldr r0, =0x03001124 adds r0, r5, r0 @@ -430374,7 +430451,7 @@ sub_80E2578: ; 80E2578 bne @080E276E movs r0, 0xE8 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 @080E276E: @@ -431063,7 +431140,7 @@ display_text_and_get_width_internal: ; 80E2D10 sub sp, 0x40 adds r1, r0, 0 mov r0, sp - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 mov r1, sp movs r2, 0 @@ -431356,7 +431433,7 @@ choose_name_or_words_screen_setup: ; 80E2EA8 ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString @080E2F64: movs r0, 0x10 strh r0, [r4] @@ -431975,40 +432052,40 @@ pokemon_transfer_to_pc_with_message: ; 80E34E4 bne @080E3534 ldr r4, =0x02021cc4 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, =0x02039f94 ldr r1, [r1] ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString b @080E3574 .align 2, 0 .pool @080E3534: ldr r4, =0x02021cc4 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, =0x02039f94 ldr r1, [r1] ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r4, =0x02021ec4 bl get_unknown_box_id lsls r0, 24 @@ -432016,11 +432093,11 @@ pokemon_transfer_to_pc_with_message: ; 80E34E4 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r5, 0x2 @080E3574: ldr r0, =0x000008ab - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080E3586 @@ -432034,7 +432111,7 @@ pokemon_transfer_to_pc_with_message: ; 80E34E4 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0 bl sub_81973C4 @@ -434495,7 +434572,7 @@ sub_80E48E8: ; 80E48E8 ldr r0, =gSpeciesNames adds r1, r0 add r0, sp, 0xC - bl gf_strcpy + bl CopyString ldr r0, [r5] ldr r1, =0x00001e28 adds r0, r1 @@ -434503,7 +434580,7 @@ sub_80E48E8: ; 80E48E8 ldr r1, [r0, 0x8] add r0, sp, 0xC movs r2, 0xF - bl sub_8008C08 + bl AppendString_LimitN ldr r0, [r5] ldr r4, =0x00001e14 adds r0, r4 @@ -434585,7 +434662,7 @@ sub_80E49BC: ; 80E49BC movs r4, 0 ldr r1, =gUnknown_085E8D49 add r0, sp, 0xC - bl gf_strcpy + bl CopyString ldr r5, =0x02039f94 ldr r0, [r5] ldr r1, =0x00001e36 @@ -434597,7 +434674,7 @@ sub_80E49BC: ; 80E49BC bne @080E49E6 ldr r1, =gUnknown_085E8D4B add r0, sp, 0xC - bl gf_strcpy + bl CopyString movs r4, 0x1 @080E49E6: ldr r0, [r5] @@ -434891,7 +434968,7 @@ sub_80E4BE4: ; 80E4BE4 lsls r2, 24 lsrs r2, 24 adds r1, r3, 0 - bl gf_strncpy + bl CopyString_LimitN b @080E4C4A .align 2, 0 .pool @@ -435660,9 +435737,9 @@ PrintMoneyAmount: ; 80E5214 adds r1, r3, 0 movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 movs r1, 0x6 @@ -435683,7 +435760,7 @@ PrintMoneyAmount: ; 80E5214 @080E5264: ldr r1, =gUnknown_085E969C adds r0, r2, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =0x02021fc4 str r6, [sp] str r5, [sp, 0x4] @@ -439678,7 +439755,7 @@ sub_80E715C: ; 80E715C movs r0, 0x80 lsls r0, 7 movs r1, 0x1 - bl var_set + bl VarSet ldr r1, =0x03001130 movs r0, 0 strb r0, [r1] @@ -439715,7 +439792,7 @@ sub_80E715C: ; 80E715C movs r0, 0x2 strh r0, [r5] ldr r0, =0x00000894 - bl flag_set + bl FlagSet bl sub_80FB074 ldrb r0, [r5, 0x1E] bl remove_task @@ -439997,7 +440074,7 @@ sub_80E7324: ; 80E7324 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x5 b @080E7564 .align 2, 0 @@ -440682,7 +440759,7 @@ sub_80E7948: ; 80E7948 beq @080E79F2 adds r0, r4, 0 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @080E79F2: adds r6, 0x1 cmp r6, 0x3 @@ -440987,7 +441064,7 @@ sub_80E7B60: ; 80E7B60 adds r4, r5, 0 adds r4, 0x24 adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 @@ -440998,7 +441075,7 @@ sub_80E7B60: ; 80E7B60 .pool @080E7C54: adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes mov r4, r9 @080E7C5C: ldrh r1, [r5, 0x2C] @@ -441007,7 +441084,7 @@ sub_80E7B60: ; 80E7B60 bne @080E7C74 adds r0, r5, 0 adds r0, 0x2C - bl sub_8009370 + bl StripExtendedControlCodes movs r1, 0x1 b @080E7C76 .align 2, 0 @@ -441441,23 +441518,23 @@ sub_80E7F68: ; 80E7F68 beq @080E7FE4 ldr r0, =0x00004001 ldrh r1, [r4] - bl var_set + bl VarSet ldr r0, =0x02021cc4 ldr r1, =0x020229f0 - bl gf_strcpy + bl CopyString ldrh r1, [r4] ldr r0, =0x00000113 cmp r1, r0 bne @080E7FEC ldr r0, =0x000008b3 - bl flag_set + bl FlagSet b @080E7FEC .align 2, 0 .pool @080E7FE4: ldr r0, =0x00004001 movs r1, 0 - bl var_set + bl VarSet @080E7FEC: pop {r4} pop {r0} @@ -441797,7 +441874,7 @@ sub_80E8260: ; 80E8260 mov r0, r10 ldr r1, [r0] adds r0, r6, 0 - bl gf_strcpy + bl CopyString adds r4, 0x10 adds r6, 0x10 adds r5, 0x10 @@ -441844,13 +441921,13 @@ sub_80E8260: ; 80E8260 mov r0, r10 ldr r1, [r0] mov r0, r9 - bl gf_strcpy + bl CopyString mov r2, r10 ldr r1, [r2] ldr r0, [sp, 0x4] adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, [sp, 0x4] adds r1, 0x8 str r1, [sp, 0x4] @@ -442835,7 +442912,7 @@ sub_80E8A54: ; 80E8A54 ldrb r1, [r7] lsrs r1, 4 adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @080E8A9A: adds r4, 0x38 movs r0, 0x38 @@ -442876,7 +442953,7 @@ sub_80E8AC0: ; 80E8AC0 beq @080E8ADC adds r0, r1, 0 adds r0, 0x20 - bl sub_8009370 + bl StripExtendedControlCodes @080E8ADC: adds r4, 0x1 cmp r4, 0x3 @@ -442992,7 +443069,7 @@ sub_80E8B6C: ; 80E8B6C strh r0, [r4] ldr r0, =0x00004054 adds r1, r3, 0 - bl var_set + bl VarSet @080E8BB0: pop {r4} pop {r0} @@ -443359,7 +443436,7 @@ sub_80E8E18: ; 80E8E18 bls @080E8E32 ldr r0, =0x00004054 movs r1, 0 - bl var_set + bl VarSet ldr r6, =0x03005d8c ldr r4, [r6] ldr r0, =0x00001a9e @@ -443374,7 +443451,7 @@ sub_80E8E18: ; 80E8E18 lsrs r2, 24 adds r0, r4, 0 adds r1, r5, 0 - bl gf_strncpy + bl CopyString_LimitN ldr r3, [r6] mov r1, r8 ldr r0, [r1] @@ -443398,7 +443475,7 @@ sub_80E8E18: ; 80E8E18 ldr r0, =0x00004026 ldr r1, =0x02037318 ldrb r1, [r1, 0x14] - bl var_set + bl VarSet pop {r3} mov r8, r3 pop {r4-r6} @@ -443566,7 +443643,7 @@ sub_80E8FD0: ; 80E8FD0 .pool @080E900C: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r1, =0x03005d8c @@ -443633,7 +443710,7 @@ sub_80E909C: ; 80E909C cmp r0, 0x9 bne @080E90C0 ldr r0, =0x00004097 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @080E90C0 @@ -443835,7 +443912,7 @@ sub_80E9238: ; 80E9238 cmp r0, 0 beq @080E9328 ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r1, =0x03005d8c @@ -443911,7 +443988,7 @@ sub_80E9238: ; 80E9238 cmp r0, 0x1 bne @080E9328 ldr r0, =0x00004089 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -443968,7 +444045,7 @@ sub_80E933C: ; 80E933C .pool @080E9374: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 ldr r2, =0x03005d8c @@ -444107,7 +444184,7 @@ sub_80E933C: ; 80E933C adds r1, r2 ldr r1, [r1] ldrh r1, [r1] - bl var_set + bl VarSet mov r3, r9 ldr r0, [r3, 0x4] ldr r0, [r0, 0x4] @@ -444119,7 +444196,7 @@ sub_80E933C: ; 80E933C adds r0, 0xAE lsls r0, 16 lsrs r0, 16 - bl flag_clear + bl FlagReset ldrb r0, [r6] ldr r5, =0x03005d8c ldr r2, [r5] @@ -444150,7 +444227,7 @@ sub_80E933C: ; 80E933C cmp r0, 0x1 bne @080E954C ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080E954C @@ -444234,7 +444311,7 @@ sub_80E9578: ; 80E9578 ldrb r2, [r2, 0x4] bl npc_hide_by_local_id_and_map adds r0, r4, 0 - bl flag_set + bl FlagSet @080E95B6: adds r0, r5, 0x1 lsls r0, 24 @@ -444257,7 +444334,7 @@ sub_80E95D4: ; 80E95D4 ldr r5, =0x0000401f ldr r4, =gUnknown_0858D060 ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_80EA20C @@ -444266,7 +444343,7 @@ sub_80E95D4: ; 80E95D4 adds r0, r4 ldrb r1, [r0] adds r0, r5, 0 - bl var_set + bl VarSet pop {r4,r5} pop {r0} bx r0 @@ -444489,7 +444566,7 @@ sub_80E9780: ; 80E9780 lsrs r2, 24 adds r0, r6, 0 adds r1, r4, 0 - bl gf_strncpy + bl CopyString_LimitN movs r1, 0xFF strb r1, [r0] mov r1, r8 @@ -444499,10 +444576,10 @@ sub_80E9780: ; 80E9780 adds r0, r1 ldrb r1, [r0] adds r0, r6, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r1, =gUnknown_085EA72F adds r0, r6, 0 - bl gf_strcat + bl AppendString pop {r3} mov r8, r3 pop {r4-r6} @@ -444517,7 +444594,7 @@ sub_80E97EC: ; 80E97EC push {r4,lr} adds r4, r0, 0 ldr r0, =0x00004054 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -444536,7 +444613,7 @@ sub_80E980C: ; 80E980C mov r6, r8 push {r6} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 ldr r1, =0x03005d8c @@ -444556,7 +444633,7 @@ sub_80E980C: ; 80E980C lsrs r2, 24 adds r0, r6, 0 adds r1, r4, 0 - bl gf_strncpy + bl CopyString_LimitN movs r1, 0xFF strb r1, [r0] mov r1, r8 @@ -444566,7 +444643,7 @@ sub_80E980C: ; 80E980C adds r0, r1 ldrb r1, [r0] adds r0, r6, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r3} mov r8, r3 pop {r4-r6} @@ -445004,7 +445081,7 @@ sub_80E9BA8: ; 80E9BA8 sub_80E9BDC: ; 80E9BDC push {lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_80E9878 @@ -445044,7 +445121,7 @@ sub_80E9BDC: ; 80E9BDC sub_80E9C2C: ; 80E9C2C push {lr} ldr r0, =0x00004054 - bl var_get + bl VarGet ldr r1, =0x03005d8c ldr r2, [r1] lsls r0, 16 @@ -445066,7 +445143,7 @@ sub_80E9C2C: ; 80E9C2C strb r0, [r2] movs r0, 0x86 lsls r0, 1 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -445534,7 +445611,7 @@ sub_80E9FFC: ; 80E9FFC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA737 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_80EA06C adds r0, r5, 0 adds r1, r4, 0 @@ -445720,7 +445797,7 @@ task_pc_turn_off: ; 80EA1D0 lsls r0, 24 lsrs r4, r0, 24 ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @080EA1F4 @@ -445779,7 +445856,7 @@ sub_80EA20C: ; 80EA20C sub_80EA250: ; 80EA250 push {lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_80EA20C @@ -445880,7 +445957,7 @@ sub_80EA2E4: ; 80EA2E4 sub_80EA30C: ; 80EA30C push {lr} ldr r0, =0x00004054 - bl var_get + bl VarGet ldr r1, =0x03005d8c ldr r3, [r1] lsls r0, 16 @@ -445912,11 +445989,11 @@ sub_80EA30C: ; 80EA30C sub_80EA354: ; 80EA354 push {r4-r7,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x00000922 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080EA39A @@ -445942,7 +446019,7 @@ sub_80EA354: ; 80EA354 cmp r3, 0x13 bls @080EA376 ldr r0, =0x00000922 - bl flag_set + bl FlagSet @080EA39A: ldr r4, =0x020375e0 lsls r0, r5, 24 @@ -446001,7 +446078,7 @@ sub_80EA3E4: ; 80EA3E4 b @080EA820 @080EA414: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -446050,13 +446127,13 @@ sub_80EA3E4: ; 80EA3E4 strh r0, [r5, 0x6] ldr r4, =0x000040ec adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet mov r0, sp movs r1, 0 ldrsh r0, [r0, r1] @@ -446089,7 +446166,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA4CC: ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x20 b @080EA7FA @@ -446130,7 +446207,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA524: ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x1 b @080EA7FA @@ -446158,7 +446235,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA562: ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x4 b @080EA7FA @@ -446191,7 +446268,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA5A8: ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r3, 0x80 lsls r3, 2 @@ -446213,7 +446290,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA5E0: ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 5 @@ -446222,9 +446299,9 @@ sub_80EA3E4: ; 80EA3E4 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r3, 0x80 lsls r3, 6 @@ -446246,7 +446323,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA62C: ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 5 @@ -446255,9 +446332,9 @@ sub_80EA3E4: ; 80EA3E4 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r3, 0x80 lsls r3, 6 @@ -446281,7 +446358,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA680: ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x80 b @080EA7FA @@ -446351,7 +446428,7 @@ sub_80EA3E4: ; 80EA3E4 @080EA714: ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r3, 0x80 lsls r3, 1 @@ -446372,7 +446449,7 @@ sub_80EA3E4: ; 80EA3E4 bne @080EA75E ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 3 @@ -446381,7 +446458,7 @@ sub_80EA3E4: ; 80EA3E4 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EA75E: mov r0, sp movs r3, 0 @@ -446405,7 +446482,7 @@ sub_80EA3E4: ; 80EA3E4 bne @080EA820 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r3, 0x80 lsls r3, 8 @@ -446426,7 +446503,7 @@ sub_80EA3E4: ; 80EA3E4 bne @080EA820 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 7 @@ -446448,7 +446525,7 @@ sub_80EA3E4: ; 80EA3E4 ldr r4, =0x000040ef @080EA7F0: adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x2 @080EA7FA: @@ -446457,7 +446534,7 @@ sub_80EA3E4: ; 80EA3E4 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet b @080EA820 .align 2, 0 .pool @@ -447484,7 +447561,7 @@ sub_80EAF80: ; 80EAF80 lsls r2, 24 lsrs r7, r2, 24 movs r0, 0x60 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080EAF9A @@ -447765,31 +447842,31 @@ sub_80EB1AC: ; 80EB1AC push {lr} ldr r0, =0x000040ec movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ed movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ee movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ef movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB1FC ldr r0, =0x000040f0 movs r1, 0x1 - bl var_set + bl VarSet b @080EB204 .align 2, 0 .pool @080EB1FC: ldr r0, =0x000040f0 movs r1, 0 - bl var_set + bl VarSet @080EB204: ldr r1, =0x0203a01d movs r0, 0 @@ -447805,7 +447882,7 @@ sub_80EB218: ; 80EB218 push {r4-r6,lr} ldr r5, =0x000040f0 adds r0, r5, 0 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB272 @@ -447820,24 +447897,24 @@ sub_80EB218: ; 80EB218 bne @080EB272 adds r0, r5, 0 movs r1, 0 - bl var_set + bl VarSet strb r4, [r6] bl sub_80EEA70 ldr r0, =0x000040ec movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ed movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ee movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x000040ef movs r1, 0 - bl var_set + bl VarSet adds r0, r5, 0 movs r1, 0 - bl var_set + bl VarSet @080EB272: pop {r4-r6} pop {r0} @@ -447850,13 +447927,13 @@ sub_80EB218: ; 80EB218 sub_80EB290: ; 80EB290 push {r4,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB2BA ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 4 @@ -447865,7 +447942,7 @@ sub_80EB290: ; 80EB290 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EB2BA: pop {r4} pop {r0} @@ -447878,13 +447955,13 @@ sub_80EB290: ; 80EB290 sub_80EB2C8: ; 80EB2C8 push {r4,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB2F2 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 3 @@ -447893,7 +447970,7 @@ sub_80EB2C8: ; 80EB2C8 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EB2F2: pop {r4} pop {r0} @@ -447906,26 +447983,26 @@ sub_80EB2C8: ; 80EB2C8 sub_80EB300: ; 80EB300 push {r4,r5,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB34C ldr r5, =0x000040ee adds r0, r5, 0 - bl var_get + bl VarGet ldr r1, =0x0000c7ff ands r1, r0 adds r0, r5, 0 - bl var_set + bl VarSet ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet ldr r1, =0x0000fffe ands r1, r0 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r5, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 6 @@ -447934,7 +448011,7 @@ sub_80EB300: ; 80EB300 lsls r1, 16 lsrs r1, 16 adds r0, r5, 0 - bl var_set + bl VarSet @080EB34C: pop {r4,r5} pop {r0} @@ -447947,26 +448024,26 @@ sub_80EB300: ; 80EB300 sub_80EB368: ; 80EB368 push {r4,r5,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB3B4 ldr r5, =0x000040ee adds r0, r5, 0 - bl var_get + bl VarGet ldr r1, =0x0000c7ff ands r1, r0 adds r0, r5, 0 - bl var_set + bl VarSet ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet ldr r1, =0x0000fffe ands r1, r0 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r5, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 4 @@ -447975,7 +448052,7 @@ sub_80EB368: ; 80EB368 lsls r1, 16 lsrs r1, 16 adds r0, r5, 0 - bl var_set + bl VarSet @080EB3B4: pop {r4,r5} pop {r0} @@ -447988,26 +448065,26 @@ sub_80EB368: ; 80EB368 sub_80EB3D0: ; 80EB3D0 push {r4,r5,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB41C ldr r5, =0x000040ee adds r0, r5, 0 - bl var_get + bl VarGet ldr r1, =0x0000c7ff ands r1, r0 adds r0, r5, 0 - bl var_set + bl VarSet ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet ldr r1, =0x0000fffe ands r1, r0 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r5, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 5 @@ -448016,7 +448093,7 @@ sub_80EB3D0: ; 80EB3D0 lsls r1, 16 lsrs r1, 16 adds r0, r5, 0 - bl var_set + bl VarSet @080EB41C: pop {r4,r5} pop {r0} @@ -448029,33 +448106,33 @@ sub_80EB3D0: ; 80EB3D0 sub_80EB438: ; 80EB438 push {r4,lr} ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB480 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet ldr r1, =0x0000c7ff ands r1, r0 adds r0, r4, 0 - bl var_set + bl VarSet adds r4, 0x1 adds r0, r4, 0 - bl var_get + bl VarGet ldr r1, =0x0000fffe ands r1, r0 adds r0, r4, 0 - bl var_set + bl VarSet adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x1 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EB480: pop {r4} pop {r0} @@ -448119,13 +448196,13 @@ sub_80EB498: ; 80EB498 .4byte @080EB534 @080EB534: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB55C ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 7 @@ -448134,7 +448211,7 @@ sub_80EB498: ; 80EB498 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EB55C: add sp, 0x4 pop {r4} @@ -448384,13 +448461,13 @@ sub_80EB56C: ; 80EB56C .4byte @080EB90C @080EB8E8: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x40 b @080EB994 @@ -448398,13 +448475,13 @@ sub_80EB56C: ; 80EB56C .pool @080EB90C: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x8 b @080EB994 @@ -448412,13 +448489,13 @@ sub_80EB56C: ; 80EB56C .pool @080EB930: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x40 b @080EB994 @@ -448426,13 +448503,13 @@ sub_80EB56C: ; 80EB56C .pool @080EB954: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -448442,13 +448519,13 @@ sub_80EB56C: ; 80EB56C .pool @080EB97C: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x10 @080EB994: @@ -448456,26 +448533,26 @@ sub_80EB56C: ; 80EB56C lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet b @080EB9D0 .align 2, 0 .pool @080EB9AC: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EB9D0 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x8 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EB9D0: add sp, 0x4 pop {r4} @@ -448571,20 +448648,20 @@ sub_80EB9E0: ; 80EB9E0 .4byte @080EBAF4 @080EBAF4: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EBB18 ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x8 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EBB18: add sp, 0x4 pop {r4} @@ -448789,13 +448866,13 @@ sub_80EBB28: ; 80EBB28 .4byte @080EBDF0 @080EBDF0: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EBE6C ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x8 b @080EBE30 @@ -448803,13 +448880,13 @@ sub_80EBB28: ; 80EBB28 .pool @080EBE14: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EBE6C ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r2, 0x80 lsls r2, 1 @@ -448819,26 +448896,26 @@ sub_80EBB28: ; 80EBB28 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet b @080EBE6C .align 2, 0 .pool @080EBE48: ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EBE6C ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x10 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EBE6C: add sp, 0x4 pop {r4} @@ -448871,20 +448948,20 @@ sub_80EBE7C: ; 80EBE7C cmp r1, r0 blt @080EBECC ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080EBECC ldr r4, =0x000040ef adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x4 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080EBECC: add sp, 0x4 pop {r4} @@ -449083,7 +449160,7 @@ per_step_2: ; 80EC044 adds r4, r0, 0 adds r5, r1, 0 ldr r0, =0x00000891 - bl flag_set + bl FlagSet bl sub_80F0040 lsls r0, 24 lsrs r0, 24 @@ -449106,7 +449183,7 @@ per_step_2: ; 80EC044 .pool @080EC080: ldr r0, =0x00000892 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080EC0BE @@ -449126,7 +449203,7 @@ per_step_2: ; 80EC044 beq @080EC0BE @080EC0AE: ldr r0, =0x00000891 - bl flag_clear + bl FlagReset adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x3 @@ -449575,7 +449652,7 @@ sub_80EC31C: ; 80EC31C cmp r0, 0 bne @080EC436 movs r0, 0x1 - bl flag_set + bl FlagSet @080EC436: pop {r4} pop {r0} @@ -449725,7 +449802,7 @@ sub_80EC548: ; 80EC548 beq @080EC584 ldr r0, =0x02021cc4 ldrh r1, [r1] - bl sub_811EBBC + bl CopyEasyChatWord ldr r1, [r5] ldr r0, =0x00002baa adds r1, r0 @@ -449975,7 +450052,7 @@ sub_80EC728: ; 80EC728 adds r0, r1 adds r1, r5, 0 adds r1, 0x2A - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @080EC776 b @080EC888 @@ -450086,16 +450163,16 @@ sub_80EC728: ; 80EC728 mov r0, r8 ldr r1, [r0] adds r0, r3, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x03005d3a adds r0, r7, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r7, 0 bl sub_81DB604 adds r5, r0, 0 adds r0, r7, 0 - bl sub_8009370 + bl StripExtendedControlCodes subs r4, 0x2A ldrh r0, [r4, 0x28] strh r0, [r6, 0x10] @@ -450239,7 +450316,7 @@ sub_80EC8FC: ; 80EC8FC adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -450330,7 +450407,7 @@ sub_80ECA38: ; 80ECA38 adds r0, 0x14 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02039f2c ldrh r0, [r0] strb r0, [r4, 0x1C] @@ -450359,7 +450436,7 @@ sub_80ECA38: ; 80ECA38 adds r0, r4, 0x4 ldr r2, =0x00002b30 adds r1, r7, r2 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -450435,7 +450512,7 @@ sub_80ECB00: ; 80ECB00 adds r0, r4, 0x4 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02022fec ldr r1, [r0] movs r0, 0x40 @@ -450467,13 +450544,13 @@ sub_80ECB00: ; 80ECB00 ldr r6, =0x020229f0 adds r1, r5, r6 mov r0, sp - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 adds r0, 0xC mov r1, sp - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -450565,15 +450642,15 @@ sub_80ECC04: ; 80ECC04 adds r0, 0xC ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString mov r0, sp mov r1, r10 - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0x4 mov r1, sp - bl gf_strcpy + bl CopyString movs r0, 0x7 ands r5, r0 ldrb r1, [r4, 0x3] @@ -450644,7 +450721,7 @@ sub_80ECD00: ; 80ECD00 adds r0, r4, 0x2 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString movs r0, 0xB strb r0, [r4] movs r5, 0x1 @@ -450655,13 +450732,13 @@ sub_80ECD00: ; 80ECD00 strb r0, [r4, 0xB] ldr r1, =0x02021cc4 mov r0, sp - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 adds r0, 0xC mov r1, sp - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -450844,9 +450921,9 @@ sub_80ECEB4: ; 80ECEB4 adds r2, 0xD adds r1, r2 adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes strb r7, [r5, 0xC] adds r1, r6, 0x1 ldr r0, =0x02039f30 @@ -450911,12 +450988,12 @@ sub_80ECF5C: ; 80ECF5C adds r0, 0x16 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 adds r0, 0x8 ldr r2, =0x00002b34 adds r1, r6, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r5, 0x13] lsls r0, 29 lsrs r0, 29 @@ -451092,7 +451169,7 @@ sub_80ED090: ; 80ED090 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes mov r1, r8 ldrb r0, [r1] muls r0, r6 @@ -451131,13 +451208,13 @@ sub_80ED164: ; 80ED164 adds r0, r6, 0x2 ldr r4, =0x03005d90 ldr r1, [r4] - bl gf_strcpy + bl CopyString adds r0, r6, 0 adds r0, 0xC ldr r1, [r4] ldr r2, =0x00000bd8 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, [r4] ldr r2, =0x00000bd4 adds r0, r1, r2 @@ -451282,7 +451359,7 @@ sub_80ED238: ; 80ED238 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r5, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -451321,13 +451398,13 @@ sub_80ED320: ; 80ED320 ldr r1, =0x03005d90 mov r9, r1 ldr r0, [r1] - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 bls @080ED400 adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -451373,7 +451450,7 @@ sub_80ED320: ; 80ED320 adds r0, 0xF mov r2, r9 ldr r1, [r2] - bl gf_strcpy + bl CopyString mov r1, r8 ldrh r0, [r1] muls r0, r7 @@ -451383,7 +451460,7 @@ sub_80ED320: ; 80ED320 adds r2, r5, 0 bl pokemon_getattr adds r0, r5, 0 - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -451553,7 +451630,7 @@ sub_80ED548: ; 80ED548 adds r0, 0x10 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -451600,7 +451677,7 @@ sub_80ED5B8: ; 80ED5B8 adds r0, 0x10 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString strh r5, [r4, 0x2] adds r0, r4, 0 bl sub_80ECA10 @@ -451665,7 +451742,7 @@ sub_80ED610: ; 80ED610 adds r0, r5, 0x5 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -451677,7 +451754,7 @@ sub_80ED610: ; 80ED610 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -451734,7 +451811,7 @@ nullsub_45: ; 80ED714 sub_80ED718: ; 80ED718 push {r4-r6,lr} ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080ED7E4 @@ -452095,7 +452172,7 @@ sub_80ED9A8: ; 80ED9A8 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452209,7 +452286,7 @@ sub_80EDA80: ; 80EDA80 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452266,7 +452343,7 @@ sub_80EDB44: ; 80EDB44 @080EDB88: lsls r0, r6, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080EDB9C @@ -452308,7 +452385,7 @@ sub_80EDB44: ; 80EDB44 lsls r5, r6, 1 adds r0, r5, r0 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -452320,7 +452397,7 @@ sub_80EDB44: ; 80EDB44 ldr r0, =gUnknown_0858D0D0 adds r0, r5, r0 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -452339,7 +452416,7 @@ sub_80EDB44: ; 80EDB44 ldrh r0, [r0] strh r0, [r4, 0x8] adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452400,7 +452477,7 @@ sub_80EDC60: ; 80EDC60 adds r0, r4, 0 adds r0, 0x13 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452461,7 +452538,7 @@ sub_80EDCE8: ; 80EDCE8 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452576,7 +452653,7 @@ sub_80EDD78: ; 80EDD78 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -452962,7 +453039,7 @@ sub_80EE104: ; 80EE104 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_80EDE98 adds r0, r4, 0 @@ -453050,7 +453127,7 @@ sub_80EE184: ; 80EE184 adds r0, r4, 0 adds r0, 0x13 ldr r1, [r7] - bl gf_strcpy + bl CopyString ldrh r0, [r6, 0x6] strh r0, [r4, 0xA] ldr r0, =0x0202433a @@ -453177,7 +453254,7 @@ sub_80EE2CC: ; 80EE2CC adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x020375e0 ldrb r1, [r0] movs r0, 0x4 @@ -453258,7 +453335,7 @@ sub_80EE35C: ; 80EE35C adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString mov r0, r10 strh r0, [r4, 0x4] mov r1, r9 @@ -453359,7 +453436,7 @@ sub_80EE44C: ; 80EE44C adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString mov r0, r8 strb r0, [r4, 0x2] strb r7, [r4, 0x3] @@ -453423,14 +453500,14 @@ sub_80EE4DC: ; 80EE4DC adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r4, r5, 0x4 adds r0, r6, 0 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r6, 0 bl sub_80EE5A4 strb r0, [r5, 0x2] @@ -453712,7 +453789,7 @@ sub_80EE72C: ; 80EE72C adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, [r5] ldr r2, =0x00002bb0 adds r1, r0, r2 @@ -453902,7 +453979,7 @@ sub_80EE8C8: ; 80EE8C8 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString strh r6, [r7, 0x2] strb r4, [r7, 0xD] subs r0, r4, 0x1 @@ -454089,27 +454166,27 @@ sub_80EEA70: ; 80EEA70 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x000040ec - bl var_get + bl VarGet strh r0, [r5, 0x2] bl sub_80E980C ldr r1, =0x02021cc4 mov r0, sp - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r5, 0x4 mov r1, sp - bl gf_strcpy + bl CopyString ldr r0, =0x000040ed - bl var_get + bl VarGet strh r0, [r5, 0x10] ldr r0, =0x000040ee - bl var_get + bl VarGet adds r4, r0, 0 ldr r0, =0x000040ef - bl var_get + bl VarGet lsls r4, 16 lsrs r4, 16 lsls r0, 16 @@ -454125,7 +454202,7 @@ sub_80EEA70: ; 80EEA70 ldr r4, [r7] ldr r6, =0x00004054 adds r0, r6, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 lsls r1, r0, 2 @@ -454144,7 +454221,7 @@ sub_80EEA70: ; 80EEA70 .pool @080EEB70: adds r0, r6, 0 - bl var_get + bl VarGet ldr r2, [r7] lsls r0, 16 lsrs r0, 16 @@ -454185,7 +454262,7 @@ sub_80EEB98: ; 80EEB98 lsls r4, r5, 2 adds r0, r4, r6 ldrh r0, [r0] - bl var_get + bl VarGet adds r4, r7 lsls r0, 16 lsrs r0, 16 @@ -454202,7 +454279,7 @@ sub_80EEB98: ; 80EEB98 adds r0, r4 ldrh r0, [r0] movs r1, 0 - bl var_set + bl VarSet adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -454253,13 +454330,13 @@ sub_80EEBF4: ; 80EEBF4 adds r0, 0x13 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString strb r5, [r4, 0x4] ldr r1, =gUnknown_0858D0EC lsls r0, r5, 2 adds r0, r1 ldrh r0, [r0] - bl var_get + bl VarGet strh r0, [r4, 0x2] adds r0, r4, 0 bl sub_80EC9E8 @@ -454279,13 +454356,13 @@ sub_80EEC80: ; 80EEC80 push {r4,lr} ldr r4, =0x000040e6 adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454298,13 +454375,13 @@ sub_80EECA4: ; 80EECA4 push {r4,lr} ldr r4, =0x000040eb adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454317,13 +454394,13 @@ sub_80EECC8: ; 80EECC8 push {r4,lr} ldr r4, =0x000040e7 adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454336,13 +454413,13 @@ sub_80EECEC: ; 80EECEC push {r4,lr} ldr r4, =0x000040e8 adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454355,13 +454432,13 @@ sub_80EED10: ; 80EED10 push {r4,lr} ldr r4, =0x000040e9 adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 adds r1, 0x1 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454374,7 +454451,7 @@ sub_80EED34: ; 80EED34 push {r4,lr} ldr r4, =0x000040ea adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 ldr r0, =0x020375e4 ldrh r0, [r0] @@ -454382,7 +454459,7 @@ sub_80EED34: ; 80EED34 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -454398,13 +454475,13 @@ sub_80EED60: ; 80EED60 lsrs r4, 16 ldr r5, =0x000040f1 adds r0, r5, 0 - bl var_get + bl VarGet adds r4, r0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 adds r1, r4, 0 - bl var_set + bl VarSet pop {r4,r5} pop {r0} bx r0 @@ -454416,7 +454493,7 @@ sub_80EED60: ; 80EED60 sub_80EED88: ; 80EED88 push {r4-r7,lr} ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080EEE0C @@ -454715,7 +454792,7 @@ sub_80EEF6C: ; 80EEF6C ldr r0, =0x02021cc4 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r5] adds r0, r4 ldr r1, =0x00002b51 @@ -454911,7 +454988,7 @@ sub_80EF120: ; 80EF120 cmp r0, 0 bne @080EF186 ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x1 @@ -454974,7 +455051,7 @@ sub_80EF1BC: ; 80EF1BC ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x14] - bl gf_strcpy + bl CopyString b @080EF244 .align 2, 0 .pool @@ -454985,7 +455062,7 @@ sub_80EF1BC: ; 80EF1BC ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x18] - bl gf_strcpy + bl CopyString b @080EF244 .align 2, 0 .pool @@ -454996,7 +455073,7 @@ sub_80EF1BC: ; 80EF1BC ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x1C] - bl gf_strcpy + bl CopyString b @080EF244 .align 2, 0 .pool @@ -455007,7 +455084,7 @@ sub_80EF1BC: ; 80EF1BC ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x20] - bl gf_strcpy + bl CopyString @080EF244: pop {r0} bx r0 @@ -455045,7 +455122,7 @@ sub_80EF250: ; 80EF250 ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1] - bl gf_strcpy + bl CopyString b @080EF300 .align 2, 0 .pool @@ -455056,7 +455133,7 @@ sub_80EF250: ; 80EF250 ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x4] - bl gf_strcpy + bl CopyString b @080EF300 .align 2, 0 .pool @@ -455067,7 +455144,7 @@ sub_80EF250: ; 80EF250 ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x8] - bl gf_strcpy + bl CopyString b @080EF300 .align 2, 0 .pool @@ -455078,7 +455155,7 @@ sub_80EF250: ; 80EF250 ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0xC] - bl gf_strcpy + bl CopyString b @080EF300 .align 2, 0 .pool @@ -455089,7 +455166,7 @@ sub_80EF250: ; 80EF250 ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x10] - bl gf_strcpy + bl CopyString @080EF300: pop {r0} bx r0 @@ -455139,7 +455216,7 @@ sub_80EF340: ; 80EF340 lsrs r3, 24 adds r1, r5, 0 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString pop {r4,r5} pop {r0} bx r0 @@ -455544,7 +455621,7 @@ sub_80EF64C: ; 80EF64C ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r2, =0x03005d8c ldr r0, =0x030060bc movs r1, 0 @@ -455620,7 +455697,7 @@ sub_80EF704: ; 80EF704 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r6, 0 - bl gf_strcpy + bl CopyString bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -455631,7 +455708,7 @@ sub_80EF704: ; 80EF704 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 ldr r2, =0x03005d8c ldr r0, =0x030060bc movs r1, 0 @@ -455811,7 +455888,7 @@ sub_80EF88C: ; 80EF88C ldr r1, =gSpeciesNames adds r0, r1 adds r1, r6, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @080EF8EC movs r0, 0 @@ -455985,7 +456062,7 @@ sub_80EF9E8: ; 80EF9E8 muls r1, r5 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r5, 0 pop {r4,r5} pop {r1} @@ -456199,7 +456276,7 @@ sub_80EFB58: ; 80EFB58 ldr r0, =0x02021ec4 adds r1, r3, r1 ldrh r1, [r1] - bl sub_811EBBC + bl CopyEasyChatWord pop {r4-r6} pop {r0} bx r0 @@ -456279,7 +456356,7 @@ sub_80EFBDC: ; 80EFBDC mov r4, r8 adds r4, 0xF adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -456329,7 +456406,7 @@ sub_80EFBDC: ; 80EFBDC mov r4, r8 adds r4, 0x4 adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -456374,14 +456451,14 @@ sub_80EFBDC: ; 80EFBDC ldrb r1, [r5, 0x1F] @080EFCC8: mov r0, sp - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @080EFD30 @080EFCD0: movs r0, 0xB muls r4, r0 ldr r7, =gSpeciesNames adds r0, r4, r7 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -456435,7 +456512,7 @@ sub_80EFBDC: ; 80EFBDC adds r1, r0 ldr r0, [r1] mov r1, sp - bl gf_strcpy + bl CopyString add sp, 0x10 pop {r3,r4} mov r8, r3 @@ -456497,7 +456574,7 @@ sub_80EFD98: ; 80EFD98 bl pokemon_getattr ldr r0, =0x02021ec4 adds r1, r4, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @080EFDD4 bl sub_80ED320 @@ -456700,7 +456777,7 @@ sub_80EFF6C: ; 80EFF6C adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 pop {r4} pop {r0} bx r0 @@ -456831,14 +456908,14 @@ sub_80F0040: ; 80F0040 bne @080F0060 @080F0074: ldr r0, =0x000008bd - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq @080F0092 movs r0, 0x89 lsls r0, 4 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -456875,10 +456952,10 @@ sub_80F00A4: ; 80F00A4 bne @080F0104 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD08 - bl gf_strcpy + bl CopyString ldr r0, =0x00004003 movs r1, 0x1 - bl var_set + bl VarSet b @080F0104 .align 2, 0 .pool @@ -456889,32 +456966,32 @@ sub_80F00A4: ; 80F00A4 bne @080F0104 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD08 - bl gf_strcpy + bl CopyString ldr r0, =0x00004003 movs r1, 0x1 - bl var_set + bl VarSet @080F0104: ldr r4, =0x00004003 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 beq @080F0142 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 beq @080F0158 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 bls @080F016C adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 movs r1, 0x1 @@ -456924,14 +457001,14 @@ sub_80F00A4: ; 80F00A4 @080F0142: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD08 - bl gf_strcpy + bl CopyString b @080F01A8 .align 2, 0 .pool @080F0158: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD04 - bl gf_strcpy + bl CopyString b @080F01A8 .align 2, 0 .pool @@ -456945,20 +457022,20 @@ sub_80F00A4: ; 80F00A4 beq @080F0198 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD08 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0x1 - bl var_set + bl VarSet b @080F01A8 .align 2, 0 .pool @080F0198: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD04 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0x2 - bl var_set + bl VarSet @080F01A8: pop {r4} pop {r0} @@ -456972,7 +457049,7 @@ start_menu_append_item: ; 80F01B8 push {lr} ldr r0, =0x000040bc movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x03005d8c ldr r0, [r0] ldrb r1, [r0, 0x5] @@ -456980,7 +457057,7 @@ start_menu_append_item: ; 80F01B8 movs r0, 0x5 bl npc_hide_by_local_id_and_map ldr r0, =0x00000396 - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -458168,7 +458245,7 @@ sub_80F0B24: ; 80F0B24 sub_80F0B64: ; 80F0B64 push {r4-r6,lr} ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -458662,7 +458739,7 @@ sub_80F0EEC: ; 80F0EEC sub_80F0F24: ; 80F0F24 push {r4,r5,lr} ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -459652,7 +459729,7 @@ sub_80F16EC: ; 80F16EC adds r0, r1 adds r1, r4, 0 adds r1, 0x8 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @080F17A4 ldr r1, =0x0203a030 @@ -459673,7 +459750,7 @@ sub_80F16EC: ; 80F16EC muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r4, 0 adds r1, 0x8 @@ -459717,7 +459794,7 @@ sub_80F16EC: ; 80F16EC bl sub_81DB5E8 ldr r0, =0x02021dc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r1, [r4, 0x13] lsls r1, 25 lsrs r1, 30 @@ -459737,7 +459814,7 @@ sub_80F16EC: ; 80F16EC bl sub_81DB5E8 ldr r0, =0x02021dc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r1, [r4, 0x13] lsls r1, 25 lsrs r1, 30 @@ -459762,7 +459839,7 @@ sub_80F16EC: ; 80F16EC bl sub_80EF250 ldr r0, =0x02021ec4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldrh r0, [r4, 0x14] cmp r0, 0 beq @080F18B8 @@ -459784,17 +459861,17 @@ sub_80F16EC: ; 80F16EC muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldr r1, =0x0203a030 movs r0, 0x7 b @080F1950 @@ -459812,7 +459889,7 @@ sub_80F16EC: ; 80F16EC muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C b @080F1952 .align 2, 0 @@ -459824,7 +459901,7 @@ sub_80F16EC: ; 80F16EC muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString @080F194C: ldr r1, =0x0203a030 movs r0, 0x2 @@ -459901,7 +459978,7 @@ sub_80F1974: ; 80F1974 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrh r0, [r4, 0x16] cmp r0, 0x6 bls @080F1A34 @@ -459924,14 +460001,14 @@ sub_80F1974: ; 80F1974 bne @080F1A58 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAEB1 - bl gf_strcpy + bl CopyString b @080F1A60 .align 2, 0 .pool @080F1A58: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAEB8 - bl gf_strcpy + bl CopyString @080F1A60: ldrh r1, [r4, 0x16] movs r0, 0x1 @@ -459981,7 +460058,7 @@ sub_80F1974: ; 80F1974 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString b @080F1AA6 .align 2, 0 .pool @@ -459997,7 +460074,7 @@ sub_80F1974: ; 80F1974 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r4, 0x1B] cmp r0, 0 bne @080F1B1C @@ -460050,7 +460127,7 @@ sub_80F1974: ; 80F1974 @080F1B68: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x18] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r0, [r4, 0x1B] cmp r0, 0 bne @080F1B88 @@ -460070,7 +460147,7 @@ sub_80F1974: ; 80F1974 @080F1B94: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x18] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 adds r1, r4, 0x2 ldrb r2, [r4, 0x1D] @@ -460097,7 +460174,7 @@ sub_80F1974: ; 80F1974 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C @080F1BEA: ldr r0, =gUnknown_0858D240 @@ -460194,7 +460271,7 @@ sub_80F1C0C: ; 80F1C0C bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrh r1, [r5, 0xC] movs r0, 0x2 bl sub_80EF340 @@ -460249,7 +460326,7 @@ sub_80F1C0C: ; 80F1C0C bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrh r1, [r5, 0xE] movs r0, 0x2 bl sub_80EF340 @@ -460268,7 +460345,7 @@ sub_80F1C0C: ; 80F1C0C bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrh r1, [r5, 0x10] movs r0, 0x2 bl sub_80EF340 @@ -460317,7 +460394,7 @@ sub_80F1C0C: ; 80F1C0C bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrb r0, [r5, 0x2] cmp r0, 0x1 bne @080F1E10 @@ -460419,7 +460496,7 @@ sub_80F1E48: ; 80F1E48 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r5, 0x4 ldrb r2, [r5, 0x1F] @@ -460571,7 +460648,7 @@ sub_80F1E48: ; 80F1E48 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrh r0, [r5, 0x2] str r0, [sp] str r5, [sp, 0x4] @@ -460623,7 +460700,7 @@ sub_80F1E48: ; 80F1E48 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrh r0, [r5, 0x1C] str r0, [sp] str r5, [sp, 0x4] @@ -460718,7 +460795,7 @@ sub_80F211C: ; 80F211C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] @@ -460749,7 +460826,7 @@ sub_80F211C: ; 80F211C bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrb r1, [r5, 0x12] movs r0, 0x2 bl sub_80EF340 @@ -460781,7 +460858,7 @@ sub_80F211C: ; 80F211C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] @@ -460805,7 +460882,7 @@ sub_80F211C: ; 80F211C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString @080F2286: ldr r1, =0x0203a030 movs r0, 0x6 @@ -460825,7 +460902,7 @@ sub_80F211C: ; 80F211C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] @@ -460850,7 +460927,7 @@ sub_80F211C: ; 80F211C muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] @@ -460868,7 +460945,7 @@ sub_80F211C: ; 80F211C muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] @@ -460944,7 +461021,7 @@ sub_80F2370: ; 80F2370 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x1 strb r0, [r1] @@ -460967,7 +461044,7 @@ sub_80F2370: ; 80F2370 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r4, 0x11] cmp r0, 0x1 bne @080F2450 @@ -461137,7 +461214,7 @@ sub_80F24D8: ; 80F24D8 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x32 strb r0, [r1] @@ -461210,7 +461287,7 @@ sub_80F24D8: ; 80F24D8 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_811EC08 + bl ConvertEasyChatWordsToString adds r0, r4, 0 bl box_related_two__2 ldr r1, =0x0203a030 @@ -461225,7 +461302,7 @@ sub_80F24D8: ; 80F24D8 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_811EC08 + bl ConvertEasyChatWordsToString adds r0, r4, 0 bl box_related_two__2 ldr r1, =0x0203a030 @@ -461369,7 +461446,7 @@ sub_80F2708: ; 80F2708 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl sub_811EC08 + bl ConvertEasyChatWordsToString adds r0, r4, 0 bl box_related_two__2 ldr r1, =0x0203a030 @@ -461434,7 +461511,7 @@ sub_80F28A4: ; 80F28A4 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r4, 0 adds r1, 0x10 @@ -461458,10 +461535,10 @@ sub_80F28A4: ; 80F28A4 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r4, 0x1C] - bl sub_811EBBC + bl CopyEasyChatWord movs r0, 0x4 strb r0, [r6] b @080F297E @@ -461474,7 +461551,7 @@ sub_80F28A4: ; 80F28A4 bl sub_81DB5E8 ldr r0, =0x02021ec4 ldrh r1, [r4, 0x1E] - bl sub_811EBBC + bl CopyEasyChatWord bl sub_80F577C @080F297E: ldr r0, =gUnknown_0858D188 @@ -461517,7 +461594,7 @@ sub_80F29A0: ; 80F29A0 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C bl sub_80ED430 ldr r1, =gUnknown_0858D19C @@ -461609,7 +461686,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r6, 0 adds r1, 0x14 @@ -461657,7 +461734,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r6, 0xF] cmp r1, 0x8 bne @080F2B6C @@ -461702,7 +461779,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString @080F2BB2: ldrb r1, [r6, 0xF] cmp r1, 0x8 @@ -461721,7 +461798,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 adds r1, r6, 0 adds r1, 0x14 @@ -461751,35 +461828,35 @@ sub_80F2A10: ; 80F2A10 @080F2C1C: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB0E8 - bl gf_strcpy + bl CopyString b @080F2C74 .align 2, 0 .pool @080F2C30: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB0ED - bl gf_strcpy + bl CopyString b @080F2C74 .align 2, 0 .pool @080F2C44: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB0F4 - bl gf_strcpy + bl CopyString b @080F2C74 .align 2, 0 .pool @080F2C58: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB0F9 - bl gf_strcpy + bl CopyString b @080F2C74 .align 2, 0 .pool @080F2C6C: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB0FF - bl gf_strcpy + bl CopyString @080F2C74: ldr r0, =0x02021dc4 ldrh r2, [r6, 0x12] @@ -461787,7 +461864,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r6, 0xF] cmp r1, 0x8 beq @080F2CF0 @@ -461912,7 +461989,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r6, 0x1C] cmp r0, 0x4 bls @080F2D80 @@ -462019,7 +462096,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r6, 0x1C] cmp r0, 0x4 bls @080F2E64 @@ -462144,7 +462221,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r2, [r6, 0x10] movs r1, 0xD @@ -462152,7 +462229,7 @@ sub_80F2A10: ; 80F2A10 ldr r2, =gMoveNames @080F2F72: adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x17 strb r0, [r1] @@ -462166,7 +462243,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r6, 0x4 ldrb r2, [r6, 0x1E] @@ -462175,7 +462252,7 @@ sub_80F2A10: ; 80F2A10 ldrh r1, [r6, 0x2] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldrb r0, [r6, 0xC] cmp r0, 0x8 beq @080F3028 @@ -462271,7 +462348,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString b @080F30EA .align 2, 0 .pool @@ -462286,7 +462363,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString b @080F30EA .align 2, 0 .pool @@ -462306,7 +462383,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 b @080F30E2 .align 2, 0 @@ -462336,7 +462413,7 @@ sub_80F2A10: ; 80F2A10 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C @080F311C: ldr r0, =gUnknown_0858D27C @@ -462425,14 +462502,14 @@ sub_80F3140: ; 80F3140 bne @080F3200 ldr r0, =0x02021ec4 ldr r1, =gUnknown_085ECB64 - bl gf_strcpy + bl CopyString b @080F3208 .align 2, 0 .pool @080F3200: ldr r0, =0x02021ec4 ldr r1, =gUnknown_085ECB6B - bl gf_strcpy + bl CopyString @080F3208: ldr r1, =0x0203a030 movs r0, 0x2 @@ -462451,14 +462528,14 @@ sub_80F3140: ; 80F3140 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x3 strb r0, [r1] @@ -462477,7 +462554,7 @@ sub_80F3140: ; 80F3140 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x4 strb r0, [r1] @@ -462525,14 +462602,14 @@ sub_80F3140: ; 80F3140 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x7 strb r0, [r1] @@ -462555,7 +462632,7 @@ sub_80F3140: ; 80F3140 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C @080F3362: ldr r0, =gUnknown_0858D300 @@ -462652,42 +462729,42 @@ sub_80F3388: ; 80F3388 @080F3444: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB48 - bl gf_strcpy + bl CopyString b @080F349C .align 2, 0 .pool @080F3458: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB4E - bl gf_strcpy + bl CopyString b @080F349C .align 2, 0 .pool @080F346C: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB52 - bl gf_strcpy + bl CopyString b @080F349C .align 2, 0 .pool @080F3480: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB58 - bl gf_strcpy + bl CopyString b @080F349C .align 2, 0 .pool @080F3494: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB5F - bl gf_strcpy + bl CopyString @080F349C: ldrb r0, [r4, 0x2] cmp r0, 0x18 bls @080F34BC ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB2A - bl gf_strcpy + bl CopyString b @080F34DC .align 2, 0 .pool @@ -462696,14 +462773,14 @@ sub_80F3388: ; 80F3388 bls @080F34D4 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB20 - bl gf_strcpy + bl CopyString b @080F34DC .align 2, 0 .pool @080F34D4: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB1B - bl gf_strcpy + bl CopyString @080F34DC: ldr r0, =0x02021ec4 adds r1, r4, 0 @@ -462746,42 +462823,42 @@ sub_80F3388: ; 80F3388 @080F3538: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB48 - bl gf_strcpy + bl CopyString b @080F3590 .align 2, 0 .pool @080F354C: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB4E - bl gf_strcpy + bl CopyString b @080F3590 .align 2, 0 .pool @080F3560: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB52 - bl gf_strcpy + bl CopyString b @080F3590 .align 2, 0 .pool @080F3574: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB58 - bl gf_strcpy + bl CopyString b @080F3590 .align 2, 0 .pool @080F3588: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085ECB5F - bl gf_strcpy + bl CopyString @080F3590: ldrb r0, [r4, 0x2] cmp r0, 0x10 bls @080F35B0 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB34 - bl gf_strcpy + bl CopyString b @080F35D0 .align 2, 0 .pool @@ -462790,14 +462867,14 @@ sub_80F3388: ; 80F3388 bls @080F35C8 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB3A - bl gf_strcpy + bl CopyString b @080F35D0 .align 2, 0 .pool @080F35C8: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB3E - bl gf_strcpy + bl CopyString @080F35D0: ldr r0, =0x02021ec4 adds r1, r4, 0 @@ -462959,7 +463036,7 @@ sub_80F363C: ; 80F363C muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, [r4] ldr r2, =0x00002ba8 @@ -462969,7 +463046,7 @@ sub_80F363C: ; 80F363C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldr r1, [r4] ldr r2, =0x00002ba6 @@ -462977,7 +463054,7 @@ sub_80F363C: ; 80F363C ldrh r1, [r1] muls r1, r6 adds r1, r5 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x8 strb r0, [r1] @@ -462995,7 +463072,7 @@ sub_80F363C: ; 80F363C ldr r2, =0x00002baa adds r1, r2 ldrh r1, [r1] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldr r1, [r4] ldr r2, =0x00002ba4 @@ -463005,7 +463082,7 @@ sub_80F363C: ; 80F363C muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldr r1, [r4] ldr r2, =0x00002ba6 @@ -463013,7 +463090,7 @@ sub_80F363C: ; 80F363C ldrh r1, [r1] muls r1, r6 adds r1, r5 - bl gf_strcpy + bl CopyString ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] @@ -463085,7 +463162,7 @@ sub_80F3828: ; 80F3828 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r4, 0x3] movs r0, 0x2 bl sub_80EF340 @@ -463105,7 +463182,7 @@ sub_80F3828: ; 80F3828 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r4, 0x2] movs r0, 0x2 bl sub_80EF340 @@ -463178,7 +463255,7 @@ sub_80F3904: ; 80F3904 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString movs r0, 0x2 strb r0, [r6] b @080F39BE @@ -463200,7 +463277,7 @@ sub_80F3904: ; 80F3904 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString bl sub_80F577C @080F39BE: ldr r0, =gUnknown_0858D3B8 @@ -463363,7 +463440,7 @@ sub_80F39E4: ; 80F39E4 movs r0, 0 bl sub_80EF340 ldr r0, =0x000008a8 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080F3BCC @@ -463377,7 +463454,7 @@ sub_80F39E4: ; 80F39E4 .pool @080F3B58: ldr r0, =0x000008a8 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @080F3BCC @@ -463499,10 +463576,10 @@ sub_80F3C04: ; 80F3C04 @080F3C68: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r0, [r4, 0x8] cmp r0, 0 bne @080F3C94 @@ -463522,10 +463599,10 @@ sub_80F3C04: ; 80F3C04 @080F3CA0: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021ec4 adds r1, r4, 0 adds r1, 0x13 @@ -463540,10 +463617,10 @@ sub_80F3C04: ; 80F3C04 @080F3CD4: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r0, [r4, 0x8] cmp r0, 0 bne @080F3D00 @@ -463563,10 +463640,10 @@ sub_80F3C04: ; 80F3C04 @080F3D0C: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021ec4 adds r1, r4, 0 adds r1, 0x13 @@ -463581,10 +463658,10 @@ sub_80F3C04: ; 80F3C04 @080F3D40: ldr r0, =0x02021cc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord bl sub_80F577C @080F3D54: ldr r0, =gUnknown_0858D3F0 @@ -463636,7 +463713,7 @@ sub_80F3D74: ; 80F3D74 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldrb r0, [r5, 0x4] cmp r0, 0x57 bne @080F3DFC @@ -463669,7 +463746,7 @@ sub_80F3D74: ; 80F3D74 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r5, 0 adds r1, 0x13 @@ -463689,7 +463766,7 @@ sub_80F3D74: ; 80F3D74 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 adds r1, r5, 0 adds r1, 0x13 @@ -463761,14 +463838,14 @@ sub_80F3E7C: ; 80F3E7C @080F3EE8: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB0C - bl gf_strcpy + bl CopyString b @080F3F04 .align 2, 0 .pool @080F3EFC: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB12 - bl gf_strcpy + bl CopyString @080F3F04: ldrb r1, [r4, 0x2] cmp r1, 0x1 @@ -463802,14 +463879,14 @@ sub_80F3E7C: ; 80F3E7C @080F3F44: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB0C - bl gf_strcpy + bl CopyString b @080F3F60 .align 2, 0 .pool @080F3F58: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB12 - bl gf_strcpy + bl CopyString @080F3F60: ldrh r1, [r4, 0x4] movs r0, 0x2 @@ -463835,14 +463912,14 @@ sub_80F3E7C: ; 80F3E7C @080F3F94: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB0C - bl gf_strcpy + bl CopyString b @080F3FB0 .align 2, 0 .pool @080F3FA8: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB12 - bl gf_strcpy + bl CopyString @080F3FB0: ldrh r1, [r4, 0x4] movs r0, 0x2 @@ -463870,14 +463947,14 @@ sub_80F3E7C: ; 80F3E7C @080F3FE8: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB12 - bl gf_strcpy + bl CopyString b @080F4004 .align 2, 0 .pool @080F3FFC: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB0C - bl gf_strcpy + bl CopyString @080F4004: bl sub_80F577C @080F4008: @@ -463961,7 +464038,7 @@ sub_80F4028: ; 80F4028 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrb r1, [r6, 0x4] movs r2, 0 @@ -463984,12 +464061,12 @@ sub_80F4028: ; 80F4028 muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x3 strb r0, [r1] @@ -464005,7 +464082,7 @@ sub_80F4028: ; 80F4028 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x4 strb r0, [r1] @@ -464038,7 +464115,7 @@ sub_80F4028: ; 80F4028 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrb r1, [r6, 0x4] movs r2, 0 @@ -464061,12 +464138,12 @@ sub_80F4028: ; 80F4028 muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldrb r0, [r6, 0x5] cmp r0, 0x2 beq @080F423C @@ -464119,7 +464196,7 @@ sub_80F4028: ; 80F4028 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r2, [r6, 0xA] movs r1, 0xB @@ -464141,13 +464218,13 @@ sub_80F4028: ; 80F4028 muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 @080F42A8: - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x8 strb r0, [r1] @@ -464182,7 +464259,7 @@ sub_80F4028: ; 80F4028 muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrb r1, [r6, 0x4] movs r2, 0 @@ -464286,7 +464363,7 @@ sub_80F4360: ; 80F4360 lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r0, [r5, 0x3] cmp r0, 0x1 bne @080F443C @@ -464309,7 +464386,7 @@ sub_80F4360: ; 80F4360 lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r5, 0x3] cmp r1, 0x3 beq @080F4484 @@ -464351,7 +464428,7 @@ sub_80F4360: ; 80F4360 lsls r1, 5 ldr r4, =gUnknown_085A5C09 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrb r1, [r5, 0x7] lsls r1, 5 @@ -464366,7 +464443,7 @@ sub_80F4360: ; 80F4360 ldr r2, =gUnknown_085A5C09 adds r1, r2 @080F44CA: - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x8 strb r0, [r1] @@ -464429,14 +464506,14 @@ sub_80F4360: ; 80F4360 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r5, 0xA] movs r4, 0xD muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x0203a030 strb r4, [r0] b @080F4588 @@ -464485,7 +464562,7 @@ sub_80F45A0: ; 80F45A0 bne @080F45FC ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB72 - bl gf_strcpy + bl CopyString b @080F4634 .align 2, 0 .pool @@ -464494,7 +464571,7 @@ sub_80F45A0: ; 80F45A0 bne @080F4614 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB7A - bl gf_strcpy + bl CopyString b @080F4634 .align 2, 0 .pool @@ -464503,21 +464580,21 @@ sub_80F45A0: ; 80F45A0 bne @080F462C ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB80 - bl gf_strcpy + bl CopyString b @080F4634 .align 2, 0 .pool @080F462C: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECB87 - bl gf_strcpy + bl CopyString @080F4634: ldr r4, =0x02021ec4 ldrh r0, [r5, 0x2] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString bl sub_80F577C ldr r1, =gUnknown_0858D494 lsls r0, r6, 2 @@ -464581,12 +464658,12 @@ sub_80F466C: ; 80F466C muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0x4] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x1 strb r0, [r1] @@ -464605,14 +464682,14 @@ sub_80F466C: ; 80F466C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r2, [r6, 0x2] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x2 strb r0, [r1] @@ -464626,7 +464703,7 @@ sub_80F466C: ; 80F466C muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrb r1, [r6, 0x10] cmp r1, 0x2 beq @080F479C @@ -464668,12 +464745,12 @@ sub_80F466C: ; 80F466C muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0xC] muls r1, r5 @@ -464688,7 +464765,7 @@ sub_80F466C: ; 80F466C muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0xA] muls r1, r5 @@ -464704,7 +464781,7 @@ sub_80F466C: ; 80F466C ldr r2, =gMoveNames adds r1, r2 @080F4820: - bl gf_strcpy + bl CopyString @080F4824: ldr r1, =0x0203a030 movs r0, 0x6 @@ -464719,12 +464796,12 @@ sub_80F466C: ; 80F466C muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0x2] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString bl sub_80F577C @080F4858: ldr r0, =gUnknown_0858D498 @@ -464788,7 +464865,7 @@ sub_80F487C: ; 80F487C bl sub_81DB5E8 ldr r0, =0x02021ec4 ldrh r1, [r4, 0x14] - bl sub_811EBBC + bl CopyEasyChatWord ldrb r1, [r4, 0x16] cmp r1, 0x59 bls @080F4918 @@ -464854,7 +464931,7 @@ sub_80F487C: ; 80F487C bl sub_81DB5E8 ldr r0, =0x02021ec4 ldrh r1, [r4, 0x14] - bl sub_811EBBC + bl CopyEasyChatWord bl sub_80F577C @080F499A: ldr r0, =gUnknown_0858D320 @@ -465034,10 +465111,10 @@ sub_80F49BC: ; 80F49BC bl sub_81DB5E8 ldr r0, =0x02021dc4 ldrh r1, [r4, 0x4] - bl sub_811EBBC + bl CopyEasyChatWord ldr r0, =0x02021ec4 ldrh r1, [r4, 0x6] - bl sub_811EBBC + bl CopyEasyChatWord bl sub_80F577C @080F4B3A: ldr r0, =gUnknown_0858D4B4 @@ -465477,12 +465554,12 @@ sub_80F4D9C: ; 80F4D9C muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0x6] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0x8] muls r1, r5 @@ -465497,7 +465574,7 @@ sub_80F4D9C: ; 80F4D9C muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0x6] muls r1, r5 @@ -465512,17 +465589,17 @@ sub_80F4D9C: ; 80F4D9C muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r6, 0x6] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021ec4 ldrh r1, [r6, 0x8] muls r1, r5 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x11 strb r0, [r1] @@ -465537,7 +465614,7 @@ sub_80F4D9C: ; 80F4D9C ldr r2, =gSpeciesNames adds r1, r2 @080F4FEC: - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 movs r0, 0x12 strb r0, [r1] @@ -466096,7 +466173,7 @@ sub_80F51EC: ; 80F51EC bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =0x0203a030 ldrb r0, [r5, 0x12] strb r0, [r1] @@ -466710,12 +466787,12 @@ sub_80F5A74: ; 80F5A74 bne @080F5A96 ldr r1, =gUnknown_085ED21E adds r0, r6, 0 - bl gf_strcpy + bl CopyString adds r6, r0, 0 @080F5A96: adds r1, r7, 0x2 adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02022e2c adds r0, r5, 0 adds r1, r4, 0 @@ -466723,11 +466800,11 @@ sub_80F5A74: ; 80F5A74 bl sub_80F7ED0 ldr r1, =gUnknown_085E8D3E adds r0, r6, 0 - bl gf_strcpy + bl CopyString adds r1, r7, 0 adds r1, 0xD adds r0, r6, 0 - bl gf_strcat + bl AppendString adds r0, r5, 0 adds r1, r4, 0 movs r2, 0x32 @@ -467001,20 +467078,20 @@ sub_80F5CE4: ; 80F5CE4 strb r0, [r1] ldr r5, =0x00004086 adds r0, r5, 0 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0 - bl var_set + bl VarSet bl sub_8076D5C movs r0, 0x1 bl save_game_when_memory_present bl sav2_gender2_inplace_and_xFE adds r0, r5, 0 adds r1, r4, 0 - bl var_set + bl VarSet ldr r0, =0x03005e00 adds r1, r7, r6 lsls r1, 3 @@ -467710,7 +467787,7 @@ sub_80F6204: ; 80F6204 mov r0, r8 adds r1, r4, r0 adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r0, r7, 0 bl sub_81DB5AC ldr r0, =0x02021dc4 @@ -467718,10 +467795,10 @@ sub_80F6204: ; 80F6204 subs r1, 0xB adds r4, r1 adds r1, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085ED1FA mov r0, sp - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, =0x0203a034 ldr r0, [r0] ldr r0, [r0] @@ -471529,7 +471606,7 @@ sub_80F8264: ; 80F8264 ldr r0, =0x02039e0d adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_81DB5AC pop {r4} @@ -471548,7 +471625,7 @@ sub_80F8290: ; 80F8290 lsls r1, 6 ldr r2, =0x02039e02 adds r1, r2 - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -471658,7 +471735,7 @@ sub_80F834C: ; 80F834C lsls r1, 6 adds r1, r3 adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_81DB5AC pop {r4} @@ -471692,7 +471769,7 @@ sub_80F8390: ; 80F8390 lsls r1, 6 adds r1, r3 adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -472139,7 +472216,7 @@ sub_80F8714: ; 80F8714 movs r4, 0x3 @080F874C: adds r0, r5, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r5, 0x40 subs r4, 0x1 cmp r4, 0 @@ -472562,14 +472639,14 @@ sub_80F8970: ; 80F8970 mov r0, r10 adds r1, r4, r0 ldr r0, =0x02021cc4 - bl gf_strcpy + bl CopyString ldr r5, =0x02021dc4 mov r0, r10 adds r0, 0xB adds r4, r0 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r5, 0 bl sub_81DB5AC mov r1, r9 @@ -472670,22 +472747,22 @@ sub_80F8AFC: ; 80F8AFC @080F8B50: ldr r0, =0x00004010 ldrb r1, [r5, 0x15] - bl var_set + bl VarSet ldr r0, =0x00004011 adds r1, r5, 0 adds r1, 0x55 ldrb r1, [r1] - bl var_set + bl VarSet ldr r0, =0x00004012 adds r1, r5, 0 adds r1, 0x95 ldrb r1, [r1] - bl var_set + bl VarSet ldr r0, =0x00004013 adds r1, r5, 0 adds r1, 0xD5 ldrb r1, [r1] - bl var_set + bl VarSet @080F8B7C: pop {r4,r5} pop {r0} @@ -473783,7 +473860,7 @@ sub_80F9438: ; 80F9438 str r1, [r0, 0x8] ldr r0, =0x000040cf movs r1, 0x9 - bl var_set + bl VarSet movs r0, 0 bl sub_81B8518 pop {r0} @@ -473999,7 +474076,7 @@ sub_80F95C0: ; 80F95C0 adds r2, r5, 0 bl pokemon_getattr adds r0, r5, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 add sp, 0x4 pop {r4,r5} pop {r0} @@ -474435,10 +474512,10 @@ sub_80F9910: ; 80F9910 adds r0, r5, 0 movs r2, 0 movs r3, 0x8 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 ldr r1, @080F9980 - bl gf_strcat + bl AppendString adds r5, r0, 0 adds r0, r4, 0 movs r1, 0xA @@ -474447,7 +474524,7 @@ sub_80F9910: ; 80F9910 adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString pop {r4,r5} pop {r0} bx r0 @@ -474548,7 +474625,7 @@ sub_80F9A14: ; 80F9A14 muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldrh r1, [r5] movs r0, 0x80 lsls r0, 8 @@ -474556,7 +474633,7 @@ sub_80F9A14: ; 80F9A14 bne @080F9A64 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085ECF6B - bl gf_strcpy + bl CopyString b @080F9A6E .align 2, 0 .pool @@ -474564,7 +474641,7 @@ sub_80F9A14: ; 80F9A14 ldr r0, =0x02021dc4 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString @080F9A6E: pop {r4,r5} pop {r0} @@ -474579,7 +474656,7 @@ sub_80F9A7C: ; 80F9A7C ldr r0, =0x00004047 movs r1, 0x80 lsls r1, 8 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -474590,7 +474667,7 @@ sub_80F9A7C: ; 80F9A7C sub_80F9A90: ; 80F9A90 push {lr} ldr r0, =0x00004047 - bl var_get_pointer + bl GetVarPointer adds r1, r0, 0 movs r0, 0x95 lsls r0, 1 @@ -474605,7 +474682,7 @@ sub_80F9A90: ; 80F9A90 sub_80F9AAC: ; 80F9AAC push {r4,lr} ldr r0, =0x00004047 - bl var_get_pointer + bl GetVarPointer adds r1, r0, 0 ldr r4, =0x020375f0 movs r0, 0x95 @@ -474627,7 +474704,7 @@ sub_80F9AD4: ; 80F9AD4 ldr r0, =0x0000404f movs r1, 0x80 lsls r1, 8 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -474638,7 +474715,7 @@ sub_80F9AD4: ; 80F9AD4 sub_80F9AE8: ; 80F9AE8 push {lr} ldr r0, =0x0000404f - bl var_get_pointer + bl GetVarPointer adds r1, r0, 0 ldr r0, =0x00000127 bl sub_80F9A14 @@ -474652,7 +474729,7 @@ sub_80F9AE8: ; 80F9AE8 sub_80F9B04: ; 80F9B04 push {r4,lr} ldr r0, =0x0000404f - bl var_get_pointer + bl GetVarPointer adds r1, r0, 0 ldr r4, =0x020375f0 ldr r0, =0x00000127 @@ -474727,7 +474804,7 @@ sub_80F9B30: ; 80F9B30 cmp r7, 0 beq @080F9BAC ldr r0, =0x0000089b - bl flag_set + bl FlagSet @080F9BAC: add sp, 0xC pop {r3} @@ -475988,7 +476065,7 @@ sub_80FA57C: ; 80FA57C movs r0, 0x3 bl audio_play ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @080FA5B8 @@ -476845,21 +476922,21 @@ sub_80FAC78: ; 80FAC78 movs r1, 0x64 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 ldr r1, =gUnknown_085EA88B - bl gf_strcpy + bl CopyString ldr r1, =0x020375f0 movs r0, 0 strh r0, [r1] ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080FADCE ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x10 b @080FAD8A @@ -476870,21 +476947,21 @@ sub_80FAC78: ; 80FAC78 movs r1, 0x32 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 ldr r1, =gUnknown_085EA890 - bl gf_strcpy + bl CopyString ldr r1, =0x020375f0 movs r0, 0 strh r0, [r1] ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080FADCE ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x20 b @080FAD8A @@ -476902,13 +476979,13 @@ sub_80FAC78: ; 80FAC78 @080FAD70: strh r0, [r1] ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080FADCE ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x80 @080FAD8A: @@ -476916,7 +476993,7 @@ sub_80FAC78: ; 80FAC78 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet b @080FADCE .align 2, 0 .pool @@ -476925,20 +477002,20 @@ sub_80FAC78: ; 80FAC78 movs r0, 0x3 strh r0, [r1] ldr r0, =0x00004054 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @080FADCE ldr r4, =0x000040ee adds r0, r4, 0 - bl var_get + bl VarGet adds r1, r0, 0 movs r0, 0x80 orrs r1, r0 lsls r1, 16 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @080FADCE: add sp, 0x4 pop {r4} @@ -477959,7 +478036,7 @@ sub_80FB5E8: ; 80FB5E8 ldr r1, =0x03005e08 adds r4, r0, r1 ldr r0, =0x000040b4 - bl var_get_pointer + bl GetVarPointer adds r7, r0, 0 ldr r0, =0x03005d8c ldr r3, [r0] @@ -478062,10 +478139,10 @@ sub_80FB5E8: ; 80FB5E8 .pool @080FB6C4: ldr r0, =0x00004001 - bl flag_clear + bl FlagReset movs r0, 0x80 lsls r0, 7 - bl flag_clear + bl FlagReset movs r0, 0 bl copy_saved_warp2_bank_and_enter_x_to_warp1 bl sp13E_warp_to_last_warp @@ -478105,7 +478182,7 @@ sub_80FB6EC: ; 80FB6EC ands r0, r1 strb r0, [r2] ldr r0, =0x000040b4 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -478165,12 +478242,12 @@ sub_80FB768: ; 80FB768 sub_80FB7A4: ; 80FB7A4 push {lr} ldr r0, =0x0000088d - bl flag_set + bl FlagSet ldr r0, =0x00004001 - bl flag_set + bl FlagSet movs r0, 0x80 lsls r0, 7 - bl flag_set + bl FlagSet ldr r0, =0x03005d8c ldr r0, [r0] movs r1, 0x4 @@ -478223,7 +478300,7 @@ sub_80FB818: ; 80FB818 push {r4-r6,lr} movs r0, 0x80 lsls r0, 7 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 movs r3, 0 ldr r4, =0x0203a048 @@ -478258,7 +478335,7 @@ sub_80FB854: ; 80FB854 lsrs r4, 24 movs r0, 0x80 lsls r0, 7 - bl var_get_pointer + bl GetVarPointer adds r0, r4 ldrb r0, [r0] pop {r4} @@ -478277,7 +478354,7 @@ sub_80FB870: ; 80FB870 lsrs r5, 24 movs r0, 0x80 lsls r0, 7 - bl var_get_pointer + bl GetVarPointer adds r0, r4 strb r5, [r0] pop {r4,r5} @@ -479359,7 +479436,7 @@ sub_80FBFD4: ; 80FBFD4 flag_check_is_in_safari_zone: ; 80FC0A0 push {lr} ldr r0, =0x0000088c - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -479372,7 +479449,7 @@ flag_check_is_in_safari_zone: ; 80FC0A0 sub_80FC0B4: ; 80FC0B4 push {lr} ldr r0, =0x0000088c - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -479383,7 +479460,7 @@ sub_80FC0B4: ; 80FC0B4 flag_clear_is_in_safari_zone: ; 80FC0C4 push {lr} ldr r0, =0x0000088c - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -479608,7 +479685,7 @@ sub_80FC258: ; 80FC258 adds r0, r1 ldr r1, [r0] ldr r0, =0x02021cc4 - bl gf_strcpy + bl CopyString b @080FC2D6 .align 2, 0 .pool @@ -479881,7 +479958,7 @@ sub_80FC4B4: ; 80FC4B4 ldrb r1, [r1, 0x5] movs r2, 0x2 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 b @080FC4EE .align 2, 0 @@ -481436,7 +481513,7 @@ sub_80FD164: ; 80FD164 lsrs r4, 24 ldr r6, =0x02021fc4 adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs cmp r4, 0 bne @080FD1B4 bl sub_81A9E40 @@ -481613,7 +481690,7 @@ item_field_func_bike: ; 80FD298 lsls r0, 24 lsrs r4, r0, 24 ldr r0, =0x0000088b - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -481748,7 +481825,7 @@ sub_80FD394: ; 80FD394 b @080FD41E @080FD3EC: adds r0, r5, 0 - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 beq @080FD40C @@ -482051,7 +482128,7 @@ sub_80FD5F0: ; 80FD5F0 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080FD694 @@ -482156,7 +482233,7 @@ sub_80FD6D4: ; 80FD6D4 adds r0, r3 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @080FD728 @@ -482860,11 +482937,11 @@ sub_80FDC34: ; 80FDC34 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9026 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r1, =0x03005e00 lsls r0, r5, 2 adds r0, r5 @@ -482906,11 +482983,11 @@ sub_80FDCA4: ; 80FDCA4 adds r0, r4, 0 movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9138 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r1, =0x03005e00 lsls r0, r5, 2 adds r0, r5 @@ -483297,11 +483374,11 @@ task08_0809AD8C: ; 80FDFBC ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9058 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_80FE024 adds r0, r5, 0 movs r1, 0x1 @@ -483356,7 +483433,7 @@ sub_80FE058: ; 80FE058 bl itemid_get_name ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9080 - bl ExpandTextCodes + bl ExpandStringRefs bl sub_81A9E40 lsls r0, 24 cmp r0, 0 @@ -483390,7 +483467,7 @@ sub_80FE0BC: ; 80FE0BC lsrs r4, r0, 24 adds r5, r4, 0 ldr r0, =0x00004021 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @080FE0EC @@ -483482,7 +483559,7 @@ sub_80FE164: ; 80FE164 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl var_set + bl VarSet bl sub_80FE058 bl sub_81A9E40 lsls r0, 24 @@ -483567,23 +483644,23 @@ item_field_func_black_white_flutes: ; 80FE234 cmp r0, 0x2B bne @080FE278 ldr r0, =0x000008ad - bl flag_set + bl FlagSet ldr r0, =0x000008ae - bl flag_clear + bl FlagReset ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E90C6 - bl ExpandTextCodes + bl ExpandStringRefs b @080FE28C .align 2, 0 .pool @080FE278: ldr r0, =0x000008ae - bl flag_set + bl FlagSet ldr r0, =0x000008ad - bl flag_clear + bl FlagReset ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E90F4 - bl ExpandTextCodes + bl ExpandStringRefs @080FE28C: ldr r1, =0x03005e00 lsls r0, r5, 2 @@ -543712,7 +543789,7 @@ sub_811BDF0: ; 811BDF0 ldr r0, =0x00003b70 adds r5, r4, r0 adds r0, r5, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 cmp r0, 0 beq @0811BE34 @@ -543760,7 +543837,7 @@ sub_811BE54: ; 811BE54 ldrh r1, [r4] adds r0, r2, 0 movs r2, 0 - bl sub_811F434 + bl CopyEasyChatWordPadded adds r2, r0, 0 movs r0, 0 strb r0, [r2] @@ -543806,7 +543883,7 @@ sub_811BE9C: ; 811BE9C b @0811BF14 @0811BEC2: ldr r0, =0x00000865 - bl flag_set + bl FlagSet b @0811BF14 .align 2, 0 .pool @@ -544373,7 +544450,7 @@ sub_811C30C: ; 811C30C @0811C380: ldrh r1, [r4] mov r0, sp - bl sub_811EBBC + bl CopyEasyChatWord movs r0, 0x1 mov r1, sp movs r2, 0 @@ -546352,7 +546429,7 @@ sub_811D2C8: ; 811D2C8 strb r0, [r1, 0xB] adds r0, r2, 0 add r1, sp, 0xC - bl gf_strcat + bl AppendString adds r2, r0, 0 movs r5, 0 lsls r0, r7, 4 @@ -546369,7 +546446,7 @@ sub_811D2C8: ; 811D2C8 beq @0811D374 adds r1, r0, 0 adds r0, r2, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r2, r0, 0 adds r4, 0x2 b @0811D3A2 @@ -546383,7 +546460,7 @@ sub_811D2C8: ; 811D2C8 adds r0, r2, 0 movs r1, 0 movs r2, 0x4 - bl sub_80091EC + bl WriteColorChangeControlCode adds r2, r0, 0 movs r1, 0xAE movs r0, 0xB @@ -546396,7 +546473,7 @@ sub_811D2C8: ; 811D2C8 adds r0, r2, 0 movs r1, 0 movs r2, 0x2 - bl sub_80091EC + bl WriteColorChangeControlCode adds r2, r0, 0 @0811D3A2: mov r1, r8 @@ -546409,7 +546486,7 @@ sub_811D2C8: ; 811D2C8 @0811D3AE: adds r0, r2, 0 add r1, sp, 0xC - bl gf_strcat + bl AppendString adds r2, r0, 0 cmp r6, 0x2 beq @0811D3C4 @@ -547076,7 +547153,7 @@ sub_811D864: ; 811D864 adds r0, 0xCC adds r1, r4, 0 movs r2, 0 - bl sub_811F434 + bl CopyEasyChatWordPadded adds r0, r4, 0 bl sub_811BF88 adds r1, r0, 0 @@ -549371,7 +549448,7 @@ sub_811EA28: ; 811EA28 cmp r0, 0x11 blt @0811EA66 ldr r0, =0x00000864 - bl flag_check + bl FlagGet b @0811EA60 .align 2, 0 .pool @@ -549381,7 +549458,7 @@ sub_811EA28: ; 811EA28 b @0811EA66 @0811EA4E: ldr r0, =0x00000866 - bl flag_check + bl FlagGet b @0811EA60 .align 2, 0 .pool @@ -549542,8 +549619,9 @@ sub_811EB10: ; 811EB10 bx r1 thumb_func_end sub_811EB10 - thumb_func_start sub_811EB64 -sub_811EB64: ; 811EB64 + thumb_func_start GetEasyChatWord +; char *GetEasyChatWord(u8 groupId, u16 wordId) +GetEasyChatWord: ; 811EB64 push {lr} lsls r0, 24 lsrs r0, 24 @@ -549590,10 +549668,11 @@ sub_811EB64: ; 811EB64 bx r1 .align 2, 0 .pool - thumb_func_end sub_811EB64 + thumb_func_end GetEasyChatWord - thumb_func_start sub_811EBBC -sub_811EBBC: ; 811EBBC + thumb_func_start CopyEasyChatWord +; char *CopyEasyChatWord(char *dest, u16 groupIdWordIdPair) +CopyEasyChatWord: ; 811EBBC push {r4-r6,lr} adds r5, r0, 0 lsls r6, r1, 16 @@ -549614,11 +549693,11 @@ sub_811EBBC: ; 811EBBC ldr r1, =0x000001ff ands r1, r4 lsrs r0, r6, 25 - bl sub_811EB64 + bl GetEasyChatWord adds r1, r0, 0 @0811EBEA: adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @0811EC02 .align 2, 0 .pool @@ -549630,10 +549709,10 @@ sub_811EBBC: ; 811EBBC pop {r4-r6} pop {r1} bx r1 - thumb_func_end sub_811EBBC + thumb_func_end CopyEasyChatWord - thumb_func_start sub_811EC08 -sub_811EC08: ; 811EC08 + thumb_func_start ConvertEasyChatWordsToString +ConvertEasyChatWordsToString: ; 811EC08 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -549662,7 +549741,7 @@ sub_811EC08: ; 811EC08 ldrh r1, [r5] adds r0, r4, 0 str r2, [sp] - bl sub_811EBBC + bl CopyEasyChatWord adds r4, r0, 0 ldrh r0, [r5] ldr r2, [sp] @@ -549682,7 +549761,7 @@ sub_811EC08: ; 811EC08 ldrh r1, [r5] adds r5, 0x2 adds r0, r4, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r4, r0, 0 movs r0, 0xFE strb r0, [r4] @@ -549706,7 +549785,7 @@ sub_811EC08: ; 811EC08 bx r1 .align 2, 0 .pool - thumb_func_end sub_811EC08 + thumb_func_end ConvertEasyChatWordsToString thumb_func_start sub_811EC98 sub_811EC98: ; 811EC98 @@ -549776,7 +549855,7 @@ sub_811EC98: ; 811EC98 ldrh r1, [r5] adds r0, r4, 0 str r2, [sp, 0x8] - bl sub_811EBBC + bl CopyEasyChatWord adds r4, r0, 0 ldrh r0, [r5] ldr r2, [sp, 0x8] @@ -549796,7 +549875,7 @@ sub_811EC98: ; 811EC98 ldrh r1, [r5] adds r5, 0x2 adds r0, r4, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r4, r0, 0 ldr r0, [sp, 0x4] cmp r0, 0 @@ -549856,14 +549935,14 @@ sub_811ED7C: ; 811ED7C ldr r1, =0x000001ff ands r1, r4 lsrs r0, r5, 25 - bl sub_811EB64 + bl GetEasyChatWord b @0811EDB2 .align 2, 0 .pool @0811EDB0: ldr r0, =gUnknown_085EEA42 @0811EDB2: - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 @0811EDBA: @@ -550087,7 +550166,7 @@ sub_811EECC: ; 811EECC ldr r4, =0x02021fc4 adds r0, r4, 0 adds r1, r5, 0 - bl sub_811EC08 + bl ConvertEasyChatWordsToString adds r0, r4, 0 bl box_related_two__3 @0811EF58: @@ -550114,7 +550193,7 @@ sub_811EF6C: ; 811EF6C lsls r1, 16 lsrs r1, 16 ldr r0, =0x02021dc4 - bl sub_811EBBC + bl CopyEasyChatWord pop {r0} bx r0 .align 2, 0 @@ -550586,7 +550665,7 @@ sub_811F2D4: ; 811F2D4 cmp r3, 0x10 ble @0811F2FE ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0811F358 @@ -550619,7 +550698,7 @@ sub_811F2D4: ; 811F2D4 strh r0, [r3] @0811F358: ldr r0, =0x00000866 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0811F37A @@ -550703,7 +550782,7 @@ sub_811F3E0: ; 811F3E0 adds r1, r0 ldr r1, [r1] adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r1, r0, 0 subs r4, r1, r4 lsls r4, 16 @@ -550742,15 +550821,16 @@ sub_811F424: ; 811F424 .pool thumb_func_end sub_811F424 - thumb_func_start sub_811F434 -sub_811F434: ; 811F434 + thumb_func_start CopyEasyChatWordPadded +; char *CopyEasyChatWordPadded(char *dest, u16 groupIdWordIdPair, u16 minLength) +CopyEasyChatWordPadded: ; 811F434 push {r4,r5,lr} adds r4, r0, 0 lsls r1, 16 lsrs r1, 16 lsls r2, 16 lsrs r5, r2, 16 - bl sub_811EBBC + bl CopyEasyChatWord adds r1, r0, 0 subs r4, r1, r4 lsls r4, 16 @@ -550773,7 +550853,7 @@ sub_811F434: ; 811F434 pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_811F434 + thumb_func_end CopyEasyChatWordPadded thumb_func_start sub_811F46C sub_811F46C: ; 811F46C @@ -552543,7 +552623,7 @@ sub_8120210: ; 8120210 adds r0, r4, r1 ldr r5, =0x03005d90 ldr r1, [r5] - bl gf_strcpy + bl CopyString movs r2, 0 ldr r0, =0x00002e4d adds r4, r0 @@ -552606,7 +552686,7 @@ sub_8120280: ; 8120280 ldrh r1, [r5] adds r5, 0x2 adds r0, r2, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r2, r0, 0 adds r7, r6, 0x1 cmp r2, r4 @@ -552629,7 +552709,7 @@ sub_8120280: ; 8120280 ldrh r1, [r5] adds r5, 0x2 adds r0, r2, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r2, r0, 0 cmp r2, r4 beq @081202E6 @@ -552651,7 +552731,7 @@ sub_8120280: ; 8120280 ldrh r1, [r5] adds r5, 0x2 adds r0, r2, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r2, r0, 0 cmp r2, r4 beq @0812030E @@ -552742,7 +552822,7 @@ sub_812038C: ; 812038C .pool @081203AC: ldr r0, =0x02021cc4 - bl sub_811EBBC + bl CopyEasyChatWord ldr r1, =0x020375f0 movs r0, 0x1 @081203B6: @@ -552813,20 +552893,20 @@ sub_81203FC: ; 81203FC lsls r1, 1 adds r1, r6, r1 ldrh r1, [r1] - bl sub_811EBBC + bl CopyEasyChatWord adds r2, r0, 0 ldr r1, =gUnknown_082942FD - bl gf_strcpy + bl CopyString adds r2, r0, 0 ldr r0, =gUnknown_0859EFF0 lsls r4, 2 adds r4, r0 ldr r1, [r4] adds r0, r2, 0 - bl gf_strcpy + bl CopyString adds r2, r0, 0 ldr r1, =gUnknown_08294301 - bl gf_strcpy + bl CopyString b @081204A2 .align 2, 0 .pool @@ -552846,7 +552926,7 @@ sub_81203FC: ; 81203FC lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl gf_strcpy + bl CopyString @081204A2: bl GenerateRandomNumber lsls r0, 16 @@ -553717,7 +553797,7 @@ sub_8120B5C: ; 8120B5C push {lr} ldr r0, =0x00004010 movs r1, 0x45 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -553749,7 +553829,7 @@ sub_8120B70: ; 8120B70 adds r0, 0x5 adds r0, r5, r0 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @08120B9E: adds r4, 0x1 cmp r4, 0x3 @@ -553783,7 +553863,7 @@ sub_8120B70: ; 8120B70 bl memset mov r0, sp ldr r1, =gUnknown_085EDFB0 - bl gf_strcpy + bl CopyString adds r0, r5, 0 mov r1, sp movs r2, 0x7 @@ -554024,7 +554104,7 @@ sub_8120D34: ; 8120D34 cmp r0, 0x15 bne @08120D98 adds r0, r1, 0 - bl sub_8009370 + bl StripExtendedControlCodes movs r0, 0x1 strb r0, [r4] b @08120D9A @@ -554049,7 +554129,7 @@ sub_8120D34: ; 8120D34 muls r0, r5 adds r0, 0x5 adds r0, r7, r0 - bl sub_8009370 + bl StripExtendedControlCodes @08120DBE: adds r5, 0x1 cmp r5, 0x3 @@ -554400,13 +554480,13 @@ sub_8120FDC: ; 8120FDC adds r0, r5, 0 movs r2, 0 movs r3, 0xA - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 adds r0, r6, 0 bl sub_8120ECC adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString mov r1, r9 ldr r0, [r1] adds r0, 0x34 @@ -554583,13 +554663,13 @@ sub_8121178: ; 8121178 adds r0, r4, 0 movs r2, 0 movs r3, 0xA - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 mov r0, r8 bl sub_8120ECC adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02021ec4 adds r0, r5, 0 adds r1, r4, 0 @@ -554599,7 +554679,7 @@ sub_8121178: ; 8121178 adds r0, r5 ldrb r1, [r0] adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted mov r0, r8 bl sub_8120EC0 bl box_related_two__2 @@ -554949,12 +555029,12 @@ sub_8121478: ; 8121478 movs r3, 0x88 lsls r3, 2 adds r1, r4, r3 - ldr r0, =sub_811EBBC + ldr r0, =CopyEasyChatWord str r0, [r1] movs r0, 0x89 lsls r0, 2 adds r1, r4, r0 - ldr r0, =sub_811EC08 + ldr r0, =ConvertEasyChatWordsToString str r0, [r1] ldrh r1, [r5, 0x20] adds r0, r1, 0 @@ -555594,7 +555674,7 @@ sub_8121A1C: ; 8121A1C lsls r2, 30 lsrs r2, 30 movs r3, 0x1 - bl sub_811EC08 + bl ConvertEasyChatWordsToString mov r1, r8 ldr r0, [r1] adds r0, r7 @@ -555624,7 +555704,7 @@ sub_8121A1C: ; 8121A1C adds r1, r3 ldr r1, [r1] adds r1, 0x12 - bl gf_strcpy + bl CopyString adds r2, r0, 0 ldr r1, [r4] ldr r3, =0x0000021e @@ -555634,12 +555714,12 @@ sub_8121A1C: ; 8121A1C bne @08121AF0 ldr r1, =gUnknown_085EEA78 adds r0, r2, 0 - bl gf_strcpy + bl CopyString ldr r0, [r4] movs r1, 0x80 lsls r1, 2 adds r0, r1 - bl sub_8008C24 + bl GetStringLength ldr r2, [r4] movs r3, 0x8A lsls r3, 2 @@ -555770,13 +555850,13 @@ sub_8121B1C: ; 8121B1C @08121BCC: ldr r1, =gUnknown_085EEA78 add r0, sp, 0xC - bl gf_strcpy + bl CopyString ldr r4, =0x0203a134 ldr r1, [r4] movs r2, 0x80 lsls r2, 2 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r1, =0x00000219 adds r0, r1 @@ -556111,7 +556191,7 @@ sub_8121E7C: ; 8121E7C beq @08121EC0 adds r0, r4, 0 ldr r1, [sp, 0x30] - bl ExpandTextCodes + bl ExpandStringRefs @08121EC0: ldr r2, =0x03003014 ldrb r0, [r2] @@ -557242,14 +557322,14 @@ sub_81226D8: ; 81226D8 @081226F8: ldr r4, =0x00000893 adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08122744 adds r0, r4, 0 - bl flag_set + bl FlagSet ldr r0, =0x00000894 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08122744 @@ -557595,7 +557675,7 @@ sub_8122998: ; 8122998 adds r1, r2 movs r2, 0x2 movs r3, 0x1 - bl sub_811EC08 + bl ConvertEasyChatWordsToString pop {r0} bx r0 .align 2, 0 @@ -560300,7 +560380,7 @@ get_flagnr_blue_points: ; 8123D58 @08123E48: ldr r0, =0x0000087e @08123E4A: - bl flag_check + bl FlagGet lsls r0, 24 movs r1, 0x3 cmp r0, 0 @@ -560313,7 +560393,7 @@ get_flagnr_blue_points: ; 8123D58 .pool @08123E60: ldr r0, =0x000008a8 - bl flag_check + bl FlagGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -560327,7 +560407,7 @@ get_flagnr_blue_points: ; 8123D58 .pool @08123E7C: ldr r0, =0x000008a9 - bl flag_check + bl FlagGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -560410,7 +560490,7 @@ sub_8123EB4: ; 8123EB4 sub_8123F04: ; 8123F04 push {lr} ldr r0, =0x00004037 - bl var_get + bl VarGet subs r0, 0x1 lsls r0, 16 lsrs r1, r0, 16 @@ -560435,7 +560515,7 @@ sub_8123F30: ; 8123F30 adds r4, r0, 0 adds r5, r1, 0 ldr r0, =0x00004037 - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 ldr r2, =0xfff70000 @@ -561276,7 +561356,7 @@ GetMapName: ; 812456C adds r1, r0 ldr r1, [r1] adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r1, r0, 0 b @081245B2 .align 2, 0 @@ -561329,13 +561409,13 @@ sub_81245DC: ; 81245DC cmp r1, 0x57 bne @08124604 ldr r1, =gUnknown_085EC9D2 - bl gf_strcpy + bl CopyString b @0812460A .align 2, 0 .pool @081245F8: ldr r1, =gUnknown_085EC9D8 - bl gf_strcpy + bl CopyString b @0812460A .align 2, 0 .pool @@ -561358,7 +561438,7 @@ sub_8124610: ; 8124610 b @08124626 @08124620: ldr r1, =gUnknown_085EC9E4 - bl gf_strcpy + bl CopyString @08124626: pop {r1} bx r1 @@ -561713,7 +561793,7 @@ sub_8124904: ; 8124904 cmp r0, r1 bne @081249C4 ldrh r0, [r4, 0x6] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081249CE @@ -561723,7 +561803,7 @@ sub_8124904: ; 8124904 lsls r0, 2 adds r0, r1 ldr r0, [r0] - bl sub_8008C24 + bl GetStringLength movs r7, 0x1 movs r0, 0 movs r1, 0 @@ -561976,7 +562056,7 @@ sub_8124AD4: ; 8124AD4 orrs r0, r3 strb r0, [r2, 0x1] ldr r0, [sp, 0xC] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08124B9C @@ -562055,7 +562135,7 @@ sub_8124BE4: ; 8124BE4 lsls r4, r1, 2 adds r0, r4, r6 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08124C84 @@ -562370,7 +562450,7 @@ sub_8124E0C: ; 8124E0C .pool @08124E98: ldr r0, =0x000008b4 - bl flag_check + bl FlagGet lsls r0, 24 movs r1, 0xB cmp r0, 0 @@ -566143,7 +566223,7 @@ sub_8126C48: ; 8126C48 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -566185,7 +566265,7 @@ sub_8126CA4: ; 8126CA4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAAEC adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -566231,7 +566311,7 @@ sub_8126D10: ; 8126D10 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -566539,7 +566619,7 @@ sub_8126F68: ; 8126F68 adds r0, r4, 0 bl sub_8127058 adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 adds r6, r0, r4 @@ -566549,7 +566629,7 @@ sub_8126F68: ; 8126F68 adds r0, r1 ldr r1, [r0] adds r0, r6, 0 - bl gf_strcpy + bl CopyString str r5, [sp] mov r0, r9 str r0, [sp, 0x4] @@ -566569,7 +566649,7 @@ sub_8126F68: ; 8126F68 adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r6, r0, 0 movs r0, 0xBA strb r0, [r6] @@ -566582,7 +566662,7 @@ sub_8126F68: ; 8126F68 adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 adds r1, r4, 0 ldr r2, [sp, 0x14] @@ -566618,7 +566698,7 @@ sub_8127058: ; 8127058 lsls r4, r1, 24 lsrs r4, 24 ldr r1, =gUnknown_085EA7C8 - bl gf_strcpy + bl CopyString cmp r4, 0x1 bne @08127078 movs r0, 0x4 @@ -566734,7 +566814,7 @@ sub_81270E8: ; 81270E8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8127180 adds r0, r5, 0 adds r1, r4, 0 @@ -566857,7 +566937,7 @@ sub_8127250: ; 8127250 lsrs r1, 22 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -567050,7 +567130,7 @@ sub_8127330: ; 8127330 ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8CF0 - bl gf_strcpy + bl CopyString ldr r0, [r5] lsls r2, r6, 3 adds r1, r0, r2 @@ -567096,13 +567176,13 @@ sub_8127454: ; 8127454 lsls r4, r1, 16 lsrs r4, 16 ldr r1, =0x02021cc4 - bl gf_strcpy + bl CopyString lsls r4, 5 ldr r0, =gUnknown_085A5C09 adds r4, r0 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString pop {r4,r5} pop {r0} bx r0 @@ -568345,13 +568425,13 @@ sub_8127E18: ; 8127E18 adds r5, 0xAE adds r4, r5, 0 adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne @08127F1C adds r0, r4, 0 - bl flag_clear + bl FlagReset movs r2, 0 ldr r0, [r7, 0x4] ldrb r4, [r0] @@ -568394,7 +568474,7 @@ sub_8127E18: ; 8127E18 ldr r1, [r1] ldr r1, [r1, 0x1C] ldrh r1, [r1] - bl var_set + bl VarSet ldr r0, [r7, 0x4] ldr r0, [r0, 0x4] adds r4, r0 @@ -568502,7 +568582,7 @@ sub_8127F68: ; 8127F68 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA9AE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -568542,20 +568622,20 @@ sub_8127F68: ; 8127F68 ldrb r1, [r4, 0x8] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldrb r0, [r4, 0x9] cmp r0, 0 bne @08128018 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA8EA - bl ExpandTextCodes + bl ExpandStringRefs b @08128020 .align 2, 0 .pool @08128018: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA931 - bl ExpandTextCodes + bl ExpandStringRefs @08128020: ldr r1, =0x02021fc4 ldr r2, =sub_8127A5C @@ -568568,7 +568648,7 @@ sub_8127F68: ; 8127F68 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA8D2 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -569057,7 +569137,7 @@ sub_8128414: ; 8128414 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EA8BF adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8128B80 adds r0, r4, 0 adds r1, r5, 0 @@ -569729,7 +569809,7 @@ sub_8128950: ; 8128950 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA897 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_81289D0 adds r0, r5, 0 adds r1, r4, 0 @@ -569743,7 +569823,7 @@ sub_8128950: ; 8128950 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA8A6 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8129020 adds r0, r5, 0 adds r1, r4, 0 @@ -571752,7 +571832,7 @@ sub_81298EC: ; 81298EC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAAC5 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8129D64 adds r0, r5, 0 adds r1, r4, 0 @@ -572087,7 +572167,7 @@ sub_8129BF8: ; 8129BF8 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EAA62 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_812A1F0 adds r0, r4, 0 adds r1, r5, 0 @@ -572113,7 +572193,7 @@ sub_8129C74: ; 8129C74 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAAA3 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_812A1A0 b @08129D14 .align 2, 0 @@ -572168,7 +572248,7 @@ sub_8129C74: ; 8129C74 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAA62 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_812A1F0 @08129D14: adds r0, r5, 0 @@ -572181,7 +572261,7 @@ sub_8129C74: ; 8129C74 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAA81 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8129D64 adds r0, r5, 0 adds r1, r4, 0 @@ -572480,7 +572560,7 @@ sub_8129F20: ; 8129F20 ldr r2, =0x00000c84 adds r0, r1, r2 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08129FB0 @@ -573060,11 +573140,11 @@ sub_812A3D4: ; 812A3D4 lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EAA14 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_812A458 adds r0, r5, 0 adds r1, r4, 0 @@ -573076,7 +573156,7 @@ sub_812A3D4: ; 812A3D4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA9E0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -573131,7 +573211,7 @@ sub_812A478: ; 812A478 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EAA3D adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_8127A5C adds r0, r4, 0 adds r1, r5, 0 @@ -585002,7 +585082,7 @@ sub_813010C: ; 813010C bl sub_818E868 ldr r1, =gUnknown_085E8D5E adds r0, r4, 0 - bl gf_strcat + bl AppendString ldr r1, =gUnknown_085B07D4 ldr r0, [r6] ldrb r0, [r0, 0x1E] @@ -585010,34 +585090,34 @@ sub_813010C: ; 813010C adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcat + bl AppendString ldr r4, =0x02021dc4 ldr r1, [r6] adds r1, 0x16 adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 bl sub_81DB5AC ldr r0, =0x02021ec4 ldr r1, [r6] adds r1, 0xB - bl gf_strcpy + bl CopyString ldr r0, =0x02021fc4 ldr r1, =gUnknown_0827EA0C - bl ExpandTextCodes + bl ExpandStringRefs b @081301A6 .align 2, 0 .pool @08130190: ldr r0, =0x02021cc4 adds r1, 0xB - bl gf_strcpy + bl CopyString ldr r0, =0x02021fc4 ldr r2, =gUnknown_085B07F4 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandTextCodes + bl ExpandStringRefs @081301A6: ldr r4, =0x02021fc4 movs r0, 0x1 @@ -592253,7 +592333,7 @@ sub_81339F8: ; 81339F8 lsls r1, r4, 2 adds r1, r6 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r1, r5, 0x1 adds r1, r4 ldr r0, =gUnknown_085B09F4 @@ -592545,13 +592625,13 @@ sub_8133C48: ; 8133C48 adds r1, 0x5 adds r1, r6, r1 adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r6, 0 adds r0, 0x32 adds r0, r4 ldrb r1, [r0] adds r0, r5, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted adds r0, r6, 0x1 adds r0, r4 ldrb r1, [r0] @@ -592691,12 +592771,12 @@ sub_8133DA0: ; 8133DA0 lsls r1, 5 ldr r4, =gUnknown_085A5C09 adds r1, r4 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldrh r1, [r5] lsls r1, 5 adds r1, r4 - bl gf_strcpy + bl CopyString b @08133E04 .align 2, 0 .pool @@ -592757,7 +592837,7 @@ sub_8133E38: ; 8133E38 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r2, =0x00002e29 adds r0, r6, r2 ldrh r1, [r4] @@ -595532,7 +595612,7 @@ sub_8135578: ; 8135578 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_808E3F8 + bl set_field_object_graphics ldrb r1, [r5, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -596520,7 +596600,7 @@ sub_8135E2C: ; 8135E2C ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E9344 - bl gf_strcpy + bl CopyString ldr r1, [r5] lsls r2, r6, 3 ldr r3, =0x0000080c @@ -596582,7 +596662,7 @@ sub_8135F04: ; 8135F04 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString adds r4, r0, 0 movs r0, 0xFC strb r0, [r4] @@ -596602,10 +596682,10 @@ sub_8135F04: ; 8135F04 adds r0, r6, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085E934F adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs pop {r4-r6} pop {r0} bx r0 @@ -596746,7 +596826,7 @@ sub_8135FCC: ; 8135FCC adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x7 adds r1, r4, 0 movs r2, 0x4 @@ -598002,11 +598082,11 @@ sub_8136AB4: ; 8136AB4 lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E9353 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs bl sav2_get_text_speed lsls r0, 24 lsrs r0, 24 @@ -598064,7 +598144,7 @@ sub_8136B78: ; 8136B78 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E9367 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs bl sav2_get_text_speed lsls r0, 24 lsrs r0, 24 @@ -598205,7 +598285,7 @@ sub_8136C8C: ; 8136C8C lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldrb r0, [r7] bl sub_8136F68 ldr r1, [r5] @@ -598264,7 +598344,7 @@ sub_8136D2C: ; 8136D2C lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r1, =0x020375f0 ldrh r0, [r5] strh r0, [r1] @@ -598661,7 +598741,7 @@ sub_8137044: ; 8137044 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -598691,7 +598771,7 @@ sub_8137068: ; 8137068 adds r0, r7 ldr r1, [r0] adds r0, r6, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 b @081370AC .align 2, 0 @@ -598774,7 +598854,7 @@ sub_81370FC: ; 81370FC cmp r0, 0x1 bne @08137170 ldr r0, =0x00000888 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08137170 @@ -598831,7 +598911,7 @@ sub_81371B4: ; 81371B4 movs r0, 0xCF bl audio_play ldr r0, =0x00000888 - bl flag_set + bl FlagSet ldr r0, =gUnknown_082926F8 bl script_env_1_execute_new_script pop {r0} @@ -599484,7 +599564,7 @@ sub_8137734: ; 8137734 bl sp000_heal_pokemon ldr r4, =0x00000864 adds r0, r4, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x1 @@ -599499,7 +599579,7 @@ sub_8137734: ; 8137734 movs r0, 0 strb r0, [r1] adds r0, r4, 0 - bl flag_set + bl FlagSet @0813776C: movs r0, 0x1 bl sub_80847F8 @@ -599582,7 +599662,7 @@ sub_8137734: ; 8137734 movs r0, 0x2A bl sav12_xor_increment ldr r0, =0x0000089b - bl flag_set + bl FlagSet mov r3, sp add r2, sp, 0x4 movs r6, 0x4 @@ -599642,12 +599722,12 @@ sp0C8_whiteout_maybe: ; 813787C sub_8137890: ; 8137890 push {r4,lr} ldr r0, =0x00004024 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldr r0, =0x00004025 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 lsls r4, 16 @@ -599666,12 +599746,12 @@ sub_81378BC: ; 81378BC adds r4, r0, 0 ldr r0, =0x00004024 lsrs r1, r4, 16 - bl var_set + bl VarSet ldr r0, =0x00004025 lsls r4, 16 lsrs r4, 16 adds r1, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -599786,13 +599866,13 @@ sub_8137988: ; 8137988 cmp r0, 0 beq @081379C8 ldr r0, =0x0000089a - bl flag_set + bl FlagSet b @081379CE .align 2, 0 .pool @081379C8: ldr r0, =0x0000089a - bl flag_clear + bl FlagReset @081379CE: pop {r0} bx r0 @@ -599834,7 +599914,7 @@ sub_81379F8: ; 81379F8 sub_8137A0C: ; 8137A0C push {lr} ldr r0, =0x00004049 - bl var_get_pointer + bl GetVarPointer movs r1, 0 strh r1, [r0] pop {r0} @@ -599850,7 +599930,7 @@ sub_8137A20: ; 8137A20 lsls r4, 16 lsrs r4, 16 ldr r0, =0x00004049 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 ldrh r0, [r5] adds r4, r0 @@ -600287,17 +600367,17 @@ sub_8137D5C: ; 8137D5C adds r1, r6, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085EB5EE adds r0, r4, 0 - bl gf_strcat + bl AppendString b @08137D90 .align 2, 0 .pool @08137D88: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB5CF - bl gf_strcpy + bl CopyString @08137D90: ldr r0, =0x00000e0f cmp r7, r0 @@ -600310,7 +600390,7 @@ sub_8137D5C: ; 8137D5C adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0xAD strb r0, [r4, 0x2] adds r5, r4, 0x3 @@ -600325,17 +600405,17 @@ sub_8137D5C: ; 8137D5C adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085EB5E5 adds r0, r4, 0 - bl gf_strcat + bl AppendString b @08137DF8 .align 2, 0 .pool @08137DF0: ldr r0, =0x02021dc4 ldr r1, =gUnknown_085EB5DA - bl gf_strcpy + bl CopyString @08137DF8: movs r4, 0 cmp r6, 0 @@ -600436,13 +600516,13 @@ sub_8137E9C: ; 8137E9C mov r8, r1 ldr r6, =0x00004028 adds r0, r6, 0 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldr r7, =0x00004029 adds r0, r7, 0 - bl var_get + bl VarGet lsls r0, 16 adds r4, r0 cmp r4, r5 @@ -600453,13 +600533,13 @@ sub_8137E9C: ; 8137E9C lsls r1, r5, 16 lsrs r1, 16 adds r0, r6, 0 - bl var_set + bl VarSet lsrs r1, r5, 16 adds r0, r7, 0 - bl var_set + bl VarSet ldr r0, =0x00004027 mov r1, r8 - bl var_set + bl VarSet @08137EE6: pop {r3} mov r8, r3 @@ -600474,18 +600554,18 @@ sub_8137E9C: ; 8137E9C sub_8137EFC: ; 8137EFC push {r4,lr} ldr r0, =0x00004028 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldr r0, =0x00004029 - bl var_get + bl VarGet lsls r0, 16 adds r4, r0 cmp r4, 0 beq @08137F3C ldr r0, =0x00004027 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -600513,13 +600593,13 @@ sub_8137F44: ; 8137F44 beq @08137F7C ldr r4, =0x000040a9 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 beq @08137F6E adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x3 @@ -600527,7 +600607,7 @@ sub_8137F44: ; 8137F44 @08137F6E: adds r0, r4, 0 movs r1, 0 - bl var_set + bl VarSet movs r0, 0 bl sav1_set_x2C @08137F7C: @@ -600542,9 +600622,9 @@ sub_8137F44: ; 8137F44 sub_8137F90: ; 8137F90 push {lr} ldr r0, =0x0000088d - bl flag_set + bl FlagSet ldr r0, =0x0000404a - bl var_get_pointer + bl GetVarPointer movs r1, 0 strh r1, [r0] pop {r0} @@ -600557,7 +600637,7 @@ sub_8137F90: ; 8137F90 sub_8137FB0: ; 8137FB0 push {lr} ldr r0, =0x0000088d - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -600570,12 +600650,12 @@ sub_8137FC0: ; 8137FC0 lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x0000088d - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08137FE6 ldr r0, =0x0000404a - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, r4, r1 strh r1, [r0] @@ -600606,10 +600686,10 @@ sub_8137FFC: ; 8137FFC adds r6, r2, 0 adds r7, r3, 0 ldr r0, =0x0000404a - bl var_get_pointer + bl GetVarPointer adds r4, r0, 0 ldr r0, =0x000040b4 - bl var_get_pointer + bl GetVarPointer ldrh r0, [r0] subs r0, 0x1 cmp r0, 0x9 @@ -600713,7 +600793,7 @@ sub_8137FFC: ; 8137FFC is_tile_that_overrides_player_control: ; 81380D8 push {lr} movs r0, 0x88 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0813810A @@ -600727,7 +600807,7 @@ is_tile_that_overrides_player_control: ; 81380D8 bne @0813810A @081380F6: ldr r0, =0x000040f2 - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -600751,7 +600831,7 @@ is_tile_that_overrides_player_control: ; 81380D8 sub_8138120: ; 8138120 push {lr} movs r0, 0x8A - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08138152 @@ -600765,7 +600845,7 @@ sub_8138120: ; 8138120 bne @08138152 @0813813E: ldr r0, =0x000040f3 - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -600789,7 +600869,7 @@ sub_8138120: ; 8138120 sub_8138168: ; 8138168 push {lr} movs r0, 0x72 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0813819A @@ -600803,7 +600883,7 @@ sub_8138168: ; 8138168 bne @0813819A @08138186: ldr r0, =0x000040f5 - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -600827,7 +600907,7 @@ sub_8138168: ; 8138168 sub_81381B0: ; 81381B0 push {lr} movs r0, 0x80 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081381E2 @@ -600841,7 +600921,7 @@ sub_81381B0: ; 81381B0 bne @081381E2 @081381CE: ldr r0, =0x000040f4 - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -600865,7 +600945,7 @@ sub_81381B0: ; 81381B0 sub_81381F8: ; 81381F8 push {lr} movs r0, 0x75 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0813822A @@ -600879,7 +600959,7 @@ sub_81381F8: ; 81381F8 bne @0813822A @08138216: ldr r0, =0x000040f6 - bl var_get_pointer + bl GetVarPointer ldrh r1, [r0] adds r1, 0x1 strh r1, [r0] @@ -600927,7 +601007,7 @@ sub_8138240: ; 8138240 lsls r1, 2 ldr r2, =0x020229f0 adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r6, 0x1 lsls r0, 24 lsrs r6, r0, 24 @@ -601990,14 +602070,14 @@ sub_8138B10: ; 8138B10 bne @08138B34 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB5F9 - bl gf_strcpy + bl CopyString b @08138B3C .align 2, 0 .pool @08138B34: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB601 - bl gf_strcpy + bl CopyString @08138B3C: pop {r0} bx r0 @@ -602015,14 +602095,14 @@ sub_8138B48: ; 8138B48 bne @08138B6C ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB60E - bl gf_strcpy + bl CopyString b @08138B74 .align 2, 0 .pool @08138B6C: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EB60A - bl gf_strcpy + bl CopyString @08138B74: pop {r0} bx r0 @@ -602078,7 +602158,7 @@ sub_8138BC8: ; 8138BC8 push {lr} ldr r0, =0x020375e0 ldrh r0, [r0] - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -602630,7 +602710,7 @@ sub_8138FD4: ; 8138FD4 ldr r1, =0x020375e0 ldr r0, =0x000001f5 strh r0, [r1] - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -602643,7 +602723,7 @@ sub_8138FEC: ; 8138FEC ldr r1, =0x020375e0 ldr r0, =0x000001f5 strh r0, [r1] - bl flag_clear + bl FlagReset pop {r0} bx r0 .align 2, 0 @@ -602922,7 +603002,7 @@ sub_8139200: ; 8139200 push {r4,lr} ldr r4, =0x02021cc4 ldr r0, =0x00004026 - bl var_get + bl VarGet adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -603008,7 +603088,7 @@ sub_81392AC: ; 81392AC ldr r1, =0x020375e0 ldr r0, =0x00000213 strh r0, [r1] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081392CC @@ -603030,7 +603110,7 @@ sub_81392D4: ; 81392D4 movs r0, 0x85 lsls r0, 2 strh r0, [r1] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081392F0 @@ -603051,7 +603131,7 @@ sub_81392F8: ; 81392F8 ldr r1, =0x020375e0 ldr r0, =0x00000215 strh r0, [r1] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08139318 @@ -603072,7 +603152,7 @@ sub_8139320: ; 8139320 ldr r1, =0x020375e0 ldr r0, =0x00000216 strh r0, [r1] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08139340 @@ -603115,7 +603195,7 @@ sub_8139370: ; 8139370 movs r0, 0x2A bl sav12_xor_increment ldr r0, =0x0000089b - bl flag_set + bl FlagSet movs r1, 0x1 mov r0, sp strb r1, [r0] @@ -603178,7 +603258,7 @@ sub_81393C8: ; 81393C8 sub_81393FC: ; 81393FC push {lr} movs r0, 0xC7 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08139454 @@ -603190,7 +603270,7 @@ sub_81393FC: ; 81393FC cmp r1, r0 bne @08139454 subs r0, 0x75 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08139434 @@ -603202,14 +603282,14 @@ sub_81393FC: ; 81393FC @08139434: movs r0, 0xE9 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08139454 ldr r0, =0x0000409a movs r1, 0x5 @08139446: - bl var_set + bl VarSet movs r0, 0x1 b @08139456 .align 2, 0 @@ -603225,7 +603305,7 @@ sub_81393FC: ; 81393FC sub_813945C: ; 813945C push {lr} ldr r0, =0x000008bf - bl flag_set + bl FlagSet pop {r0} bx r0 .align 2, 0 @@ -603288,7 +603368,7 @@ sub_813946C: ; 813946C sub_81394D8: ; 81394D8 push {r4-r6,lr} ldr r0, =0x00004023 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_8133EDC @@ -603461,7 +603541,7 @@ sub_8139634: ; 8139634 push {lr} movs r0, 0x95 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -603580,7 +603660,7 @@ nullsub_54: ; 8139708 sub_813970C: ; 813970C push {r4,lr} ldr r0, =0x000040c2 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 adds r3, r0, 0 @@ -603620,7 +603700,7 @@ sub_8139754: ; 8139754 ldr r0, =0x000040c2 ldr r4, =0x03005cf8 ldrh r1, [r4] - bl var_set + bl VarSet ldrh r0, [r4] pop {r4} pop {r1} @@ -603652,7 +603732,7 @@ sub_8139770: ; 8139770 ldr r0, =0x03005d90 ldr r0, [r0] adds r1, r4, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @081397BC @081397A6: @@ -603722,7 +603802,7 @@ sub_81397C4: ; 81397C4 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString b @08139862 .align 2, 0 .pool @@ -603743,7 +603823,7 @@ sub_81397C4: ; 81397C4 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString @08139862: pop {r4,r5} pop {r0} @@ -603826,7 +603906,7 @@ sub_81398C0: ; 81398C0 ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 @081398FC: pop {r4} @@ -603882,7 +603962,7 @@ sub_813994C: ; 813994C cmp r1, r0 bne @08139978 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -603955,7 +604035,7 @@ sub_8139994: ; 8139994 movs r1, 0x4 @081399E6: ldr r0, =0x00004043 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -604592,7 +604672,7 @@ sub_8139EF4: ; 8139EF4 lsls r4, 16 lsrs r4, 16 ldr r0, =0x0000402f - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 ldrh r0, [r5] adds r4, r0 @@ -604613,7 +604693,7 @@ sub_8139F20: ; 8139F20 push {r4-r7,lr} movs r4, 0 ldr r0, =0x0000402f - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 cmp r6, 0x9 @@ -604766,7 +604846,7 @@ sub_8139F20: ; 8139F20 sub_813A080: ; 813A080 push {r4-r7,lr} ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x03005d90 @@ -604780,7 +604860,7 @@ sub_813A080: ; 813A080 bne @0813A0D8 movs r0, 0xA9 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @0813A0D8 @@ -605634,7 +605714,7 @@ sub_813A76C: ; 813A76C lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl var_set + bl VarSet b @0813A7A8 .align 2, 0 .pool @@ -605643,7 +605723,7 @@ sub_813A76C: ; 813A76C lsls r0, 16 lsrs r0, 16 movs r1, 0x69 - bl var_set + bl VarSet @0813A7A8: adds r0, r4, 0x1 lsls r0, 24 @@ -605690,7 +605770,7 @@ sub_813A7F4: ; 813A7F4 lsls r4, 16 lsrs r4, 16 ldr r0, =0x00004030 - bl var_get_pointer + bl GetVarPointer adds r5, r0, 0 ldrh r0, [r5] adds r4, r0 @@ -605710,7 +605790,7 @@ sub_813A7F4: ; 813A7F4 sub_813A820: ; 813A820 push {r4,lr} ldr r0, =0x00004030 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -605721,7 +605801,7 @@ sub_813A820: ; 813A820 bl box_related_two__2 ldr r0, =0x00004031 adds r1, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -605734,7 +605814,7 @@ sub_813A854: ; 813A854 push {r4,lr} ldr r4, =gUnknown_085B30D4 ldr r0, =0x00004031 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 14 adds r0, r4 @@ -605756,20 +605836,20 @@ sub_813A878: ; 813A878 lsrs r0, 24 mov r8, r0 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r7, r0, 16 ldr r0, =0x00004031 - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r4, =0x00004033 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -605787,14 +605867,14 @@ sub_813A878: ; 813A878 beq @0813A8E8 adds r0, r4, 0 movs r1, 0x2 - bl var_set + bl VarSet b @0813A8F0 .align 2, 0 .pool @0813A8E8: adds r0, r4, 0 movs r1, 0x3 - bl var_set + bl VarSet @0813A8F0: pop {r3} mov r8, r3 @@ -605815,9 +605895,9 @@ sub_813A8FC: ; 813A8FC add r0, sp, 0xC movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085EB6AD - bl gf_strcpy + bl CopyString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x30 @@ -606249,7 +606329,7 @@ sub_813AC7C: ; 813AC7C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString b @0813ACD2 .align 2, 0 .pool @@ -606265,7 +606345,7 @@ sub_813AC7C: ; 813AC7C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString @0813ACD2: pop {r0} bx r0 @@ -606500,12 +606580,12 @@ sub_813AEB4: ; 813AEB4 ldr r0, =0x020375e2 strh r1, [r0] ldr r0, =0x0000400e - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldr r0, =0x0000400d - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r4, 0 @@ -606638,7 +606718,7 @@ task_deoxys_sound: ; 813AFDC lsls r0, 24 lsrs r7, r0, 24 ldr r0, =0x000008d4 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -606651,17 +606731,17 @@ task_deoxys_sound: ; 813AFDC @0813B004: ldr r0, =0x00004035 mov r8, r0 - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r4, =0x00004034 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 adds r0, r4, 0 movs r1, 0 - bl var_set + bl VarSet cmp r5, 0 beq @0813B05C ldr r0, =gUnknown_085B33F6 @@ -606674,7 +606754,7 @@ task_deoxys_sound: ; 813AFDC bl sub_813B0B4 mov r0, r8 movs r1, 0 - bl var_set + bl VarSet ldr r1, =0x020375f0 movs r0, 0 strh r0, [r1] @@ -606685,7 +606765,7 @@ task_deoxys_sound: ; 813AFDC cmp r5, 0xA bne @0813B080 ldr r0, =0x000008d4 - bl flag_set + bl FlagSet ldr r1, =0x020375f0 movs r0, 0x2 @0813B06A: @@ -606706,7 +606786,7 @@ task_deoxys_sound: ; 813AFDC bl sub_813B0B4 ldr r0, =0x00004035 adds r1, r5, 0 - bl var_set + bl VarSet ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] @@ -606826,7 +606906,7 @@ increment_var_x4026_on_birth_island_modulo_100: ; 813B184 push {r4,lr} ldr r4, =0x00004034 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r2, r0, 16 ldr r0, =0x03005d8c @@ -606842,14 +606922,14 @@ increment_var_x4026_on_birth_island_modulo_100: ; 813B184 bls @0813B1C0 adds r0, r4, 0 movs r1, 0 - bl var_set + bl VarSet b @0813B1C8 .align 2, 0 .pool @0813B1C0: adds r0, r4, 0 adds r1, r2, 0 - bl var_set + bl VarSet @0813B1C8: pop {r4} pop {r0} @@ -606860,7 +606940,7 @@ increment_var_x4026_on_birth_island_modulo_100: ; 813B184 sub_813B1D0: ; 813B1D0 push {lr} ldr r0, =0x00004035 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 19 ldr r1, =gUnknown_085B3280 @@ -606904,7 +606984,7 @@ sub_813B21C: ; 813B21C push {r4,r5,lr} ldr r5, =0x000008d7 adds r0, r5, 0 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @0813B258 @@ -606913,13 +606993,13 @@ sub_813B21C: ; 813B21C lsls r4, 24 lsrs r4, 24 ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r4, r0 beq @0813B258 adds r0, r5, 0 - bl flag_set + bl FlagSet movs r0, 0x1 b @0813B25A .align 2, 0 @@ -606936,7 +607016,7 @@ sub_813B21C: ; 813B21C sub_813B260: ; 813B260 push {r4-r7,lr} ldr r0, =0x00004036 - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl set_unknown_box_id @@ -606963,11 +607043,11 @@ sub_813B260: ; 813B260 cmp r0, r4 beq @0813B2A6 ldr r0, =0x000008d7 - bl flag_clear + bl FlagReset @0813B2A6: ldr r0, =0x00004036 lsrs r1, r7, 16 - bl var_set + bl VarSet bl sub_813B21C lsls r0, 24 lsrs r0, 24 @@ -607003,16 +607083,16 @@ sub_813B2E4: ; 813B2E4 lsrs r4, r0, 16 ldr r0, =0x00004038 movs r1, 0 - bl var_set + bl VarSet movs r0, 0xDF lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq @0813B340 ldr r0, =0x000001bf - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -607022,7 +607102,7 @@ sub_813B2E4: ; 813B2E4 ands r4, r1 adds r1, r4, 0 adds r1, 0x9 - bl var_set + bl VarSet b @0813B36A .align 2, 0 .pool @@ -607039,7 +607119,7 @@ sub_813B2E4: ; 813B2E4 movs r1, 0x7 ands r4, r1 adds r1, r4, 0x1 - bl var_set + bl VarSet b @0813B36A .align 2, 0 .pool @@ -607052,7 +607132,7 @@ sub_813B2E4: ; 813B2E4 ands r4, r1 adds r1, r4, 0 adds r1, 0x9 - bl var_set + bl VarSet @0813B36A: pop {r4} pop {r0} @@ -607065,7 +607145,7 @@ sub_813B2E4: ; 813B2E4 sub_813B374: ; 813B374 push {r4,lr} ldr r0, =0x00004037 - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -607095,11 +607175,11 @@ sub_813B3B0: ; 813B3B0 push {r4-r6,lr} ldr r5, =0x00004038 adds r0, r5, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x00004037 - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 cmp r6, 0 @@ -607112,7 +607192,7 @@ sub_813B3B0: ; 813B3B0 bls @0813B474 adds r0, r5, 0 movs r1, 0 - bl var_set + bl VarSet ldr r0, =0x03005d8c ldr r1, [r0] movs r0, 0x4 @@ -607182,7 +607262,7 @@ sub_813B3B0: ; 813B3B0 adds r0, r5, 0 adds r1, r4, 0 @0813B478: - bl var_set + bl VarSet @0813B47C: movs r0, 0 @0813B47E: @@ -607257,7 +607337,7 @@ sub_813B4E0: ; 813B4E0 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -607277,7 +607357,7 @@ sub_813B4E0: ; 813B4E0 sub_813B514: ; 813B514 push {lr} ldr r0, =0x0000403f - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @0813B52C @@ -607950,19 +608030,19 @@ sub_813BA60: ; 813BA60 adds r1, r2 strh r0, [r1] ldr r0, =0x00000315 - bl flag_clear + bl FlagReset ldr r0, =0x00000316 - bl flag_clear + bl FlagReset ldr r0, =0x00000317 - bl flag_clear + bl FlagReset movs r0, 0xC6 lsls r0, 2 - bl flag_clear + bl FlagReset ldr r0, =0x000002da - bl flag_clear + bl FlagReset ldr r0, =0x00004095 movs r1, 0x1 - bl var_set + bl VarSet @0813BAB6: pop {r4} pop {r0} @@ -607977,7 +608057,7 @@ sub_813BADC: ; 813BADC lsls r0, 24 lsrs r6, r0, 24 ldr r0, =0x00004095 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -608429,42 +608509,42 @@ sub_813BE30: ; 813BE30 @0813BE70: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD14 - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @0813BE84: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD1B - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @0813BE98: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD22 - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @0813BEAC: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD29 - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @0813BEC0: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD30 - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @0813BED4: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EAD0C - bl gf_strcpy + bl CopyString b @0813BF04 .align 2, 0 .pool @@ -608472,7 +608552,7 @@ sub_813BE30: ; 813BE30 ldr r4, =0x02021cc4 adds r0, r4, 0 movs r2, 0x7 - bl gf_strncpy + bl CopyString_LimitN movs r0, 0xFF strb r0, [r4, 0x7] adds r0, r6, 0 @@ -608480,7 +608560,7 @@ sub_813BE30: ; 813BE30 adds r0, r5 ldrb r1, [r0] adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @0813BF04: pop {r4-r6} pop {r0} @@ -608493,7 +608573,7 @@ sub_813BE30: ; 813BE30 sub_813BF10: ; 813BF10 push {lr} ldr r0, =0x00004095 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -608634,7 +608714,7 @@ sub_813C008: ; 813C008 adds r0, r4, 0 adds r1, r7, 0 movs r2, 0x7 - bl sub_8008C68 + bl StringCompare_LimitN cmp r0, 0 bne @0813C02C ldrh r0, [r4, 0x8] @@ -608865,7 +608945,7 @@ sub_813C170: ; 813C170 adds r0, r4, 0 mov r1, r8 movs r2, 0x7 - bl gf_strncpy + bl CopyString_LimitN strh r7, [r4, 0x8] adds r2, r6, 0 adds r2, 0x54 @@ -609034,7 +609114,7 @@ sub_813C2F4: ; 813C2F4 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 movs r0, 0x18 bl sub_80847F8 @@ -609042,7 +609122,7 @@ sub_813C2F4: ; 813C2F4 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021ec4 movs r0, 0x19 bl sub_80847F8 @@ -609050,11 +609130,11 @@ sub_813C2F4: ; 813C2F4 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF6A1 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0xD0 @@ -609144,15 +609224,15 @@ sub_813C384: ; 813C384 @0813C40C: ldr r0, =0x02021cc4 movs r1, 0x8 - bl sub_800917C + bl RepeatStringTerminator ldr r0, =0x02021cc4 adds r1, r6, 0 movs r2, 0x7 - bl gf_strncpy + bl CopyString_LimitN lsls r1, r5, 24 lsrs r1, 24 ldr r0, =0x02021cc4 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, =0x0203ab74 mov r8, r0 ldrb r0, [r0] @@ -609172,7 +609252,7 @@ sub_813C384: ; 813C384 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r1, r8 ldrb r0, [r1] str r4, [sp] @@ -609186,7 +609266,7 @@ sub_813C384: ; 813C384 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r1, r8 ldrb r0, [r1] str r4, [sp] @@ -609200,7 +609280,7 @@ sub_813C384: ; 813C384 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r1, r8 ldrb r0, [r1] str r4, [sp] @@ -609241,7 +609321,7 @@ sub_813C4BC: ; 813C4BC ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EF68D adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r5, 0 movs r2, 0xD0 @@ -609266,7 +609346,7 @@ sub_813C4BC: ; 813C4BC bl sub_813C2F4 ldr r1, =gUnknown_085EF6BD adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r0, [r6] movs r1, 0x29 str r1, [sp] @@ -609992,7 +610072,7 @@ sub_813CB40: ; 813CB40 movs r4, 0 strh r4, [r0] ldr r0, =0x0000403e - bl var_get + bl VarGet ldr r1, [r5] ldr r2, =0x000006e4 adds r1, r2 @@ -610298,7 +610378,7 @@ sub_813CD64: ; 813CD64 adds r0, r7, 0x2 adds r0, r6, r0 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0813CE22 @@ -611993,7 +612073,7 @@ evolution_cutscene: ; 813DA8C bl pokemon_getattr ldr r0, =0x02021cc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x02021dc4 movs r1, 0xB mov r2, r10 @@ -612001,7 +612081,7 @@ evolution_cutscene: ; 813DA8C adds r1, r2, 0 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r4, 0 movs r1, 0xB bl pokemon_getattr @@ -612625,13 +612705,13 @@ sub_813E1D4: ; 813E1D4 bl pokemon_getattr ldr r0, =0x02021cc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x02021dc4 movs r1, 0xB muls r1, r5 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r1, =0x02021cc0 movs r0, 0x1 strb r0, [r1] @@ -613134,7 +613214,7 @@ sub_813E570: ; 813E570 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085CC990 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl battle_show_message_maybe @@ -613435,7 +613515,7 @@ sub_813E570: ; 813E570 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085CC9A6 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl battle_show_message_maybe @@ -613521,7 +613601,7 @@ sub_813E570: ; 813E570 bl pokemon_getattr ldr r0, =0x02022f58 add r1, sp, 0x4 - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x0000ffff cmp r6, r0 bne @0813EA94 @@ -613677,14 +613757,14 @@ sub_813E570: ; 813E570 beq @0813EBE4 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085CC9EE - bl ExpandTextCodes + bl ExpandStringRefs b @0813EBEC .align 2, 0 .pool @0813EBE4: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085CC9D3 - bl ExpandTextCodes + bl ExpandStringRefs @0813EBEC: ldr r0, =0x02021fc4 movs r1, 0 @@ -613718,7 +613798,7 @@ sub_813E570: ; 813E570 bl fanfare_play ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0xC] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -613818,7 +613898,7 @@ sub_813E570: ; 813E570 bl sub_804F574 ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x10] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -613848,7 +613928,7 @@ sub_813E570: ; 813E570 @0813ED62: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x14] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -613874,7 +613954,7 @@ sub_813E570: ; 813E570 bne @0813EDCE ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x18] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614120,7 +614200,7 @@ sub_813E570: ; 813E570 ldr r3, =0x000004cc adds r0, r3 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614171,7 +614251,7 @@ sub_813E570: ; 813E570 lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614201,7 +614281,7 @@ sub_813E570: ; 813E570 @0813F0AA: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x1C] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614230,7 +614310,7 @@ sub_813E570: ; 813E570 lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614247,7 +614327,7 @@ sub_813E570: ; 813E570 @0813F120: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x20] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614268,7 +614348,7 @@ sub_813E570: ; 813E570 @0813F154: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x24] - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0 bl battle_show_message_maybe @@ -614375,7 +614455,7 @@ sub_813F1B8: ; 813F1B8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085CC990 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0x1 @@ -614658,7 +614738,7 @@ sub_813F1B8: ; 813F1B8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085CC9A6 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0x1 @@ -614745,7 +614825,7 @@ sub_813F1B8: ; 813F1B8 bl pokemon_getattr ldr r0, =0x02022f58 add r1, sp, 0x4 - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r0, =0x0000ffff cmp r6, r0 bne @0813F5E8 @@ -614890,7 +614970,7 @@ sub_813F1B8: ; 813F1B8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085CC9EE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 adds r1, r4, 0 movs r2, 0x1 @@ -614924,7 +615004,7 @@ sub_813F1B8: ; 813F1B8 bl fanfare_play ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0xC] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615026,7 +615106,7 @@ sub_813F1B8: ; 813F1B8 bl sub_804F574 ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x10] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615057,7 +615137,7 @@ sub_813F1B8: ; 813F1B8 @0813F89E: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x14] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615084,7 +615164,7 @@ sub_813F1B8: ; 813F1B8 bne @0813F90C ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x18] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615165,7 +615245,7 @@ sub_813F1B8: ; 813F1B8 lsls r1, 3 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615203,7 +615283,7 @@ sub_813F1B8: ; 813F1B8 lsls r1, 3 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615311,7 +615391,7 @@ sub_813F1B8: ; 813F1B8 ldr r1, =0x000004cc adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615352,7 +615432,7 @@ sub_813F1B8: ; 813F1B8 lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615383,7 +615463,7 @@ sub_813F1B8: ; 813F1B8 @0813FBBE: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x1C] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615413,7 +615493,7 @@ sub_813F1B8: ; 813F1B8 lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615431,7 +615511,7 @@ sub_813F1B8: ; 813F1B8 @0813FC38: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x20] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -615453,7 +615533,7 @@ sub_813F1B8: ; 813F1B8 @0813FC70: ldr r0, =gUnknown_085CC270 ldr r0, [r0, 0x24] - bl sub_814E6F0 + bl get_battle_strings_ ldr r1, =0x02022e2c movs r0, 0 movs r2, 0x1 @@ -618948,12 +619028,12 @@ sub_8141A18: ; 8141A18 adds r0, r3, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r2, =0x02021fc4 mov r8, r2 ldr r1, =gUnknown_082A5BEF mov r0, r8 - bl ExpandTextCodes + bl ExpandStringRefs ldr r5, =0x0203ab8c ldrb r0, [r5] movs r1, 0 @@ -620850,11 +620930,11 @@ sub_81429F0: ; 81429F0 ldr r0, =0x02021cc4 movs r2, 0x2 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_082A5B12 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0 bl sub_81973FC @@ -620918,7 +620998,7 @@ sub_8142A88: ; 8142A88 adds r1, r4, 0 movs r2, 0x2 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0x22 ldrsh r0, [r6, r1] cmp r0, r4 @@ -620957,7 +621037,7 @@ sub_8142A88: ; 8142A88 ldr r4, =0x02021fc4 ldr r1, =gUnknown_082A5B12 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0 bl sub_81973FC @@ -620988,7 +621068,7 @@ sub_8142A88: ; 8142A88 ldr r5, =0x02021fc4 ldr r1, =gUnknown_082A5B4E adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 movs r1, 0 bl sub_81973FC @@ -626875,11 +626955,11 @@ sub_8145B54: ; 8145B54 ldr r0, =0x02021cc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DAB adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0x40 @@ -627109,7 +627189,7 @@ sub_8145CF4: ; 8145CF4 ldrh r0, [r1, 0x4] cmp r0, r6 beq @08145D3A - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -638781,7 +638861,7 @@ dp01_getattr_by_ch1_for_player_pokemon__: ; 814B88C bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -643652,7 +643732,7 @@ battle_pick_message: ; 814E0C4 adds r1, r2 ldr r2, =gUnknown_085CCBBC adds r1, r2 - bl gf_strcpy + bl CopyString b @0814E544 .align 2, 0 .pool @@ -643663,7 +643743,7 @@ battle_pick_message: ; 814E0C4 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString @0814E544: ldr r0, =0x02022f68 bl sub_814F950 @@ -643865,7 +643945,7 @@ battle_pick_message: ; 814E0C4 ldr r7, [r0] @0814E6D8: adds r0, r7, 0 - bl sub_814E6F0 + bl get_battle_strings_ @0814E6DE: pop {r3-r5} mov r8, r3 @@ -643878,16 +643958,16 @@ battle_pick_message: ; 814E0C4 .pool thumb_func_end battle_pick_message - thumb_func_start sub_814E6F0 -sub_814E6F0: ; 814E6F0 + thumb_func_start get_battle_strings_ +get_battle_strings_: ; 814E6F0 push {lr} ldr r1, =0x02022e2c - bl sub_814E764 + bl get_battle_strings pop {r1} bx r1 .align 2, 0 .pool - thumb_func_end sub_814E6F0 + thumb_func_end get_battle_strings_ thumb_func_start sub_814E700 sub_814E700: ; 814E700 @@ -643945,8 +644025,8 @@ sub_814E700: ; 814E700 bx r1 thumb_func_end sub_814E700 - thumb_func_start sub_814E764 -sub_814E764: ; 814E764 + thumb_func_start get_battle_strings +get_battle_strings: ; 814E764 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -644128,7 +644208,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644148,7 +644228,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644168,7 +644248,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644188,7 +644268,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644211,7 +644291,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644236,7 +644316,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644261,7 +644341,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644286,7 +644366,7 @@ sub_814E764: ; 814E764 mov r2, sp bl pokemon_getattr mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644362,7 +644442,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814EB9E: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644417,7 +644497,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814EC24: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644484,7 +644564,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814ECC2: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644551,7 +644631,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814ED5E: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644618,7 +644698,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814EDFA: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 bl @0814F5BE .align 2, 0 .pool @@ -644685,7 +644765,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814EE96: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 b @0814F5BE .align 2, 0 .pool @@ -644752,7 +644832,7 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814EF32: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 b @0814F5BE .align 2, 0 .pool @@ -644842,10 +644922,10 @@ sub_814E764: ; 814E764 ldr r0, =0x02024404 adds r1, r0 mov r0, sp - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085CC0AD mov r0, sp - bl gf_strcat + bl AppendString b @0814F5BE .align 2, 0 .pool @@ -644869,10 +644949,10 @@ sub_814E764: ; 814E764 ldr r0, =0x02024404 adds r1, r0 mov r0, sp - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085CC0AD mov r0, sp - bl gf_strcat + bl AppendString b @0814F5BE .align 2, 0 .pool @@ -645035,7 +645115,7 @@ sub_814E764: ; 814E764 ldr r0, [r0] ldrb r1, [r0, 0xD] mov r0, sp - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @0814F5BE .align 2, 0 .pool @@ -645292,13 +645372,13 @@ sub_814E764: ; 814E764 bl pokemon_getattr @0814F3B4: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 b @0814F5BE .align 2, 0 .pool @0814F3C4: ldr r0, =0x000008ab - bl flag_check + bl FlagGet lsls r0, 24 ldr r4, =gUnknown_085CC015 cmp r0, 0 @@ -645603,7 +645683,7 @@ sub_814E764: ; 814E764 pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_814E764 + thumb_func_end get_battle_strings thumb_func_start sub_814F648 sub_814F648: ; 814F648 @@ -645707,7 +645787,7 @@ sub_814F648: ; 814F648 adds r0, r6, 0 mov r1, r8 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r5, 0x3 ldrb r4, [r4, 0x1] adds r5, r0, r4 @@ -645760,14 +645840,14 @@ sub_814F648: ; 814F648 beq @0814F788 ldr r1, =gUnknown_085CBD8B adds r0, r6, 0 - bl gf_strcat + bl AppendString b @0814F790 .align 2, 0 .pool @0814F788: ldr r1, =gUnknown_085CBD85 adds r0, r6, 0 - bl gf_strcat + bl AppendString @0814F790: adds r0, r5, r7 ldrb r1, [r0, 0x2] @@ -645780,10 +645860,10 @@ sub_814F648: ; 814F648 bl pokemon_getattr @0814F7A4: mov r0, sp - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r6, 0 mov r1, sp - bl gf_strcat + bl AppendString b @0814F8DE .align 2, 0 .pool @@ -645835,7 +645915,7 @@ sub_814F648: ; 814F648 bl pokemon_getattr @0814F81A: adds r0, r6, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 b @0814F8DE .align 2, 0 .pool @@ -645859,7 +645939,7 @@ sub_814F648: ; 814F648 adds r1, r0 @0814F848: adds r0, r6, 0 - bl gf_strcat + bl AppendString adds r5, 0x2 b @0814F8E0 .align 2, 0 @@ -645897,7 +645977,7 @@ sub_814F648: ; 814F648 ldr r0, =0x02024404 adds r1, r0 adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085CC0AD b @0814F8BE .align 2, 0 @@ -645906,7 +645986,7 @@ sub_814F648: ; 814F648 ldr r1, =gUnknown_085CC0A0 @0814F8BE: adds r0, r6, 0 - bl gf_strcat + bl AppendString b @0814F8DE .align 2, 0 .pool @@ -645963,7 +646043,7 @@ sub_814F8F8: ; 814F8F8 bgt @0814F938 ldr r1, =gUnknown_085CCBB5 adds r0, r4, 0 - bl gf_strcpy + bl CopyString b @0814F944 .align 2, 0 .pool @@ -645972,7 +646052,7 @@ sub_814F8F8: ; 814F8F8 bgt @0814F944 ldr r1, =gUnknown_085CCBB9 adds r0, r4, 0 - bl gf_strcpy + bl CopyString @0814F944: pop {r4,r5} pop {r0} @@ -646047,14 +646127,14 @@ sub_814F950: ; 814F950 ldr r1, =gUnknown_085CBDBD @0814F9CA: adds r0, r3, 0 - bl gf_strcpy + bl CopyString b @0814F9E0 .align 2, 0 .pool @0814F9D8: ldr r1, =gUnknown_085CBDBF adds r0, r3, 0 - bl gf_strcpy + bl CopyString @0814F9E0: pop {r4,r5} pop {r0} @@ -653837,7 +653917,7 @@ sub_8153804: ; 8153804 push {lr} ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674C86 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x3 bl sub_81538C4 pop {r0} @@ -654205,7 +654285,7 @@ sub_8153A94: ; 8153A94 bne @08153ABE @08153AB8: ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs @08153ABE: movs r0, 0 pop {r4,r5} @@ -654254,7 +654334,7 @@ sub_8153AE8: ; 8153AE8 ldr r5, =0x000031f8 adds r1, r5 movs r2, 0x7 - bl gf_strncpy + bl CopyString_LimitN adds r0, r4, 0 bl sub_80E15E4 ldr r4, =0x02021dc4 @@ -654262,7 +654342,7 @@ sub_8153AE8: ; 8153AE8 adds r1, r5 adds r0, r4, 0 movs r2, 0x7 - bl gf_strncpy + bl CopyString_LimitN mov r0, r8 cmp r0, 0 bne @08153B54 @@ -654274,7 +654354,7 @@ sub_8153AE8: ; 8153AE8 @08153B54: mov r0, r9 adds r1, r4, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @08153B70 ldr r0, =0x02021fc4 @@ -654286,7 +654366,7 @@ sub_8153AE8: ; 8153AE8 ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674B42 @08153B74: - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r7, 0x6C] bl sub_80E162C @@ -654294,7 +654374,7 @@ sub_8153AE8: ; 8153AE8 bne @08153B9C ldr r0, =0x0000402d movs r1, 0x1 - bl var_set + bl VarSet b @08153BA0 .align 2, 0 .pool @@ -654325,7 +654405,7 @@ sub_8153BB0: ; 8153BB0 bl sub_80F9B30 ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674B6A - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -654395,7 +654475,7 @@ sub_8153C4C: ; 8153C4C bl sub_809D3E8 ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674B9E - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -654417,7 +654497,7 @@ sub_8153C70: ; 8153C70 bl sub_811EFC0 ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674BD4 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -654483,7 +654563,7 @@ sub_8153CC8: ; 8153CC8 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085E8264 movs r2, 0xB - bl gf_strncpy + bl CopyString_LimitN b @08153D22 .align 2, 0 .pool @@ -654491,7 +654571,7 @@ sub_8153CC8: ; 8153CC8 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085E8268 movs r2, 0xB - bl gf_strncpy + bl CopyString_LimitN @08153D22: ldr r0, =0x020244e9 ldrb r0, [r0] @@ -654499,7 +654579,7 @@ sub_8153CC8: ; 8153CC8 bne @08153D4C ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674C02 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x3 b @08153DB6 .align 2, 0 @@ -654547,7 +654627,7 @@ sub_8153CC8: ; 8153CC8 bl calc_player_party_count ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674BF0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 @08153DB6: str r0, [r6, 0x6C] @@ -654581,7 +654661,7 @@ sub_8153DD4: ; 8153DD4 bl sub_81652B4 ldr r0, =0x02021fc4 ldr r1, =gUnknown_08674C31 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -654599,7 +654679,7 @@ sub_8153E1C: ; 8153E1C bl sub_809D5F4 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085ECAD8 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -654780,7 +654860,7 @@ dp03_step_water_reflection: ; 8153ED4 sub_8153F98: ; 8153F98 push {lr} ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrh r0, [r0, 0xA] subs r0, 0x2 lsls r0, 16 @@ -654790,6 +654870,7 @@ sub_8153F98: ; 8153F98 thumb_func_end sub_8153F98 thumb_func_start npc_pal_op +; void npc_pal_op(struct npc_state *npcState, struct obj *obj) npc_pal_op: ; 8153FAC push {r4,r5,lr} sub sp, 0x8 @@ -654802,7 +654883,7 @@ npc_pal_op: ; 8153FAC movs r0, 0 strh r0, [r4, 0x32] ldrb r0, [r5, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrb r1, [r0, 0xC] movs r0, 0x80 ands r0, r1 @@ -654846,12 +654927,13 @@ npc_pal_op: ; 8153FAC thumb_func_end npc_pal_op thumb_func_start npc_pal_op_B +; void npc_pal_op_B(void *a1, u8 slot) npc_pal_op_B: ; 815401C push {r4,lr} lsls r1, 24 lsrs r4, r1, 24 ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r2, r0, 0 ldrh r1, [r2, 0x4] ldr r0, =0x000011ff @@ -654897,7 +654979,7 @@ npc_pal_op_A: ; 8154078 lsls r1, 24 lsrs r4, r1, 24 ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r2, r0, 0 ldrh r1, [r2, 0x4] ldr r0, =0x000011ff @@ -655272,7 +655354,7 @@ oei_shadow: ; 8154340 lsls r1, 2 adds r1, r2 ldrb r0, [r1, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r4, r0, 0 ldr r2, =gUnknown_085059F8 ldr r1, =gUnknown_085CDC3E @@ -655393,22 +655475,22 @@ oamc_shadow: ; 81543E4 cmp r0, 0 bne @08154490 ldrb r0, [r4, 0x1E] - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @08154490 ldrb r0, [r4, 0x1F] - bl is_tile_grass_maybe + bl is_tile_water_maybe lsls r0, 24 cmp r0, 0 bne @08154490 ldrb r0, [r4, 0x1E] - bl is_water_tile_2 + bl MetatileBehavior_IsReflective lsls r0, 24 cmp r0, 0 bne @08154490 ldrb r0, [r4, 0x1F] - bl is_water_tile_2 + bl MetatileBehavior_IsReflective lsls r0, 24 cmp r0, 0 beq @08154498 @@ -655914,7 +655996,7 @@ unc_grass_tall: ; 8154800 cmp r0, 0 bne @081548A0 adds r0, r4, 0 - bl is_tile_tallgrass + bl MetatileBehavior_IsLongGrass lsls r0, 24 cmp r0, 0 beq @081548A0 @@ -656149,7 +656231,7 @@ sub_8154A10: ; 8154A10 .pool @08154A5C: ldrb r0, [r1, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo mov r8, r0 mov r0, sp ldrb r1, [r0] @@ -656503,7 +656585,7 @@ sub_8154CEC: ; 8154CEC cmp r4, 0x40 beq @08154D76 ldrb r0, [r5, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo lsls r3, r4, 4 adds r3, r4 lsls r3, 2 @@ -656760,7 +656842,7 @@ sub_8154EFC: ; 8154EFC cmp r5, 0x40 beq @08154F92 ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r4, r0, 0 lsls r0, r5, 4 adds r0, r5 @@ -657064,7 +657146,7 @@ sub_8155158: ; 8155158 .pool @081551A0: ldrb r0, [r1, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo mov r1, sp ldrb r2, [r1] lsls r1, r2, 3 @@ -658070,7 +658152,7 @@ sub_8155900: ; 8155900 cmp r4, 0x40 beq @081559A4 ldrb r0, [r6, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo adds r5, r0, 0 lsls r0, r4, 4 adds r0, r4 @@ -658537,7 +658619,7 @@ sub_8155C88: ; 8155C88 lsls r0, 2 adds r0, r4 ldrb r0, [r0, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo mov r1, sp ldrb r2, [r1] lsls r1, r2, 3 @@ -659265,7 +659347,7 @@ sub_81561FC: ; 81561FC cmp r0, 0 beq @081562B4 ldrb r0, [r4, 0x5] - bl npc_get_type + bl GetFieldObjectGraphicsInfo ldrb r1, [r4, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -666713,7 +666795,7 @@ sub_8159A94: ; 8159A94 movs r1, 0 bl sub_8059CB4 ldr r0, =gUnknown_085CCA04 - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0x1 bl battle_show_message_maybe @@ -680433,7 +680515,7 @@ sub_816084C: ; 816084C adds r1, r0, 0 ldr r4, =0x02021fc4 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 bl sub_81D2BF4 pop {r4} @@ -680758,7 +680840,7 @@ sub_8160868: ; 8160868 ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085EF960 bl sub_816084C ldr r0, =0x0203bc34 @@ -681032,7 +681114,7 @@ sub_8160868: ; 8160868 ldr r6, =gMoveNames adds r1, r6 adds r0, r2, 0 - bl gf_strcpy + bl CopyString ldr r1, [r7] adds r0, r1, 0 adds r0, 0x44 @@ -681062,7 +681144,7 @@ sub_8160868: ; 8160868 muls r1, r0 adds r1, r6 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085EF979 bl sub_816084C ldr r1, [r7] @@ -681198,7 +681280,7 @@ render_previous_quest_text: ; 8160EE0 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF8C2 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x3 movs r1, 0x11 bl Window_FastFillPixels @@ -681296,7 +681378,7 @@ sub_8160F50: ; 8160F50 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF9E6 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 bl sub_81D2BF4 b @0816103E @@ -681314,11 +681396,11 @@ sub_8160F50: ; 8160F50 muls r1, r5 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF8DA adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 bl sub_81D2BF4 @0816103E: @@ -681357,7 +681439,7 @@ sub_8161074: ; 8161074 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EF8C2 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x3 movs r1, 0x11 bl Window_FastFillPixels @@ -681672,7 +681754,7 @@ sub_8161280: ; 8161280 bl pokemon_getattr ldr r0, =0x02021cc4 mov r1, sp - bl strcpy_limit_10_chars + bl CopyString_Limit10 ldr r2, [r4] movs r5, 0x88 lsls r5, 1 @@ -682130,7 +682212,7 @@ sub_81616C0: ; 81616C0 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -683238,7 +683320,7 @@ sub_8161F94: ; 8161F94 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, [r4] @@ -683320,7 +683402,7 @@ sub_8162054: ; 8162054 lsls r0, 30 lsrs r6, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 ldr r0, =0x020375e2 @@ -683394,7 +683476,7 @@ sub_81620F4: ; 81620F4 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x020375e2 @@ -683542,12 +683624,12 @@ sub_816222C: ; 816222C lsrs r0, 30 mov r10, r0 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x2C] ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @08162266 @@ -683761,7 +683843,7 @@ sub_81623F0: ; 81623F0 .pool @08162414: ldr r0, =0x000040ce - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -684138,19 +684220,19 @@ sub_8162614: ; 8162614 beq @08162750 @0816272E: ldr r0, =0x00004010 - bl var_set + bl VarSet b @08162788 .align 2, 0 .pool @08162744: ldr r0, =0x00004011 - bl var_set + bl VarSet b @08162788 .align 2, 0 .pool @08162750: ldr r0, =0x0000401e - bl var_set + bl VarSet b @08162788 .align 2, 0 .pool @@ -684170,14 +684252,14 @@ sub_8162614: ; 8162614 ldr r0, =0x00004011 @08162772: movs r1, 0x7 - bl var_set + bl VarSet b @08162788 .align 2, 0 .pool @08162780: ldr r0, =0x0000401e movs r1, 0x7 - bl var_set + bl VarSet @08162788: pop {r4-r6} pop {r0} @@ -685950,7 +686032,7 @@ sub_81635D4: ; 81635D4 bhi @0816364A ldr r4, =0x03005d90 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 ldr r4, [r4] lsrs r0, 22 @@ -686275,8 +686357,8 @@ sub_816379C: ; 816379C .pool thumb_func_end sub_816379C - thumb_func_start sub_81638AC -sub_81638AC: ; 81638AC + thumb_func_start ConvertBattleFrontierTrainerSpeechToString +ConvertBattleFrontierTrainerSpeechToString: ; 81638AC push {r4,r5,lr} adds r5, r0, 0 ldr r4, =0x02021fc4 @@ -686284,7 +686366,7 @@ sub_81638AC: ; 81638AC adds r1, r5, 0 movs r2, 0x3 movs r3, 0x2 - bl sub_811EC08 + bl ConvertEasyChatWordsToString movs r2, 0x1 negs r2, r2 movs r0, 0x1 @@ -686296,7 +686378,7 @@ sub_81638AC: ; 81638AC adds r1, r5, 0 movs r2, 0x2 movs r3, 0x3 - bl sub_811EC08 + bl ConvertEasyChatWordsToString ldrb r0, [r4] movs r1, 0x1 cmp r0, 0xFE @@ -686331,7 +686413,7 @@ sub_81638AC: ; 81638AC bx r0 .align 2, 0 .pool - thumb_func_end sub_81638AC + thumb_func_end ConvertBattleFrontierTrainerSpeechToString thumb_func_start sub_8163914 sub_8163914: ; 8163914 @@ -686370,7 +686452,7 @@ sub_8163914: ; 8163914 ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081639A8 .align 2, 0 .pool @@ -686386,7 +686468,7 @@ sub_8163914: ; 8163914 ldr r1, =0xfffef2b8 @08163986: adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081639A8 .align 2, 0 .pool @@ -686562,7 +686644,7 @@ sub_8163AC4: ; 8163AC4 lsls r0, 1 str r0, [r5] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 cmp r4, 0x1 @@ -686701,7 +686783,7 @@ sub_8163AC4: ; 8163AC4 ldr r0, =0x00010008 str r0, [r4] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0x1 @@ -686732,7 +686814,7 @@ sub_8163AC4: ; 8163AC4 ldr r0, =0x00020008 str r0, [r4] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0x1 @@ -686804,7 +686886,7 @@ sub_8163AC4: ; 8163AC4 ldr r0, =0x00080008 str r0, [r4] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0x1 @@ -686914,7 +686996,7 @@ sub_8163E90: ; 8163E90 lsls r5, 30 lsrs r5, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -686962,7 +687044,7 @@ sub_8163EE4: ; 8163EE4 lsls r0, 30 lsrs r6, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 lsrs r7, r0, 24 ldr r2, [r4] @@ -687005,7 +687087,7 @@ sub_8163EE4: ; 8163EE4 bl sub_80842F4 adds r0, r5, 0x4 ldr r1, [r4] - bl strcpy_limit_7_chars + bl CopyString_Limit7 adds r0, r6, 0 adds r1, r7, 0 bl sub_8164FCC @@ -687104,7 +687186,7 @@ sub_8164040: ; 8164040 lsls r4, 30 lsrs r4, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r5, [r5] lsls r4, 1 @@ -687143,7 +687225,7 @@ sub_8164040: ; 8164040 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -687401,7 +687483,7 @@ sub_81642A0: ; 81642A0 lsrs r0, 30 str r0, [sp, 0x14] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r1, [r5] ldr r3, [sp, 0x14] @@ -687703,7 +687785,7 @@ sub_81642A0: ; 81642A0 strb r0, [r1, 0x1] movs r0, 0xD8 lsls r0, 2 - bl flag_clear + bl FlagReset ldr r0, [r6] adds r0, r5 ldrh r0, [r0] @@ -687865,7 +687947,7 @@ sub_81642A0: ; 81642A0 adds r1, 0xC0 strb r0, [r1, 0x1] ldr r0, =0x00000361 - bl flag_clear + bl FlagReset ldr r0, [r6] adds r0, r5 ldrh r0, [r0] @@ -688012,7 +688094,7 @@ sub_81646BC: ; 81646BC adds r0, r2, r1 ldrb r1, [r0] adds r0, r7, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @081647CE: ldr r0, =0x02021cc4 movs r1, 0xD @@ -688021,7 +688103,7 @@ sub_81646BC: ; 81646BC adds r1, r2, 0 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 movs r1, 0xB mov r2, r10 @@ -688029,7 +688111,7 @@ sub_81646BC: ; 81646BC adds r1, r2, 0 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString pop {r3-r5} mov r8, r3 mov r9, r4 @@ -688175,7 +688257,7 @@ sub_8164828: ; 8164828 adds r0, r1, r5 ldrb r1, [r0] adds r0, r6, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, =0x02021dc4 ldr r2, =0x03005d90 ldr r1, [r2] @@ -688184,7 +688266,7 @@ sub_8164828: ; 8164828 ldrb r1, [r1] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021ec4 mov r3, r10 lsrs r1, r3, 16 @@ -688423,7 +688505,7 @@ sub_8164B74: ; 8164B74 lsls r0, 30 lsrs r7, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, [r4] @@ -688697,7 +688779,7 @@ sub_8164E04: ; 8164E04 push {r4-r6,lr} sub sp, 0x20 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 bne @08164E9A @@ -688706,13 +688788,13 @@ sub_8164E04: ; 8164E04 mov r0, sp bl sub_8162E20 mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes ldr r4, =0x03005d90 ldr r0, [r4] ldr r1, =0x00000bd8 adds r0, r1 mov r1, sp - bl gf_strcpy + bl CopyString ldr r0, [r4] ldr r2, =0x00000beb adds r0, r2 @@ -688978,7 +689060,7 @@ sub_816502C: ; 816502C lsrs r0, 30 adds r5, r0, 0 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 adds r4, r0, 0 @@ -689154,7 +689236,7 @@ sub_816515C: ; 816515C bl sub_80842F4 adds r0, r7, 0x4 ldr r1, [r5] - bl strcpy_limit_7_chars + bl CopyString_Limit7 movs r0, 0x1 strh r0, [r7, 0x2] movs r6, 0x7 @@ -689372,7 +689454,7 @@ sub_8165360: ; 8165360 ldr r0, [r0] ldr r1, =0x00000bfc adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString pop {r0} bx r0 .align 2, 0 @@ -689399,7 +689481,7 @@ sub_816537C: ; 816537C ldr r0, [r0] ldr r1, =0x00000c14 adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081653C0 .align 2, 0 .pool @@ -689408,7 +689490,7 @@ sub_816537C: ; 816537C ldr r0, [r0] ldr r1, =0x00000c08 adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @081653C0: pop {r0} bx r0 @@ -689429,14 +689511,14 @@ start_menu_compose_normal: ; 81653CC bl start_menu_append_item @081653E0: movs r0, 0x77 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne @081653F8 bl start_menu_append_item movs r0, 0x77 - bl flag_clear + bl FlagReset @081653F8: pop {r0} bx r0 @@ -689835,7 +689917,7 @@ sub_8165404: ; 8165404 stm r0!, {r2,r3} adds r1, r4, 0x4 add r0, sp, 0x10 - bl gf_strcpy + bl CopyString adds r4, 0xE4 ldrb r0, [r4] cmp r0, 0x1 @@ -689851,7 +689933,7 @@ sub_8165404: ; 8165404 strb r0, [r1] add r0, sp, 0x38 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @0816579C .align 2, 0 .pool @@ -690619,7 +690701,7 @@ sub_8165D08: ; 8165D08 sub_8165D40: ; 8165D40 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x2 @@ -690650,7 +690732,7 @@ sub_8165D40: ; 8165D40 sub_8165D78: ; 8165D78 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x4 @@ -692455,14 +692537,14 @@ sub_8166D44: ; 8166D44 add r2, sp, 0xC bl pokemon_getattr add r0, sp, 0xC - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 ldr r1, =gUnknown_085EC7A0 add r0, sp, 0xC - bl gf_strcat + bl AppendString ldr r4, =0x02021fc4 adds r0, r4, 0 add r1, sp, 0xC - bl gf_strcpy + bl CopyString movs r0, 0x2 movs r1, 0x11 bl Window_FastFillPixels @@ -692769,17 +692851,17 @@ sub_8166FD4: ; 8166FD4 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085EC7E1 adds r0, r4, 0 - bl gf_strcat + bl AppendString b @08167018 .align 2, 0 .pool @08167010: ldr r1, =gUnknown_085EC7EF adds r0, r4, 0 - bl gf_strcpy + bl CopyString @08167018: pop {r4} pop {r0} @@ -694200,12 +694282,12 @@ sub_8167BA0: ; 8167BA0 ldr r6, =0x0000804a adds r0, r6 ldr r1, =gUnknown_085EBF8D - bl gf_strcpy + bl CopyString ldr r1, =gNatureNamePointers lsls r4, 2 adds r4, r1 ldr r1, [r4] - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085DFCC9 str r0, [sp] str r5, [sp, 0x4] @@ -696415,7 +696497,7 @@ sub_8168C14: ; 8168C14 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -698925,7 +699007,7 @@ dp01t_12_1_battle_menu: ; 816A470 movs r1, 0 bl sub_8059CB4 ldr r0, =gUnknown_085CCA15 - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0x1 bl battle_show_message_maybe @@ -701159,14 +701241,14 @@ sub_816B730: ; 816B730 ldr r0, =0x00002bf2 adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r5, 0 movs r1, 0 bl sub_81DB554 ldr r5, =0x02021fc4 ldr r1, =gUnknown_085EAC63 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_816B7DC adds r0, r4, 0 adds r1, r5, 0 @@ -701898,7 +701980,7 @@ sub_816BD04: ; 816BD04 ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8CF7 - bl gf_strcpy + bl CopyString ldr r0, [r5] lsls r2, r6, 3 adds r1, r0, r2 @@ -702041,11 +702123,11 @@ fish4_goto_x5_or_x6: ; 816BE44 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x7 adds r1, r4, 0 movs r2, 0x68 @@ -702553,7 +702635,7 @@ sub_816C2C0: ; 816C2C0 ldr r4, =0x02021fc4 adds r0, r4, 0 adds r1, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -703016,11 +703098,11 @@ sub_816C6BC: ; 816C6BC lsls r3, 24 lsrs r3, 24 ldr r0, =0x02021cc4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0x30 @@ -703296,7 +703378,7 @@ sub_816C8FC: ; 816C8FC ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x0000fffd bl sub_816C228 bl sub_816C2C0 @@ -703375,7 +703457,7 @@ sub_816C9B8: ; 816C9B8 ldrsh r1, [r7, r2] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x0000fff8 bl sub_816C228 bl sub_816C2C0 @@ -718196,11 +718278,11 @@ sub_81743EC: ; 81743EC ldrsh r1, [r4, r5] movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E8C00 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r1, 0x8 ldrsh r0, [r4, r1] cmp r0, 0 @@ -718789,7 +718871,7 @@ sub_8174A88: ; 8174A88 beq @08174B30 ldr r1, =gUnknown_085E8C36 add r0, sp, 0xC - bl gf_strcpy + bl CopyString adds r6, r0, 0 ldrh r0, [r7, 0x8] lsls r0, 23 @@ -718915,7 +718997,7 @@ sub_8174A88: ; 8174A88 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString adds r6, r0, 0 ldrh r1, [r7, 0x8] adds r0, r4, 0 @@ -718962,13 +719044,13 @@ sub_8174A88: ; 8174A88 bl box_print ldr r1, =gUnknown_085E8C3B add r0, sp, 0xC - bl gf_strcpy + bl CopyString adds r6, r0, 0 ldrb r1, [r7, 0x9] lsrs r1, 1 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString str r5, [sp] str r4, [sp, 0x4] add r0, sp, 0xC @@ -718980,12 +719062,12 @@ sub_8174A88: ; 8174A88 bl box_print ldr r1, =gUnknown_085E8C4D add r0, sp, 0xC - bl gf_strcpy + bl CopyString adds r6, r0, 0 ldrh r1, [r7] movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString str r5, [sp] str r4, [sp, 0x4] add r0, sp, 0xC @@ -723715,7 +723797,7 @@ sub_8177388: ; 8177388 mov r5, r8 push {r5-r7} ldr r0, =0x00004023 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 bl sub_8133EDC @@ -723959,7 +724041,7 @@ sub_8177558: ; 8177558 bl sub_8177814 ldr r0, =0x00004045 movs r1, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -724198,7 +724280,7 @@ sub_81775E0: ; 81775E0 bl pokemon_getattr_encrypted @08177768: ldr r0, =0x02021cc4 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 @0817776E: add sp, 0x8 pop {r3-r5} @@ -724287,10 +724369,10 @@ sub_8177814: ; 8177814 lsls r1, 16 lsrs r1, 16 ldr r0, =0x0000404b - bl var_set + bl VarSet ldr r0, =0x0000404c adds r1, r4, 0 - bl var_set + bl VarSet pop {r4} pop {r0} bx r0 @@ -724302,12 +724384,12 @@ sub_8177814: ; 8177814 sub_817783C: ; 817783C push {r4,lr} ldr r0, =0x0000404b - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 ldr r0, =0x0000404c - bl var_get + bl VarGet lsls r0, 16 orrs r0, r4 pop {r4} @@ -724589,7 +724671,7 @@ pokedex_diploma_something: ; 8177AD4 bl lcd_io_set ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EE855 - bl gf_strcpy + bl CopyString b @08177B0C .align 2, 0 .pool @@ -724599,12 +724681,12 @@ pokedex_diploma_something: ; 8177AD4 bl lcd_io_set ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EE84F - bl gf_strcpy + bl CopyString @08177B0C: ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE85E adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 movs r2, 0x1 @@ -725290,7 +725372,7 @@ sub_8178110: ; 8178110 lsls r4, 5 adds r0, r4 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo adds r6, r0, 0 ldr r0, =0x02021cc4 ldr r1, [r5] @@ -725298,14 +725380,14 @@ sub_8178110: ; 8178110 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 adds r1, r6, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9263 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -725331,7 +725413,7 @@ sub_8178174: ; 8178174 lsls r1, 5 adds r0, r1 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo adds r4, r0, 0 ldr r2, =gUnknown_085E9225 movs r7, 0x1 @@ -725376,16 +725458,16 @@ sub_8178174: ; 8178174 adds r1, r5, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9233 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs str r7, [sp] str r6, [sp, 0x4] str r6, [sp, 0x8] @@ -725425,7 +725507,7 @@ itemid_copy_name: ; 8178250 lsls r1, 5 adds r0, r1 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo adds r6, r0, 0 ldr r2, =gUnknown_085E922C movs r5, 0x11 @@ -725485,7 +725567,7 @@ sub_81782D0: ; 81782D0 lsls r1, 5 adds r0, r1 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo ldr r2, [r0, 0xC] movs r0, 0x1 str r0, [sp] @@ -725513,7 +725595,7 @@ sub_8178304: ; 8178304 lsls r1, 5 adds r0, r1 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo ldr r2, [r0, 0x10] movs r0, 0x11 str r0, [sp] @@ -725628,7 +725710,7 @@ sub_8178404: ; 8178404 lsls r1, 5 adds r0, r1 ldrb r0, [r0] - bl sub_80E167C + bl GetRomBerryInfo adds r5, r0, 0 ldrb r0, [r5, 0x15] cmp r0, 0 @@ -726404,7 +726486,7 @@ sub_8178A40: ; 8178A40 cmp r4, 0 bne @08178A54 ldr r1, =gUnknown_085EE80A - bl gf_strcpy + bl CopyString movs r5, 0 @08178A54: cmp r4, 0x2 @@ -726415,7 +726497,7 @@ sub_8178A40: ; 8178A40 bne @08178A66 ldr r1, =gUnknown_085EE827 adds r0, r6, 0 - bl gf_strcpy + bl CopyString @08178A66: adds r0, r5, 0 pop {r4-r6} @@ -727689,7 +727771,7 @@ sub_81795AC: ; 81795AC sub_81795E8: ; 81795E8 push {lr} ldr r0, =0x000008af - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08179634 @@ -727753,7 +727835,7 @@ sub_817963C: ; 817963C movs r0, 0x14 bl audio_play ldr r0, =0x000008af - bl flag_set + bl FlagSet bl script_env_2_disable pop {r0} bx r0 @@ -727918,7 +728000,7 @@ sub_81797DC: ; 81797DC push {lr} movs r0, 0x8B lsls r0, 4 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0 @@ -728013,7 +728095,7 @@ sub_8179860: ; 8179860 bl audio_play movs r0, 0x8B lsls r0, 4 - bl flag_set + bl FlagSet bl script_env_2_disable pop {r0} bx r0 @@ -728025,7 +728107,7 @@ sub_8179860: ; 8179860 sub_81798D0: ; 81798D0 push {lr} ldr r0, =0x000008b2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08179910 @@ -728111,7 +728193,7 @@ sub_8179944: ; 8179944 movs r0, 0x14 bl audio_play ldr r0, =0x000008b2 - bl flag_set + bl FlagSet bl script_env_2_disable pop {r0} bx r0 @@ -728176,21 +728258,21 @@ sub_8179A04: ; 8179A04 b @08179B5A @08179A1A: ldr r0, =0x000008b1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08179A28 b @08179B5A @08179A28: movs r0, 0x2 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08179A36 b @08179B5A @08179A36: movs r0, 0x3 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -728229,7 +728311,7 @@ sub_8179A04: ; 8179A04 cmp r5, 0xF bhi @08179AB0 adds r0, r6, 0 - bl var_get + bl VarGet lsls r0, 16 movs r1, 0x80 lsls r1, 9 @@ -728237,7 +728319,7 @@ sub_8179A04: ; 8179A04 orrs r1, r0 lsrs r1, 16 adds r0, r6, 0 - bl var_set + bl VarSet b @08179AF0 .align 2, 0 .pool @@ -728245,7 +728327,7 @@ sub_8179A04: ; 8179A04 cmp r5, 0x1F bhi @08179AD2 mov r0, r9 - bl var_get + bl VarGet lsls r0, 16 adds r2, r5, 0 subs r2, 0x10 @@ -728255,12 +728337,12 @@ sub_8179A04: ; 8179A04 orrs r1, r0 lsrs r1, 16 mov r0, r9 - bl var_set + bl VarSet b @08179AF0 @08179AD2: ldr r4, =0x0000403d adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 adds r2, r5, 0 subs r2, 0x20 @@ -728270,23 +728352,23 @@ sub_8179A04: ; 8179A04 orrs r1, r0 lsrs r1, 16 adds r0, r4, 0 - bl var_set + bl VarSet @08179AF0: ldr r0, =0x0000403b - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x0000ffff cmp r4, r0 bne @08179B5A ldr r0, =0x0000403c - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, r4 bne @08179B5A ldr r0, =0x0000403d - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0xF @@ -728307,9 +728389,9 @@ sub_8179A04: ; 8179A04 cmp r5, 0x23 bls @08179A68 movs r0, 0x3 - bl flag_set + bl FlagSet movs r0, 0x2 - bl flag_clear + bl FlagReset @08179B5A: movs r0, 0 @08179B5C: @@ -729072,7 +729154,7 @@ sub_817A1C4: ; 817A1C4 bne @0817A248 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E937F - bl ExpandTextCodes + bl ExpandStringRefs b @0817A268 .align 2, 0 .pool @@ -729081,14 +729163,14 @@ sub_817A1C4: ; 817A1C4 ble @0817A260 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9390 - bl ExpandTextCodes + bl ExpandStringRefs b @0817A268 .align 2, 0 .pool @0817A260: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E93A9 - bl ExpandTextCodes + bl ExpandStringRefs @0817A268: ldr r2, =0x03003014 ldrb r0, [r2] @@ -750805,7 +750887,7 @@ sub_8184E58: ; 8184E58 str r0, [r1] ldr r4, =0x0203c7ae ldr r0, =0x000040cf - bl var_get + bl VarGet strb r0, [r4] ldr r4, =0x0203c7af bl sub_81A513C @@ -750868,12 +750950,12 @@ sub_8184E58: ; 8184E58 mov r0, r8 adds r1, r3, r0 mov r0, sp - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, r7 mov r1, sp - bl gf_strcpy + bl CopyString adds r5, 0x1 b @08184F56 .align 2, 0 @@ -752418,7 +752500,7 @@ sub_8185B60: ; 8185B60 cmp r3, 0 beq @08185C2A ldr r0, [sp] - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @08185C2A: ldr r0, [sp] adds r0, 0x1C @@ -753439,7 +753521,7 @@ sub_8186468: ; 8186468 strb r0, [r3, 0x7] ldrb r1, [r5] adds r0, r3, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r4,r5} pop {r0} bx r0 @@ -755400,7 +755482,7 @@ sub_8187298: ; 8187298 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -761476,7 +761558,7 @@ sub_818A660: ; 818A660 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -767282,7 +767364,7 @@ sub_818D9C0: ; 818D9C0 adds r0, r4 ldrh r1, [r0] adds r0, r5, 0 - bl var_set + bl VarSet bl sub_818D9AC lsls r0, 24 lsrs r0, 24 @@ -767298,7 +767380,7 @@ sub_818D9C0: ; 818D9C0 lsls r1, 1 adds r1, r2 ldrh r1, [r1] - bl var_set + bl VarSet ldr r1, =0x020375f0 movs r0, 0x1 b @0818DA24 @@ -767604,7 +767686,7 @@ sub_818DC2C: ; 818DC2C bl sub_818DC1C adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -767633,11 +767715,11 @@ sub_818DC60: ; 818DC60 ldr r0, =0x00003b5c adds r1, r0 adds r0, r4, 0 - bl strcpy_limit_7_chars + bl CopyString_Limit7 ldr r0, [r5] ldrb r1, [r0, 0x12] adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted movs r0, 0x1 @0818DC9C: pop {r4,r5} @@ -767656,7 +767738,7 @@ sub_818DCAC: ; 818DCAC bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -767691,7 +767773,7 @@ sub_818DCF4: ; 818DCF4 bl memset adds r0, r4, 0 adds r1, r5, 0 - bl strcpy_limit_7_chars + bl CopyString_Limit7 pop {r4,r5} pop {r0} bx r0 @@ -767714,7 +767796,7 @@ sub_818DD14: ; 818DD14 ldr r0, [r5] ldrb r1, [r0, 0x12] adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r4,r5} pop {r0} bx r0 @@ -768221,7 +768303,7 @@ sub_818E13C: ; 818E13C bne @0818E174 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085EEB7E - bl strcpy_limit_7_chars + bl CopyString_Limit7 movs r7, 0 b @0818E1DC .align 2, 0 @@ -768231,12 +768313,12 @@ sub_818E13C: ; 818E13C ldr r0, =0x00003b70 adds r1, r0 adds r0, r4, 0 - bl strcpy_limit_7_chars + bl CopyString_Limit7 ldr r0, [r5] adds r0, 0x2D ldrb r1, [r0] adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, [r5] adds r0, 0x18 bl sub_818E258 @@ -768365,7 +768447,7 @@ sub_818E274: ; 818E274 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -768441,15 +768523,15 @@ sub_818E308: ; 818E308 ldr r6, =0x02021cc4 ldrh r1, [r0, 0x14] adds r0, r6, 0 - bl sub_811EBBC + bl CopyEasyChatWord ldr r4, =0x02021dc4 ldr r0, [r5] ldrh r1, [r0, 0x16] adds r0, r4, 0 - bl sub_811EBBC + bl CopyEasyChatWord adds r0, r6, 0 adds r1, r4, 0 - bl sub_8008C44 + bl CompareString movs r1, 0 cmp r0, 0 bne @0818E33C @@ -768663,7 +768745,7 @@ sub_818E4A4: ; 818E4A4 ldr r0, [r4] adds r0, 0x18 ldr r1, [r6] - bl strcpy_limit_7_chars + bl CopyString_Limit7 ldr r0, [r4] ldr r1, =gUnknown_82E9531 ldrb r1, [r1] @@ -768704,7 +768786,7 @@ sub_818E538: ; 818E538 str r1, [r2] ldr r0, =0x02021ec4 ldrh r1, [r1, 0x14] - bl sub_811EBBC + bl CopyEasyChatWord pop {r0} bx r0 .align 2, 0 @@ -769004,7 +769086,7 @@ sub_818E794: ; 818E794 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_0860B310 ldr r0, [r4] ldrb r0, [r0, 0xD] @@ -769012,7 +769094,7 @@ sub_818E794: ; 818E794 adds r0, r1 ldr r1, [r0] adds r0, r5, 0 - bl strcpy_limit_10_chars + bl CopyString_Limit10 pop {r4,r5} pop {r0} bx r0 @@ -769038,7 +769120,7 @@ sub_818E7E0: ; 818E7E0 adds r0, r2 ldr r1, [r0] adds r0, r3, 0 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -769057,7 +769139,7 @@ sub_818E81C: ; 818E81C str r2, [r3] ldr r2, =0x00003b5c adds r1, r2 - bl gf_strcpy + bl CopyString pop {r4} pop {r0} bx r0 @@ -769088,7 +769170,7 @@ sub_818E868: ; 818E868 lsrs r1, 22 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -769273,7 +769355,7 @@ sub_818E9CC: ; 818E9CC lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r7, r0, 16 ldr r0, [r4] @@ -769351,7 +769433,7 @@ sub_818EA84: ; 818EA84 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, =0x020375e2 @@ -769459,7 +769541,7 @@ sub_818EA84: ; 818EA84 .pool @0818EBB4: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -769513,7 +769595,7 @@ sub_818EA84: ; 818EA84 .pool @0818EC40: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 @@ -769620,7 +769702,7 @@ sub_818ED28: ; 818ED28 lsls r0, 30 lsrs r4, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x020375e2 @@ -769759,7 +769841,7 @@ sub_818ED28: ; 818ED28 .pool @0818EEA0: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0x1 @@ -769830,7 +769912,7 @@ sub_818ED28: ; 818ED28 .pool @0818EF50: ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0x1 @@ -769957,7 +770039,7 @@ sub_818F02C: ; 818F02C adds r1, r3 strb r0, [r1] ldr r0, =0x000040ce - bl var_get + bl VarGet ldr r1, [r4] adds r0, 0x1 ldr r5, =0x00000d0b @@ -771095,7 +771177,7 @@ sub_818F9B0: ; 818F9B0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -771115,7 +771197,7 @@ sub_818F9E0: ; 818F9E0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r0, =0x02021dc4 ldr r1, =0x02038bca ldrh r1, [r1] @@ -772300,7 +772382,7 @@ sub_81902F8: ; 81902F8 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -772327,7 +772409,7 @@ sub_819033C: ; 819033C lsls r4, 30 lsrs r4, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 ldr r1, [r5] lsls r4, 1 @@ -776631,7 +776713,7 @@ sub_81924E0: ; 81924E0 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcat + bl AppendString b @08192836 .align 2, 0 .pool @@ -776645,7 +776727,7 @@ sub_81924E0: ; 81924E0 bl sub_8195938 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString b @08192836 .align 2, 0 .pool @@ -776656,7 +776738,7 @@ sub_81924E0: ; 81924E0 bl sub_8195898 adds r0, r5, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString @08192836: add r0, sp, 0xC ldrb r0, [r0, 0x5] @@ -777571,7 +777653,7 @@ sub_8192F08: ; 8192F08 bne @08192F9C ldr r0, =0x02021cc4 adds r1, r2, 0 - bl gf_strcpy + bl CopyString b @08192FB8 .align 2, 0 .pool @@ -777685,7 +777767,7 @@ sub_8192F08: ; 8192F08 ldr r0, =gMoveNames adds r1, r0 ldr r0, =0x02021dc4 - bl gf_strcpy + bl CopyString mov r2, r10 ldr r1, [r2] ldr r5, [sp, 0xC] @@ -777721,7 +777803,7 @@ sub_8192F08: ; 8192F08 bne @081930E0 ldr r0, =0x02021cc4 adds r1, r3, 0 - bl gf_strcpy + bl CopyString b @08193100 .align 2, 0 .pool @@ -778468,7 +778550,7 @@ sub_819314C: ; 819314C adds r0, r7, r0 ldr r1, [r0] adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs str r4, [sp, 0xC] add r0, sp, 0xC add r1, sp, 0x6C @@ -778498,7 +778580,7 @@ sub_819314C: ; 819314C ldr r0, =0x02021cc4 ldr r1, =0x03005d90 ldr r1, [r1] - bl gf_strcpy + bl CopyString b @0819377E .align 2, 0 .pool @@ -778555,7 +778637,7 @@ sub_819314C: ; 819314C ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @08193802 .align 2, 0 .pool @@ -782557,7 +782639,7 @@ sub_8195980: ; 8195980 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r7, r0, 16 ldr r0, [r4] @@ -782635,7 +782717,7 @@ sub_8195A38: ; 8195A38 lsls r0, 30 lsrs r7, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, =0x020375e2 @@ -782713,7 +782795,7 @@ sub_8195AE4: ; 8195AE4 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x020375e2 @@ -782800,7 +782882,7 @@ sub_8195AE4: ; 8195AE4 sub_8195BB0: ; 8195BB0 push {r4,lr} ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r1, =0x03005d90 ldr r2, [r1] @@ -782887,7 +782969,7 @@ sub_8195C50: ; 8195C50 ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @08195C6C: pop {r0} bx r0 @@ -782906,7 +782988,7 @@ sub_8195C7C: ; 8195C7C lsls r0, 30 lsrs r7, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 ldr r4, [r4] lsls r1, r7, 1 @@ -782957,7 +783039,7 @@ sub_8195CE4: ; 8195CE4 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -782977,7 +783059,7 @@ sub_8195CE4: ; 8195CE4 sub_8195D28: ; 8195D28 push {r4,r5,lr} ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r4, =0x03005d90 ldr r2, [r4] @@ -783152,7 +783234,7 @@ sub_8195E8C: ; 8195E8C cmp r0, 0 bne @08195EAE adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x1F @@ -783198,13 +783280,13 @@ sub_8195ED8: ; 8195ED8 bne @08195F0E movs r0, 0xF9 lsls r0, 2 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne @08195F0E movs r0, 0xDC - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08195F30 @@ -783214,13 +783296,13 @@ sub_8195ED8: ; 8195ED8 cmp r0, 0x38 bne @08195F38 movs r0, 0xCF - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne @08195F38 movs r0, 0x8B - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08195F38 @@ -783320,7 +783402,7 @@ sub_8195FCC: ; 8195FCC adds r0, r4, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08195FE8 @@ -783347,7 +783429,7 @@ sub_8195FF8: ; 8195FF8 adds r0, r4, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08196022 @@ -783375,7 +783457,7 @@ sub_8195FF8: ; 8195FF8 sub_8196034: ; 8196034 push {lr} ldr r0, =0x0000012f - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @08196078 @@ -784597,7 +784679,7 @@ sub_81969E0: ; 81969E0 bl sub_81969FC ldr r1, [r4] adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs pop {r4,r5} pop {r0} bx r0 @@ -784669,7 +784751,7 @@ sub_8196A44: ; 8196A44 adds r0, r1, r0 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @08196A90 .align 2, 0 .pool @@ -784684,7 +784766,7 @@ sub_8196A44: ; 8196A44 ldr r0, =gTrainers + 0x4 ; name offset adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString @08196A90: pop {r4-r6} pop {r0} @@ -784931,7 +785013,7 @@ sub_8196B98: ; 8196B98 ldr r0, =gSpeciesNames adds r1, r0 mov r0, r8 - bl gf_strcpy + bl CopyString b @08196C62 .align 2, 0 .pool @@ -785006,7 +785088,7 @@ sub_8196C70: ; 8196C70 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r7, 0 - bl gf_strcpy + bl CopyString pop {r4-r7} pop {r0} bx r0 @@ -785024,7 +785106,7 @@ sub_8196CF4: ; 8196CF4 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -785055,7 +785137,7 @@ sub_8196D14: ; 8196D14 lsrs r3, 24 adds r0, r5, 0 movs r2, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString pop {r4-r6} pop {r0} bx r0 @@ -785078,7 +785160,7 @@ sub_8196D4C: ; 8196D4C cmp r4, 0x7 bhi @08196D6C ldrh r0, [r5] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @08196D58 @@ -785535,14 +785617,14 @@ sub_8197080: ; 8197080 adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =0x02021dc4 mov r9, r1 mov r0, r9 adds r1, r6, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 bl sub_8196F90 adds r4, r0, 0 @@ -785550,14 +785632,14 @@ sub_8197080: ; 8197080 lsrs r4, 24 ldr r1, =gUnknown_082A5C9C adds r0, r7, 0 - bl gf_strcpy + bl CopyString adds r5, r0, 0 movs r6, 0xFB strb r6, [r5] adds r5, 0x1 ldr r1, =gUnknown_082A5D2C adds r0, r5, 0 - bl gf_strcpy + bl CopyString adds r5, r0, 0 strb r6, [r5] adds r5, 0x1 @@ -785566,10 +785648,10 @@ sub_8197080: ; 8197080 adds r4, r0 ldr r1, [r4] adds r0, r5, 0 - bl gf_strcpy + bl CopyString mov r0, r8 adds r1, r7, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r5, r0, 0 bl sub_809D42C cmp r0, 0 @@ -785588,15 +785670,15 @@ sub_8197080: ; 8197080 adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r0, r9 adds r1, r6, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_082A633D adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs @08197156: adds r0, r7, 0 bl free @@ -791767,7 +791849,7 @@ sub_819A024: ; 819A024 bne @0819A042 @0819A04C: adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs lsls r3, r4, 24 lsrs r3, 24 lsls r0, r5, 24 @@ -792213,7 +792295,7 @@ sub_819A344: ; 819A344 ldr r0, =0x03005d90 ldr r1, [r0] adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @0819A43C .align 2, 0 .pool @@ -792234,7 +792316,7 @@ sub_819A344: ; 819A344 adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 movs r0, 0xFF strb r0, [r5] @@ -792246,7 +792328,7 @@ sub_819A344: ; 819A344 adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r5, r0, 0 movs r0, 0xF0 strb r0, [r5] @@ -792256,7 +792338,7 @@ sub_819A344: ; 819A344 adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString b @0819A43C .align 2, 0 .pool @@ -792275,7 +792357,7 @@ sub_819A344: ; 819A344 @0819A41A: lsls r0, r4, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @0819A42A @@ -794189,7 +794271,7 @@ sub_819B484: ; 819B484 add r0, sp, 0xC strb r6, [r0] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 adds r6, r0, 0 @@ -794860,7 +794942,7 @@ sub_819B9E8: ; 819B9E8 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -800897,7 +800979,7 @@ sub_819EB4C: ; 819EB4C ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -801255,7 +801337,7 @@ sub_819EE08: ; 819EE08 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -801335,7 +801417,7 @@ sub_819EEF0: ; 819EEF0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -802623,14 +802705,14 @@ sub_819F99C: ; 819F99C lsls r0, 1 adds r1, r0 mov r0, r8 - bl strcpy_limit_7_chars + bl CopyString_Limit7 ldr r0, [r7] adds r0, r4 ldr r1, =0x0000011b adds r0, r1 ldrb r1, [r0] mov r0, r8 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted ldr r0, =0x02021dc4 ldr r1, [r7] adds r1, r4 @@ -802638,7 +802720,7 @@ sub_819F99C: ; 819F99C ldrb r1, [r1] movs r2, 0x1 adds r3, r6, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_08611330 ldr r0, [r7] adds r0, r4 @@ -802649,7 +802731,7 @@ sub_819F99C: ; 819F99C adds r0, r1 ldr r1, [r0] ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs pop {r3} mov r8, r3 pop {r4-r7} @@ -805034,7 +805116,7 @@ sub_81A0A70: ; 81A0A70 b @081A0C8E @081A0C7A: ldr r0, =0x02021fc4 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 bl get_map_name ldr r0, =sub_81A0A34 @@ -805630,7 +805712,7 @@ sub_81A0FFC: ; 81A0FFC bl sub_81DB5E8 adds r0, r5, 0 mov r1, sp - bl gf_strcpy + bl CopyString b @081A11E6 .align 2, 0 .pool @@ -805658,11 +805740,11 @@ sub_81A0FFC: ; 81A0FFC movs r1, 0x82 lsls r1, 1 adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString ldr r1, =0x02021fc4 @081A1174: adds r0, r5, 0 - bl gf_strcpy + bl CopyString b @081A11E6 .align 2, 0 .pool @@ -805715,7 +805797,7 @@ sub_81A0FFC: ; 81A0FFC ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl gf_strcpy + bl CopyString @081A11E6: add sp, 0x10 pop {r4-r6} @@ -806115,7 +806197,7 @@ sub_81A1438: ; 81A1438 movs r2, 0x8A lsls r2, 1 adds r0, r1, r2 - bl gf_strcpy + bl CopyString ldr r1, [r5] ldr r0, =gUnknown_82E9531 ldrb r0, [r0] @@ -806169,7 +806251,7 @@ sub_81A150C: ; 81A150C adds r0, r1, r0 ldrb r1, [r0] ldr r0, =0x00004010 - bl var_set + bl VarSet b @081A1594 .align 2, 0 .pool @@ -806196,7 +806278,7 @@ sub_81A150C: ; 81A150C adds r0, r1, r0 ldrb r1, [r0] ldr r0, =0x00004010 - bl var_set + bl VarSet @081A1594: pop {r0} bx r0 @@ -806239,7 +806321,7 @@ sub_81A15A4: ; 81A15A4 adds r0, r1, r0 ldrb r1, [r0] ldr r0, =0x00004010 - bl var_set + bl VarSet b @081A1628 .align 2, 0 .pool @@ -806266,7 +806348,7 @@ sub_81A15A4: ; 81A15A4 adds r0, r1, r0 ldrb r1, [r0] ldr r0, =0x00004010 - bl var_set + bl VarSet @081A1628: pop {r0} bx r0 @@ -806477,7 +806559,7 @@ sub_81A17A0: ; 81A17A0 movs r0, 0x80 lsls r0, 7 movs r1, 0xFF - bl var_set + bl VarSet ldr r0, =0x03005d90 ldr r0, [r0] ldr r1, =0x00000ca8 @@ -806516,7 +806598,7 @@ sub_81A17A0: ; 81A17A0 ldr r2, =0x00000ca8 adds r1, r2 ldrb r1, [r1] - bl var_set + bl VarSet b @081A1822 .align 2, 0 .pool @@ -806528,7 +806610,7 @@ sub_81A17A0: ; 81A17A0 ldr r2, =0x00000ca8 adds r1, r2 ldrb r1, [r1] - bl var_set + bl VarSet @081A1822: pop {r0} bx r0 @@ -806540,7 +806622,7 @@ sub_81A17A0: ; 81A17A0 sub_81A1830: ; 81A1830 push {r4-r6,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 24 lsrs r6, r0, 24 adds r0, r6, 0 @@ -806672,7 +806754,7 @@ sub_81A1830: ; 81A1830 sub_81A1968: ; 81A1968 push {r4,r5,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 24 lsrs r5, r0, 24 adds r0, r5, 0 @@ -807126,11 +807208,11 @@ sub_81A1CD8: ; 81A1CD8 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -807341,7 +807423,7 @@ sub_81A1EA8: ; 81A1EA8 bne @081A1EF0 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE158 - bl ExpandTextCodes + bl ExpandStringRefs b @081A1F28 .align 2, 0 .pool @@ -807350,7 +807432,7 @@ sub_81A1EA8: ; 81A1EA8 bne @081A1F08 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE178 - bl ExpandTextCodes + bl ExpandStringRefs b @081A1F28 .align 2, 0 .pool @@ -807359,14 +807441,14 @@ sub_81A1EA8: ; 81A1EA8 bne @081A1F20 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE198 - bl ExpandTextCodes + bl ExpandStringRefs b @081A1F28 .align 2, 0 .pool @081A1F20: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE1B7 - bl ExpandTextCodes + bl ExpandStringRefs @081A1F28: ldr r0, =0x02021fc4 movs r1, 0x2 @@ -807503,11 +807585,11 @@ sub_81A2008: ; 81A2008 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 adds r0, r4, 0 adds r1, r7, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r5, [sp] @@ -807637,14 +807719,14 @@ sub_81A2134: ; 81A2134 bne @081A217C ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE1DB - bl ExpandTextCodes + bl ExpandStringRefs b @081A2184 .align 2, 0 .pool @081A217C: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE1FE - bl ExpandTextCodes + bl ExpandStringRefs @081A2184: ldr r0, =0x02021fc4 movs r1, 0 @@ -807807,11 +807889,11 @@ sub_81A22B8: ; 81A22B8 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -807997,14 +808079,14 @@ sub_81A2460: ; 81A2460 bne @081A24A8 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE221 - bl ExpandTextCodes + bl ExpandStringRefs b @081A24B0 .align 2, 0 .pool @081A24A8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE241 - bl ExpandTextCodes + bl ExpandStringRefs @081A24B0: ldr r0, =0x02021fc4 movs r1, 0x2 @@ -808138,11 +808220,11 @@ sub_81A258C: ; 81A258C adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 adds r0, r4, 0 adds r1, r7, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r5, [sp] @@ -808250,7 +808332,7 @@ sub_81A2698: ; 81A2698 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE261 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_81A1C4C @@ -808400,11 +808482,11 @@ sub_81A27E8: ; 81A27E8 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE381 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -808561,7 +808643,7 @@ sub_81A2968: ; 81A2968 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE27C adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C @@ -808669,11 +808751,11 @@ sub_81A2A28: ; 81A2A28 adds r1, r7, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r6, [sp] @@ -808689,10 +808771,10 @@ sub_81A2A28: ; 81A2A28 ldr r1, [sp, 0xC] movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085EE392 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r6, [sp] @@ -808942,14 +809024,14 @@ sub_81A2C94: ; 81A2C94 bne @081A2CD8 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE298 - bl ExpandTextCodes + bl ExpandStringRefs b @081A2CE0 .align 2, 0 .pool @081A2CD8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EE2B8 - bl ExpandTextCodes + bl ExpandStringRefs @081A2CE0: ldr r0, =0x02021fc4 movs r1, 0 @@ -809082,11 +809164,11 @@ sub_81A2DB4: ; 81A2DB4 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE39C adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -809243,7 +809325,7 @@ sub_81A2F38: ; 81A2F38 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EE2D8 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C @@ -809322,7 +809404,7 @@ sub_81A2FF8: ; 81A2FF8 ldr r0, =0x02021fc4 mov r9, r0 ldr r1, =gUnknown_085EDF86 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 mov r1, r9 movs r2, 0xD0 @@ -809474,7 +809556,7 @@ sub_81A2FF8: ; 81A2FF8 mov r0, r9 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r6, =0x0203ab74 ldrb r0, [r6] movs r1, 0x26 @@ -809530,11 +809612,11 @@ sub_81A31FC: ; 81A31FC lsls r0, 30 lsrs r7, r0, 30 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -809597,9 +809679,9 @@ sub_81A31FC: ; 81A31FC ldr r5, =0x020229f0 adds r1, r5 mov r0, sp - bl gf_strcpy + bl CopyString mov r0, sp - bl sub_8009370 + bl StripExtendedControlCodes lsls r1, r7, 3 ldr r0, =0x00000ee1 adds r1, r0 @@ -809607,7 +809689,7 @@ sub_81A31FC: ; 81A31FC ldr r0, [r2] adds r0, r1 mov r1, sp - bl gf_strcpy + bl CopyString ldrb r0, [r6] eors r4, r0 lsls r0, r4, 3 @@ -809980,7 +810062,7 @@ sub_81A31FC: ; 81A31FC sub_81A35EC: ; 81A35EC push {r4,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet ldr r4, =0x020375f0 bl sub_81A3610 lsls r0, 24 @@ -810002,11 +810084,11 @@ sub_81A3610: ; 81A3610 movs r0, 0 mov r8, r0 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, =0x000040ce - bl var_get + bl VarGet adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -810136,7 +810218,7 @@ sub_81A36D0: ; 81A36D0 ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A38F8 .align 2, 0 .pool @@ -810192,7 +810274,7 @@ sub_81A36D0: ; 81A36D0 ldr r0, [r2] adds r0, r1 adds r0, 0x18 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A38F8 .align 2, 0 .pool @@ -810265,7 +810347,7 @@ sub_81A36D0: ; 81A36D0 ldr r0, [r2] adds r0, r1 adds r0, 0x24 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A38F8 .align 2, 0 .pool @@ -810282,7 +810364,7 @@ sub_81A36D0: ; 81A36D0 beq @081A3890 @081A387C: bl sub_81864E0 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A38F8 .align 2, 0 .pool @@ -810312,7 +810394,7 @@ sub_81A36D0: ; 81A36D0 ldr r1, =gUnknown_086109BA @081A38C4: adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A38F8 .align 2, 0 .pool @@ -810333,7 +810415,7 @@ sub_81A36D0: ; 81A36D0 muls r0, r3 ldr r1, =gUnknown_086109BA adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @081A38F8: pop {r0} bx r0 @@ -810445,11 +810527,11 @@ sub_81A39C4: ; 81A39C4 lsls r0, 30 lsrs r4, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x6 @@ -810605,12 +810687,12 @@ sub_81A3B30: ; 81A3B30 lsrs r4, 23 ldr r1, =0x000008c4 adds r0, r4, r1 - bl flag_check + bl FlagGet adds r5, r0, 0 ldr r0, =0x000008c5 adds r4, r0 adds r0, r4, 0 - bl flag_check + bl FlagGet adds r5, r0 lsls r5, 24 lsrs r5, 24 @@ -810637,11 +810719,11 @@ sub_81A3B64: ; 81A3B64 lsls r0, 30 lsrs r4, r0, 30 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r7, r0, 16 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 cmp r7, 0x6 @@ -810778,7 +810860,7 @@ sub_81A3B64: ; 81A3B64 adds r1, r5, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r6] adds r2, r0, r4 ldrh r0, [r2] @@ -810824,7 +810906,7 @@ sub_81A3B64: ; 81A3B64 sub_81A3D30: ; 81A3D30 push {r4,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 @@ -810843,7 +810925,7 @@ sub_81A3D30: ; 81A3D30 sub_81A3D58: ; 81A3D58 push {r4,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 lsls r0, r4, 24 @@ -810856,7 +810938,7 @@ sub_81A3D58: ; 81A3D58 ldr r1, =0x8C4 << 16 adds r0, r1 lsrs r0, 16 - bl flag_set + bl FlagSet b @081A3D94 .align 2, 0 .pool @@ -810865,7 +810947,7 @@ sub_81A3D58: ; 81A3D58 ldr r1, =0x8C5 << 16 adds r0, r1 lsrs r0, 16 - bl flag_set + bl FlagSet @081A3D94: pop {r4} pop {r0} @@ -810948,7 +811030,7 @@ sub_81A3DD0: ; 81A3DD0 bne @081A3E50 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB79 - bl gf_strcat + bl AppendString b @081A3EC8 .align 2, 0 .pool @@ -810957,7 +811039,7 @@ sub_81A3DD0: ; 81A3DD0 ble @081A3EC8 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB7F - bl gf_strcat + bl AppendString b @081A3EC8 .align 2, 0 .pool @@ -810966,18 +811048,18 @@ sub_81A3DD0: ; 81A3DD0 bne @081A3E80 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB79 - bl gf_strcat + bl AppendString b @081A3E88 .align 2, 0 .pool @081A3E80: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB7F - bl gf_strcat + bl AppendString @081A3E88: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB86 - bl gf_strcat + bl AppendString b @081A3EC8 .align 2, 0 .pool @@ -810986,25 +811068,25 @@ sub_81A3DD0: ; 81A3DD0 bne @081A3EB8 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB79 - bl gf_strcat + bl AppendString b @081A3EC0 .align 2, 0 .pool @081A3EB8: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB7F - bl gf_strcat + bl AppendString @081A3EC0: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB84 - bl gf_strcat + bl AppendString @081A3EC8: ldr r0, =0x02021cc4 movs r1, 0xB muls r1, r6 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcat + bl AppendString @081A3ED6: adds r0, r4, 0 pop {r4-r6} @@ -811153,7 +811235,7 @@ sub_81A3FD4: ; 81A3FD4 add r4, sp, 0x28 strb r0, [r4] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 mov r10, r4 @@ -811177,7 +811259,7 @@ sub_81A3FD4: ; 81A3FD4 b @081A402A @081A4016: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 movs r1, 0x3 str r1, [sp, 0x2C] @@ -811235,7 +811317,7 @@ sub_81A3FD4: ; 81A3FD4 lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x6 @@ -811350,10 +811432,10 @@ sub_81A3FD4: ; 81A3FD4 ldr r4, =0x02021cc4 ldr r1, =gUnknown_085CCB82 adds r0, r4, 0 - bl gf_strcat + bl AppendString ldr r1, =gUnknown_085CCB88 adds r0, r4, 0 - bl gf_strcat + bl AppendString b @081A4202 .align 2, 0 .pool @@ -811364,18 +811446,18 @@ sub_81A3FD4: ; 81A3FD4 beq @081A41C0 ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB84 - bl gf_strcat + bl AppendString b @081A41C8 .align 2, 0 .pool @081A41C0: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB82 - bl gf_strcat + bl AppendString @081A41C8: ldr r0, =0x02021cc4 ldr r1, =gUnknown_085CCB8C - bl gf_strcat + bl AppendString b @081A4202 .align 2, 0 .pool @@ -811429,11 +811511,11 @@ sub_81A4230: ; 81A4230 lsls r0, 30 lsrs r4, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x6 @@ -811814,7 +811896,7 @@ sub_81A447C: ; 81A447C sub_81A457C: ; 81A457C push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 24 lsrs r0, 24 bl sub_81A5030 @@ -811893,7 +811975,7 @@ sub_81A4594: ; 81A4594 ldr r0, =0x02021dc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r1, =gUnknown_08611D08 ldr r0, [sp, 0x4C] @@ -811902,7 +811984,7 @@ sub_81A4594: ; 81A4594 ldr r4, [r0] adds r0, r5, 0 adds r1, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC8 @@ -812019,7 +812101,7 @@ sub_81A4684: ; 81A4684 @081A4734: add r0, sp, 0xC adds r1, r4, 0 - bl gf_strcpy + bl CopyString @081A473C: ldr r2, =0x0203ab74 mov r9, r2 @@ -812054,13 +812136,13 @@ sub_81A4684: ; 81A4684 ldr r0, =0x02021dc4 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021fc4 ldr r0, =gUnknown_08611D08 ldr r4, [r0, 0x24] adds r0, r5, 0 adds r1, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC8 @@ -812338,13 +812420,13 @@ sub_81A4998: ; 81A4998 lsls r5, r7, 3 adds r1, r5, r4 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r6, =0x02021fc4 adds r4, 0x4 adds r5, r4 ldr r1, [r5] adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r0, =0x0203ab74 mov r8, r0 ldrb r0, [r0] @@ -812707,7 +812789,7 @@ sub_81A4CB0: ; 81A4CB0 .pool @081A4CD0: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 @081A4CDA: @@ -812745,7 +812827,7 @@ sub_81A4D00: ; 81A4D00 .pool @081A4D20: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 @081A4D2A: @@ -812784,7 +812866,7 @@ sub_81A4D50: ; 81A4D50 .pool @081A4D70: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 @081A4D7A: @@ -812821,7 +812903,7 @@ sub_81A4D50: ; 81A4D50 sub_81A4DB8: ; 81A4DB8 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 ldr r1, =gUnknown_08611C8C lsrs r0, 15 @@ -812838,7 +812920,7 @@ sub_81A4DB8: ; 81A4DB8 sub_81A4DD8: ; 81A4DD8 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 ldr r2, =0x00004010 ldr r1, =gUnknown_08611C8C @@ -812846,7 +812928,7 @@ sub_81A4DD8: ; 81A4DD8 adds r0, r1 ldrb r1, [r0] adds r0, r2, 0 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -812862,7 +812944,7 @@ sub_81A4E04: ; 81A4E04 push {r5-r7} sub sp, 0x44 ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x20] @@ -813095,7 +813177,7 @@ sub_81A4FF0: ; 81A4FF0 lsls r4, 24 lsrs r4, 24 ldr r0, =0x000040cf - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -813134,7 +813216,7 @@ sub_81A5030: ; 81A5030 adds r0, r1 ldrb r1, [r0] adds r0, r2, 0 - bl var_set + bl VarSet pop {r0} bx r0 .align 2, 0 @@ -813151,7 +813233,7 @@ sub_81A5060: ; 81A5060 lsls r4, 24 lsrs r4, 24 ldr r0, =0x000040cf - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -813187,7 +813269,7 @@ sub_81A50B0: ; 81A50B0 lsls r4, 24 lsrs r4, 24 ldr r0, =0x000040cf - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -813222,7 +813304,7 @@ sub_81A50F0: ; 81A50F0 lsls r4, 24 lsrs r4, 24 ldr r0, =0x000040cf - bl var_get + bl VarGet adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -813254,7 +813336,7 @@ sub_81A50F0: ; 81A50F0 sub_81A513C: ; 81A513C push {r4,r5,lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 lsls r0, r5, 24 @@ -813328,7 +813410,7 @@ sub_81A51A8: ; 81A51A8 .pool @081A51D4: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 bl sub_81A513C @@ -813350,7 +813432,7 @@ sub_81A51A8: ; 81A51A8 lsls r1, r4, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString b @081A5228 .align 2, 0 .pool @@ -813363,7 +813445,7 @@ sub_81A51A8: ; 81A51A8 lsls r1, r4, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString @081A5228: pop {r4,r5} pop {r0} @@ -813484,7 +813566,7 @@ sub_81A5258: ; 81A5258 negs r0, r0 strb r0, [r1, 0x1] ldr r0, =gUnknown_085CCDB2 - bl sub_814E6F0 + bl get_battle_strings_ ldr r4, =0x02022e2c adds r0, r4, 0 movs r1, 0xF @@ -813493,7 +813575,7 @@ sub_81A5258: ; 81A5258 movs r1, 0x10 bl battle_show_message_maybe ldr r0, =gUnknown_085CCDB8 - bl sub_814E6F0 + bl get_battle_strings_ adds r0, r4, 0 movs r1, 0x11 bl battle_show_message_maybe @@ -813507,7 +813589,7 @@ sub_81A5258: ; 81A5258 movs r1, 0x14 bl battle_show_message_maybe ldr r0, =gUnknown_085CCDCB - bl sub_814E6F0 + bl get_battle_strings_ adds r0, r4, 0 movs r1, 0x15 bl battle_show_message_maybe @@ -813595,7 +813677,7 @@ sub_81A5258: ; 81A5258 movs r3, 0x1 bl sub_81A5558 ldr r0, =gUnknown_085CCDCB - bl sub_814E6F0 + bl get_battle_strings_ ldr r0, =0x02022e2c movs r1, 0x15 bl battle_show_message_maybe @@ -814401,7 +814483,7 @@ sub_81A5AC4: ; 81A5AC4 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -814842,7 +814924,7 @@ sub_81A5E94: ; 81A5E94 lsls r0, 30 lsrs r7, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r6, r0, 16 ldr r0, [r5] @@ -814961,7 +815043,7 @@ sub_81A5FA8: ; 81A5FA8 lsls r0, 30 lsrs r6, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r5, r0, 16 ldr r0, =0x020375e2 @@ -815040,7 +815122,7 @@ sub_81A6054: ; 81A6054 lsls r0, 30 lsrs r5, r0, 30 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x020375e2 @@ -815146,7 +815228,7 @@ sub_81A613C: ; 81A613C movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -815216,7 +815298,7 @@ sub_81A61B0: ; 81A61B0 lsrs r0, 30 str r0, [sp, 0x10] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r1, [r4] ldr r3, [sp, 0x10] @@ -815995,7 +816077,7 @@ sub_81A67EC: ; 81A67EC lsrs r4, 30 ldr r6, =0x000040ce adds r0, r6, 0 - bl var_get + bl VarGet lsls r0, 24 ldr r1, [r5] lsls r4, 1 @@ -816011,7 +816093,7 @@ sub_81A67EC: ; 81A67EC lsrs r0, 24 str r0, [sp, 0x24] adds r0, r6, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 movs r2, 0 @@ -816593,7 +816675,7 @@ sub_81A6CD0: ; 81A6CD0 lsrs r0, 30 str r0, [sp, 0x2C] ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 24 ldr r1, [r4] ldr r3, [sp, 0x2C] @@ -816960,7 +817042,7 @@ sub_81A6FB4: ; 81A6FB4 cmp r4, 0x2 beq @081A6FF8 ldr r0, =0x000040ce - bl var_get + bl VarGet lsls r0, 16 ldr r1, [r5] lsls r2, r4, 1 @@ -817049,10 +817131,10 @@ sub_81A7070: ; 81A7070 push {r4-r7,lr} ldr r0, =0x00004010 movs r1, 0x1C - bl var_set + bl VarSet ldr r0, =0x00004011 movs r1, 0xE2 - bl var_set + bl VarSet movs r4, 0x1 movs r6, 0 movs r5, 0 @@ -817127,13 +817209,13 @@ sub_81A7070: ; 81A7070 bne @081A7126 ldr r0, =0x00004010 adds r1, r5, 0 - bl var_set + bl VarSet @081A7126: cmp r6, 0x1 bne @081A7132 ldr r0, =0x00004011 adds r1, r7, 0 - bl var_set + bl VarSet @081A7132: pop {r4-r7} pop {r0} @@ -817491,7 +817573,7 @@ sub_81A7418: ; 81A7418 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -817653,7 +817735,7 @@ sub_81A7508: ; 81A7508 lsls r0, 2 ldr r1, =gUnknown_086123E4 adds r0, r1 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString pop {r0} bx r0 .align 2, 0 @@ -817749,7 +817831,7 @@ sub_81A7594: ; 81A7594 sub_81A7628: ; 81A7628 push {r4,lr} adds r4, r1, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 movs r1, 0 @@ -819674,7 +819756,7 @@ sub_81A84EC: ; 81A84EC ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081A8542 .align 2, 0 .pool @@ -819692,7 +819774,7 @@ sub_81A84EC: ; 81A84EC ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @081A8542: pop {r0} bx r0 @@ -820130,7 +820212,7 @@ sub_81A88B0: ; 81A88B0 cmp r0, 0 bne @081A8904 adds r0, r4, 0 - bl sub_806B6D8 + bl GetMonAbility lsls r0, 24 lsrs r0, 24 cmp r0, 0x33 @@ -821235,7 +821317,7 @@ sub_81A9134: ; 81A9134 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -821379,8 +821461,8 @@ sub_81A9254: ; 81A9254 .pool thumb_func_end sub_81A9254 - thumb_func_start sub_81A9290 -sub_81A9290: ; 81A9290 + thumb_func_start CalculateBattlePyramidItemBallItemId +CalculateBattlePyramidItemBallItemId: ; 81A9290 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -821517,7 +821599,7 @@ sub_81A9290: ; 81A9290 bx r0 .align 2, 0 .pool - thumb_func_end sub_81A9290 + thumb_func_end CalculateBattlePyramidItemBallItemId thumb_func_start sub_81A93C8 sub_81A93C8: ; 81A93C8 @@ -822866,7 +822948,7 @@ sub_81A9E90: ; 81A9E90 strb r1, [r0] ldr r0, =0x0000400e movs r1, 0 - bl var_set + bl VarSet bl copy_player_party_from_sav1 @081A9EB8: pop {r0} @@ -822899,7 +822981,7 @@ sub_81A9EDC: ; 81A9EDC ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString pop {r0} bx r0 .align 2, 0 @@ -822917,7 +822999,7 @@ sub_81A9EFC: ; 81A9EFC ldr r0, [r2] adds r0, r1 adds r0, 0x18 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString pop {r0} bx r0 .align 2, 0 @@ -822935,7 +823017,7 @@ sub_81A9F1C: ; 81A9F1C ldr r0, [r2] adds r0, r1 adds r0, 0x24 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString pop {r0} bx r0 .align 2, 0 @@ -824454,8 +824536,8 @@ sub_81AAA7C: ; 81AAA7C .pool thumb_func_end sub_81AAA7C - thumb_func_start sub_81AAAE0 -sub_81AAAE0: ; 81AAAE0 + thumb_func_start CalculateBattlePyramidPickupItemId +CalculateBattlePyramidPickupItemId: ; 81AAAE0 push {r4-r6,lr} ldr r0, =0x03005d90 ldr r1, [r0] @@ -824524,7 +824606,7 @@ sub_81AAAE0: ; 81AAAE0 bx r1 .align 2, 0 .pool - thumb_func_end sub_81AAAE0 + thumb_func_end CalculateBattlePyramidPickupItemId thumb_func_start sub_81AAB70 sub_81AAB70: ; 81AAB70 @@ -825407,7 +825489,7 @@ load_bag_item_list_buffers: ; 81AB240 ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8DB4 - bl gf_strcpy + bl CopyString ldr r0, =0x0203ce74 ldr r0, [r0] lsls r1, r6, 3 @@ -825523,7 +825605,7 @@ get_name: ; 81AB39C ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0xA9 lsls r0, 1 cmp r5, r0 @@ -825533,7 +825615,7 @@ get_name: ; 81AB39C adds r1, r5, r2 movs r2, 0x2 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085E921A b @081AB438 .align 2, 0 @@ -825544,7 +825626,7 @@ get_name: ; 81AB39C adds r1, r5, r2 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString b @081AB436 .align 2, 0 .pool @@ -825554,7 +825636,7 @@ get_name: ; 81AB39C subs r1, 0x84 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =0x02021dc4 adds r0, r5, 0 bl itemid_get_name @@ -825562,7 +825644,7 @@ get_name: ; 81AB39C ldr r1, =gUnknown_085E9210 @081AB438: adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs @081AB43E: pop {r4-r6} pop {r0} @@ -825750,11 +825832,11 @@ sub_81AB520: ; 81AB520 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -825784,11 +825866,11 @@ sub_81AB520: ; 81AB520 mov r1, r9 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -825875,11 +825957,11 @@ bag_menu_print_description_box_text: ; 81AB6B0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E91C0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs @081AB6FC: movs r0, 0x1 movs r1, 0 @@ -826565,11 +826647,11 @@ sub_81ABC54: ; 81ABC54 lsls r1, 16 asrs r1, 16 movs r2, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0x28 @@ -826609,11 +826691,11 @@ sub_81ABCC0: ; 81ABCC0 @081ABCD4: ldr r0, =0x02021cc4 movs r2, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r6, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs lsls r4, 24 lsrs r4, 24 movs r0, 0x1 @@ -827378,7 +827460,7 @@ sub_81AC2E8: ; 81AC2E8 ldr r0, =0x02021fc4 mov r8, r0 ldr r1, =gUnknown_085E8DFE - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -828117,7 +828199,7 @@ sub_81AC644: ; 81AC644 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DBE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -828703,7 +828785,7 @@ sub_81ACEF4: ; 81ACEF4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8EE0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -828756,11 +828838,11 @@ sub_81ACF88: ; 81ACF88 ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8F0E adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -828897,11 +828979,11 @@ display_threw_away_item_str: ; 81AD0CC ldrsh r1, [r6, r2] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r6, =0x02021fc4 ldr r1, =gUnknown_085E8EF9 adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -829136,7 +829218,7 @@ sub_81AD30C: ; 81AD30C ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E8E11 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81AD350 adds r0, r4, 0 movs r1, 0x1 @@ -829285,7 +829367,7 @@ sub_81AD41C: ; 81AD41C ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8E27 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81AD350 adds r0, r5, 0 movs r1, 0x1 @@ -829474,7 +829556,7 @@ display_sell_item_ask_str: ; 81AD5DC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E960F adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81ABBBC adds r0, r5, 0 movs r1, 0x1 @@ -829501,7 +829583,7 @@ display_sell_item_ask_str: ; 81AD5DC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E962F adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81AD730 adds r0, r7, 0 movs r1, 0x1 @@ -829538,11 +829620,11 @@ sub_81AD680: ; 81AD680 adds r0, r6, 0 movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9654 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81AD6E4 adds r0, r5, 0 movs r1, 0x1 @@ -829749,11 +829831,11 @@ sub_81AD84C: ; 81AD84C mov r0, r8 movs r2, 0 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9677 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r3, =sub_81AD8C8 adds r0, r5, 0 movs r1, 0x1 @@ -829924,7 +830006,7 @@ display_deposit_item_ask_str: ; 81AD9EC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8E42 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -830082,11 +830164,11 @@ sub_81ADB14: ; 81ADB14 ldrsh r1, [r2, r3] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8E5A adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs str r6, [sp] str r5, [sp, 0x4] str r5, [sp, 0x8] @@ -831064,7 +831146,7 @@ sub_81AE2FC: ; 81AE2FC adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r2, r4, 0 @081AE39C: movs r0, 0xC @@ -831098,7 +831180,7 @@ sub_81AE2FC: ; 81AE2FC adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r2, r4, 0 @081AE3E8: movs r0, 0x18 @@ -831124,7 +831206,7 @@ sub_81AE2FC: ; 81AE2FC adds r0, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x24 str r0, [sp] str r4, [sp, 0x4] @@ -834311,7 +834393,7 @@ sub_81AFC28: ; 81AFC28 cmp r1, 0 beq @081AFC5E adds r0, r2, 0 - bl gf_strcpy + bl CopyString adds r2, r0, 0 @081AFC5E: adds r4, 0x1 @@ -836417,9 +836499,9 @@ sub_81B0CEC: ; 81B0CEC add r5, r8 adds r0, r4, 0 adds r1, r5, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r4, 0 bl sub_81DB52C ldrb r0, [r6, 0x8] @@ -837595,7 +837677,7 @@ sub_81B1660: ; 81B1660 ldr r4, =0x02021fc4 adds r0, r4, 0 adds r1, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -838239,7 +838321,7 @@ sub_81B1B44: ; 81B1B44 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 pop {r4} pop {r1} bx r1 @@ -838412,7 +838494,7 @@ sub_81B1C84: ; 81B1C84 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E991B adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -838442,7 +838524,7 @@ sub_81B1CD0: ; 81B1CD0 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E999D adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -838472,7 +838554,7 @@ sub_81B1D1C: ; 81B1D1C ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E993A adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -838504,7 +838586,7 @@ sub_81B1D68: ; 81B1D68 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E99DB adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -838599,7 +838681,7 @@ pokemon_item_not_removed: ; 81B1E48 push {lr} ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9A69 - bl ExpandTextCodes + bl ExpandStringRefs pop {r0} bx r0 .align 2, 0 @@ -838680,7 +838762,7 @@ sub_81B1E60: ; 81B1E60 subs r1, r2 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString @081B1EF8: mov r0, r8 bl set_task_function_to_args_14_15 @@ -840215,14 +840297,14 @@ sub_81B2B40: ; 81B2B40 adds r1, r2, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021cc4 ldr r1, =gUnknown_085E8D4D adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 adds r1, r5, 0 - bl gf_strcat + bl AppendString ldrb r0, [r6, 0x8] ldr r3, [r6] adds r3, 0x8 @@ -840319,7 +840401,7 @@ sub_81B2BF4: ; 81B2BF4 ldr r0, =gSpeciesNames adds r1, r0 mov r0, r9 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @081B2CBA @081B2C38: @@ -840452,7 +840534,7 @@ sub_81B2D3C: ; 81B2D3C adds r1, r2, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xBA strb r1, [r0] movs r1, 0xFF @@ -840536,14 +840618,14 @@ sub_81B2DDC: ; 81B2DDC adds r1, r2, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021cc4 ldr r1, =gUnknown_085E8D3E adds r0, r4, 0 - bl gf_strcpy + bl CopyString adds r0, r4, 0 adds r1, r5, 0 - bl gf_strcat + bl AppendString ldrb r0, [r6, 0x8] ldr r3, [r6] adds r3, 0x14 @@ -840924,7 +841006,7 @@ sub_81B3054: ; 81B3054 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldrb r0, [r5] movs r1, 0x1 str r1, [sp] @@ -841608,7 +841690,7 @@ sub_81B3608: ; 81B3608 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -843596,7 +843678,7 @@ sub_81B4724: ; 81B4724 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 b @081B47B4 .align 2, 0 @@ -843659,7 +843741,7 @@ sub_81B47E0: ; 81B47E0 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -843679,7 +843761,7 @@ sub_81B47E0: ; 81B47E0 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9E00 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -843765,7 +843847,7 @@ sub_81B48DC: ; 81B48DC ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9E14 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -844438,11 +844520,11 @@ sub_81B4E8C: ; 81B4E8C adds r1, r6, 0 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9830 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x20 bl audio_play adds r0, r4, 0 @@ -844690,14 +844772,14 @@ sub_81B50C8: ; 81B50C8 @081B515C: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA210 - bl ExpandTextCodes + bl ExpandStringRefs b @081B5178 .align 2, 0 .pool @081B5170: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA234 - bl ExpandTextCodes + bl ExpandStringRefs @081B5178: movs r0, 0x20 bl audio_play @@ -844711,7 +844793,7 @@ sub_81B50C8: ; 81B50C8 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA1CA adds r0, r4, 0 - bl gf_strcat + bl AppendString adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -844800,7 +844882,7 @@ brm_trade_1: ; 81B51D4 adds r0, r1 ldr r1, [r0] adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x20 bl audio_play ldr r4, =0x0203cec4 @@ -844812,7 +844894,7 @@ brm_trade_1: ; 81B51D4 bl sub_81B302C ldr r1, =gUnknown_085EA1CA adds r0, r5, 0 - bl gf_strcat + bl AppendString adds r0, r5, 0 movs r1, 0x1 bl sub_81B1B5C @@ -844877,21 +844959,21 @@ sub_81B52E4: ; 81B52E4 @081B532E: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA1E8 - bl ExpandTextCodes + bl ExpandStringRefs b @081B53C0 .align 2, 0 .pool @081B5340: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA210 - bl ExpandTextCodes + bl ExpandStringRefs b @081B53C0 .align 2, 0 .pool @081B5354: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA234 - bl ExpandTextCodes + bl ExpandStringRefs b @081B53C0 .align 2, 0 .pool @@ -844910,7 +844992,7 @@ sub_81B52E4: ; 81B52E4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA1CD adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -844929,7 +845011,7 @@ sub_81B52E4: ; 81B52E4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA1CA adds r0, r4, 0 - bl gf_strcat + bl AppendString adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -845071,7 +845153,7 @@ sub_81B5470: ; 81B5470 bhi @081B5524 ldr r1, =0x00000867 adds r0, r4, r1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -845171,7 +845253,7 @@ sub_81B5470: ; 81B5470 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085EA16B @081B55E8: - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r6, 0 bl sub_81B5674 ldr r0, =0x0203cec4 @@ -845418,7 +845500,7 @@ task_brm_cancel_1_on_keypad_a_or_b: ; 81B57B4 sub_81B57DC: ; 81B57DC push {lr} ldr r0, =0x00000888 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -846914,56 +846996,56 @@ sub_81B6310: ; 81B6310 @081B6380: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9C3E - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B6394: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9C7C - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B63A8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9C8A - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B63BC: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9CA2 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B63D0: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9C5F - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B63E4: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9DBE - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B63F8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9DE1 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B640C: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9CE0 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @@ -847001,31 +847083,31 @@ sub_81B6310: ; 81B6310 ldr r0, =0x02021dc4 ldr r1, =gUnknown_085E96EE @081B6474: - bl gf_strcpy + bl CopyString ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9D25 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B6494: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9CF5 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B64A8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9CB7 - bl ExpandTextCodes + bl ExpandStringRefs b @081B64C4 .align 2, 0 .pool @081B64BC: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E96F6 - bl ExpandTextCodes + bl ExpandStringRefs @081B64C4: pop {r0} bx r0 @@ -847338,7 +847420,7 @@ sub_81B672C: ; 81B672C ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -847484,21 +847566,21 @@ sub_81B67C8: ; 81B67C8 beq @081B68C4 ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9D45 - bl ExpandTextCodes + bl ExpandStringRefs b @081B68E0 .align 2, 0 .pool @081B68C4: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9D90 - bl ExpandTextCodes + bl ExpandStringRefs b @081B68E0 .align 2, 0 .pool @081B68D8: ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9D6D - bl ExpandTextCodes + bl ExpandStringRefs @081B68E0: ldr r0, =0x02021fc4 @081B68E2: @@ -847643,14 +847725,14 @@ option_menu_get_string: ; 81B699C ldr r1, =gUnknown_085E96E6 @081B69F2: adds r0, r2, 0 - bl gf_strcpy + bl CopyString b @081B6A08 .align 2, 0 .pool @081B6A00: ldr r1, =gUnknown_085E96EE adds r0, r2, 0 - bl gf_strcpy + bl CopyString @081B6A08: pop {r0} bx r0 @@ -847944,7 +848026,7 @@ sub_81B6BEC: ; 81B6BEC muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString adds r0, r5, 0 bl sub_81B6310 ldr r0, =0x02021fc4 @@ -848076,7 +848158,7 @@ sub_81B6D74: ; 81B6D74 adds r1, r0, 0 ldr r4, =0x02021fc4 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -848145,7 +848227,7 @@ sub_81B6DC4: ; 81B6DC4 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString movs r0, 0 mov r1, r8 strh r0, [r1, 0x2] @@ -848250,11 +848332,11 @@ sub_81B6EB4: ; 81B6EB4 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9AA5 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -848556,7 +848638,7 @@ sub_81B7154: ; 81B7154 muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085E9BB8 bl sub_81B6D74 ldr r1, =0x03005e00 @@ -848629,11 +848711,11 @@ sub_81B7230: ; 81B7230 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9B5D adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -848720,11 +848802,11 @@ sub_81B72C8: ; 81B72C8 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9B76 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -848773,7 +848855,7 @@ sub_81B72C8: ; 81B72C8 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r0, =gUnknown_085E9AE9 bl sub_81B6D74 ldr r1, =0x03005e00 @@ -848907,11 +848989,11 @@ dp05_rare_candy: ; 81B7404 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9D0A adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -849351,11 +849433,11 @@ sub_81B787C: ; 81B787C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9AE9 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -849406,11 +849488,11 @@ sub_81B7910: ; 81B7910 muls r1, r5 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9AA5 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -849725,7 +849807,7 @@ sub_81B7C10: ; 81B7C10 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -850035,7 +850117,7 @@ sub_81B7E4C: ; 81B7E4C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString movs r0, 0x2 mov r1, r8 strh r0, [r1, 0x2] @@ -850885,7 +850967,7 @@ sub_81B85AC: ; 81B85AC bne @081B8608 @081B85EA: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x8 @@ -850965,14 +851047,14 @@ sub_81B865C: ; 81B865C ldr r0, =0x02021cc4 movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x11 b @081B8758 .align 2, 0 .pool @081B869C: ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 24 movs r1, 0xF8 lsls r1, 24 @@ -851181,7 +851263,7 @@ sub_81B87E8: ; 81B87E8 sub_81B8830: ; 81B8830 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x8 @@ -851209,7 +851291,7 @@ sub_81B8830: ; 81B8830 sub_81B885C: ; 81B885C push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x8 @@ -851237,7 +851319,7 @@ sub_81B885C: ; 81B885C sub_81B8888: ; 81B8888 push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 cmp r0, 0x8 @@ -851269,7 +851351,7 @@ sub_81B8888: ; 81B8888 sub_81B88BC: ; 81B88BC push {lr} ldr r0, =0x000040cf - bl var_get + bl VarGet lsls r0, 24 lsrs r1, r0, 24 movs r2, 0xF8 @@ -851516,7 +851598,7 @@ sub_81B8A7C: ; 81B8A7C bl sub_806EBF8 adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E97B2 b @081B8C42 @@ -851674,7 +851756,7 @@ sub_81B8A7C: ; 81B8A7C ldr r0, =0x02021fc4 ldr r1, =gUnknown_085E9738 @081B8C42: - bl ExpandTextCodes + bl ExpandStringRefs @081B8C46: movs r0, 0 @081B8C48: @@ -853100,7 +853182,7 @@ sub_81B9718: ; 81B9718 muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl gf_strcpy + bl CopyString pop {r4,r5} pop {r0} bx r0 @@ -853503,7 +853585,7 @@ sub_81B9A90: ; 81B9A90 ldr r0, [r2] adds r0, r1 adds r0, 0xC - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @081B9AAC: pop {r0} bx r0 @@ -853524,7 +853606,7 @@ sub_81B9ABC: ; 81B9ABC movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -853693,7 +853775,7 @@ sub_81B9C2C: ; 81B9C2C movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -853875,7 +853957,7 @@ sub_81B9DB4: ; 81B9DB4 movs r0, 0x80 lsls r0, 7 movs r1, 0 - bl var_set + bl VarSet ldr r1, [r4] ldr r0, =0x00000ca9 adds r1, r0 @@ -858015,7 +858097,7 @@ dp01_getattr_by_ch1_for_player_pokemon: ; 81BBCD8 bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl strcpy_limit_10_chars + bl CopyString_Limit10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -862512,7 +862594,7 @@ sub_81BE66C: ; 81BE66C bne @081BE690 movs r0, 0xA7 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @081BE692 @@ -862570,7 +862652,7 @@ sub_81BE6B8: ; 81BE6B8 bne @081BE718 movs r0, 0xA7 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081BE718 @@ -862613,7 +862695,7 @@ sub_81BE72C: ; 81BE72C bne @081BE788 movs r0, 0xA7 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081BE788 @@ -862656,13 +862738,13 @@ sub_81BE72C: ; 81BE72C sub_81BE79C: ; 81BE79C push {r4,lr} ldr r0, =0x000040cb - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @081BE7B8 movs r0, 0xA7 lsls r0, 1 - bl flag_clear + bl FlagReset b @081BE7EE .align 2, 0 .pool @@ -862673,7 +862755,7 @@ sub_81BE79C: ; 81BE79C movs r0, 0x1 ands r4, r0 movs r0, 0x9D - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -862684,13 +862766,13 @@ sub_81BE79C: ; 81BE79C beq @081BE7E6 movs r0, 0xA7 lsls r0, 1 - bl flag_set + bl FlagSet bl sub_81BE6B8 b @081BE7EE @081BE7E6: movs r0, 0xA7 lsls r0, 1 - bl flag_clear + bl FlagReset @081BE7EE: pop {r4} pop {r0} @@ -865823,7 +865905,7 @@ sub_81C00F0: ; 81C00F0 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted adds r0, r5, 0 bl sub_81B205C strb r0, [r6, 0x7] @@ -870046,16 +870128,16 @@ sub_81C2628: ; 81C2628 ldr r6, =0x02021cc4 ldr r1, =gUnknown_085E8D4F adds r0, r6, 0 - bl gf_strcpy + bl CopyString ldr r4, =0x02021dc4 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 adds r1, r4, 0 - bl gf_strcat + bl AppendString mov r0, r8 bl sub_806EBA4 lsls r0, 24 @@ -870109,16 +870191,16 @@ sub_81C2628: ; 81C2628 ldr r4, =0x02021cc4 ldr r1, =gUnknown_085E8D4D adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r5, =0x02021dc4 ldrb r1, [r7, 0x5] adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 adds r1, r5, 0 - bl gf_strcat + bl AppendString movs r6, 0 str r6, [sp] movs r5, 0x1 @@ -870148,7 +870230,7 @@ sub_81C2628: ; 81C2628 muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl gf_strcpy + bl CopyString str r6, [sp] str r5, [sp, 0x4] movs r0, 0x13 @@ -871080,14 +871162,14 @@ sub_81C2F5C: ; 81C2F5C ldr r5, =0x02021cc4 ldr r1, =gUnknown_085E8D59 adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r1, =0x0203cf1c ldr r1, [r1] adds r1, 0xB8 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -871369,7 +871451,7 @@ sub_81C31F0: ; 81C31F0 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x3 adds r1, r4, 0 bl sub_81AFC0C @@ -871408,7 +871490,7 @@ sub_81C3220: ; 81C3220 ldr r0, =0x02021cc4 adds r2, 0x8 adds r1, r2 - bl gf_strcpy + bl CopyString b @081C3282 .align 2, 0 .pool @@ -871421,7 +871503,7 @@ sub_81C3220: ; 81C3220 ldr r1, [r0] ldrb r5, [r1, 0x8] ldr r0, =0x02021cc4 - bl gf_strcpy + bl CopyString @081C3282: adds r0, r6, 0 adds r0, 0x32 @@ -871436,7 +871518,7 @@ sub_81C3220: ; 81C3220 ldr r0, =0x02021cc4 adds r1, r6, 0 adds r1, 0x36 - bl sub_80092BC + bl CompareStringWithoutExtendedControlCodes cmp r0, 0 beq @081C32B4 @081C32A4: @@ -871597,10 +871679,10 @@ sub_81C33CC: ; 81C33CC ldr r5, =0x02021cc4 ldr r1, =gUnknown_085E8D59 adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085E8D38 adds r0, r5, 0 - bl gf_strcat + bl AppendString movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -871937,11 +872019,11 @@ sub_81C3690: ; 81C3690 ldrb r1, [r1] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085EA3B4 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs adds r5, r4, 0 @081C36C8: movs r0, 0x1 @@ -871997,28 +872079,28 @@ sub_81C3710: ; 81C3710 mov r0, r9 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] adds r0, 0x92 ldrh r1, [r0] mov r0, r8 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] adds r0, 0x94 ldrh r1, [r0] adds r0, r6, 0 movs r2, 0x1 movs r3, 0x7 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, [r4] adds r0, 0x96 ldrh r1, [r0] adds r0, r5, 0 movs r2, 0x1 movs r3, 0x7 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 movs r0, 0 mov r1, r9 @@ -872090,7 +872172,7 @@ sub_81C3808: ; 81C3808 mov r0, r8 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r6, =0x02021dc4 ldr r0, [r4] adds r0, 0x9A @@ -872098,7 +872180,7 @@ sub_81C3808: ; 81C3808 adds r0, r6, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r5, =0x02021ec4 ldr r0, [r4] adds r0, 0x9C @@ -872106,7 +872188,7 @@ sub_81C3808: ; 81C3808 adds r0, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 movs r0, 0 mov r1, r8 @@ -872170,7 +872252,7 @@ sub_81C38C0: ; 81C38C0 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x7 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -872217,7 +872299,7 @@ sub_81C38C0: ; 81C38C0 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x6 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -872480,13 +872562,13 @@ sub_81C3B08: ; 81C3B08 ldrb r1, [r5] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021dc4 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 movs r0, 0 mov r1, r8 @@ -872594,7 +872676,7 @@ sub_81C3C5C: ; 81C3C5C adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r1, r4, 0 @081C3CAC: movs r0, 0 @@ -872621,7 +872703,7 @@ sub_81C3C5C: ; 81C3C5C adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r1, r4, 0 @081C3CEC: movs r0, 0 @@ -872982,7 +873064,7 @@ sub_81C3F44: ; 81C3F44 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 movs r0, 0 adds r1, r4, 0 @@ -875384,7 +875466,7 @@ sub_81C5314: ; 81C5314 ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8DB4 - bl gf_strcpy + bl CopyString ldr r1, [r5] lsls r2, r6, 3 ldr r3, =0x00000824 @@ -875440,13 +875522,13 @@ sub_81C540C: ; 81C540C subs r1, 0x84 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =0x02021dc4 adds r0, r4, 0 bl itemid_get_name ldr r1, =gUnknown_085E9210 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs b @081C5458 .align 2, 0 .pool @@ -875592,11 +875674,11 @@ sub_81C5518: ; 81C5518 ldrb r1, [r3] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -875661,11 +875743,11 @@ sub_81C55D8: ; 81C55D8 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl gf_strcpy + bl CopyString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E91C0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs @081C5638: movs r0, 0x1 movs r1, 0 @@ -876597,7 +876679,7 @@ sub_81C5D20: ; 81C5D20 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DBE adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -877207,7 +877289,7 @@ sub_81C62C4: ; 81C62C4 ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8EE0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -877257,11 +877339,11 @@ sub_81C6350: ; 81C6350 ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8F0E adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -877320,11 +877402,11 @@ sub_81C6404: ; 81C6404 movs r1, 0x1 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x3 bl sub_81C6CEC movs r0, 0x1 @@ -877361,11 +877443,11 @@ sub_81C645C: ; 81C645C asrs r1, 16 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r4, =0x02021fc4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 adds r1, r4, 0 movs r2, 0x28 @@ -877478,11 +877560,11 @@ sub_81C654C: ; 81C654C ldrsh r1, [r6, r2] movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r6, =0x02021fc4 ldr r1, =gUnknown_085E8EF9 adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -877616,7 +877698,7 @@ sub_81C66AC: ; 81C66AC ldr r5, =0x02021fc4 ldr r1, =gUnknown_085E8E11 adds r0, r5, 0 - bl ExpandTextCodes + bl ExpandStringRefs ldr r2, =sub_81C66EC adds r0, r4, 0 adds r1, r5, 0 @@ -877793,7 +877875,7 @@ sub_81C67CC: ; 81C67CC ldr r6, =0x02021fc4 ldr r1, =gUnknown_085E8DFE adds r0, r6, 0 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 movs r1, 0 bl Window_FastFillPixels @@ -883247,13 +883329,13 @@ sub_81C9268: ; 81C9268 movs r4, 0 movs r0, 0x98 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081C928A movs r4, 0x1 ldr r0, =0x0000089b - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081C928A @@ -886887,7 +886969,7 @@ sub_81CAE08: ; 81CAE08 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 @081CAE24: @@ -887457,13 +887539,13 @@ sub_81CB1D0: ; 81CB1D0 cmp r0, r1 bne @081CB258 ldr r0, =0x0000086b - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne @081CB258 movs r0, 0x5B - bl flag_check + bl FlagGet lsls r0, 24 @081CB246: cmp r0, 0 @@ -888967,7 +889049,7 @@ sub_81CBE0C: ; 81CBE0C mov r0, sp movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 mov r1, sp movs r2, 0x1 @@ -889009,7 +889091,7 @@ sub_81CBE50: ; 81CBE50 mov r0, sp movs r2, 0 movs r3, 0x5 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r4, 0 mov r1, sp movs r2, 0x3 @@ -889103,7 +889185,7 @@ sub_81CBEF8: ; 81CBEF8 @081CBF1C: ldr r1, =gUnknown_085EC00F add r0, sp, 0xC - bl gf_strcpy + bl CopyString @081CBF24: movs r0, 0x7 add r1, sp, 0xC @@ -891035,7 +891117,7 @@ sub_81CCDE8: ; 81CCDE8 adds r0, r6, 0 movs r2, 0 movs r3, 0xC - bl sub_8009128 + bl CopyStringPadded mov r1, r9 ldrb r0, [r1, 0x8] lsrs r1, r4, 24 @@ -892118,7 +892200,7 @@ sub_81CD624: ; 81CD624 adds r0, r5, 0 movs r2, 0 movs r3, 0xC - bl sub_8009128 + bl CopyStringPadded b @081CD80E .align 2, 0 .pool @@ -892129,7 +892211,7 @@ sub_81CD624: ; 81CD624 adds r3, r5, 0 bl sub_81D2C68 adds r0, r5, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0xB @@ -892182,7 +892264,7 @@ sub_81CD624: ; 81CD624 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @081CD71C movs r6, 0xFF @@ -892281,7 +892363,7 @@ sub_81CD624: ; 81CD624 mov r1, r8 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r3, r0, 0 subs r4, r3, r4 lsls r4, 16 @@ -894146,9 +894228,9 @@ sub_81CE738: ; 81CE738 lsrs r1, 16 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =gUnknown_085EBFD7 - bl gf_strcpy + bl CopyString pop {r1} bx r1 .align 2, 0 @@ -894279,7 +894361,7 @@ sub_81CE754: ; 81CE754 adds r5, 0x11 ldr r1, =gUnknown_085EBFD7 adds r0, r5, 0 - bl gf_strcpy + bl CopyString ldr r0, =0x00001821 adds r6, r0 ldrb r0, [r6] @@ -894297,7 +894379,7 @@ sub_81CE754: ; 81CE754 adds r0, r5, 0 movs r2, 0x1 movs r3, 0x4 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldrb r0, [r6] str r7, [sp] str r4, [sp, 0x4] @@ -896328,7 +896410,7 @@ sub_81CF7F4: ; 81CF7F4 adds r1, r7, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r1, r8 ldrb r0, [r1, 0x8] mov r1, r10 @@ -896446,7 +896528,7 @@ sub_81CF8E4: ; 81CF8E4 @081CF94A: ldr r4, =0x02021ec4 adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -896471,7 +896553,7 @@ sub_81CF8E4: ; 81CF8E4 @081CF97E: ldr r4, =0x02021cc4 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -896484,7 +896566,7 @@ sub_81CF8E4: ; 81CF8E4 adds r1, r7, 0 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -897721,14 +897803,14 @@ sub_81D02B0: ; 81D02B0 add r0, sp, 0xC movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 add r1, sp, 0xC movs r2, 0x38 @@ -897848,7 +897930,7 @@ sub_81D035C: ; 81D035C @081D03CC: ldr r4, =0x02021ec4 adds r0, r4, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -897873,7 +897955,7 @@ sub_81D035C: ; 81D035C @081D0402: ldr r4, =0x02021cc4 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -897886,7 +897968,7 @@ sub_81D035C: ; 81D035C mov r1, r8 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -897896,7 +897978,7 @@ sub_81D035C: ; 81D035C ldrh r1, [r7, 0x2] movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString pop {r3} mov r8, r3 pop {r4-r7} @@ -898343,7 +898425,7 @@ sub_81D06E4: ; 81D06E4 bl pokemon_getattr_encrypted @081D0752: adds r0, r5, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 pop {r4-r7} pop {r0} bx r0 @@ -899261,7 +899343,7 @@ sub_81D0E84: ; 81D0E84 adds r0, r4, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString bl sub_81AFBF0 movs r0, 0 adds r1, r4, 0 @@ -899459,7 +899541,7 @@ sub_81D0FF0: ; 81D0FF0 @081D104A: ldr r5, =0x02021cc4 adds r0, r5, 0 - bl gf_strcpy + bl CopyString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -899473,7 +899555,7 @@ sub_81D0FF0: ; 81D0FF0 ldrb r1, [r1] movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r4, r7, 24 lsrs r4, 24 movs r0, 0x1 @@ -899537,14 +899619,14 @@ sub_81D10D0: ; 81D10D0 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r1, 0xBA strb r1, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -900241,7 +900323,7 @@ sub_81D1628: ; 81D1628 cmp r1, r0 beq @081D1644 adds r0, r1, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @081D1646 @@ -900263,7 +900345,7 @@ sub_81D164C: ; 81D164C cmp r1, r0 beq @081D1668 adds r0, r1, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @081D166A @@ -900285,7 +900367,7 @@ sub_81D1670: ; 81D1670 cmp r1, r0 beq @081D168C adds r0, r1, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @081D168E @@ -900318,7 +900400,7 @@ sub_81D1694: ; 81D1694 cmp r1, r0 beq @081D16C4 adds r0, r1, 0 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 b @081D16C6 @@ -900335,7 +900417,7 @@ sub_81D1694: ; 81D1694 sub_81D16CC: ; 81D16CC push {lr} ldrh r0, [r0, 0x2] - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 pop {r1} @@ -900402,7 +900484,7 @@ sub_81D171C: ; 81D171C ldrh r0, [r1] cmp r0, r7 beq @081D1744 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 bne @081D172C @@ -900777,7 +900859,7 @@ sub_81D1920: ; 81D1920 ldrh r0, [r4] cmp r0, r8 beq @081D1958 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -900789,11 +900871,11 @@ sub_81D1920: ; 81D1920 cmp r1, r0 beq @081D1984 adds r0, r1, 0 - bl flag_set + bl FlagSet @081D1984: ldr r1, [r4] mov r0, r9 - bl ExpandTextCodes + bl ExpandStringRefs pop {r3,r4} mov r8, r3 mov r9, r4 @@ -900831,7 +900913,7 @@ sub_81D199C: ; 81D199C ldrh r0, [r4, 0x4] cmp r0, r9 beq @081D19D6 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081D19E6 @@ -900862,11 +900944,11 @@ sub_81D199C: ; 81D199C cmp r1, r0 beq @081D1A0A adds r0, r1, 0 - bl flag_set + bl FlagSet @081D1A0A: ldr r1, [r4] mov r0, r10 - bl ExpandTextCodes + bl ExpandStringRefs b @081D1A5C .align 2, 0 .pool @@ -900878,7 +900960,7 @@ sub_81D199C: ; 81D199C b @081D1A50 @081D1A24: ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081D1A50 @@ -900902,7 +900984,7 @@ sub_81D199C: ; 81D199C adds r0, r6 ldr r1, [r0] mov r0, r10 - bl ExpandTextCodes + bl ExpandStringRefs @081D1A5C: pop {r3-r5} mov r8, r3 @@ -901072,7 +901154,7 @@ sub_81D1B40: ; 81D1B40 adds r1, r7, 0x4 adds r0, r1 ldrh r0, [r0] - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081D1BA8 @@ -901175,7 +901257,7 @@ sub_81D1C20: ; 81D1C20 adds r0, r1 lsls r0, 16 lsrs r0, 16 - bl flag_set + bl FlagSet @081D1C3C: pop {r0} bx r0 @@ -901336,18 +901418,18 @@ sub_81D1D44: ; 81D1D44 ldr r0, =0x00002cca adds r1, r0 add r0, sp, 0x14 - bl gf_strcpy + bl CopyString add r0, sp, 0x14 bl sub_81DB52C add r0, sp, 0x14 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi @081D1D8C add r0, sp, 0x14 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted @081D1D8C: movs r0, 0 str r0, [sp] @@ -902998,7 +903080,7 @@ sub_81D28FC: ; 81D28FC add r0, sp, 0xC movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString lsls r3, r4, 24 lsrs r3, 24 mov r0, r10 @@ -903022,7 +903104,7 @@ sub_81D28FC: ; 81D28FC add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r5, sp, 0xC @081D2A4A: movs r0, 0x19 @@ -903047,7 +903129,7 @@ sub_81D28FC: ; 81D28FC add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString add r5, sp, 0xC @081D2A7E: movs r0, 0x29 @@ -903379,7 +903461,7 @@ sub_81D2CD0: ; 81D2CD0 adds r0, r5, 0 movs r2, 0 movs r3, 0xC - bl sub_8009128 + bl CopyStringPadded b @081D2E70 .align 2, 0 .pool @@ -903390,7 +903472,7 @@ sub_81D2CD0: ; 81D2CD0 adds r3, r5, 0 bl sub_81D2C68 adds r0, r5, 0 - bl get_end_of_string_ptr_limit_10_chars + bl GetStringEnd_Limit7 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0xB @@ -903445,7 +903527,7 @@ sub_81D2CD0: ; 81D2CD0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 bne @081D2DB0 movs r6, 0xFF @@ -903543,7 +903625,7 @@ sub_81D2CD0: ; 81D2CD0 mov r1, r8 movs r2, 0 movs r3, 0x3 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r3, r0, 0 strb r4, [r3] adds r3, 0x1 @@ -904730,7 +904812,7 @@ sub_81D3640: ; 81D3640 ldr r1, =gUnknown_085EEA73 @081D3704: adds r0, r6, 0 - bl gf_strcpy + bl CopyString mov r0, r10 str r0, [sp] mov r1, r9 @@ -904760,7 +904842,7 @@ sub_81D3640: ; 81D3640 adds r0, r6, 0 movs r2, 0 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r2, r4, 0 adds r2, 0x38 mov r1, r10 @@ -904866,7 +904948,7 @@ sub_81D3784: ; 81D3784 mov r0, r9 movs r2, 0 adds r3, r4, 0 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0x4 subs r0, r4 lsls r4, r0, 1 @@ -906242,7 +906324,7 @@ sub_81D427C: ; 81D427C beq @081D4356 @081D4304: ldr r0, =0x0000403a - bl var_get + bl VarGet lsls r0, 16 movs r1, 0xE0 lsls r1, 11 @@ -906263,7 +906345,7 @@ sub_81D427C: ; 81D427C @081D433E: strb r0, [r5, 0x1] ldr r0, =0x0000403a - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 movs r1, 0x9 @@ -907042,7 +907124,7 @@ sub_81D4890: ; 81D4890 @081D4974: ldr r4, =0x030012fc ldr r0, =0x0000403a - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 adds r1, r5, 0 @@ -907062,7 +907144,7 @@ sub_81D4998: ; 81D4998 push {r4,lr} ldr r4, =0x0000403a adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 lsrs r2, r0, 16 ldr r0, =0x03005d8c @@ -907079,22 +907161,23 @@ sub_81D4998: ; 81D4998 bls @081D49D8 adds r0, r4, 0 movs r1, 0 - bl var_set + bl VarSet b @081D49E0 .align 2, 0 .pool @081D49D8: adds r0, r4, 0 adds r1, r2, 0 - bl var_set + bl VarSet @081D49E0: pop {r4} pop {r0} bx r0 thumb_func_end sub_81D4998 - thumb_func_start sub_81D49E8 -sub_81D49E8: ; 81D49E8 + thumb_func_start is_faraway_island_mew +; BOOL is_faraway_island_mew(struct npc_state *fieldObject) +is_faraway_island_mew: ; 81D49E8 push {lr} adds r2, r0, 0 ldr r0, =0x03005d8c @@ -907115,7 +907198,7 @@ sub_81D49E8: ; 81D49E8 @081D4A0E: pop {r1} bx r1 - thumb_func_end sub_81D49E8 + thumb_func_end is_faraway_island_mew thumb_func_start unown_chamber_related unown_chamber_related: ; 81D4A14 @@ -907128,13 +907211,13 @@ unown_chamber_related: ; 81D4A14 bne @081D4A50 movs r0, 0xE5 lsls r0, 1 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq @081D4A50 ldr r0, =0x000002ce - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -907155,13 +907238,13 @@ sub_81D4A58: ; 81D4A58 push {r4,lr} ldr r4, =0x0000403a adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 ldr r1, =0xffff0000 cmp r0, r1 beq @081D4A88 adds r0, r4, 0 - bl var_get + bl VarGet lsls r0, 16 movs r1, 0xC0 lsls r1, 10 @@ -907231,7 +907314,7 @@ sub_81D4A90: ; 81D4A90 @081D4AF8: ldr r0, =0x0000403a ldr r1, =0x0000ffff - bl var_set + bl VarSet ldrb r0, [r5, 0x3] movs r1, 0x4 orrs r0, r1 @@ -907512,7 +907595,7 @@ sub_81D4D24: ; 81D4D24 lsrs r4, 24 ldr r5, =0x030012fc ldr r0, =0x0000403a - bl var_get + bl VarGet lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -908780,7 +908863,7 @@ sub_81D572C: ; 81D572C adds r1, 0x4 adds r0, r1 adds r0, 0x10 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081D580E .align 2, 0 .pool @@ -908802,7 +908885,7 @@ sub_81D572C: ; 81D572C adds r1, 0x4 adds r0, r1 adds r0, 0x1C - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081D580E .align 2, 0 .pool @@ -908824,7 +908907,7 @@ sub_81D572C: ; 81D572C adds r1, 0x4 adds r0, r1 adds r0, 0x28 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString b @081D580E .align 2, 0 .pool @@ -908846,7 +908929,7 @@ sub_81D572C: ; 81D572C adds r1, 0x4 adds r0, r1 adds r0, 0x34 - bl sub_81638AC + bl ConvertBattleFrontierTrainerSpeechToString @081D580E: bl sub_81D5710 pop {r4-r6} @@ -909255,17 +909338,17 @@ sub_81D5B2C: ; 81D5B2C adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021dc4 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r0, =0x02021ec4 adds r1, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString pop {r4-r7} pop {r0} bx r0 @@ -909286,7 +909369,7 @@ sub_81D5BBC: ; 81D5BBC ldrb r1, [r1, 0x6] movs r2, 0 movs r3, 0x1 - bl decimal_int_to_string + bl ConvertIntToDecimalString ldr r1, =0x020375f0 movs r0, 0 b @081D5BF0 @@ -909322,7 +909405,7 @@ sub_81D5C00: ; 81D5C00 sub_81D5C18: ; 81D5C18 push {lr} ldr r0, =0x000040d6 - bl var_get + bl VarGet lsls r0, 16 cmp r0, 0 beq @081D5C42 @@ -909458,7 +909541,7 @@ sub_81D5C8C: ; 81D5C8C adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString adds r0, r5, 0 movs r1, 0x3C bl __udivsi3 @@ -909471,7 +909554,7 @@ sub_81D5C8C: ; 81D5C8C adds r1, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString movs r0, 0xA8 muls r0, r5 movs r1, 0x64 @@ -909480,12 +909563,12 @@ sub_81D5C8C: ; 81D5C8C ldr r0, =0x02021ec4 movs r2, 0x2 movs r3, 0x2 - bl decimal_int_to_string + bl ConvertIntToDecimalString mov r0, r9 ldr r1, =gUnknown_085EF895 - bl gf_strcpy + bl CopyString ldr r1, =gUnknown_085EF8A3 - bl ExpandTextCodes + bl ExpandStringRefs movs r0, 0x1 mov r1, r9 movs r2, 0xD0 @@ -910650,7 +910733,7 @@ sub_81D6640: ; 81D6640 lsls r0, 1 subs r4, r0 ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081D66A0 @@ -916791,7 +916874,7 @@ sub_81D99BC: ; 81D99BC bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0x1 b @081D99DE .align 2, 0 @@ -916812,7 +916895,7 @@ sub_81D99E4: ; 81D99E4 bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString movs r0, 0 str r0, [sp] ldr r0, =sub_81D9A1C @@ -916871,7 +916954,7 @@ sub_81D9A1C: ; 81D9A1C bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl gf_strcpy + bl CopyString ldr r1, =0x03005dac ldr r0, =sub_80AF168 str r0, [r1] @@ -916897,7 +916980,7 @@ sub_81D9A98: ; 81D9A98 bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl sub_8008C44 + bl CompareString cmp r0, 0 beq @081D9ABA movs r0, 0 @@ -917012,7 +917095,7 @@ sub_81D9B68: ; 81D9B68 lsrs r0, 16 mov r9, r0 adds r0, r5, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0xF @@ -917443,7 +917526,7 @@ sub_81D9DE4: ; 81D9DE4 adds r0, 0x2C strb r1, [r0] ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 lsrs r0, 24 negs r0, r0 @@ -918259,7 +918342,7 @@ sub_81DA488: ; 81DA488 sub_81DA57C: ; 81DA57C push {lr} ldr r0, =0x00000864 - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081DA5CA @@ -918273,7 +918356,7 @@ sub_81DA57C: ; 81DA57C cmp r0, 0x1E bhi @081DA5CA movs r0, 0x5B - bl flag_check + bl FlagGet lsls r0, 24 cmp r0, 0 beq @081DA5C0 @@ -920238,12 +920321,12 @@ sub_81DB468: ; 81DB468 ldr r1, =gPokedexEntries adds r2, r1 adds r1, r2, 0 - bl gf_strcpy + bl CopyString movs r1, 0 strb r1, [r0] adds r0, 0x1 ldr r1, =gUnknown_085E8268 - bl gf_strcpy + bl CopyString pop {r0} bx r0 .align 2, 0 @@ -920259,7 +920342,7 @@ sub_81DB494: ; 81DB494 cmp r5, 0 beq @081DB4B6 adds r1, r5, 0 - bl gf_strcpy + bl CopyString adds r4, r0, 0 lsls r0, r6, 24 lsrs r0, 24 @@ -920297,9 +920380,9 @@ sub_81DB4DC: ; 81DB4DC adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 - bl sub_8009370 + bl StripExtendedControlCodes adds r0, r4, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 24 lsrs r1, r0, 24 cmp r5, 0xFC @@ -920340,18 +920423,18 @@ sub_81DB4DC: ; 81DB4DC sub_81DB52C: ; 81DB52C push {r4,lr} adds r4, r0, 0 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi @081DB546 adds r0, r4, 0 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @081DB54C @081DB546: adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes @081DB54C: pop {r4} pop {r0} @@ -920364,20 +920447,20 @@ sub_81DB554: ; 81DB554 adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 - bl sub_8008C24 + bl GetStringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi @081DB572 adds r0, r4, 0 movs r1, 0x1 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted b @081DB5A4 @081DB572: cmp r5, 0xFC bne @081DB57E adds r0, r4, 0 - bl sub_8009370 + bl StripExtendedControlCodes b @081DB5A4 @081DB57E: adds r1, r4, 0 @@ -920451,12 +920534,12 @@ sub_81DB5E8: ; 81DB5E8 push {r4,r5,lr} adds r5, r0, 0 adds r4, r2, 0 - bl gf_strcpy + bl CopyString lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 adds r1, r4, 0 - bl sub_8009308 + bl StopMusicWhileStringIsPrinted pop {r4,r5} pop {r0} bx r0 diff --git a/asm/gpu_obj.s b/asm/gpu_obj.s index aa70dd3b8..c1051759f 100644 --- a/asm/gpu_obj.s +++ b/asm/gpu_obj.s @@ -1490,6 +1490,7 @@ copy_queue_process: ; 800742C thumb_func_end copy_queue_process thumb_func_start copy_queue_add_oam_frame +; void copy_queue_add_oam_frame(u16 frameIndex, u16 targetTileNum, struct obj_tiles *frames) copy_queue_add_oam_frame: ; 8007488 push {r4-r6,lr} adds r5, r2, 0 @@ -2325,6 +2326,7 @@ obj_anim_rewind_to_cmd00: ; 8007A1C thumb_func_end obj_anim_rewind_to_cmd00 thumb_func_start obj_anim_rotscale_begin +; void obj_anim_rotscale_begin(struct obj *obj) obj_anim_rotscale_begin: ; 8007A90 push {r4-r7,lr} sub sp, 0x8 @@ -2396,6 +2398,7 @@ obj_anim_rotscale_begin: ; 8007A90 thumb_func_end obj_anim_rotscale_begin thumb_func_start obj_anim_rotscale_continue +; void obj_anim_rotscale_continue(struct obj *obj) obj_anim_rotscale_continue: ; 8007B24 push {r4,r5,lr} adds r4, r0, 0 @@ -2513,6 +2516,7 @@ sub_8007BD8: ; 8007BD8 thumb_func_end sub_8007BD8 thumb_func_start anim_rotscale_0 +; void anim_rotscale_0(u8 index, struct obj *obj) anim_rotscale_0: ; 8007C0C push {lr} adds r3, r1, 0 @@ -2660,6 +2664,7 @@ obj_anim_rotscale_rewind_to_cmd00_maybe: ; 8007CAC thumb_func_end obj_anim_rotscale_rewind_to_cmd00_maybe thumb_func_start anim_rotscale_1 +; void anim_rotscale_1(u8 index, struct obj *obj) anim_rotscale_1: ; 8007D18 push {r4-r6,lr} sub sp, 0x8 @@ -2699,6 +2704,7 @@ anim_rotscale_1: ; 8007D18 thumb_func_end anim_rotscale_1 thumb_func_start anim_rotscale_2 +; void anim_rotscale_2(u8 index, struct obj *obj) anim_rotscale_2: ; 8007D64 push {lr} sub sp, 0x8 @@ -2731,6 +2737,7 @@ anim_rotscale_2: ; 8007D64 thumb_func_end anim_rotscale_2 thumb_func_start anim_rotscale_3 +; void anim_rotscale_3(u8 index, struct obj *obj) anim_rotscale_3: ; 8007DA0 push {r4,r5,lr} sub sp, 0x8 @@ -3213,7 +3220,7 @@ divide_0x10000_by: ; 80080E4 thumb_func_end divide_0x10000_by thumb_func_start rotscale_load_frame -; void rotscale_load_frame(u8 index, int a2, int a3) +; void rotscale_load_frame(u8 index, struct obj *obj, rotscale_frame *a3) rotscale_load_frame: ; 80080FC push {r4,lr} lsls r0, 24 @@ -3305,6 +3312,7 @@ sub_8008168: ; 8008168 thumb_func_end sub_8008168 thumb_func_start obj_anim_image_start +; void obj_anim_image_start(struct obj *object, u8 a2) obj_anim_image_start: ; 80081A8 adds r2, r0, 0 adds r2, 0x2A @@ -3764,7 +3772,7 @@ sub_8008478: ; 8008478 thumb_func_end sub_8008478 thumb_func_start gpu_tile_obj_alloc_tag_and_copy_to_vram -; int gpu_tile_obj_alloc_tag_and_copy_to_vram(struct rom_obj_tile_data *x) +; int gpu_tile_obj_alloc_tag_and_copy_to_vram(struct obj_tiles *x) gpu_tile_obj_alloc_tag_and_copy_to_vram: ; 80084F8 push {r4-r6,lr} adds r5, r0, 0 @@ -3801,7 +3809,7 @@ gpu_tile_obj_alloc_tag_and_copy_to_vram: ; 80084F8 thumb_func_end gpu_tile_obj_alloc_tag_and_copy_to_vram thumb_func_start gpu_tile_obj_alloc_and_load_multiple -; void gpu_tile_obj_alloc_and_load_multiple(struct rom_obj_tile_data[]) +; void gpu_tile_obj_alloc_and_load_multiple(struct obj_tiles[]) gpu_tile_obj_alloc_and_load_multiple: ; 800853C push {r4,r5,lr} adds r5, r0, 0 @@ -4332,7 +4340,7 @@ super_sprite_add: ; 8008880 thumb_func_end super_sprite_add thumb_func_start sub_80088EC -; int sub_80088EC(struct obj *obj, int a2, int a3) +; int sub_80088EC(struct obj *obj, struct sprite *a2, int a3) sub_80088EC: ; 80088EC push {r4-r7,lr} mov r7, r10 diff --git a/asm/window.s b/asm/window.s index ae74969eb..767b8b418 100644 --- a/asm/window.s +++ b/asm/window.s @@ -1408,7 +1408,7 @@ Window_FastFillPixels: ; 8003C48 thumb_func_end Window_FastFillPixels thumb_func_start Window_ScrollVertically -; int Window_ScrollVertically(u8 a1, u8 mode, u8 a3, int a4) +; void Window_ScrollVertically(u8 windowId, u8 direction, u8 distance, u8 fillValue) Window_ScrollVertically: ; 8003C94 push {r4-r7,lr} mov r7, r10