From 12681346688870e71b1a33dae7e52f9e1302080f Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 14 Jan 2017 11:53:20 -0800 Subject: [PATCH] decompile string_util --- Makefile | 6 +- asm/battle_814AEAC.s | 4 +- asm/battle_message.s | 90 +- asm/battle_records.s | 64 +- asm/battle_setup.s | 32 +- asm/battle_transition.s | 4 +- asm/berry.s | 32 +- asm/berry_blender.s | 140 +- asm/berry_tag_screen.s | 26 +- asm/big_shroomish_barboach.s | 26 +- asm/cable_car.s | 4 +- asm/cable_club.s | 40 +- asm/coins.s | 16 +- asm/contest.s | 240 ++-- asm/contest_link_80F57C4.s | 38 +- asm/contest_painting.s | 30 +- asm/daycare.s | 96 +- asm/decoration.s | 140 +- asm/dewford_trend.s | 24 +- asm/diploma.s | 12 +- asm/easy_chat.s | 100 +- asm/egg_hatch.s | 34 +- asm/evolution_scene.s | 50 +- asm/field_camera.s | 12 +- asm/field_door.s | 2 +- asm/field_effect_helpers.s | 4 +- asm/field_ground_effect.s | 8 +- asm/field_map_obj.s | 20 +- asm/field_message_box.s | 8 +- asm/field_poison.s | 4 +- asm/fieldmap.s | 36 +- asm/flag.s | 2 +- asm/fldeff_80F9BCC.s | 16 +- asm/fldeff_emotion.s | 4 +- asm/fldeff_strength.s | 2 +- asm/intro.s | 2 +- asm/item.s | 40 +- asm/item_use.s | 58 +- asm/link.s | 802 +++++------ asm/load_save.s | 68 +- asm/lottery_corner.s | 8 +- asm/mail.s | 12 +- asm/main.s | 4 +- asm/main_menu.s | 80 +- asm/mauville_old_man.s | 102 +- asm/menu_helpers.s | 10 +- asm/mon_markings.s | 2 +- asm/money.s | 20 +- asm/mystery_event_menu.s | 14 +- asm/mystery_event_script.s | 76 +- asm/naming_screen.s | 44 +- asm/new_game.s | 16 +- asm/option_menu.s | 8 +- asm/play_time.s | 8 +- asm/player_pc.s | 90 +- asm/pokedex.s | 52 +- asm/pokedex_area_screen.s | 6 +- asm/pokemon_1.s | 14 +- asm/pokemon_2.s | 8 +- asm/porthole.s | 4 +- asm/record_mixing.s | 60 +- asm/region_map.s | 32 +- asm/reset_rtc_screen.s | 34 +- asm/rom3.s | 2 +- asm/rom4.s | 96 +- asm/rom5.s | 4 +- asm/rom6.s | 302 ++-- asm/rom_8034C54.s | 148 +- asm/rom_806BD04.s | 32 +- asm/rom_8072304.s | 36 +- asm/rom_809BEDC.s | 14 +- asm/rom_809D7BC.s | 6 +- asm/rom_80AEFFC.s | 2 +- asm/rom_80C6FA0.s | 112 +- asm/rom_8158B30.s | 420 +++--- asm/rom_816F318.s | 30 +- asm/rom_81795E8.s | 32 +- asm/rom_8184DA4.s | 2234 ++++++++++++++--------------- asm/rom_81BAD84.s | 566 ++++---- asm/rotating_gate.s | 6 +- asm/roulette.s | 28 +- asm/rtc.s | 28 +- asm/safari_zone.s | 14 +- asm/save.s | 4 +- asm/scrcmd.s | 62 +- asm/script.s | 12 +- asm/script_menu.s | 12 +- asm/script_pokemon_util_80F87D8.s | 18 +- asm/secret_base.s | 104 +- asm/shop.s | 74 +- asm/start_menu.s | 32 +- asm/string_util.s | 1058 +------------- asm/text.s | 6 +- asm/text_window.s | 4 +- asm/trade.s | 126 +- asm/trader.s | 34 +- asm/trainer_card.s | 138 +- asm/truck_scene.s | 8 +- asm/tv.s | 1542 ++++++++++---------- asm/var.s | 2 +- asm/weather.s | 10 +- asm/wild_encounter.s | 24 +- data/string_util.s | 38 +- include/global.h | 77 + include/string_util.h | 32 + include/text.h | 14 + ld_script.txt | 1 + src/string_util.c | 544 +++++++ sym_common.txt | 4 +- sym_ewram.txt | 10 +- 110 files changed, 5405 insertions(+), 5737 deletions(-) create mode 100644 include/string_util.h create mode 100644 include/text.h create mode 100644 src/string_util.c diff --git a/Makefile b/Makefile index c18522379..221c54e24 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,11 @@ $(C_OBJS): %.o : %.c @echo -e ".text\n\t.align\t2, 0\n" >> $*.s $(AS) $(ASFLAGS) -o $@ $*.s -%.o : dep = $(shell $(SCANINC) $*.s) +ifeq ($(NODEP),) +%.o: dep = $(shell $(SCANINC) $*.s) +else +%.o: dep := +endif $(ASM_OBJS): %.o: %.s $$(dep) $(AS) $(ASFLAGS) -o $@ $< diff --git a/asm/battle_814AEAC.s b/asm/battle_814AEAC.s index 5f18788e5..d4568dd5f 100644 --- a/asm/battle_814AEAC.s +++ b/asm/battle_814AEAC.s @@ -1436,7 +1436,7 @@ _0814BA08: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -5604,7 +5604,7 @@ sub_814E040: @ 814E040 adds r0, r1 ldrb r0, [r0] strb r0, [r2] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldrb r0, [r5] lsls r0, 9 diff --git a/asm/battle_message.s b/asm/battle_message.s index 149ad531a..201cc6ee0 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -491,7 +491,7 @@ _0814E4F8: adds r1, r2 ldr r2, =gUnknown_085CCBBC adds r1, r2 - bl CopyString + bl StringCopy b _0814E544 .pool _0814E534: @@ -501,7 +501,7 @@ _0814E534: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy _0814E544: ldr r0, =gUnknown_02022F68 bl sub_814F950 @@ -872,7 +872,7 @@ _0814E8A0: ldrb r0, [r5] cmp r0, 0xFD bne _0814E8B8 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r5, 0 b _0814E8F0 .pool @@ -891,7 +891,7 @@ _0814E8CE: ldrb r0, [r1] cmp r0, 0xFD bne _0814E904 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 b _0814E8EE .pool _0814E8E4: @@ -899,7 +899,7 @@ _0814E8E4: ldrb r0, [r1] cmp r0, 0xFD bne _0814E904 - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 _0814E8EE: adds r0, r1, 0 _0814E8F0: @@ -911,15 +911,15 @@ _0814E904: adds r4, r1, 0 bl _0814F5C0 _0814E90A: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl _0814F5C0 .pool _0814E914: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 bl _0814F5C0 .pool _0814E920: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 bl _0814F5C0 .pool _0814E92C: @@ -938,7 +938,7 @@ _0814E92C: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814E960: @@ -957,7 +957,7 @@ _0814E960: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814E994: @@ -976,7 +976,7 @@ _0814E994: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814E9C8: @@ -995,7 +995,7 @@ _0814E9C8: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814E9FC: @@ -1017,7 +1017,7 @@ _0814E9FC: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EA38: @@ -1041,7 +1041,7 @@ _0814EA38: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EA78: @@ -1065,7 +1065,7 @@ _0814EA78: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EAB8: @@ -1089,7 +1089,7 @@ _0814EAB8: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EAF8: @@ -1162,7 +1162,7 @@ _0814EB74: bl pokemon_getattr _0814EB9E: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EBB0: @@ -1215,7 +1215,7 @@ _0814EBF8: bl pokemon_getattr _0814EC24: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EC38: @@ -1280,7 +1280,7 @@ _0814ECA8: bl pokemon_getattr _0814ECC2: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814ECD4: @@ -1345,7 +1345,7 @@ _0814ED44: bl pokemon_getattr _0814ED5E: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814ED70: @@ -1410,7 +1410,7 @@ _0814EDE0: bl pokemon_getattr _0814EDFA: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 bl _0814F5BE .pool _0814EE0C: @@ -1475,7 +1475,7 @@ _0814EE7C: bl pokemon_getattr _0814EE96: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 b _0814F5BE .pool _0814EEA8: @@ -1540,7 +1540,7 @@ _0814EF18: bl pokemon_getattr _0814EF32: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 b _0814F5BE .pool _0814EF44: @@ -1625,10 +1625,10 @@ _0814EFEC: ldr r0, =gUnknown_02024404 adds r1, r0 mov r0, sp - bl CopyString + bl StringCopy ldr r1, =gUnknown_085CC0AD mov r0, sp - bl AppendString + bl StringAppend b _0814F5BE .pool _0814F014: @@ -1651,10 +1651,10 @@ _0814F014: ldr r0, =gUnknown_02024404 adds r1, r0 mov r0, sp - bl CopyString + bl StringCopy ldr r1, =gUnknown_085CC0AD mov r0, sp - bl AppendString + bl StringAppend b _0814F5BE .pool _0814F05C: @@ -1804,7 +1804,7 @@ _0814F178: ldr r0, [r0] ldrb r1, [r0, 0xD] mov r0, sp - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _0814F5BE .pool _0814F1AC: @@ -1933,7 +1933,7 @@ _0814F298: b _0814F5C0 .pool _0814F2B4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] b _0814F5C0 .pool @@ -2044,7 +2044,7 @@ _0814F39C: bl pokemon_getattr _0814F3B4: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 b _0814F5BE .pool _0814F3C4: @@ -2218,7 +2218,7 @@ _0814F556: movs r0, 0x1 _0814F55A: bl sub_81A36D0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 b _0814F5C0 .pool _0814F574: @@ -2233,7 +2233,7 @@ _0814F580: movs r0, 0x3 _0814F584: bl sub_81D572C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 b _0814F5C0 .pool _0814F594: @@ -2437,7 +2437,7 @@ _0814F706: adds r0, r6, 0 mov r1, r8 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r5, 0x3 ldrb r4, [r4, 0x1] adds r5, r0, r4 @@ -2487,13 +2487,13 @@ _0814F768: beq _0814F788 ldr r1, =gUnknown_085CBD8B adds r0, r6, 0 - bl AppendString + bl StringAppend b _0814F790 .pool _0814F788: ldr r1, =gUnknown_085CBD85 adds r0, r6, 0 - bl AppendString + bl StringAppend _0814F790: adds r0, r5, r7 ldrb r1, [r0, 0x2] @@ -2506,10 +2506,10 @@ _0814F790: bl pokemon_getattr _0814F7A4: mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r6, 0 mov r1, sp - bl AppendString + bl StringAppend b _0814F8DE .pool _0814F7BC: @@ -2558,7 +2558,7 @@ _0814F808: bl pokemon_getattr _0814F81A: adds r0, r6, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 b _0814F8DE .pool _0814F828: @@ -2580,7 +2580,7 @@ _0814F846: adds r1, r0 _0814F848: adds r0, r6, 0 - bl AppendString + bl StringAppend adds r5, 0x2 b _0814F8E0 .pool @@ -2617,7 +2617,7 @@ _0814F858: ldr r0, =gUnknown_02024404 adds r1, r0 adds r0, r6, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085CC0AD b _0814F8BE .pool @@ -2625,7 +2625,7 @@ _0814F8BC: ldr r1, =gUnknown_085CC0A0 _0814F8BE: adds r0, r6, 0 - bl AppendString + bl StringAppend b _0814F8DE .pool _0814F8CC: @@ -2681,7 +2681,7 @@ _0814F918: bgt _0814F938 ldr r1, =gUnknown_085CCBB5 adds r0, r4, 0 - bl CopyString + bl StringCopy b _0814F944 .pool _0814F938: @@ -2689,7 +2689,7 @@ _0814F938: bgt _0814F944 ldr r1, =gUnknown_085CCBB9 adds r0, r4, 0 - bl CopyString + bl StringCopy _0814F944: pop {r4,r5} pop {r0} @@ -2759,13 +2759,13 @@ _0814F9C8: ldr r1, =gUnknown_085CBDBD _0814F9CA: adds r0, r3, 0 - bl CopyString + bl StringCopy b _0814F9E0 .pool _0814F9D8: ldr r1, =gUnknown_085CBDBF adds r0, r3, 0 - bl CopyString + bl StringCopy _0814F9E0: pop {r4,r5} pop {r0} diff --git a/asm/battle_records.s b/asm/battle_records.s index 5e71f4f48..5c4ea6688 100644 --- a/asm/battle_records.s +++ b/asm/battle_records.s @@ -80,7 +80,7 @@ _0813C014: adds r0, r4, 0 adds r1, r7, 0 movs r2, 0x7 - bl CompareString_LimitN + bl StringCompareN cmp r0, 0 bne _0813C02C ldrh r0, [r4, 0x8] @@ -307,7 +307,7 @@ sub_813C170: @ 813C170 adds r0, r4, 0 mov r1, r8 movs r2, 0x7 - bl CopyString_LimitN + bl StringCopyN strh r7, [r4, 0x8] adds r2, r6, 0 adds r2, 0x54 @@ -339,7 +339,7 @@ _0813C1D4: thumb_func_start sub_813C1F8 sub_813C1F8: @ 813C1F8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003150 adds r0, r1 @@ -433,7 +433,7 @@ sub_813C2A0: @ 813C2A0 beq _0813C2DA adds r0, r4, 0 bl sub_813C264 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003150 adds r0, r1 @@ -463,34 +463,34 @@ _0813C2DA: sub_813C2F4: @ 813C2F4 push {r4,lr} sub sp, 0xC - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0x17 bl sub_80847F8 adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 movs r0, 0x18 bl sub_80847F8 adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar3 movs r0, 0x19 bl sub_80847F8 adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF6A1 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0xD0 @@ -576,17 +576,17 @@ sub_813C384: @ 813C384 b _0813C4A8 .pool _0813C40C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0x8 - bl RepeatStringTerminator - ldr r0, =gUnknown_02021CC4 + bl StringFillWithTerminator + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x7 - bl CopyString_LimitN + bl StringCopyN lsls r1, r5, 24 lsrs r1, 24 - ldr r0, =gUnknown_02021CC4 - bl StopMusicWhileStringIsPrinted + ldr r0, =gStringVar1 + bl ConvertInternationalString ldr r0, =gUnknown_0203AB74 mov r8, r0 ldrb r0, [r0] @@ -599,49 +599,49 @@ _0813C40C: str r5, [sp, 0x4] str r5, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r3, 0x8 bl Print ldrh r1, [r6, 0xA] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r1, r8 ldrb r0, [r1] str r4, [sp] str r5, [sp, 0x4] str r5, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r3, 0x50 bl Print ldrh r1, [r6, 0xC] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r1, r8 ldrb r0, [r1] str r4, [sp] str r5, [sp, 0x4] str r5, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r3, 0x80 bl Print ldrh r1, [r6, 0xE] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r1, r8 ldrb r0, [r1] str r4, [sp] str r5, [sp, 0x4] str r5, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r3, 0xB0 bl Print _0813C4A8: @@ -671,10 +671,10 @@ sub_813C4BC: @ 813C4BC ldrb r0, [r6] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EF68D adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r5, 0 movs r2, 0xD0 @@ -690,7 +690,7 @@ sub_813C4BC: @ 813C4BC str r4, [sp, 0x8] adds r2, r5, 0 bl Print - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r0, [r0] ldr r1, =0x00003150 @@ -699,7 +699,7 @@ sub_813C4BC: @ 813C4BC bl sub_813C2F4 ldr r1, =gUnknown_085EF6BD adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r0, [r6] movs r1, 0x29 str r1, [sp] diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 29a1dee6f..aee1c1d95 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -775,7 +775,7 @@ _080B0CF2: movs r0, 0x4 b _080B0D1A _080B0CF6: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xE0 @@ -1290,7 +1290,7 @@ _080B10C8: b _080B1112 .pool _080B10EC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000cb2 adds r0, r1, r2 @@ -1673,7 +1673,7 @@ battle_80801F0: @ 80B13F8 strh r1, [r0] lsls r0, r1, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -2633,11 +2633,11 @@ _080B1CBC: ldr r0, =gUnknown_02038BDC ldr r0, [r0] _080B1CC0: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 bl ReturnEmptyStringIfNull adds r1, r0, 0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 pop {r4} pop {r1} @@ -2648,13 +2648,13 @@ _080B1CC0: thumb_func_start sub_80B1CE0 sub_80B1CE0: @ 80B1CE0 push {r4,lr} - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, =gUnknown_02038BE0 ldr r0, [r0] bl ReturnEmptyStringIfNull adds r1, r0, 0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 pop {r4} pop {r1} @@ -2801,7 +2801,7 @@ _080B1DCE: cmp r0, 0 bne _080B1DCA _080B1DE2: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -2841,7 +2841,7 @@ _080B1E1A: bl sub_80B1D94 cmp r0, 0 bne _080B1E74 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -2920,7 +2920,7 @@ sub_80B1EC0: @ 80B1EC0 movs r1, 0 adds r3, r0, 0 adds r3, 0xA - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr _080B1ED2: ldrh r0, [r3] cmp r0, r4 @@ -2994,7 +2994,7 @@ sub_80B1F38: @ 80B1F38 beq _080B1F6C cmp r1, 0x63 bgt _080B1F6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000009ca adds r0, r2 @@ -3025,7 +3025,7 @@ sub_80B1F74: @ 80B1F74 beq _080B1FA8 cmp r1, 0x63 bgt _080B1FA8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000009ca adds r0, r2 @@ -3153,7 +3153,7 @@ sub_80B205C: @ 80B205C negs r0, r0 cmp r1, r0 beq _080B207E - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000009ca adds r0, r2 @@ -3284,7 +3284,7 @@ sub_80B215C: @ 80B215C bl sub_80B2128 cmp r0, 0 beq _080B2184 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000009c8 adds r1, r0, r2 @@ -3309,7 +3309,7 @@ sub_80B2188: @ 80B2188 bl sub_80B2128 cmp r0, 0 beq _080B21AC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009c8 adds r0, r1 @@ -3342,7 +3342,7 @@ sub_80B21B4: @ 80B21B4 bl sub_80B1DFC cmp r0, 0x1 bne _080B21E0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009c8 adds r0, r1 diff --git a/asm/battle_transition.s b/asm/battle_transition.s index 9d11fd99d..51fdcecba 100644 --- a/asm/battle_transition.s +++ b/asm/battle_transition.s @@ -3575,7 +3575,7 @@ sub_8147C24: @ 8147C24 movs r2, 0x20 bl gpu_pal_apply ldr r1, =gUnknown_085C8FF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] lsls r0, 2 @@ -4293,7 +4293,7 @@ sub_8148218: @ 8148218 lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x22] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 diff --git a/asm/berry.s b/asm/berry.s index 0d4daef45..6b6e559e9 100644 --- a/asm/berry.s +++ b/asm/berry.s @@ -12,7 +12,7 @@ sub_80E15B8: @ 80E15B8 mov r1, sp movs r0, 0 strh r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x000031f8 adds r1, r0 @@ -29,7 +29,7 @@ sub_80E15B8: @ 80E15B8 sub_80E15E4: @ 80E15E4 push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031f8 adds r3, r0, r1 @@ -69,7 +69,7 @@ _080E1618: thumb_func_start sub_80E162C sub_80E162C: @ 80E162C push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] ldr r2, =0x0000320c adds r0, r1, r2 @@ -112,7 +112,7 @@ GetBerryInfo: @ 80E167C bl sub_80E162C cmp r0, 0 beq _080E16A0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031f8 b _080E16B4 @@ -141,7 +141,7 @@ _080E16B4: @ struct BerryTreeInfo *GetBerryTreeInfo(u8 berryTreeId) GetBerryTreeInfo: @ 80E16C0 lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsrs r0, 21 ldr r2, =0x0000169c adds r0, r2 @@ -261,7 +261,7 @@ _080E178E: RemoveAllBerryTrees: @ 80E1794 push {r4-r6,lr} movs r2, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r5, =0x0000169c ldr r0, =gUnknown_0858ABD0 ldr r3, [r0] @@ -378,7 +378,7 @@ BerryTreeTimeUpdate: @ 80E1870 adds r6, r0, 0 movs r2, 0 _080E1876: - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsls r0, r2, 3 ldr r3, =0x0000169c adds r0, r3 @@ -518,7 +518,7 @@ _080E197A: @ void RemoveBerryTree(u8 berryTreeId) RemoveBerryTree: @ 80E1984 lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsrs r0, 21 adds r2, r0 @@ -537,7 +537,7 @@ RemoveBerryTree: @ 80E1984 @ u8 GetBerryTypeByBerryTreeId(u8 berryTreeId) GetBerryTypeByBerryTreeId: @ 80E19AC lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsrs r0, 21 adds r1, r0 @@ -552,7 +552,7 @@ GetBerryTypeByBerryTreeId: @ 80E19AC @ u8 GetStageByBerryTreeId(u8 berryTreeId) GetStageByBerryTreeId: @ 80E19C8 lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsrs r0, 21 adds r1, r0 @@ -793,7 +793,7 @@ CalcBerryYield: @ 80E1B38 @ u8 GetBerryCountByBerryTreeId(u8 berryTreeId) GetBerryCountByBerryTreeId: @ 80E1B64 lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsrs r0, 21 adds r1, r0 @@ -838,7 +838,7 @@ FieldObjectInteractionGetBerryTreeData: @ 80E1B94 bl ResetBerryTreeSparkleFlag ldr r0, =gUnknown_020375F2 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -871,7 +871,7 @@ _080E1BEE: lsls r0, 24 lsrs r0, 24 strh r0, [r4] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 ldrh r2, [r4] adds r0, r6, 0 bl GetBerryCountStringByBerryType @@ -893,7 +893,7 @@ FieldObjectInteractionGetBerryName: @ 80E1C2C bl GetBerryTypeByBerryTreeId lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetBerryNameByBerryType pop {r0} bx r0 @@ -920,7 +920,7 @@ FieldObjectInteractionGetBerryCountString: @ 80E1C54 adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetBerryCountStringByBerryType pop {r4,r5} @@ -1013,7 +1013,7 @@ FieldObjectInteractionRemoveBerryTree: @ 80E1D28 bl RemoveBerryTree ldr r0, =gUnknown_020375F2 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] diff --git a/asm/berry_blender.s b/asm/berry_blender.s index 3dcd0e3cb..abbb7a597 100644 --- a/asm/berry_blender.s +++ b/asm/berry_blender.s @@ -771,7 +771,7 @@ sub_807FE14: @ 807FE14 strh r5, [r6] adds r0, r6, 0x2 adds r1, r4, 0 - bl CopyString + bl StringCopy ldrb r0, [r4, 0x15] strb r0, [r6, 0x9] ldrb r0, [r4, 0x16] @@ -821,10 +821,10 @@ _0807FE7C: movs r1, 0x2 strb r1, [r0] ldr r4, =gUnknown_020229F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0xD0 lsls r0, 2 bl FlagGet @@ -835,7 +835,7 @@ _0807FE7C: adds r0, 0x1C ldr r1, =gUnknown_083397D0 ldr r1, [r1, 0xC] - bl CopyString + bl StringCopy b _0807FED4 .pool _0807FEC8: @@ -843,7 +843,7 @@ _0807FEC8: adds r0, 0x1C ldr r1, =gUnknown_083397D0 ldr r1, [r1] - bl CopyString + bl StringCopy _0807FED4: ldr r1, =gUnknown_020229E8 movs r0, 0x2 @@ -860,19 +860,19 @@ _0807FEE8: movs r1, 0x3 strb r1, [r0] ldr r6, =gUnknown_020229F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r6, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 adds r0, 0x1C ldr r4, =gUnknown_083397D0 ldr r1, [r4, 0x10] - bl CopyString + bl StringCopy adds r0, r6, 0 adds r0, 0x38 ldr r1, [r4, 0x8] - bl CopyString + bl StringCopy adds r0, r6, 0 subs r0, 0x8 strh r5, [r0, 0x1A] @@ -890,23 +890,23 @@ _0807FF3C: movs r1, 0x4 strb r1, [r0] ldr r5, =gUnknown_020229F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r5, 0 - bl CopyString + bl StringCopy adds r0, r5, 0 adds r0, 0x1C ldr r4, =gUnknown_083397D0 ldr r1, [r4, 0x14] - bl CopyString + bl StringCopy adds r0, r5, 0 adds r0, 0x38 ldr r1, [r4, 0x4] - bl CopyString + bl StringCopy adds r0, r5, 0 adds r0, 0x54 ldr r1, [r4, 0x8] - bl CopyString + bl StringCopy adds r0, r5, 0 subs r0, 0x8 movs r1, 0x2 @@ -1938,7 +1938,7 @@ _080807E4: ldr r0, =gUnknown_020229F0 adds r1, r0 add r0, sp, 0x8 - bl CopyString + bl StringCopy movs r0, 0x1 add r1, sp, 0x8 movs r2, 0x38 @@ -3652,7 +3652,7 @@ _0808175A: ldrb r0, [r1] cmp r0, 0 bne _0808182C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x2 @@ -3883,7 +3883,7 @@ help_system_is_not_first_time: @ 8081964 bne _080819A2 adds r0, r4, 0x2 adds r1, r5, 0x2 - bl CompareString + bl StringCompare cmp r0, 0 bne _080819B0 ldr r0, [r4, 0x8] @@ -5544,7 +5544,7 @@ _080826EC: adds r0, 0x63 movs r1, 0x3 strb r1, [r0] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, [r6] adds r0, 0x6E ldrh r0, [r0] @@ -5554,7 +5554,7 @@ _080826EC: ldr r0, =gUnknown_020229F0 adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_083398DD b _08082740 .pool @@ -5564,7 +5564,7 @@ _0808271C: ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, [r6] adds r0, 0x6E ldrh r0, [r0] @@ -5574,18 +5574,18 @@ _0808271C: ldr r0, =gUnknown_020229F0 adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_083398B0 _08082740: adds r0, r4, 0 - bl AppendString + bl StringAppend b _080828DC .pool _08082754: ldr r4, [r6] ldr r0, =0x000011b8 adds r4, r0 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 bl sav2_get_text_speed adds r2, r0, 0 lsls r2, 24 @@ -5855,9 +5855,9 @@ _080829AA: ldr r1, =0x000011b8 adds r0, r1 strh r2, [r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08339896 - bl CopyString + bl StringCopy b _08082A92 .pool _080829D4: @@ -5871,16 +5871,16 @@ _080829D4: ldr r1, =0x000011b8 adds r0, r1 strh r2, [r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08339858 - bl CopyString + bl StringCopy b _08082A92 .pool _08082A00: ldr r4, [r6] ldr r2, =0x000011b8 adds r4, r2 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 bl sav2_get_text_speed adds r2, r0, 0 lsls r2, 24 @@ -7155,7 +7155,7 @@ sub_80833F8: @ 80833F8 @ void UpdateBerryBlenderRecord() UpdateBerryBlenderRecord: @ 8083418 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =gUnknown_020322A4 ldr r1, [r0] @@ -7326,15 +7326,15 @@ _08083564: mov r1, r8 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl AppendString + bl StringAppend ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_085E8D5E - bl AppendString + bl StringAppend ldr r0, [r7] adds r0, 0x9F lsls r4, r5, 3 @@ -7342,7 +7342,7 @@ _08083564: lsls r4, 2 ldr r3, =gUnknown_020229F0 adds r1, r4, r3 - bl AppendString + bl StringAppend ldr r1, [r7] adds r1, 0x9F mov r0, r9 @@ -7365,17 +7365,17 @@ _08083564: lsls r1, 1 adds r5, r1 adds r1, r5, 0 - bl CopyString + bl StringCopy ldr r0, [r7] adds r0, 0x9F ldr r2, =gUnknown_020229E8 adds r4, r2 ldrb r1, [r4, 0x1A] - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339914 - bl AppendString + bl StringAppend ldr r1, [r7] adds r1, 0x9F movs r3, 0xFF @@ -7422,11 +7422,11 @@ _0808361A: adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl AppendString + bl StringAppend ldr r0, [r6] adds r0, 0x4E ldrh r0, [r0] @@ -7438,15 +7438,15 @@ _0808361A: ldr r0, [sp, 0x48] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r6] adds r0, 0x9F ldr r1, [sp, 0x48] - bl AppendString + bl StringAppend ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_0833993C - bl AppendString + bl StringAppend ldr r1, [r6] adds r1, 0x9F movs r0, 0x1 @@ -7496,19 +7496,19 @@ _0808361A: adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339921 - bl AppendString + bl StringAppend adds r1, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r6] adds r0, 0x9F ldr r1, =gUnknown_08339928 - bl AppendString + bl StringAppend ldr r1, [r6] adds r1, 0x9F movs r0, 0x1 @@ -7681,13 +7681,13 @@ sub_80838AC: @ 80838AC adds r0, r1 ldr r1, [r0] adds r0, r6, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0833979D adds r0, r6, 0 - bl AppendString + bl StringAppend ldr r1, =gUnknown_08339943 adds r0, r6, 0 - bl AppendString + bl StringAppend adds r0, r5, 0 bl sub_8136EA4 adds r4, r0, 0 @@ -7700,32 +7700,32 @@ sub_80838AC: @ 80838AC lsrs r5, 24 ldr r1, =gUnknown_0833994F adds r0, r6, 0 - bl AppendString + bl StringAppend mov r0, sp adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 mov r1, sp - bl AppendString + bl StringAppend ldr r1, =gUnknown_0833995D adds r0, r6, 0 - bl AppendString + bl StringAppend mov r0, sp adds r1, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 mov r1, sp - bl AppendString + bl StringAppend ldr r1, =gUnknown_08339970 adds r0, r6, 0 - bl AppendString + bl StringAppend ldr r1, =gUnknown_0833979B adds r0, r6, 0 - bl AppendString + bl StringAppend add sp, 0xC pop {r4-r6} pop {r0} @@ -8158,15 +8158,15 @@ _08083C84: mov r1, r8 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_08339941 - bl AppendString + bl StringAppend ldr r0, [r7] adds r0, 0x9F ldr r1, =gUnknown_085E8D5E - bl AppendString + bl StringAppend ldr r0, [r7] adds r0, 0x9F lsls r1, r5, 3 @@ -8174,7 +8174,7 @@ _08083C84: lsls r1, 2 ldr r2, =gUnknown_020229F0 adds r1, r2 - bl AppendString + bl StringAppend ldr r1, [r7] adds r1, 0x9F ldr r0, [sp, 0x8] @@ -8201,7 +8201,7 @@ _08083C84: ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -8222,7 +8222,7 @@ _08083C84: ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -8243,7 +8243,7 @@ _08083C84: ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, [r7] adds r1, 0x9F mov r3, r10 @@ -8379,7 +8379,7 @@ ShowBerryBlenderRecordWindow: @ 8083E24 movs r7, 0xA4 lsls r7, 22 _08083E8A: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r6, 1 ldr r2, =0x000009bc @@ -8393,10 +8393,10 @@ _08083E8A: add r0, sp, 0xC movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 ldr r1, =gUnknown_08339941 - bl AppendString + bl StringAppend adds r5, r0, 0 adds r0, r4, 0 movs r1, 0x64 @@ -8405,10 +8405,10 @@ _08083E8A: adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 ldr r1, =gUnknown_0833993C - bl AppendString + bl StringAppend movs r0, 0x1 add r1, sp, 0xC movs r2, 0x8C @@ -8545,7 +8545,7 @@ sub_8083F94: @ 8083F94 ldr r5, =gUnknown_020229F0 adds r1, r5 adds r0, r7, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 bl sub_81370B4 strb r0, [r7, 0xB] @@ -8599,7 +8599,7 @@ _08084058: ldr r5, =gUnknown_020229F0 adds r1, r5 adds r0, r7, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 bl sub_81370B4 strb r0, [r7, 0xB] diff --git a/asm/berry_tag_screen.s b/asm/berry_tag_screen.s index 0314caa7c..2b1a2e7d6 100644 --- a/asm/berry_tag_screen.s +++ b/asm/berry_tag_screen.s @@ -343,7 +343,7 @@ _08177F1C: b _08177FD6 .pool _08177F3C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -562,20 +562,20 @@ sub_8178110: @ 8178110 ldrb r0, [r0] bl GetBerryInfo adds r6, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r5] adds r1, r4 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 adds r1, r6, 0 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9263 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -641,20 +641,20 @@ _081781C8: movs r1, 0x64 bl __udivsi3 adds r5, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9233 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders str r7, [sp] str r6, [sp, 0x4] str r6, [sp, 0x8] diff --git a/asm/big_shroomish_barboach.s b/asm/big_shroomish_barboach.s index fb0878fb8..015bb8529 100644 --- a/asm/big_shroomish_barboach.s +++ b/asm/big_shroomish_barboach.s @@ -194,10 +194,10 @@ _080F992C: adds r0, r5, 0 movs r2, 0 movs r3, 0x8 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 ldr r1, _080F9980 - bl AppendString + bl StringAppend adds r5, r0, 0 adds r0, r4, 0 movs r1, 0xA @@ -206,7 +206,7 @@ _080F992C: adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN pop {r4,r5} pop {r0} bx r0 @@ -266,7 +266,7 @@ _080F99CC: adds r0, r6, 0 bl sub_80F989C adds r4, r0, 0 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 bl sub_80F9910 cmp r5, r4 @@ -297,29 +297,29 @@ sub_80F9A14: @ 80F9A14 adds r0, r4, 0 bl sub_80F989C adds r1, r0, 0 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 bl sub_80F9910 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xB muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrh r1, [r5] movs r0, 0x80 lsls r0, 8 cmp r1, r0 bne _080F9A64 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECF6B - bl CopyString + bl StringCopy b _080F9A6E .pool _080F9A64: - ldr r0, =gUnknown_02021DC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar2 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy _080F9A6E: pop {r4,r5} pop {r0} @@ -438,7 +438,7 @@ sub_80F9B30: @ 80F9B30 bhi _080F9BAC cmp r5, 0x40 bhi _080F9BAC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031a8 adds r0, r1 diff --git a/asm/cable_car.s b/asm/cable_car.s index 3ec687ebe..0ccb2a0d8 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -1945,7 +1945,7 @@ sub_8150D28: @ 8150D28 cmp r0, 0x1 beq _08150E68 _08150D86: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] add r0, sp @@ -2051,7 +2051,7 @@ _08150E68: movs r2, 0x18 movs r3, 0x1A bl CopyToBgTilemapBufferRect_ChangePalette - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] add r0, sp diff --git a/asm/cable_club.s b/asm/cable_club.s index e6f3026dd..56e6bb140 100644 --- a/asm/cable_club.s +++ b/asm/cable_club.s @@ -45,19 +45,19 @@ sub_80B23B0: @ 80B23B0 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 movs r1, 0 bl SetStandardWindowBorderStyle - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EE667 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r5, 0 movs r2, 0x58 @@ -177,7 +177,7 @@ _080B24C8: movs r0, 0x9 b _080B24F2 _080B24CC: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_800ABAC adds r1, r0, 0 lsls r1, 24 @@ -185,7 +185,7 @@ _080B24CC: adds r0, r4, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x4 b _080B24F2 .pool @@ -539,11 +539,11 @@ sub_80B275C: @ 80B275C bl sub_800AA04 ldrh r0, [r7, 0xA] bl sub_80B241C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_082780F2 bl box_related_two__3 mov r0, r9 @@ -888,10 +888,10 @@ sub_80B2AF4: @ 80B2AF4 str r1, [sp, 0x4] movs r2, 0 movs r7, 0 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 movs r0, 0xFF strb r0, [r1] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 movs r0, 0x1 negs r0, r0 strb r0, [r1] @@ -918,8 +918,8 @@ _080B2B2E: mov r1, r10 muls r1, r0 add r1, r9 - ldr r0, =gUnknown_02021CC4 - bl CopyString + ldr r0, =gStringVar1 + bl StringCopy movs r2, 0x1 _080B2B48: cmp r7, 0x1 @@ -928,8 +928,8 @@ _080B2B48: mov r1, r10 muls r1, r0 add r1, r9 - ldr r0, =gUnknown_02021DC4 - bl CopyString + ldr r0, =gStringVar2 + bl StringCopy movs r2, 0x1 _080B2B5C: adds r7, 0x1 @@ -1234,7 +1234,7 @@ _080B2DEC: .pool _080B2E00: movs r3, 0x2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -1555,7 +1555,7 @@ _080B30C8: b _080B3124 .pool _080B30D8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -2601,26 +2601,26 @@ sub_80B39D4: @ 80B39D4 lsrs r4, 24 ldr r0, =gUnknown_020375E4 strh r4, [r0] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r4, 3 subs r1, r4 lsls r1, 2 ldr r2, =gUnknown_020229F0 adds r1, r2 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80C4904 lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 beq _080B3A28 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r2, =gUnknown_0855059C subs r1, 0x1 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy movs r0, 0x1 b _080B3A2A .pool diff --git a/asm/coins.s b/asm/coins.s index df0304722..88e515b47 100644 --- a/asm/coins.s +++ b/asm/coins.s @@ -11,14 +11,14 @@ PrintCoinsString: @ 8145B54 push {r4,lr} sub sp, 0xC adds r1, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DAB adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0x40 @@ -110,11 +110,11 @@ HideCoinsWindow: @ 8145C14 thumb_func_start GetCoins @ u16 GetCoins() GetCoins: @ 8145C30 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00000494 adds r1, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xAC ldr r0, [r0] @@ -131,9 +131,9 @@ GetCoins: @ 8145C30 SetCoins: @ 8145C58 lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xAC ldr r1, [r1] diff --git a/asm/contest.s b/asm/contest.s index fd6f47cb3..ec9614819 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -1400,7 +1400,7 @@ sub_80D833C: @ 80D833C ldr r1, =0x84000100 str r1, [r0, 0x8] ldr r0, [r0, 0x8] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02039F34 ldr r1, [r1] ldr r1, [r1] @@ -1408,7 +1408,7 @@ sub_80D833C: @ 80D833C adds r1, 0x1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_02039F25 ldrb r0, [r0] bl sub_80DBCA8 @@ -1417,19 +1417,19 @@ sub_80D833C: @ 80D833C bne _080D83CC ldr r0, =gUnknown_02022E2C ldr r1, =gUnknown_0827D507 - bl CopyString + bl StringCopy b _080D83D4 .pool _080D83CC: ldr r0, =gUnknown_02022E2C ldr r1, =gUnknown_0827D531 - bl CopyString + bl StringCopy _080D83D4: bl sub_80DB89C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_02022E2C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -1605,7 +1605,7 @@ _080D853C: add r0, sp, 0x4 ldr r1, =gUnknown_085ED1A7 _080D8566: - bl CopyString + bl StringCopy adds r5, r0, 0 _080D856C: movs r0, 0xD @@ -1614,7 +1614,7 @@ _080D856C: ldr r0, =gMoveNames adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy adds r4, r6, 0x5 lsls r0, r4, 24 lsrs r0, 24 @@ -1737,7 +1737,7 @@ _080D868E: bl audio_play movs r0, 0 bl sub_80DC490 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02039F34 ldr r1, [r1] ldr r1, [r1] @@ -1745,7 +1745,7 @@ _080D868E: adds r1, 0x1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_02039F25 ldrb r0, [r0] bl sub_80DBCA8 @@ -1754,19 +1754,19 @@ _080D868E: bne _080D86DC ldr r0, =gUnknown_02022E2C ldr r1, =gUnknown_0827D507 - bl CopyString + bl StringCopy b _080D86E4 .pool _080D86DC: ldr r0, =gUnknown_02022E2C ldr r1, =gUnknown_0827D531 - bl CopyString + bl StringCopy _080D86E4: bl sub_80DB89C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_02022E2C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_80DEC30 @@ -2622,11 +2622,11 @@ _080D8EC8: bl _080DA100 _080D8EF2: bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString + bl StringCopy mov r2, r9 ldr r0, [r2] ldr r0, [r0, 0x4] @@ -2636,28 +2636,28 @@ _080D8EF2: lsls r0, 1 cmp r1, r0 bhi _080D8F38 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r2, r1, 0 movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy b _080D8F48 .pool _080D8F38: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r2, =gUnknown_08587F1C ldrb r1, [r3, 0xA] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy _080D8F48: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827D55A adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -3560,15 +3560,15 @@ _080D96AE: beq _080D96F6 _080D96D4: bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E793 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -3669,15 +3669,15 @@ _080D97BC: .pool _080D97DC: bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E2FE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -3807,15 +3807,15 @@ _080D9904: cmp r0, 0 beq _080D996C bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E6E3 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -3965,17 +3965,17 @@ _080D9A56: beq _080D9A94 movs r4, 0x1 str r4, [sp] - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r2, [r5, 0x6] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy b _080D9AAE .pool _080D9A94: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r3, =gUnknown_08587F08 ldr r2, =gContestMoves ldrh r1, [r5, 0x6] @@ -3986,7 +3986,7 @@ _080D9A94: lsrs r1, 27 adds r1, r3 ldr r1, [r1] - bl CopyString + bl StringCopy _080D9AAE: ldr r5, [sp] lsls r0, r5, 24 @@ -4008,11 +4008,11 @@ _080D9AAE: str r3, [sp] _080D9AD2: bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString + bl StringCopy ldr r4, =gUnknown_02039F34 ldr r0, [r4] ldr r1, [r0] @@ -4042,9 +4042,9 @@ _080D9B06: _080D9B30: cmp r3, 0 bge _080D9B48 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0827E73C - bl ExpandStringRefs + bl StringExpandPlaceholders b _080D9B74 .pool _080D9B48: @@ -4057,17 +4057,17 @@ _080D9B48: asrs r0, 24 cmp r0, 0x4 bgt _080D9B6C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0827E717 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080D9B74 .pool _080D9B6C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0827E76A - bl ExpandStringRefs + bl StringExpandPlaceholders _080D9B74: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0x1 bl sub_80DEC30 ldr r1, =gTasks @@ -4373,7 +4373,7 @@ _080D9DC2: .pool _080D9DD4: bl sub_80DB89C - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r5, =gUnknown_02039F34 ldr r1, [r5] ldr r1, [r1, 0x10] @@ -4383,12 +4383,12 @@ _080D9DD4: lsls r1, 6 ldr r4, =gUnknown_02039E02 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021CC4 + bl StringCopy + ldr r0, =gStringVar1 lsls r1, r6, 6 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, [r5] ldr r2, [r1, 0x4] lsls r1, r6, 3 @@ -4400,11 +4400,11 @@ _080D9DD4: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E7EA adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -4425,10 +4425,10 @@ _080D9E60: b _080DA100 _080D9E6A: bl sub_80DB89C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E817 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -4474,12 +4474,12 @@ _080D9EBC: _080D9EDC: adds r0, r6, 0 bl sub_80DC9B4 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 mov r2, r9 ldr r1, [r2] ldr r1, [r1, 0x4] @@ -4489,11 +4489,11 @@ _080D9EDC: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827E58A adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -4624,15 +4624,15 @@ _080DA024: b _080DA100 _080DA038: bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r6, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827D56F adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -5093,19 +5093,19 @@ sub_80DA3CC: @ 80DA3CC adds r0, r2 ldrb r4, [r0, 0x1A] bl sub_80DB89C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r5] lsls r1, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r5, =gUnknown_02021FC4 + bl StringCopy + ldr r5, =gStringVar4 ldr r0, =gUnknown_08587D90 lsls r4, 2 adds r4, r0 ldr r1, [r4] adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r5, 0 movs r1, 0x1 bl sub_80DEC30 @@ -5372,10 +5372,10 @@ _080DA668: ldr r0, =gUnknown_03005D80 ldr r0, [r0] str r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0827D597 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_80DEC30 @@ -5651,10 +5651,10 @@ sub_80DA8C8: @ 80DA8C8 lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] mov r0, sp - bl CopyString + bl StringCopy ldr r0, =gUnknown_02039F2A ldrb r1, [r0] movs r0, 0x1 @@ -5720,7 +5720,7 @@ _080DA930: mov r2, sp bl pokemon_getattr mov r0, sp - bl GetStringEnd_Limit7 + bl StringGetEnd10 ldr r0, =gUnknown_02039F2A ldrb r1, [r0] movs r0, 0x1 @@ -5745,7 +5745,7 @@ _080DA994: lsls r0, 6 adds r0, r4 mov r1, sp - bl CopyString + bl StringCopy adds r0, r5, 0 movs r1, 0x16 bl pokemon_getattr @@ -6408,13 +6408,13 @@ sub_80DAED4: @ 80DAED4 lsrs r4, 24 ldr r0, =gUnknown_02022E2C ldr r1, =gUnknown_085ED1AB - bl CopyString + bl StringCopy adds r1, r0, 0 subs r0, r1, 0x1 strb r4, [r0] adds r0, r1, 0 adds r1, r5, 0 - bl CopyString + bl StringCopy adds r1, r0, 0 pop {r4,r5} pop {r1} @@ -6449,12 +6449,12 @@ sub_80DAF1C: @ 80DAF1C lsrs r4, 24 ldr r1, =gUnknown_085E8D3E add r0, sp, 0x4 - bl CopyString + bl StringCopy lsls r1, r5, 6 ldr r0, =gUnknown_02039E0D adds r1, r0 add r0, sp, 0x4 - bl AppendString + bl StringAppend add r0, sp, 0x4 adds r1, r4, 0 bl sub_80DAED4 @@ -8448,7 +8448,7 @@ sub_80DBED4: @ 80DBED4 ands r0, r1 cmp r0, 0 beq _080DBF0E - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =gUnknown_02039F20 ldr r0, =gUnknown_02039F25 @@ -10297,7 +10297,7 @@ _080DCD92: lsrs r4, r0, 16 adds r0, r2, 0 ldr r1, =gUnknown_085E8D40 - bl CopyString + bl StringCopy adds r2, r0, 0 _080DCDBC: lsls r1, r4, 16 @@ -10305,7 +10305,7 @@ _080DCDBC: adds r0, r2, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_02039F26 adds r0, r5, r0 ldrb r0, [r0] @@ -10340,7 +10340,7 @@ _080DCDEA: lsrs r4, r0, 16 adds r0, r2, 0 ldr r1, =gUnknown_085E8D40 - bl CopyString + bl StringCopy adds r2, r0, 0 _080DCE14: lsls r1, r4, 16 @@ -10348,7 +10348,7 @@ _080DCE14: adds r0, r2, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_02039F26 adds r0, r5, r0 ldrb r0, [r0] @@ -11171,12 +11171,12 @@ sub_80DD45C: @ 80DD45C lsrs r4, 24 lsls r1, 24 lsrs r6, r1, 24 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r4, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r5, =gUnknown_02039F34 ldr r1, [r5] ldr r2, [r1, 0x4] @@ -11189,7 +11189,7 @@ sub_80DD45C: @ 80DD45C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r3, =gContestMoves ldr r1, [r5] ldr r0, [r1, 0x8] @@ -11206,50 +11206,50 @@ sub_80DD45C: @ 80DD45C lsls r1, r0, 29 cmp r1, 0 bne _080DD4DC - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_0827E837 - bl CopyString + bl StringCopy b _080DD52C .pool _080DD4DC: lsrs r0, r1, 29 cmp r0, 0x1 bne _080DD4F4 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_0827E83F - bl CopyString + bl StringCopy b _080DD52C .pool _080DD4F4: lsrs r0, r1, 29 cmp r0, 0x2 bne _080DD50C - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_0827E847 - bl CopyString + bl StringCopy b _080DD52C .pool _080DD50C: lsrs r0, r1, 29 cmp r0, 0x3 bne _080DD524 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_0827E850 - bl CopyString + bl StringCopy b _080DD52C .pool _080DD524: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_0827E85A - bl CopyString + bl StringCopy _080DD52C: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_08587E10 lsls r0, r6, 2 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders bl sub_80DB89C adds r0, r4, 0 movs r1, 0x1 @@ -14191,7 +14191,7 @@ sub_80DED60: @ 80DED60 sub_80DED74: @ 80DED74 push {r4-r6,lr} movs r0, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r5, =0x00000624 movs r4, 0 _080DED7E: @@ -14308,7 +14308,7 @@ _080DEE54: lsls r0, 24 lsrs r0, 24 mov r9, r0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr mov r10, r2 ldr r0, [r2] mov r3, r9 @@ -14342,7 +14342,7 @@ _080DEE54: adds r0, 0xB adds r1, r4, 0x2 adds r1, r5, r1 - bl CopyString + bl StringCopy mov r2, r10 ldr r0, [r2] adds r0, r6 @@ -14350,7 +14350,7 @@ _080DEE54: adds r4, 0xD adds r5, r4 adds r1, r5, 0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_02039F2A ldrb r1, [r0] movs r0, 0x1 @@ -14378,7 +14378,7 @@ _080DEF02: ldr r0, [sp] cmp r0, 0xFF beq _080DEF34 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] mov r2, r9 lsls r1, r2, 5 @@ -14391,7 +14391,7 @@ _080DEF02: b _080DEF8E .pool _080DEF34: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] mov r2, r9 lsls r1, r2, 5 @@ -14423,13 +14423,13 @@ _080DEF50: adds r0, 0xB adds r1, r4, 0x2 adds r1, r5, r1 - bl CopyString + bl StringCopy adds r0, r6, 0 adds r0, 0x16 adds r4, 0xD adds r5, r4 adds r1, r5, 0 - bl CopyString + bl StringCopy mov r2, r8 strb r2, [r6, 0xA] _080DEF8E: @@ -14460,7 +14460,7 @@ sub_80DEFA8: @ 80DEFA8 cmp r1, 0 beq _080DEFE6 movs r2, 0x5 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 ldr r4, =0x00002e90 ldr r3, =0x00002e70 @@ -14526,7 +14526,7 @@ _080DF03A: sub_80DF040: @ 80DF040 push {r4-r7,lr} movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 ldr r4, =0x00002e90 ldr r3, =gUnknown_08587FA4 @@ -15508,7 +15508,7 @@ _080DF784: _080DF7AE: add r0, sp, 0x4 ldr r1, =gUnknown_085ED1B2 - bl CopyString + bl StringCopy adds r5, r0, 0 ldr r0, =gUnknown_02039F26 adds r0, r7, r0 @@ -15534,7 +15534,7 @@ _080DF7DE: adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 lsrs r4, 1 lsls r0, r6, 24 @@ -15605,7 +15605,7 @@ _080DF874: _080DF884: add r0, sp, 0x4 ldr r1, =gUnknown_085ED1B5 - bl CopyString + bl StringCopy ldr r0, =gUnknown_02039F34 ldr r0, [r0] ldr r1, [r0, 0x1C] @@ -15622,7 +15622,7 @@ _080DF8A0: adds r0, r5, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 lsrs r4, 1 lsls r0, r6, 24 @@ -15708,7 +15708,7 @@ sub_80DF940: @ 80DF940 b _080DF9CC _080DF956: adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 @@ -15789,7 +15789,7 @@ sub_80DF9E0: @ 80DF9E0 push {r4,r5,lr} adds r5, r0, 0 adds r4, r1, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes cmp r4, 0x1 bne _080DF9F8 movs r0, 0xFF @@ -15822,7 +15822,7 @@ sub_80DFA08: @ 80DFA08 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _080DFA3E _080DFA28: ldrb r0, [r4, 0xA] @@ -15830,7 +15830,7 @@ _080DFA28: bne _080DFA38 adds r0, r4, 0 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _080DFA3E _080DFA38: strb r0, [r4, 0x5] diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 7d74ea9a4..9c289ea4a 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -285,12 +285,12 @@ sub_80F5A74: @ 80F5A74 bne _080F5A96 ldr r1, =gUnknown_085ED21E adds r0, r6, 0 - bl CopyString + bl StringCopy adds r6, r0, 0 _080F5A96: adds r1, r7, 0x2 adds r0, r6, 0 - bl CopyString + bl StringCopy ldr r4, =gUnknown_02022E2C adds r0, r5, 0 adds r1, r4, 0 @@ -298,11 +298,11 @@ _080F5A96: bl sub_80F7ED0 ldr r1, =gUnknown_085E8D3E adds r0, r6, 0 - bl CopyString + bl StringCopy adds r1, r7, 0 adds r1, 0xD adds r0, r6, 0 - bl AppendString + bl StringAppend adds r0, r5, 0 adds r1, r4, 0 movs r2, 0x32 @@ -1238,7 +1238,7 @@ _080F6334: movs r4, 0 ldr r1, =gUnknown_02039F20 ldrb r0, [r1] - ldr r7, =gUnknown_02021CC4 + ldr r7, =gStringVar1 ldr r2, =gUnknown_02039E0D mov r8, r2 cmp r0, 0 @@ -1256,18 +1256,18 @@ _080F636E: mov r0, r8 adds r1, r4, r0 adds r0, r7, 0 - bl CopyString + bl StringCopy adds r0, r7, 0 bl sub_81DB5AC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 mov r1, r8 subs r1, 0xB adds r4, r1 adds r1, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085ED1FA mov r0, sp - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, =gUnknown_0203A034 ldr r0, [r0] ldr r0, [r0] @@ -4990,14 +4990,14 @@ _080F8250: thumb_func_start sub_80F8264 sub_80F8264: @ 80F8264 push {r4,lr} - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =gUnknown_020375E4 ldrh r1, [r0] lsls r1, 6 ldr r0, =gUnknown_02039E0D adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_81DB5AC pop {r4} @@ -5009,13 +5009,13 @@ sub_80F8264: @ 80F8264 thumb_func_start sub_80F8290 sub_80F8290: @ 80F8290 push {lr} - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_020375E4 ldrh r1, [r1] lsls r1, 6 ldr r2, =gUnknown_02039E02 adds r1, r2 - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -5103,7 +5103,7 @@ sub_80F834C: @ 80F834C movs r1, 0 ldr r2, =gUnknown_02039F20 ldrb r0, [r2] - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 ldr r3, =gUnknown_02039E0D cmp r0, 0 beq _080F836E @@ -5121,7 +5121,7 @@ _080F836E: lsls r1, 6 adds r1, r3 adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_81DB5AC pop {r4} @@ -5136,7 +5136,7 @@ sub_80F8390: @ 80F8390 movs r1, 0 ldr r2, =gUnknown_02039F20 ldrb r0, [r2] - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r3, =gUnknown_02039E02 cmp r0, 0 beq _080F83B2 @@ -5154,7 +5154,7 @@ _080F83B2: lsls r1, 6 adds r1, r3 adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -5582,14 +5582,14 @@ _080F8748: movs r4, 0x3 _080F874C: adds r0, r5, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r5, 0x40 subs r4, 0x1 cmp r4, 0 bge _080F874C adds r0, r6, 0 bl DestroyTask - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] diff --git a/asm/contest_painting.s b/asm/contest_painting.s index 8f6a0f82f..d44a87a1e 100644 --- a/asm/contest_painting.s +++ b/asm/contest_painting.s @@ -10,7 +10,7 @@ sub_812FDA8: @ 812FDA8 push {r4-r7,lr} ldr r3, =gUnknown_02039F5D ldr r4, =gUnknown_02039F5C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] subs r0, 0x1 lsls r1, r0, 5 @@ -379,13 +379,13 @@ sub_813010C: @ 813010C ldrb r5, [r1, 0xA] cmp r0, 0x7 bhi _08130190 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 adds r1, r5, 0 bl sub_818E868 ldr r1, =gUnknown_085E8D5E adds r0, r4, 0 - bl AppendString + bl StringAppend ldr r1, =gUnknown_085B07D4 ldr r0, [r6] ldrb r0, [r0, 0x1E] @@ -393,35 +393,35 @@ sub_813010C: @ 813010C adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl AppendString - ldr r4, =gUnknown_02021DC4 + bl StringAppend + ldr r4, =gStringVar2 ldr r1, [r6] adds r1, 0x16 adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_81DB5AC - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, [r6] adds r1, 0xB - bl CopyString - ldr r0, =gUnknown_02021FC4 + bl StringCopy + ldr r0, =gStringVar4 ldr r1, =gUnknown_0827EA0C - bl ExpandStringRefs + bl StringExpandPlaceholders b _081301A6 .pool _08130190: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, 0xB - bl CopyString - ldr r0, =gUnknown_02021FC4 + bl StringCopy + ldr r0, =gStringVar4 ldr r2, =gUnknown_085B07F4 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandStringRefs + bl StringExpandPlaceholders _081301A6: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 movs r0, 0x1 adds r1, r4, 0 movs r2, 0xD0 diff --git a/asm/daycare.s b/asm/daycare.s index 04ad6f448..c8f012720 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -15,7 +15,7 @@ pokemon_get_nick: @ 806FA2C bl pokemon_getattr adds r0, r4, 0 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 add sp, 0x14 pop {r4} pop {r1} @@ -32,7 +32,7 @@ pokemon_get_nick_: @ 806FA4C bl pokemon_getattr_encrypted adds r0, r4, 0 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 add sp, 0x14 pop {r4} pop {r1} @@ -170,16 +170,16 @@ sub_806FB38: @ 806FB38 beq _0806FBBC adds r0, r5, 0 adds r0, 0x74 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r4, r5, 0 adds r4, 0x7C adds r0, r6, 0 adds r1, r4, 0 bl pokemon_get_nick adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r4, 0xB ldrb r1, [r4] movs r0, 0x10 @@ -202,7 +202,7 @@ sub_806FB38: @ 806FB38 bl pokemon_getattr lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsls r2, r0, 3 adds r2, r0 @@ -272,7 +272,7 @@ daycare_send_selected_pokemon: @ 806FC18 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x00003030 adds r1, r2 @@ -375,7 +375,7 @@ sub_806FCF8: @ 806FCF8 push {r4-r7,lr} sub sp, 0x68 adds r5, r0, 0 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl pokemon_get_nick_ adds r0, r5, 0 movs r1, 0xB @@ -466,7 +466,7 @@ sub_806FD9C: @ 806FD9C thumb_func_start sub_806FDC4 sub_806FDC4: @ 806FDC4 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -540,12 +540,12 @@ sub_806FE54: @ 806FE54 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r1, =gUnknown_02021CC4 + bl ConvertIntToDecimalStringN + ldr r1, =gStringVar1 adds r0, r5, 0 bl pokemon_get_nick_ adds r0, r4, 0 @@ -563,17 +563,17 @@ sub_806FE88: @ 806FE88 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl pokemon_get_nick_ movs r0, 0x64 muls r4, r0 adds r4, 0x64 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 pop {r4,r5} pop {r1} @@ -599,7 +599,7 @@ sub_806FEC0: @ 806FEC0 thumb_func_start sub_806FED8 sub_806FED8: @ 806FED8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -617,7 +617,7 @@ sub_806FED8: @ 806FED8 sub_806FF04: @ 806FF04 lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldr r1, =0x000030b8 adds r3, r2, r1 @@ -636,7 +636,7 @@ sub_806FF04: @ 806FF04 thumb_func_start sub_806FF30 sub_806FF30: @ 806FF30 push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r5, =gUnknown_020375E0 ldrh r0, [r5] movs r4, 0x8C @@ -995,7 +995,7 @@ sub_80701B8: @ 80701B8 thumb_func_start sub_80701E0 sub_80701E0: @ 80701E0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -1008,7 +1008,7 @@ sub_80701E0: @ 80701E0 thumb_func_start sub_80701FC sub_80701FC: @ 80701FC push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -1662,7 +1662,7 @@ sub_8070710: @ 8070710 thumb_func_start sub_8070728 sub_8070728: @ 8070728 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2099,7 +2099,7 @@ sub_8070A0C: @ 8070A0C thumb_func_start sp0B8_daycare sp0B8_daycare: @ 8070AA8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2242,7 +2242,7 @@ _08070BC2: thumb_func_start sub_8070BD0 sub_8070BD0: @ 8070BD0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2278,16 +2278,16 @@ sub_8070C04: @ 8070C04 bl pokemon_getattr_encrypted cmp r0, 0 beq _08070C2E - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r4, 0 bl pokemon_get_nick_ adds r0, r4, 0 movs r1, 0x7 mov r2, sp bl pokemon_getattr_encrypted - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 mov r1, sp - bl CopyString + bl StringCopy _08070C2E: adds r4, 0x8C adds r0, r4, 0 @@ -2295,7 +2295,7 @@ _08070C2E: bl pokemon_getattr_encrypted cmp r0, 0 beq _08070C44 - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl pokemon_get_nick_ _08070C44: @@ -2316,7 +2316,7 @@ sub_8070C58: @ 8070C58 muls r0, r5 ldr r4, =gUnknown_020244EC adds r0, r4 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl pokemon_get_nick_ bl brm_get_pokemon_selection lsls r0, 24 @@ -2336,7 +2336,7 @@ sub_8070C58: @ 8070C58 thumb_func_start sp0B5_daycare sp0B5_daycare: @ 8070C94 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2349,7 +2349,7 @@ sp0B5_daycare: @ 8070C94 thumb_func_start sp0B6_daycare sp0B6_daycare: @ 8070CB0 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00003030 adds r0, r1 @@ -2385,7 +2385,7 @@ _08070CF2: thumb_func_start sub_8070CF8 sub_8070CF8: @ 8070CF8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2587,7 +2587,7 @@ _08070E5C: thumb_func_start daycare_relationship_score_from_savegame daycare_relationship_score_from_savegame: @ 8070E6C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -2623,12 +2623,12 @@ _08070EAC: bne _08070EB2 movs r1, 0 _08070EB2: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_0832B6F8 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -2739,7 +2739,7 @@ _08070F84: ldr r1, =gUnknown_0832DACB _08070F86: adds r0, r4, 0 - bl AppendString + bl StringAppend pop {r4} pop {r1} bx r1 @@ -2799,20 +2799,20 @@ _08070FCC: bls _08070FCC adds r0, r7, 0 mov r1, sp - bl CopyString + bl StringCopy ldr r4, =gUnknown_085EF881 adds r0, r7, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend adds r0, r7, 0 mov r1, r9 - bl AppendString + bl StringAppend adds r0, r7, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend ldr r1, =gUnknown_085EF883 adds r0, r7, 0 - bl AppendString + bl StringAppend add sp, 0x28 pop {r3,r4} mov r8, r3 @@ -2835,7 +2835,7 @@ sub_8071038: @ 8071038 _08071046: adds r0, r4, 0 ldr r1, =gUnknown_085EF888 - bl AppendString + bl StringAppend movs r0, 0x8C adds r2, r5, 0 muls r2, r0 @@ -2851,13 +2851,13 @@ _08071046: mov r0, sp movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 mov r1, sp - bl AppendString + bl StringAppend adds r0, r4, 0 ldr r1, =gUnknown_085EF881 - bl AppendString + bl StringAppend adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -2973,7 +2973,7 @@ sub_8071148: @ 8071148 lsrs r5, 24 ldr r1, =gUnknown_085EF888 mov r0, sp - bl CopyString + bl StringCopy movs r0, 0x8C adds r1, r6, 0 muls r1, r0 @@ -2989,10 +2989,10 @@ sub_8071148: @ 8071148 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r0, sp adds r1, r4, 0 - bl AppendString + bl StringAppend movs r0, 0x1 mov r1, sp movs r2, 0x70 @@ -3023,7 +3023,7 @@ sub_80711B8: @ 80711B8 lsrs r5, r2, 24 cmp r6, 0x1 bhi _080711F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r0, [r0] ldr r4, =0x00003030 diff --git a/asm/decoration.s b/asm/decoration.s index 17ea507f4..b303106c7 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -23,7 +23,7 @@ _0812697E: ldrb r0, [r2, 0x9] cmp r0, 0 bne _08126996 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00001aae adds r1, r0, r3 @@ -35,7 +35,7 @@ _08126996: ldrb r0, [r2, 0x9] cmp r0, 0x1 bne _081269AC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x0000271c adds r1, r0, r3 @@ -177,7 +177,7 @@ sub_8126AD8: @ 8126AD8 lsrs r4, 24 bl sub_8126ABC ldr r2, =gUnknown_0203A17C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00001aae adds r1, r0, r3 @@ -210,7 +210,7 @@ sub_8126B2C: @ 8126B2C lsrs r4, 24 bl sub_8126ABC ldr r2, =gUnknown_0203A17C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x0000271c adds r1, r0, r3 @@ -335,10 +335,10 @@ sub_8126C48: @ 8126C48 lsls r0, 24 cmp r0, 0 bne _08126C7C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -375,10 +375,10 @@ sub_8126CA4: @ 8126CA4 lsls r0, 24 cmp r0, 0 bne _08126CD8 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAAEC adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -419,10 +419,10 @@ sub_8126D10: @ 8126D10 lsls r0, 24 cmp r0, 0 bne _08126D44 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8126DA4 adds r0, r5, 0 adds r1, r4, 0 @@ -717,11 +717,11 @@ _08126FA2: adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 bl sub_8127058 adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 adds r6, r0, r4 @@ -731,7 +731,7 @@ _08126FA2: adds r0, r1 ldr r1, [r0] adds r0, r6, 0 - bl CopyString + bl StringCopy str r5, [sp] mov r0, r9 str r0, [sp, 0x4] @@ -751,7 +751,7 @@ _08126FA2: adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r6, r0, 0 movs r0, 0xBA strb r0, [r6] @@ -764,7 +764,7 @@ _08126FA2: adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 adds r1, r4, 0 ldr r2, [sp, 0x14] @@ -799,7 +799,7 @@ sub_8127058: @ 8127058 lsls r4, r1, 24 lsrs r4, 24 ldr r1, =gUnknown_085EA7C8 - bl CopyString + bl StringCopy cmp r4, 0x1 bne _08127078 movs r0, 0x4 @@ -908,10 +908,10 @@ sub_81270E8: @ 81270E8 _08127154: movs r0, 0x1 bl sub_8126A58 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA83D adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8127180 adds r0, r5, 0 adds r1, r4, 0 @@ -1030,7 +1030,7 @@ sub_8127250: @ 8127250 lsrs r1, 22 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -1153,13 +1153,13 @@ sub_8127330: @ 8127330 ldrsh r0, [r1, r2] cmp r0, 0 bne _08127378 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0x1 bl sub_8127058 b _08127380 .pool _08127378: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0 bl sub_8127058 _08127380: @@ -1217,7 +1217,7 @@ _081273D6: ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8CF0 - bl CopyString + bl StringCopy ldr r0, [r5] lsls r2, r6, 3 adds r1, r0, r2 @@ -1261,14 +1261,14 @@ sub_8127454: @ 8127454 adds r5, r0, 0 lsls r4, r1, 16 lsrs r4, 16 - ldr r1, =gUnknown_02021CC4 - bl CopyString + ldr r1, =gStringVar1 + bl StringCopy lsls r4, 5 ldr r0, =gUnknown_085A5C09 adds r4, r0 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend pop {r4,r5} pop {r0} bx r0 @@ -1722,7 +1722,7 @@ sub_8127814: @ 8127814 movs r2, 0xC bl memset movs r6, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r10, r0 ldr r1, =0x00001aae mov r9, r1 @@ -1810,7 +1810,7 @@ _081278E2: ldr r3, =gUnknown_0203BC40 mov r8, r3 _081278F4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000271c adds r0, r1 @@ -1826,7 +1826,7 @@ _08127918: ldr r0, =gUnknown_0203A14C ldr r1, [r0] adds r1, r2 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x0000271c adds r0, r3 @@ -2049,7 +2049,7 @@ sub_8127ACC: @ 8127ACC adds r2, r0 lsls r2, 3 adds r4, r2, r3 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrh r0, [r1] strh r0, [r4, 0xE] @@ -2074,7 +2074,7 @@ sub_8127B04: @ 8127B04 lsls r5, 24 lsrs r5, 24 bl DrawWholeMapView - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -2477,7 +2477,7 @@ sub_8127E18: @ 8127E18 mov r8, r0 ldr r1, =gUnknown_020375E4 mov r10, r1 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr mov r9, r2 _08127E34: adds r5, r6, 0 @@ -2636,10 +2636,10 @@ sub_8127F68: @ 8127F68 beq _08127FAC cmp r0, 0x7 beq _08127FAC - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA9AE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -2672,36 +2672,36 @@ _08127FAC: b _0812804C .pool _08127FE8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r4, =gUnknown_0203A17C ldrb r1, [r4, 0x8] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldrb r0, [r4, 0x9] cmp r0, 0 bne _08128018 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA8EA - bl ExpandStringRefs + bl StringExpandPlaceholders b _08128020 .pool _08128018: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA931 - bl ExpandStringRefs + bl StringExpandPlaceholders _08128020: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =sub_8127A5C adds r0, r5, 0 bl DisplayItemMessageOnField b _0812804C .pool _08128038: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA8D2 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -2898,7 +2898,7 @@ _081281E2: lsls r0, 24 lsrs r2, r0, 24 _081281EA: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -3168,10 +3168,10 @@ sub_8128414: @ 8128414 adds r0, r3 strh r2, [r0, 0x3C] bl sub_8128DE0 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EA8BF adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8128B80 adds r0, r4, 0 adds r1, r5, 0 @@ -3834,10 +3834,10 @@ sub_8128950: @ 8128950 lsrs r0, 24 cmp r0, 0x1 bne _081289A4 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA897 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_81289D0 adds r0, r5, 0 adds r1, r4, 0 @@ -3847,10 +3847,10 @@ sub_8128950: @ 8128950 _081289A4: movs r0, 0x20 bl audio_play - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA8A6 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8129020 adds r0, r5, 0 adds r1, r4, 0 @@ -5809,10 +5809,10 @@ _08129968: lsrs r0, 24 cmp r0, 0x1 bne _08129994 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAAC5 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8129D64 adds r0, r5, 0 adds r1, r4, 0 @@ -5885,7 +5885,7 @@ SetUpPuttingAwayDecorationPlayerAvatar: @ 81299DC lsls r0, 24 lsrs r0, 24 str r0, [r4, 0x4] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -6136,10 +6136,10 @@ sub_8129BF8: @ 8129BF8 adds r0, r3 ldr r1, =DummyObjectCallback str r1, [r0] - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EAA62 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_812A1F0 adds r0, r4, 0 adds r1, r5, 0 @@ -6161,10 +6161,10 @@ sub_8129C74: @ 8129C74 ldrb r0, [r0] cmp r0, 0 beq _08129CA8 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAAA3 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_812A1A0 b _08129D14 .pool @@ -6215,10 +6215,10 @@ _08129CDE: adds r0, r3 ldr r1, =DummyObjectCallback str r1, [r0] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAA62 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_812A1F0 _08129D14: adds r0, r5, 0 @@ -6227,10 +6227,10 @@ _08129D14: b _08129D50 .pool _08129D3C: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAA81 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8129D64 adds r0, r5, 0 adds r1, r4, 0 @@ -6501,7 +6501,7 @@ sub_8129F20: @ 8129F20 movs r6, 0xF ands r6, r0 movs r4, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr mov r9, r3 _08129F4A: ldr r1, [r7] @@ -7038,7 +7038,7 @@ _0812A398: thumb_func_start sub_812A39C sub_812A39C: @ 812A39C push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -7075,7 +7075,7 @@ sub_812A3D4: @ 812A3D4 lsrs r0, 24 cmp r0, 0x1 bne _0812A430 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_0203A172 ldrb r2, [r1] ldr r1, =gUnknown_0203A14C @@ -7085,11 +7085,11 @@ sub_812A3D4: @ 812A3D4 lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EAA14 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_812A458 adds r0, r5, 0 adds r1, r4, 0 @@ -7097,10 +7097,10 @@ sub_812A3D4: @ 812A3D4 b _0812A444 .pool _0812A430: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA9E0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8127A5C adds r0, r5, 0 adds r1, r4, 0 @@ -7150,10 +7150,10 @@ sub_812A478: @ 812A478 bl sub_8161A38 adds r0, r4, 0 bl sub_8127814 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EAA3D adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_8127A5C adds r0, r4, 0 adds r1, r5, 0 diff --git a/asm/dewford_trend.s b/asm/dewford_trend.s index 2dfc967ba..1fafbdbdf 100644 --- a/asm/dewford_trend.s +++ b/asm/dewford_trend.s @@ -9,7 +9,7 @@ sub_81224D4: @ 81224D4 push {r4-r7,lr} movs r6, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr _081224DA: movs r0, 0xA bl sub_811EE38 @@ -66,7 +66,7 @@ _08122522: lsrs r6, r0, 16 cmp r6, 0x4 bls _081224DA - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e68 adds r0, r1 @@ -109,7 +109,7 @@ _081225AA: lsls r0, r3, 3 ldr r4, =0x00002e68 adds r0, r4 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] adds r5, r1, r0 ldrb r6, [r5, 0x1] @@ -236,7 +236,7 @@ _0812269E: bhi _081226AE b _081225AA _081226AE: - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00002e68 adds r0, r1 @@ -286,7 +286,7 @@ _081226F8: lsls r0, 24 cmp r0, 0 bne _08122744 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] mov r0, r8 ldrh r2, [r0] @@ -317,7 +317,7 @@ _08122744: bl sub_8122B28 movs r5, 0 _08122762: - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr lsls r4, r5, 3 ldr r1, =0x00002e68 adds r0, r4, r1 @@ -576,7 +576,7 @@ _08122946: movs r2, 0x2 bl sub_8122804 adds r4, r7, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e68 adds r1, r0 @@ -613,13 +613,13 @@ _08122980: thumb_func_start sub_8122998 sub_8122998: @ 8122998 push {lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r1, 3 ldr r0, [r2] adds r1, r0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0x00002e6c adds r1, r2 movs r2, 0x2 @@ -634,7 +634,7 @@ sub_8122998: @ 8122998 sub_81229C8: @ 81229C8 push {r4,lr} movs r4, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r1, =0x00002e68 adds r0, r3, r1 @@ -678,7 +678,7 @@ _08122A0C: thumb_func_start sub_8122A30 sub_8122A30: @ 8122A30 ldr r2, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002e6c adds r1, r0, r3 @@ -877,7 +877,7 @@ sub_8122BB0: @ 8122BB0 push {r4-r6,lr} adds r5, r0, 0 movs r4, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _08122BB8: lsls r1, r4, 3 ldr r0, [r6] diff --git a/asm/diploma.s b/asm/diploma.s index 815ac7ee5..c36fca270 100644 --- a/asm/diploma.s +++ b/asm/diploma.s @@ -261,23 +261,23 @@ pokedex_diploma_something: @ 8177AD4 lsls r1, 1 movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EE855 - bl CopyString + bl StringCopy b _08177B0C .pool _08177AFC: movs r0, 0x14 movs r1, 0 bl SetGpuReg - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EE84F - bl CopyString + bl StringCopy _08177B0C: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE85E adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 movs r2, 0x1 diff --git a/asm/easy_chat.s b/asm/easy_chat.s index f7d95493b..345c9a80f 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -396,35 +396,35 @@ _0811A510: .4byte _0811A7AC .4byte _0811A7BC _0811A564: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bb0 adds r4, r0, r1 b _0811A7C2 .pool _0811A578: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002bbc adds r4, r0, r2 b _0811A7C2 .pool _0811A58C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002bc8 adds r4, r0, r3 b _0811A7C2 .pool _0811A5A0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bd4 adds r4, r0, r1 b _0811A7C2 .pool _0811A5B4: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -437,7 +437,7 @@ _0811A5B4: b _0811A7C2 .pool _0811A5D8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e36 adds r1, r0, r2 @@ -455,7 +455,7 @@ _0811A5E6: b _0811A7C2 .pool _0811A604: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -470,7 +470,7 @@ _0811A604: b _0811A7C2 .pool _0811A630: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -489,7 +489,7 @@ _0811A630: b _0811A7C2 .pool _0811A664: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -503,8 +503,8 @@ _0811A664: b _0811A7C2 .pool _0811A688: - ldr r4, =gUnknown_02021EC4 - ldr r1, =gUnknown_03005D8C + ldr r4, =gStringVar3 + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] ldr r2, =0x00002e6c adds r0, r2 @@ -518,7 +518,7 @@ _0811A688: b _0811A7C2 .pool _0811A6B4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002baa adds r4, r0, r1 @@ -529,7 +529,7 @@ _0811A6B4: b _0811A7C2 .pool _0811A6D4: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -548,7 +548,7 @@ _0811A6D4: b _0811A7C2 .pool _0811A708: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -562,14 +562,14 @@ _0811A708: b _0811A7C2 .pool _0811A72C: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 bl sub_811F88C b _0811A7C2 .pool _0811A73C: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E2 ldrh r1, [r0] lsls r0, r1, 3 @@ -588,28 +588,28 @@ _0811A73C: b _0811A7C2 .pool _0811A770: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003b6e adds r4, r0, r3 b _0811A7C2 .pool _0811A784: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b5a adds r4, r0, r1 b _0811A7C2 .pool _0811A798: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b6c adds r4, r0, r2 b _0811A7C2 .pool _0811A7AC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r3, 0x82 lsls r3, 1 @@ -661,7 +661,7 @@ _0811A80E: ands r0, r1 cmp r0, 0 bne _0811A84E - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -756,7 +756,7 @@ sub_811A8A4: @ 811A8A4 thumb_func_start sub_811A8CC sub_811A8CC: @ 811A8CC push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b6e adds r1, r0 @@ -772,7 +772,7 @@ sub_811A8CC: @ 811A8CC thumb_func_start sub_811A8F0 sub_811A8F0: @ 811A8F0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b5a adds r1, r0 @@ -788,7 +788,7 @@ sub_811A8F0: @ 811A8F0 thumb_func_start sub_811A914 sub_811A914: @ 811A914 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b6c adds r1, r0 @@ -804,7 +804,7 @@ sub_811A914: @ 811A914 thumb_func_start sub_811A938 sub_811A938: @ 811A938 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b5a adds r1, r0 @@ -3632,7 +3632,7 @@ _0811BD7C: movs r0, 0 b _0811BD9C _0811BD80: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r2, 0 ldr r3, =0x0000ffff @@ -3666,7 +3666,7 @@ sub_811BDB0: @ 811BDB0 b _0811BDDE .pool _0811BDC8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -3689,13 +3689,13 @@ sub_811BDF0: @ 811BDF0 push {r4-r6,lr} sub sp, 0x20 adds r6, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] bl sub_81AFBF0 ldr r0, =0x00003b70 adds r5, r4, r0 adds r0, r5, 0 - bl GetStringLength + bl StringLength lsls r0, 16 cmp r0, 0 beq _0811BE34 @@ -3732,7 +3732,7 @@ sub_811BE54: @ 811BE54 ldr r0, [r0] adds r4, r0, 0 adds r4, 0x3C - ldr r2, =gUnknown_02021DC4 + ldr r2, =gStringVar2 movs r5, 0 b _0811BE86 .pool @@ -6261,7 +6261,7 @@ _0811D32C: strb r0, [r1, 0xB] adds r0, r2, 0 add r1, sp, 0xC - bl AppendString + bl StringAppend adds r2, r0, 0 movs r5, 0 lsls r0, r7, 4 @@ -6316,7 +6316,7 @@ _0811D3A8: _0811D3AE: adds r0, r2, 0 add r1, sp, 0xC - bl AppendString + bl StringAppend adds r2, r0, 0 cmp r6, 0x2 beq _0811D3C4 @@ -9006,7 +9006,7 @@ _0811E852: movs r1, 0x2 bl StartObjectImageAnim _0811E892: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] movs r1, 0x69 @@ -9456,7 +9456,7 @@ _0811EBD8: adds r1, r0, 0 _0811EBEA: adds r0, r5, 0 - bl CopyString + bl StringCopy b _0811EC02 .pool _0811EBFC: @@ -9695,7 +9695,7 @@ _0811ED94: _0811EDB0: ldr r0, =gUnknown_085EEA42 _0811EDB2: - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 _0811EDBA: @@ -9868,7 +9868,7 @@ _0811EEE4: beq _0811EF3C b _0811EF58 _0811EEEE: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bb0 adds r5, r0, r1 @@ -9876,7 +9876,7 @@ _0811EEEE: b _0811EF46 .pool _0811EF04: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bbc adds r5, r0, r1 @@ -9893,13 +9893,13 @@ _0811EF04: b _0811EF48 .pool _0811EF2C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bc8 b _0811EF42 .pool _0811EF3C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bd4 _0811EF42: @@ -9909,7 +9909,7 @@ _0811EF44: _0811EF46: movs r3, 0x2 _0811EF48: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r5, 0 bl ConvertEasyChatWordsToString @@ -9937,7 +9937,7 @@ _0811EF7E: adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 bl CopyEasyChatWord pop {r0} bx r0 @@ -9952,7 +9952,7 @@ sub_811EF98: @ 811EF98 lsls r1, 19 ands r1, r0 lsrs r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002e20 adds r0, r3 @@ -9975,7 +9975,7 @@ sub_811EFC0: @ 811EFC0 lsrs r3, r0, 27 movs r2, 0x7 ands r2, r1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002e20 adds r1, r0 @@ -10206,7 +10206,7 @@ _0811F174: sub_811F184: @ 811F184 push {r4-r7,lr} movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00002bb0 ldr r3, =gUnknown_0859E62C _0811F18E: @@ -10223,7 +10223,7 @@ _0811F18E: cmp r2, 0x3 bls _0811F18E movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00002bbc ldr r3, =gUnknown_0859E634 _0811F1AE: @@ -10240,7 +10240,7 @@ _0811F1AE: cmp r2, 0x5 bls _0811F1AE movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00002bc8 ldr r3, =gUnknown_0859E640 _0811F1CE: @@ -10257,7 +10257,7 @@ _0811F1CE: cmp r2, 0x5 bls _0811F1CE movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00002bd4 ldr r3, =gUnknown_0859E64C _0811F1EE: @@ -10274,7 +10274,7 @@ _0811F1EE: cmp r2, 0x5 bls _0811F1EE movs r2, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r6, =0x00002be0 ldr r0, =0x0000ffff adds r5, r0, 0 @@ -10303,7 +10303,7 @@ _0811F218: cmp r2, 0xF bls _0811F210 movs r2, 0 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r3, =0x00002e20 movs r1, 0 _0811F244: @@ -10512,7 +10512,7 @@ sub_811F3E0: @ 811F3E0 adds r1, r0 ldr r1, [r1] adds r0, r4, 0 - bl CopyString + bl StringCopy adds r1, r0, 0 subs r4, r1, r4 lsls r4, 16 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index 8f675adb7..a815aa489 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -222,7 +222,7 @@ sub_80714B8: @ 80714B8 adds r0, r4, 0 movs r1, 0x3 bl pokedex_flag_operation - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl pokemon_get_nick mov r2, sp @@ -288,29 +288,29 @@ sub_807158C: @ 807158C adds r6, 0x7C mov r0, sp adds r1, r6, 0 - bl CompareStringWithoutExtendedControlCodes + bl StringCompareWithoutExtCtrlCodes adds r5, r4, 0 adds r5, 0x74 cmp r0, 0 bne _080715CE - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r1, r5, 0 - bl CompareStringWithoutExtendedControlCodes + bl StringCompareWithoutExtCtrlCodes cmp r0, 0 beq _08071608 _080715CE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, sp - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r4, 0x87 ldrb r2, [r4] lsls r2, 28 lsrs r2, 28 adds r1, r5, 0 bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrb r2, [r4] lsrs r2, 4 adds r1, r6, 0 @@ -330,7 +330,7 @@ _0807160A: thumb_func_start sub_8071614 sub_8071614: @ 8071614 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003030 adds r0, r1 @@ -734,7 +734,7 @@ sub_80719FC: @ 80719FC muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 movs r1, 0x2 bl pokemon_setattr bl sub_805F094 @@ -968,12 +968,12 @@ _08071C24: muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl pokemon_get_nick - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED5A5 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, [r5] ldrb r0, [r0, 0x8] movs r1, 0xFF @@ -1020,12 +1020,12 @@ _08071CA4: muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl pokemon_get_nick - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED5BE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, [r5] ldrb r0, [r0, 0x8] movs r1, 0x1 @@ -1087,7 +1087,7 @@ _08071D3C: muls r0, r6 ldr r5, =gUnknown_020244EC adds r0, r5 - ldr r1, =gUnknown_02021EC4 + ldr r1, =gStringVar3 mov r9, r1 bl pokemon_get_nick mov r1, r8 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 0ee6137ca..4b2261edd 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -207,17 +207,17 @@ evolution_cutscene: @ 813DA8C movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, sp - bl CopyString_Limit10 - ldr r0, =gUnknown_02021DC4 + bl StringCopy10 + ldr r0, =gStringVar2 movs r1, 0xB mov r2, r10 muls r2, r1 adds r1, r2, 0 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0xB bl pokemon_getattr @@ -829,15 +829,15 @@ sub_813E1D4: @ 813E1D4 movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, sp - bl CopyString_Limit10 - ldr r0, =gUnknown_02021DC4 + bl StringCopy10 + ldr r0, =gStringVar2 movs r1, 0xB muls r1, r5 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_02021CC0 movs r0, 0x1 strb r0, [r1] @@ -1332,10 +1332,10 @@ _0813E6D4: beq _0813E6E4 bl _0813F1A4 _0813E6E4: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085CC990 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl battle_show_message_maybe @@ -1620,10 +1620,10 @@ _0813E990: bne _0813E99E bl _0813F1A4 _0813E99E: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085CC9A6 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl battle_show_message_maybe @@ -1708,7 +1708,7 @@ _0813EA5E: bl pokemon_getattr ldr r0, =gUnknown_02022F58 add r1, sp, 0x4 - bl CopyString_Limit10 + bl StringCopy10 ldr r0, =0x0000ffff cmp r6, r0 bne _0813EA94 @@ -1856,17 +1856,17 @@ _0813EBB8: ldrsh r0, [r1, r3] cmp r0, 0 beq _0813EBE4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085CC9EE - bl ExpandStringRefs + bl StringExpandPlaceholders b _0813EBEC .pool _0813EBE4: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085CC9D3 - bl ExpandStringRefs + bl StringExpandPlaceholders _0813EBEC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl battle_show_message_maybe ldr r1, =gTasks @@ -2532,10 +2532,10 @@ _0813F204: .4byte _0813F7A4 .4byte _0813F7E4 _0813F258: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085CC990 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0x1 @@ -2803,10 +2803,10 @@ _0813F4E4: bne _0813F4F2 bl _0813FCC4 _0813F4F2: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085CC9A6 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0x1 @@ -2892,7 +2892,7 @@ _0813F58C: bl pokemon_getattr ldr r0, =gUnknown_02022F58 add r1, sp, 0x4 - bl CopyString_Limit10 + bl StringCopy10 ldr r0, =0x0000ffff cmp r6, r0 bne _0813F5E8 @@ -3028,10 +3028,10 @@ _0813F704: bne _0813F714 b _0813FCC4 _0813F714: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085CC9EE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0x1 diff --git a/asm/field_camera.s b/asm/field_camera.s index 0e3925aeb..354dd8f36 100644 --- a/asm/field_camera.s +++ b/asm/field_camera.s @@ -129,7 +129,7 @@ sub_8089C08: @ 8089C08 @ void DrawWholeMapView() DrawWholeMapView: @ 8089C34 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] @@ -291,7 +291,7 @@ _08089D5E: adds r1, r6, r0 lsls r1, 16 lsrs r1, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r0, 0 ldrsh r2, [r3, r0] @@ -334,7 +334,7 @@ _08089D9C: lsrs r0, 24 _08089DAE: adds r1, r6, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r0, 0 ldrsh r2, [r3, r0] @@ -380,7 +380,7 @@ _08089DFC: adds r1, r6 lsls r1, 16 lsrs r1, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r3, 0 ldrsh r2, [r0, r3] @@ -438,7 +438,7 @@ _08089E66: adds r1, r5 lsls r1, 16 lsrs r1, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r3, 0 ldrsh r2, [r0, r3] @@ -724,7 +724,7 @@ _0808A082: MapPosToBgTilemapOffset: @ 808A0AC push {r4,r5,lr} adds r4, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r5, 0 ldrsh r0, [r3, r5] diff --git a/asm/field_door.s b/asm/field_door.s index 917a2ac99..9cdcf7d90 100644 --- a/asm/field_door.s +++ b/asm/field_door.s @@ -735,7 +735,7 @@ sub_808A964: @ 808A964 lsls r0, 24 cmp r0, 0 beq _0808A990 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000101a diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index a6ae0ac33..9a0460934 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -833,7 +833,7 @@ unc_grass_normal: @ 8154550 ands r0, r1 cmp r0, 0 beq _0815459C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x5 ldrsb r0, [r2, r0] @@ -1172,7 +1172,7 @@ unc_grass_tall: @ 8154800 ands r0, r1 cmp r0, 0 beq _0815484C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x5 ldrsb r0, [r2, r0] diff --git a/asm/field_ground_effect.s b/asm/field_ground_effect.s index abdda24a9..0fb3bdc85 100644 --- a/asm/field_ground_effect.s +++ b/asm/field_ground_effect.s @@ -1185,7 +1185,7 @@ GroundEffect_SpawnOnTallGrass: @ 8096E90 str r1, [r3, 0x10] ldrb r0, [r0, 0xA] str r0, [r3, 0x14] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrb r0, [r1, 0x5] lsls r0, 8 @@ -1224,7 +1224,7 @@ GroundEffect_StepOnTallGrass: @ 8096EDC str r1, [r3, 0x10] ldrb r0, [r0, 0xA] str r0, [r3, 0x14] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrb r0, [r1, 0x5] lsls r0, 8 @@ -1263,7 +1263,7 @@ GroundEffect_SpawnOnLongGrass: @ 8096F28 str r1, [r3, 0x10] ldrb r0, [r0, 0xA] str r0, [r3, 0x14] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrb r0, [r1, 0x5] lsls r0, 8 @@ -1302,7 +1302,7 @@ GroundEffect_StepOnLongGrass: @ 8096F74 str r1, [r3, 0x10] ldrb r0, [r0, 0xA] str r0, [r3, 0x14] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrb r0, [r1, 0x5] lsls r0, 8 diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 570eca428..6edae1a41 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -535,7 +535,7 @@ _0808D7CA: movs r5, 0 cmp r5, r6 bcs _0808D7FE - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr _0808D7D2: lsls r0, r5, 1 adds r0, r5 @@ -1099,7 +1099,7 @@ SpawnSpecialFieldObject: @ 808DC08 add r0, sp, 0x4 adds r1, r4, 0 bl GetFieldObjectMovingCameraOffset - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -1557,7 +1557,7 @@ SpawnFieldObjectsInView: @ 808DF80 ldr r0, [r5, 0x4] cmp r0, 0 beq _0808E078 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r1, [r2] subs r0, r1, 0x2 @@ -1610,7 +1610,7 @@ _0808E004: movs r2, 0xC7 lsls r2, 4 adds r0, r2 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] adds r4, r1, r0 ldrh r0, [r4, 0x4] @@ -1642,7 +1642,7 @@ _0808E004: lsls r0, 24 cmp r0, 0 bne _0808E06E - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r0, [r3] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -1729,7 +1729,7 @@ _0808E0D2: RemoveFieldObjectIfOutsideView: @ 808E0EC push {r4-r7,lr} adds r3, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r0, [r2] subs r1, r0, 0x2 @@ -3952,7 +3952,7 @@ GetFieldObjectTemplateByLocalIdAndMap: @ 808F128 lsrs r3, r1, 24 lsls r2, 24 lsrs r2, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x5 ldrsb r0, [r1, r0] @@ -4026,7 +4026,7 @@ sub_808F1B4: @ 808F1B4 push {r4,r5,lr} adds r3, r0, 0 ldrb r0, [r3, 0x9] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] movs r1, 0x5 ldrsb r1, [r2, r1] @@ -12477,7 +12477,7 @@ _08092FE4: thumb_func_start sub_8092FF0 sub_8092FF0: @ 8092FF0 push {r4,r5,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, [r5] ldrh r4, [r4] lsls r0, 16 @@ -12562,7 +12562,7 @@ _0809308C: adds r0, r1 lsrs r4, r0, 16 _08093098: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] ldrh r1, [r0] lsls r0, r5, 16 diff --git a/asm/field_message_box.s b/asm/field_message_box.s index 1bff785c2..6f5e6dda8 100644 --- a/asm/field_message_box.s +++ b/asm/field_message_box.s @@ -160,9 +160,9 @@ sub_8098238: @ 8098238 ldrb r0, [r5] cmp r0, 0 bne _08098270 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, =sub_8098214 movs r1, 0 bl CreateTask @@ -243,9 +243,9 @@ textbox_fdecode_auto_and_task_add: @ 80982DC push {r4,lr} adds r2, r0, 0 adds r4, r1, 0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 diff --git a/asm/field_poison.s b/asm/field_poison.s index a63c2b623..23900cb0b 100644 --- a/asm/field_poison.s +++ b/asm/field_poison.s @@ -78,13 +78,13 @@ sub_80F95C0: @ 80F95C0 movs r1, 0x37 mov r2, sp bl pokemon_setattr - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r4, 0 movs r1, 0x2 adds r2, r5, 0 bl pokemon_getattr adds r0, r5, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 add sp, 0x4 pop {r4,r5} pop {r0} diff --git a/asm/fieldmap.s b/asm/fieldmap.s index 312ac290a..730289ed5 100644 --- a/asm/fieldmap.s +++ b/asm/fieldmap.s @@ -876,7 +876,7 @@ save_serialize_map: @ 80883C4 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] adds r4, r1, 0 adds r4, 0x34 @@ -936,7 +936,7 @@ sub_8088438: @ 8088438 push {r4,lr} movs r2, 0 movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r3, r0, 0 adds r3, 0x34 @@ -971,7 +971,7 @@ sav2_mapdata_clear: @ 8088474 mov r1, sp movs r0, 0 strh r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] adds r1, 0x34 ldr r2, =0x01000100 @@ -991,7 +991,7 @@ mapdata_from_sav2: @ 808849C mov r5, r8 push {r5-r7} sub sp, 0x10 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] adds r7, r0, 0 adds r7, 0x34 @@ -1147,7 +1147,7 @@ sub_80885C4: @ 80885C4 lsls r0, 24 lsrs r3, r0, 24 adds r2, r3, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] adds r0, r1, 0 adds r0, 0x34 @@ -1373,7 +1373,7 @@ _08088782: GetPostCameraMoveMapBorderId: @ 8088788 push {r4,lr} adds r3, r1, 0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] movs r4, 0 ldrsh r2, [r1, r4] @@ -1395,7 +1395,7 @@ GetPostCameraMoveMapBorderId: @ 8088788 @ bool32 CanCameraMoveInDirection(u8 direction) CanCameraMoveInDirection: @ 80887B0 push {r4,r5,lr} - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r4, [r1] movs r1, 0 ldrsh r3, [r4, r1] @@ -1450,7 +1450,7 @@ _08088816: beq _08088834 cmp r4, 0x4 bne _08088872 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] negs r0, r6 strh r0, [r1] @@ -1460,7 +1460,7 @@ _08088816: b _08088870 .pool _08088834: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, [r3] ldr r0, [r0] @@ -1471,7 +1471,7 @@ _08088834: b _08088870 .pool _0808884C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, [r5, 0x4] ldrh r0, [r1] @@ -1481,7 +1481,7 @@ _0808884C: b _08088870 .pool _08088860: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, [r5, 0x4] ldrh r0, [r1] @@ -1522,7 +1522,7 @@ CameraMove: @ 808887C adds r0, r7, 0x1 cmp r0, 0x1 bhi _080888C4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrh r0, [r1] add r0, r10 @@ -1535,7 +1535,7 @@ CameraMove: @ 808887C _080888C4: bl save_serialize_map bl sub_81BE72C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] movs r2, 0 ldrsh r5, [r0, r2] @@ -1562,7 +1562,7 @@ _080888C4: orrs r0, r1 ldr r2, =gUnknown_02037334 strb r0, [r2] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] @@ -1884,7 +1884,7 @@ sub_8088B3C: @ 8088B3C lsrs r0, 16 lsls r1, 16 lsrs r1, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r2, [r2] subs r0, 0x7 strh r0, [r2] @@ -1896,7 +1896,7 @@ sub_8088B3C: @ 8088B3C thumb_func_start sav1_camera_get_focus_coords sav1_camera_get_focus_coords: @ 8088B58 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r3, [r2] ldrh r2, [r3] adds r2, 0x7 @@ -1911,7 +1911,7 @@ sav1_camera_get_focus_coords: @ 8088B58 thumb_func_start SetCameraCoords @ void SetCameraCoords(u16 x, u16 y) SetCameraCoords: @ 8088B70 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r2, [r2] strh r0, [r2] strh r1, [r2, 0x2] @@ -1922,7 +1922,7 @@ SetCameraCoords: @ 8088B70 thumb_func_start GetCameraCoords @ void GetCameraCoords(u16 *x, u16 *y) GetCameraCoords: @ 8088B80 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r3, [r2] ldrh r2, [r3] strh r2, [r0] diff --git a/asm/flag.s b/asm/flag.s index 24b70f5e1..9919e0442 100644 --- a/asm/flag.s +++ b/asm/flag.s @@ -20,7 +20,7 @@ _0809D6FC: ldr r0, =0x00003fff cmp r2, r0 bhi _0809D71C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr lsrs r1, 19 ldr r2, =0x00001270 adds r1, r2 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index c74e23312..f1ff0be2d 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -2055,14 +2055,14 @@ _080FACB4: beq _080FACC2 b _080FADCE _080FACC2: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0x64 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EA88B - bl CopyString + bl StringCopy ldr r1, =gUnknown_020375F0 movs r0, 0 strh r0, [r1] @@ -2079,14 +2079,14 @@ _080FACC2: b _080FAD8A .pool _080FAD14: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0x32 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EA890 - bl CopyString + bl StringCopy ldr r1, =gUnknown_020375F0 movs r0, 0 strh r0, [r1] diff --git a/asm/fldeff_emotion.s b/asm/fldeff_emotion.s index 9e76fa1c7..64a099744 100644 --- a/asm/fldeff_emotion.s +++ b/asm/fldeff_emotion.s @@ -287,7 +287,7 @@ sub_80B4808: @ 80B4808 strb r0, [r3] movs r0, 0xFE strb r0, [r3, 0x1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -311,7 +311,7 @@ _080B4870: strb r0, [r3] movs r0, 0xFE strb r0, [r3, 0x1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] diff --git a/asm/fldeff_strength.s b/asm/fldeff_strength.s index a19bdbd25..38ffe9f37 100644 --- a/asm/fldeff_strength.s +++ b/asm/fldeff_strength.s @@ -72,7 +72,7 @@ sub_8145E2C: @ 8145E2C muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname movs r0, 0 pop {r1} diff --git a/asm/intro.s b/asm/intro.s index 41e9547fc..4e3e3f882 100644 --- a/asm/intro.s +++ b/asm/intro.s @@ -321,7 +321,7 @@ c2_copyright_1: @ 816CEAC _0816CEDE: bl init_sav2 _0816CEE2: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x15] lsls r0, 31 diff --git a/asm/item.s b/asm/item.s index aeb02e3f3..fcc7eb6a8 100644 --- a/asm/item.s +++ b/asm/item.s @@ -8,7 +8,7 @@ thumb_func_start decrypt_bag_item_quantity decrypt_bag_item_quantity: @ 80D6554 adds r1, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xAC ldr r0, [r0] @@ -24,7 +24,7 @@ decrypt_bag_item_quantity: @ 80D6554 encrypt_bag_item_quantity: @ 80D656C lsls r1, 16 lsrs r1, 16 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] adds r2, 0xAC ldr r2, [r2] @@ -108,7 +108,7 @@ call_encrypt_decrypt_all_item_quantities: @ 80D65E4 init_bag_pockets: @ 80D65F0 push {r4,lr} ldr r1, =gUnknown_02039DD8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r3, 0xAC lsls r3, 3 @@ -156,7 +156,7 @@ itemid_get_name: @ 80D6644 bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -181,7 +181,7 @@ _080D667C: ldr r1, =gUnknown_085EFCD4 _080D667E: adds r0, r4, 0 - bl CopyString + bl StringCopy b _080D66BE .pool _080D668C: @@ -205,7 +205,7 @@ _080D66B0: bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy _080D66BE: pop {r4} pop {r0} @@ -221,12 +221,12 @@ GetBerryCountString: @ 80D66C4 bhi _080D66CE ldr r4, =gUnknown_085EFCDF _080D66CE: - bl CopyString + bl StringCopy movs r1, 0 strb r1, [r0] adds r0, 0x1 adds r1, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -992,7 +992,7 @@ _080D6CA6: sub_80D6CAC: @ 80D6CAC push {lr} movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r3, 0x93 lsls r3, 3 @@ -1027,7 +1027,7 @@ sub_80D6CE4: @ 80D6CE4 push {r4,lr} movs r2, 0 movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r4, 0x93 lsls r4, 3 @@ -1063,7 +1063,7 @@ sub_80D6D1C: @ 80D6D1C lsrs r5, r1, 16 movs r4, 0 _080D6D28: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] lsls r1, r4, 2 adds r0, r2, r1 @@ -1110,7 +1110,7 @@ sub_80D6D70: @ 80D6D70 movs r0, 0xC8 bl AllocZeroed adds r7, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x93 lsls r0, 3 @@ -1179,7 +1179,7 @@ _080D6E10: adds r1, r5, 0 bl sub_80D6588 _080D6E20: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x93 lsls r1, 3 @@ -1205,7 +1205,7 @@ sub_80D6E48: @ 80D6E48 lsls r0, 24 lsls r1, 16 lsrs r1, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r2, [r2] lsrs r0, 22 adds r3, r2, r0 @@ -1240,7 +1240,7 @@ _080D6E88: adds r6, r1, 0 cmp r4, 0x31 bhi _080D6ECA - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 lsls r5, r2, 2 movs r7, 0x93 @@ -1283,7 +1283,7 @@ _080D6ECA: thumb_func_start sub_80D6EDC sub_80D6EDC: @ 80D6EDC push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00000496 adds r1, r0, r2 @@ -1604,7 +1604,7 @@ sub_80D710C: @ 80D710C lsrs r5, r0, 16 lsls r1, 16 lsrs r4, r1, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -1664,7 +1664,7 @@ sub_80D7184: @ 80D7184 lsrs r5, r0, 16 lsls r1, 16 lsrs r4, r1, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -1731,7 +1731,7 @@ sub_80D7204: @ 80D7204 lsrs r7, r0, 16 lsls r1, 16 lsrs r4, r1, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -1879,7 +1879,7 @@ sub_80D7334: @ 80D7334 mov r9, r0 lsls r1, 16 lsrs r4, r1, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 diff --git a/asm/item_use.s b/asm/item_use.s index 095da509c..d3f7e3565 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -140,9 +140,9 @@ DisplayCannotUseItemMessage: @ 80FD164 lsrs r5, r0, 24 lsls r4, 24 lsrs r4, 24 - ldr r6, =gUnknown_02021FC4 + ldr r6, =gStringVar4 adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders cmp r4, 0 bne _080FD1B4 bl InBattlePyramid @@ -1532,7 +1532,7 @@ ItemUseOutOfBattle_CoinCase: @ 80FDC34 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl GetCoins adds r1, r0, 0 lsls r1, 16 @@ -1540,11 +1540,11 @@ ItemUseOutOfBattle_CoinCase: @ 80FDC34 adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9026 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 @@ -1578,17 +1578,17 @@ ItemUseOutOfBattle_PowderJar: @ 80FDCA4 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_80247BC adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9138 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 @@ -1944,7 +1944,7 @@ task08_0809AD8C: @ 80FDFBC ands r0, r1 cmp r0, 0 beq _080FE000 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] bl ItemIdToBattleMoveId @@ -1955,11 +1955,11 @@ task08_0809AD8C: @ 80FDFBC ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9058 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_80FE024 adds r0, r5, 0 movs r1, 0x1 @@ -2007,11 +2007,11 @@ sub_80FE058: @ 80FE058 movs r1, 0x1 bl remove_item ldrh r0, [r4] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9080 - bl ExpandStringRefs + bl StringExpandPlaceholders bl InBattlePyramid lsls r0, 24 cmp r0, 0 @@ -2138,7 +2138,7 @@ sub_80FE164: @ 80FE164 lsls r0, 24 cmp r0, 0 bne _080FE1B8 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 @@ -2146,7 +2146,7 @@ sub_80FE164: @ 80FE164 b _080FE1C2 .pool _080FE1B8: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =sub_81C6714 adds r0, r6, 0 bl DisplayItemMessageInBattlePyramid @@ -2181,7 +2181,7 @@ sub_80FE1D0: @ 80FE1D0 lsls r0, 24 cmp r0, 0 bne _080FE21C - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 @@ -2189,7 +2189,7 @@ sub_80FE1D0: @ 80FE1D0 b _080FE226 .pool _080FE21C: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =sub_81C6714 adds r0, r5, 0 bl DisplayItemMessageInBattlePyramid @@ -2207,7 +2207,7 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234 lsrs r5, r0, 24 ldr r4, =gUnknown_0203CE7C ldrh r0, [r4] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name ldrh r0, [r4] cmp r0, 0x2B @@ -2216,9 +2216,9 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234 bl FlagSet ldr r0, =0x000008ae bl FlagReset - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E90C6 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080FE28C .pool _080FE278: @@ -2226,9 +2226,9 @@ _080FE278: bl FlagSet ldr r0, =0x000008ad bl FlagReset - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E90F4 - bl ExpandStringRefs + bl StringExpandPlaceholders _080FE28C: ldr r1, =gTasks lsls r0, r5, 2 @@ -2275,7 +2275,7 @@ re_escape_rope: @ 80FE2D8 adds r0, r1 movs r1, 0 strh r1, [r0, 0x8] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =task08_080A1C44 adds r0, r4, 0 bl DisplayItemMessageOnField @@ -2629,7 +2629,7 @@ ItemUseInBattle_Escape: @ 80FE5E4 lsls r0, 24 cmp r0, 0 bne _080FE620 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 ldr r3, =unknown_ItemMenu_Confirm adds r0, r4, 0 movs r1, 0x1 @@ -2637,7 +2637,7 @@ ItemUseInBattle_Escape: @ 80FE5E4 b _080FE646 .pool _080FE620: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =sub_81C5B14 adds r0, r4, 0 bl DisplayItemMessageInBattlePyramid diff --git a/asm/link.s b/asm/link.s index 5a6798e59..1871900d6 100644 --- a/asm/link.s +++ b/asm/link.s @@ -217,7 +217,7 @@ sub_8009570: @ 8009570 movs r4, 0 _080095A0: bl GenerateRandomNumber - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xA adds r1, r4 @@ -272,7 +272,7 @@ sub_8009628: @ 8009628 sub_8009638: @ 8009638 push {r4,r5,lr} ldr r5, =gUnknown_020229CC - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldrb r2, [r1, 0xA] ldrb r0, [r1, 0xB] @@ -287,7 +287,7 @@ sub_8009638: @ 8009638 str r2, [r5, 0x4] adds r0, r5, 0 adds r0, 0x8 - bl CopyString + bl StringCopy ldr r0, [r4] ldrb r0, [r0, 0x8] strb r0, [r5, 0x13] @@ -2880,7 +2880,7 @@ _0800AB36: mov r1, r8 adds r0, r2, r1 adds r1, r2, r7 - bl CompareString + bl StringCompare cmp r0, 0 beq _0800AB6A _0800AB5A: @@ -4002,7 +4002,7 @@ sub_800B524: @ 800B524 adds r2, 0x8 ldrb r1, [r0, 0x1A] adds r0, r2, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r0} bx r0 thumb_func_end sub_800B524 @@ -9162,7 +9162,7 @@ sub_800DD94: @ 800DD94 lsrs r1, 24 mov r9, r1 movs r4, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r8, r0 adds r6, r7, 0x2 ldr r0, [r0] @@ -9865,7 +9865,7 @@ sub_800E378: @ 800E378 push {lr} stm r0!, {r1} adds r1, r2, 0 - bl CopyString + bl StringCopy pop {r0} bx r0 thumb_func_end sub_800E378 @@ -9937,7 +9937,7 @@ _0800E3D0: adds r3, r1, r0 _0800E3FC: ldrh r1, [r3] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r7, =0x00003b98 adds r0, r2, r7 @@ -9950,7 +9950,7 @@ _0800E3FC: ldr r0, [sp, 0x1C] add r0, r10 str r3, [sp, 0x18] - bl CompareString + bl StringCompare ldr r3, [sp, 0x18] cmp r0, 0 bne _0800E428 @@ -9999,7 +9999,7 @@ _0800E45C: ldr r2, [r7] cmp r2, 0 blt _0800E4A0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r2, 1 adds r0, r2 @@ -10025,7 +10025,7 @@ _0800E4AC: cmp r4, r0 blt _0800E45C movs r4, 0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r9, r1 ldr r6, =0x00003b98 movs r7, 0 @@ -10066,7 +10066,7 @@ _0800E500: cmp r4, 0x13 ble _0800E4CE _0800E50A: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r7, =0x00003b98 adds r0, r7 @@ -10098,7 +10098,7 @@ sub_800E540: @ 800E540 lsrs r0, 16 mov r8, r0 movs r7, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r4, =0x00003b98 movs r5, 0 _0800E558: @@ -10106,7 +10106,7 @@ _0800E558: adds r0, r4 adds r0, 0x4 mov r1, r9 - bl CompareString + bl StringCompare cmp r0, 0 bne _0800E584 ldr r0, [r6] @@ -10155,7 +10155,7 @@ sub_800E5AC: @ 800E5AC movs r5, 0 movs r4, 0x13 _0800E5C0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] mov r2, r8 adds r0, r1, r2 @@ -15152,9 +15152,9 @@ _08010F3C: sub_8010F48: @ 8010F48 push {lr} ldr r0, =gUnknown_02022B22 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -16620,7 +16620,7 @@ sub_8011AFC: @ 8011AFC movs r4, 0 _08011B38: bl GenerateRandomNumber - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xA adds r1, r4 @@ -16838,7 +16838,7 @@ _08011D02: adds r1, r5 adds r1, 0x15 ldr r0, [sp] - bl CompareString + bl StringCompare cmp r0, 0 bne _08011D4C cmp r10, r6 @@ -17173,7 +17173,7 @@ sub_8011FC8: @ 8011FC8 adds r4, r0 adds r0, r4, 0 adds r1, r6, 0 - bl CopyString + bl StringCopy strh r5, [r4, 0x10] pop {r4-r6} pop {r0} @@ -17378,7 +17378,7 @@ sub_8012188: @ 8012188 ldr r1, =0x00000119 adds r0, r6, r1 adds r1, r3, 0 - bl CopyString + bl StringCopy movs r1, 0x85 lsls r1, 1 adds r0, r6, r1 @@ -17884,7 +17884,7 @@ sub_80125BC: @ 80125BC adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r2, [r6] movs r0, 0x1 str r0, [sp] @@ -17897,7 +17897,7 @@ sub_80125BC: @ 80125BC bl sub_80173E0 ldr r1, =gUnknown_082ED8CC add r0, sp, 0x8 - bl CopyString + bl StringCopy adds r5, r0, 0 ldr r0, [r6] adds r0, 0xA @@ -17908,7 +17908,7 @@ sub_80125BC: @ 80125BC adds r0, r5, 0 movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x11 str r0, [sp] mov r0, r8 @@ -17972,9 +17972,9 @@ _08012648: .4byte _080126B8 .4byte _080126B8 _080126B8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082ED960 - bl ExpandStringRefs + bl StringExpandPlaceholders _080126C0: pop {r0} bx r0 @@ -18111,7 +18111,7 @@ _08012828: adds r3, r0, 0 cmp r2, 0x14 bne _08012848 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -18272,14 +18272,14 @@ _08012938: b _08012F50 .pool _080129C8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_082F0048 ldr r4, =gUnknown_02022C2C ldrb r1, [r4] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022C2D ldrb r2, [r0] lsrs r0, r2, 4 @@ -18293,19 +18293,19 @@ _080129C8: ands r0, r2 cmp r0, 0 beq _08012A18 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082ED990 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08012A34 .pool _08012A18: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082ED960 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08012A34 .pool _08012A2C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldrb r1, [r4] bl sub_801262C _08012A34: @@ -18321,7 +18321,7 @@ _08012A34: _08012A50: adds r0, r6, 0 adds r0, 0xD - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -18472,7 +18472,7 @@ _08012B7E: _08012B8C: adds r0, r6, 0 adds r0, 0xD - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -18622,16 +18622,16 @@ _08012CBC: b _08012CE0 .pool _08012CC4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r6, 0x13] lsls r2, 5 subs r2, 0x20 ldr r1, [r6] adds r1, r2 bl sub_8018404 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EDC9C - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0xD strb r0, [r6, 0xC] _08012CE0: @@ -18689,7 +18689,7 @@ _08012D50: _08012D5A: adds r0, r6, 0 adds r0, 0xD - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -19033,13 +19033,13 @@ _08013058: ldr r1, =gUnknown_082EDC0C _0801305A: adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08013070 .pool _08013068: ldr r1, =gUnknown_082EDC34 adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08013070: pop {r0} bx r0 @@ -19067,12 +19067,12 @@ _0801308E: b _080130AA _08013098: ldr r1, =gUnknown_082EE560 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080130AA .pool _080130A4: ldr r1, =gUnknown_082EE57C - bl ExpandStringRefs + bl StringExpandPlaceholders _080130AA: pop {r0} bx r0 @@ -19127,13 +19127,13 @@ _080130D0: _08013140: ldr r1, =gUnknown_082EFC3C adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08013158 .pool _08013150: ldr r1, =gUnknown_082EFC54 adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08013158: pop {r0} bx r0 @@ -19188,13 +19188,13 @@ _0801317C: _080131EC: ldr r1, =gUnknown_082EDDF4 adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08013204 .pool _080131FC: ldr r1, =gUnknown_082EDE0C adds r0, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08013204: pop {r0} bx r0 @@ -19221,13 +19221,13 @@ _08013228: bl audio_play ldrb r0, [r4, 0x12] bl sub_81AE70C - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r2, [r4, 0x13] lsls r2, 5 ldr r1, [r4] adds r1, r2 bl sub_8018404 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_02022C2C ldrb r1, [r1] bl sub_8012FC4 @@ -19627,7 +19627,7 @@ _08013570: adds r3, r0, 0 cmp r2, 0x14 bne _08013590 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -19806,13 +19806,13 @@ _080136F2: b _08013756 .pool _08013744: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_082EDD50 subs r1, 0x1 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy movs r0, 0x12 _08013756: strb r0, [r6, 0x8] @@ -19838,7 +19838,7 @@ _0801377E: b _08013B82 .pool _08013788: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, =gUnknown_02022C2C ldrb r1, [r0] adds r0, r4, 0 @@ -19852,7 +19852,7 @@ _08013788: bne _080137A6 b _08013B82 _080137A6: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r6, 0xF] lsls r2, 5 ldr r1, [r6] @@ -19956,7 +19956,7 @@ _080138C2: strb r0, [r6, 0x8] b _080139EC _080138C8: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_02022C2C ldrb r1, [r4] adds r0, r5, 0 @@ -19985,16 +19985,16 @@ _08013904: movs r0, 0x7 movs r1, 0 bl sub_8011A64 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_082F0048 ldrb r1, [r4] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy ldr r1, =gUnknown_082EDE48 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080139EC .pool _08013934: @@ -20004,7 +20004,7 @@ _08013934: bls _0801395C adds r0, r6, 0 adds r0, 0x9 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -20220,7 +20220,7 @@ _08013B24: _08013B44: adds r0, r6, 0 adds r0, 0x9 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 _08013B4A: bl sub_8017064 lsls r0, 24 @@ -20266,7 +20266,7 @@ sub_8013B8C: @ 8013B8C ands r0, r1 cmp r0, 0xC beq _08013BCE - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0x9] movs r2, 0x80 @@ -20304,7 +20304,7 @@ sub_8013BD8: @ 8013BD8 bl sub_800DFB4 ldrb r0, [r4, 0xE] bl sub_81AE70C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r4, 0xF] lsls r2, 5 ldr r1, [r4] @@ -20833,7 +20833,7 @@ _08013FFC: .pool _08014038: ldr r4, =gUnknown_020228C4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002be0 adds r1, r0 @@ -21101,7 +21101,7 @@ sub_8014290: @ 8014290 ldr r0, =0x00004087 adds r1, r3, 0 bl VarSet - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r1, [r6] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -21989,15 +21989,15 @@ _08014AEC: b _08014C42 .pool _08014BBC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_082F0048 ldr r4, =gUnknown_02022C2C ldrb r1, [r4] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r0, =gUnknown_02021FC4 + bl StringCopy + ldr r0, =gStringVar4 ldrb r1, [r4] bl sub_801262C movs r0, 0x3 @@ -22005,7 +22005,7 @@ _08014BBC: b _08014EF2 .pool _08014BEC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl sub_8018884 movs r0, 0x4 strb r0, [r5, 0xC] @@ -22057,7 +22057,7 @@ _08014C52: adds r0, 0xD adds r1, r5, 0 adds r1, 0x14 - ldr r3, =gUnknown_02021FC4 + ldr r3, =gStringVar4 movs r2, 0 bl sub_8018B08 lsls r0, 24 @@ -22161,16 +22161,16 @@ _08014CF2: ldrb r0, [r5, 0x13] adds r0, 0x1 strb r0, [r5, 0x13] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r5, 0x13] lsls r2, 5 subs r2, 0x20 ldr r1, [r5] adds r1, r2 bl sub_8018404 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EDC9C - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x9 strb r0, [r5, 0xC] bl sub_800EF38 @@ -22220,7 +22220,7 @@ _08014DB0: strb r4, [r5, 0xC] b _08014EF2 _08014DBC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl sub_8018884 movs r0, 0xA strb r0, [r5, 0xC] @@ -22580,7 +22580,7 @@ _080150D6: bl sub_800DFB4 ldrb r0, [r7, 0xE] bl sub_81AE70C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r7, 0xF] lsls r2, 5 ldr r1, [r7] @@ -22625,7 +22625,7 @@ _08015176: _08015180: ldr r0, =gUnknown_082EFC3C bl sub_8018884 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r7, 0xF] lsls r2, 5 ldr r1, [r7] @@ -22991,7 +22991,7 @@ _080154D4: _080154E0: ldr r0, =gUnknown_082EFC90 bl sub_8018884 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r2, [r5, 0xF] lsls r2, 5 ldr r1, [r5] @@ -23170,11 +23170,11 @@ sub_8015664: @ 8015664 movs r1, 0x8 strb r1, [r2, 0x14] strb r0, [r2, 0x15] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 cmp r3, r0 beq _0801567E adds r1, r3, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _0801567E: pop {r0} bx r0 @@ -23189,11 +23189,11 @@ sub_801568C: @ 801568C ldr r1, [r0] movs r0, 0x1A strb r0, [r1, 0x14] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 cmp r2, r0 beq _080156A4 adds r1, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _080156A4: pop {r0} bx r0 @@ -23498,10 +23498,10 @@ _080159A6: bl sub_8011090 movs r0, 0x2 bl audio_play - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy movs r1, 0 movs r0, 0x2A b _08015A02 @@ -23567,10 +23567,10 @@ _08015A4C: movs r0, 0x2 bl audio_play bl sub_80181CC - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy movs r0, 0x2D bl _08016876 .pool @@ -23677,7 +23677,7 @@ _08015B44: bl _08016876 .pool _08015B68: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0x13 bl sub_8015664 bl _08016878 @@ -23813,14 +23813,14 @@ _08015CB2: movs r1, 0x40 strh r1, [r0] bl sub_800FE50 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_082EEB80 ldr r1, =gUnknown_020229E8 ldrb r1, [r1, 0x13] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy movs r0, 0x20 bl _08016876 .pool @@ -23855,9 +23855,9 @@ _08015D18: bl _08016876 .pool _08015D34: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EEB88 - bl CopyString + bl StringCopy movs r0, 0x24 bl _08016876 .pool @@ -23922,9 +23922,9 @@ _08015DD0: ldrb r0, [r0] cmp r0, 0 bne _08015DF4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EEB88 - bl CopyString + bl StringCopy movs r0, 0x1C bl _08016876 .pool @@ -23940,7 +23940,7 @@ _08015DF4: ldrb r0, [r0] cmp r0, 0x8 bne _08015E24 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r6, 0 movs r2, 0 bl sub_8018220 @@ -23958,7 +23958,7 @@ _08015E32: movs r5, 0 movs r0, 0x20 strb r0, [r6, 0x14] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r4, =gUnknown_02022C2C ldrb r2, [r4] movs r1, 0x40 @@ -23995,7 +23995,7 @@ _08015E5C: _08015E94: adds r0, r6, 0 adds r0, 0x16 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -24024,7 +24024,7 @@ _08015ED2: lsls r0, 24 cmp r0, 0 bne _08015F2C - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 bl link_get_multiplayer_id movs r1, 0x1 eors r0, r1 @@ -24036,18 +24036,18 @@ _08015ED2: ldr r4, =gUnknown_020229F0 adds r1, r4 adds r0, r5, 0 - bl CopyString + bl StringCopy ldrh r0, [r4, 0x18] adds r4, 0x1C adds r1, r4, 0 bl sub_800E540 adds r5, r0, 0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_082EE378 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x21 bl _08016876 .pool @@ -24268,22 +24268,22 @@ _08016104: _08016118: movs r0, 0x21 strb r0, [r6, 0x14] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r4, =gUnknown_02022A0C adds r1, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 subs r0, 0x24 ldrh r0, [r0, 0x20] adds r1, r4, 0 bl sub_800E540 adds r5, r0, 0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_082EE324 lsls r1, r5, 2 adds r1, r2 ldr r1, [r1] - bl ExpandStringRefs + bl StringExpandPlaceholders b _08016878 .pool _08016158: @@ -24291,7 +24291,7 @@ _08016158: bl sub_801689C adds r0, r6, 0 adds r0, 0x16 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -24320,14 +24320,14 @@ _0801618A: _08016198: movs r0, 0x1 bl sub_8011DE0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EE598 - bl CopyString + bl StringCopy movs r0, 0x24 b _08016876 .pool _080161B8: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0x9 bl sub_8015664 b _08016878 @@ -24406,9 +24406,9 @@ _0801623E: bl sub_800FE50 movs r0, 0xA strb r0, [r6, 0x14] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EEC14 - bl CopyString + bl StringCopy b _08016878 .pool _0801627C: @@ -24421,7 +24421,7 @@ _08016286: bne _080162A4 adds r0, r5, 0 bl sub_800FE50 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r6, 0 movs r2, 0x1 bl sub_8018220 @@ -24441,7 +24441,7 @@ _080162AE: bl sub_800FE50 movs r0, 0xA strb r0, [r6, 0x14] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_02022C2C ldrb r1, [r1] bl sub_8013078 @@ -24461,7 +24461,7 @@ _080162E6: ldr r1, =gUnknown_02022C2C movs r0, 0x40 strb r0, [r1] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0x25 bl sub_8015664 adds r0, r6, 0 @@ -24483,7 +24483,7 @@ _08016318: bl sub_801818C b _08016878 _08016324: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, =gUnknown_02022C2C ldrb r0, [r0] movs r1, 0x40 @@ -24572,13 +24572,13 @@ _080163E4: lsls r1, 1 cmp r0, r1 bne _08016408 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EF590 - bl CopyString + bl StringCopy b _0801643E .pool _08016408: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_800F7DC ldrh r0, [r0, 0x8] lsls r0, 22 @@ -24588,20 +24588,20 @@ _08016408: ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString - ldr r4, =gUnknown_02021DC4 + bl StringCopy + ldr r4, =gStringVar2 bl sub_800F7DC ldrb r1, [r0, 0xB] lsrs r1, 1 adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EF564 - bl ExpandStringRefs + bl StringExpandPlaceholders _0801643E: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0x2C bl sub_8015664 b _08016878 @@ -24870,7 +24870,7 @@ _080166A2: beq _080166FC b _08016878 _080166A8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r6] adds r1, r4 bl sub_8018404 @@ -24881,11 +24881,11 @@ _080166A8: b _08016878 .pool _080166C8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r6] adds r1, r4 bl sub_8018404 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, [r6] adds r1, r4 ldrb r2, [r1, 0x9] @@ -24894,16 +24894,16 @@ _080166C8: subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_082EF6E4 b _0801671E .pool _080166FC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r6] adds r1, r4 bl sub_8018404 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, [r6] adds r1, r4 ldrb r2, [r1, 0x9] @@ -24912,7 +24912,7 @@ _080166FC: subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_082EF718 _0801671E: movs r0, 0x2E @@ -25012,7 +25012,7 @@ _080167F4: adds r0, 0x10 movs r2, 0x44 bl sub_8012188 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r3, 0x2 ldrsh r2, [r7, r3] lsls r2, 5 @@ -25028,7 +25028,7 @@ _080167F4: _08016838: adds r0, r6, 0 adds r0, 0x16 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -25047,7 +25047,7 @@ _08016838: _08016864: adds r0, r6, 0 adds r0, 0x16 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_8017064 lsls r0, 24 cmp r0, 0 @@ -25122,7 +25122,7 @@ sub_80168DC: @ 80168DC ldrh r0, [r5] cmp r0, 0 beq _0801692C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_020229E8 adds r1, 0x2F ldrb r1, [r1] @@ -25305,7 +25305,7 @@ _08016A78: _08016A84: ldr r0, =gUnknown_02022C20 mov r1, sp - bl CopyString + bl StringCopy b _08016AC8 .pool _08016A94: @@ -25346,9 +25346,9 @@ sp182_move_string: @ 8016AD4 b _08016AF6 .pool _08016AE8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 - bl CopyString + bl StringCopy movs r0, 0xFF strb r0, [r4] movs r0, 0x1 @@ -26037,9 +26037,9 @@ sub_8017020: @ 8017020 movs r0, 0 movs r1, 0x1 bl sub_81973C4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0x1 bl AddTextPrinterWithCustomSpeedForMessage @@ -26082,9 +26082,9 @@ _08017076: movs r0, 0 movs r1, 0x1 bl sub_81973C4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage_2 ldrb r0, [r4] @@ -27060,15 +27060,15 @@ sub_80177B8: @ 80177B8 mov r9, r3 lsls r1, 24 lsrs r1, 24 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 adds r1, 0x1 adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_082ED8C8 adds r0, r5, 0 - bl AppendString + bl StringAppend str r7, [sp] movs r0, 0 str r0, [sp, 0x4] @@ -27110,13 +27110,13 @@ sub_80177B8: @ 80177B8 add r0, sp, 0x8 movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_082ED8CC adds r0, r5, 0 - bl CopyString + bl StringCopy adds r0, r5, 0 add r1, sp, 0x8 - bl AppendString + bl StringAppend movs r0, 0x1 adds r1, r5, 0 movs r2, 0x88 @@ -27166,7 +27166,7 @@ sub_80178A0: @ 80178A0 ands r0, r1 cmp r0, 0x1 bne _0801792A - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r5, 0 bl sub_8018404 @@ -27185,13 +27185,13 @@ sub_80178A0: @ 80178A0 add r0, sp, 0x8 movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_082ED8CC adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 add r1, sp, 0x8 - bl AppendString + bl StringAppend movs r0, 0x1 adds r1, r4, 0 movs r2, 0x68 @@ -27319,7 +27319,7 @@ sub_80179D4: @ 80179D4 bne _08017A4C cmp r4, 0 bne _08017A4C - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 adds r1, r5, 0 bl sub_8018404 @@ -27335,14 +27335,14 @@ sub_80179D4: @ 80179D4 ands r0, r1 cmp r0, 0x45 bne _08017A38 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r3, =gUnknown_082EE6B8 lsls r1, r6, 2 lsls r2, 3 adds r1, r2 adds r1, r3 ldr r1, [r1] - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 b _08017B2A .pool @@ -27356,7 +27356,7 @@ _08017A38: b _08017B2A .pool _08017A4C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 bl sub_8018404 cmp r4, 0 @@ -27387,7 +27387,7 @@ _08017A80: beq _08017AF4 b _08017B20 _08017A8A: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_082EEEAC bl GenerateRandomNumber lsls r0, 16 @@ -27402,7 +27402,7 @@ _08017A8A: b _08017B0E .pool _08017AB0: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF1CC bl GenerateRandomNumber lsls r0, 16 @@ -27414,7 +27414,7 @@ _08017AB0: b _08017B08 .pool _08017AD0: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF010 bl GenerateRandomNumber lsls r0, 16 @@ -27429,7 +27429,7 @@ _08017AD0: b _08017B0E .pool _08017AF4: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_082EF100 bl GenerateRandomNumber lsls r0, 16 @@ -27444,13 +27444,13 @@ _08017B08: ldr r1, [r0] _08017B0E: adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08017B28 .pool _08017B20: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082EE6C8 - bl ExpandStringRefs + bl StringExpandPlaceholders _08017B28: movs r0, 0 _08017B2A: @@ -27529,7 +27529,7 @@ _08017B94: mov r1, r9 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN str r5, [sp] str r4, [sp, 0x4] adds r0, r6, 0 @@ -27581,7 +27581,7 @@ sub_8017BE8: @ 8017BE8 ands r0, r1 cmp r0, 0 beq _08017CA0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] movs r0, 0x5 str r0, [sp] @@ -27805,7 +27805,7 @@ _08017DD8: ldr r1, =gUnknown_082EF7B0 _08017DDA: adds r0, r3, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _08017DF6 .pool _08017DE8: @@ -27814,7 +27814,7 @@ _08017DE8: adds r1, r0 ldr r1, [r1] adds r0, r3, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08017DF6: pop {r0} bx r0 @@ -27877,7 +27877,7 @@ _08017E66: adds r1, r2 ldr r1, [r1] adds r0, r5, 0 - bl CopyString + bl StringCopy b _08017E94 .pool _08017E78: @@ -27893,7 +27893,7 @@ _08017E78: adds r1, r2 ldr r1, [r1] adds r0, r5, 0 - bl CopyString + bl StringCopy _08017E94: pop {r4-r6} pop {r0} @@ -27949,7 +27949,7 @@ _08017EFC: ldrh r1, [r4, 0xC] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 adds r0, 0x68 ldrh r2, [r4, 0xA] @@ -27957,7 +27957,7 @@ _08017EFC: muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy movs r4, 0 b _08017F2E .pool @@ -27978,7 +27978,7 @@ _08017F2E: adds r0, 0x78 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldrh r1, [r5, 0x2] movs r0, 0xB muls r1, r0 @@ -27986,7 +27986,7 @@ _08017F2E: adds r1, r0 adds r0, r6, 0 adds r0, 0x88 - bl CopyString + bl StringCopy ldrh r5, [r5, 0x2] mov r8, r5 _08017F64: @@ -27996,7 +27996,7 @@ _08017F64: bne _08017F84 ldr r1, =gUnknown_082EE4F0 adds r0, r7, 0 - bl CopyString + bl StringCopy b _08017FB4 .pool _08017F84: @@ -28021,7 +28021,7 @@ _08017FAC: ldr r1, =gUnknown_082EE380 _08017FAE: adds r0, r7, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08017FB4: movs r2, 0x1 b _08017FC6 @@ -28029,7 +28029,7 @@ _08017FB4: _08017FBC: ldr r1, =gUnknown_082EE544 adds r0, r7, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r2, 0x2 _08017FC6: adds r0, r2, 0 @@ -28071,7 +28071,7 @@ _08017FFE: InUnionRoom: @ 8018004 push {lr} movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x00003c19 @@ -28390,7 +28390,7 @@ sub_8018220: @ 8018220 ldr r0, =gTrainerClassNames adds r1, r0 adds r0, r6, 0 - bl CopyString + bl StringCopy movs r0, 0 adds r1, r6, 0 bl sub_81AFC0C @@ -28408,7 +28408,7 @@ sub_8018220: @ 8018220 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x2 adds r1, r4, 0 bl sub_81AFC0C @@ -28419,7 +28419,7 @@ sub_8018220: @ 8018220 adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x3 adds r1, r5, 0 bl sub_81AFC0C @@ -28431,7 +28431,7 @@ sub_8018220: @ 8018220 mov r0, r10 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r4, r9 adds r4, 0xFC mov r2, r8 @@ -28439,7 +28439,7 @@ sub_8018220: @ 8018220 adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x4 mov r1, r10 bl sub_81AFC0C @@ -28452,9 +28452,9 @@ sub_8018220: @ 8018220 ldr r1, =gUnknown_082EFF64 adds r0, r4, 0 bl sub_81AFC28 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r4, 0 - bl CopyString + bl StringCopy mov r0, r8 ldrh r1, [r0, 0x14] ldr r4, =0x0000270f @@ -28465,7 +28465,7 @@ _0801830C: adds r0, r6, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0 adds r1, r6, 0 bl sub_81AFC0C @@ -28480,7 +28480,7 @@ _08018328: adds r0, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x2 adds r1, r4, 0 bl sub_81AFC0C @@ -28489,7 +28489,7 @@ _08018328: adds r0, r5, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x3 adds r1, r5, 0 bl sub_81AFC0C @@ -28520,10 +28520,10 @@ _08018360: ldr r1, =gUnknown_082EFFA4 adds r0, r4, 0 bl sub_81AFC28 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend ldr r0, [sp] cmp r0, 0x1 bne _080183D0 @@ -28532,7 +28532,7 @@ _08018360: bl sub_81AFC28 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend b _080183F0 .pool _080183D0: @@ -28549,7 +28549,7 @@ _080183D0: bl sub_81AFC28 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend _080183F0: add sp, 0x4 pop {r3-r5} @@ -28568,12 +28568,12 @@ sub_8018404: @ 8018404 adds r5, r0, 0 adds r4, r1, 0 adds r1, 0x10 - bl CopyString_Limit7 + bl StringCopy7 ldrb r1, [r4] lsls r1, 28 lsrs r1, 28 adds r0, r5, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r4,r5} pop {r0} bx r0 @@ -29082,9 +29082,9 @@ sub_8018884: @ 8018884 push {r4,lr} sub sp, 0x14 adds r1, r0, 0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0x11 bl FillWindowPixelBuffer @@ -29426,8 +29426,8 @@ _08018B26: beq _08018C1A b _08018C3E _08018B30: - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders cmp r6, 0 bne _08018B48 ldr r0, =gUnknown_082F05C8 @@ -29448,7 +29448,7 @@ _08018B4A: ldr r1, =gUnknown_082F0728 str r1, [sp, 0x8] str r2, [sp, 0xC] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 str r1, [sp, 0x10] movs r1, 0x1 movs r3, 0x1 @@ -29570,15 +29570,15 @@ _08018C6A: _08018C6C: cmp r2, 0 bne _08018C84 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EF2FC - bl ExpandStringRefs + bl StringExpandPlaceholders b _08018C8C .pool _08018C84: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EF330 - bl ExpandStringRefs + bl StringExpandPlaceholders _08018C8C: ldr r0, =gUnknown_082F05D8 bl AddWindow @@ -29594,7 +29594,7 @@ _08018C8C: ldr r1, =gUnknown_082F0728 str r1, [sp, 0x8] str r2, [sp, 0xC] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 str r1, [sp, 0x10] movs r1, 0x1 movs r3, 0x1 @@ -30434,12 +30434,12 @@ _080193A6: movs r0, 0 b _080198FE _080193AC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xFF strb r1, [r0] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 strb r1, [r0] - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 strb r1, [r0] ldrb r0, [r5, 0xC] cmp r0, 0 @@ -30556,9 +30556,9 @@ _080194AE: _080194B4: movs r0, 0xB strb r0, [r5, 0x8] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_020229F0 - bl CopyString + bl StringCopy b _08019922 .pool _080194CC: @@ -30669,9 +30669,9 @@ _0801959C: ldrb r0, [r5, 0xD] cmp r0, 0x1 bne _080195AA - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_020229F0 - bl CopyString + bl StringCopy _080195AA: movs r0, 0xF strb r0, [r5, 0x8] @@ -31006,12 +31006,12 @@ _08019820: b _08019922 .pool _0801982C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xFF strb r1, [r0] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 strb r1, [r0] - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 strb r1, [r0] ldrb r0, [r5, 0xC] cmp r0, 0 @@ -31042,9 +31042,9 @@ _08019870: b _08019922 _08019884: bl task_add_05_task_del_08FA224_when_no_RfuFunc - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02022A0C - bl CopyString + bl StringCopy movs r0, 0x22 strb r0, [r5, 0x8] b _08019922 @@ -31319,7 +31319,7 @@ sub_8019A98: @ 8019A98 ldr r1, =gUnknown_082F0774 adds r0, r1 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -31335,7 +31335,7 @@ sub_8019AB8: @ 8019AB8 ldr r1, =gUnknown_082F0774 adds r0, r1 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -31353,7 +31353,7 @@ sub_8019AD8: @ 8019AD8 ldr r1, =gUnknown_082F0774 adds r0, r1 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -31399,7 +31399,7 @@ sub_8019B3C: @ 8019B3C ldr r1, =gUnknown_082F0774 adds r0, r1 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -32931,7 +32931,7 @@ _0801A768: movs r1, 0 bl FillWindowPixelBuffer movs r4, 0 - ldr r6, =gUnknown_02021FC4 + ldr r6, =gStringVar4 movs r7, 0x80 lsls r7, 20 _0801A796: @@ -32943,7 +32943,7 @@ _0801A796: adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN cmp r4, 0x3 beq _0801A7CC lsrs r0, r7, 24 @@ -33885,7 +33885,7 @@ sub_801AFD8: @ 801AFD8 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x0000322c adds r1, r0 @@ -33902,7 +33902,7 @@ sub_801AFD8: @ 801AFD8 thumb_func_start sub_801B00C sub_801B00C: @ 801B00C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003230 adds r0, r1 @@ -33912,7 +33912,7 @@ sub_801B00C: @ 801B00C thumb_func_start sav1_get_mevent_buffer_1 sav1_get_mevent_buffer_1: @ 801B020 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r0, r1 @@ -33922,7 +33922,7 @@ sav1_get_mevent_buffer_1: @ 801B020 thumb_func_start sav1_get_mevent_buffer_2 sav1_get_mevent_buffer_2: @ 801B034 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xD5 lsls r1, 6 @@ -33933,7 +33933,7 @@ sav1_get_mevent_buffer_2: @ 801B034 thumb_func_start sub_801B044 sub_801B044: @ 801B044 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000356c adds r0, r1 @@ -33943,7 +33943,7 @@ sub_801B044: @ 801B044 thumb_func_start sub_801B058 sub_801B058: @ 801B058 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003564 adds r0, r1 @@ -33967,7 +33967,7 @@ sub_801B078: @ 801B078 cmp r0, 0 beq _0801B0C4 bl sub_801B14C - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r5, =0x00003230 adds r0, r5 @@ -34000,7 +34000,7 @@ _0801B0C6: thumb_func_start sub_801B0CC sub_801B0CC: @ 801B0CC push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00003230 adds r0, r1 @@ -34049,7 +34049,7 @@ _0801B122: thumb_func_start sub_801B128 sub_801B128: @ 801B128 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003230 adds r0, r1 @@ -34077,7 +34077,7 @@ sub_801B14C: @ 801B14C ldr r2, =0x0500006f mov r0, sp bl CpuSet - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000322c adds r0, r1 @@ -34111,7 +34111,7 @@ sub_801B180: @ 801B180 sub_801B1A4: @ 801B1A4 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003230 adds r4, r0, r1 @@ -34152,7 +34152,7 @@ sub_801B1E8: @ 801B1E8 bl killram bl sub_809D4D8 bl sub_809D570 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bec adds r0, r1 @@ -34170,7 +34170,7 @@ sub_801B21C: @ 801B21C cmp r0, 0 beq _0801B274 bl sub_801B1E8 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r5, =0x000033f0 adds r0, r5 @@ -34209,7 +34209,7 @@ _0801B276: thumb_func_start sub_801B27C sub_801B27C: @ 801B27C push {r4,r5,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r1, =0x000033ec adds r4, r0, r1 @@ -34283,7 +34283,7 @@ _0801B304: thumb_func_start sub_801B308 sub_801B308: @ 801B308 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r0, r1 @@ -34308,7 +34308,7 @@ sub_801B330: @ 801B330 sub sp, 0x4 movs r5, 0 str r5, [sp] - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] ldr r0, =0x000033f0 adds r1, r0 @@ -34337,7 +34337,7 @@ sub_801B368: @ 801B368 ldr r2, =0x05000009 mov r0, sp bl CpuSet - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000353c adds r0, r1 @@ -34358,7 +34358,7 @@ sub_801B39C: @ 801B39C movs r0, 0 b _0801B3B4 _0801B3AA: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r0, r1 @@ -34535,7 +34535,7 @@ sub_801B4CC: @ 801B4CC bl sub_801B27C cmp r0, 0 beq _0801B500 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r0, =0x000033f0 adds r2, r3, r0 @@ -34562,7 +34562,7 @@ _0801B502: sub_801B508: @ 801B508 push {r4-r6,lr} adds r5, r0, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r1, =0x000033f0 adds r0, r1 @@ -34681,7 +34681,7 @@ _0801B5FC: _0801B5FE: adds r4, r5, 0 adds r4, 0x4C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r8, r0 adds r6, r5, 0 adds r6, 0x45 @@ -34693,7 +34693,7 @@ _0801B5FE: movs r2, 0x60 adds r2, r5 mov r10, r2 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003564 adds r2, r0, r3 @@ -34716,8 +34716,8 @@ _0801B628: mov r2, r8 ldr r1, [r2] adds r0, r6, 0 - bl CopyString - ldr r0, =gUnknown_03005D8C + bl StringCopy + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002bb0 adds r2, r0, r3 @@ -34942,7 +34942,7 @@ _0801B7D2: sub_801B7D8: @ 801B7D8 push {r4,lr} adds r4, r0, 0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] ldr r1, =0x000033f0 adds r0, r1 @@ -35021,7 +35021,7 @@ _0801B874: .4byte _0801B8F4 .4byte _0801B918 _0801B888: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x000033f0 adds r0, r2, r1 @@ -35037,7 +35037,7 @@ _0801B888: b _0801B93A .pool _0801B8AC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x000033f0 adds r0, r2, r1 @@ -35053,7 +35053,7 @@ _0801B8AC: b _0801B93A .pool _0801B8D0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x000033f0 adds r0, r2, r1 @@ -35069,7 +35069,7 @@ _0801B8D0: b _0801B93A .pool _0801B8F4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r0, r1 @@ -35084,7 +35084,7 @@ _0801B8F4: b _0801B93A .pool _0801B918: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r2, r0, r1 @@ -35126,7 +35126,7 @@ sub_801B94C: @ 801B94C bl sub_801B27C cmp r0, 0 beq _0801B988 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000033f0 adds r0, r1 @@ -35159,7 +35159,7 @@ sub_801B990: @ 801B990 bcc _0801B9C0 cmp r2, 0x2 bne _0801B9EC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x00003584 adds r2, r0 @@ -35167,7 +35167,7 @@ sub_801B990: @ 801B990 b _0801B9CA .pool _0801B9C0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x00003570 adds r2, r0 @@ -35178,7 +35178,7 @@ _0801B9CA: b _0801B9EC .pool _0801B9DC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x00003570 adds r2, r0 @@ -35197,7 +35197,7 @@ sub_801B9F8: @ 801B9F8 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003570 adds r1, r0 @@ -35852,7 +35852,7 @@ _0801BF54: ldr r1, [r1, 0x4] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r6, r4, 0 _0801BF66: ldr r2, [r6] @@ -36060,7 +36060,7 @@ _0801C108: ldrh r1, [r1] movs r2, 0x2 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r0, r8 ldr r1, [r0] adds r0, r1, r7 @@ -38861,7 +38861,7 @@ _0801D7C4: bl sub_80992A0 b _0801D804 _0801D7D0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bec adds r0, r1 @@ -38947,9 +38947,9 @@ sub_801D860: @ 801D860 adds r4, r0, 0 ldr r3, =0x0201c000 adds r0, r4, 0x4 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r2, [r2] bl _call_via_r3 cmp r0, 0x1 @@ -39707,7 +39707,7 @@ sub_801DDD0: @ 801DDD0 lsls r1, 1 adds r0, r4, r1 bl sub_801EF1C - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r6, =0x00003c88 adds r4, 0xB9 movs r5, 0x9 @@ -39715,7 +39715,7 @@ _0801DE0E: ldr r1, [r7] adds r1, r6 adds r0, r4, 0 - bl CopyString + bl StringCopy adds r6, 0x15 adds r4, 0x15 subs r5, 0x1 @@ -41490,14 +41490,14 @@ _0801ECDC: adds r1, 0xB9 adds r1, r5, r1 mov r0, sp - bl CopyString + bl StringCopy movs r1, 0 strb r1, [r0] movs r1, 0xFF strb r1, [r0, 0x1] mov r4, sp mov r0, sp - bl GetStringLength_Multibyte + bl StringLength_Multibyte adds r5, r0, 0 _0801ED02: ldr r6, =gUnknown_02022C84 @@ -41636,7 +41636,7 @@ sub_801EDE0: @ 801EDE0 adds r2, r3 adds r2, 0xB9 adds r0, r2 - bl CopyString + bl StringCopy ldr r1, [r4] movs r0, 0x1 strb r0, [r1, 0x18] @@ -41667,7 +41667,7 @@ sub_801EE2C: @ 801EE2C push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r7, =gUnknown_02022C84 movs r6, 0xB9 @@ -41679,7 +41679,7 @@ _0801EE3E: adds r0, r5 ldr r1, [r7] adds r1, r6 - bl CopyString + bl StringCopy adds r6, 0x15 adds r5, 0x15 subs r4, 0x1 @@ -41764,7 +41764,7 @@ sub_801EED8: @ 801EED8 ldr r4, =gUnknown_02022C84 ldr r0, [r4] adds r0, 0x1A - bl GetStringLength_Multibyte + bl StringLength_Multibyte adds r2, r0, 0 ldr r0, [r4] adds r1, r0, 0 @@ -41810,9 +41810,9 @@ sub_801EF24: @ 801EF24 movs r0, 0x2 strb r0, [r4] adds r0, r4, 0x1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022C84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -41830,15 +41830,15 @@ sub_801EF4C: @ 801EF4C movs r0, 0x1 strb r0, [r4] adds r0, r4, 0x1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r4, 0x9 ldr r0, =gUnknown_02022C84 ldr r1, [r0] adds r1, 0x1A adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -41852,9 +41852,9 @@ sub_801EF7C: @ 801EF7C movs r0, 0x3 strb r0, [r4] adds r0, r4, 0x1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022C84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -41873,9 +41873,9 @@ sub_801EFA8: @ 801EFA8 movs r0, 0x4 strb r0, [r4] adds r0, r4, 0x1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022C84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -41893,9 +41893,9 @@ sub_801EFD0: @ 801EFD0 movs r0, 0x5 strb r0, [r4] adds r0, r4, 0x1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022C84 ldr r0, [r0] ldrb r0, [r0, 0x13] @@ -41946,7 +41946,7 @@ _0801F020: _0801F044: adds r0, r6, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy movs r1, 0xFC strb r1, [r0] adds r0, 0x1 @@ -41960,7 +41960,7 @@ _0801F044: strb r1, [r0] adds r0, 0x1 adds r1, r5, 0 - bl CopyString + bl StringCopy movs r0, 0x1 b _0801F0AA _0801F06E: @@ -41968,7 +41968,7 @@ _0801F06E: ldr r0, [r0] adds r0, 0x79 adds r1, r4, 0 - bl CopyString + bl StringCopy _0801F07A: ldr r0, =gUnknown_02022C84 ldr r0, [r0] @@ -42029,7 +42029,7 @@ sub_801F0D0: @ 801F0D0 sub_801F0DC: @ 801F0DC push {lr} bl sub_801F0D0 - bl GetStringLength_Multibyte + bl StringLength_Multibyte pop {r1} bx r1 thumb_func_end sub_801F0DC @@ -42186,57 +42186,57 @@ sub_801F1D0: @ 801F1D0 thumb_func_start copy_strings_to_sav1 copy_strings_to_sav1: @ 801F1DC push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00003c88 adds r0, r1 ldr r1, =gUnknown_085ED40F - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003c9d adds r0, r1 ldr r1, =gUnknown_085ED415 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003cb2 adds r0, r1 ldr r1, =gUnknown_085ED41D - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003cc7 adds r0, r1 ldr r1, =gUnknown_085ED423 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003cdc adds r0, r1 ldr r1, =gUnknown_085ED42A - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003cf1 adds r0, r1 ldr r1, =gUnknown_085ED430 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003d06 adds r0, r1 ldr r1, =gUnknown_085ED434 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003d1b adds r0, r1 ldr r1, =gUnknown_085ED43A - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003d30 adds r0, r1 ldr r1, =gUnknown_085ED440 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00003d45 adds r0, r1 ldr r1, =gUnknown_085ED44A - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -43065,7 +43065,7 @@ _0801F8FC: lsrs r4, 16 bl sub_801F114 adds r5, r0, 0 - bl GetStringLength_Multibyte + bl StringLength_Multibyte adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -43148,7 +43148,7 @@ _0801F9A4: lsrs r4, 16 bl sub_801F114 adds r5, r0, 0 - bl GetStringLength_Multibyte + bl StringLength_Multibyte adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -43618,7 +43618,7 @@ sub_801FD30: @ 801FD30 b _0801FD7E _0801FD40: bl sub_81AFBF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r0, 0 bl sub_81AFC0C @@ -44135,7 +44135,7 @@ _08020154: mov r0, sp adds r0, 0x13 mov r1, r10 - bl CopyString + bl StringCopy mov r0, r9 lsls r2, r0, 27 lsrs r2, 24 @@ -44213,7 +44213,7 @@ _080201FE: _08020206: mov r0, sp adds r0, 0x13 - bl CopyString + bl StringCopy lsls r3, r6, 24 lsrs r3, 24 add r1, sp, 0xC @@ -44273,7 +44273,7 @@ _08020248: b _08020300 _08020286: adds r0, r5, 0 - bl GetStringLength_Multibyte + bl StringLength_Multibyte adds r4, r0, 0 mov r1, sp adds r1, 0x10 @@ -44295,7 +44295,7 @@ _080202AC: adds r0, r6, 0 adds r1, r5, 0 adds r2, r4, 0 - bl CopyString_LimitN_Multibyte + bl StringCopyN_Multibyte movs r0, 0 adds r1, r6, 0 movs r2, 0 @@ -45740,7 +45740,7 @@ _08020EA4: beq _08020F20 b _08020F48 _08020EAE: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] movs r0, 0xF6 lsls r0, 1 @@ -45763,14 +45763,14 @@ _08020EAE: b _08020F14 .pool _08020EDC: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] movs r6, 0xF7 lsls r6, 1 b _08020F28 .pool _08020EEC: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] movs r0, 0xF8 lsls r0, 1 @@ -45796,7 +45796,7 @@ _08020F14: b _08020F48 .pool _08020F20: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] movs r6, 0xF9 lsls r6, 1 @@ -45895,7 +45895,7 @@ _08020FCC: lsls r1, 2 ldr r2, =gUnknown_020229F0 adds r1, r2 - bl CopyString + bl StringCopy adds r0, r5, 0x1 lsls r0, 24 lsrs r5, r0, 24 @@ -45923,7 +45923,7 @@ _08020FF0: cmp r5, 0x4 bls _08020FF0 _08021012: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsls r0, 29 @@ -47268,15 +47268,15 @@ _08021B04: adds r0, r3, r0 adds r0, r2, r0 ldrh r1, [r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_082F43B4 adds r0, r4, r0 ldr r1, [r0] - ldr r0, =gUnknown_02021FC4 - bl AppendString + ldr r0, =gStringVar4 + bl StringAppend ldr r4, [sp, 0x14] subs r4, 0x4 lsls r2, r6, 24 @@ -47320,10 +47320,10 @@ _08021B72: adds r4, r2, r4 ldrh r1, [r4] lsrs r1, 4 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r7, 0 ldrb r0, [r4] movs r3, 0xF @@ -47370,17 +47370,17 @@ _08021BD0: bl __udivsi3 lsls r0, 24 lsrs r3, r0, 24 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_082F43B4 ldr r2, [sp, 0x28] adds r0, r2, r0 ldr r1, [r0] - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders b _08021C5E .pool _08021C1C: @@ -47400,12 +47400,12 @@ _08021C30: lsls r1, 2 ldr r0, =gBerries adds r1, r0 - ldr r0, =gUnknown_02021CC4 - bl CopyString + ldr r0, =gStringVar1 + bl StringCopy ldr r0, =gUnknown_082F43B4 ldr r1, [r0, 0x8] - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders ldr r4, [sp, 0x14] subs r4, 0x4 lsls r0, r6, 24 @@ -47419,7 +47419,7 @@ _08021C5A: adds r5, 0x1 _08021C5E: movs r0, 0x2 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 adds r2, r4, 0 bl GetStringRightAlignXOffset adds r2, r0, 0 @@ -47436,7 +47436,7 @@ _08021C5E: str r1, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 str r1, [sp, 0x8] movs r1, 0x2 bl box_print @@ -47445,17 +47445,17 @@ _08021C5E: ldrb r2, [r2, 0x8] cmp r3, r2 bne _08021CC0 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_085ED7D4 - bl CopyString + bl StringCopy b _08021CC8 .pool _08021CC0: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_085ED7E0 - bl CopyString + bl StringCopy _08021CC8: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 mov r3, r9 strb r3, [r4] mov r1, r8 @@ -47464,7 +47464,7 @@ _08021CC8: adds r1, r0, r1 movs r0, 0 bl sub_81AFC0C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r4, 0 bl sub_81AFC28 ldr r1, [sp, 0xC] @@ -47478,7 +47478,7 @@ _08021CC8: str r1, [sp] movs r1, 0 str r1, [sp, 0x4] - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 str r2, [sp, 0x8] movs r1, 0x2 movs r2, 0x4 @@ -47573,11 +47573,11 @@ sub_8021D34: @ 8021D34 add r0, r8 movs r4, 0 ldrsh r1, [r0, r4] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 movs r1, 0xA0 lsls r1, 1 add r1, r8 @@ -47585,11 +47585,11 @@ sub_8021D34: @ 8021D34 ldrsh r1, [r1, r2] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r1, =gUnknown_085ED838 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 adds r1, r5, 0 movs r2, 0x1 @@ -47634,13 +47634,13 @@ sub_8021D34: @ 8021D34 add r0, r8 movs r2, 0 ldrsh r1, [r0, r2] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x2 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085ED82C adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 adds r1, r5, 0 movs r2, 0x1 @@ -47729,13 +47729,13 @@ _08021F0A: mov r10, r0 cmp r0, 0x7 bls _08021EEC - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r2, r12 lsrs r1, r2, 8 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 ldr r1, =0x000f4240 ldr r0, [sp, 0xC] bl __udivsi3 @@ -47743,11 +47743,11 @@ _08021F0A: adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED848 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r2, 0x1 negs r2, r2 movs r0, 0x2 @@ -47814,16 +47814,16 @@ _08021FDE: movs r2, 0 adds r3, r7, 0 bl box_print - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r4, [sp, 0x10] ldrh r1, [r4, 0x8] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED85C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r2, 0x1 negs r2, r2 movs r0, 0x2 @@ -48190,19 +48190,19 @@ _080222D0: _08022336: mov r1, r9 adds r1, 0x2 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar4 ldr r1, =gUnknown_085ED8F4 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r0, [r6, 0x2] ldr r1, =gUnknown_082F32D8 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 str r1, [sp, 0x8] movs r1, 0x1 movs r2, 0 @@ -48267,23 +48267,23 @@ _080223CA: adds r0, r4, r6 ldrh r1, [r0, 0x4] lsrs r1, 8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [sp, 0xC] ldr r1, =0x000f4240 bl __udivsi3 adds r1, r0, 0 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar4 ldr r1, =gUnknown_085ED848 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r2, 0x1 negs r2, r2 bl GetStringWidth @@ -48295,7 +48295,7 @@ _080223CA: str r1, [sp] movs r1, 0 str r1, [sp, 0x4] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 str r1, [sp, 0x8] movs r1, 0x1 adds r2, r7, 0 @@ -48373,7 +48373,7 @@ sub_80224D0: @ 80224D0 adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] movs r3, 0xF6 lsls r3, 1 @@ -49432,14 +49432,14 @@ _08022D42: lsrs r4, r0, 24 cmp r4, 0 beq _08022D90 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_082F32A4 ldrb r0, [r5] lsls r0, 2 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r3, [r7, 0xB] str r6, [sp] mov r0, r8 @@ -51353,11 +51353,11 @@ _08023C5C: lsls r0, 24 cmp r0, 0 beq _08023CA2 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r5, 0x1C] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r4, 0 str r4, [sp] adds r0, r6, 0 @@ -51922,18 +51922,18 @@ _080240CC: strb r1, [r5, 0xC] b _0802412A _080240DC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, [r5, 0x1C] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 bl sub_80247BC adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r4, 0 str r4, [sp] adds r0, r6, 0 @@ -52650,7 +52650,7 @@ sub_8024644: @ 8024644 thumb_func_start sub_8024668 sub_8024668: @ 8024668 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xAC ldr r0, [r0] @@ -52662,7 +52662,7 @@ sub_8024668: @ 8024668 thumb_func_start sub_802467C sub_802467C: @ 802467C - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] adds r2, 0xAC ldr r2, [r2] @@ -52676,7 +52676,7 @@ sub_802467C: @ 802467C sub_8024690: @ 8024690 push {lr} adds r1, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r2, 0xFA lsls r2, 1 @@ -52691,7 +52691,7 @@ sub_8024690: @ 8024690 sub_80246AC: @ 80246AC push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52713,7 +52713,7 @@ _080246CE: thumb_func_start sub_80246D4 sub_80246D4: @ 80246D4 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52737,7 +52737,7 @@ _080246FA: sub_8024700: @ 8024700 push {r4,r5,lr} adds r4, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52768,7 +52768,7 @@ _0802473A: sub_8024740: @ 8024740 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52798,7 +52798,7 @@ _08024776: thumb_func_start sub_802477C sub_802477C: @ 802477C push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52830,7 +52830,7 @@ _080247B6: thumb_func_start sub_80247BC sub_80247BC: @ 80247BC push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFA lsls r1, 1 @@ -52862,11 +52862,11 @@ sub_80247D4: @ 80247D4 lsrs r4, 24 lsls r5, 24 lsrs r5, 24 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r9, r0 movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN str r4, [sp] str r5, [sp, 0x4] movs r0, 0 @@ -58428,7 +58428,7 @@ sub_802749C: @ 802749C ldr r1, =0x000f4236 bl sub_8027A38 adds r2, r0, 0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] movs r6, 0x83 lsls r6, 2 @@ -59387,7 +59387,7 @@ sub_8027BEC: @ 8027BEC str r1, [sp, 0x18] lsls r0, 24 lsrs r7, r0, 24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r2, 0x84 lsls r2, 2 @@ -59434,7 +59434,7 @@ sub_8027BEC: @ 8027BEC adds r2, r4, 0 bl Print movs r6, 0 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 mov r8, r2 movs r0, 0xFF mov r10, r0 @@ -59452,7 +59452,7 @@ _08027C76: ldrb r3, [r0] mov r0, r8 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 mov r1, r8 movs r2, 0x1 @@ -59540,7 +59540,7 @@ _08027D48: lsls r1, r4, 2 adds r1, r5 ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0x1 lsls r0, 24 lsrs r4, r0, 24 @@ -62425,7 +62425,7 @@ _080293D8: b _0802941C .pool _08029404: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsrs r0, 3 @@ -62904,7 +62904,7 @@ _080297CC: mov r1, r9 movs r2, 0 movs r3, 0x7 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 add r1, sp, 0xC movs r2, 0x1 @@ -63136,7 +63136,7 @@ _080299F2: mov r0, r9 adds r0, 0x1 str r0, [sp, 0x10] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 mov r10, r1 _08029A36: mov r0, r9 @@ -63159,7 +63159,7 @@ _08029A36: adds r1, r4, 0 movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 mov r1, r10 movs r2, 0x1 @@ -63218,7 +63218,7 @@ _08029AE0: movs r1, 0 str r1, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 bl Print _08029B10: adds r0, r7, 0x1 @@ -63518,13 +63518,13 @@ _08029DA0: bl sub_802762C lsls r0, 16 lsrs r0, 16 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r1, r5, 0 bl itemid_get_name movs r0, 0 adds r1, r5, 0 bl sub_81AFC0C - ldr r7, =gUnknown_02021FC4 + ldr r7, =gStringVar4 ldr r1, =gUnknown_085EDDBD adds r0, r7, 0 bl sub_81AFC28 @@ -63576,7 +63576,7 @@ _08029EA8: ldr r2, =0x00003009 adds r0, r2 ldrb r0, [r0] - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 movs r1, 0x29 str r1, [sp] movs r1, 0xFF @@ -67371,7 +67371,7 @@ _0802BDFE: ldr r1, =gUnknown_020229F0 add r1, r9 adds r0, r7, 0 - bl CopyString + bl StringCopy movs r0, 0x1 strh r0, [r5] ldrh r0, [r6, 0x2] @@ -70728,7 +70728,7 @@ sub_802D7E8: @ 802D7E8 adds r1, r4, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 ldr r1, [r5] adds r1, 0x26 @@ -72137,7 +72137,7 @@ _0802E322: thumb_func_start sub_802E32C sub_802E32C: @ 802E32C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xFE lsls r1, 1 @@ -72437,7 +72437,7 @@ sub_802E500: @ 802E500 movs r0, 0xC8 lsls r0, 21 mov r8, r0 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 _0802E58A: ldr r1, =gUnknown_082FE278 lsls r0, r6, 2 @@ -72460,7 +72460,7 @@ _0802E58A: adds r0, r5, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r5, 0 bl sub_802E620 movs r0, 0x1 diff --git a/asm/load_save.s b/asm/load_save.s index f3685a083..b7f5aa79f 100644 --- a/asm/load_save.s +++ b/asm/load_save.s @@ -70,12 +70,12 @@ InitSaveBlockPointersWithRandomOffset: @ 8076BDC adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr bl GenerateRandomNumber adds r4, r0 movs r0, 0x7C ands r4, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, =gUnknown_02024A54 adds r0, r4, r0 str r0, [r1] @@ -113,13 +113,13 @@ saveblock_randomize_and_relocate: @ 8076C2C ldr r1, =gUnknown_0203CF5C str r0, [r1] ldr r4, =0x02000000 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r6, =0x00000f2c adds r0, r4, 0 adds r2, r6, 0 bl memcpy - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r10, r1 ldr r1, [r1] ldr r7, =0x00003d88 @@ -142,7 +142,7 @@ saveblock_randomize_and_relocate: @ 8076C2C ldrb r0, [r4, 0xD] adds r0, r1 bl InitSaveBlockPointersWithRandomOffset - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] adds r1, r4, 0 adds r2, r6, 0 @@ -174,7 +174,7 @@ saveblock_randomize_and_relocate: @ 8076C2C adds r4, r0 adds r0, r4, 0 bl saveblock_apply_crypto - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] adds r0, 0xAC str r4, [r0] @@ -191,7 +191,7 @@ saveblock_randomize_and_relocate: @ 8076C2C thumb_func_start sav2_x1_query_bit1 sav2_x1_query_bit1: @ 8076D24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0x9] movs r0, 0x1 @@ -202,7 +202,7 @@ sav2_x1_query_bit1: @ 8076D24 thumb_func_start sav2_x9_clear_bit1 sav2_x9_clear_bit1: @ 8076D34 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0xFE @@ -214,7 +214,7 @@ sav2_x9_clear_bit1: @ 8076D34 thumb_func_start sub_8076D48 sub_8076D48: @ 8076D48 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x1 @@ -229,7 +229,7 @@ sub_8076D5C: @ 8076D5C push {lr} movs r0, 0 bl sub_8084FAC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x1 @@ -242,7 +242,7 @@ sub_8076D5C: @ 8076D5C thumb_func_start sav2_gender2_inplace_and_xFE sav2_gender2_inplace_and_xFE: @ 8076D78 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0xFE @@ -256,7 +256,7 @@ sav2_gender2_inplace_and_xFE: @ 8076D78 @ void copy_player_party_to_sav1() copy_player_party_to_sav1: @ 8076D8C push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =gUnknown_020244E9 ldrb r1, [r1] @@ -266,7 +266,7 @@ copy_player_party_to_sav1: @ 8076D8C strb r1, [r0] movs r4, 0 _08076DA0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x64 muls r1, r4 @@ -291,7 +291,7 @@ _08076DA0: copy_player_party_from_sav1: @ 8076DD4 push {r4,r5,lr} ldr r1, =gUnknown_020244E9 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r2, 0x8D lsls r2, 2 @@ -305,7 +305,7 @@ _08076DEA: adds r2, r4, 0 muls r2, r0 adds r0, r2, r5 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] adds r1, r2 movs r2, 0x8E @@ -327,7 +327,7 @@ save_serialize_npcs: @ 8076E1C push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 movs r5, 0xA3 lsls r5, 4 @@ -365,7 +365,7 @@ save_deserialize_npcs: @ 8076E64 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 movs r5, 0xA3 lsls r5, 4 @@ -426,9 +426,9 @@ copy_bags_and_unk_data_from_save_blocks: @ 8076ECC movs r2, 0 ldr r0, =gUnknown_02032180 mov r12, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r10, r1 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r3, 0xAC lsls r3, 3 ldr r4, =gUnknown_02031C58 @@ -444,7 +444,7 @@ _08076EE8: ble _08076EE8 movs r2, 0 ldr r0, =gUnknown_02031C58 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r3, 0xBB lsls r3, 3 adds r4, r0, 0 @@ -461,7 +461,7 @@ _08076F08: ble _08076F08 movs r2, 0 ldr r0, =gUnknown_02031C58 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r3, 0xCA lsls r3, 3 adds r4, r0, 0 @@ -478,7 +478,7 @@ _08076F28: ble _08076F28 movs r2, 0 ldr r0, =gUnknown_02031C58 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r6, 0x98 lsls r6, 1 adds r4, r0, r6 @@ -496,7 +496,7 @@ _08076F4A: ble _08076F4A movs r2, 0 ldr r0, =gUnknown_02031C58 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r7, 0x8C lsls r7, 2 adds r4, r0, r7 @@ -513,7 +513,7 @@ _08076F6C: cmp r2, 0x2D ble _08076F6C ldr r0, =gUnknown_02031C58 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r8, r1 movs r5, 0xBA lsls r5, 2 @@ -563,11 +563,11 @@ copy_bags_and_unk_data_to_save_blocks: @ 8076FE0 mov r5, r8 push {r5-r7} movs r2, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r8, r0 ldr r1, =gUnknown_02032180 mov r12, r1 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r3, 0xAC lsls r3, 3 ldr r4, =gUnknown_02031C58 @@ -582,7 +582,7 @@ _08076FFC: cmp r2, 0x1D ble _08076FFC movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r4, 0xBB lsls r4, 3 ldr r0, =gUnknown_02031C58 @@ -599,7 +599,7 @@ _0807701C: cmp r2, 0x1D ble _0807701C movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r4, 0xCA lsls r4, 3 ldr r0, =gUnknown_02031C58 @@ -616,7 +616,7 @@ _0807703C: cmp r2, 0xF ble _0807703C movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r4, 0xD2 lsls r4, 3 ldr r0, =gUnknown_02031C58 @@ -634,7 +634,7 @@ _0807705E: cmp r2, 0x3F ble _0807705E movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr movs r4, 0xF2 lsls r4, 3 ldr r0, =gUnknown_02031C58 @@ -651,7 +651,7 @@ _08077080: adds r2, 0x1 cmp r2, 0x2D ble _08077080 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r9, r0 ldr r1, =0x00002be0 mov r10, r1 @@ -701,7 +701,7 @@ _080770A0: thumb_func_start apply_u16_xor_crypto apply_u16_xor_crypto: @ 8077100 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] adds r2, 0xAC ldr r2, [r2] @@ -715,7 +715,7 @@ apply_u16_xor_crypto: @ 8077100 thumb_func_start apply_u32_xor_crypto apply_u32_xor_crypto: @ 8077118 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r3, [r2] adds r3, 0xAC ldr r2, [r0] @@ -736,7 +736,7 @@ saveblock_apply_crypto: @ 8077130 bl call_encrypt_decrypt_all_item_quantities adds r0, r4, 0 bl sub_8024690 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] movs r1, 0x92 lsls r1, 3 diff --git a/asm/lottery_corner.s b/asm/lottery_corner.s index babde2a8e..cebd1fd78 100644 --- a/asm/lottery_corner.s +++ b/asm/lottery_corner.s @@ -224,7 +224,7 @@ _081776D2: muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r1, 0x2 bl pokemon_getattr b _08177768 @@ -248,12 +248,12 @@ _0817773C: adds r1, r2 lsls r1, 4 adds r0, r1 - ldr r2, =gUnknown_02021CC4 + ldr r2, =gStringVar1 movs r1, 0x2 bl pokemon_getattr_encrypted _08177768: - ldr r0, =gUnknown_02021CC4 - bl GetStringEnd_Limit7 + ldr r0, =gStringVar1 + bl StringGetEnd10 _0817776E: add sp, 0x8 pop {r3-r5} diff --git a/asm/mail.s b/asm/mail.s index fb7cdf2df..9b407e854 100644 --- a/asm/mail.s +++ b/asm/mail.s @@ -420,7 +420,7 @@ _081217EC: movs r2, 0x20 bl gpu_pal_apply ldr r1, =gUnknown_0859F2B0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r0, [r2, 0x8] lsls r0, 2 @@ -683,7 +683,7 @@ _08121A8A: adds r1, r3 ldr r1, [r1] adds r1, 0x12 - bl CopyString + bl StringCopy adds r2, r0, 0 ldr r1, [r4] ldr r3, =0x0000021e @@ -693,12 +693,12 @@ _08121A8A: bne _08121AF0 ldr r1, =gUnknown_085EEA78 adds r0, r2, 0 - bl CopyString + bl StringCopy ldr r0, [r4] movs r1, 0x80 lsls r1, 2 adds r0, r1 - bl GetStringLength + bl StringLength ldr r2, [r4] movs r3, 0x8A lsls r3, 2 @@ -827,13 +827,13 @@ _08121BB8: _08121BCC: ldr r1, =gUnknown_085EEA78 add r0, sp, 0xC - bl CopyString + bl StringCopy ldr r4, =gUnknown_0203A134 ldr r1, [r4] movs r2, 0x80 lsls r2, 2 adds r1, r2 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00000219 adds r0, r1 diff --git a/asm/main.s b/asm/main.s index 9c30a3f95..85f41f137 100644 --- a/asm/main.s +++ b/asm/main.s @@ -138,7 +138,7 @@ InitVariablesAndSetCopyrightScreenCallback: @ 80004D8 str r0, [r2] ldr r0, =c2_copyright_1 bl SetMainCallback2 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, =gUnknown_02024A54 str r0, [r1] ldr r1, =gUnknown_03005D94 @@ -305,7 +305,7 @@ _08000632: _08000636: strh r3, [r2, 0x28] strh r3, [r2, 0x2C] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x2 diff --git a/asm/main_menu.s b/asm/main_menu.s index decb11542..acda4d133 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -622,7 +622,7 @@ _0802FBCE: movs r1, 0xFC movs r2, 0x2 bl gpu_pal_apply - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -2086,9 +2086,9 @@ _08030970: bl CopyWindowToVram movs r0, 0 bl sub_8032318 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C897B - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r0, =task_new_game_prof_birch_speech_4 @@ -2122,9 +2122,9 @@ task_new_game_prof_birch_speech_4: @ 80309CC adds r0, r1 ldr r1, =task_new_game_prof_birch_speech_5 str r1, [r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E8692 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r1, =sub_80323A0 movs r0, 0x1 bl AddTextPrinterWithCallbackForMessage @@ -2146,9 +2146,9 @@ task_new_game_prof_birch_speech_5: @ 8030A2C lsls r0, 16 cmp r0, 0 bne _08030A58 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8A1F - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r1, =gTasks @@ -2341,9 +2341,9 @@ task_new_game_prof_birch_speech_6: @ 8030BCC bne _08030BFE ldr r0, =gUnknown_02022D04 strb r1, [r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8BD0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r1, =gTasks @@ -2580,9 +2580,9 @@ task_new_game_prof_birch_speech_11: @ 8030DC8 lsrs r4, 24 movs r0, 0 bl sub_8032318 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8BDD - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r1, =gTasks @@ -2639,7 +2639,7 @@ task_new_game_prof_birch_speech_13: @ 8030E38 _08030E52: movs r0, 0x5 bl audio_play - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] strb r4, [r0, 0x8] movs r0, 0x1 @@ -2831,9 +2831,9 @@ task_new_game_prof_birch_speech_14: @ 8030FD4 lsrs r4, 24 movs r0, 0 bl sub_8032318 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8BFF - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r1, =gTasks @@ -2943,7 +2943,7 @@ task_new_game_prof_birch_speech_17: @ 8031090 bl set_default_player_name adds r0, r4, 0 bl DestroyTask - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0x8] str r5, [sp] @@ -2968,9 +2968,9 @@ task_new_game_prof_birch_speech_part2_2: @ 8031104 lsrs r4, 24 movs r0, 0 bl sub_8032318 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8C1C - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r1, =gTasks @@ -3211,9 +3211,9 @@ task_new_game_prof_birch_speech_part2_6: @ 8031258 bl sub_8031D34 movs r0, 0 bl sub_8032318 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8C2A - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r0, =task_new_game_prof_birch_speech_part2_7 @@ -3353,7 +3353,7 @@ task_new_game_prof_birch_speech_part2_8: @ 80313E4 b _080314B0 .pool _08031444: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -3396,9 +3396,9 @@ _0803145A: adds r0, r6, 0 movs r1, 0x1 bl sub_8031D34 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_082C8C7A - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r0, =task_new_game_prof_birch_speech_part2_9 @@ -3714,7 +3714,7 @@ new_game_prof_birch_speech_part2_start: @ 8031678 bl dp13_810BB8C adds r0, r5, 0 bl AddBirchSpeechObjects - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -4453,7 +4453,7 @@ set_default_player_name: @ 8031DC4 push {r4,r5,lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldrb r0, [r0, 0x8] adds r5, r1, 0 @@ -4469,7 +4469,7 @@ _08031DE6: adds r0, r1 ldr r3, [r0] movs r2, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _08031DF0: ldr r1, [r4] adds r1, r2 @@ -4546,10 +4546,10 @@ fmt_savegame: @ 8031E7C fmt_time: @ 8031E94 push {r4-r6,lr} sub sp, 0xC - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EDCC3 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -4561,7 +4561,7 @@ fmt_time: @ 8031E94 movs r2, 0 movs r3, 0x11 bl box_print - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] movs r0, 0x1 movs r2, 0x64 @@ -4588,10 +4588,10 @@ fmt_time: @ 8031E94 fmt_player: @ 8031EF8 push {r4-r6,lr} sub sp, 0x2C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EDCCA adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -4603,13 +4603,13 @@ fmt_player: @ 8031EF8 movs r2, 0x6C movs r3, 0x11 bl box_print - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldrh r1, [r0, 0xE] add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xF0 strb r1, [r0] adds r0, 0x1 @@ -4617,7 +4617,7 @@ fmt_player: @ 8031EF8 ldrb r1, [r1, 0x10] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 add r1, sp, 0xC movs r2, 0xD0 @@ -4663,10 +4663,10 @@ _08031FA4: _08031FAA: lsls r0, 16 lsrs r7, r0, 16 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EDCCF adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -4682,7 +4682,7 @@ _08031FAA: adds r1, r7, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 add r1, sp, 0xC movs r2, 0x64 @@ -4727,10 +4727,10 @@ _08032030: ldr r0, =0x0000086e cmp r4, r0 bls _0803201C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EDCD7 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 str r6, [sp] movs r5, 0x1 @@ -4746,7 +4746,7 @@ _08032030: adds r1, r7, 0 movs r2, 0x2 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 add r1, sp, 0xC movs r2, 0xD0 @@ -4779,7 +4779,7 @@ LoadMainMenuWindowFrameTiles: @ 80320A4 lsrs r4, 24 lsls r5, 16 lsrs r5, 16 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldrb r0, [r0, 0x14] lsrs r0, 3 diff --git a/asm/mauville_old_man.s b/asm/mauville_old_man.s index 260182dd1..5c9af76ac 100644 --- a/asm/mauville_old_man.s +++ b/asm/mauville_old_man.s @@ -8,7 +8,7 @@ thumb_func_start sub_81200A0 sub_81200A0: @ 81200A0 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x00002e28 adds r0, r2, r1 @@ -45,7 +45,7 @@ _081200C6: thumb_func_start sub_81200F8 sub_81200F8: @ 81200F8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002e28 adds r1, r0 @@ -70,7 +70,7 @@ sub_812011C: @ 812011C thumb_func_start sub_8120128 sub_8120128: @ 8120128 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002e28 adds r2, r1, r0 @@ -98,7 +98,7 @@ sub_8120154: @ 8120154 thumb_func_start sub_8120160 sub_8120160: @ 8120160 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0xB] lsls r1, 8 @@ -145,7 +145,7 @@ _081201C0: thumb_func_start sub_81201C8 sub_81201C8: @ 81201C8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r0, r1 @@ -171,7 +171,7 @@ sub_81201DC: @ 81201DC thumb_func_start sub_81201F4 sub_81201F4: @ 81201F4 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e51 adds r0, r2 @@ -184,15 +184,15 @@ sub_81201F4: @ 81201F4 thumb_func_start sub_8120210 sub_8120210: @ 8120210 push {r4-r6,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002e28 adds r6, r4, r0 ldr r1, =0x00002e42 adds r0, r4, r1 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] - bl CopyString + bl StringCopy movs r2, 0 ldr r0, =0x00002e4d adds r4, r0 @@ -236,7 +236,7 @@ _0812024E: thumb_func_start sub_8120280 sub_8120280: @ 8120280 push {r4-r7,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =gUnknown_020375E0 ldrh r0, [r0] @@ -247,7 +247,7 @@ sub_8120280: @ 8120280 ldr r0, =0x00002e2a adds r5, r1, r0 _08120296: - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 adds r4, r2, 0 movs r6, 0 _0812029C: @@ -348,7 +348,7 @@ sub_8120340: @ 8120340 thumb_func_start sub_8120358 sub_8120358: @ 8120358 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e28 adds r0, r2 @@ -360,7 +360,7 @@ sub_8120358: @ 8120358 thumb_func_start sub_8120374 sub_8120374: @ 8120374 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r0, r1 @@ -384,7 +384,7 @@ sub_812038C: @ 812038C b _081203B6 .pool _081203AC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl CopyEasyChatWord ldr r1, =gUnknown_020375F0 movs r0, 0x1 @@ -398,7 +398,7 @@ _081203B6: thumb_func_start sub_81203C4 sub_81203C4: @ 81203C4 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r2, r0, r1 @@ -424,7 +424,7 @@ _081203F2: thumb_func_start sub_81203FC sub_81203FC: @ 81203FC push {r4-r6,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002e28 adds r5, r4, r0 @@ -448,7 +448,7 @@ _08120410: lsrs r4, 16 movs r0, 0x7 ands r4, r0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldrb r1, [r5, 0x1] lsls r1, 1 adds r1, r6, r1 @@ -456,21 +456,21 @@ _08120410: bl CopyEasyChatWord adds r2, r0, 0 ldr r1, =gUnknown_082942FD - bl CopyString + bl StringCopy adds r2, r0, 0 ldr r0, =gUnknown_0859EFF0 lsls r4, 2 adds r4, r0 ldr r1, [r4] adds r0, r2, 0 - bl CopyString + bl StringCopy adds r2, r0, 0 ldr r1, =gUnknown_08294301 - bl CopyString + bl StringCopy b _081204A2 .pool _08120480: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r3, =gUnknown_0859F010 ldrb r2, [r5, 0x2] adds r1, r2, 0x1 @@ -485,7 +485,7 @@ _08120480: lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl CopyString + bl StringCopy _081204A2: bl GenerateRandomNumber lsls r0, 16 @@ -520,7 +520,7 @@ sub_81204DC: @ 81204DC mov r5, r8 push {r5-r7} sub sp, 0x1C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002e28 adds r0, r4, r0 @@ -676,7 +676,7 @@ _0812060E: thumb_func_start sub_8120628 sub_8120628: @ 8120628 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e51 adds r0, r1 @@ -688,7 +688,7 @@ sub_8120628: @ 8120628 thumb_func_start sub_8120640 sub_8120640: @ 8120640 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r0, r1 @@ -848,7 +848,7 @@ _08120764: .4byte _081207F8 .4byte _08120938 _0812077C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E0 ldrh r0, [r0] @@ -1106,7 +1106,7 @@ _0812097C: .4byte _08120A6E _08120994: bl sub_8120280 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl sub_8120708 movs r0, 0 strh r0, [r5, 0xA] @@ -1128,13 +1128,13 @@ _081209C4: movs r0, 0x2 b _08120B4E _081209C8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e28 adds r4, r0, r2 movs r0, 0xE ldrsh r1, [r5, r0] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r0 movs r3, 0 ldrb r0, [r1] @@ -1219,7 +1219,7 @@ _08120A6E: strh r0, [r5, 0xC] b _08120B50 _08120A7E: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r2, 0xE ldrsh r0, [r5, r2] adds r0, r1 @@ -1367,7 +1367,7 @@ _08120B84: adds r0, 0x5 adds r0, r5, r0 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _08120B9E: adds r4, 0x1 cmp r4, 0x3 @@ -1401,7 +1401,7 @@ _08120BB0: bl memset mov r0, sp ldr r1, =gUnknown_085EDFB0 - bl CopyString + bl StringCopy adds r0, r5, 0 mov r1, sp movs r2, 0x7 @@ -1639,7 +1639,7 @@ _08120D78: cmp r0, 0x15 bne _08120D98 adds r0, r1, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes movs r0, 0x1 strb r0, [r4] b _08120D9A @@ -1664,7 +1664,7 @@ _08120DAA: muls r0, r5 adds r0, 0x5 adds r0, r7, r0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes _08120DBE: adds r5, 0x1 cmp r5, 0x3 @@ -1717,7 +1717,7 @@ _08120E02: sub_8120E08: @ 8120E08 push {r4,r5,lr} ldr r2, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r0, r1 @@ -1752,7 +1752,7 @@ _08120E24: thumb_func_start sub_8120E50 sub_8120E50: @ 8120E50 ldr r3, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r0, r1 @@ -1987,7 +1987,7 @@ sub_8120FDC: @ 8120FDC adds r0, 0x4 add r0, r8 strb r6, [r0] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r0, r8 bl sub_8120FAC @@ -1998,20 +1998,20 @@ sub_8120FDC: @ 8120FDC adds r1, r0, 0 mov r0, r8 bl sub_8120F2C - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r4, 0 bl sub_8120E74 adds r1, r0, 0 adds r0, r5, 0 movs r2, 0 movs r3, 0xA - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 adds r0, r6, 0 bl sub_8120ECC adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy mov r1, r9 ldr r0, [r1] adds r0, 0x34 @@ -2179,21 +2179,21 @@ sub_8121178: @ 8121178 adds r0, r5 ldrb r0, [r0] mov r8, r0 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r5, 0 bl sub_8120F08 adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0xA - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 mov r0, r8 bl sub_8120ECC adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r4, =gUnknown_02021EC4 + bl StringCopy + ldr r4, =gStringVar3 adds r0, r5, 0 adds r1, r4, 0 bl sub_8120F7C @@ -2202,7 +2202,7 @@ sub_8121178: @ 8121178 adds r0, r5 ldrb r1, [r0] adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString mov r0, r8 bl sub_8120EC0 bl box_related_two__2 @@ -2432,7 +2432,7 @@ sub_812139C: @ 812139C sub_81213B0: @ 81213B0 push {lr} ldr r1, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e28 adds r0, r2 @@ -2449,7 +2449,7 @@ sub_81213B0: @ 81213B0 sub_81213D8: @ 81213D8 push {r4,r5,lr} ldr r2, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r3, =0x00002e28 adds r0, r1, r3 @@ -2481,7 +2481,7 @@ _0812141E: sub_8121424: @ 8121424 push {lr} ldr r1, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e28 adds r0, r2 @@ -2503,7 +2503,7 @@ _0812144A: sub_8121450: @ 8121450 push {lr} ldr r1, =gUnknown_0203A12C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002e28 adds r0, r2 diff --git a/asm/menu_helpers.s b/asm/menu_helpers.s index 6529e74a6..d936c5085 100644 --- a/asm/menu_helpers.s +++ b/asm/menu_helpers.s @@ -131,13 +131,13 @@ DisplayMessageAndContinueTask: @ 8121E7C adds r0, r6, 0 movs r1, 0x1 bl sub_8197B1C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, [sp, 0x30] cmp r0, r4 beq _08121EC0 adds r0, r4, 0 ldr r1, [sp, 0x30] - bl ExpandStringRefs + bl StringExpandPlaceholders _08121EC0: ldr r2, =gUnknown_03003014 ldrb r0, [r2] @@ -409,7 +409,7 @@ _081220C8: thumb_func_start GetLRKeysState GetLRKeysState: @ 81220D0 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -442,7 +442,7 @@ _08122108: thumb_func_start sub_812210C sub_812210C: @ 812210C push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -479,7 +479,7 @@ sub_8122148: @ 8122148 lsrs r0, 16 cmp r0, 0xAF bne _08122174 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x00001919 diff --git a/asm/mon_markings.s b/asm/mon_markings.s index 17bbf76bb..1082d7a86 100644 --- a/asm/mon_markings.s +++ b/asm/mon_markings.s @@ -17,7 +17,7 @@ sub_811F90C: @ 811F90C sub_811F918: @ 811F918 push {lr} sub sp, 0x4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsrs r0, 3 diff --git a/asm/money.s b/asm/money.s index e236777c1..5f83e756a 100644 --- a/asm/money.s +++ b/asm/money.s @@ -8,7 +8,7 @@ thumb_func_start DecryptMoney @ int DecryptMoney(u32 *moneyPointer) DecryptMoney: @ 80E5114 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] adds r1, 0xAC ldr r0, [r0] @@ -21,7 +21,7 @@ DecryptMoney: @ 80E5114 thumb_func_start EncryptMoney @ void EncryptMoney(u32 *moneyPointer, u32 moneyAmount) EncryptMoney: @ 80E5128 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] adds r2, 0xAC ldr r2, [r2] @@ -103,7 +103,7 @@ _080E51A2: thumb_func_start sub_80E51B0 sub_80E51B0: @ 80E51B0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -121,7 +121,7 @@ sub_80E51B0: @ 80E51B0 thumb_func_start sub_80E51D4 sub_80E51D4: @ 80E51D4 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -170,19 +170,19 @@ PrintMoneyAmount: @ 80E5214 lsrs r6, r2, 24 lsls r4, 24 lsrs r5, r4, 24 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 adds r1, r3, 0 movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 movs r1, 0x6 subs r1, r0 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 adds r0, r1, 0 subs r1, 0x1 cmp r0, 0 @@ -198,8 +198,8 @@ _080E5258: _080E5264: ldr r1, =gUnknown_085E969C adds r0, r2, 0 - bl ExpandStringRefs - ldr r2, =gUnknown_02021FC4 + bl StringExpandPlaceholders + ldr r2, =gStringVar4 str r6, [sp] str r5, [sp, 0x4] movs r0, 0 diff --git a/asm/mystery_event_menu.s b/asm/mystery_event_menu.s index de54321f3..865c27288 100644 --- a/asm/mystery_event_menu.s +++ b/asm/mystery_event_menu.s @@ -116,7 +116,7 @@ sub_8178A40: @ 8178A40 cmp r4, 0 bne _08178A54 ldr r1, =gUnknown_085EE80A - bl CopyString + bl StringCopy movs r5, 0 _08178A54: cmp r4, 0x2 @@ -127,7 +127,7 @@ _08178A5A: bne _08178A66 ldr r1, =gUnknown_085EE827 adds r0, r6, 0 - bl CopyString + bl StringCopy _08178A66: adds r0, r5, 0 pop {r4-r6} @@ -351,7 +351,7 @@ _08178C68: cmp r0, 0x3 bne _08178CAC bl sub_800AC34 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 movs r1, 0x1 bl sub_8178A40 @@ -385,7 +385,7 @@ _08178CAC: _08178CCC: bl sub_80097E8 _08178CD0: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 movs r1, 0x1 bl sub_8178A40 @@ -477,7 +477,7 @@ _08178D74: add r0, sp, 0x4 adds r1, r5, 0 bl CpuSet - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r4, 0 bl sub_8178A40 lsls r0, 24 @@ -488,7 +488,7 @@ _08178D74: b _08178E34 .pool _08178DBC: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -571,7 +571,7 @@ _08178E58: cmp r0, 0 bne _08178E98 bl sub_80097E8 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 movs r1, 0x1 bl sub_8178A40 diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s index d888aad52..94a42060d 100644 --- a/asm/mystery_event_script.s +++ b/asm/mystery_event_script.s @@ -42,9 +42,9 @@ _081537FE: thumb_func_start sub_8153804 sub_8153804: @ 8153804 push {lr} - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674C86 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x3 bl sub_81538C4 pop {r0} @@ -152,7 +152,7 @@ sub_81538C4: @ 81538C4 sub_81538D0: @ 81538D0 push {lr} movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b18 adds r3, r0, r1 @@ -173,7 +173,7 @@ _081538DE: thumb_func_start sub_81538F8 sub_81538F8: @ 81538F8 push {r4,r5,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r1, =0x00003b18 adds r4, r0, r1 @@ -215,7 +215,7 @@ sub_8153944: @ 8153944 mov r1, sp movs r0, 0 strh r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b14 adds r1, r0 @@ -250,7 +250,7 @@ _08153990: bl sub_8153944 b _081539BC _08153996: - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00003b18 adds r0, r1 @@ -278,7 +278,7 @@ _081539BC: thumb_func_start sub_81539D4 sub_81539D4: @ 81539D4 push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r1, =0x00003b18 adds r4, r0, r1 @@ -399,8 +399,8 @@ sub_8153A94: @ 8153A94 cmp r5, r0 bne _08153ABE _08153AB8: - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders _08153ABE: movs r0, 0 pop {r4,r5} @@ -441,44 +441,44 @@ sub_8153AE8: @ 8153AE8 subs r4, r0 ldr r0, [r7, 0x64] adds r4, r0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r9, r0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r1, [r6] ldr r5, =0x000031f8 adds r1, r5 movs r2, 0x7 - bl CopyString_LimitN + bl StringCopyN adds r0, r4, 0 bl sub_80E15E4 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldr r1, [r6] adds r1, r5 adds r0, r4, 0 movs r2, 0x7 - bl CopyString_LimitN + bl StringCopyN mov r0, r8 cmp r0, 0 bne _08153B54 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674AE4 b _08153B74 .pool _08153B54: mov r0, r9 adds r1, r4, 0 - bl CompareString + bl StringCompare cmp r0, 0 beq _08153B70 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674B16 b _08153B74 .pool _08153B70: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674B42 _08153B74: - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r7, 0x6C] bl sub_80E162C @@ -514,9 +514,9 @@ sub_8153BB0: @ 8153BB0 adds r2, 0x1 str r2, [r4, 0x8] bl sub_80F9B30 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674B6A - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -583,9 +583,9 @@ sub_8153C4C: @ 8153C4C push {r4,lr} adds r4, r0, 0 bl sub_809D3E8 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674B9E - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -604,9 +604,9 @@ sub_8153C70: @ 8153C70 adds r1, 0x1 str r1, [r4, 0x8] bl sub_811EFC0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674BD4 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -668,25 +668,25 @@ sub_8153CC8: @ 8153CC8 lsls r0, 1 cmp r4, r0 bne _08153D18 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085E8264 movs r2, 0xB - bl CopyString_LimitN + bl StringCopyN b _08153D22 .pool _08153D18: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085E8268 movs r2, 0xB - bl CopyString_LimitN + bl StringCopyN _08153D22: ldr r0, =gUnknown_020244E9 ldrb r0, [r0] cmp r0, 0x6 bne _08153D4C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674C02 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x3 b _08153DB6 .pool @@ -731,9 +731,9 @@ _08153D86: _08153DA4: bl party_compaction bl calc_player_party_count - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674BF0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 _08153DB6: str r0, [r6, 0x6C] @@ -757,16 +757,16 @@ sub_8153DD4: @ 8153DD4 subs r1, r0 ldr r0, [r4, 0x64] adds r1, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000bec adds r0, r2 movs r2, 0xBC bl memcpy bl sub_81652B4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_08674C31 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 @@ -781,9 +781,9 @@ sub_8153E1C: @ 8153E1C push {r4,lr} adds r4, r0, 0 bl sub_809D5F4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085ECAD8 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] movs r0, 0 diff --git a/asm/naming_screen.s b/asm/naming_screen.s index f2ad52ef7..e329d8d09 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -233,7 +233,7 @@ _080E2F2C: ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy _080E2F64: movs r0, 0x10 strh r0, [r4] @@ -835,7 +835,7 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4 lsls r0, 24 cmp r0, 0 bne _080E3534 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00004036 bl VarGet lsls r0, 24 @@ -843,18 +843,18 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, =gUnknown_02039F94 ldr r1, [r1] ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy b _080E3574 .pool _080E3534: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00004036 bl VarGet lsls r0, 24 @@ -862,22 +862,22 @@ _080E3534: bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, =gUnknown_02039F94 ldr r1, [r1] ldr r2, =0x00001e30 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r4, =gUnknown_02021EC4 + bl StringCopy + ldr r4, =gStringVar3 bl get_unknown_box_id lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r5, 0x2 _080E3574: ldr r0, =0x000008ab @@ -889,13 +889,13 @@ _080E3574: lsls r0, 24 lsrs r5, r0, 24 _080E3586: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0858BDB8 lsls r0, r5, 2 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0 bl sub_81973C4 @@ -3302,7 +3302,7 @@ sub_80E48E8: @ 80E48E8 ldr r0, =gSpeciesNames adds r1, r0 add r0, sp, 0xC - bl CopyString + bl StringCopy ldr r0, [r5] ldr r1, =0x00001e28 adds r0, r1 @@ -3310,7 +3310,7 @@ sub_80E48E8: @ 80E48E8 ldr r1, [r0, 0x8] add r0, sp, 0xC movs r2, 0xF - bl AppendString_LimitN + bl StringAppendN ldr r0, [r5] ldr r4, =0x00001e14 adds r0, r4 @@ -3389,7 +3389,7 @@ sub_80E49BC: @ 80E49BC movs r4, 0 ldr r1, =gUnknown_085E8D49 add r0, sp, 0xC - bl CopyString + bl StringCopy ldr r5, =gUnknown_02039F94 ldr r0, [r5] ldr r1, =0x00001e36 @@ -3401,7 +3401,7 @@ sub_80E49BC: @ 80E49BC bne _080E49E6 ldr r1, =gUnknown_085E8D4B add r0, sp, 0xC - bl CopyString + bl StringCopy movs r4, 0x1 _080E49E6: ldr r0, [r5] @@ -3686,7 +3686,7 @@ _080E4C00: lsls r2, 24 lsrs r2, 24 adds r1, r3, 0 - bl CopyString_LimitN + bl StringCopyN b _080E4C4A .pool _080E4C34: @@ -4188,7 +4188,7 @@ _080E5066: sub_80E5074: @ 80E5074 push {lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0x8] movs r0, 0 @@ -4208,7 +4208,7 @@ sub_80E5074: @ 80E5074 sub_80E509C: @ 80E509C push {lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0x8] movs r0, 0 @@ -4228,7 +4228,7 @@ sub_80E509C: @ 80E509C sub_80E50C4: @ 80E50C4 push {lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0x8] movs r0, 0 @@ -4248,7 +4248,7 @@ sub_80E50C4: @ 80E50C4 sub_80E50EC: @ 80E50EC push {lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0x8] movs r0, 0 diff --git a/asm/new_game.s b/asm/new_game.s index ff562baf1..4fa24eef0 100644 --- a/asm/new_game.s +++ b/asm/new_game.s @@ -63,7 +63,7 @@ set_player_trainer_id: @ 8084310 lsls r0, 16 lsrs r0, 16 orrs r4, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0xA adds r0, r4, 0 @@ -76,7 +76,7 @@ set_player_trainer_id: @ 8084310 thumb_func_start init_options init_options: @ 808433C - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r2, [r3] ldrb r1, [r2, 0x14] movs r0, 0x8 @@ -124,7 +124,7 @@ sub_8084390: @ 8084390 ldr r1, =gUnknown_030060B0 movs r0, 0 strb r0, [r1] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] adds r0, 0x28 movs r1, 0 @@ -146,7 +146,7 @@ sub_80843C0: @ 80843C0 push {r4-r7,lr} bl sub_80DF040 movs r2, 0x8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r12, r0 ldr r4, =0x00002e90 ldr r3, =gUnknown_08339D1C @@ -178,7 +178,7 @@ sub_8084400: @ 8084400 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r0, =0x0000064c adds r1, r0 @@ -261,7 +261,7 @@ _080844B2: ldr r1, =gUnknown_020322D4 movs r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] adds r0, 0xAC movs r5, 0 @@ -285,7 +285,7 @@ _080844B2: bl GabbyAndTyNewGameInitData bl sub_80E8B28 bl RemoveAllBerryTrees - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] movs r1, 0x92 lsls r1, 3 @@ -345,7 +345,7 @@ sub_80845CC: @ 80845CC mov r0, sp movs r5, 0 strh r5, [r0] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] movs r0, 0xF6 lsls r0, 1 diff --git a/asm/option_menu.s b/asm/option_menu.s index 498321226..da3a80bb8 100644 --- a/asm/option_menu.s +++ b/asm/option_menu.s @@ -220,7 +220,7 @@ _080BA69C: b _080BA7F4 .pool _080BA6BC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsrs r0, 3 @@ -239,7 +239,7 @@ _080BA6E0: movs r1, 0 movs r2, 0x2 bl gpu_pal_apply - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsrs r0, 3 @@ -308,7 +308,7 @@ _080BA774: adds r4, r1 movs r0, 0 strh r0, [r4, 0x8] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r0, [r2, 0x14] lsls r0, 29 @@ -654,7 +654,7 @@ sub_80BAA64: @ 80BAA64 sub sp, 0x4 lsls r0, 24 lsrs r0, 24 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r3, [r6] ldr r1, =gTasks lsls r4, r0, 2 diff --git a/asm/play_time.s b/asm/play_time.s index 2c4e28d82..3502cbca0 100644 --- a/asm/play_time.s +++ b/asm/play_time.s @@ -10,7 +10,7 @@ reset_playtime: @ 80841E4 ldr r1, =gUnknown_03000E08 movs r0, 0 strb r0, [r1] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r3, [r2] movs r1, 0 movs r0, 0 @@ -30,7 +30,7 @@ set_max_playtime_if_appropriate: @ 8084208 ldr r1, =gUnknown_03000E08 movs r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrh r1, [r0, 0xE] ldr r0, =0x000003e7 @@ -59,7 +59,7 @@ gametime_increment: @ 808423C ldrb r0, [r0] cmp r0, 0x1 bne _08084294 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldrb r1, [r0, 0x12] adds r1, 0x1 @@ -108,7 +108,7 @@ set_max_playtime: @ 80842A4 ldr r1, =gUnknown_03000E08 movs r0, 0x2 strb r0, [r1] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r3, [r2] ldr r0, =0x000003e7 strh r0, [r3, 0xE] diff --git a/asm/player_pc.s b/asm/player_pc.s index 7ce1e1824..6e82c0081 100644 --- a/asm/player_pc.s +++ b/asm/player_pc.s @@ -9,7 +9,7 @@ sub_816ADF4: @ 816ADF4 push {r4-r6,lr} movs r4, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x93 lsls r1, 3 @@ -374,7 +374,7 @@ sub_816B148: @ 816B148 ldrb r0, [r0] cmp r0, 0x4 bne _0816B180 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -817,7 +817,7 @@ sub_816B510: @ 816B510 push {r4,lr} movs r2, 0 movs r1, 0x6 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r4, 0xB0 lsls r4, 6 @@ -862,7 +862,7 @@ _0816B55A: mov r8, r1 cmp r4, 0xF bhi _0816B5D4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r10, r0 lsls r0, r2, 3 adds r0, r2 @@ -1078,8 +1078,8 @@ sub_816B730: @ 816B730 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r5, =gUnknown_02021CC4 - ldr r2, =gUnknown_03005D8C + ldr r5, =gStringVar1 + ldr r2, =gSaveBlock1Ptr ldr r1, =gUnknown_0203BCB8 ldrh r0, [r1] adds r0, 0x6 @@ -1093,14 +1093,14 @@ sub_816B730: @ 816B730 ldr r0, =0x00002bf2 adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy adds r0, r5, 0 movs r1, 0 bl sub_81DB554 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EAC63 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_816B7DC adds r0, r4, 0 adds r1, r5, 0 @@ -1248,7 +1248,7 @@ sub_816B8A4: @ 816B8A4 bne _0816B8E6 bl sub_81D1EC0 bl overworld_free_bg_tilemaps - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r1, =gUnknown_0203BCB8 ldrh r0, [r1] adds r0, 0x6 @@ -1413,7 +1413,7 @@ sub_816BA18: @ 816BA18 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r4, =gUnknown_0203BCB8 ldrh r1, [r4] adds r1, 0x6 @@ -1773,7 +1773,7 @@ _0816BD14: adds r4, r0 ldr r0, [r5] adds r0, r4 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsls r2, r6, 2 adds r1, r2 @@ -1809,7 +1809,7 @@ _0816BD58: ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8CF7 - bl CopyString + bl StringCopy ldr r0, [r5] lsls r2, r6, 3 adds r1, r0, r2 @@ -1878,7 +1878,7 @@ _0816BDEE: negs r0, r0 cmp r4, r0 beq _0816BE2C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r4, 2 adds r0, r1 @@ -1938,8 +1938,8 @@ _0816BE84: movs r2, 0xFF bl sub_816BFE0 _0816BE8E: - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D8C + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] lsls r2, r4, 2 adds r1, r2 @@ -1948,11 +1948,11 @@ _0816BE8E: ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x7 adds r1, r4, 0 movs r2, 0x68 @@ -1991,7 +1991,7 @@ sub_816BEF0: @ 816BEF0 negs r0, r0 cmp r1, r0 beq _0816BF2C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, 2 adds r0, r1 @@ -2242,7 +2242,7 @@ sub_816C110: @ 816C110 push {lr} sub sp, 0x4 bl sub_80D6E84 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x93 lsls r1, 3 @@ -2435,10 +2435,10 @@ sub_816C2C0: @ 816C2C0 adds r0, r5, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -2641,7 +2641,7 @@ sub_816C450: @ 816C450 adds r0, r5 ldrb r0, [r0] bl sub_816C690 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, [r6] adds r0, r5 @@ -2652,7 +2652,7 @@ sub_816C450: @ 816C450 lsls r0, 3 adds r1, r0 ldrh r0, [r1] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, =0x0000fff7 bl sub_816C228 @@ -2790,7 +2790,7 @@ sub_816C5A0: @ 816C5A0 subs r0, r6, 0x1 cmp r2, r0 beq _0816C60A - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x93 lsls r1, 3 @@ -2889,12 +2889,12 @@ sub_816C6BC: @ 816C6BC lsrs r5, 24 lsls r3, 24 lsrs r3, 24 - ldr r0, =gUnknown_02021CC4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + ldr r0, =gStringVar1 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0x30 @@ -2941,7 +2941,7 @@ sub_816C71C: @ 816C71C ldrsh r0, [r6, r1] cmp r0, 0 bne _0816C798 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r4, 2 adds r1, r0 @@ -2959,7 +2959,7 @@ _0816C774: lsls r2, 3 adds r0, r1, r2 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, =0x0000fffe bl sub_816C228 @@ -2967,7 +2967,7 @@ _0816C774: b _0816C7D4 .pool _0816C798: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r4, 2 adds r1, r0 @@ -2985,7 +2985,7 @@ _0816C7BC: lsls r2, 3 adds r0, r1, r2 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, =0x0000fffc bl sub_816C228 @@ -3039,7 +3039,7 @@ sub_816C818: @ 816C818 adds r2, r0 lsls r2, 16 adds r0, r6, 0x4 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r8, r1 ldr r1, [r1] lsrs r7, r2, 14 @@ -3136,7 +3136,7 @@ sub_816C8FC: @ 816C8FC ldrh r0, [r0] adds r1, r0 lsls r1, 16 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] lsrs r5, r1, 14 adds r0, r5 @@ -3156,14 +3156,14 @@ sub_816C8FC: @ 816C8FC lsls r2, 3 adds r0, r2 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x4 ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =0x0000fffd bl sub_816C228 bl sub_816C2C0 @@ -3215,7 +3215,7 @@ sub_816C9B8: @ 816C9B8 ldrh r0, [r0] adds r1, r0 lsls r1, 16 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] lsrs r4, r1, 14 adds r0, r4 @@ -3233,14 +3233,14 @@ sub_816C9B8: @ 816C9B8 lsls r2, 3 adds r0, r2 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x4 ldrsh r1, [r7, r2] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =0x0000fff8 bl sub_816C228 bl sub_816C2C0 @@ -3310,7 +3310,7 @@ sub_816CAC8: @ 816CAC8 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =gUnknown_0203BCB8 ldrh r0, [r1, 0x2] @@ -3390,7 +3390,7 @@ sub_816CB74: @ 816CB74 ands r0, r1 cmp r0, 0 beq _0816CBAC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =gUnknown_0203BCB8 ldrh r0, [r1, 0x2] diff --git a/asm/pokedex.s b/asm/pokedex.s index a5e987f3c..21212a4af 100644 --- a/asm/pokedex.s +++ b/asm/pokedex.s @@ -16,7 +16,7 @@ sub_80BB2D0: @ 80BB2D0 strb r0, [r1] ldr r0, =gUnknown_030060B0 strb r2, [r0] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] movs r1, 0 strb r2, [r0, 0x19] @@ -33,7 +33,7 @@ sub_80BB2D0: @ 80BB2D0 bl sub_809D3C0 movs r1, 0 movs r2, 0 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r6, =0x00000988 ldr r5, =0x00003b24 _080BB30C: @@ -403,7 +403,7 @@ _080BB628: movs r1, 0 bl CreateTask ldr r1, [r4] - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldrb r0, [r0, 0x19] ldr r3, =0x00000612 @@ -1219,7 +1219,7 @@ sub_80BBDE8: @ 80BBDE8 ands r0, r1 cmp r0, 0 bne _080BBE4A - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r5, =gUnknown_02039B4C ldr r1, [r5] @@ -3526,7 +3526,7 @@ _080BD266: adds r3, r6, 0 bl sub_80BCE2C adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 24 lsrs r0, 24 add sp, 0x4 @@ -6845,7 +6845,7 @@ _080BEF28: ands r0, r2 cmp r0, 0 beq _080BEF78 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -6880,7 +6880,7 @@ _080BEF78: ands r0, r1 cmp r0, 0 beq _080BEFBA - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -7621,7 +7621,7 @@ _080BF694: ands r0, r2 cmp r0, 0 beq _080BF700 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -7664,7 +7664,7 @@ _080BF700: ands r0, r1 cmp r0, 0 beq _080BF772 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -7895,11 +7895,11 @@ _080BF910: _080BF93C: ldr r1, =gUnknown_085E8723 add r0, sp, 0x4 - bl CopyString - ldr r0, =gUnknown_03005D90 + bl StringCopy + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] add r0, sp, 0x4 - bl AppendString + bl StringAppend movs r0, 0x1 add r1, sp, 0x4 movs r2, 0xF0 @@ -7920,7 +7920,7 @@ _080BF97C: bl sub_80A1A74 b _080BFB4E _080BF982: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 @@ -8198,7 +8198,7 @@ _080BFC10: ands r0, r1 cmp r0, 0 beq _080BFC5C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -8918,11 +8918,11 @@ _080C024C: _080C0250: ldr r1, =gUnknown_085E8D4F mov r0, sp - bl CopyString + bl StringCopy adds r1, r5, 0 movs r2, 0x2 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r0, sp movs r1, 0x60 movs r2, 0x19 @@ -9448,7 +9448,7 @@ _080C06A2: _080C06A8: b _080C07E8 _080C06AA: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] adds r0, 0x5C adds r0, r4 @@ -9459,7 +9459,7 @@ _080C06AA: bne _080C06BE b _080C07E8 _080C06BE: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r6, =0x00000988 adds r1, r3, r6 @@ -9484,7 +9484,7 @@ _080C06E0: b _080C076A .pool _080C06FC: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] adds r0, r3, 0 adds r0, 0x28 @@ -9499,7 +9499,7 @@ _080C06FC: adds r0, r4 ldrb r0, [r0] ands r0, r5 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr cmp r2, r0 bne _080C0754 ldr r1, [r6] @@ -9557,7 +9557,7 @@ _080C076A: b _080C07E8 .pool _080C079C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0x5C adds r1, r4 @@ -9565,7 +9565,7 @@ _080C079C: adds r0, r5, 0 orrs r0, r2 strb r0, [r1] - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] ldr r0, =0x00000988 adds r1, r0 @@ -9580,7 +9580,7 @@ _080C079C: b _080C07DE .pool _080C07D8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0x28 _080C07DE: @@ -10479,13 +10479,13 @@ sub_80C0E68: @ 80C0E68 lsls r0, 1 cmp r1, r0 bne _080C0E94 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r0, [r0, 0x20] b _080C0E96 .pool _080C0E88: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r0, [r0, 0x1C] b _080C0E96 @@ -11591,7 +11591,7 @@ _080C178C: adds r0, r5, 0 movs r1, 0x5 bl sub_80C2318 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] strb r0, [r1, 0x19] bl sub_809D42C diff --git a/asm/pokedex_area_screen.s b/asm/pokedex_area_screen.s index 476bbbbfb..851ca44f4 100644 --- a/asm/pokedex_area_screen.s +++ b/asm/pokedex_area_screen.s @@ -138,7 +138,7 @@ sub_813CB40: @ 813CB40 bls _0813CB70 strh r4, [r1] _0813CB70: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x000031dc adds r0, r3 @@ -1310,7 +1310,7 @@ _0813D4A8: adds r0, r1 movs r1, 0 movs r2, 0x10 - bl RepeatChar + bl StringFill b _0813D584 .pool _0813D4D4: @@ -1473,7 +1473,7 @@ _0813D614: ands r0, r2 cmp r0, 0 beq _0813D6A8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 diff --git a/asm/pokemon_1.s b/asm/pokemon_1.s index 45b3aab02..d3f54a415 100644 --- a/asm/pokemon_1.s +++ b/asm/pokemon_1.s @@ -263,7 +263,7 @@ _08067C64: str r0, [sp, 0x18] b _08067C8A _08067C70: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0xA] ldrb r0, [r2, 0xB] @@ -301,7 +301,7 @@ _08067C8A: adds r0, r7, 0 movs r1, 0x3 bl pokemon_setattr_encrypted - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r2, [r5] adds r0, r7, 0 movs r1, 0x7 @@ -936,7 +936,7 @@ _080681D2: adds r1, r6, 0 adds r1, 0x20 add r0, sp, 0x10 - bl CopyString + bl StringCopy add r0, sp, 0x10 ldrb r0, [r0] cmp r0, 0xFC @@ -949,7 +949,7 @@ _080681D2: mov r1, r9 strb r0, [r1] add r0, sp, 0x10 - bl StripExtendedControlCodes + bl StripExtCtrlCodes b _08068236 _08068230: movs r0, 0x2 @@ -1081,7 +1081,7 @@ sub_8068338: @ 8068338 adds r6, r1, 0 lsls r2, 24 lsrs r2, 24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -1169,7 +1169,7 @@ _080683D2: bl pokemon_setattr add r0, sp, 0x10 ldr r1, [sp, 0x54] - bl CopyString + bl StringCopy add r0, sp, 0x10 ldrb r0, [r0] cmp r0, 0xFC @@ -1182,7 +1182,7 @@ _080683D2: mov r1, r9 strb r0, [r1] add r0, sp, 0x10 - bl StripExtendedControlCodes + bl StripExtCtrlCodes b _08068430 _0806842A: movs r0, 0x2 diff --git a/asm/pokemon_2.s b/asm/pokemon_2.s index 802df7092..72a4a9d71 100644 --- a/asm/pokemon_2.s +++ b/asm/pokemon_2.s @@ -1340,9 +1340,9 @@ _0806A89C: beq _0806A8BC ldr r1, =gUnknown_085E8264 adds r0, r6, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r4, r0, 16 b _0806AC8C @@ -2879,7 +2879,7 @@ memcpy_pokemon: @ 806B408 pokemon_catch: @ 806B414 push {r4-r6,lr} adds r6, r0, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] movs r1, 0x7 bl pokemon_setattr @@ -3937,7 +3937,7 @@ _0806BA4E: adds r0, 0x24 adds r0, r5, r0 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 mov r2, r10 adds r2, 0x30 adds r2, r5, r2 diff --git a/asm/porthole.s b/asm/porthole.s index daf067ca5..d2889abad 100644 --- a/asm/porthole.s +++ b/asm/porthole.s @@ -60,7 +60,7 @@ sub_80FB5E8: @ 80FB5E8 ldr r0, =0x000040b4 bl GetVarPointer adds r7, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] adds r6, r3, 0x4 movs r0, 0 @@ -262,7 +262,7 @@ sub_80FB7A4: @ 80FB7A4 movs r0, 0x80 lsls r0, 7 bl FlagSet - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] diff --git a/asm/record_mixing.s b/asm/record_mixing.s index e8a9505c8..7cfd9f401 100644 --- a/asm/record_mixing.s +++ b/asm/record_mixing.s @@ -19,7 +19,7 @@ sub_80E6BE8: @ 80E6BE8 sub_80E6BF8: @ 80E6BF8 push {r4,lr} ldr r2, =gUnknown_03001134 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r3, =0x00001a9c adds r0, r1, r3 @@ -44,7 +44,7 @@ sub_80E6BF8: @ 80E6BF8 ldr r0, =gUnknown_02039F9C str r0, [r2] ldr r2, =gUnknown_0300114C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r4, =0x0000064c adds r3, r0, r4 @@ -855,7 +855,7 @@ _080E7464: bne _080E746E b _080E7566 _080E746E: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_80E7810 adds r1, r0, 0 lsls r1, 24 @@ -863,7 +863,7 @@ _080E746E: adds r0, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x5 b _080E7564 .pool @@ -1528,7 +1528,7 @@ _080E79CE: beq _080E79F2 adds r0, r4, 0 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _080E79F2: adds r6, 0x1 cmp r6, 0x3 @@ -1828,7 +1828,7 @@ _080E7C24: adds r4, r5, 0 adds r4, 0x24 adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 @@ -1838,7 +1838,7 @@ _080E7C24: .pool _080E7C54: adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes mov r4, r9 _080E7C5C: ldrh r1, [r5, 0x2C] @@ -1847,7 +1847,7 @@ _080E7C5C: bne _080E7C74 adds r0, r5, 0 adds r0, 0x2C - bl StripExtendedControlCodes + bl StripExtCtrlCodes movs r1, 0x1 b _080E7C76 .pool @@ -2215,7 +2215,7 @@ _080E7F1C: ldr r1, [sp, 0x2C] ldr r2, [sp, 0x44] adds r7, r1, r2 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] movs r3, 0xC2 lsls r3, 6 @@ -2279,9 +2279,9 @@ sub_80E7F68: @ 80E7F68 ldr r0, =0x00004001 ldrh r1, [r4] bl VarSet - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_020229F0 - bl CopyString + bl StringCopy ldrh r1, [r4] ldr r0, =0x00000113 cmp r1, r0 @@ -2458,7 +2458,7 @@ sub_80E8110: @ 80E8110 str r2, [sp, 0x4] mov r8, r2 movs r7, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r9, r0 _080E8150: mov r1, r9 @@ -2543,7 +2543,7 @@ _080E81EC: ldr r1, =0x33330000 cmp r0, r1 bls _080E8224 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB2 ldrb r0, [r0] @@ -2562,7 +2562,7 @@ _080E820E: b _080E824C .pool _080E8224: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB2 ldrb r0, [r0] @@ -2602,7 +2602,7 @@ sub_80E8260: @ 80E8260 sub sp, 0xC mov r8, r0 movs r6, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r10, r0 _080E8274: movs r7, 0 @@ -2625,7 +2625,7 @@ _080E8286: mov r0, r10 ldr r1, [r0] adds r0, r6, 0 - bl CopyString + bl StringCopy adds r4, 0x10 adds r6, 0x10 adds r5, 0x10 @@ -2635,7 +2635,7 @@ _080E8286: mov r6, r9 cmp r6, 0x8 ble _080E8274 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r10, r1 ldr r2, =0x00000ee1 str r2, [sp, 0x4] @@ -2672,13 +2672,13 @@ _080E82DA: mov r0, r10 ldr r1, [r0] mov r0, r9 - bl CopyString + bl StringCopy mov r2, r10 ldr r1, [r2] ldr r0, [sp, 0x4] adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, [sp, 0x4] adds r1, 0x8 str r1, [sp, 0x4] @@ -2694,7 +2694,7 @@ _080E82DA: cmp r7, 0 bge _080E82DA movs r6, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] mov r4, r8 movs r1, 0xC4 @@ -2867,7 +2867,7 @@ _080E8496: ldrb r0, [r6] cmp r0, 0xFF beq _080E84B4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0xDC adds r0, r4, 0 @@ -2891,7 +2891,7 @@ _080E84B4: b _080E8566 .pool _080E84CC: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] adds r1, r0, 0 adds r1, 0xB2 @@ -2925,7 +2925,7 @@ _080E8508: _080E850C: movs r0, 0x1 eors r0, r5 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r4, [r7] adds r1, r4, 0 adds r1, 0xB2 @@ -3035,7 +3035,7 @@ _080E85BE: _080E85DC: movs r6, 0 mov r8, r6 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, [sp, 0x10] lsls r0, r2, 5 @@ -3190,7 +3190,7 @@ _080E8702: ldr r5, [sp, 0x8] adds r5, 0x1 str r5, [sp, 0x2C] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r0, 0x54 ldr r6, [sp, 0x8] @@ -3486,7 +3486,7 @@ sub_80E8924: @ 80E8924 push {r5-r7} mov r9, r0 movs r0, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r10, r1 _080E8936: lsls r1, r0, 1 @@ -3518,7 +3518,7 @@ _080E8950: cmp r0, 0x8 ble _080E8936 movs r5, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _080E8972: movs r0, 0x54 adds r1, r5, 0 @@ -3588,7 +3588,7 @@ sub_80E89F8: @ 80E89F8 push {r4-r6,lr} adds r6, r0, 0 ldr r5, =gUnknown_02039F9C - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] movs r0, 0xC2 lsls r0, 6 @@ -3655,7 +3655,7 @@ _080E8A90: ldrb r1, [r7] lsrs r1, 4 adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _080E8A9A: adds r4, 0x38 movs r0, 0x38 @@ -3696,7 +3696,7 @@ _080E8AC6: beq _080E8ADC adds r0, r1, 0 adds r0, 0x20 - bl StripExtendedControlCodes + bl StripExtCtrlCodes _080E8ADC: adds r4, 0x1 cmp r4, 0x3 diff --git a/asm/region_map.s b/asm/region_map.s index 5bf19da34..ece8d17f6 100644 --- a/asm/region_map.s +++ b/asm/region_map.s @@ -1522,7 +1522,7 @@ sub_81238AC: @ 81238AC mov r5, r8 push {r5-r7} sub sp, 0xC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r1, 0x4 ldrsb r1, [r2, r1] @@ -1581,7 +1581,7 @@ _08123928: ldrh r2, [r0] ldrh r0, [r0, 0x4] mov r9, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r6, [r0] ldrh r3, [r0, 0x2] @@ -1605,7 +1605,7 @@ _0812396C: ands r0, r1 cmp r0, 0 beq _081239C8 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] adds r0, r1, 0 adds r0, 0x24 @@ -1653,7 +1653,7 @@ _081239C8: b _08123ABE .pool _081239E4: - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] movs r0, 0x14 ldrsb r0, [r1, r0] @@ -1690,7 +1690,7 @@ _08123A28: strh r1, [r0] cmp r1, 0x57 beq _08123A64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r7, r0, 0 adds r7, 0x24 @@ -1707,7 +1707,7 @@ _08123A28: b _08123A8A .pool _08123A64: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r7, r0, 0 adds r7, 0x14 @@ -1831,7 +1831,7 @@ _08123B56: b _08123BC6 _08123B5E: movs r6, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] @@ -2822,7 +2822,7 @@ sub_8124288: @ 8124288 b _081243A4 .pool _08124304: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0x1 @@ -3161,7 +3161,7 @@ _08124584: adds r1, r0 ldr r1, [r1] adds r0, r5, 0 - bl CopyString + bl StringCopy adds r1, r0, 0 b _081245B2 .pool @@ -3173,7 +3173,7 @@ _081245A6: adds r0, r5, 0 movs r1, 0 adds r2, r4, 0 - bl RepeatChar + bl StringFill b _081245D6 _081245B2: cmp r4, 0 @@ -3213,12 +3213,12 @@ sub_81245DC: @ 81245DC cmp r1, 0x57 bne _08124604 ldr r1, =gUnknown_085EC9D2 - bl CopyString + bl StringCopy b _0812460A .pool _081245F8: ldr r1, =gUnknown_085EC9D8 - bl CopyString + bl StringCopy b _0812460A .pool _08124604: @@ -3240,7 +3240,7 @@ sub_8124610: @ 8124610 b _08124626 _08124620: ldr r1, =gUnknown_085EC9E4 - bl CopyString + bl StringCopy _08124626: pop {r1} bx r1 @@ -3423,7 +3423,7 @@ _0812479C: adds r0, r1 movs r1, 0 movs r2, 0x10 - bl RepeatChar + bl StringFill ldr r1, =gUnknown_03001180 movs r0, 0x1 str r0, [r1] @@ -3589,7 +3589,7 @@ _08124926: lsls r0, 2 adds r0, r1 ldr r0, [r0] - bl GetStringLength + bl StringLength movs r7, 0x1 movs r0, 0 movs r1, 0 @@ -4207,7 +4207,7 @@ _08124E7C: bl sub_8084CCC b _08124EFA _08124E84: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] movs r1, 0xD diff --git a/asm/reset_rtc_screen.s b/asm/reset_rtc_screen.s index 044433775..11b345d6f 100644 --- a/asm/reset_rtc_screen.s +++ b/asm/reset_rtc_screen.s @@ -404,53 +404,53 @@ sub_809EBC4: @ 809EBC4 lsls r2, 24 lsrs r2, 24 mov r8, r2 - ldr r7, =gUnknown_02021FC4 - ldr r4, =gUnknown_02021CC4 + ldr r7, =gStringVar4 + ldr r4, =gStringVar1 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r7, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy adds r7, r0, 0 ldr r1, =gUnknown_085EE68A - bl CopyString + bl StringCopy adds r7, r0, 0 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r7, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy adds r7, r0, 0 ldr r5, =gUnknown_085EE68E adds r1, r5, 0 - bl CopyString + bl StringCopy adds r7, r0, 0 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r7, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy adds r7, r0, 0 adds r1, r5, 0 - bl CopyString + bl StringCopy adds r7, r0, 0 adds r0, r4, 0 mov r1, r8 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r7, 0 adds r1, r4, 0 - bl CopyString - ldr r2, =gUnknown_02021FC4 + bl StringCopy + ldr r2, =gStringVar4 mov r0, r9 str r0, [sp] movs r0, 0xFF @@ -1042,7 +1042,7 @@ _0809F11C: movs r1, 0x1 movs r3, 0 bl Print - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r1, 0 adds r0, 0xA0 @@ -1196,7 +1196,7 @@ _0809F2CA: ldr r0, =gUnknown_085ECA38 bl sub_809F0C0 ldr r2, =gUnknown_03005CF8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xA0 ldr r1, [r0, 0x4] @@ -1250,7 +1250,7 @@ _0809F340: movs r3, 0x4 ldrsb r3, [r4, r3] bl GameFreakRTC_CalcRTCToLocalDelta - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0xA0 ldr r0, [r4] diff --git a/asm/rom3.s b/asm/rom3.s index 9596b9764..0e3a24a7c 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -3745,7 +3745,7 @@ dp01_build_cmdbuf_x37_a: @ 80344C8 movs r0, 0x37 strb r0, [r4] strb r1, [r4, 0x1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ca9 adds r1, r0 diff --git a/asm/rom4.s b/asm/rom4.s index 271120f25..5797c194b 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -10,7 +10,7 @@ sub_8084620: @ 8084620 push {r4,lr} ldr r0, =gUnknown_08271857 bl script_env_2_execute_new_script - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] movs r0, 0x92 lsls r0, 3 @@ -191,13 +191,13 @@ sub_80847F8: @ 80847F8 lsrs r1, r0, 24 cmp r1, 0x33 bhi _08084828 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] lsls r0, r1, 2 ldr r1, =0x0000159c adds r2, r1 adds r2, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0xAC ldr r0, [r2] @@ -220,13 +220,13 @@ sav12_xor_set: @ 8084830 lsrs r2, r0, 24 cmp r2, 0x33 bhi _08084854 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r2, 2 ldr r2, =0x0000159c adds r1, r2 adds r1, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xAC ldr r0, [r0] @@ -243,7 +243,7 @@ sub_8084864: @ 8084864 push {r4-r6,lr} adds r5, r0, 0 movs r4, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _0808486C: lsls r1, r4, 2 ldr r0, =0x0000159c @@ -270,7 +270,7 @@ CopyFieldObjectTemplatesToSav1: @ 8084894 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r1, [r5] movs r4, 0xC7 lsls r4, 4 @@ -304,7 +304,7 @@ CopyFieldObjectTemplateCoordsToSav1: @ 80848E0 push {lr} ldr r0, =gUnknown_02037318 ldr r1, [r0, 0x4] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, [r1, 0x4] movs r3, 0xC7 @@ -333,7 +333,7 @@ update_saveblock1_field_object_coords: @ 8084910 lsrs r4, r1, 16 lsls r2, 16 lsrs r2, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0 movs r6, 0xC7 @@ -365,7 +365,7 @@ update_saveblock1_field_object_movement_behavior: @ 808494C lsrs r4, r0, 24 lsls r1, 24 lsrs r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r3, 0 movs r5, 0xC7 @@ -410,7 +410,7 @@ mapdata_load_assets_to_gpu_and_full_redraw: @ 8084980 @ mapdata_header *get_mapdata_header() get_mapdata_header: @ 80849A8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x32] cmp r1, 0 @@ -434,7 +434,7 @@ _080849C6: @ void warp_shift() warp_shift: @ 80849D0 ldr r3, =gUnknown_020322DC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, [r2, 0x4] ldr r1, [r2, 0x8] @@ -574,7 +574,7 @@ set_current_map_header_from_sav1_save_old_name: @ 8084ACC ldr r4, =gUnknown_02037318 ldrb r0, [r4, 0x14] strh r0, [r1] - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r1, [r5] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -608,7 +608,7 @@ set_current_map_header_from_sav1_save_old_name: @ 8084ACC set_current_map_header_from_sav1: @ 8084B1C push {r4,r5,lr} ldr r4, =gUnknown_02037318 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -639,7 +639,7 @@ set_current_map_header_from_sav1: @ 8084B1C @ void update_camera_pos_from_warpid() update_camera_pos_from_warpid: @ 8084B5C push {r4,r5,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r1, 0x6 ldrsb r1, [r2, r1] @@ -768,7 +768,7 @@ warp1_set_2: @ 8084C28 saved_warp2_set: @ 8084C48 push {r4,r5,lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r5, [r0] adds r0, r5, 0 adds r0, 0x14 @@ -798,7 +798,7 @@ saved_warp2_set_2: @ 8084C7C sub sp, 0x8 ldr r4, [sp, 0x14] ldr r5, [sp, 0x18] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x14 lsls r1, 24 @@ -824,7 +824,7 @@ saved_warp2_set_2: @ 8084C7C thumb_func_start copy_saved_warp2_bank_and_enter_x_to_warp1 copy_saved_warp2_bank_and_enter_x_to_warp1: @ 8084CB4 ldr r2, =gUnknown_020322E4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, [r0, 0x18] ldr r0, [r0, 0x14] @@ -869,7 +869,7 @@ _08084CFA: @ void copy_saved_warp3_bank_and_enter_x_to_warp1() copy_saved_warp3_bank_and_enter_x_to_warp1: @ 8084D04 ldr r2, =gUnknown_020322E4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, [r0, 0x20] ldr r0, [r0, 0x1C] @@ -889,7 +889,7 @@ sub_8084D1C: @ 8084D1C adds r5, r0, 0 cmp r5, 0 beq _08084D50 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x1C movs r1, 0 @@ -945,7 +945,7 @@ sub_8084D5C: @ 8084D5C lsrs r0, 24 cmp r0, 0x1 beq _08084DC4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -978,7 +978,7 @@ sub_8084DD4: @ 8084DD4 adds r5, r1, 0 adds r6, r2, 0 ldr r1, [sp, 0x18] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x24 lsls r4, 24 @@ -1007,7 +1007,7 @@ sub_8084DD4: @ 8084DD4 thumb_func_start sub_8084E14 sub_8084E14: @ 8084E14 ldr r2, =gUnknown_020322E4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, [r0, 0x28] ldr r0, [r0, 0x24] @@ -1137,7 +1137,7 @@ _08084F0A: thumb_func_start warp1_set_to_sav1w warp1_set_to_sav1w: @ 8084F14 ldr r2, =gUnknown_020322E4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, [r0, 0x10] ldr r0, [r0, 0xC] @@ -1155,7 +1155,7 @@ sub_8084F2C: @ 8084F2C adds r5, r1, 0 adds r6, r2, 0 ldr r1, [sp, 0x18] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0xC lsls r4, 24 @@ -1191,7 +1191,7 @@ sub_8084F6C: @ 8084F6C adds r5, r0, 0 cmp r5, 0 beq _08084FA0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0xC movs r1, 0 @@ -1217,7 +1217,7 @@ _08084FA0: thumb_func_start sub_8084FAC sub_8084FAC: @ 8084FAC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, [r2, 0x14] ldr r1, [r2, 0x18] @@ -1467,7 +1467,7 @@ _080851A2: bl sub_809D344 bl wild_pokemon_reroll bl prev_quest_postbuffer_cursor_backup_reset - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -1783,7 +1783,7 @@ _08085448: thumb_func_start cur_mapdata_block_role_at_screen_center_acc_to_sav1 cur_mapdata_block_role_at_screen_center_acc_to_sav1: @ 8085450 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] @@ -1825,7 +1825,7 @@ update_sav1_flash_used_on_map: @ 8085494 ldrb r1, [r0, 0x15] cmp r1, 0 bne _080854B0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x30 strb r1, [r0] @@ -1837,7 +1837,7 @@ _080854B0: lsls r0, 24 cmp r0, 0 beq _080854D0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x30 movs r1, 0x1 @@ -1845,7 +1845,7 @@ _080854B0: b _080854DE .pool _080854D0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =gUnknown_0854FE78 ldr r0, [r0] @@ -1871,7 +1871,7 @@ sub_80854EC: @ 80854EC _080854FC: movs r1, 0 _080854FE: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x30 strb r1, [r0] @@ -1882,7 +1882,7 @@ _080854FE: thumb_func_start sav1_get_flash_used_on_map sav1_get_flash_used_on_map: @ 8085514 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x30 ldrb r0, [r0] @@ -1893,7 +1893,7 @@ sav1_get_flash_used_on_map: @ 8085514 thumb_func_start sub_8085524 sub_8085524: @ 8085524 push {lr} - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] strh r0, [r1, 0x32] bl get_mapdata_header @@ -2126,7 +2126,7 @@ _080856CE: thumb_func_start sav1_map_get_music sav1_map_get_music: @ 80856D4 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xD0 @@ -2142,7 +2142,7 @@ sav1_map_get_music: @ 80856D4 b _08085730 .pool _080856FC: - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] adds r0, 0x4 bl warp_target_get_music @@ -2186,7 +2186,7 @@ warp1_target_get_music: @ 8085738 b _08085774 .pool _08085758: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0x80 @@ -2224,7 +2224,7 @@ sub_8085784: @ 8085784 ldr r0, =0x0000ffff cmp r4, r0 beq _080857D6 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrh r0, [r1, 0x2C] cmp r0, 0 @@ -2265,7 +2265,7 @@ _080857E8: thumb_func_start sav1_set_battle_music_maybe sav1_set_battle_music_maybe: @ 80857F4 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] strh r0, [r1, 0x2C] bx lr @@ -2274,7 +2274,7 @@ sav1_set_battle_music_maybe: @ 80857F4 thumb_func_start sav1_reset_battle_music_maybe sav1_reset_battle_music_maybe: @ 8085800 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0 strh r0, [r1, 0x2C] @@ -2433,7 +2433,7 @@ music_something: @ 8085910 lsrs r0, 16 cmp r0, 0x2 bne _08085972 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000ffff ldrh r2, [r0, 0x4] @@ -2661,7 +2661,7 @@ _08085B20: thumb_func_start sub_8085B2C sub_8085B2C: @ 8085B2C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xB4 @@ -2724,7 +2724,7 @@ get_map_light_level_from_warp: @ 8085B8C thumb_func_start sav1_map_get_light_level sav1_map_get_light_level: @ 8085BA4 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x4 bl get_map_light_level_from_warp @@ -2817,7 +2817,7 @@ _08085C2A: thumb_func_start sav1_saved_warp2_map_get_name sav1_saved_warp2_map_get_name: @ 8085C30 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x14 ldrsb r0, [r1, r0] @@ -2838,7 +2838,7 @@ sav1_saved_warp2_map_get_name: @ 8085C30 thumb_func_start sav1_map_get_name sav1_map_get_name: @ 8085C58 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -2859,7 +2859,7 @@ sav1_map_get_name: @ 8085C58 thumb_func_start sav1_map_get_battletype sav1_map_get_battletype: @ 8085C80 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -4362,7 +4362,7 @@ mli4_mapscripts_and_other: @ 8086A04 movs r2, 0 ldrsh r1, [r4, r2] ldrb r2, [r5, 0x1] - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r3, [r3] ldrb r3, [r3, 0x8] bl InitPlayerAvatar diff --git a/asm/rom5.s b/asm/rom5.s index 6f13ca2e8..603898d30 100644 --- a/asm/rom5.s +++ b/asm/rom5.s @@ -384,7 +384,7 @@ _080A9676: beq _080A9698 cmp r4, 0 bne _080A9698 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] b _080A96AA @@ -607,7 +607,7 @@ _080A986C: beq _080A98D0 cmp r7, 0 bne _080A98D0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldrb r4, [r0, 0x8] movs r0, 0 diff --git a/asm/rom6.s b/asm/rom6.s index 1a0027a8e..2baf99297 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -1149,7 +1149,7 @@ _08135E7C: ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E9344 - bl CopyString + bl StringCopy ldr r1, [r5] lsls r2, r6, 3 ldr r3, =0x0000080c @@ -1199,7 +1199,7 @@ _08135E7C: sub_8135F04: @ 8135F04 push {r4-r6,lr} lsls r1, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr lsrs r1, 13 ldr r3, =0x00000848 adds r1, r3 @@ -1210,7 +1210,7 @@ sub_8135F04: @ 8135F04 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy adds r4, r0, 0 movs r0, 0xFC strb r0, [r4] @@ -1221,7 +1221,7 @@ sub_8135F04: @ 8135F04 movs r0, 0x57 strb r0, [r4] adds r4, 0x1 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 adds r0, r5, 0 bl sub_8136EA4 adds r1, r0, 0 @@ -1230,10 +1230,10 @@ sub_8135F04: @ 8135F04 adds r0, r6, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085E934F adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders pop {r4-r6} pop {r0} bx r0 @@ -1294,7 +1294,7 @@ sub_8135FCC: @ 8135FCC negs r0, r0 cmp r4, r0 beq _081360A0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsls r0, r4, 3 ldr r2, =0x00000848 adds r0, r2 @@ -1362,7 +1362,7 @@ _08136032: lsrs r5, r0, 24 cmp r5, 0x4 bls _08136002 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 mov r0, r8 bl sub_8136EDC adds r1, r0, 0 @@ -1371,7 +1371,7 @@ _08136032: adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x7 adds r1, r4, 0 movs r2, 0x4 @@ -1472,7 +1472,7 @@ _0813614A: mov r12, r1 cmp r6, 0x27 bhi _08136192 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r9, r0 lsls r7, r2, 3 ldr r1, =0x00000848 @@ -1524,7 +1524,7 @@ sub_81361B0: @ 81361B0 push {r4-r7,lr} adds r4, r0, 0 adds r5, r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00000848 adds r6, r0, r1 @@ -1621,7 +1621,7 @@ sub_813625C: @ 813625C movs r1, 0 strb r1, [r0] movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00000848 _08136274: ldr r0, [r5] @@ -2540,7 +2540,7 @@ sub_8136A50: @ 8136A50 thumb_func_start sub_8136A74 sub_8136A74: @ 8136A74 push {lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_0203CE7C ldrh r1, [r0] lsls r1, 3 @@ -2582,9 +2582,9 @@ sub_8136AB4: @ 8136AB4 ldrb r0, [r0, 0x2] movs r1, 0 bl sub_8198070 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r3, =gUnknown_085B262C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldr r1, =gUnknown_0203CE7C ldrh r1, [r1] @@ -2596,11 +2596,11 @@ sub_8136AB4: @ 8136AB4 lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl CopyString - ldr r5, =gUnknown_02021FC4 + bl StringCopy + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E9353 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders bl sav2_get_text_speed lsls r0, 24 lsrs r0, 24 @@ -2653,10 +2653,10 @@ sub_8136B78: @ 8136B78 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E9367 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders bl sav2_get_text_speed lsls r0, 24 lsrs r0, 24 @@ -2771,7 +2771,7 @@ sub_8136C8C: @ 8136C8C bl GetNature lsls r0, 24 lsrs r0, 24 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r7, =gUnknown_0203CE7C ldrh r2, [r7] lsls r2, 3 @@ -2794,7 +2794,7 @@ sub_8136C8C: @ 8136C8C lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl CopyString + bl StringCopy ldrb r0, [r7] bl sub_8136F68 ldr r1, [r5] @@ -2839,9 +2839,9 @@ sub_8136D2C: @ 8136D2C ldr r5, =gUnknown_0203CE7C ldrb r0, [r5] bl sub_80FC3E8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r3, =gUnknown_085B262C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrh r1, [r5] lsls r1, 3 @@ -2852,7 +2852,7 @@ sub_8136D2C: @ 8136D2C lsls r1, 2 adds r1, r3 ldr r1, [r1] - bl CopyString + bl StringCopy ldr r1, =gUnknown_020375F0 ldrh r0, [r5] strh r0, [r1] @@ -2876,7 +2876,7 @@ sub_8136D90: @ 8136D90 lsls r4, 24 lsrs r4, 24 ldr r6, =gUnknown_020375E0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r5, =gUnknown_0203CE7C ldrh r1, [r5] lsls r1, 3 @@ -2934,7 +2934,7 @@ sub_8136DE8: @ 8136DE8 sub_8136E20: @ 8136E20 push {r4,lr} lsls r0, 24 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] lsrs r0, 21 adds r1, r0 @@ -3045,7 +3045,7 @@ _08136EEE: sub_8136EF4: @ 8136EF4 push {lr} movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r3, =0x00000848 _08136EFE: @@ -3083,7 +3083,7 @@ sub_8136F2C: @ 8136F2C negs r0, r0 cmp r1, r0 beq _08136F60 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] lsls r0, r1, 3 ldr r1, =0x00000848 @@ -3109,7 +3109,7 @@ sub_8136F68: @ 8136F68 push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r2, 3 adds r0, r1 @@ -3241,7 +3241,7 @@ sub_8137044: @ 8137044 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -3270,7 +3270,7 @@ _08137074: adds r0, r7 ldr r1, [r0] adds r0, r6, 0 - bl CopyString + bl StringCopy movs r0, 0x1 b _081370AC .pool @@ -4058,7 +4058,7 @@ _0813776C: bl sub_80847F8 cmp r0, 0 bne _0813778E - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrh r1, [r2, 0xE] lsls r1, 16 @@ -4071,7 +4071,7 @@ _0813776C: bl sav12_xor_set _0813778E: bl sub_8076D48 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -4790,26 +4790,26 @@ sub_8137D5C: @ 8137D5C lsrs r6, r1, 24 cmp r6, 0x63 bhi _08137D88 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085EB5EE adds r0, r4, 0 - bl AppendString + bl StringAppend b _08137D90 .pool _08137D88: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB5CF - bl CopyString + bl StringCopy _08137D90: ldr r0, =0x00000e0f cmp r7, r0 bhi _08137DF0 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 adds r0, r7, 0 movs r1, 0x3C bl __udivsi3 @@ -4817,7 +4817,7 @@ _08137D90: adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0xAD strb r0, [r4, 0x2] adds r5, r4, 0x3 @@ -4832,16 +4832,16 @@ _08137D90: adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085EB5E5 adds r0, r4, 0 - bl AppendString + bl StringAppend b _08137DF8 .pool _08137DF0: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EB5DA - bl CopyString + bl StringCopy _08137DF8: movs r4, 0 cmp r6, 0 @@ -5418,7 +5418,7 @@ _08138262: lsls r1, 2 ldr r2, =gUnknown_020229F0 adds r1, r2 - bl CopyString + bl StringCopy adds r0, r6, 0x1 lsls r0, 24 lsrs r6, r0, 24 @@ -5483,7 +5483,7 @@ _081382F4: b _08138350 _081382FE: movs r7, 0x2 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrh r0, [r1] subs r0, 0x1 @@ -5491,7 +5491,7 @@ _081382FE: .pool _08138310: movs r7, 0x1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0] mov r9, r1 @@ -5500,7 +5500,7 @@ _08138310: b _0813834A .pool _08138324: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrh r0, [r1] adds r0, 0x1 @@ -5514,7 +5514,7 @@ _0813832C: .pool _0813833C: movs r7, 0x3 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r3, [r0] mov r9, r3 @@ -5663,7 +5663,7 @@ sub_813842C: @ 813842C cmp r4, 0x69 bne _081384E6 _08138454: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -6377,7 +6377,7 @@ sub_8138AA4: @ 8138AA4 thumb_func_start sub_8138AC0 sub_8138AC0: @ 8138AC0 push {lr} - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl box_related_two__2 pop {r0} bx r0 @@ -6387,7 +6387,7 @@ sub_8138AC0: @ 8138AC0 thumb_func_start sub_8138AD0 sub_8138AD0: @ 8138AD0 ldr r1, =gUnknown_020375E0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r0, [r2] strh r0, [r1] @@ -6401,7 +6401,7 @@ sub_8138AD0: @ 8138AD0 thumb_func_start sub_8138AF0 sub_8138AF0: @ 8138AF0 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0xB] lsls r1, 8 @@ -6419,20 +6419,20 @@ sub_8138AF0: @ 8138AF0 thumb_func_start sub_8138B10 sub_8138B10: @ 8138B10 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 bne _08138B34 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB5F9 - bl CopyString + bl StringCopy b _08138B3C .pool _08138B34: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB601 - bl CopyString + bl StringCopy _08138B3C: pop {r0} bx r0 @@ -6442,20 +6442,20 @@ _08138B3C: thumb_func_start sub_8138B48 sub_8138B48: @ 8138B48 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 bne _08138B6C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB60E - bl CopyString + bl StringCopy b _08138B74 .pool _08138B6C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB60A - bl CopyString + bl StringCopy _08138B74: pop {r0} bx r0 @@ -6791,7 +6791,7 @@ _08138DE0: bne _08138DE6 ldr r3, =0x0000027e _08138DE6: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r5, 0 ldrsh r0, [r2, r5] @@ -6875,7 +6875,7 @@ _08138E7C: bne _08138E82 ldr r4, =0x00000259 _08138E82: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r1, 0 ldrsh r0, [r2, r1] @@ -7238,7 +7238,7 @@ _0813914A: SpawnScriptFieldObject: @ 8139158 push {lr} sub sp, 0x8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r3, [r0] adds r3, 0x7 @@ -7281,7 +7281,7 @@ RemoveScriptFieldObject: @ 81391AC lsls r0, 24 lsrs r0, 24 bl CameraObjectSetFollowedObjectId - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -7305,7 +7305,7 @@ sub_81391D0: @ 81391D0 bl GetNature lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl sub_8137068 lsls r0, 24 lsrs r0, 24 @@ -7317,7 +7317,7 @@ sub_81391D0: @ 81391D0 thumb_func_start sub_8139200 sub_8139200: @ 8139200 push {r4,lr} - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00004026 bl VarGet adds r1, r0, 0 @@ -7346,7 +7346,7 @@ sub_8139228: @ 8139228 thumb_func_start sub_8139238 sub_8139238: @ 8139238 push {lr} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8165284 pop {r0} bx r0 @@ -7356,7 +7356,7 @@ sub_8139238: @ 8139238 thumb_func_start sub_8139248 sub_8139248: @ 8139248 push {r4,r5,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x00002e68 adds r0, r2, r1 @@ -7568,7 +7568,7 @@ sub_81393FC: @ 81393FC lsls r0, 24 cmp r0, 0 bne _08139454 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0x83 @@ -8019,14 +8019,14 @@ sub_8139770: @ 8139770 ldrh r0, [r6] muls r0, r5 adds r0, r4 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r1, 0x7 adds r2, r4, 0 bl pokemon_getattr - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r1, r4, 0 - bl CompareString + bl StringCompare cmp r0, 0 beq _081397BC _081397A6: @@ -8057,7 +8057,7 @@ _081397E0: ldr r0, =0x000003e7 cmp r1, r0 bls _081397F8 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0xA1 strb r0, [r4] adds r4, 0x1 @@ -8066,7 +8066,7 @@ _081397E0: _081397F8: cmp r1, 0x63 bls _0813980C - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0xA1 strb r0, [r4] strb r0, [r4, 0x1] @@ -8076,7 +8076,7 @@ _081397F8: _0813980C: cmp r1, 0x9 bls _0813983C - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0xA1 strb r0, [r4] strb r0, [r4, 0x1] @@ -8092,11 +8092,11 @@ _0813981C: adds r0, r4, 0 adds r1, r5, 0 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN b _08139862 .pool _0813983C: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0xA1 strb r0, [r4] strb r0, [r4, 0x1] @@ -8112,7 +8112,7 @@ _0813983C: adds r0, r4, 0 adds r1, r5, 0 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _08139862: pop {r4,r5} pop {r0} @@ -8182,7 +8182,7 @@ sub_81398C0: @ 81398C0 b _081398FC .pool _081398E0: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r1] bl ItemIdToBattleMoveId lsls r0, 16 @@ -8192,7 +8192,7 @@ _081398E0: ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 _081398FC: pop {r4} @@ -8239,7 +8239,7 @@ _08139944: thumb_func_start in_multi_battle_room_with_var_condition in_multi_battle_room_with_var_condition: @ 813994C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x00000f1a @@ -8276,7 +8276,7 @@ sub_8139980: @ 8139980 thumb_func_start sub_8139994 sub_8139994: @ 8139994 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r0, [r0, 0x15] subs r0, 0x10 @@ -8331,7 +8331,7 @@ sub_81399F4: @ 81399F4 strh r0, [r2] ldr r1, =gUnknown_0203AB62 strh r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] movs r0, 0x14 ldrsb r0, [r3, r0] @@ -8918,7 +8918,7 @@ _08139EC8: thumb_func_start sub_8139ED0 sub_8139ED0: @ 8139ED0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x00003c1a @@ -8988,7 +8988,7 @@ _08139F48: .4byte _08139FFC .4byte _0813A014 _08139F70: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r3, 0xCE lsls r3, 4 @@ -9004,7 +9004,7 @@ _08139F70: b _0813A038 .pool _08139F94: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d0c adds r2, r0, r3 @@ -9018,7 +9018,7 @@ _08139F9E: b _0813A038 .pool _08139FB4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000de2 adds r2, r0, r1 @@ -9026,7 +9026,7 @@ _08139FB4: b _08139F9E .pool _08139FCC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000dc8 adds r2, r0, r1 @@ -9034,7 +9034,7 @@ _08139FCC: b _08139F9E .pool _08139FE4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000dda adds r2, r0, r1 @@ -9042,7 +9042,7 @@ _08139FE4: b _08139F9E .pool _08139FFC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e04 adds r2, r0, r1 @@ -9050,7 +9050,7 @@ _08139FFC: b _08139F9E .pool _0813A014: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e1a adds r2, r0, r1 @@ -9108,7 +9108,7 @@ sub_813A080: @ 813A080 bl VarGet lsls r0, 16 lsrs r5, r0, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -9143,7 +9143,7 @@ _0813A0D8: lsls r1, r4, 1 lsls r2, r5, 2 ldr r4, =gUnknown_085B2CDC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r1, r2 movs r2, 0xCE @@ -10122,7 +10122,7 @@ _0813A8F0: sub_813A8FC: @ 813A8FC push {lr} sub sp, 0x2C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000eb8 adds r0, r1 @@ -10130,9 +10130,9 @@ sub_813A8FC: @ 813A8FC add r0, sp, 0xC movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085EB6AD - bl CopyString + bl StringCopy movs r0, 0x1 add r1, sp, 0xC movs r2, 0x30 @@ -10194,7 +10194,7 @@ sub_813A988: @ 813A988 thumb_func_start sub_813A9A4 sub_813A9A4: @ 813A9A4 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000eb8 adds r1, r0, r2 @@ -10217,7 +10217,7 @@ _0813A9CA: thumb_func_start sub_813A9D0 sub_813A9D0: @ 813A9D0 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000eb8 adds r2, r0, r1 @@ -10240,7 +10240,7 @@ _0813A9FE: thumb_func_start sub_813AA04 sub_813AA04: @ 813AA04 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000eb8 adds r0, r1 @@ -10537,7 +10537,7 @@ sub_813AC7C: @ 813AC7C ldrh r0, [r0] cmp r0, 0 beq _0813ACB8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085B320C ldr r1, =gUnknown_020375E0 ldrh r1, [r1] @@ -10548,11 +10548,11 @@ sub_813AC7C: @ 813AC7C muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy b _0813ACD2 .pool _0813ACB8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085B31F8 ldr r1, =gUnknown_020375E0 ldrh r1, [r1] @@ -10563,7 +10563,7 @@ _0813ACB8: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy _0813ACD2: pop {r0} bx r0 @@ -11018,7 +11018,7 @@ sub_813B0B4: @ 813B0B4 lsls r1, 1 movs r2, 0x8 bl gpu_pal_apply - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -11109,7 +11109,7 @@ increment_var_x4026_on_birth_island_modulo_100: @ 813B184 bl VarGet lsls r0, 16 lsrs r2, r0, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x00003a1a @@ -11340,7 +11340,7 @@ sub_813B374: @ 813B374 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085B3400 subs r1, r4, 0x1 adds r1, r2 @@ -11383,7 +11383,7 @@ sub_813B3B0: @ 813B3B0 adds r0, r5, 0 movs r1, 0 bl VarSet - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -11400,7 +11400,7 @@ sub_813B3B0: @ 813B3B0 b _0813B478 .pool _0813B414: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r1, 0x4 ldrsb r1, [r2, r1] @@ -11470,7 +11470,7 @@ sub_813B484: @ 813B484 sub_813B490: @ 813B490 push {r4-r7,lr} movs r3, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] movs r6, 0x4 ldrsb r6, [r4, r6] @@ -11986,7 +11986,7 @@ _0813B8EA: adds r7, r6, 0x1 mov r8, r7 _0813B8F4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] @@ -12067,7 +12067,7 @@ sub_813B968: @ 813B968 thumb_func_start sub_813B9A0 sub_813B9A0: @ 813B9A0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x1C] movs r0, 0xB0 @@ -12085,7 +12085,7 @@ _0813B9B6: thumb_func_start sub_813B9C0 sub_813B9C0: @ 813B9C0 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -12126,7 +12126,7 @@ _0813BA08: thumb_func_start sub_813BA10 sub_813BA10: @ 813BA10 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x0000141e adds r1, r0, r2 @@ -12148,9 +12148,9 @@ sub_813BA30: @ 813BA30 cmp r0, 0 beq _0813BA52 bl sub_813BCE8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrh r0, [r0, 0xE] movs r2, 0xA1 @@ -12166,7 +12166,7 @@ _0813BA52: thumb_func_start sub_813BA60 sub_813BA60: @ 813BA60 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x0000141e adds r0, r1 @@ -12179,7 +12179,7 @@ sub_813BA60: @ 813BA60 bl sub_813BF60 bl sub_813BD84 ldr r1, [r4] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrh r0, [r0, 0xE] movs r2, 0xA1 @@ -12218,7 +12218,7 @@ sub_813BADC: @ 813BADC lsrs r0, 16 cmp r0, 0x2 bne _0813BB58 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r5, =0x0000141e adds r3, r0, r5 @@ -12260,7 +12260,7 @@ _0813BB54: adds r0, r2, r0 strh r0, [r3] _0813BB58: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000141e adds r0, r1 @@ -12279,7 +12279,7 @@ sub_813BB74: @ 813BB74 sub sp, 0x8 movs r3, 0 movs r5, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r2, =0x0000141e movs r6, 0x1 _0813BB82: @@ -12318,7 +12318,7 @@ _0813BBC8: lsrs r5, r0, 24 cmp r5, 0x7 bls _0813BB82 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x0000141e adds r2, r0 @@ -12366,7 +12366,7 @@ _0813BC1E: b _0813BC8C _0813BC2E: movs r5, 0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr mov r8, r2 ldr r0, =0x0000141e mov r9, r0 @@ -12395,7 +12395,7 @@ _0813BC5E: lsrs r5, r0, 24 cmp r5, 0x7 bls _0813BC3A - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x0000141e adds r4, r0, r2 @@ -12431,7 +12431,7 @@ sub_813BCA8: @ 813BCA8 push {r4,r5,lr} movs r3, 0 movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000141e adds r0, r1 @@ -12465,7 +12465,7 @@ _0813BCCE: sub_813BCE8: @ 813BCE8 push {r4-r6,lr} movs r5, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldrh r1, [r0, 0xE] ldr r0, =0x000003e6 @@ -12477,7 +12477,7 @@ sub_813BCE8: @ 813BCE8 _0813BD04: ldr r0, [r6] ldrh r1, [r0, 0xE] - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] movs r2, 0xA1 lsls r2, 5 @@ -12503,7 +12503,7 @@ _0813BD32: lsrs r0, 16 cmp r0, 0x4 bhi _0813BD54 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, [r6] ldrh r0, [r0, 0xE] @@ -12524,7 +12524,7 @@ _0813BD58: thumb_func_start sub_813BD60 sub_813BD60: @ 813BD60 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000141e adds r0, r1 @@ -12540,7 +12540,7 @@ sub_813BD60: @ 813BD60 thumb_func_start sub_813BD84 sub_813BD84: @ 813BD84 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x0000141e adds r2, r0 @@ -12608,7 +12608,7 @@ _0813BE10: movs r3, 0x1 movs r2, 0x5 _0813BE14: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003150 adds r0, r1 @@ -12649,46 +12649,46 @@ _0813BE58: .4byte _0813BEAC .4byte _0813BEC0 _0813BE70: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD14 - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BE84: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD1B - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BE98: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD22 - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BEAC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD29 - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BEC0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD30 - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BED4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD0C - bl CopyString + bl StringCopy b _0813BF04 .pool _0813BEE8: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 movs r2, 0x7 - bl CopyString_LimitN + bl StringCopyN movs r0, 0xFF strb r0, [r4, 0x7] adds r0, r6, 0 @@ -12696,7 +12696,7 @@ _0813BEE8: adds r0, r5 ldrb r1, [r0] adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _0813BF04: pop {r4-r6} pop {r0} @@ -12730,7 +12730,7 @@ _0813BF40: thumb_func_start sub_813BF44 sub_813BF44: @ 813BF44 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000141e adds r0, r1 @@ -12744,7 +12744,7 @@ sub_813BF44: @ 813BF44 thumb_func_start sub_813BF60 sub_813BF60: @ 813BF60 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x0000141e adds r1, r0 diff --git a/asm/rom_8034C54.s b/asm/rom_8034C54.s index 9fe4f9b7b..8d2519f9d 100644 --- a/asm/rom_8034C54.s +++ b/asm/rom_8034C54.s @@ -3315,7 +3315,7 @@ _080369E8: movs r2, 0x2 orrs r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r5, =0x00000ca9 adds r1, r5 @@ -3470,7 +3470,7 @@ sub_8036B44: @ 8036B44 cmp r0, 0x1 bne _08036BC0 movs r2, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr movs r1, 0xC6 lsls r1, 1 adds r5, r1 @@ -3491,7 +3491,7 @@ _08036B66: strb r0, [r1] movs r2, 0 adds r3, r5, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r5, =0x00003214 _08036B86: adds r0, r3, r2 @@ -3574,7 +3574,7 @@ _08036C20: bne _08036CDC movs r5, 0 ldr r3, =gUnknown_02024404 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 adds r6, r3, 0 mov r4, r8 @@ -3609,7 +3609,7 @@ _08036C3A: movs r5, 0 adds r7, r3, 0 adds r7, 0x8 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, =0x00003214 adds r6, r3, 0 adds r6, 0x40 @@ -5142,7 +5142,7 @@ _08037A12: bl pokemon_get_gender strb r0, [r6, 0x1C] adds r0, r7, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 movs r1, 0x3 bl pokemon_getattr @@ -7591,7 +7591,7 @@ _08038FD0: movs r3, 0x4 _08038FFC: movs r4, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr cmp r4, r3 bge _08039022 ldr r1, =gUnknown_020229E8 @@ -8395,7 +8395,7 @@ shedinja_something: @ 803976C bl pokemon_getattr ldr r1, =gUnknown_0831ACA0 mov r0, sp - bl CompareStringWithoutExtendedControlCodes + bl StringCompareWithoutExtCtrlCodes cmp r0, 0 bne _080397B4 adds r0, r4, 0 @@ -9513,7 +9513,7 @@ _0803A004: ands r1, r0 cmp r1, 0 bne _0803A0AE - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0x15] movs r0, 0x4 @@ -9541,7 +9541,7 @@ _0803A0AC: str r0, [r2] _0803A0AE: ldr r3, =gUnknown_02024474 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x15] lsls r0, 30 @@ -16106,7 +16106,7 @@ sub_803DAC0: @ 803DAC0 movs r0, 0x7F ands r0, r2 strb r0, [r3] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ca9 adds r1, r0 @@ -16179,7 +16179,7 @@ sub_803DBA0: @ 803DBA0 ldr r1, =gUnknown_0202433A movs r0, 0x9 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ca9 adds r1, r0 @@ -18197,7 +18197,7 @@ _0803EEE0: movs r1, 0x80 orrs r0, r1 strb r0, [r2] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ca9 adds r1, r0 @@ -25255,7 +25255,7 @@ _08042DCA: beq _08042DDC ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC70 - bl CopyString + bl StringCopy _08042DDC: ldr r0, [r5] movs r1, 0x7 @@ -25264,7 +25264,7 @@ _08042DDC: beq _08042DEE ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC78 - bl CopyString + bl StringCopy _08042DEE: ldr r0, [r5] movs r1, 0x40 @@ -25273,7 +25273,7 @@ _08042DEE: beq _08042E00 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC80 - bl CopyString + bl StringCopy _08042E00: ldr r0, [r5] movs r1, 0x10 @@ -25282,7 +25282,7 @@ _08042E00: beq _08042E12 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC88 - bl CopyString + bl StringCopy _08042E12: ldr r0, [r5] movs r1, 0x20 @@ -25291,7 +25291,7 @@ _08042E12: beq _08042E24 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC90 - bl CopyString + bl StringCopy _08042E24: str r4, [r5] mov r1, r8 @@ -26526,7 +26526,7 @@ _08043A7C: _08043A96: ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC98 - bl CopyString + bl StringCopy movs r2, 0x2 mov r9, r2 b _08043B9C @@ -26568,7 +26568,7 @@ _08043AD4: str r0, [r2] ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC78 - bl CopyString + bl StringCopy movs r0, 0x1 mov r9, r0 b _08043B9C @@ -26588,7 +26588,7 @@ _08043B10: beq _08043B96 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC88 - bl CopyString + bl StringCopy movs r2, 0x1 mov r9, r2 b _08043B9C @@ -26609,7 +26609,7 @@ _08043B40: ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC90 _08043B5C: - bl CopyString + bl StringCopy movs r5, 0x1 mov r9, r5 b _08043B9C @@ -26630,7 +26630,7 @@ _08043B70: beq _08043B96 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BCA0 - bl CopyString + bl StringCopy movs r2, 0x3 mov r9, r2 _08043B96: @@ -29080,7 +29080,7 @@ _0804509A: beq _080450B2 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC70 - bl CopyString + bl StringCopy movs r0, 0x1 mov r10, r0 _080450B2: @@ -29099,7 +29099,7 @@ _080450B2: str r0, [r2] ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC78 - bl CopyString + bl StringCopy movs r2, 0x1 add r10, r2 _080450D8: @@ -29110,7 +29110,7 @@ _080450D8: beq _080450EE ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC80 - bl CopyString + bl StringCopy movs r3, 0x1 add r10, r3 _080450EE: @@ -29121,7 +29121,7 @@ _080450EE: beq _08045104 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC88 - bl CopyString + bl StringCopy movs r0, 0x1 add r10, r0 _08045104: @@ -29132,7 +29132,7 @@ _08045104: beq _0804511A ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC90 - bl CopyString + bl StringCopy movs r1, 0x1 add r10, r1 _0804511A: @@ -29144,7 +29144,7 @@ _0804511A: beq _08045132 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC98 - bl CopyString + bl StringCopy movs r3, 0x1 add r10, r3 _08045132: @@ -29200,7 +29200,7 @@ _080451A0: str r2, [r1] ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BCA0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_082DB794 bl b_call_bc_move_exec ldr r1, =gUnknown_02024332 @@ -29523,7 +29523,7 @@ _080454E0: str r1, [r2] ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BCA0 - bl CopyString + bl StringCopy bl b_movescr_stack_push_cursor ldr r1, =gUnknown_02024332 movs r0, 0 @@ -29563,7 +29563,7 @@ _08045548: beq _08045558 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC70 - bl CopyString + bl StringCopy _08045558: ldr r0, [r6] movs r2, 0x7 @@ -29579,7 +29579,7 @@ _08045558: str r0, [r2] ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC78 - bl CopyString + bl StringCopy _08045578: ldr r0, [r6] movs r1, 0x40 @@ -29588,7 +29588,7 @@ _08045578: beq _0804558A ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC80 - bl CopyString + bl StringCopy _0804558A: ldr r0, [r6] movs r1, 0x10 @@ -29597,7 +29597,7 @@ _0804558A: beq _0804559C ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC88 - bl CopyString + bl StringCopy _0804559C: ldr r0, [r6] movs r1, 0x20 @@ -29606,7 +29606,7 @@ _0804559C: beq _080455AE ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC90 - bl CopyString + bl StringCopy _080455AE: adds r5, r4 ldr r0, [r5] @@ -29616,7 +29616,7 @@ _080455AE: beq _080455C2 ldr r0, =gUnknown_02022F58 ldr r1, =gUnknown_0831BC98 - bl CopyString + bl StringCopy _080455C2: movs r4, 0 str r4, [r6] @@ -38460,7 +38460,7 @@ _0804A44C: lsrs r0, 16 cmp r0, 0xAF bne _0804A478 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003226 adds r0, r2 @@ -38572,7 +38572,7 @@ _0804A538: lsrs r0, 16 cmp r0, 0xAF bne _0804A57C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003226 adds r0, r1 @@ -46218,7 +46218,7 @@ sub_804E6D8: @ 804E6D8 bl sub_804E598 adds r4, r0 _0804E6FC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -47496,7 +47496,7 @@ sub_804F220: @ 804F220 ldrb r0, [r0, 0x10] muls r0, r5 adds r0, r4 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 adds r1, r5, 0 bl GetMonNickname str r5, [sp] @@ -47541,7 +47541,7 @@ sub_804F220: @ 804F220 mov r1, r8 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 subs r4, r5, r4 movs r2, 0x4 @@ -47549,7 +47549,7 @@ sub_804F220: @ 804F220 lsls r2, 16 lsrs r2, 16 movs r1, 0x77 - bl RepeatChar + bl StringFill adds r5, r0, 0 cmp r7, 0xFF beq _0804F320 @@ -51614,7 +51614,7 @@ atk91_givemoney: @ 80515C8 ldrb r0, [r0] adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -55008,7 +55008,7 @@ _08053304: adds r1, r6, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN strb r5, [r4] movs r0, 0x1 strb r0, [r4, 0x1] @@ -60919,7 +60919,7 @@ atkF0_catch_pokemon: @ 80566A8 bne _08056734 ldr r0, =gUnknown_02024332 strb r1, [r0, 0x5] - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00004036 bl VarGet lsls r0, 24 @@ -60927,7 +60927,7 @@ atkF0_catch_pokemon: @ 80566A8 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrb r0, [r5] eors r0, r6 lsls r0, 1 @@ -60935,13 +60935,13 @@ atkF0_catch_pokemon: @ 80566A8 ldrh r0, [r0] muls r0, r7 add r0, r8 - ldr r2, =gUnknown_02021DC4 + ldr r2, =gStringVar2 movs r1, 0x2 bl pokemon_getattr b _0805677E .pool _08056734: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00004036 bl VarGet lsls r0, 24 @@ -60949,7 +60949,7 @@ _08056734: bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrb r0, [r5] eors r0, r6 lsls r0, 1 @@ -60957,17 +60957,17 @@ _08056734: ldrh r0, [r0] muls r0, r7 add r0, r8 - ldr r2, =gUnknown_02021DC4 + ldr r2, =gStringVar2 movs r1, 0x2 bl pokemon_getattr - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 bl get_unknown_box_id lsls r0, 24 lsrs r0, 24 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_02024332 movs r0, 0x2 strb r0, [r1, 0x5] @@ -61927,7 +61927,7 @@ _08056F3E: bl VarGet lsls r0, 16 lsrs r0, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr lsls r1, r0, 2 adds r1, r0 lsls r1, 5 @@ -62579,7 +62579,7 @@ sub_8057588: @ 8057588 ands r0, r1 cmp r0, 0 beq _080575EC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x2 @@ -62885,7 +62885,7 @@ _08057866: ands r0, r1 cmp r0, 0 beq _0805789C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x2 @@ -63277,7 +63277,7 @@ sub_8057BFC: @ 8057BFC adds r7, r3, 0 cmp r0, 0 beq _08057C44 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x2 @@ -64725,7 +64725,7 @@ bx_802F7A0: @ 80588B4 ldr r0, =DummyObjectCallback cmp r1, r0 bne _08058908 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl nullsub_25 @@ -66762,7 +66762,7 @@ _08059AC4: ldr r0, =gMoveNames adds r1, r0 adds r0, r7, 0 - bl CopyString + bl StringCopy adds r1, r5, 0x3 lsls r1, 24 lsrs r1, 24 @@ -66791,7 +66791,7 @@ sub_8059B18: @ 8059B18 ldr r4, =gUnknown_02022E2C ldr r1, =gUnknown_085CCA6F adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0x7 bl battle_show_message_maybe @@ -66829,7 +66829,7 @@ sub_8059B3C: @ 8059B3C adds r0, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -66841,7 +66841,7 @@ sub_8059B3C: @ 8059B3C ldrb r1, [r4] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 movs r1, 0x9 bl battle_show_message_maybe @@ -66863,7 +66863,7 @@ sub_8059BB0: @ 8059BB0 ldr r6, =gUnknown_02022E2C ldr r1, =gUnknown_085CCA73 adds r0, r6, 0 - bl CopyString + bl StringCopy movs r1, 0xFC strb r1, [r0] adds r0, 0x1 @@ -66890,7 +66890,7 @@ sub_8059BB0: @ 8059BB0 subs r1, r2 ldr r2, =gTypeNames adds r1, r2 - bl CopyString + bl StringCopy adds r0, r6, 0 movs r1, 0xA bl battle_show_message_maybe @@ -67507,7 +67507,7 @@ _08059FE4: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -69747,7 +69747,7 @@ _0805B5A0: ldrb r4, [r1, 0x13] b _0805B5BA _0805B5B4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r4, [r0, 0x8] _0805B5BA: @@ -69832,7 +69832,7 @@ _0805B664: bne _0805B670 b _0805B794 _0805B670: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 @@ -70129,7 +70129,7 @@ _0805B90C: ldrb r4, [r1, 0x13] b _0805B926 _0805B920: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r4, [r0, 0x8] _0805B926: @@ -72170,7 +72170,7 @@ dp01t_2F_1_pokemon_enter: @ 805CA80 adds r4, r0, 0 lsls r4, 24 ldr r1, =gTrainerBackPicPaletteTable - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] lsls r0, 3 @@ -72788,7 +72788,7 @@ sub_805D094: @ 805D094 adds r0, r1 ldrb r0, [r0] strb r0, [r2] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldrb r0, [r5] lsls r0, 9 @@ -78618,7 +78618,7 @@ _08060180: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -85675,7 +85675,7 @@ _08063FB6: mov r0, r9 cmp r0, 0xAF bne _08063FE8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003214 adds r5, r0, r1 @@ -88029,7 +88029,7 @@ _080652D0: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -92354,7 +92354,7 @@ _08067A00: eors r1, r2 strb r1, [r0] _08067A08: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =gUnknown_02023064 ldr r4, =gUnknown_02024064 diff --git a/asm/rom_806BD04.s b/asm/rom_806BD04.s index b9c42a231..21e6f6c32 100644 --- a/asm/rom_806BD04.s +++ b/asm/rom_806BD04.s @@ -86,7 +86,7 @@ ExecuteTableBasedItemEffect: @ 806BD28 b _0806BDC4 .pool _0806BDA8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003226 adds r0, r2 @@ -209,7 +209,7 @@ _0806BE9A: b _0806BEF6 .pool _0806BECC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003214 adds r3, r0, r3 @@ -2212,10 +2212,10 @@ sub_806CF24: @ 806CF24 adds r0, r2 ldr r1, [r0] adds r0, r3, 0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022F68 ldr r1, =gUnknown_085CB38A - bl CopyString + bl StringCopy ldr r0, =gUnknown_085CB3AA bl get_battle_strings_ pop {r0} @@ -2250,7 +2250,7 @@ sub_806CF78: @ 806CF78 b _0806CFD8 .pool _0806CFB8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003214 adds r7, r0, r1 @@ -2399,7 +2399,7 @@ GetEvolutionTargetSpecies: @ 806D098 ldrh r0, [r0] cmp r0, 0xAF bne _0806D10C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003226 adds r0, r1 @@ -3282,7 +3282,7 @@ sub_806D778: @ 806D778 lsls r2, 16 lsrs r2, 16 mov r8, r2 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r9, r0 adds r0, r5, 0 movs r1, 0x2 @@ -3304,7 +3304,7 @@ sub_806D778: @ 806D778 ldr r4, =gSpeciesNames adds r0, r4 mov r1, r9 - bl CompareString + bl StringCompare cmp r0, 0 bne _0806D7D4 mov r2, r8 @@ -3554,7 +3554,7 @@ _0806D94A: b _0806D9A8 .pool _0806D98C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003226 adds r0, r1 @@ -3860,7 +3860,7 @@ _0806DBC8: b _0806DC1C .pool _0806DC00: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003226 adds r0, r2 @@ -5129,7 +5129,7 @@ _0806E604: ldr r1, =gTrainers + 0x4 @ name offset adds r0, r1 ldr r1, =gUnknown_085CCB98 - bl CompareString + bl StringCompare cmp r0, 0 beq _0806E63C b _0806E5F2 @@ -5491,7 +5491,7 @@ sub_806E8A8: @ 806E8A8 sub_806E8D4: @ 806E8D4 push {r4,r5,lr} adds r5, r1, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] ldrb r2, [r3, 0xA] ldrb r1, [r3, 0xB] @@ -5654,7 +5654,7 @@ _0806E9F6: movs r0, 0xFF strb r0, [r4, 0x4] ldr r0, =gUnknown_085CB2A1 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl get_battle_strings pop {r4,r5} pop {r0} @@ -5887,7 +5887,7 @@ sub_806EBF8: @ 806EBF8 b _0806EC64 .pool _0806EC28: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrh r1, [r2] adds r0, r4, 0 bl sub_8162E20 @@ -6423,7 +6423,7 @@ SetPokedexFlag: @ 806F01C lsrs r0, 16 cmp r0, 0xC9 bne _0806F05C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] str r7, [r0, 0x1C] _0806F05C: @@ -6434,7 +6434,7 @@ _0806F05C: lsls r1, 17 cmp r0, r1 bne _0806F072 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] str r7, [r0, 0x20] _0806F072: diff --git a/asm/rom_8072304.s b/asm/rom_8072304.s index a04cc995e..243a89e24 100644 --- a/asm/rom_8072304.s +++ b/asm/rom_8072304.s @@ -1101,7 +1101,7 @@ healthbar_draw_level: @ 8072B94 adds r0, 0x6 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r1, r0, 0 subs r1, 0x2 add r0, sp, 0x4 @@ -1203,7 +1203,7 @@ heathbar_draw_hp: @ 8072C38 add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r0, sp, 0x24 str r0, [sp] add r0, sp, 0x4 @@ -1224,7 +1224,7 @@ _08072CB8: add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r1, sp, 0x4 movs r0, 0xBA strb r0, [r1, 0x3] @@ -1316,7 +1316,7 @@ _08072D86: asrs r1, 16 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, =gUnknown_020244D4 ldr r0, [r0] movs r1, 0xBA @@ -1431,7 +1431,7 @@ _08072E5E: add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r0, sp, 0x28 str r0, [sp] add r0, sp, 0x4 @@ -1464,7 +1464,7 @@ _08072EDC: add r0, sp, 0x4 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r1, sp, 0x4 movs r0, 0xBA strb r0, [r1, 0x3] @@ -1529,12 +1529,12 @@ _08072F52: asrs r1, 16 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r3, r8 cmp r3, 0 bne _08072F82 ldr r1, =gUnknown_085E8D3E - bl CopyString + bl StringCopy _08072F82: ldr r0, =gUnknown_020244D4 ldr r0, [r0] @@ -1729,7 +1729,7 @@ sub_80730D4: @ 80730D4 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 movs r1, 0x9 mov r2, sp @@ -1864,14 +1864,14 @@ _08073236: adds r0, 0x6 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r5] adds r0, 0x7B ldrb r1, [r0] ldr r0, [sp, 0x1C] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r1, sp movs r0, 0 strb r0, [r1, 0x5] @@ -3762,16 +3762,16 @@ sub_80741E8: @ 80741E8 ldr r5, =gUnknown_02022E2C ldr r1, =gUnknown_085ED228 adds r0, r5, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0x2 add r2, sp, 0x4 bl pokemon_getattr add r0, sp, 0x4 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r5, 0 add r1, sp, 0x4 - bl AppendString + bl StringAppend adds r5, r0, 0 adds r0, r4, 0 bl pokemon_get_gender @@ -3793,7 +3793,7 @@ _08074236: ldr r0, =gSpeciesNames adds r1, r0 add r0, sp, 0x4 - bl CompareString + bl StringCompare cmp r0, 0 bne _0807424A movs r6, 0x64 @@ -3813,7 +3813,7 @@ _08074270: ldr r1, =gUnknown_085ED233 _08074272: adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022E2C add r1, sp, 0x10 str r1, [sp] @@ -4421,12 +4421,12 @@ sub_80747D8: @ 80747D8 lsrs r4, 24 ldr r1, =gUnknown_085CCB3C add r0, sp, 0x4 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A04C ldrb r1, [r1] movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0 add r1, sp, 0x4 movs r2, 0x2F diff --git a/asm/rom_809BEDC.s b/asm/rom_809BEDC.s index 559bfc00a..65280e6ce 100644 --- a/asm/rom_809BEDC.s +++ b/asm/rom_809BEDC.s @@ -2019,7 +2019,7 @@ _0809CF20: lsls r0, r3, 3 adds r0, r1 ldrb r0, [r0, 0x5] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] movs r1, 0x4 ldrsb r1, [r2, r1] @@ -2512,7 +2512,7 @@ sub_809D2BC: @ 809D2BC thumb_func_start sub_809D300 sub_809D300: @ 809D300 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00001270 adds r0, r1 @@ -2540,7 +2540,7 @@ sub_809D300: @ 809D300 thumb_func_start sub_809D344 sub_809D344: @ 809D344 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001270 adds r2, r0, r1 @@ -2570,7 +2570,7 @@ sub_809D344: @ 809D344 thumb_func_start sub_809D3A0 sub_809D3A0: @ 809D3A0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001394 adds r0, r1 @@ -2587,7 +2587,7 @@ sub_809D3C0: @ 809D3C0 push {lr} ldr r0, =0x00004046 bl GetVarPointer - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] movs r1, 0 strb r1, [r2, 0x1A] @@ -2604,7 +2604,7 @@ sub_809D3E8: @ 809D3E8 push {r4,r5,lr} ldr r0, =0x00004046 bl GetVarPointer - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] movs r5, 0 movs r1, 0xDA @@ -2629,7 +2629,7 @@ sub_809D3E8: @ 809D3E8 thumb_func_start sub_809D42C sub_809D42C: @ 809D42C push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x1A] cmp r0, 0xDA diff --git a/asm/rom_809D7BC.s b/asm/rom_809D7BC.s index 04f709937..bad71b8fa 100644 --- a/asm/rom_809D7BC.s +++ b/asm/rom_809D7BC.s @@ -1918,7 +1918,7 @@ sub_809E638: @ 809E638 mov r0, sp adds r1, r5, 0 bl PlayerGetDestCoords - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -2072,7 +2072,7 @@ sub_809E778: @ 809E778 ldr r0, =0x00000895 bl FlagSet bl GameFreakRTC_CalcLocalDateTime - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0xA0 ldr r3, =gUnknown_03005CF8 @@ -2167,7 +2167,7 @@ sub_809E858: @ 809E858 sub sp, 0x8 adds r5, r0, 0 mov r4, sp - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] adds r1, 0xA0 mov r0, sp diff --git a/asm/rom_80AEFFC.s b/asm/rom_80AEFFC.s index 97289eab7..66a69ff99 100644 --- a/asm/rom_80AEFFC.s +++ b/asm/rom_80AEFFC.s @@ -2130,7 +2130,7 @@ _080B0116: door_upload_tiles: @ 80B0124 push {r4,lr} ldr r4, =gUnknown_02038C28 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e68 adds r0, r1 diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index e77d4e7f9..8c72e15cf 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -202,7 +202,7 @@ sub_80C70FC: @ 80C70FC adds r5, r0, 0 lsls r4, r2, 16 lsrs r4, 16 - bl CopyString + bl StringCopy adds r1, r0, 0 adds r5, r4 cmp r1, r5 @@ -1021,12 +1021,12 @@ _080C779E: lsrs r0, 24 bl sav3_get_box_name ldr r1, =gUnknown_085EBCC1 - bl CopyString + bl StringCopy adds r4, r5, 0x1 adds r1, r4, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r4, 16 lsrs r5, r4, 16 cmp r5, 0xD @@ -1615,10 +1615,10 @@ sub_80C7BE4: @ 80C7BE4 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_08571737 add r0, sp, 0xC - bl AppendString + bl StringAppend movs r0, 0x1 add r1, sp, 0xC movs r2, 0x40 @@ -7015,7 +7015,7 @@ _080CACF4: ldr r2, =0x00000d65 adds r1, r2 _080CAD00: - bl CopyString + bl StringCopy adds r2, r0, 0 b _080CAD16 .pool @@ -10836,7 +10836,7 @@ sub_80CCB50: @ 80CCB50 adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl CopyStringPadded + bl StringCopyPadded mov r4, r10 ldr r1, [r4] adds r5, r1, r5 @@ -11002,7 +11002,7 @@ _080CCDB0: adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl CopyStringPadded + bl StringCopyPadded mov r7, r8 ldr r1, [r7] adds r5, r1, r5 @@ -13486,7 +13486,7 @@ _080CE274: adds r0, r1, r2 ldr r2, =0x00000cee adds r1, r2 - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -13585,7 +13585,7 @@ _080CE358: ldrsb r1, [r4, r1] cmp r1, 0x22 beq _080CE378 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x4 ldrsb r0, [r2, r0] @@ -14632,7 +14632,7 @@ _080CEC86: bl pokemon_getattr ldr r0, [r4] adds r0, r5 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r6, 0 movs r1, 0x38 bl pokemon_getattr @@ -14732,7 +14732,7 @@ _080CED7E: bl pokemon_getattr_encrypted ldr r0, [r5] adds r0, r4 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r7, 0 bl sub_80690C0 ldr r1, [r5] @@ -14802,25 +14802,25 @@ _080CEE34: adds r0, r3 movs r1, 0 movs r2, 0x5 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r1, =0x00000cf9 adds r0, r1 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r2, =0x00000d1d adds r0, r2 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r3, =0x00000d41 adds r0, r3 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r1, =0x00000d65 adds r0, r1 @@ -14841,7 +14841,7 @@ _080CEE94: adds r1, r3 movs r2, 0 movs r3, 0x5 - bl CopyStringPadded + bl StringCopyPadded b _080CEECE .pool _080CEEC0: @@ -14850,7 +14850,7 @@ _080CEEC0: ldr r1, =gUnknown_085E8264 movs r2, 0 movs r3, 0x8 - bl CopyStringPadded + bl StringCopyPadded _080CEECE: ldr r4, =gUnknown_02039D08 ldr r0, [r4] @@ -14858,20 +14858,20 @@ _080CEECE: adds r0, r3 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r1, =0x00000d41 adds r0, r1 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill ldr r0, [r4] ldr r2, =0x00000d65 adds r0, r2 _080CEEF2: movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill b _080CF0B8 .pool _080CEF14: @@ -14891,7 +14891,7 @@ _080CEF20: adds r1, r3 movs r2, 0 movs r3, 0x5 - bl CopyStringPadded + bl StringCopyPadded ldr r1, [r4] ldr r0, =0x00000d1d adds r2, r1, r0 @@ -14910,7 +14910,7 @@ _080CEF20: adds r0, r2, 0 movs r2, 0 movs r3, 0x5 - bl CopyStringPadded + bl StringCopyPadded ldr r4, [r4] ldr r3, =0x00000d41 adds r2, r4, r3 @@ -15013,7 +15013,7 @@ _080CF020: adds r0, r2, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r2, r0, 0 strb r5, [r2] movs r0, 0xFF @@ -15031,7 +15031,7 @@ _080CF020: adds r0, r4, 0 movs r2, 0 movs r3, 0x8 - bl CopyStringPadded + bl StringCopyPadded b _080CF0B8 .pool _080CF0AC: @@ -15039,7 +15039,7 @@ _080CF0AC: adds r0, r4, r1 movs r1, 0 movs r2, 0x8 - bl RepeatChar + bl StringFill _080CF0B8: pop {r3-r5} mov r8, r3 @@ -15312,7 +15312,7 @@ _080CF2E4: b _080CF366 .pool _080CF2F8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -15622,7 +15622,7 @@ _080CF588: movs r0, 0x18 b _080CF5BC _080CF58C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -15963,7 +15963,7 @@ _080CF834: ands r0, r2 cmp r0, 0 bne _080CF86E - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x13] cmp r0, 0x1 @@ -16833,7 +16833,7 @@ sub_80CFF34: @ 80CFF34 ldr r0, [r0] str r0, [r1] str r3, [r1, 0x4] - bl GetStringLength + bl StringLength lsls r0, 24 lsrs r1, r0, 24 ldr r0, [r4] @@ -21546,7 +21546,7 @@ _080D241E: thumb_func_start sub_80D242C sub_80D242C: @ 80D242C - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] ldr r1, =0x00003d84 adds r0, r1 @@ -21579,7 +21579,7 @@ sub_80D242C: @ 80D242C thumb_func_start sub_80D2480 sub_80D2480: @ 80D2480 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x00003d86 adds r1, r2 @@ -21590,7 +21590,7 @@ sub_80D2480: @ 80D2480 thumb_func_start sub_80D2494 sub_80D2494: @ 80D2494 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d86 adds r0, r1 @@ -21601,7 +21601,7 @@ sub_80D2494: @ 80D2494 thumb_func_start sub_80D24A8 sub_80D24A8: @ 80D24A8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d85 adds r0, r1 @@ -21617,7 +21617,7 @@ sub_80D24BC: @ 80D24BC lsrs r1, r0, 24 cmp r1, 0xF bhi _080D24D0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003d85 adds r0, r2 @@ -21630,7 +21630,7 @@ _080D24D0: thumb_func_start sub_80D24DC sub_80D24DC: @ 80D24DC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d84 adds r0, r1 @@ -21646,7 +21646,7 @@ sub_80D24F0: @ 80D24F0 lsrs r1, r0, 24 cmp r1, 0x1D bhi _080D2504 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003d84 adds r0, r2 @@ -21659,7 +21659,7 @@ _080D2504: thumb_func_start sub_80D2510 sub_80D2510: @ 80D2510 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d70 adds r0, r1 @@ -21670,7 +21670,7 @@ sub_80D2510: @ 80D2510 thumb_func_start sub_80D2524 sub_80D2524: @ 80D2524 push {r4,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r2, [r2] ldr r4, =0x00003d70 adds r3, r2, r4 @@ -21686,7 +21686,7 @@ sub_80D2524: @ 80D2524 thumb_func_start sub_80D2548 sub_80D2548: @ 80D2548 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d74 adds r0, r1 @@ -21698,11 +21698,11 @@ sub_80D2548: @ 80D2548 sub_80D255C: @ 80D255C push {lr} adds r1, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003d74 adds r0, r2 - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -21712,7 +21712,7 @@ sub_80D255C: @ 80D255C sub_80D2578: @ 80D2578 push {lr} movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003d74 adds r0, r2 @@ -25546,7 +25546,7 @@ sub_80D4354: @ 80D4354 sub_80D436C: @ 80D436C push {r4,r5,lr} movs r4, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr _080D4372: lsls r1, r4, 3 adds r1, r4 @@ -25662,7 +25662,7 @@ sub_80D4420: @ 80D4420 strb r1, [r0, 0x1] add r3, sp, 0x4 strb r2, [r3] - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr mov r10, r4 mov r9, r3 adds r4, r3, 0 @@ -25683,9 +25683,9 @@ _080D444C: b _080D45A8 _080D4468: movs r4, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r12, r2 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr add r5, sp, 0x4 ldr r3, =0x0000ffff adds r6, r3, 0 @@ -25709,7 +25709,7 @@ _080D4476: cmp r4, 0x8 bls _080D4476 movs r4, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr add r3, sp, 0x4 _080D44A0: ldr r2, [r5] @@ -25756,9 +25756,9 @@ _080D44A0: movs r1, 0 bl sub_81DB4DC movs r4, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr add r3, sp, 0x4 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr _080D4500: ldr r2, [r6] ldrb r1, [r3] @@ -25900,7 +25900,7 @@ sub_80D460C: @ 80D460C ldrb r2, [r4] cmp r2, 0xFF beq _080D4670 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r2, 3 adds r0, r2 @@ -25960,7 +25960,7 @@ sub_80D4680: @ 80D4680 bl pokemon_getattr add r2, sp, 0x4 strb r0, [r2] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldrb r1, [r2] lsls r0, r1, 3 @@ -25997,7 +25997,7 @@ _080D46D2: sub_80D46E0: @ 80D46E0 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsls r1, r0, 3 adds r1, r0 @@ -26029,7 +26029,7 @@ sub_80D4700: @ 80D4700 strb r0, [r1] movs r7, 0x6 mov r9, r1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r3, =0x00002be0 _080D4724: @@ -26375,7 +26375,7 @@ _080D49DC: mov r4, sp adds r4, 0xF ldr r1, =gUnknown_0857F544 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000cb2 adds r0, r2 @@ -26385,7 +26385,7 @@ _080D49DC: ldr r1, [r0] _080D49F2: adds r0, r4, 0 - bl CopyString + bl StringCopy b _080D4A18 .pool _080D4A08: diff --git a/asm/rom_8158B30.s b/asm/rom_8158B30.s index d9d675726..38b3653bc 100644 --- a/asm/rom_8158B30.s +++ b/asm/rom_8158B30.s @@ -1561,7 +1561,7 @@ sub_81597F4: @ 81597F4 thumb_func_start sub_8159800 sub_8159800: @ 8159800 push {r4-r6,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldrb r0, [r0, 0x8] ldr r5, =gUnknown_02024064 @@ -15307,9 +15307,9 @@ sub_816082C: @ 816082C sub_816084C: @ 816084C push {r4,lr} adds r1, r0, 0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 bl sub_81D2BF4 pop {r4} @@ -15611,14 +15611,14 @@ _08160B1E: b _08160E88 .pool _08160B2C: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 bl sub_8161054 movs r1, 0xD muls r1, r0 ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_085EF960 bl sub_816084C ldr r0, =gUnknown_0203BC34 @@ -15871,7 +15871,7 @@ _08160D6C: bl pokemon_getattr lsls r0, 16 lsrs r0, 16 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 movs r1, 0xD mov r8, r1 mov r1, r8 @@ -15879,7 +15879,7 @@ _08160D6C: ldr r6, =gMoveNames adds r1, r6 adds r0, r2, 0 - bl CopyString + bl StringCopy ldr r1, [r7] adds r0, r1, 0 adds r0, 0x44 @@ -15903,13 +15903,13 @@ _08160D6C: ldrb r2, [r0] adds r0, r4, 0 bl sub_80691F4 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 bl sub_8161054 mov r1, r8 muls r1, r0 adds r1, r6 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r0, =gUnknown_085EF979 bl sub_816084C ldr r1, [r7] @@ -16036,10 +16036,10 @@ _08160EF0: ble _08160EF0 cmp r5, 0 bne _08160F38 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF8C2 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x3 movs r1, 0x11 bl FillWindowPixelBuffer @@ -16132,10 +16132,10 @@ _08160FE4: ldr r1, [r6] movs r0, 0xC strb r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF9E6 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 bl sub_81D2BF4 b _0816103E @@ -16147,16 +16147,16 @@ _08161010: ldr r1, [r6] movs r0, 0x8 strb r0, [r1] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xD muls r1, r5 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF8DA adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 bl sub_81D2BF4 _0816103E: @@ -16190,10 +16190,10 @@ sub_8161074: @ 8161074 lsrs r5, r0, 24 cmp r5, 0 bne _081610A6 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF8C2 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x3 movs r1, 0x11 bl FillWindowPixelBuffer @@ -16502,9 +16502,9 @@ _081612F6: movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 ldr r2, [r4] movs r5, 0x88 lsls r5, 1 @@ -16947,12 +16947,12 @@ sub_81616C0: @ 81616C0 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -17070,7 +17070,7 @@ sub_81617F4: @ 81617F4 push {r4,lr} ldr r0, =gUnknown_0203BC40 mov r12, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00002734 adds r0, r1, r2 @@ -17517,7 +17517,7 @@ _08161B16: thumb_func_start sub_8161B34 sub_8161B34: @ 8161B34 push {r4,r5,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x000031dc adds r0, r4 @@ -17571,7 +17571,7 @@ sub_8161B94: @ 8161B94 lsls r0, 16 cmp r0, 0 bne _08161BBC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x000031dc adds r1, r2 @@ -17579,7 +17579,7 @@ sub_8161B94: @ 8161B94 b _08161BC8 .pool _08161BBC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x000031dc adds r1, r2 @@ -17713,7 +17713,7 @@ mapnumbers_history_shift_sav1_0_2_4_out: @ 8161CD8 strb r1, [r0, 0x2] ldrb r1, [r0, 0x1] strb r1, [r0, 0x3] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x4] strb r1, [r0] @@ -17727,7 +17727,7 @@ mapnumbers_history_shift_sav1_0_2_4_out: @ 8161CD8 sub_8161D00: @ 8161D00 push {r4,r5,lr} movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000031dc adds r0, r2 @@ -17776,7 +17776,7 @@ sub_8161D54: @ 8161D54 bl sub_8161D00 b _08161DE2 _08161D6E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031dc adds r0, r1 @@ -17839,7 +17839,7 @@ sub_8161DE8: @ 8161DE8 lsrs r2, r0, 24 lsls r1, 24 lsrs r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x000031dc adds r0, r3 @@ -17869,7 +17869,7 @@ sub_8161E28: @ 8161E28 sub sp, 0x4 ldr r5, =gUnknown_02024744 bl zero_enemy_party_data - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x000031dc adds r0, r1 @@ -17932,7 +17932,7 @@ sub_8161E28: @ 8161E28 thumb_func_start sub_8161EDC sub_8161EDC: @ 8161EDC push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldrb r0, [r1, 0x4] ldrb r1, [r1, 0x5] @@ -17965,7 +17965,7 @@ sub_8161F18: @ 8161F18 adds r6, r0, 0 movs r1, 0x39 bl pokemon_getattr - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r1, [r5] ldr r4, =0x000031dc adds r1, r4 @@ -17985,7 +17985,7 @@ sub_8161F18: @ 8161F18 thumb_func_start sub_8161F4C sub_8161F4C: @ 8161F4C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031dc adds r0, r1 @@ -18024,7 +18024,7 @@ sub_8161F74: @ 8161F74 thumb_func_start sub_8161F94 sub_8161F94: @ 8161F94 push {r4-r7,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -18084,7 +18084,7 @@ sub_8161F94: @ 8161F94 strh r7, [r1] _0816200E: bl sub_8164ED8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -18105,7 +18105,7 @@ _0816200E: thumb_func_start sub_8162054 sub_8162054: @ 8162054 push {r4-r6,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r4, =0x00000ca9 adds r0, r4 @@ -18175,7 +18175,7 @@ _081620E8: thumb_func_start sub_81620F4 sub_81620F4: @ 81620F4 push {r4-r7,lr} - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r7, =0x00000ca9 adds r0, r7 @@ -18271,13 +18271,13 @@ sub_81621C0: @ 81621C0 lsls r0, 1 cmp r1, r0 bne _081621DA - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bec adds r0, r1 bl sub_816534C _081621DA: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000d04 adds r2, r0, r1 @@ -18316,7 +18316,7 @@ sub_816222C: @ 816222C sub sp, 0x3C movs r0, 0 str r0, [sp, 0x24] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -18352,7 +18352,7 @@ _0816227A: movs r4, 0xE7 lsls r4, 3 adds r0, r4 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] movs r2, 0 mov r8, r2 @@ -18376,7 +18376,7 @@ _08162298: adds r2, r7, 0 muls r2, r0 _081622B2: - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] movs r0, 0x2C muls r0, r5 @@ -18410,7 +18410,7 @@ _081622E4: ldrb r0, [r0] cmp r6, r0 blt _0816233E - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r2, [r3] movs r4, 0xEC adds r3, r7, 0 @@ -18455,7 +18455,7 @@ _0816233E: bne _08162396 bl sub_8165B20 movs r7, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r4, =gUnknown_085DF9EC adds r2, r0, 0 @@ -18527,7 +18527,7 @@ _081623DA: thumb_func_start sub_81623F0 sub_81623F0: @ 81623F0 push {r4-r7,lr} - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000ca9 adds r0, r1 @@ -18622,7 +18622,7 @@ _081624BA: ldrh r0, [r0] cmp r0, r3 beq _081624FC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] subs r2, 0x2 adds r0, r1, r2 @@ -18649,7 +18649,7 @@ _081624FC: ldrh r0, [r4] movs r1, 0 bl sub_8162614 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000cb2 adds r0, r1, r2 @@ -18790,7 +18790,7 @@ sub_8162614: @ 8162614 lsls r0, 1 cmp r4, r0 bne _08162640 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bed adds r0, r1 @@ -18818,7 +18818,7 @@ _0816266C: ldr r0, =0x0000018f cmp r4, r0 bhi _08162698 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -18831,7 +18831,7 @@ _0816266C: .pool _08162698: ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r6, r0 @@ -18968,7 +18968,7 @@ sub_81627A4: @ 81627A4 lsls r0, 1 cmp r4, r0 bne _081627CC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bed adds r0, r1 @@ -18989,7 +18989,7 @@ _081627E8: ldr r0, =0x0000018f cmp r4, r0 bhi _08162814 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -19002,7 +19002,7 @@ _081627E8: .pool _08162814: ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r5, r0 @@ -19083,7 +19083,7 @@ sub_81628A0: @ 81628A0 mov r8, r1 mov r10, r0 movs r5, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] mov r4, r10 ldrb r4, [r4, 0xC] @@ -19109,7 +19109,7 @@ _081628DE: adds r3, 0x1 cmp r3, 0x3 bgt _081628FA - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] adds r1, r3, r4 ldr r7, =0x00000744 @@ -19124,7 +19124,7 @@ _081628FA: cmp r3, 0x4 bne _08162944 movs r6, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r3, =0x0000073c adds r0, r3 @@ -19148,7 +19148,7 @@ _08162930: adds r6, 0x1 cmp r6, 0x6 bgt _08162944 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] adds r0, r3 adds r0, r2 @@ -19170,7 +19170,7 @@ _08162944: _0816295A: cmp r5, 0x4 bgt _08162974 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] movs r1, 0xEC muls r1, r5 @@ -19182,7 +19182,7 @@ _0816295A: .pool _08162974: movs r5, 0 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] ldr r1, =0x0000073a adds r0, r1 @@ -19206,7 +19206,7 @@ _0816298A: _0816299E: cmp r5, 0x4 bgt _081629C4 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] movs r1, 0xEC muls r1, r5 @@ -19222,7 +19222,7 @@ _081629B2: .pool _081629C4: mov r2, sp - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r3, =0x0000073a adds r0, r3 @@ -19242,7 +19242,7 @@ _081629E4: adds r7, r5, 0x1 cmp r3, r8 bge _08162A2E - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] movs r2, 0xEC adds r1, r5, 0 @@ -19280,7 +19280,7 @@ _08162A2E: lsls r2, r1, 1 mov r4, sp adds r3, r4, r2 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] movs r4, 0xEC adds r1, r5, 0 @@ -19303,7 +19303,7 @@ _08162A54: mov r1, r8 bl __modsi3 adds r5, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r5, 1 add r1, sp @@ -19342,7 +19342,7 @@ sub_8162AA0: @ 8162AA0 cmp r4, r0 bne _08162AD0 ldr r1, =gTrainerPicIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000bed adds r0, r2 @@ -19393,7 +19393,7 @@ _08162B08: .pool _08162B38: ldr r3, =gTrainerPicIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -19416,7 +19416,7 @@ _08162B64: bne _08162BB0 ldr r4, =gTrainerPicIndices ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r5, r0 @@ -19469,7 +19469,7 @@ sub_8162BD8: @ 8162BD8 cmp r4, r0 bne _08162C08 ldr r1, =gTrainerClassNameIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000bed adds r0, r2 @@ -19532,7 +19532,7 @@ _08162C60: .pool _08162C90: ldr r3, =gTrainerClassNameIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -19571,7 +19571,7 @@ _08162CBC: _08162CF4: ldr r4, =gTrainerClassNameIndices ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r5, r0 @@ -19608,7 +19608,7 @@ sub_8162D34: @ 8162D34 lsls r0, 1 cmp r4, r0 bne _08162D5C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bed adds r0, r1 @@ -19642,7 +19642,7 @@ _08162D78: b _08162E0C .pool _08162DA0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -19672,7 +19672,7 @@ _08162DC0: .pool _08162DE8: ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r5, r0 @@ -19710,7 +19710,7 @@ sub_8162E20: @ 8162E20 lsls r0, 1 cmp r5, r0 bne _08162E54 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xBF lsls r1, 4 @@ -19784,7 +19784,7 @@ _08162EB4: b _08162F62 .pool _08162ED8: - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr movs r0, 0xEC adds r1, r5, 0 muls r1, r0 @@ -19816,7 +19816,7 @@ _08162F00: b _08162F3E .pool _08162F24: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr lsls r0, r5, 4 adds r0, r5 lsls r0, 2 @@ -19860,7 +19860,7 @@ sub_8162F68: @ 8162F68 lsls r0, 1 cmp r4, r0 bne _08162F90 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bed adds r0, r1 @@ -19890,7 +19890,7 @@ _08162FC0: ldr r0, =0x0000018f cmp r4, r0 bhi _08162FEC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r4, r1 @@ -19903,7 +19903,7 @@ _08162FC0: .pool _08162FEC: ldr r3, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r5, r0 @@ -20069,7 +20069,7 @@ _08163138: blt _0816314A b _08163426 _0816314A: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _0816314C: movs r0, 0x64 muls r0, r7 @@ -20121,7 +20121,7 @@ _081631A4: ldr r5, =0xfffef2a8 adds r4, r0, r5 _081631B6: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] movs r0, 0x2C adds r2, r6, 0 @@ -20166,7 +20166,7 @@ _08163218: blt _08163222 b _08163426 _08163222: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr lsls r0, r5, 4 adds r0, r5 lsls r0, 2 @@ -20448,7 +20448,7 @@ sub_8163444: @ 8163444 movs r1, 0xFF add r0, sp, 0x4 strb r1, [r0] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] movs r0, 0xDC adds r0, r2 @@ -20605,7 +20605,7 @@ _08163580: sub_8163590: @ 8163590 push {lr} bl zero_enemy_party_data - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -20648,7 +20648,7 @@ sub_81635D4: @ 81635D4 ldr r0, =0x0000012b cmp r2, r0 bhi _0816364A - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, =0x000040ce bl VarGet lsls r0, 24 @@ -20693,7 +20693,7 @@ _0816364A: blt _0816365C b _08163776 _0816365C: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _0816365E: movs r0, 0x64 muls r0, r7 @@ -20733,7 +20733,7 @@ _081636A6: lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x14] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r2, [r1, 0xA] ldrb r0, [r1, 0xB] @@ -20852,7 +20852,7 @@ sub_816379C: @ 816379C lsls r1, 24 lsrs r1, 24 str r1, [sp, 0x10] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r0, [r1, 0xA] mov r9, r0 @@ -20974,7 +20974,7 @@ _08163846: ConvertBattleFrontierTrainerSpeechToString: @ 81638AC push {r4,r5,lr} adds r5, r0, 0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x3 @@ -21004,7 +21004,7 @@ _081638E4: cmp r0, 0xFE bne _081638E4 _081638EE: - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 adds r0, r1, r2 ldrb r0, [r0] adds r3, r2, 0 @@ -21046,7 +21046,7 @@ _08163932: lsls r0, 1 cmp r3, r0 bne _08163950 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bfc b _08163986 @@ -21069,7 +21069,7 @@ _08163974: ldr r0, =0x0000018f cmp r3, r0 bhi _0816399C - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr movs r0, 0xEC muls r0, r3 ldr r1, [r1] @@ -21121,7 +21121,7 @@ _081639D0: .4byte _081639FC .4byte _081639FC _081639FC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ebc adds r1, r0, r2 @@ -21145,7 +21145,7 @@ _08163A2C: .pool _08163A38: movs r5, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _08163A3C: movs r0, 0x64 adds r4, r5, 0 @@ -21277,7 +21277,7 @@ _08163B64: movs r0, 0x2 bl sub_816306C ldr r1, =gUnknown_02038BCE - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000cd6 adds r0, r2 @@ -21309,7 +21309,7 @@ _08163BA6: .pool _08163BC0: movs r5, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _08163BC4: movs r0, 0x64 adds r4, r5, 0 @@ -21342,7 +21342,7 @@ _08163BC4: _08163C10: bl zero_enemy_party_data movs r5, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _08163C18: movs r0, 0x64 muls r0, r5 @@ -21418,7 +21418,7 @@ _08163CC4: orrs r0, r1 str r0, [r4] _08163CDE: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ca9 adds r0, r2 @@ -21447,7 +21447,7 @@ _08163D28: ldr r1, =gUnknown_02022FEC ldr r0, =0x00040008 str r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -21574,7 +21574,7 @@ _08163E68: thumb_func_start sub_8163E90 sub_8163E90: @ 8163E90 push {r4-r6,lr} - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000ca9 adds r0, r1 @@ -21616,7 +21616,7 @@ sub_8163EE4: @ 8163EE4 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x0000064c adds r5, r0, r1 @@ -21665,13 +21665,13 @@ _08163F52: strb r0, [r5, 0x1] adds r0, r5, 0 adds r0, 0xC - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] adds r1, 0xA bl sub_80842F4 adds r0, r5, 0x4 ldr r1, [r4] - bl CopyString_Limit7 + bl StringCopy7 adds r0, r6, 0 adds r1, r7, 0 bl sub_8164FCC @@ -21692,7 +21692,7 @@ _08163F96: lsls r2, r4, 1 mov r1, r12 adds r3, r1, r2 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r7, =0x00002bbc adds r0, r1, r7 @@ -21717,7 +21717,7 @@ _08163F96: ble _08163F96 movs r4, 0 _08163FCC: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] lsls r1, r4, 1 ldr r2, =0x00000caa @@ -21761,7 +21761,7 @@ _08163FF4: thumb_func_start sub_8164040 sub_8164040: @ 8164040 push {r4,r5,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000ca9 adds r0, r1 @@ -21798,7 +21798,7 @@ sub_8164040: @ 8164040 _0816408A: bl sub_8163EE4 _0816408E: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -21856,7 +21856,7 @@ sub_81640E0: @ 81640E0 lsrs r4, r0, 16 movs r6, 0 movs r2, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r5, r0 @@ -21922,7 +21922,7 @@ sub_8164188: @ 8164188 adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000ca9 adds r0, r1 @@ -22048,13 +22048,13 @@ sub_81642A0: @ 81642A0 mov r5, r8 push {r5-r7} sub sp, 0x4C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 adds r1, r0, r1 str r1, [sp, 0x24] - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r2, =0x00000ca9 adds r0, r2 @@ -22159,7 +22159,7 @@ _08164368: ldr r0, [sp, 0x24] str r0, [sp, 0x40] _0816438C: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] mov r2, r9 lsls r1, r2, 1 @@ -22194,7 +22194,7 @@ _081643C0: ands r0, r7 cmp r0, 0 beq _081643F4 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r4, =0x00000cb4 adds r0, r4 @@ -22215,7 +22215,7 @@ _081643F4: movs r5, 0x8 cmp r5, r10 bge _08164430 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r1, =gUnknown_0203BC8C ldr r3, [r1] @@ -22246,7 +22246,7 @@ _0816440E: _08164430: cmp r5, r10 bne _081643C0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000cb4 adds r0, r2 @@ -22271,7 +22271,7 @@ _08164430: bl sub_8165B20 movs r4, 0 mov r9, r4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r2, 0 adds r6, r0, 0 @@ -22302,7 +22302,7 @@ _08164474: cmp r0, r3 bne _081644E0 movs r5, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xE0 adds r1, r2, r0 @@ -22345,7 +22345,7 @@ _081644E0: cmp r4, 0 beq _08164532 bl GenerateRandomNumber - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r4, [r6] lsls r0, 16 lsrs r0, 16 @@ -22377,7 +22377,7 @@ _08164532: mov r1, sp str r1, [sp, 0x3C] _0816453C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr movs r2, 0xEC mov r1, r9 muls r1, r2 @@ -22399,7 +22399,7 @@ _0816455A: adds r7, 0x1 cmp r7, 0x39 bls _0816455A - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r5, [r0] movs r1, 0xEC mov r6, r9 @@ -22436,7 +22436,7 @@ _0816455A: bne _08164656 movs r5, 0 movs r7, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r8, r2 ldr r3, =0x0000076c _081645B8: @@ -22508,7 +22508,7 @@ _08164660: cmp r1, 0 beq _081646A0 bl GenerateRandomNumber - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r4, [r6] lsls r0, 16 lsrs r0, 16 @@ -22579,7 +22579,7 @@ _081646FC: ldr r0, =0x0000018f cmp r5, r0 bhi _08164750 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =gUnknown_03006298 ldr r0, =gUnknown_020375E2 @@ -22608,7 +22608,7 @@ _081646FC: b _081647CE .pool _08164750: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r3, [r4] ldr r1, =gUnknown_03006298 ldr r0, =gUnknown_020375E2 @@ -22635,7 +22635,7 @@ _08164750: ldrh r3, [r3] mov r10, r3 movs r3, 0 - ldr r7, =gUnknown_02021EC4 + ldr r7, =gStringVar3 mov r8, r7 adds r0, r4, 0 mov r12, r0 @@ -22658,7 +22658,7 @@ _08164794: adds r1, r3, r7 movs r0, 0xFF strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =0xfffffe70 adds r1, r5, r0 @@ -22670,24 +22670,24 @@ _08164794: adds r0, r2, r1 ldrb r1, [r0] adds r0, r7, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _081647CE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xD mov r2, r9 muls r2, r1 adds r1, r2, 0 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 movs r1, 0xB mov r2, r10 muls r2, r1 adds r1, r2, 0 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy pop {r3-r5} mov r8, r3 mov r9, r4 @@ -22718,7 +22718,7 @@ sub_8164828: @ 8164828 ldr r0, =gUnknown_020375F2 ldrh r0, [r0] subs r5, r0, 0x2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r5, 1 ldr r2, =0x00000cb4 @@ -22781,7 +22781,7 @@ _081648D6: cmp r7, r0 bgt _081648F4 _081648E2: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r7, 0 bl sub_8162E20 b _08164AC2 @@ -22790,9 +22790,9 @@ _081648F4: movs r3, 0 lsls r2, r7, 16 mov r10, r2 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 mov r9, r6 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr mov r8, r4 ldr r5, =0xfffffe70 adds r1, r7, r5 @@ -22817,7 +22817,7 @@ _08164910: adds r1, r3, r6 movs r0, 0xFF strb r0, [r1] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] ldr r3, =0xfffffe70 adds r0, r7, r3 @@ -22829,24 +22829,24 @@ _08164910: adds r0, r1, r5 ldrb r1, [r0] adds r0, r6, 0 - bl StopMusicWhileStringIsPrinted - ldr r0, =gUnknown_02021DC4 - ldr r2, =gUnknown_03005D90 + bl ConvertInternationalString + ldr r0, =gStringVar2 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] adds r1, r4 adds r1, 0xDE ldrb r1, [r1] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar3 mov r3, r10 lsrs r1, r3, 16 bl sub_8162E20 b _08164AC2 .pool _08164984: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r5, 2 adds r1, r0 @@ -22855,7 +22855,7 @@ _08164984: b _081649A8 .pool _0816499C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r5, 2 adds r1, r0 @@ -22873,7 +22873,7 @@ _081649BC: ldr r0, =0x0000012b cmp r7, r0 bgt _08164A08 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] lsls r1, r5, 1 adds r0, r1, 0 @@ -22899,7 +22899,7 @@ _08164A08: ldr r0, =0x0000018f cmp r7, r0 bgt _08164A30 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r3, =gUnknown_03006298 ldrh r2, [r3, 0x4] @@ -22910,7 +22910,7 @@ _08164A08: b _08164A40 .pool _08164A30: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r3, =gUnknown_03006298 ldrh r2, [r3] @@ -22952,7 +22952,7 @@ _08164A60: movs r2, 0 cmp r2, r5 bge _08164AA2 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r4, =0x00000cb4 adds r0, r4 @@ -22974,7 +22974,7 @@ _08164A8E: _08164AA2: cmp r2, r5 bne _08164A60 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000cb4 adds r0, r1 @@ -22983,7 +22983,7 @@ _08164AA2: mov r5, r9 cmp r5, 0xD ble _08164A4E - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r3, =0x00000cd6 adds r0, r3 @@ -23021,7 +23021,7 @@ _08164B04: b _08164B54 .pool _08164B28: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r7, r0 @@ -23061,7 +23061,7 @@ sub_8164B74: @ 8164B74 mov r6, r8 push {r6,r7} sub sp, 0x4 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -23103,7 +23103,7 @@ _08164BEC: beq _08164BF2 b _08164DB0 _08164BF2: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r7, 1 adds r0, r1 @@ -23152,7 +23152,7 @@ _08164C4A: _08164C60: str r0, [sp] movs r4, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r9, r0 _08164C68: adds r1, r4, 0x1 @@ -23179,7 +23179,7 @@ _08164C74: ldrh r0, [r0] cmp r0, r3 beq _08164CB0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr adds r5, r1, 0 _08164C9C: adds r2, 0x1 @@ -23217,7 +23217,7 @@ _08164CE0: bl bitmask_all_link_players_but_self lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb4 adds r1, r3 @@ -23234,7 +23234,7 @@ _08164D14: cmp r1, 0x3 bne _08164DB6 bl sub_800A5B4 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r5, =0x00000cb4 adds r0, r5 @@ -23317,7 +23317,7 @@ _08164DDA: thumb_func_start sub_8164DE4 sub_8164DE4: @ 8164DE4 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cd6 adds r0, r1 @@ -23343,13 +23343,13 @@ sub_8164E04: @ 8164E04 mov r0, sp bl sub_8162E20 mov r0, sp - bl StripExtendedControlCodes - ldr r4, =gUnknown_03005D90 + bl StripExtCtrlCodes + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000bd8 adds r0, r1 mov r1, sp - bl CopyString + bl StringCopy ldr r0, [r4] ldr r2, =0x00000beb adds r0, r2 @@ -23413,7 +23413,7 @@ sub_8164ED8: @ 8164ED8 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r3, 0 movs r2, 0 @@ -23425,7 +23425,7 @@ _08164EEA: adds r2, 0x1 cmp r2, 0x39 bls _08164EEA - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r2, =0x00000734 adds r0, r1, r2 @@ -23548,7 +23548,7 @@ sub_8164FCC: @ 8164FCC push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r0, 23 lsrs r1, 22 @@ -23602,7 +23602,7 @@ sub_816502C: @ 816502C mov r5, r8 push {r5-r7} sub sp, 0xC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -23640,10 +23640,10 @@ _0816506A: movs r6, 0 cmp r6, r8 bge _081650DC - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr mov r5, sp _0816508C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r6, 1 ldr r2, =0x00000caa @@ -23714,7 +23714,7 @@ _08165110: ldrb r0, [r0, 0x1] cmp r0, 0x4 bls _08165132 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr mov r0, sp ldrb r1, [r0] movs r0, 0x64 @@ -23744,7 +23744,7 @@ sub_816515C: @ 816515C mov r7, r9 mov r6, r8 push {r6,r7} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] ldr r0, =0x00000bec adds r7, r2, r0 @@ -23785,12 +23785,12 @@ _081651A6: bl sub_80842F4 adds r0, r7, 0x4 ldr r1, [r5] - bl CopyString_Limit7 + bl StringCopy7 movs r0, 0x1 strh r0, [r7, 0x2] movs r6, 0x7 movs r4, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 adds r5, r7, 0 adds r5, 0x10 @@ -23847,7 +23847,7 @@ _08165206: thumb_func_start sub_8165244 sub_8165244: @ 8165244 ldr r1, =gTrainerPicIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000bed adds r0, r2 @@ -23861,7 +23861,7 @@ sub_8165244: @ 8165244 thumb_func_start sub_8165264 sub_8165264: @ 8165264 ldr r1, =gTrainerClassNameIndices - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000bed adds r0, r2 @@ -23877,7 +23877,7 @@ sub_8165284: @ 8165284 push {r4,lr} adds r3, r0, 0 movs r2, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xBF lsls r1, 4 @@ -23905,7 +23905,7 @@ sub_81652B4: @ 81652B4 ldr r2, =gUnknown_020375F0 movs r0, 0 strh r0, [r2] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r3, =0x00000bec adds r5, r0, r3 @@ -23993,7 +23993,7 @@ _08165352: thumb_func_start sub_8165360 sub_8165360: @ 8165360 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bfc adds r0, r1 @@ -24010,7 +24010,7 @@ sub_816537C: @ 816537C ldrb r0, [r0] cmp r0, 0x3 bne _08165398 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r0, 0xFF strb r0, [r1] b _081653C0 @@ -24018,7 +24018,7 @@ sub_816537C: @ 816537C _08165398: cmp r0, 0x1 bne _081653B4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000c14 adds r0, r1 @@ -24026,7 +24026,7 @@ _08165398: b _081653C0 .pool _081653B4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000c08 adds r0, r1 @@ -24040,7 +24040,7 @@ _081653C0: thumb_func_start sub_81653CC sub_81653CC: @ 81653CC push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca8 adds r0, r1 @@ -24255,7 +24255,7 @@ _0816556C: adds r0, 0x48 str r0, [sp, 0x5C] _081655A6: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r0, r10 adds r0, 0x12 @@ -24423,7 +24423,7 @@ _081656F0: movs r1, 0x24 str r1, [sp, 0x6C] _08165710: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr movs r0, 0xEC adds r4, r7, 0 muls r4, r0 @@ -24452,7 +24452,7 @@ _08165710: stm r0!, {r2,r3} adds r1, r4, 0x4 add r0, sp, 0x10 - bl CopyString + bl StringCopy adds r4, 0xE4 ldrb r0, [r4] cmp r0, 0x1 @@ -24468,7 +24468,7 @@ _08165710: strb r0, [r1] add r0, sp, 0x38 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _0816579C .pool _0816578C: @@ -24527,7 +24527,7 @@ _081657F0: mov r3, sp adds r3, 0x44 str r3, [sp, 0x64] - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr mov r8, r6 movs r5, 0x24 lsls r0, r7, 4 @@ -24956,7 +24956,7 @@ sub_8165B20: @ 8165B20 mov r6, r8 push {r6,r7} movs r5, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r8, r0 mov r9, r8 _08165B30: @@ -25041,7 +25041,7 @@ _08165BB8: b _08165C2A .pool _08165BDC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0xfffffed4 adds r2, r1 @@ -25064,7 +25064,7 @@ _08165BFC: b _08165C2A .pool _08165C14: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =0xfffffe70 adds r1, r3, r0 @@ -25087,7 +25087,7 @@ _08165C2A: thumb_func_start sub_8165C40 sub_8165C40: @ 8165C40 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r2, r0, r1 @@ -25306,7 +25306,7 @@ _08165E02: thumb_func_start sub_8165E18 sub_8165E18: @ 8165E18 push {r4,r5,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr _08165E1C: bl sub_8165D40 lsls r0, 16 @@ -25323,7 +25323,7 @@ _08165E1C: ldrh r0, [r0] cmp r0, r4 beq _08165E58 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] subs r2, 0x2 adds r0, r1, r2 @@ -25350,7 +25350,7 @@ _08165E58: ldrh r0, [r5] movs r1, 0 bl sub_8162614 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000cb2 adds r0, r1, r2 @@ -25697,7 +25697,7 @@ sub_8166124: @ 8166124 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr movs r0, 0xEC muls r0, r6 movs r1, 0xE7 @@ -26993,14 +26993,14 @@ sub_8166D44: @ 8166D44 add r2, sp, 0xC bl pokemon_getattr add r0, sp, 0xC - bl GetStringEnd_Limit7 + bl StringGetEnd10 ldr r1, =gUnknown_085EC7A0 add r0, sp, 0xC - bl AppendString - ldr r4, =gUnknown_02021FC4 + bl StringAppend + ldr r4, =gStringVar4 adds r0, r4, 0 add r1, sp, 0xC - bl CopyString + bl StringCopy movs r0, 0x2 movs r1, 0x11 bl FillWindowPixelBuffer @@ -27125,7 +27125,7 @@ _08166E84: ldrb r0, [r1] cmp r0, 0x4 bhi _08166EA8 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldrb r1, [r1] adds r2, 0x61 adds r2, r1 @@ -27134,7 +27134,7 @@ _08166E84: b _08166EB8 .pool _08166EA8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0203BC90 ldr r1, [r1] adds r1, 0x53 @@ -27142,7 +27142,7 @@ _08166EA8: movs r2, 0 bl sub_8166FD4 _08166EB8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl sub_8166FB0 movs r0, 0x2 bl PutWindowTilemap @@ -27190,7 +27190,7 @@ _08166F18: movs r0, 0 b _08166F44 _08166F1E: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, [r5] adds r1, r0, 0 adds r1, 0x53 @@ -27263,7 +27263,7 @@ sub_8166F94: @ 8166F94 sub_8166FB0: @ 8166FB0 push {lr} sub sp, 0xC - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -27300,16 +27300,16 @@ _08166FEC: adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085EC7E1 adds r0, r4, 0 - bl AppendString + bl StringAppend b _08167018 .pool _08167010: ldr r1, =gUnknown_085EC7EF adds r0, r4, 0 - bl CopyString + bl StringCopy _08167018: pop {r4} pop {r0} @@ -28694,12 +28694,12 @@ sub_8167BA0: @ 8167BA0 ldr r6, =0x0000804a adds r0, r6 ldr r1, =gUnknown_085EBF8D - bl CopyString + bl StringCopy ldr r1, =gNatureNamePointers lsls r4, 2 adds r4, r1 ldr r1, [r4] - bl CopyString + bl StringCopy ldr r0, =gUnknown_085DFCC9 str r0, [sp] str r5, [sp, 0x4] @@ -30858,7 +30858,7 @@ _08168D90: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] diff --git a/asm/rom_816F318.s b/asm/rom_816F318.s index a685d5d28..36366b900 100644 --- a/asm/rom_816F318.s +++ b/asm/rom_816F318.s @@ -1823,7 +1823,7 @@ sub_81700F8: @ 81700F8 _08170148: bl init_sav2 _0817014C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x15] lsls r0, 31 @@ -9114,7 +9114,7 @@ sub_8173EE4: @ 8173EE4 bl ShowBg movs r0, 0x3 bl ShowBg - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldrb r0, [r0, 0x8] movs r1, 0x1 @@ -9823,7 +9823,7 @@ _0817454E: ldr r2, =0x000063b0 movs r1, 0xC bl sub_80A2A20 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gTasks ldr r4, [sp, 0x14] add r4, r8 @@ -9833,11 +9833,11 @@ _0817454E: ldrsh r1, [r4, r5] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E8C00 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r1, 0x8 ldrsh r0, [r4, r1] cmp r0, 0 @@ -10413,7 +10413,7 @@ sub_8174A88: @ 8174A88 beq _08174B30 ldr r1, =gUnknown_085E8C36 add r0, sp, 0xC - bl CopyString + bl StringCopy adds r6, r0, 0 ldrh r0, [r7, 0x8] lsls r0, 23 @@ -10537,7 +10537,7 @@ _08174B8C: muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy adds r6, r0, 0 ldrh r1, [r7, 0x8] adds r0, r4, 0 @@ -10583,13 +10583,13 @@ _08174C0A: bl box_print ldr r1, =gUnknown_085E8C3B add r0, sp, 0xC - bl CopyString + bl StringCopy adds r6, r0, 0 ldrb r1, [r7, 0x9] lsrs r1, 1 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN str r5, [sp] str r4, [sp, 0x4] add r0, sp, 0xC @@ -10601,12 +10601,12 @@ _08174C0A: bl box_print ldr r1, =gUnknown_085E8C4D add r0, sp, 0xC - bl CopyString + bl StringCopy adds r6, r0, 0 ldrh r1, [r7] movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN str r5, [sp] str r4, [sp, 0x4] add r0, sp, 0xC @@ -10659,7 +10659,7 @@ sub_8174C98: @ 8174C98 movs r2, 0 movs r3, 0x1 bl box_print - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r10, r0 ldr r1, [r0] movs r0, 0x1 @@ -10816,7 +10816,7 @@ _08174E30: movs r0, 0xF0 strb r0, [r1, 0x3] adds r4, r1, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r5, [r0] ldrb r0, [r5, 0x10] movs r1, 0x64 @@ -14235,7 +14235,7 @@ _08176B30: b _08176C96 .pool _08176B54: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 diff --git a/asm/rom_81795E8.s b/asm/rom_81795E8.s index 9a873cce6..0c8408d34 100644 --- a/asm/rom_81795E8.s +++ b/asm/rom_81795E8.s @@ -13,7 +13,7 @@ sub_81795E8: @ 81795E8 lsls r0, 24 cmp r0, 0 bne _08179634 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r1, [r2, 0x4] ldr r0, =0x00004718 @@ -237,7 +237,7 @@ sub_81797DC: @ 81797DC lsrs r2, r0, 24 cmp r2, 0 bne _0817982C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldrh r1, [r3, 0x4] movs r0, 0xC3 @@ -340,7 +340,7 @@ sub_81798D0: @ 81798D0 lsls r0, 24 cmp r0, 0 bne _08179910 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r1, [r2, 0x4] ldr r0, =0x00004418 @@ -473,7 +473,7 @@ sub_8179A04: @ 8179A04 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldrh r1, [r0, 0x4] ldr r0, =0x00004318 @@ -595,7 +595,7 @@ _08179AF0: lsrs r0, 16 cmp r0, 0xF bne _08179B5A - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, [r0] ldr r0, =0x00150008 @@ -1094,7 +1094,7 @@ sub_8179FAC: @ 8179FAC sub_8179FEC: @ 8179FEC push {lr} lsls r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsrs r0, 21 ldr r2, =0x00000848 adds r0, r2 @@ -1310,7 +1310,7 @@ sub_817A1C4: @ 817A1C4 muls r5, r0 ldr r0, =gUnknown_020244EC adds r5, r0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] lsls r0, 3 @@ -1326,33 +1326,33 @@ sub_817A1C4: @ 817A1C4 bl sub_8136FE4 ldr r6, =gUnknown_0203BC9E strh r0, [r6] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl sub_8137044 movs r1, 0 ldrsh r0, [r6, r1] cmp r0, 0 bne _0817A248 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E937F - bl ExpandStringRefs + bl StringExpandPlaceholders b _0817A268 .pool _0817A248: cmp r0, 0 ble _0817A260 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9390 - bl ExpandStringRefs + bl StringExpandPlaceholders b _0817A268 .pool _0817A260: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E93A9 - bl ExpandStringRefs + bl StringExpandPlaceholders _0817A268: ldr r2, =gUnknown_03003014 ldrb r0, [r2] @@ -1363,7 +1363,7 @@ _0817A268: adds r3, r0, 0 lsls r3, 24 lsrs r3, 24 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 movs r0, 0 str r0, [sp] movs r0, 0x2 diff --git a/asm/rom_8184DA4.s b/asm/rom_8184DA4.s index 6956a1588..ce764a145 100644 --- a/asm/rom_8184DA4.s +++ b/asm/rom_8184DA4.s @@ -163,12 +163,12 @@ _08184EDC: mov r0, r8 adds r1, r3, r0 mov r0, sp - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, r7 mov r1, sp - bl CopyString + bl StringCopy adds r5, 0x1 b _08184F56 .pool @@ -194,7 +194,7 @@ _08184F56: .pool _08184F64: ldr r3, =gUnknown_0203CC80 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] ldrb r1, [r2, 0xA] ldrb r0, [r2, 0xB] @@ -723,7 +723,7 @@ _0818535E: cmp r6, 0x5 ble _0818535E movs r6, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r9, r2 movs r3, 0x9A lsls r3, 3 @@ -1522,7 +1522,7 @@ start_ov_to_battle_anim: @ 8185A88 thumb_func_start sub_8185AB0 sub_8185AB0: @ 8185AB0 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_0203C7AD ldrb r0, [r0] @@ -1688,7 +1688,7 @@ _08185BE8: cmp r3, 0 beq _08185C2A ldr r0, [sp] - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _08185C2A: ldr r0, [sp] adds r0, 0x1C @@ -1736,7 +1736,7 @@ _08185C2A: ldrh r0, [r0] strb r0, [r1] ldr r1, =gUnknown_0203C7AD - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r2, =0x00000ca9 adds r0, r2 @@ -2690,7 +2690,7 @@ _08186472: strb r0, [r3, 0x7] ldrb r1, [r5] adds r0, r3, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r4,r5} pop {r0} bx r0 @@ -4617,7 +4617,7 @@ _08187414: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -10513,7 +10513,7 @@ _0818A7DC: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -12761,7 +12761,7 @@ _0818BD9E: bne _0818BDC0 b _0818BEDC _0818BDC0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 @@ -14336,7 +14336,7 @@ sub_818CA64: @ 818CA64 b _0818CB5A .pool _0818CB54: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] _0818CB5A: @@ -16115,7 +16115,7 @@ _0818D9A2: thumb_func_start sub_818D9AC sub_818D9AC: @ 818D9AC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16141,7 +16141,7 @@ sub_818D9C0: @ 818D9C0 lsrs r0, 24 cmp r0, 0x2 bne _0818DA20 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b58 adds r1, r0 @@ -16170,7 +16170,7 @@ _0818DA24: thumb_func_start sub_818DA30 sub_818DA30: @ 818DA30 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0xB] lsls r1, 8 @@ -16351,7 +16351,7 @@ sub_818DB20: @ 818DB20 sub_818DB7C: @ 818DB7C push {lr} ldr r2, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16382,7 +16382,7 @@ sub_818DB7C: @ 818DB7C thumb_func_start sub_818DBC4 sub_818DBC4: @ 818DBC4 ldr r3, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16400,7 +16400,7 @@ sub_818DBC4: @ 818DBC4 sub_818DBE8: @ 818DBE8 push {lr} ldr r1, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -16438,17 +16438,17 @@ sub_818DC1C: @ 818DC1C sub_818DC2C: @ 818DC2C push {r4,lr} ldr r1, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 str r0, [r1] - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrb r0, [r0, 0xC] bl sub_818DC1C adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -16459,7 +16459,7 @@ sub_818DC2C: @ 818DC2C sub_818DC60: @ 818DC60 push {r4,r5,lr} ldr r5, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00003b58 adds r0, r1, r2 @@ -16471,15 +16471,15 @@ sub_818DC60: @ 818DC60 b _0818DC9C .pool _0818DC84: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 ldr r0, =0x00003b5c adds r1, r0 adds r0, r4, 0 - bl CopyString_Limit7 + bl StringCopy7 ldr r0, [r5] ldrb r1, [r0, 0x12] adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString movs r0, 0x1 _0818DC9C: pop {r4,r5} @@ -16497,7 +16497,7 @@ sub_818DCAC: @ 818DCAC bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -16507,12 +16507,12 @@ sub_818DCAC: @ 818DCAC sub_818DCC8: @ 818DCC8 push {lr} ldr r2, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b58 adds r1, r0 str r1, [r2] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r1, 0xE] bl sub_818DCAC pop {r0} @@ -16531,7 +16531,7 @@ sub_818DCF4: @ 818DCF4 bl memset adds r0, r4, 0 adds r1, r5, 0 - bl CopyString_Limit7 + bl StringCopy7 pop {r4,r5} pop {r0} bx r0 @@ -16541,20 +16541,20 @@ sub_818DCF4: @ 818DCF4 sub_818DD14: @ 818DD14 push {r4,r5,lr} ldr r5, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r1, r0, r2 str r1, [r5] ldr r1, =0x00003b5c adds r0, r1 - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 adds r1, r4, 0 bl sub_818DCF4 ldr r0, [r5] ldrb r1, [r0, 0x12] adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r4,r5} pop {r0} bx r0 @@ -16564,7 +16564,7 @@ sub_818DD14: @ 818DD14 thumb_func_start sub_818DD54 sub_818DD54: @ 818DD54 ldr r1, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -16593,7 +16593,7 @@ sub_818DD84: @ 818DD84 lsls r0, 16 lsrs r5, r0, 16 ldr r4, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16610,12 +16610,12 @@ sub_818DD84: @ 818DD84 ldr r1, [r4] movs r0, 0x1 strb r0, [r1, 0x1] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 bl sub_818DCAC ldr r1, [r4] strh r5, [r1, 0xE] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r1, 0x4 bl sub_818DCF4 @@ -16687,7 +16687,7 @@ sub_818DE44: @ 818DE44 sub_818DE5C: @ 818DE5C push {lr} ldr r1, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -16710,7 +16710,7 @@ sub_818DE88: @ 818DE88 adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 bl sub_818DCAC pop {r0} bx r0 @@ -16721,7 +16721,7 @@ sub_818DE88: @ 818DE88 sub_818DEA0: @ 818DEA0 push {r4,r5,lr} ldr r5, =gUnknown_0203CD64 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16817,7 +16817,7 @@ _0818DF1A: sub_818DF68: @ 818DF68 push {r4-r6,lr} ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16889,7 +16889,7 @@ _0818DFB4: thumb_func_start sub_818E004 sub_818E004: @ 818E004 ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -16912,7 +16912,7 @@ sub_818E004: @ 818E004 sub_818E038: @ 818E038 push {lr} ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -16942,7 +16942,7 @@ sub_818E06C: @ 818E06C mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00003b58 adds r7, r4, r0 @@ -17038,7 +17038,7 @@ sub_818E13C: @ 818E13C push {r4-r7,lr} movs r7, 0x1 ldr r5, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00003b58 adds r0, r1, r2 @@ -17046,29 +17046,29 @@ sub_818E13C: @ 818E13C ldrb r0, [r0, 0x18] cmp r0, 0xFF bne _0818E174 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EEB7E - bl CopyString_Limit7 + bl StringCopy7 movs r7, 0 b _0818E1DC .pool _0818E174: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =0x00003b70 adds r1, r0 adds r0, r4, 0 - bl CopyString_Limit7 + bl StringCopy7 ldr r0, [r5] adds r0, 0x2D ldrb r1, [r0] adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString ldr r0, [r5] adds r0, 0x18 bl sub_818E258 lsls r0, 24 lsrs r4, r0, 24 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] bl sub_818E258 lsls r0, 24 @@ -17094,7 +17094,7 @@ _0818E1BA: ldr r1, [r0] adds r1, 0x18 adds r1, r2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, r2 ldrb r1, [r1] @@ -17115,7 +17115,7 @@ _0818E1DC: sub_818E1F4: @ 818E1F4 push {r4-r6,lr} ldr r3, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00003b58 adds r0, r1, r2 @@ -17124,7 +17124,7 @@ sub_818E1F4: @ 818E1F4 movs r4, 0 ldr r0, =0x00003b78 adds r1, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrh r1, [r1] adds r6, r3, 0 @@ -17182,14 +17182,14 @@ _0818E268: thumb_func_start sub_818E274 sub_818E274: @ 818E274 push {r4,lr} - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r0, =gUnknown_0203CD68 ldr r0, [r0] ldrh r0, [r0, 0x28] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -17200,7 +17200,7 @@ sub_818E274: @ 818E274 sub_818E298: @ 818E298 push {r4,lr} ldr r4, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -17229,7 +17229,7 @@ _0818E2CC: thumb_func_start sub_818E2D8 sub_818E2D8: @ 818E2D8 ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003b58 adds r1, r0, r3 @@ -17253,23 +17253,23 @@ sub_818E2FC: @ 818E2FC sub_818E308: @ 818E308 push {r4-r6,lr} ldr r5, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 str r0, [r5] - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 ldrh r1, [r0, 0x14] adds r0, r6, 0 bl CopyEasyChatWord - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldr r0, [r5] ldrh r1, [r0, 0x16] adds r0, r4, 0 bl CopyEasyChatWord adds r0, r6, 0 adds r1, r4, 0 - bl CompareString + bl StringCompare movs r1, 0 cmp r0, 0 bne _0818E33C @@ -17285,7 +17285,7 @@ _0818E33C: thumb_func_start sub_818E358 sub_818E358: @ 818E358 ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17300,7 +17300,7 @@ sub_818E358: @ 818E358 thumb_func_start sub_818E37C sub_818E37C: @ 818E37C ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17314,7 +17314,7 @@ sub_818E37C: @ 818E37C thumb_func_start sub_818E39C sub_818E39C: @ 818E39C ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17328,7 +17328,7 @@ sub_818E39C: @ 818E39C thumb_func_start sub_818E3BC sub_818E3BC: @ 818E3BC ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17351,7 +17351,7 @@ sub_818E3E0: @ 818E3E0 sub_818E3EC: @ 818E3EC push {r4,lr} ldr r4, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -17383,7 +17383,7 @@ _0818E422: sub_818E430: @ 818E430 push {r4,r5,lr} ldr r1, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17443,7 +17443,7 @@ sub_818E490: @ 818E490 sub_818E4A4: @ 818E4A4 push {r4-r6,lr} ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -17453,7 +17453,7 @@ sub_818E4A4: @ 818E4A4 strh r1, [r0, 0x28] movs r3, 0 adds r4, r2, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr adds r5, r4, 0 adds r2, r6, 0 _0818E4C2: @@ -17474,7 +17474,7 @@ _0818E4C2: ldr r0, [r4] adds r0, 0x18 ldr r1, [r6] - bl CopyString_Limit7 + bl StringCopy7 ldr r0, [r4] ldr r1, =gUnknown_82E9531 ldrb r1, [r1] @@ -17489,7 +17489,7 @@ _0818E4C2: thumb_func_start sub_818E510 sub_818E510: @ 818E510 ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003b58 adds r1, r0, r3 @@ -17506,12 +17506,12 @@ sub_818E510: @ 818E510 sub_818E538: @ 818E538 push {lr} ldr r2, =gUnknown_0203CD68 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003b58 adds r1, r0 str r1, [r2] - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r1, 0x14] bl CopyEasyChatWord pop {r0} @@ -17531,7 +17531,7 @@ sub_818E564: @ 818E564 sub_818E570: @ 818E570 push {r4-r7,lr} ldr r2, =gUnknown_0203CD68 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r4, =0x00003b58 adds r3, r1, r4 @@ -17631,7 +17631,7 @@ sub_818E604: @ 818E604 sub_818E638: @ 818E638 push {r4,lr} ldr r4, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -17656,7 +17656,7 @@ sub_818E638: @ 818E638 sub_818E674: @ 818E674 push {lr} ldr r2, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003b58 adds r0, r1 @@ -17687,7 +17687,7 @@ sub_818E6B0: @ 818E6B0 lsls r0, 24 lsrs r2, r0, 24 ldr r4, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00003b58 adds r1, r0, r3 @@ -17702,7 +17702,7 @@ sub_818E6B0: @ 818E6B0 movs r2, 0x8 bl memset ldr r1, [r4] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr adds r1, 0x4 ldr r0, [r0] ldm r0!, {r2,r3} @@ -17725,7 +17725,7 @@ sub_818E704: @ 818E704 movs r3, 0 movs r4, 0 ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r5, =0x00003b58 adds r0, r5 @@ -17795,7 +17795,7 @@ sub_818E794: @ 818E794 push {r4,r5,lr} adds r5, r1, 0 ldr r4, =gUnknown_0203CD6C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x00003b58 adds r1, r2 @@ -17805,7 +17805,7 @@ sub_818E794: @ 818E794 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy ldr r1, =gUnknown_0860B310 ldr r0, [r4] ldrb r0, [r0, 0xD] @@ -17813,7 +17813,7 @@ sub_818E794: @ 818E794 adds r0, r1 ldr r1, [r0] adds r0, r5, 0 - bl CopyString_Limit10 + bl StringCopy10 pop {r4,r5} pop {r0} bx r0 @@ -17825,7 +17825,7 @@ sub_818E7E0: @ 818E7E0 push {r4,lr} adds r3, r1, 0 ldr r2, =gUnknown_0203CD6C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r4, =0x00003b58 adds r1, r4 @@ -17838,7 +17838,7 @@ sub_818E7E0: @ 818E7E0 adds r0, r2 ldr r1, [r0] adds r0, r3, 0 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -17849,14 +17849,14 @@ sub_818E7E0: @ 818E7E0 sub_818E81C: @ 818E81C push {r4,lr} ldr r3, =gUnknown_0203CD6C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r4, =0x00003b58 adds r2, r1, r4 str r2, [r3] ldr r2, =0x00003b5c adds r1, r2 - bl CopyString + bl StringCopy pop {r4} pop {r0} bx r0 @@ -17866,7 +17866,7 @@ sub_818E81C: @ 818E81C thumb_func_start sub_818E848 sub_818E848: @ 818E848 ldr r2, =gUnknown_0203CD6C - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r3, =0x00003b58 adds r1, r3 @@ -17885,7 +17885,7 @@ sub_818E868: @ 818E868 lsrs r1, 22 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -17895,7 +17895,7 @@ sub_818E868: @ 818E868 sub_818E880: @ 818E880 push {lr} ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17922,7 +17922,7 @@ _0818E8AE: sub_818E8B4: @ 818E8B4 push {lr} ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -17945,7 +17945,7 @@ sub_818E8E0: @ 818E8E0 push {r4,lr} movs r3, 0 ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r4, =0x00003b58 adds r2, r0, r4 @@ -17969,8 +17969,8 @@ _0818E8FE: thumb_func_start sub_818E914 sub_818E914: @ 818E914 push {lr} - ldr r0, =gUnknown_02021DC4 - ldr r1, =gUnknown_02021CC4 + ldr r0, =gStringVar2 + ldr r1, =gStringVar1 bl sub_818E794 pop {r0} bx r0 @@ -17991,7 +17991,7 @@ sub_818E92C: @ 818E92C thumb_func_start sub_818E940 sub_818E940: @ 818E940 ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -18005,7 +18005,7 @@ sub_818E940: @ 818E940 thumb_func_start sub_818E960 sub_818E960: @ 818E960 ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -18024,7 +18024,7 @@ sub_818E960: @ 818E960 thumb_func_start sub_818E990 sub_818E990: @ 818E990 ldr r1, =gUnknown_0203CD6C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003b58 adds r0, r2 @@ -18052,7 +18052,7 @@ sub_818E9AC: @ 818E9AC thumb_func_start sub_818E9CC sub_818E9CC: @ 818E9CC push {r4-r7,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -18108,7 +18108,7 @@ sub_818E9CC: @ 818E9CC adds r1, r0 strh r6, [r1] _0818EA3E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -18129,7 +18129,7 @@ _0818EA3E: thumb_func_start sub_818EA84 sub_818EA84: @ 818EA84 push {r4-r6,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -18166,7 +18166,7 @@ _0818EAC8: .4byte _0818ECF4 _0818EAF0: ldr r3, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r5, 1 lsls r2, r6, 2 @@ -18180,7 +18180,7 @@ _0818EAF0: .pool _0818EB14: ldr r4, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r3, =0x00000cdc adds r2, r3 @@ -18200,7 +18200,7 @@ _0818EB14: .pool _0818EB48: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18210,7 +18210,7 @@ _0818EB48: .pool _0818EB64: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18220,7 +18220,7 @@ _0818EB64: .pool _0818EB80: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18228,7 +18228,7 @@ _0818EB80: .pool _0818EB98: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18246,7 +18246,7 @@ _0818EBB4: cmp r5, 0 beq _0818EBE8 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18256,7 +18256,7 @@ _0818EBB4: .pool _0818EBE8: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18268,7 +18268,7 @@ _0818EC04: cmp r5, 0 beq _0818EC24 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18278,7 +18278,7 @@ _0818EC04: .pool _0818EC24: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18296,7 +18296,7 @@ _0818EC40: cmp r5, 0 beq _0818EC74 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18307,7 +18307,7 @@ _0818EC40: .pool _0818EC74: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18319,7 +18319,7 @@ _0818EC90: cmp r5, 0 beq _0818ECB0 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d08 adds r0, r2 @@ -18329,7 +18329,7 @@ _0818EC90: .pool _0818ECB0: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d08 adds r0, r3 @@ -18344,7 +18344,7 @@ _0818ECBE: _0818ECD0: bl sub_81B8558 ldr r2, =gUnknown_0203CEF8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xCB lsls r1, 4 @@ -18358,7 +18358,7 @@ _0818ECD0: .pool _0818ECF4: ldr r2, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r3, =0x00000d0a adds r0, r1, r3 @@ -18381,7 +18381,7 @@ _0818ED10: thumb_func_start sub_818ED28 sub_818ED28: @ 818ED28 push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -18416,7 +18416,7 @@ _0818ED6C: .4byte _0818EF50 .4byte _0818F008 _0818ED90: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r0, r4, 1 lsls r1, r5, 2 @@ -18434,7 +18434,7 @@ _0818EDB4: ldrh r0, [r0] cmp r0, 0 beq _0818EDE8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =0x00000cdc adds r2, r0 @@ -18450,7 +18450,7 @@ _0818EDB4: b _0818F01E .pool _0818EDE8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =0x00000cdc adds r2, r1 @@ -18466,7 +18466,7 @@ _0818EDE8: b _0818F01E .pool _0818EE10: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18480,7 +18480,7 @@ _0818EE10: b _0818EF74 .pool _0818EE34: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18495,7 +18495,7 @@ _0818EE34: b _0818EFF4 .pool _0818EE5C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18504,7 +18504,7 @@ _0818EE5C: b _0818EFE8 .pool _0818EE78: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18527,7 +18527,7 @@ _0818EEA0: bne _0818EF00 cmp r4, 0 beq _0818EEDC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18541,7 +18541,7 @@ _0818EEA0: b _0818EFF4 .pool _0818EEDC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18557,7 +18557,7 @@ _0818EEDC: _0818EF00: cmp r4, 0 beq _0818EF2C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18572,7 +18572,7 @@ _0818EF00: b _0818EFF4 .pool _0818EF2C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18594,7 +18594,7 @@ _0818EF50: bne _0818EFB0 cmp r4, 0 beq _0818EF8C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E4 ldrb r1, [r0] @@ -18610,7 +18610,7 @@ _0818EF74: b _0818F01E .pool _0818EF8C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18626,7 +18626,7 @@ _0818EF8C: _0818EFB0: cmp r4, 0 beq _0818EFDC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18641,7 +18641,7 @@ _0818EFB0: b _0818EFF4 .pool _0818EFDC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -18661,7 +18661,7 @@ _0818EFF4: b _0818F01E .pool _0818F008: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_0203CEF8 ldrb r1, [r0] @@ -18697,7 +18697,7 @@ sub_818F02C: @ 818F02C movs r0, 0x18 bl AllocZeroed str r0, [sp, 0x1C] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -18797,7 +18797,7 @@ _0818F0E8: cmp r5, 0x3 ble _0818F0E8 movs r5, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr _0818F11C: ldr r0, [r6] ldr r1, =0x00000caa @@ -18861,7 +18861,7 @@ _0818F184: movs r5, 0x1 cmp r5, r10 bge _0818F1CA - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r7, =0x00000d28 adds r0, r7 @@ -18888,7 +18888,7 @@ _0818F1B2: _0818F1CA: cmp r5, r10 bne _0818F184 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, [sp, 0x34] adds r3, r1 @@ -18915,7 +18915,7 @@ _0818F22C: movs r5, 0x1 cmp r5, r10 bge _0818F274 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000d28 adds r0, r2 @@ -18942,7 +18942,7 @@ _0818F25C: _0818F274: cmp r5, r10 bne _0818F22C - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r3, [r5] ldr r7, [sp, 0x34] adds r3, r7 @@ -18980,7 +18980,7 @@ _0818F2AE: movs r7, 0 cmp r7, r5 bge _0818F300 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, [sp, 0x8] mov r8, r1 @@ -19016,7 +19016,7 @@ _0818F2D4: _0818F300: cmp r7, r5 bne _0818F2AE - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r1, [sp, 0x38] add r1, r9 @@ -19047,7 +19047,7 @@ _0818F300: adds r1, r3, 0 ands r0, r1 strb r0, [r2] - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r2, [r5] adds r2, r7 ldr r7, =0x00000d25 @@ -19085,7 +19085,7 @@ _0818F37C: ldr r6, =gUnknown_0832A328 ldr r5, =gBaseStats _0818F38A: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] mov r2, r10 lsls r1, r2, 1 @@ -19213,7 +19213,7 @@ _0818F462: _0818F494: movs r7, 0 strh r7, [r6] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] mov r2, r10 lsls r1, r2, 2 @@ -19231,7 +19231,7 @@ _0818F494: ldr r0, [sp, 0x30] mov r9, r0 _0818F4BC: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] mov r4, r9 add r4, r10 @@ -19269,7 +19269,7 @@ _0818F4BC: ldr r1, [r2] adds r0, r1 strh r0, [r6] - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r1, =0x00000d64 adds r0, r1 @@ -19353,7 +19353,7 @@ _0818F5A0: bcc _0818F5C2 cmp r1, r0 bne _0818F61E - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r5, 2 adds r0, r1, r0 @@ -19403,7 +19403,7 @@ _0818F626: beq _0818F6EE movs r3, 0 mov r10, r3 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r4, =0x00000d24 adds r1, r4 @@ -19473,7 +19473,7 @@ _0818F6CC: lsls r0, r1, 24 lsrs r0, 24 bl sub_81A4FF0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r2, =0x00000d64 adds r1, r2 @@ -19761,7 +19761,7 @@ sub_818F904: @ 818F904 ldrh r3, [r2] strh r3, [r4] strh r5, [r2] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r5, [r2] lsls r6, r0, 2 adds r6, r5, r6 @@ -19792,7 +19792,7 @@ sub_818F904: @ 818F904 mov r7, r8 orrs r3, r7 strh r3, [r5] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r8, r2 add r12, r0 add r9, r1 @@ -19830,9 +19830,9 @@ _0818F974: thumb_func_start sub_818F9B0 sub_818F9B0: @ 818F9B0 push {lr} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085CCD20 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb2 adds r1, r3 @@ -19840,7 +19840,7 @@ sub_818F9B0: @ 818F9B0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -19849,9 +19849,9 @@ sub_818F9B0: @ 818F9B0 thumb_func_start sub_818F9E0 sub_818F9E0: @ 818F9E0 push {lr} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085CCD20 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb2 adds r1, r3 @@ -19859,8 +19859,8 @@ sub_818F9E0: @ 818F9E0 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, =gUnknown_02038BCA ldrh r1, [r1] bl sub_8195898 @@ -19942,7 +19942,7 @@ sub_818FA74: @ 818FA74 str r3, [sp, 0x18] ldr r6, =gUnknown_02024744 adds r0, r3, r6 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r4, [r7] lsls r5, 1 ldr r3, [sp, 0x28] @@ -19985,7 +19985,7 @@ sub_818FA74: @ 818FA74 mov r4, r10 str r4, [sp, 0x20] _0818FB18: - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r1, [r7] ldr r2, [sp, 0x28] lsls r0, r2, 1 @@ -20013,7 +20013,7 @@ _0818FB18: mov r2, r12 str r3, [sp, 0x24] bl sub_80691F4 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] add r0, r9 adds r0, r5 @@ -20044,7 +20044,7 @@ _0818FB74: movs r1, 0x20 add r2, sp, 0xC bl pokemon_setattr - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, [sp, 0x20] add r1, r8 @@ -20227,7 +20227,7 @@ _0818FCFA: adds r2, r7, 0x1 mov r10, r2 _0818FD00: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, [sp, 0x18] adds r0, r1, r2 @@ -20347,7 +20347,7 @@ _0818FDF6: adds r2, r7, 0x1 mov r10, r2 _0818FDFC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, [sp, 0x18] adds r0, r1, r2 @@ -20849,7 +20849,7 @@ sub_81901A0: @ 81901A0 adds r3, r0, 0 adds r2, r1, 0 movs r5, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r4, =0x00000d24 adds r1, r4 @@ -20980,7 +20980,7 @@ sub_8190298: @ 8190298 thumb_func_start sub_81902AC sub_81902AC: @ 81902AC push {r4,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r1, =0x00000cb2 adds r0, r4, r1 @@ -21015,7 +21015,7 @@ sub_81902E4: @ 81902E4 thumb_func_start sub_81902F8 sub_81902F8: @ 81902F8 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -21043,7 +21043,7 @@ sub_81902F8: @ 81902F8 thumb_func_start sub_819033C sub_819033C: @ 819033C push {r4,r5,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000ca9 adds r0, r1 @@ -22014,7 +22014,7 @@ sub_8190B40: @ 8190B40 adds r0, r1 ldrb r0, [r0] mov r10, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r5, [r1] ldr r7, =0x00000cb2 adds r0, r5, r7 @@ -24586,7 +24586,7 @@ sub_819221C: @ 819221C adds r0, r5, r0 ldrb r0, [r0] mov r10, r0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r1, =0x00000cb2 adds r0, r1 @@ -24674,7 +24674,7 @@ _08192304: ands r0, r1 cmp r0, 0 beq _08192360 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] mov r3, r10 lsls r1, r3, 2 @@ -24698,7 +24698,7 @@ _08192304: strb r0, [r2, 0x10] movs r7, 0x4 _0819233C: - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] add r0, r12 ldr r1, =0x00000d25 @@ -24925,7 +24925,7 @@ sub_81924E0: @ 81924E0 movs r0, 0x24 bl AllocZeroed mov r8, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r3, [sp, 0x20] lsls r0, r3, 2 @@ -25065,7 +25065,7 @@ _08192624: ldr r1, [sp, 0x24] cmp r1, r0 bne _08192660 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000d64 adds r0, r2 @@ -25083,7 +25083,7 @@ _08192660: ldr r3, [sp, 0x24] cmp r3, r0 bne _08192690 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000d64 adds r0, r1 @@ -25097,7 +25097,7 @@ _08192660: b _081926B0 .pool _08192690: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r3, =0x00000d64 adds r0, r3 @@ -25229,7 +25229,7 @@ _081927A2: ldrb r0, [r0] cmp r0, 0xFF beq _081927CA - ldr r3, =gUnknown_02021CC4 + ldr r3, =gStringVar1 adds r0, r1, r2 adds r2, r7, r0 _081927BA: @@ -25242,7 +25242,7 @@ _081927BA: cmp r0, 0xFF bne _081927BA _081927CA: - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r1, r7, r5 movs r0, 0 strb r0, [r1] @@ -25254,10 +25254,10 @@ _081927CA: ldr r2, [sp, 0x24] cmp r2, r0 bne _08192800 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r5, 0 - bl AppendString + bl StringAppend b _08192836 .pool _08192800: @@ -25265,26 +25265,26 @@ _08192800: ldr r3, [sp, 0x24] cmp r3, r0 bne _08192824 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 adds r0, r4, 0 bl sub_8195938 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend b _08192836 .pool _08192824: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldr r1, [sp, 0x24] adds r0, r4, 0 bl sub_8195898 adds r0, r5, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend _08192836: add r0, sp, 0xC ldrb r0, [r0, 0x5] - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 add r1, sp, 0xC ldrb r3, [r1, 0xA] adds r1, r4, 0 @@ -25329,7 +25329,7 @@ _0819288A: ldr r4, [sp, 0x24] cmp r4, r0 bne _081928C0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r7, 1 add r0, r9 @@ -25342,7 +25342,7 @@ _081928C0: ldr r4, [sp, 0x24] cmp r4, r0 bne _081928E4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r7, 1 add r0, r9 @@ -25351,7 +25351,7 @@ _081928C0: b _081928FA .pool _081928E4: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] lsls r0, r7, 1 add r0, r9 @@ -25482,7 +25482,7 @@ _08192A00: ldr r1, [sp, 0x24] cmp r1, r0 bne _08192A20 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000efc adds r0, r1 @@ -25490,7 +25490,7 @@ _08192A00: b _08192A48 .pool _08192A20: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] mov r12, r0 ldr r0, [sp, 0x3C] @@ -25616,7 +25616,7 @@ _08192AF0: b _08192B34 .pool _08192B24: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r7, 4 adds r1, r5, r1 @@ -25650,7 +25650,7 @@ _08192B4C: b _08192B7E .pool _08192B70: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r7, 4 adds r0, r1 @@ -25749,7 +25749,7 @@ _08192C24: mov r9, r0 movs r7, 0x2 _08192C34: - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r4, =0x00000d64 adds r0, r4 @@ -25783,7 +25783,7 @@ _08192C60: adds r1, r6, 0 bl __divsi3 adds r6, r0, 0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r4, =0x00000d64 adds r0, r4 @@ -25817,7 +25817,7 @@ _08192C9C: movs r5, 0 mov r4, r8 _08192CB4: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000d64 adds r0, r2 @@ -26150,7 +26150,7 @@ sub_8192F08: @ 8192F08 adds r3, r2, 0 cmp r6, r0 bge _08192FD4 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, =0x000003ff mov r10, r1 ldr r2, =0x000003fe @@ -26180,22 +26180,22 @@ _08192F42: lsrs r0, r1, 22 cmp r0, r10 bne _08192F9C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r2, 0 - bl CopyString + bl StringCopy b _08192FB8 .pool _08192F9C: lsrs r0, r1, 22 cmp r0, r9 bne _08192FB0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8195938 b _08192FB8 .pool _08192FB0: lsrs r1, 22 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8195898 _08192FB8: movs r2, 0x1 @@ -26237,7 +26237,7 @@ _08192FE8: blt _08193006 b _08193126 _08193006: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr mov r10, r5 ldr r0, =0x00000d25 mov r9, r0 @@ -26292,8 +26292,8 @@ _0819300E: muls r1, r0 ldr r0, =gMoveNames adds r1, r0 - ldr r0, =gUnknown_02021DC4 - bl CopyString + ldr r0, =gStringVar2 + bl StringCopy mov r2, r10 ldr r1, [r2] ldr r5, [sp, 0xC] @@ -26326,22 +26326,22 @@ _081930BC: ldr r0, =0xffc00000 cmp r1, r0 bne _081930E0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r3, 0 - bl CopyString + bl StringCopy b _08193100 .pool _081930E0: ldr r0, =0xff800000 cmp r1, r0 bne _081930F8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8195938 b _08193100 .pool _081930F8: lsrs r1, 22 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8195898 _08193100: mov r0, r8 @@ -26505,7 +26505,7 @@ _081931C2: ldr r0, [r4] adds r0, 0x11 mov r12, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r0, =gUnknown_0860D3C6 movs r3, 0 @@ -26561,7 +26561,7 @@ _081932A2: ldr r0, =0x000003ff cmp r1, r0 bne _081932D4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 @@ -26647,7 +26647,7 @@ _0819335A: ldr r0, =0x000003ff cmp r1, r0 bne _08193388 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] bl sub_806F000 @@ -26744,7 +26744,7 @@ _0819342C: ldr r0, =0x000003ff cmp r1, r0 bne _08193464 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, [sp, 0x1C] lsls r0, r1, 1 @@ -26761,7 +26761,7 @@ _08193464: ldr r0, =0x000003fe cmp r1, r0 bne _08193490 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, [sp, 0x1C] lsls r0, r1, 1 @@ -26775,7 +26775,7 @@ _08193464: b _081934B0 .pool _08193490: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, [sp, 0x1C] lsls r0, r1, 1 @@ -26890,7 +26890,7 @@ _08193564: ldr r0, =0x000003ff cmp r1, r0 bne _081935AC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r3, [sp, 0x48] ldr r1, [r3, 0x4] @@ -26908,7 +26908,7 @@ _081935AC: ldr r0, =0x000003fe cmp r1, r0 bne _081935D8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, [sp, 0x48] ldr r1, [r0, 0x4] @@ -26923,7 +26923,7 @@ _081935AC: b _081935FA .pool _081935D8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, [sp, 0x48] ldr r1, [r0, 0x4] @@ -27057,13 +27057,13 @@ _081936A0: adds r1, r2, 0 movs r0, 0xD0 strb r0, [r1, 0xD] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r0, =gUnknown_0860D38C ldr r7, [sp, 0x70] adds r0, r7, r0 ldr r1, [r0] adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders str r4, [sp, 0xC] add r0, sp, 0xC add r1, sp, 0x6C @@ -27090,22 +27090,22 @@ _081936A0: ldr r0, =0x000003ff cmp r1, r0 bne _0819375C - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy b _0819377E .pool _0819375C: ldr r0, =0x000003fe cmp r1, r0 bne _08193774 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 bl sub_8195938 b _0819377E .pool _08193774: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, 16 lsrs r1, 16 bl sub_8195898 @@ -27114,7 +27114,7 @@ _0819377E: movs r4, 0x2 strb r4, [r0, 0x5] strb r4, [r0, 0xA] - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 str r5, [sp, 0xC] add r2, sp, 0x64 ldrb r2, [r2] @@ -27145,10 +27145,10 @@ _0819377E: ldr r0, =0x000003ff cmp r1, r0 bne _081937E4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r5, 0 - bl CopyString + bl StringCopy b _08193802 .pool _081937E4: @@ -27165,7 +27165,7 @@ _081937F8: adds r0, r5, 0 bl sub_8195898 _08193802: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 str r0, [sp, 0xC] add r0, sp, 0xC movs r6, 0 @@ -27267,7 +27267,7 @@ sub_81938A4: @ 81938A4 sub_81938E0: @ 81938E0 push {r4,lr} bl sub_8194D48 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] ldr r1, =0x00000d0a adds r0, r2, r1 @@ -27606,7 +27606,7 @@ sub_8193BDC: @ 8193BDC adds r0, r1 movs r1, 0xA ldrsh r5, [r0, r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -27796,7 +27796,7 @@ sub_8193D7C: @ 8193D7C ldr r5, =gUnknown_02038BCA ldrh r0, [r5] bl sub_8195358 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] lsls r0, 2 adds r2, r0 @@ -27849,7 +27849,7 @@ _08193E10: ldr r5, =0x000003ff adds r0, r5, 0 bl sub_8195358 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] lsls r0, 2 adds r2, r0 @@ -27909,7 +27909,7 @@ _08193E78: orrs r0, r1 strb r0, [r2] _08193E92: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -27978,7 +27978,7 @@ _08193F18: adds r1, r5, r0 movs r0, 0 str r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, [sp, 0x6C] adds r0, r3, r1 @@ -28081,7 +28081,7 @@ _08193FEE: lsrs r5, r4, 16 lsls r0, 16 orrs r5, r0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r4, =0x00000d64 adds r0, r4 @@ -28294,7 +28294,7 @@ _08194182: ldr r0, [sp, 0x48] lsls r5, r0, 24 _0819419A: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r2, [sp, 0x50] lsls r1, r2, 24 @@ -28685,7 +28685,7 @@ _081944FC: movs r7, 0 movs r5, 0xF _0819456C: - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] adds r0, r7 ldr r1, =0x00000d24 @@ -28698,7 +28698,7 @@ _0819456C: mov r2, r10 cmp r2, 0x1 bne _081945C4 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r2, [r3] adds r0, r2, r7 ldr r1, =0x00000d25 @@ -28721,7 +28721,7 @@ _081945C4: mov r3, r10 cmp r3, 0 bne _08194634 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r0, r2, r7 ldr r1, =0x00000d25 @@ -28781,7 +28781,7 @@ _08194634: ldrsh r0, [r0, r1] cmp r0, 0 beq _08194660 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r3, =0x00000cb2 adds r0, r3 @@ -28790,7 +28790,7 @@ _08194634: b _0819466E .pool _08194660: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000cb2 adds r0, r2 @@ -29221,7 +29221,7 @@ _081949CE: movs r7, 0 ldr r0, =gUnknown_02022E2C mov r9, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 adds r4, r2, 0 ldr r6, =gUnknown_0860D3F1 @@ -29570,7 +29570,7 @@ sub_8194D68: @ 8194D68 sub sp, 0x8 movs r3, 0 _08194D76: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =gUnknown_0203CEF8 adds r0, r3, r0 @@ -29606,7 +29606,7 @@ _08194DBC: _08194DBE: cmp r5, 0x3 bgt _08194DEA - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] add r0, r9 adds r1, r5, 0 @@ -29639,7 +29639,7 @@ _08194E00: mov r6, r8 cmp r6, 0x3 ble _08194DA8 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] movs r2, 0x64 mov r1, r10 @@ -29673,11 +29673,11 @@ sub_8194E44: @ 8194E44 push {r4-r7,lr} sub sp, 0x4 movs r4, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr movs r6, 0x64 movs r5, 0 _08194E50: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =gUnknown_0203CEF8 adds r0, r4, r0 @@ -29756,7 +29756,7 @@ sub_8194EF8: @ 8194EF8 push {r4,lr} bl sub_8194D48 movs r2, 0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r1, =0x00000d25 adds r0, r1 @@ -29779,8 +29779,8 @@ _08194F14: cmp r0, 0 blt _08194F14 _08194F2A: - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsls r2, 2 adds r1, r2 @@ -29808,7 +29808,7 @@ sub_8194F58: @ 8194F58 str r0, [sp, 0x8] str r0, [sp, 0xC] str r0, [sp, 0x10] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] ldr r5, =0x00000d0a adds r0, r2, r5 @@ -29896,7 +29896,7 @@ _08195030: movs r6, 0 cmp r6, r10 bge _08195064 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r3, =0x00000d24 adds r0, r3 @@ -29923,7 +29923,7 @@ _0819504C: _08195064: cmp r6, r10 bne _08194FCC - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r3, [r5] ldr r0, [sp, 0x38] adds r3, r0 @@ -29960,7 +29960,7 @@ _0819509E: movs r7, 0 cmp r7, r6 bge _081950F4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_0203BC8C mov r9, r1 @@ -29998,7 +29998,7 @@ _081950C8: _081950F4: cmp r7, r6 bne _0819509E - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r4, [sp, 0x28] ldr r2, [sp, 0x3C] @@ -30019,7 +30019,7 @@ _081950F4: ldr r6, [sp, 0x24] cmp r6, 0x2 ble _08195092 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] ldr r5, [sp, 0x38] adds r2, r5 @@ -30031,7 +30031,7 @@ _081950F4: adds r1, r4, 0 ands r0, r1 strb r0, [r2] - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r2, [r5] ldr r0, [sp, 0x38] adds r2, r0 @@ -30071,7 +30071,7 @@ _08195178: _08195182: movs r7, 0 strh r7, [r5] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] mov r2, r10 lsls r1, r2, 2 @@ -30089,7 +30089,7 @@ _08195182: ldr r4, [sp, 0x34] mov r9, r4 _081951AA: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] mov r4, r9 add r4, r10 @@ -30127,7 +30127,7 @@ _081951AA: ldr r1, [r2] adds r0, r1 strh r0, [r5] - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] ldr r1, =0x00000d64 adds r0, r1 @@ -30216,7 +30216,7 @@ _08195288: _081952C4: cmp r1, r0 bne _081952F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r3, r10 lsls r0, r3, 2 @@ -30263,7 +30263,7 @@ _08195314: mov r3, r10 cmp r3, 0x3 ble _08195314 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r4, =0x00000ca9 adds r1, r4 @@ -30292,7 +30292,7 @@ sub_8195358: @ 8195358 lsls r0, 16 lsrs r3, r0, 16 movs r2, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000d24 adds r0, r1 @@ -30330,7 +30330,7 @@ sub_81953A0: @ 81953A0 lsls r0, 16 lsrs r3, r0, 16 movs r2, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000d24 adds r0, r1 @@ -30425,7 +30425,7 @@ sub_8195438: @ 8195438 lsls r0, 3 str r0, [sp, 0x14] _0819545E: - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] lsls r4, r5, 2 adds r1, r0, r4 @@ -30453,7 +30453,7 @@ _08195488: ldr r0, [sp] bl sub_81901A0 str r0, [sp, 0x8] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] adds r0, r3, r4 ldr r1, =0x00000d24 @@ -30474,7 +30474,7 @@ _08195488: movs r3, 0x4 orrs r0, r3 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, r2 ldr r2, =0x00000d25 @@ -30489,7 +30489,7 @@ _08195488: ldr r1, [sp, 0x8] ldr r2, [sp] bl sub_8193ED0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r5, [sp, 0x8] lsls r2, r5, 1 @@ -30500,7 +30500,7 @@ _08195488: b _08195874 .pool _08195504: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r3, [r4] ldr r0, [sp, 0x8] lsls r2, r0, 2 @@ -30582,7 +30582,7 @@ _081955AA: lsls r7, r5, 1 ldr r4, [sp, 0x18] _081955B0: - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] ldr r3, =0x00000d64 adds r1, r3 @@ -30614,7 +30614,7 @@ _081955B0: adds r5, 0x1 cmp r5, 0x3 ble _081955AA - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r3, =0x00000d64 adds r0, r3 @@ -30687,7 +30687,7 @@ _08195678: str r5, [sp, 0x3C] ldr r4, [sp, 0x20] _08195682: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r0, =0x00000d64 adds r1, r0 @@ -30721,7 +30721,7 @@ _08195682: ldr r5, [sp, 0x3C] cmp r5, 0x3 ble _08195678 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r5, [sp, 0x1C] adds r1, r3, r5 @@ -30769,7 +30769,7 @@ _08195682: ldr r2, [sp, 0xC] cmp r2, r0 ble _08195784 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r5, [sp, 0x30] adds r1, r5 @@ -30794,7 +30794,7 @@ _08195682: ldr r1, [sp, 0x8] ldr r2, [sp] bl sub_8193ED0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] movs r5, 0xEC lsls r5, 4 @@ -30808,7 +30808,7 @@ _08195784: ldr r5, [sp, 0x10] cmp r3, r5 bge _081957DC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r3, [sp, 0x4] lsls r2, r3, 2 @@ -30819,7 +30819,7 @@ _08195784: movs r3, 0x4 orrs r0, r3 strb r0, [r1] - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] adds r1, r2 ldr r0, =0x00000d25 @@ -30848,7 +30848,7 @@ _081957DC: ldr r5, [sp, 0x8] cmp r3, r5 ble _08195830 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, [sp, 0x30] adds r1, r2 @@ -30858,7 +30858,7 @@ _081957DC: movs r5, 0x4 orrs r0, r5 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, r2 adds r1, r3 @@ -30873,7 +30873,7 @@ _081957DC: ldr r1, [sp, 0x8] ldr r2, [sp] bl sub_8193ED0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] movs r2, 0xEC lsls r2, 4 @@ -30882,7 +30882,7 @@ _081957DC: b _08195872 .pool _08195830: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r0, [sp, 0x4] lsls r2, r0, 2 @@ -30893,7 +30893,7 @@ _08195830: movs r5, 0x4 orrs r0, r5 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, r2 adds r1, r3 @@ -30908,7 +30908,7 @@ _08195830: ldr r1, [sp, 0x4] ldr r2, [sp] bl sub_8193ED0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] movs r2, 0xEC lsls r2, 4 @@ -30954,7 +30954,7 @@ _081958B8: ldr r0, =0x000003ff cmp r5, r0 bne _081958DC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] _081958C2: adds r0, r6, r4 @@ -31056,7 +31056,7 @@ sub_8195960: @ 8195960 thumb_func_start sub_8195980 sub_8195980: @ 8195980 push {r4-r7,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -31112,7 +31112,7 @@ sub_8195980: @ 8195980 adds r1, r0 strh r6, [r1] _081959F2: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -31133,7 +31133,7 @@ _081959F2: thumb_func_start sub_8195A38 sub_8195A38: @ 8195A38 push {r4-r7,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000ca9 adds r0, r1 @@ -31207,7 +31207,7 @@ _08195AD0: thumb_func_start sub_8195AE4 sub_8195AE4: @ 8195AE4 push {r4-r6,lr} - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000ca9 adds r0, r1 @@ -31299,7 +31299,7 @@ sub_8195BB0: @ 8195BB0 ldr r0, =0x000040ce bl VarGet lsls r0, 16 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] ldr r3, =0x00000ca9 adds r1, r2, r3 @@ -31390,7 +31390,7 @@ _08195C6C: thumb_func_start sub_8195C7C sub_8195C7C: @ 8195C7C push {r4-r7,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -31438,7 +31438,7 @@ _08195CCA: thumb_func_start sub_8195CE4 sub_8195CE4: @ 8195CE4 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -31469,7 +31469,7 @@ sub_8195D28: @ 8195D28 ldr r0, =0x000040ce bl VarGet lsls r0, 16 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] ldr r3, =0x00000ca9 adds r1, r2, r3 @@ -31524,7 +31524,7 @@ _08195DA6: thumb_func_start sub_8195DB8 sub_8195DB8: @ 8195DB8 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000dc6 adds r0, r1 @@ -31539,7 +31539,7 @@ sub_8195DB8: @ 8195DB8 ldr r1, =0x00000dc6 adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000dc6 @@ -32182,12 +32182,12 @@ sub_81962D8: @ 81962D8 cmp r0, 0 bne _0819630C ldrh r0, [r1, 0x4] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_81967AC _0819630C: movs r1, 0x4 ldrsh r0, [r4, r1] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_81965D8 movs r0, 0x1 b _0819632A @@ -32672,7 +32672,7 @@ _081966FC: thumb_func_start sub_8196710 sub_8196710: @ 8196710 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x000009ca adds r1, r2 @@ -33046,7 +33046,7 @@ sub_81969E0: @ 81969E0 bl sub_81969FC ldr r1, [r4] adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders pop {r4,r5} pop {r0} bx r0 @@ -33116,7 +33116,7 @@ _08196A5A: adds r0, r1, r0 ldr r1, [r0] adds r0, r5, 0 - bl CopyString + bl StringCopy b _08196A90 .pool _08196A78: @@ -33130,7 +33130,7 @@ _08196A78: ldr r0, =gTrainers + 0x4 @ name offset adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy _08196A90: pop {r4-r6} pop {r0} @@ -33376,7 +33376,7 @@ _08196C26: ldr r0, =gSpeciesNames adds r1, r0 mov r0, r8 - bl CopyString + bl StringCopy b _08196C62 .pool _08196C5C: @@ -33449,7 +33449,7 @@ _08196CD6: ldr r0, =gSpeciesNames adds r1, r0 adds r0, r7, 0 - bl CopyString + bl StringCopy pop {r4-r7} pop {r0} bx r0 @@ -33466,7 +33466,7 @@ sub_8196CF4: @ 8196CF4 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -33496,7 +33496,7 @@ _08196D34: lsrs r3, 24 adds r0, r5, 0 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN pop {r4-r6} pop {r0} bx r0 @@ -33540,14 +33540,14 @@ sub_8196D74: @ 8196D74 ble _08196DF4 bl GameFreakRTC_GetNumDays adds r4, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xA bl sub_80842DC adds r6, r0, 0 ldr r0, =0x0000ffff ands r6, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e6a adds r0, r1 @@ -33617,7 +33617,7 @@ _08196E24: .4byte _08196F60 _08196E40: movs r3, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000d14 adds r0, r1 @@ -33642,7 +33642,7 @@ _08196E5A: b _08196F7C .pool _08196E74: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e08 adds r0, r1 @@ -33662,7 +33662,7 @@ _08196E86: .pool _08196E9C: movs r3, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xCF lsls r1, 4 @@ -33690,7 +33690,7 @@ _08196EB8: .pool _08196ED0: movs r3, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xDD lsls r1, 4 @@ -33718,7 +33718,7 @@ _08196EEC: .pool _08196F04: movs r3, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000dea adds r0, r1 @@ -33744,7 +33744,7 @@ _08196F1E: b _08196F7E .pool _08196F38: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000dde adds r0, r1 @@ -33764,7 +33764,7 @@ _08196F4A: b _08196F7E .pool _08196F60: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e1e adds r0, r1 @@ -33959,19 +33959,19 @@ _081970A2: bl sub_80C0844 lsls r0, 16 lsrs r6, r0, 16 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r10, r0 adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r1, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r1, =gStringVar2 mov r9, r1 mov r0, r9 adds r1, r6, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 bl sub_8196F90 adds r4, r0, 0 @@ -33979,14 +33979,14 @@ _081970A2: lsrs r4, 24 ldr r1, =gUnknown_082A5C9C adds r0, r7, 0 - bl CopyString + bl StringCopy adds r5, r0, 0 movs r6, 0xFB strb r6, [r5] adds r5, 0x1 ldr r1, =gUnknown_082A5D2C adds r0, r5, 0 - bl CopyString + bl StringCopy adds r5, r0, 0 strb r6, [r5] adds r5, 0x1 @@ -33995,10 +33995,10 @@ _081970A2: adds r4, r0 ldr r1, [r4] adds r0, r5, 0 - bl CopyString + bl StringCopy mov r0, r8 adds r1, r7, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r5, r0, 0 bl sub_809D42C cmp r0, 0 @@ -34017,15 +34017,15 @@ _081970A2: adds r1, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r0, r9 adds r1, r6, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_082A633D adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _08197156: adds r0, r7, 0 bl Free @@ -34224,7 +34224,7 @@ AddTextPrinterForMessage: @ 81972C4 adds r3, r0, 0 lsls r3, 24 lsrs r3, 24 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 str r5, [sp] movs r0, 0x2 str r0, [sp, 0x4] @@ -34261,7 +34261,7 @@ AddTextPrinterForMessage_2: @ 8197310 adds r3, r0, 0 lsls r3, 24 lsrs r3, 24 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 movs r0, 0 str r0, [sp] movs r0, 0x2 @@ -34298,7 +34298,7 @@ AddTextPrinterWithCustomSpeedForMessage: @ 819735C ands r1, r2 orrs r1, r0 strb r1, [r4] - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 movs r0, 0 str r0, [sp] movs r0, 0x2 @@ -35042,7 +35042,7 @@ sub_8197964: @ 8197964 ands r0, r1 cmp r0, 0 bne _08197988 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x14] lsls r0, 29 @@ -35059,7 +35059,7 @@ _0819798A: thumb_func_start sav2_get_text_speed sav2_get_text_speed: @ 8197990 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x14] lsls r0, r1, 29 @@ -35231,7 +35231,7 @@ AddTextPrinterWithCallbackForMessage: @ 8197A9C adds r3, r0, 0 lsls r3, 24 lsrs r3, 24 - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 str r5, [sp] movs r0, 0x2 str r0, [sp, 0x4] @@ -40111,10 +40111,10 @@ sub_819A024: @ 819A024 lsls r3, 16 lsrs r5, r3, 16 movs r2, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldrb r0, [r3] - ldr r6, =gUnknown_02021FC4 + ldr r6, =gStringVar4 cmp r0, 0xFF beq _0819A04C _0819A042: @@ -40125,7 +40125,7 @@ _0819A042: bne _0819A042 _0819A04C: adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders lsls r3, r4, 24 lsrs r3, 24 lsls r0, r5, 24 @@ -40559,10 +40559,10 @@ _0819A384: .4byte _0819A404 .4byte _0819A414 _0819A398: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r5, 0 - bl CopyString + bl StringCopy b _0819A43C .pool _0819A3A8: @@ -40582,19 +40582,19 @@ _0819A3BE: adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 movs r0, 0xFF strb r0, [r5] b _0819A43C _0819A3D6: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldrh r1, [r0, 0xE] adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r5, r0, 0 movs r0, 0xF0 strb r0, [r5] @@ -40604,7 +40604,7 @@ _0819A3D6: adds r0, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN b _0819A43C .pool _0819A404: @@ -41215,7 +41215,7 @@ _0819A9D2: lsrs r2, r0, 24 cmp r2, 0x5 bls _0819A9D2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -42485,7 +42485,7 @@ sub_819B484: @ 819B484 lsls r0, 24 lsrs r0, 24 adds r6, r0, 0 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r2, [r7] ldr r0, =0x00000ca9 adds r4, r2, r0 @@ -42541,7 +42541,7 @@ _0819B4EA: movs r3, 0 mov r8, r3 _0819B518: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r2, r8 lsls r0, r2, 1 @@ -42686,7 +42686,7 @@ sub_819B63C: @ 819B63C ldr r2, =gUnknown_0203BC8C ldr r0, =gSlateportBattleTentMons str r0, [r2] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r3, [r1, 0xA] ldrb r0, [r1, 0xB] @@ -42702,7 +42702,7 @@ sub_819B63C: @ 819B63C movs r7, 0 mov r9, r7 _0819B678: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r2, r9 lsls r0, r2, 1 @@ -42819,7 +42819,7 @@ sub_819B764: @ 819B764 movs r7, 0 ldr r0, =gUnknown_0300127C mov r10, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 _0819B778: movs r2, 0 @@ -43138,13 +43138,13 @@ sub_819B9E8: @ 819B9E8 bl pokemon_getattr lsls r0, 16 lsrs r0, 16 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 movs r1, 0xB muls r1, r0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -44833,7 +44833,7 @@ sub_819C810: @ 819C810 movs r1, 0x20 mov r2, sp bl pokemon_setattr - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr mov r8, r3 ldr r3, [r3] ldr r4, [r5] @@ -49030,13 +49030,13 @@ _0819EB8A: bl pokemon_getattr lsls r0, 16 lsrs r1, r0, 16 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 movs r0, 0xB muls r1, r0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -49377,13 +49377,13 @@ _0819EE8E: bl pokemon_getattr lsls r0, 16 lsrs r1, r0, 16 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 movs r0, 0xB muls r1, r0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -49454,13 +49454,13 @@ _0819EF46: bl pokemon_getattr lsls r0, 16 lsrs r1, r0, 16 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 movs r0, 0xB muls r1, r0 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 adds r1, r4, 0 movs r2, 0x56 @@ -50676,7 +50676,7 @@ sub_819F99C: @ 819F99C push {r7} lsls r0, 24 lsrs r5, r0, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] lsls r0, r5, 4 adds r0, r5 @@ -50686,7 +50686,7 @@ sub_819F99C: @ 819F99C ldrb r1, [r1] movs r6, 0 adds r7, r2, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r8, r0 cmp r1, 0 beq _0819F9DC @@ -50713,22 +50713,22 @@ _0819F9DC: lsls r0, 1 adds r1, r0 mov r0, r8 - bl CopyString_Limit7 + bl StringCopy7 ldr r0, [r7] adds r0, r4 ldr r1, =0x0000011b adds r0, r1 ldrb r1, [r0] mov r0, r8 - bl StopMusicWhileStringIsPrinted - ldr r0, =gUnknown_02021DC4 + bl ConvertInternationalString + ldr r0, =gStringVar2 ldr r1, [r7] adds r1, r4 adds r1, 0xDE ldrb r1, [r1] movs r2, 0x1 adds r3, r6, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_08611330 ldr r0, [r7] adds r0, r4 @@ -50738,8 +50738,8 @@ _0819F9DC: lsrs r0, 25 adds r0, r1 ldr r1, [r0] - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders pop {r3} mov r8, r3 pop {r4-r7} @@ -50800,7 +50800,7 @@ sub_819FAA0: @ 819FAA0 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] adds r1, 0xB2 ldrb r2, [r1] @@ -50878,7 +50878,7 @@ _0819FAD6: adds r0, 0xDD strb r4, [r0] movs r2, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr movs r4, 0x88 lsls r4, 1 _0819FB48: @@ -50929,7 +50929,7 @@ _0819FB48: thumb_func_start sub_819FBB0 sub_819FBB0: @ 819FBB0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB1 ldrb r0, [r0] @@ -50945,7 +50945,7 @@ sub_819FBB0: @ 819FBB0 thumb_func_start sub_819FBC8 sub_819FBC8: @ 819FBC8 push {r4,r5,lr} - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] adds r0, 0xDE ldrb r0, [r0] @@ -51008,7 +51008,7 @@ _0819FC38: sub_819FC40: @ 819FC40 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] adds r2, 0xB1 movs r1, 0x3 @@ -51066,7 +51066,7 @@ _0819FC78: cmp r5, 0x31 bls _0819FC78 movs r5, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr movs r4, 0xF _0819FCBC: ldr r3, [r6] @@ -51284,7 +51284,7 @@ _0819FE36: strb r0, [r7] movs r5, 0 _0819FE60: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] lsls r4, r5, 2 adds r3, r4 @@ -51311,7 +51311,7 @@ _0819FE60: ldr r1, [sp, 0x14] ldr r2, [sp, 0x18] bl sub_819FCF8 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] add r3, r8 adds r3, 0xB8 @@ -51325,7 +51325,7 @@ _0819FE60: ands r0, r1 orrs r0, r2 strb r0, [r3] - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] add r0, r8 adds r0, 0xB8 @@ -51388,7 +51388,7 @@ _0819FF12: adds r0, 0x20 adds r0, r1 strb r4, [r0] - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r2, [r6] add r2, r8 adds r2, 0xB8 @@ -51454,7 +51454,7 @@ sub_819FF98: @ 819FF98 ldr r1, [sp] cmp r1, 0x2 bhi _0819FFE0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] adds r0, r1, 0 adds r0, 0xB4 @@ -51476,7 +51476,7 @@ sub_819FF98: @ 819FF98 .pool _0819FFE0: movs r4, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr _0819FFE4: ldr r3, =gUnknown_08610970 lsls r1, r4, 1 @@ -51746,7 +51746,7 @@ sub_81A01E8: @ 81A01E8 mov r12, r1 lsls r0, 16 lsrs r2, r0, 16 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB1 ldrb r1, [r0] @@ -51834,7 +51834,7 @@ sub_81A0284: @ 81A0284 lsrs r6, r1, 24 lsls r2, 24 lsrs r5, r2, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] adds r0, r2, 0 adds r0, 0xB1 @@ -51971,7 +51971,7 @@ sub_81A0390: @ 81A0390 lsrs r0, 24 mov r8, r0 movs r5, 0 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr adds r6, r7, 0 movs r4, 0 _081A03A6: @@ -52030,7 +52030,7 @@ _081A03E6: cmp r5, 0x2 bls _081A03E6 movs r5, 0 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r6, =gUnknown_086109A4 _081A0416: ldr r0, [r7] @@ -52076,7 +52076,7 @@ _081A0416: movs r5, 0 cmp r5, r8 bcs _081A04D6 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr _081A0470: ldr r1, [r7] lsls r0, r5, 2 @@ -52185,7 +52185,7 @@ _081A0540: movs r4, 0 ldr r0, =gSpeciesNames mov r9, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] movs r1, 0xB2 adds r1, r3 @@ -52236,7 +52236,7 @@ _081A05B4: movs r0, 0x12 mov r10, r0 movs r6, 0x8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB1 ldrb r0, [r0] @@ -52581,7 +52581,7 @@ sub_81A085C: @ 81A085C sub_81A087C: @ 81A087C push {r4-r7,lr} bl sub_819FBC8 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] adds r1, 0xB1 ldrb r2, [r1] @@ -52622,7 +52622,7 @@ _081A08BE: cmp r4, 0x2 bls _081A08BE movs r4, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr movs r0, 0x4 negs r0, r0 mov r12, r0 @@ -52727,7 +52727,7 @@ sub_81A0984: @ 81A0984 thumb_func_start sub_81A0990 sub_81A0990: @ 81A0990 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0xB1 ldrb r3, [r2] @@ -52749,7 +52749,7 @@ sub_81A0990: @ 81A0990 thumb_func_start sub_81A09B4 sub_81A09B4: @ 81A09B4 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB1 ldrb r0, [r0] @@ -52763,7 +52763,7 @@ sub_81A09B4: @ 81A09B4 thumb_func_start sub_81A09D0 sub_81A09D0: @ 81A09D0 push {lr} - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r0, [r3] adds r0, 0xB1 ldrb r0, [r0] @@ -52850,7 +52850,7 @@ sub_81A0A70: @ 81A0A70 cmp r0, 0x6 bne _081A0A94 ldr r1, =gUnknown_08610FF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52861,7 +52861,7 @@ _081A0A94: cmp r0, 0x7 bne _081A0AB0 ldr r1, =gUnknown_08610FF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52873,7 +52873,7 @@ _081A0AB0: cmp r0, 0x8 bne _081A0ACC ldr r1, =gUnknown_086111B0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52884,7 +52884,7 @@ _081A0ACC: cmp r0, 0x9 bne _081A0AE8 ldr r1, =gUnknown_086111B0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52896,7 +52896,7 @@ _081A0AE8: cmp r0, 0x4 bne _081A0B04 ldr r1, =gUnknown_08611230 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52907,7 +52907,7 @@ _081A0B04: cmp r0, 0x5 bne _081A0B20 ldr r1, =gUnknown_08611230 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52919,7 +52919,7 @@ _081A0B20: cmp r0, 0xA bne _081A0B40 ldr r2, =gUnknown_08611070 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -52932,7 +52932,7 @@ _081A0B40: cmp r0, 0xB bne _081A0B5C ldr r1, =gUnknown_086112B0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -52943,7 +52943,7 @@ _081A0B5C: cmp r0, 0xC bne _081A0B7C ldr r2, =gUnknown_08611070 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -52957,7 +52957,7 @@ _081A0B7C: cmp r0, 0xD bne _081A0B9C ldr r2, =gUnknown_08611070 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -52972,7 +52972,7 @@ _081A0B9C: cmp r0, 0x10 bne _081A0BC0 ldr r2, =gUnknown_08611070 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -52986,7 +52986,7 @@ _081A0BC0: cmp r0, 0xE bne _081A0BE4 ldr r2, =gUnknown_08611070 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -53003,7 +53003,7 @@ _081A0BE4: cmp r0, 0xF bne _081A0C00 ldr r1, =gUnknown_086112B0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53015,7 +53015,7 @@ _081A0C00: cmp r0, 0 bne _081A0C1C ldr r1, =gUnknown_08610EF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53026,7 +53026,7 @@ _081A0C1C: cmp r0, 0x1 bne _081A0C38 ldr r1, =gUnknown_08610EF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53038,7 +53038,7 @@ _081A0C38: cmp r0, 0x2 bne _081A0C54 ldr r1, =gUnknown_08610EF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53050,7 +53050,7 @@ _081A0C54: cmp r0, 0x3 bne _081A0C74 ldr r1, =gUnknown_08610EF0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53065,8 +53065,8 @@ _081A0C74: bl script_env_2_enable_and_set_ctx_running b _081A0C8E _081A0C7A: - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders movs r0, 0x1 bl AddTextPrinterForMessage ldr r0, =sub_81A0A34 @@ -53096,7 +53096,7 @@ sub_81A0C9C: @ 81A0C9C thumb_func_start sub_81A0CC0 sub_81A0CC0: @ 81A0CC0 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r0, r2, 0 adds r0, 0xB1 @@ -53165,7 +53165,7 @@ sub_81A0D40: @ 81A0D40 cmp r0, 0 beq _081A0D6E ldr r4, =gUnknown_020375E4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0xB2 ldrb r3, [r2] @@ -53192,7 +53192,7 @@ _081A0D6E: thumb_func_start sub_81A0D80 sub_81A0D80: @ 81A0D80 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] adds r0, r3, 0 adds r0, 0xB1 @@ -53240,7 +53240,7 @@ sub_81A0DD4: @ 81A0DD4 push {r6,r7} movs r6, 0 movs r2, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] adds r0, 0xB8 ldrb r0, [r0] @@ -53277,7 +53277,7 @@ _081A0E14: ldrh r0, [r0] cmp r0, 0x2 bne _081A0E88 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r5, [r0] adds r6, r5, 0 adds r6, 0xB1 @@ -53321,7 +53321,7 @@ _081A0E3C: _081A0E88: cmp r0, 0x3 bne _081A0F54 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr mov r8, r0 ldr r5, [r0] movs r1, 0xB1 @@ -53423,7 +53423,7 @@ _081A0EC4: _081A0F54: cmp r0, 0x4 bne _081A0FCE - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] adds r0, r3, 0 adds r0, 0xB1 @@ -53526,15 +53526,15 @@ _081A1018: beq _081A1030 b _081A11E6 _081A101E: - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 b _081A1032 .pool _081A1028: - ldr r5, =gUnknown_02021DC4 + ldr r5, =gStringVar2 b _081A1032 .pool _081A1030: - ldr r5, =gUnknown_02021EC4 + ldr r5, =gStringVar3 _081A1032: ldr r0, =gUnknown_020375E4 ldrh r0, [r0] @@ -53611,7 +53611,7 @@ _081A10DC: b _081A1174 .pool _081A10F4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r1, 0 adds r0, 0xB1 @@ -53628,7 +53628,7 @@ _081A10F4: b _081A1174 .pool _081A1118: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r0, [r0] @@ -53640,11 +53640,11 @@ _081A1118: bl sub_81DB5E8 adds r0, r5, 0 mov r1, sp - bl CopyString + bl StringCopy b _081A11E6 .pool _081A1140: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB1 ldrb r1, [r0] @@ -53660,20 +53660,20 @@ _081A115C: b _081A1174 .pool _081A1164: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0x82 lsls r1, 1 adds r0, r1 bl ConvertBattleFrontierTrainerSpeechToString - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 _081A1174: adds r0, r5, 0 - bl CopyString + bl StringCopy b _081A11E6 .pool _081A1184: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] adds r1, r3, 0 adds r1, 0xB1 @@ -53720,7 +53720,7 @@ _081A11C2: ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy _081A11E6: add sp, 0x10 pop {r4-r6} @@ -53731,7 +53731,7 @@ _081A11E6: thumb_func_start sub_81A11F8 sub_81A11F8: @ 81A11F8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E2 ldrb r1, [r0] @@ -53760,7 +53760,7 @@ sub_81A1224: @ 81A1224 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] adds r0, r3, 0 adds r0, 0xB1 @@ -53931,7 +53931,7 @@ sub_81A1370: @ 81A1370 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r2, 0x8A lsls r2, 1 @@ -53971,7 +53971,7 @@ _081A13B8: negs r2, r2 mov r9, r2 movs r5, 0x1 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr movs r0, 0x90 lsls r0, 1 mov r8, r0 @@ -54005,7 +54005,7 @@ _081A13FC: mov r5, r9 cmp r5, 0 ble _081A1422 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] lsls r0, r5, 4 add r0, r9 @@ -54028,7 +54028,7 @@ _081A1422: thumb_func_start sub_81A1438 sub_81A1438: @ 81A1438 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] adds r0, r2, 0 adds r0, 0xB0 @@ -54075,7 +54075,7 @@ _081A148C: cmp r0, 0 bne _081A147C _081A1496: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] adds r0, 0xDD strb r2, [r0] @@ -54114,7 +54114,7 @@ _081A14C2: movs r2, 0x8A lsls r2, 1 adds r0, r1, r2 - bl CopyString + bl StringCopy ldr r1, [r5] ldr r0, =gUnknown_82E9531 ldrb r0, [r0] @@ -54134,7 +54134,7 @@ _081A14C2: sub_81A150C: @ 81A150C push {lr} ldr r2, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xDC ldrb r0, [r0] @@ -54204,7 +54204,7 @@ _081A1594: sub_81A15A4: @ 81A15A4 push {lr} ldr r2, =gUnknown_08610970 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xB0 ldrb r1, [r0] @@ -54464,7 +54464,7 @@ sub_81A17A0: @ 81A17A0 lsls r0, 7 movs r1, 0xFF bl VarSet - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca8 adds r0, r1 @@ -54496,7 +54496,7 @@ _081A17EE: bl sub_813A878 movs r0, 0x80 lsls r0, 7 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r2, =0x00000ca8 adds r1, r2 @@ -54507,7 +54507,7 @@ _081A17EE: _081A1810: movs r0, 0x80 lsls r0, 7 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r2, =0x00000ca8 adds r1, r2 @@ -54558,7 +54558,7 @@ _081A186C: .4byte _081A1938 _081A188C: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ca8 adds r0, r2 @@ -54568,7 +54568,7 @@ _081A188C: .pool _081A18A8: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ca9 adds r0, r2 @@ -54580,7 +54580,7 @@ _081A18A8: .pool _081A18C8: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000cb2 adds r0, r2 @@ -54590,7 +54590,7 @@ _081A18C8: .pool _081A18E4: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ca9 adds r0, r2 @@ -54609,7 +54609,7 @@ _081A1900: .pool _081A1918: ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ca9 adds r0, r2 @@ -54622,7 +54622,7 @@ _081A1926: .pool _081A1938: ldr r4, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] movs r0, 0xD0 lsls r0, 4 @@ -54681,7 +54681,7 @@ _081A19A4: .4byte _081A1A7C .4byte _081A1AA8 _081A19C4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E4 ldrh r1, [r1] @@ -54691,7 +54691,7 @@ _081A19C4: b _081A1AC4 .pool _081A19E0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -54708,7 +54708,7 @@ _081A19E0: b _081A1AC4 .pool _081A1A0C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E4 ldrh r1, [r1] @@ -54718,7 +54718,7 @@ _081A1A0C: b _081A1AC4 .pool _081A1A28: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -54734,7 +54734,7 @@ _081A1A28: .pool _081A1A50: movs r2, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r4, =0x00000caa ldr r3, =gUnknown_0203CEF8 _081A1A58: @@ -54751,7 +54751,7 @@ _081A1A58: b _081A1AC4 .pool _081A1A7C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E4 ldrb r0, [r0] @@ -54770,7 +54770,7 @@ _081A1A94: b _081A1AC4 .pool _081A1AA8: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] movs r0, 0xD0 lsls r0, 4 @@ -54801,7 +54801,7 @@ sub_81A1AD4: @ 81A1AD4 cmp r3, r0 bge _081A1B00 ldr r7, =gUnknown_0203CEF8 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r5, =0x00000caa _081A1AEA: adds r2, r3, r7 @@ -54846,7 +54846,7 @@ sub_81A1B38: @ 81A1B38 movs r4, 0 movs r5, 0x64 _081A1B3E: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000caa @@ -54858,7 +54858,7 @@ _081A1B3E: lsrs r0, 16 cmp r0, 0x5 bhi _081A1B76 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r1] subs r1, 0x1 @@ -54951,7 +54951,7 @@ _081A1C1E: thumb_func_start sub_81A1C24 sub_81A1C24: @ 81A1C24 push {lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r2, =0x00000cdc adds r1, r2 @@ -55082,15 +55082,15 @@ sub_81A1CD8: @ 81A1CD8 bls _081A1D24 adds r6, r0, 0 _081A1D24: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -55126,7 +55126,7 @@ sub_81A1D78: @ 81A1D78 lsrs r3, 24 lsls r5, 24 lsrs r5, 24 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r4, [r4] lsrs r1, 23 lsrs r0, 22 @@ -55151,7 +55151,7 @@ sub_81A1DBC: @ 81A1DBC push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -55294,33 +55294,33 @@ sub_81A1EA8: @ 81A1EA8 bl FillWindowPixelBuffer cmp r7, 0 bne _081A1EF0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE158 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A1F28 .pool _081A1EF0: cmp r7, 0x1 bne _081A1F08 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE178 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A1F28 .pool _081A1F08: cmp r7, 0x2 bne _081A1F20 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE198 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A1F28 .pool _081A1F20: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE1B7 - bl ExpandStringRefs + bl StringExpandPlaceholders _081A1F28: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0x2 bl sub_81A1C4C ldr r6, =gUnknown_0203AB74 @@ -55396,7 +55396,7 @@ sub_81A1FD8: @ 81A1FD8 push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -55449,15 +55449,15 @@ sub_81A2008: @ 81A2008 movs r1, 0x1 mov r2, r12 bl Print - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r7, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r5, [sp] @@ -55582,17 +55582,17 @@ sub_81A2134: @ 81A2134 bl FillWindowPixelBuffer cmp r7, 0 bne _081A217C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE1DB - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A2184 .pool _081A217C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE1FE - bl ExpandStringRefs + bl StringExpandPlaceholders _081A2184: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl sub_81A1C4C ldr r1, =gUnknown_0203AB74 @@ -55625,7 +55625,7 @@ _081A2184: movs r2, 0x40 movs r3, 0x79 bl sub_81A2094 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] lsls r5, r7, 2 ldr r1, =0x00000d14 @@ -55748,15 +55748,15 @@ sub_81A22B8: @ 81A22B8 bls _081A2304 adds r6, r0, 0 _081A2304: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -55792,7 +55792,7 @@ sub_81A2358: @ 81A2358 lsrs r3, 24 lsls r5, 24 lsrs r5, 24 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r4, [r4] lsrs r1, 23 lsrs r0, 22 @@ -55817,7 +55817,7 @@ sub_81A239C: @ 81A239C push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -55935,17 +55935,17 @@ sub_81A2460: @ 81A2460 bl FillWindowPixelBuffer cmp r7, 0 bne _081A24A8 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE221 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A24B0 .pool _081A24A8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE241 - bl ExpandStringRefs + bl StringExpandPlaceholders _081A24B0: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0x2 bl sub_81A1C4C ldr r6, =gUnknown_0203AB74 @@ -56020,7 +56020,7 @@ _081A24B0: sub_81A2560: @ 81A2560 push {lr} lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 ldr r2, =0x00000e04 @@ -56071,15 +56071,15 @@ sub_81A258C: @ 81A258C movs r1, 0x1 mov r2, r12 bl Print - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r7, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r5, [sp] @@ -56181,10 +56181,10 @@ sub_81A2698: @ 81A2698 ldrb r0, [r6] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE261 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81A1C4C @@ -56218,7 +56218,7 @@ sub_81A2698: @ 81A2698 ldr r0, =gUnknown_085EE319 mov r10, r0 ldr r7, =gUnknown_085EE35B - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000e08 adds r0, r1 @@ -56329,15 +56329,15 @@ sub_81A27E8: @ 81A27E8 bls _081A2834 adds r6, r0, 0 _081A2834: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE381 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -56373,7 +56373,7 @@ sub_81A2888: @ 81A2888 lsrs r5, 24 lsls r3, 24 lsrs r3, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 ldr r2, =0x00000dde @@ -56396,7 +56396,7 @@ sub_81A2888: @ 81A2888 sub_81A28CC: @ 81A28CC push {lr} lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 ldr r2, =0x00000dda @@ -56486,10 +56486,10 @@ sub_81A2968: @ 81A2968 bl FillWindowPixelBuffer movs r0, 0xA bl sub_81A1C90 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE27C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C @@ -56591,16 +56591,16 @@ sub_81A2A28: @ 81A2A28 bls _081A2A80 adds r7, r0, 0 _081A2A80: - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r5, 0 adds r1, r7, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE302 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r6, [sp] @@ -56616,10 +56616,10 @@ _081A2A80: ldr r1, [sp, 0xC] movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085EE392 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r6, [sp] @@ -56661,7 +56661,7 @@ sub_81A2B04: @ 81A2B04 lsrs r4, 24 lsls r5, 24 lsrs r5, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -56696,7 +56696,7 @@ sub_81A2B70: @ 81A2B70 push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -56720,7 +56720,7 @@ sub_81A2BA0: @ 81A2BA0 push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -56861,17 +56861,17 @@ sub_81A2C94: @ 81A2C94 bl FillWindowPixelBuffer cmp r7, 0 bne _081A2CD8 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE298 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081A2CE0 .pool _081A2CD8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EE2B8 - bl ExpandStringRefs + bl StringExpandPlaceholders _081A2CE0: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl sub_81A1C4C ldr r0, =gUnknown_0203AB74 @@ -56997,15 +56997,15 @@ sub_81A2DB4: @ 81A2DB4 bls _081A2E00 adds r6, r0, 0 _081A2E00: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE39C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders mov r1, r10 ldrb r0, [r1] str r7, [sp] @@ -57041,7 +57041,7 @@ sub_81A2E54: @ 81A2E54 lsrs r5, 24 lsls r3, 24 lsrs r3, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 ldr r2, =0x00000e1e @@ -57064,7 +57064,7 @@ sub_81A2E54: @ 81A2E54 sub_81A2E98: @ 81A2E98 push {lr} lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 ldr r2, =0x00000e1a @@ -57154,10 +57154,10 @@ sub_81A2F38: @ 81A2F38 ldrb r0, [r5] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE2D8 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C @@ -57232,10 +57232,10 @@ sub_81A2FF8: @ 81A2FF8 ldrb r0, [r4] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 mov r9, r0 ldr r1, =gUnknown_085EDF86 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 mov r1, r9 movs r2, 0xD0 @@ -57378,7 +57378,7 @@ _081A314A: lsrs r7, r0, 24 lsls r4, r1, 3 _081A315C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000624 adds r0, r1 @@ -57387,7 +57387,7 @@ _081A315C: mov r0, r9 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r6, =gUnknown_0203AB74 ldrb r0, [r6] movs r1, 0x26 @@ -57434,7 +57434,7 @@ sub_81A31FC: @ 81A31FC mov r5, r8 push {r5-r7} sub sp, 0x24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -57470,7 +57470,7 @@ _081A3250: .4byte _081A354C .4byte _081A3594 _081A326C: - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r9, r2 ldr r0, [r2] lsls r3, r7, 1 @@ -57508,9 +57508,9 @@ _081A3298: ldr r5, =gUnknown_020229F0 adds r1, r5 mov r0, sp - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes lsls r1, r7, 3 ldr r0, =0x00000ee1 adds r1, r0 @@ -57518,7 +57518,7 @@ _081A3298: ldr r0, [r2] adds r0, r1 mov r1, sp - bl CopyString + bl StringCopy ldrb r0, [r6] eors r4, r0 lsls r0, r4, 3 @@ -57620,7 +57620,7 @@ _081A338E: bl sub_80EE8C8 b _081A35CE _081A33A8: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] lsls r7, 1 mov r2, r8 @@ -57670,7 +57670,7 @@ _081A3404: bl sub_80EE8C8 b _081A35CE _081A3414: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] lsls r7, 1 mov r2, r8 @@ -57721,7 +57721,7 @@ _081A346C: bl sub_80EE8C8 b _081A35CE _081A347C: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] lsls r4, r7, 1 ldr r5, =0x00000dda @@ -57757,7 +57757,7 @@ _081A34AE: b _081A35CE .pool _081A34CC: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r2, [r6] lsls r7, 1 mov r9, r7 @@ -57811,7 +57811,7 @@ _081A353C: bl sub_80EE8C8 b _081A35CE _081A354C: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] lsls r4, r7, 1 ldr r5, =0x00000e04 @@ -57841,7 +57841,7 @@ _081A354C: b _081A35CE .pool _081A3594: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] lsls r4, r7, 1 ldr r5, =0x00000e1a @@ -58017,7 +58017,7 @@ _081A36F2: lsls r0, 1 cmp r3, r0 bne _081A370C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000bfc b _081A38C4 @@ -58043,7 +58043,7 @@ _081A3738: ldr r0, =0x0000018f cmp r3, r0 bhi _081A3758 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr movs r0, 0xEC muls r0, r3 ldr r1, [r1] @@ -58063,7 +58063,7 @@ _081A3766: lsls r0, 1 cmp r3, r0 bne _081A3780 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000c08 b _081A38C4 @@ -58102,7 +58102,7 @@ _081A37B8: ands r0, r1 cmp r0, 0 bne _081A387C - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr movs r0, 0xEC muls r0, r3 ldr r1, [r1] @@ -58118,7 +58118,7 @@ _081A37EC: ands r0, r1 cmp r0, 0 bne _081A387C - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr lsls r0, r3, 4 adds r0, r3 lsls r0, 2 @@ -58132,7 +58132,7 @@ _081A3818: lsls r0, 1 cmp r3, r0 bne _081A3830 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000c14 b _081A38C4 @@ -58176,7 +58176,7 @@ _081A387C: b _081A38F8 .pool _081A3890: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr movs r0, 0xEC muls r0, r3 ldr r1, [r1] @@ -58204,7 +58204,7 @@ _081A38C4: b _081A38F8 .pool _081A38D4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0xfffffe70 adds r2, r3, r0 @@ -58234,7 +58234,7 @@ sub_81A3908: @ 81A3908 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000cdc adds r1, r2 @@ -58322,7 +58322,7 @@ _081A399E: thumb_func_start sub_81A39C4 sub_81A39C4: @ 81A39C4 push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -58355,7 +58355,7 @@ _081A3A0C: .4byte _081A3A98 .4byte _081A3AAC _081A3A28: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r5, 2 @@ -58365,7 +58365,7 @@ _081A3A28: b _081A3AB4 .pool _081A3A3C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r5, 2 @@ -58374,7 +58374,7 @@ _081A3A3C: b _081A3AB4 .pool _081A3A54: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r5, 2 @@ -58383,14 +58383,14 @@ _081A3A54: b _081A3AB4 .pool _081A3A6C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000dda b _081A3AB4 .pool _081A3A80: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r5, 2 @@ -58399,14 +58399,14 @@ _081A3A80: b _081A3AB4 .pool _081A3A98: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000e04 b _081A3AB4 .pool _081A3AAC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000e1a @@ -58428,7 +58428,7 @@ _081A3AC6: sub_81A3ACC: @ 81A3ACC push {r4,r5,lr} movs r2, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r4, =0x00000cb4 ldr r0, =0x0000ffff adds r3, r0, 0 @@ -58502,7 +58502,7 @@ sub_81A3B64: @ 81A3B64 mov r6, r8 push {r6,r7} movs r5, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -58535,7 +58535,7 @@ _081A3BB4: .4byte _081A3C44 .4byte _081A3C60 _081A3BD0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r6, 2 @@ -58545,7 +58545,7 @@ _081A3BD0: b _081A3C68 .pool _081A3BE4: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r6, 2 @@ -58557,7 +58557,7 @@ _081A3BE4: b _081A3C78 .pool _081A3C00: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r6, 2 @@ -58566,14 +58566,14 @@ _081A3C00: b _081A3C68 .pool _081A3C18: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000dda b _081A3C68 .pool _081A3C2C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 lsls r2, r6, 2 @@ -58582,7 +58582,7 @@ _081A3C2C: b _081A3C68 .pool _081A3C44: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000e04 @@ -58593,7 +58593,7 @@ _081A3C44: b _081A3C70 .pool _081A3C60: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000e1a @@ -58633,18 +58633,18 @@ _081A3C84: bne _081A3CA6 adds r5, 0xA _081A3CA6: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] ldr r4, =0x00000eb8 adds r1, r4 ldrh r0, [r1] adds r0, r5 strh r0, [r1] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r6] adds r2, r0, r4 ldrh r0, [r2] @@ -58805,60 +58805,60 @@ _081A3E0C: _081A3E38: cmp r5, r4 bne _081A3E50 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB79 - bl AppendString + bl StringAppend b _081A3EC8 .pool _081A3E50: cmp r5, r4 ble _081A3EC8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB7F - bl AppendString + bl StringAppend b _081A3EC8 .pool _081A3E68: cmp r4, r5 bne _081A3E80 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB79 - bl AppendString + bl StringAppend b _081A3E88 .pool _081A3E80: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB7F - bl AppendString + bl StringAppend _081A3E88: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB86 - bl AppendString + bl StringAppend b _081A3EC8 .pool _081A3EA0: cmp r4, r5 bne _081A3EB8 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB79 - bl AppendString + bl StringAppend b _081A3EC0 .pool _081A3EB8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB7F - bl AppendString + bl StringAppend _081A3EC0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB84 - bl AppendString + bl StringAppend _081A3EC8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xB muls r1, r6 ldr r2, =gSpeciesNames adds r1, r2 - bl AppendString + bl StringAppend _081A3ED6: adds r0, r4, 0 pop {r4-r6} @@ -59164,7 +59164,7 @@ _081A412A: cmp r2, r0 bne _081A4112 _081A4134: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 movs r0, 0xFF strb r0, [r1] ldr r1, =gUnknown_020375E0 @@ -59196,13 +59196,13 @@ _081A416A: ldrb r4, [r0] cmp r4, 0 bne _081A41A4 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r1, =gUnknown_085CCB82 adds r0, r4, 0 - bl AppendString + bl StringAppend ldr r1, =gUnknown_085CCB88 adds r0, r4, 0 - bl AppendString + bl StringAppend b _081A4202 .pool _081A41A4: @@ -59210,26 +59210,26 @@ _081A41A4: ands r0, r4 cmp r0, 0 beq _081A41C0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB84 - bl AppendString + bl StringAppend b _081A41C8 .pool _081A41C0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB82 - bl AppendString + bl StringAppend _081A41C8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085CCB8C - bl AppendString + bl StringAppend b _081A4202 .pool _081A41E0: ldr r1, =gUnknown_020375E0 movs r0, 0 strh r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375F0 ldrb r0, [r0] @@ -59266,7 +59266,7 @@ sub_81A4224: @ 81A4224 thumb_func_start sub_81A4230 sub_81A4230: @ 81A4230 push {r4-r7,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -59301,7 +59301,7 @@ _081A4278: .4byte _081A4368 .4byte _081A437C _081A4294: - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] lsls r4, 1 lsls r1, r5, 2 @@ -59331,7 +59331,7 @@ _081A4294: b _081A4392 .pool _081A42DC: - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] lsls r2, r4, 1 lsls r1, r5, 2 @@ -59357,7 +59357,7 @@ _081A42F8: b _081A4392 .pool _081A431C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r0, r4, 1 lsls r1, r5, 2 @@ -59368,7 +59368,7 @@ _081A431C: b _081A4388 .pool _081A4338: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000dda @@ -59376,7 +59376,7 @@ _081A4338: b _081A4386 .pool _081A434C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r0, r4, 1 lsls r1, r5, 2 @@ -59387,7 +59387,7 @@ _081A434C: b _081A4388 .pool _081A4368: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000e04 @@ -59395,7 +59395,7 @@ _081A4368: b _081A4386 .pool _081A437C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r3, =0x00000e1a @@ -59422,10 +59422,10 @@ sub_81A43A8: @ 81A43A8 push {r4-r6,lr} sub sp, 0x4 movs r4, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr movs r5, 0x64 _081A43B2: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000caa @@ -59472,7 +59472,7 @@ sub_81A4410: @ 81A4410 ldr r4, =gUnknown_020375F0 bl sub_8185338 strh r0, [r4] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ca9 adds r1, r0 @@ -59498,14 +59498,14 @@ sub_81A443C: @ 81A443C b _081A446E .pool _081A4450: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02038BCA ldrh r1, [r1] bl sub_8162E20 b _081A446E .pool _081A4464: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_02038BCA ldrh r1, [r1] bl sub_8162E20 @@ -59526,7 +59526,7 @@ sub_81A447C: @ 81A447C movs r0, 0 str r0, [sp] _081A448C: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, [sp] lsls r1, r2, 1 @@ -59557,7 +59557,7 @@ _081A44BA: adds r0, r6, 0x1 mov r10, r0 _081A44C6: - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000caa adds r0, r2 @@ -59569,7 +59569,7 @@ _081A44C6: movs r0, 0xEA lsls r0, 1 adds r1, r0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] adds r0, r1 adds r1, r5, 0 @@ -59601,9 +59601,9 @@ _081A4516: lsrs r6, r0, 24 cmp r6, 0x3 bls _081A44BA - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r1, [r2] ldr r4, =0x00000caa adds r1, r4 @@ -59720,11 +59720,11 @@ sub_81A4594: @ 81A4594 bls _081A4618 adds r1, r0, 0 _081A4618: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r1, =gUnknown_08611D08 ldr r0, [sp, 0x4C] lsls r0, 2 @@ -59732,7 +59732,7 @@ _081A4618: ldr r4, [r0] adds r0, r5, 0 adds r1, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC8 @@ -59847,7 +59847,7 @@ sub_81A4684: @ 81A4684 _081A4734: add r0, sp, 0xC adds r1, r4, 0 - bl CopyString + bl StringCopy _081A473C: ldr r2, =gUnknown_0203AB74 mov r9, r2 @@ -59879,16 +59879,16 @@ _081A473C: bls _081A4778 adds r1, r0, 0 _081A4778: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r0, =gUnknown_08611D08 ldr r4, [r0, 0x24] adds r0, r5, 0 adds r1, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC8 @@ -59939,7 +59939,7 @@ sub_81A47E0: @ 81A47E0 bl sub_80E8260 add r0, sp, 0x30 mov r12, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r3, [sp, 0x40] lsls r1, r3, 1 @@ -60051,7 +60051,7 @@ sub_81A48B4: @ 81A48B4 str r0, [sp, 0x70] add r1, sp, 0x5C mov r12, r1 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r0, 0x54 mov r2, r10 @@ -60158,18 +60158,18 @@ sub_81A4998: @ 81A4998 sub sp, 0x94 adds r7, r0, 0 str r1, [sp, 0x90] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r4, =gUnknown_08611CB0 lsls r5, r7, 3 adds r1, r5, r4 ldr r1, [r1] - bl CopyString - ldr r6, =gUnknown_02021FC4 + bl StringCopy + ldr r6, =gStringVar4 adds r4, 0x4 adds r5, r4 ldr r1, [r5] adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, =gUnknown_0203AB74 mov r8, r0 ldrb r0, [r0] @@ -60208,7 +60208,7 @@ sub_81A4998: @ 81A4998 bl Print cmp r7, 0x9 bne _081A4A6C - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r0, [r2] ldr r1, =0x00000ee8 adds r0, r1 @@ -60323,7 +60323,7 @@ sub_81A4B14: @ 81A4B14 push {r5-r7} sub sp, 0x8 movs r1, 0 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr _081A4B24: movs r6, 0 lsls r0, r1, 1 @@ -60379,7 +60379,7 @@ _081A4B44: cmp r1, 0x8 ble _081A4B24 movs r6, 0 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr movs r2, 0x54 mov r10, r2 movs r3, 0xFF @@ -61144,7 +61144,7 @@ _081A51E4: b _081A5228 .pool _081A51F4: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_08611DB0 lsls r1, 2 adds r1, r2 @@ -61152,11 +61152,11 @@ _081A51F4: lsls r1, r4, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy b _081A5228 .pool _081A5214: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r2, =gUnknown_08611DB8 lsls r1, 2 adds r1, r2 @@ -61164,7 +61164,7 @@ _081A5214: lsls r1, r4, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy _081A5228: pop {r4,r5} pop {r0} @@ -61913,7 +61913,7 @@ _081A58A4: thumb_func_start sub_81A58B4 sub_81A58B4: @ 81A58B4 push {r4-r6,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r3, =0x00000ca9 adds r0, r1, r3 @@ -61967,7 +61967,7 @@ _081A591E: adds r0, r1 strh r2, [r0] _081A5930: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -61989,7 +61989,7 @@ _081A5930: thumb_func_start sub_81A5964 sub_81A5964: @ 81A5964 push {r4,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -62057,7 +62057,7 @@ _081A59EE: thumb_func_start sub_81A59FC sub_81A59FC: @ 81A59FC push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =0x00000ca9 adds r0, r2, r1 @@ -62149,7 +62149,7 @@ _081A5ABA: thumb_func_start sub_81A5AC4 sub_81A5AC4: @ 81A5AC4 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -62177,7 +62177,7 @@ sub_81A5AC4: @ 81A5AC4 thumb_func_start sub_81A5B08 sub_81A5B08: @ 81A5B08 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -62230,7 +62230,7 @@ _081A5B76: thumb_func_start sub_81A5B88 sub_81A5B88: @ 81A5B88 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000dd8 adds r0, r1 @@ -62245,7 +62245,7 @@ sub_81A5B88: @ 81A5B88 ldr r1, =0x00000dd8 adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000dd8 @@ -62270,7 +62270,7 @@ _081A5BD6: thumb_func_start sub_81A5BE0 sub_81A5BE0: @ 81A5BE0 push {lr} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02038BCA ldrh r1, [r1] bl sub_8162E20 @@ -62584,7 +62584,7 @@ sub_81A5E74: @ 81A5E74 thumb_func_start sub_81A5E94 sub_81A5E94: @ 81A5E94 push {r4-r7,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r4, =0x00000ca9 adds r0, r4 @@ -62646,7 +62646,7 @@ _081A5F0A: movs r0, 0 strb r0, [r1] movs r2, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr movs r4, 0xE7 lsls r4, 4 ldr r0, =0x0000ffff @@ -62702,7 +62702,7 @@ _081A5F40: thumb_func_start sub_81A5FA8 sub_81A5FA8: @ 81A5FA8 push {r4-r7,lr} - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] ldr r1, =0x00000ca9 adds r0, r1 @@ -62777,7 +62777,7 @@ _081A6044: thumb_func_start sub_81A6054 sub_81A6054: @ 81A6054 push {r4-r6,lr} - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000ca9 adds r0, r1 @@ -62876,7 +62876,7 @@ _081A6128: thumb_func_start sub_81A613C sub_81A613C: @ 81A613C push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -62945,7 +62945,7 @@ sub_81A61B0: @ 81A61B0 mov r5, r8 push {r5-r7} sub sp, 0x28 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -62995,7 +62995,7 @@ _081A61FA: ldr r2, =0x00000cb4 adds r0, r1, r2 ldrh r0, [r0] - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr cmp r0, r3 beq _081A6244 ldr r1, [r6] @@ -63016,7 +63016,7 @@ _081A6244: ldr r0, [r4] ldr r1, =0x00000cb2 adds r0, r1 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldrh r0, [r0] cmp r7, r0 bne _081A61FA @@ -63059,7 +63059,7 @@ _081A627A: cmp r0, 0xC9 beq _081A636E movs r3, 0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr mov r8, r1 adds r5, r0, 0 ldr r1, [r6] @@ -63202,7 +63202,7 @@ sub_81A63CC: @ 81A63CC push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -63221,7 +63221,7 @@ _081A63FC: _081A6400: str r0, [r1] movs r7, 0 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r8, r2 _081A6408: mov r0, r8 @@ -63307,7 +63307,7 @@ sub_81A64C4: @ 81A64C4 mov r5, r8 push {r5-r7} sub sp, 0x24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r2, r0, r1 @@ -63353,7 +63353,7 @@ _081A6522: ldr r2, =gUnknown_0203BC8C mov r9, r2 _081A6534: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r2, [r4] mov r5, r8 lsls r5, 1 @@ -63493,7 +63493,7 @@ _081A6602: mov r2, r10 add r2, r8 lsls r2, 2 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] adds r2, r0 ldr r0, =0x00000e79 @@ -63520,7 +63520,7 @@ _081A667A: ldr r4, =gUnknown_0203BC8C mov r9, r4 _081A6682: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r3, [r5] mov r0, r8 adds r0, 0x3 @@ -63655,7 +63655,7 @@ _081A674E: mov r2, r10 add r2, r8 lsls r2, 2 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] adds r2, r0 ldr r5, =0x00000e9d @@ -63697,7 +63697,7 @@ sub_81A67EC: @ 81A67EC mov r1, sp adds r1, 0x18 str r1, [sp, 0x3C] - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr mov r9, r2 movs r2, 0 adds r3, r1, 0 @@ -63889,7 +63889,7 @@ _081A6994: _081A699C: cmp r3, r6 bne _081A69E2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r5, r8 lsls r3, r5, 1 @@ -64219,7 +64219,7 @@ _081A6C0C: thumb_func_start sub_81A6C1C sub_81A6C1C: @ 81A6C1C push {r4,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -64243,7 +64243,7 @@ _081A6C50: muls r0, r4 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] lsls r1, r4, 1 adds r1, r4 @@ -64306,7 +64306,7 @@ sub_81A6CD0: @ 81A6CD0 mov r5, r8 push {r5-r7} sub sp, 0x34 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000ca9 adds r0, r1 @@ -64383,7 +64383,7 @@ _081A6D6A: b _081A6EB8 _081A6D78: movs r2, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] movs r3, 0xE7 lsls r3, 4 @@ -64633,7 +64633,7 @@ sub_81A6F70: @ 81A6F70 push {lr} lsls r0, 24 lsls r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r2, [r2] lsrs r1, 23 lsrs r0, 22 @@ -64667,7 +64667,7 @@ _081A6FA8: thumb_func_start sub_81A6FB4 sub_81A6FB4: @ 81A6FB4 push {r4,r5,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000ca9 adds r0, r1 @@ -64856,7 +64856,7 @@ _081A7132: thumb_func_start sub_81A7140 sub_81A7140: @ 81A7140 push {lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca9 adds r0, r2 @@ -64965,7 +64965,7 @@ _081A723A: thumb_func_start sub_81A7248 sub_81A7248: @ 81A7248 push {r4,r5,lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca9 adds r0, r2 @@ -65119,7 +65119,7 @@ _081A73AA: thumb_func_start sub_81A73B8 sub_81A73B8: @ 81A73B8 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -65171,7 +65171,7 @@ sub_81A740C: @ 81A740C thumb_func_start sub_81A7418 sub_81A7418: @ 81A7418 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -65293,7 +65293,7 @@ sub_81A74E0: @ 81A74E0 thumb_func_start sub_81A7508 sub_81A7508: @ 81A7508 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -65614,7 +65614,7 @@ _081A774A: mov r8, r0 cmp r0, 0x9 bls _081A774A - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r4, =0x00000cb2 adds r0, r4 @@ -65851,7 +65851,7 @@ _081A7956: thumb_func_start sub_81A7974 sub_81A7974: @ 81A7974 push {r4-r7,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -65916,7 +65916,7 @@ _081A79E6: sub_81A79EC: @ 81A79EC push {r4-r6,lr} sub sp, 0x8 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] movs r4, 0xE1 lsls r4, 4 @@ -66022,7 +66022,7 @@ _081A7AA0: lsls r0, 24 lsrs r4, r0, 24 _081A7ABE: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xE1 lsls r1, 4 @@ -66142,7 +66142,7 @@ sub_81A7B90: @ 81A7B90 bl sub_81A7D00 lsls r0, 24 lsrs r6, r0, 24 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r0, [r7] ldr r4, =0x00000ca9 adds r0, r4 @@ -66303,7 +66303,7 @@ _081A7CE2: thumb_func_start sub_81A7D00 sub_81A7D00: @ 81A7D00 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -66823,7 +66823,7 @@ sub_81A80DC: @ 81A80DC movs r0, 0x1 strh r0, [r4] bl GenerateRandomNumber - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r4, [r5] lsls r0, 16 lsrs r0, 16 @@ -66851,7 +66851,7 @@ sub_81A80DC: @ 81A80DC .pool _081A8138: bl GenerateRandomNumber - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r4, [r7] lsls r0, 16 lsrs r0, 16 @@ -66919,7 +66919,7 @@ _081A81B4: bcc _081A8184 _081A81BE: bl GenerateRandomNumber - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r4, [r7] lsls r0, 16 lsrs r0, 16 @@ -66962,7 +66962,7 @@ _081A81BE: orrs r0, r1 strb r0, [r2] _081A821C: - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] movs r4, 0xE1 lsls r4, 4 @@ -66998,7 +66998,7 @@ _081A824C: thumb_func_start sub_81A825C sub_81A825C: @ 81A825C ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r2, 0xE1 lsls r2, 4 @@ -67015,7 +67015,7 @@ sub_81A825C: @ 81A825C sub_81A827C: @ 81A827C ldr r2, =gUnknown_020375F0 ldr r1, =gUnknown_0861266C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r3, 0xE1 lsls r3, 4 @@ -67039,7 +67039,7 @@ sub_81A82A4: @ 81A82A4 bne _081A82B0 movs r7, 0x1 _081A82B0: - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -67099,7 +67099,7 @@ _081A831A: ldrh r0, [r5] movs r1, 0 bl sub_8162614 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000cb2 adds r2, r1, r0 @@ -67123,7 +67123,7 @@ _081A8356: thumb_func_start sub_81A8374 sub_81A8374: @ 81A8374 push {r4-r7,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -67184,7 +67184,7 @@ _081A83EE: ldrh r0, [r5] movs r1, 0 bl sub_8162614 - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r0, =0x00000cb2 adds r2, r1, r0 @@ -67218,7 +67218,7 @@ _081A8426: ldrh r0, [r0] cmp r0, r4 beq _081A8466 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] subs r2, 0x2 adds r0, r1, r2 @@ -67245,7 +67245,7 @@ _081A8466: ldrh r0, [r5] movs r1, 0x1 bl sub_8162614 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000cb2 adds r2, r1, r0 @@ -67270,7 +67270,7 @@ _081A849A: sub_81A84B4: @ 81A84B4 push {r4,r5,lr} movs r2, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r4, =0x00000cb4 ldr r0, =0x0000ffff adds r3, r0, 0 @@ -67375,7 +67375,7 @@ sub_81A8590: @ 81A8590 push {r4-r6,lr} lsls r0, 24 movs r6, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] ldr r3, =0x00000ca9 adds r1, r2, r3 @@ -67473,7 +67473,7 @@ sub_81A8658: @ 81A8658 push {r4,lr} ldr r3, =gUnknown_08612675 ldr r2, =gUnknown_020375E6 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xE1 lsls r1, 4 @@ -67499,7 +67499,7 @@ sub_81A8658: @ 81A8658 thumb_func_start sub_81A869C sub_81A869C: @ 81A869C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E2 ldrb r1, [r0] @@ -67624,8 +67624,8 @@ _081A8786: sub_81A8794: @ 81A8794 push {r4-r7,lr} movs r5, 0 - ldr r7, =gUnknown_03005D8C - ldr r6, =gUnknown_03005D90 + ldr r7, =gSaveBlock1Ptr + ldr r6, =gSaveBlock2Ptr _081A879C: ldr r0, [r6] lsls r4, r5, 1 @@ -67663,7 +67663,7 @@ sub_81A87E8: @ 81A87E8 push {r4,lr} movs r4, 0 _081A87EC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r3, r4, 1 ldr r1, =0x00000caa @@ -67693,7 +67693,7 @@ _081A87EC: thumb_func_start sub_81A8830 sub_81A8830: @ 81A8830 push {r4-r6,lr} - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -67879,7 +67879,7 @@ sub_81A89A0: @ 81A89A0 lsls r0, 24 lsrs r0, 24 str r0, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -67989,7 +67989,7 @@ _081A8A74: adds r0, r3 strh r0, [r4, 0x6] ldrb r0, [r4] - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r2, [r6] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -68061,7 +68061,7 @@ _081A8B0C: lsls r0, 2 mov r10, r0 _081A8B22: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r3, 0xC7 lsls r3, 4 @@ -68145,7 +68145,7 @@ _081A8BB4: lsls r0, 3 adds r0, r7 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -68238,7 +68238,7 @@ _081A8C72: lsls r0, 3 adds r0, r7 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -68316,7 +68316,7 @@ _081A8D12: lsls r0, 3 adds r0, r7 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -68381,7 +68381,7 @@ sub_81A8D94: @ 81A8D94 lsrs r4, r0, 24 lsls r1, 24 lsrs r6, r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -68525,7 +68525,7 @@ sub_81A8E7C: @ 81A8E7C thumb_func_start sub_81A8E9C sub_81A8E9C: @ 81A8E9C push {r4-r6,lr} - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r4, =0x00000ca9 adds r0, r1, r4 @@ -68591,7 +68591,7 @@ _081A8F14: thumb_func_start sub_81A8F38 sub_81A8F38: @ 81A8F38 push {r4,lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca9 adds r0, r2 @@ -68706,7 +68706,7 @@ _081A903A: thumb_func_start sub_81A9048 sub_81A9048: @ 81A9048 push {lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =0x00000ca9 adds r0, r2, r1 @@ -68808,7 +68808,7 @@ _081A9126: thumb_func_start sub_81A9134 sub_81A9134: @ 81A9134 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -68838,7 +68838,7 @@ sub_81A9134: @ 81A9134 thumb_func_start sub_81A917C sub_81A917C: @ 81A917C push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -68891,7 +68891,7 @@ _081A91EA: thumb_func_start sub_81A91FC sub_81A91FC: @ 81A91FC push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000e18 adds r0, r1 @@ -68906,7 +68906,7 @@ sub_81A91FC: @ 81A91FC ldr r1, =0x00000e18 adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000e18 @@ -68932,7 +68932,7 @@ _081A924A: sub_81A9254: @ 81A9254 push {r4,r5,lr} movs r4, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr _081A925A: bl GenerateRandomNumber ldr r1, [r5] @@ -68944,7 +68944,7 @@ _081A925A: adds r4, 0x1 cmp r4, 0x3 ble _081A925A - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e2a adds r0, r1 @@ -68964,7 +68964,7 @@ CalculateBattlePyramidItemBallItemId: @ 81A9290 mov r5, r8 push {r5-r7} sub sp, 0x4 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -69097,7 +69097,7 @@ _081A9396: thumb_func_start sub_81A93C8 sub_81A93C8: @ 81A93C8 push {r4,r5,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -69153,7 +69153,7 @@ sub_81A9424: @ 81A9424 movs r0, 0 mov r9, r0 movs r7, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -69296,7 +69296,7 @@ _081A9572: lsrs r0, 20 adds r0, r1 ldrb r7, [r0, 0x1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e2a adds r0, r1 @@ -69376,7 +69376,7 @@ _081A95EE: thumb_func_start sub_81A9618 sub_81A9618: @ 81A9618 push {r4,r5,lr} - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -69437,7 +69437,7 @@ sub_81A9684: @ 81A9684 b _081A9754 .pool _081A9698: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -69461,7 +69461,7 @@ _081A96B4: ands r0, r1 cmp r0, 0 bne _081A9754 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000e68 adds r1, r0, r2 @@ -69490,7 +69490,7 @@ _081A9710: beq _081A9750 subs r0, 0x1 strh r0, [r1] - ldr r3, =gUnknown_03005D90 + ldr r3, =gSaveBlock2Ptr ldr r1, [r3] ldr r2, =0x00000e68 adds r1, r2 @@ -69541,7 +69541,7 @@ _081A9776: mov r6, r9 muls r6, r5 _081A977E: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00000caa @@ -69597,7 +69597,7 @@ sub_81A97DC: @ 81A97DC ands r0, r1 cmp r0, 0 beq _081A980C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -69636,7 +69636,7 @@ sub_81A9834: @ 81A9834 movs r0, 0 str r0, [sp] _081A9844: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, [sp] lsls r1, r2, 1 @@ -69657,7 +69657,7 @@ _081A9844: movs r1, 0 str r1, [sp, 0x10] _081A986C: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] adds r0, r6 movs r1, 0xB @@ -69698,7 +69698,7 @@ _081A98C4: _081A98C6: cmp r5, 0x3 bgt _081A98EE - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] add r0, r9 adds r1, r5, 0 @@ -69727,7 +69727,7 @@ _081A9900: mov r6, r8 cmp r6, 0x3 ble _081A98AC - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] ldr r2, [sp, 0x8] adds r0, r2 @@ -69766,7 +69766,7 @@ _081A994C: _081A9958: movs r2, 0 str r2, [sp] - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r3, =0x00000caa ldr r2, =gUnknown_0203CEF8 _081A9962: @@ -69939,7 +69939,7 @@ _081A9A98: thumb_func_start sub_81A9AA8 sub_81A9AA8: @ 81A9AA8 lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 adds r1, r0 @@ -69955,7 +69955,7 @@ GetBattlePyramidTrainerFlag: @ 81A9AC4 push {r4,lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r2, [r1] ldr r1, =0x00000e2a adds r2, r1 @@ -70017,9 +70017,9 @@ sub_81A9B44: @ 81A9B44 ldr r0, =gUnknown_02037350 mov r12, r0 ldr r6, =gUnknown_03005DF0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r10, r1 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr mov r9, r7 ldr r0, =0x00000cb4 mov r8, r0 @@ -70092,7 +70092,7 @@ _081A9B86: sub_81A9C04: @ 81A9C04 push {r4-r6,lr} sub sp, 0x14 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -70291,7 +70291,7 @@ _081A9DA4: adds r2, r0, 0 cmp r2, 0x3 ble _081A9DA4 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e1a adds r0, r1 @@ -70399,7 +70399,7 @@ sub_81A9E90: @ 81A9E90 cmp r0, 0 beq _081A9EB8 bl sub_81A9834 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca8 adds r0, r1 @@ -70531,7 +70531,7 @@ sub_81A9F90: @ 81A9F90 push {r7} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r1, =0x00000ca9 adds r0, r4, r1 @@ -70565,7 +70565,7 @@ _081A9FCC: movs r2, 0 cmp r2, r5 bge _081AA004 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r4, =0x00000cb4 adds r0, r4 @@ -70603,7 +70603,7 @@ _081AA026: movs r2, 0 cmp r2, r5 bge _081AA05E - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r4, =0x00000cb4 adds r0, r4 @@ -70717,7 +70717,7 @@ _081AA10A: str r1, [sp, 0x14] cmp r12, r3 bge _081AA1A2 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr str r2, [sp, 0x18] mov r4, r9 mov r5, r10 @@ -70819,7 +70819,7 @@ sub_81AA1D8: @ 81AA1D8 adds r6, 0x1 add r0, sp, 0x4 mov r8, r0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r3, =0x00000cb4 ldr r0, =0x0000ffff adds r2, r0, 0 @@ -70842,7 +70842,7 @@ _081AA1F2: bl sub_81AA33C movs r0, 0 str r0, [sp, 0x4] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0xC7 lsls r0, 4 @@ -70941,7 +70941,7 @@ _081AA2E4: thumb_func_start sub_81AA2F8 sub_81AA2F8: @ 81AA2F8 push {r4,r5,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r5, =gUnknown_08252C4F ldr r4, =gUnknown_08252C6A @@ -70977,7 +70977,7 @@ sub_81AA33C: @ 81AA33C push {r4-r7,lr} adds r4, r0, 0 adds r6, r1, 0 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldr r2, =0x00000e28 adds r0, r1, r2 @@ -71037,7 +71037,7 @@ sub_81AA398: @ 81AA398 bl AllocZeroed str r0, [sp, 0x8] bl sub_81AA96C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e26 adds r0, r1 @@ -71091,7 +71091,7 @@ _081AA414: _081AA42E: ldr r0, =gUnknown_0832A328 mov r12, r0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r7, =0x00000e28 movs r3, 0x2 lsls r0, r4, 2 @@ -71530,7 +71530,7 @@ sub_81AA760: @ 81AA760 mov r8, r2 lsls r3, 24 lsrs r7, r3, 24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000e22 adds r0, r1 @@ -71630,7 +71630,7 @@ sub_81AA810: @ 81AA810 mov r10, r4 lsls r5, 24 lsrs r6, r5, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -71757,7 +71757,7 @@ _081AA8DC: adds r0, r4, 0 bl sub_81627A4 strb r0, [r5, 0x1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb4 adds r0, r1 @@ -71790,7 +71790,7 @@ _081AA95C: sub_81AA96C: @ 81AA96C push {r4-r7,lr} adds r6, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000e22 adds r1, r0, r2 @@ -71819,7 +71819,7 @@ _081AA994: asrs r4, 3 cmp r3, 0x7 bne _081AA9C0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000e26 adds r0, r1, r2 @@ -71843,7 +71843,7 @@ _081AA9C0: thumb_func_start sub_81AA9E4 sub_81AA9E4: @ 81AA9E4 push {r4,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r1, =0x00000e28 adds r0, r4, r1 @@ -71886,7 +71886,7 @@ _081AAA3A: thumb_func_start sub_81AAA40 sub_81AAA40: @ 81AAA40 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -71925,7 +71925,7 @@ sub_81AAA7C: @ 81AAA7C lsls r0, 24 lsrs r0, 24 movs r3, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 lsls r1, r0, 2 adds r1, r0 @@ -71968,7 +71968,7 @@ _081AAA9E: thumb_func_start CalculateBattlePyramidPickupItemId CalculateBattlePyramidPickupItemId: @ 81AAAE0 push {r4-r6,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000ca9 adds r0, r1, r2 @@ -72695,7 +72695,7 @@ _081AB13C: lsls r0, 24 cmp r0, 0 bne _081AB164 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -72719,7 +72719,7 @@ _081AB174: lsrs r0, 24 cmp r0, 0x1 beq _081AB18A - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -72878,7 +72878,7 @@ _081AB2B6: ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8DB4 - bl CopyString + bl StringCopy ldr r0, =gUnknown_0203CE74 ldr r0, [r0] lsls r1, r6, 3 @@ -72981,7 +72981,7 @@ get_name: @ 81AB39C b _081AB43E .pool _081AB3C0: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 adds r0, r5, 0 bl ItemIdToBattleMoveId lsls r0, 16 @@ -72991,44 +72991,44 @@ _081AB3C0: ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0xA9 lsls r0, 1 cmp r5, r0 bls _081AB408 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0xfffffeae adds r1, r5, r2 movs r2, 0x2 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085E921A b _081AB438 .pool _081AB408: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0xfffffee0 adds r1, r5, r2 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN b _081AB436 .pool _081AB420: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 subs r1, 0x84 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r1, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r1, =gStringVar2 adds r0, r5, 0 bl itemid_get_name _081AB436: ldr r1, =gUnknown_085E9210 _081AB438: adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _081AB43E: pop {r4-r6} pop {r0} @@ -73208,15 +73208,15 @@ _081AB5BE: ldrb r0, [r5, 0x5] cmp r0, 0x3 bne _081AB610 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -73241,15 +73241,15 @@ _081AB610: lsrs r5, r0, 24 cmp r5, 0 bne _081AB66C - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, r9 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -73270,7 +73270,7 @@ _081AB652: b _081AB696 .pool _081AB66C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00000496 adds r0, r1 @@ -73326,18 +73326,18 @@ bag_menu_print_description_box_text: @ 81AB6B0 b _081AB6FC .pool _081AB6E0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085E9180 ldr r1, =gUnknown_0203CE58 ldrb r1, [r1, 0x4] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E91C0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _081AB6FC: movs r0, 0x1 movs r1, 0 @@ -74003,15 +74003,15 @@ sub_81ABC54: @ 81ABC54 bne _081ABC6C movs r3, 0x3 _081ABC6C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, 16 asrs r1, 16 movs r2, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0x28 @@ -74048,13 +74048,13 @@ sub_81ABCC0: @ 81ABCC0 bne _081ABCD4 movs r3, 0x3 _081ABCD4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x2 - bl ConvertIntToDecimalString - ldr r6, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r6, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders lsls r4, 24 lsrs r4, 24 movs r0, 0x1 @@ -74800,12 +74800,12 @@ bag_menu_swap_items: @ 81AC2E8 bl bag_pocket_get_itemid lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 mov r8, r0 ldr r1, =gUnknown_085E8DFE - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -75422,7 +75422,7 @@ _081AC92C: ldr r1, =gUnknown_08614030 movs r2, 0x4 bl memcpy - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00000496 adds r0, r1 @@ -75516,12 +75516,12 @@ _081ACA12: _081ACA50: ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DBE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -76087,12 +76087,12 @@ ItemMenu_Toss: @ 81ACEF4 _081ACF24: ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8EE0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -76137,18 +76137,18 @@ BagMenuConfirmToss: @ 81ACF88 adds r4, r0 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x10 ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8F0E adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -76274,18 +76274,18 @@ BagMenuActuallyToss: @ 81AD0CC adds r6, r4, r5 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x10 ldrsh r1, [r6, r2] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r6, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r6, =gStringVar4 ldr r1, =gUnknown_085E8EF9 adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -76395,7 +76395,7 @@ ItemMenu_Register: @ 81AD1EC adds r6, r1, r2 adds r0, 0x8 adds r5, r1, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00000496 adds r1, r0, r2 @@ -76508,12 +76508,12 @@ bag_menu_print_cant_be_held_msg: @ 81AD30C lsrs r4, 24 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E8E11 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_81AD350 adds r0, r4, 0 movs r1, 0x1 @@ -76651,12 +76651,12 @@ _081AD44C: cmp r0, 0 bne _081AD488 ldrh r0, [r4] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8E27 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_81AD350 adds r0, r5, 0 movs r1, 0x1 @@ -76764,7 +76764,7 @@ _081AD550: movs r1, 0 movs r2, 0 bl ChangeBgY_ScreenOff - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r5, =0x00000496 adds r1, r0, r5 @@ -76835,12 +76835,12 @@ display_sell_item_ask_str: @ 81AD5DC cmp r0, 0 bne _081AD634 ldrh r0, [r6] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E960F adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 @@ -76861,12 +76861,12 @@ _081AD634: b _081AD66A _081AD64C: ldrh r0, [r6] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E962F adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_81AD730 adds r0, r7, 0 movs r1, 0x1 @@ -76890,7 +76890,7 @@ sub_81AD680: @ 81AD680 lsls r4, 3 ldr r0, =gTasks + 0x8 adds r4, r0 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] bl itemid_get_market_price @@ -76902,11 +76902,11 @@ sub_81AD680: @ 81AD680 adds r0, r6, 0 movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9654 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_81AD6E4 adds r0, r5, 0 movs r1, 0x1 @@ -77093,9 +77093,9 @@ sub_81AD84C: @ 81AD84C adds r4, r0 ldr r6, =gUnknown_0203CE7C ldrh r0, [r6] - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r8, r0 ldrh r0, [r6] bl itemid_get_market_price @@ -77107,11 +77107,11 @@ sub_81AD84C: @ 81AD84C mov r0, r8 movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9677 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r3, =sub_81AD8C8 adds r0, r5, 0 movs r1, 0x1 @@ -77158,7 +77158,7 @@ sub_81AD8C8: @ 81AD8C8 mov r3, r10 ldrh r1, [r3, 0x10] bl remove_item - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] movs r1, 0x92 lsls r1, 3 @@ -77201,7 +77201,7 @@ sub_81AD8C8: @ 81AD8C8 ldr r1, =0x00000819 adds r0, r1 ldrb r4, [r0] - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] movs r3, 0x92 lsls r3, 3 @@ -77273,12 +77273,12 @@ display_deposit_item_ask_str: @ 81AD9EC _081ADA18: ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8E42 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -77424,19 +77424,19 @@ _081ADB6C: cmp r6, 0x1 bne _081ADBD4 ldrh r0, [r4] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 mov r2, r8 movs r3, 0x10 ldrsh r1, [r2, r3] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8E5A adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders str r6, [sp] str r5, [sp, 0x4] str r5, [sp, 0x8] @@ -77540,7 +77540,7 @@ PrepareBagForWallyTutorial: @ 81ADC70 movs r0, 0xD0 bl AllocZeroed str r0, [r4] - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r1, [r5] movs r2, 0xAC lsls r2, 3 @@ -77579,7 +77579,7 @@ _081ADCAE: adds r6, 0x1 cmp r6, 0x4 bls _081ADCAE - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] movs r1, 0xAC lsls r1, 3 @@ -77603,7 +77603,7 @@ _081ADCAE: @ void RestoreBagAfterWallyTutorial() RestoreBagAfterWallyTutorial: @ 81ADD00 push {r4-r6,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] movs r1, 0xAC lsls r1, 3 @@ -78257,7 +78257,7 @@ bag_menu_add_money_window: @ 81AE268 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -78387,12 +78387,12 @@ _081AE354: b _081AE39C .pool _081AE38C: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrb r1, [r5, 0x1] adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r2, r4, 0 _081AE39C: movs r0, 0xC @@ -78420,12 +78420,12 @@ _081AE39C: b _081AE3E8 .pool _081AE3D8: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrb r1, [r2, 0x3] adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r2, r4, 0 _081AE3E8: movs r0, 0x18 @@ -78442,7 +78442,7 @@ _081AE3E8: movs r1, 0x1 movs r3, 0x7 bl bag_menu_print - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 ldr r1, =gBattleMoves adds r0, r6, r7 lsls r0, 2 @@ -78451,7 +78451,7 @@ _081AE3E8: adds r0, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x24 str r0, [sp] str r4, [sp, 0x4] @@ -81610,7 +81610,7 @@ _081AFC48: cmp r1, 0 beq _081AFC5E adds r0, r2, 0 - bl CopyString + bl StringCopy adds r2, r0, 0 _081AFC5E: adds r4, 0x1 @@ -81643,7 +81643,7 @@ sub_81AFC74: @ 81AFC74 sav1_are_mapnumbers_in_given_list: @ 81AFC84 push {r4,lr} adds r2, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -81716,7 +81716,7 @@ sav2_set_x9_bit3_when_sav1_in_pokecenter: @ 81AFCFC bl sav1_is_in_pokecenter cmp r0, 0 bne _081AFD18 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0xFD @@ -81724,7 +81724,7 @@ sav2_set_x9_bit3_when_sav1_in_pokecenter: @ 81AFCFC b _081AFD22 .pool _081AFD18: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x2 @@ -81742,7 +81742,7 @@ sub_81AFD2C: @ 81AFD2C bl sub_81AFCDC cmp r0, 0 bne _081AFD48 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0xFB @@ -81750,7 +81750,7 @@ sub_81AFD2C: @ 81AFD2C b _081AFD52 .pool _081AFD48: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x4 @@ -81768,7 +81768,7 @@ sub_81AFD5C: @ 81AFD5C bl sub_81AFCEC cmp r0, 0 bne _081AFD78 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0xF7 @@ -81776,7 +81776,7 @@ sub_81AFD5C: @ 81AFD5C b _081AFD82 .pool _081AFD78: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x8 @@ -81800,7 +81800,7 @@ sav2_set_x9_depending_on_sav1_map: @ 81AFD8C thumb_func_start sub_81AFDA0 sub_81AFDA0: @ 81AFDA0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0xA8 ldr r0, [r2] @@ -81826,7 +81826,7 @@ sub_81AFDA0: @ 81AFDA0 thumb_func_start sub_81AFDD0 sub_81AFDD0: @ 81AFDD0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r1, [r2, 0x9] movs r0, 0x80 @@ -83647,14 +83647,14 @@ _081B0D24: movs r2, 0 movs r3, 0 bl _call_via_r4 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r5, 0x4 add r5, r8 adds r0, r4, 0 adds r1, r5, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r4, 0 bl sub_81DB52C ldrb r0, [r6, 0x8] @@ -84790,10 +84790,10 @@ _081B168A: ldr r0, [r0] adds r0, 0xD bl sub_81B302C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 adds r1, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -85416,7 +85416,7 @@ GetMonNickname: @ 81B1B44 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 pop {r4} pop {r1} bx r1 @@ -85575,15 +85575,15 @@ sub_81B1C84: @ 81B1C84 lsrs r4, 16 lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E991B adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -85604,15 +85604,15 @@ sub_81B1CD0: @ 81B1CD0 lsrs r4, 16 lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E999D adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -85633,15 +85633,15 @@ sub_81B1D1C: @ 81B1D1C lsrs r4, 16 lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E993A adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -85664,15 +85664,15 @@ sub_81B1D68: @ 81B1D68 lsrs r4, 16 lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r4, 0 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E99DB adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 adds r1, r5, 0 bl sub_81B1B5C @@ -85764,9 +85764,9 @@ _081B1E3E: thumb_func_start pokemon_item_not_removed pokemon_item_not_removed: @ 81B1E48 push {lr} - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9A69 - bl ExpandStringRefs + bl StringExpandPlaceholders pop {r0} bx r0 .pool @@ -85840,13 +85840,13 @@ _081B1EDC: ldrsh r0, [r7, r2] cmp r1, r0 ble _081B1EF8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r3, 0xA ldrsh r2, [r7, r3] subs r1, r2 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _081B1EF8: mov r0, r8 bl SwitchTaskToFollowupFunc @@ -87336,19 +87336,19 @@ sub_81B2B40: @ 81B2B40 adds r6, r1, 0 lsls r2, 24 lsrs r2, 24 - ldr r5, =gUnknown_02021DC4 + ldr r5, =gStringVar2 adds r0, r5, 0 adds r1, r2, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021CC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar1 ldr r1, =gUnknown_085E8D4D adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 adds r1, r5, 0 - bl AppendString + bl StringAppend ldrb r0, [r6, 0x8] ldr r3, [r6] adds r3, 0x8 @@ -87444,7 +87444,7 @@ _081B2C24: ldr r0, =gSpeciesNames adds r1, r0 mov r0, r9 - bl CompareString + bl StringCompare cmp r0, 0 beq _081B2CBA _081B2C38: @@ -87569,12 +87569,12 @@ sub_81B2D3C: @ 81B2D3C adds r4, r1, 0 lsls r2, 16 lsrs r2, 16 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r5, 0 adds r1, r2, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xBA strb r1, [r0] movs r1, 0xFF @@ -87652,19 +87652,19 @@ sub_81B2DDC: @ 81B2DDC adds r6, r1, 0 lsls r2, 16 lsrs r2, 16 - ldr r5, =gUnknown_02021DC4 + ldr r5, =gStringVar2 adds r0, r5, 0 adds r1, r2, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021CC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar1 ldr r1, =gUnknown_085E8D3E adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 adds r1, r5, 0 - bl AppendString + bl StringAppend ldrb r0, [r6, 0x8] ldr r3, [r6] adds r3, 0x14 @@ -88027,13 +88027,13 @@ _081B3104: movs r2, 0x4F movs r3, 0xD bl SetWindowBorderStyle - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_08615AF4 lsls r0, r6, 2 adds r0, r1 ldr r1, [r0] adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r0, [r5] movs r1, 0x1 str r1, [sp] @@ -88662,7 +88662,7 @@ sub_81B3608: @ 81B3608 muls r0, r1 ldr r7, =gUnknown_020244EC adds r5, r0, r7 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname ldr r0, =gUnknown_0203CEC4 @@ -88697,10 +88697,10 @@ _081B3674: lsrs r6, r0, 16 cmp r6, 0 bne _081B36C0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -88729,7 +88729,7 @@ _081B36C0: bl sub_81B33B4 movs r0, 0x1 bl sub_81B31B0 - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r6, 0 bl itemid_get_name movs r0, 0x1A @@ -90276,7 +90276,7 @@ _081B4402: bl bag_add_item ldrh r0, [r6] bl pokemon_item_not_removed - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl sub_81B1B5C ldr r1, =gTasks @@ -90390,7 +90390,7 @@ sub_81B452C: @ 81B452C bl pokemon_getattr lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -90635,20 +90635,20 @@ sub_81B4724: @ 81B4724 b _081B47BA .pool _081B4788: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 b _081B47B4 .pool _081B47AC: adds r0, r6, 0 bl pokemon_item_not_removed - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 _081B47B4: movs r1, 0x1 bl sub_81B1B5C @@ -90696,13 +90696,13 @@ sub_81B47E0: @ 81B47E0 bl sub_81B302C cmp r5, 0 bne _081B4864 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r7, 0 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9980 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -90715,13 +90715,13 @@ sub_81B47E0: @ 81B47E0 b _081B488A .pool _081B4864: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9E00 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -90799,12 +90799,12 @@ _081B491A: bl pokemon_getattr lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9E14 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -90962,7 +90962,7 @@ sub_81B4A98: @ 81B4A98 adds r0, r1 movs r1, 0x40 bl pokemon_getattr - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -91232,7 +91232,7 @@ _081B4CBE: _081B4D24: adds r0, r4, 0 bl pokemon_item_not_removed - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl sub_81B1B5C ldr r1, =gTasks @@ -91316,7 +91316,7 @@ _081B4DE4: bl pokemon_getattr lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 bl itemid_get_name movs r0, 0x1A bl display_pokemon_menu_message @@ -91363,7 +91363,7 @@ _081B4E5C: ldr r0, [r5] adds r0, 0xD bl sub_81B302C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -91452,15 +91452,15 @@ _081B4F2C: cmp r5, r6 bcc _081B4EC6 _081B4F36: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9830 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x20 bl audio_play adds r0, r4, 0 @@ -91701,15 +91701,15 @@ sub_81B50C8: @ 81B50C8 b _081B51B0 .pool _081B515C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA210 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B5178 .pool _081B5170: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA234 - bl ExpandStringRefs + bl StringExpandPlaceholders _081B5178: movs r0, 0x20 bl audio_play @@ -91720,10 +91720,10 @@ _081B5178: ldr r0, [r4] adds r0, 0xD bl sub_81B302C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA1CA adds r0, r4, 0 - bl AppendString + bl StringAppend adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -91804,14 +91804,14 @@ brm_trade_1: @ 81B51D4 bl sub_807A7E0 cmp r0, 0 beq _081B52C8 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_08615E0C subs r0, 0x1 lsls r0, 2 adds r0, r1 ldr r1, [r0] adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x20 bl audio_play ldr r4, =gUnknown_0203CEC4 @@ -91823,7 +91823,7 @@ brm_trade_1: @ 81B51D4 bl sub_81B302C ldr r1, =gUnknown_085EA1CA adds r0, r5, 0 - bl AppendString + bl StringAppend adds r0, r5, 0 movs r1, 0x1 bl sub_81B1B5C @@ -91884,21 +91884,21 @@ _081B5328: beq _081B5354 b _081B5368 _081B532E: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA1E8 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B53C0 .pool _081B5340: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA210 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B53C0 .pool _081B5354: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA234 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B53C0 .pool _081B5368: @@ -91911,12 +91911,12 @@ _081B5368: muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA1CD adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -91931,10 +91931,10 @@ _081B5368: _081B53C0: movs r0, 0x20 bl audio_play - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA1CA adds r0, r4, 0 - bl AppendString + bl StringAppend adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -92126,7 +92126,7 @@ _081B5574: bl sub_8161560 b _081B5664 _081B557C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x1C ldrsb r0, [r1, r0] @@ -92139,15 +92139,15 @@ _081B557C: lsrs r1, 16 bl get_mapheader_by_bank_and_number adds r1, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r1, 0x14] bl sub_81245DC - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA196 b _081B55E8 .pool _081B55B8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] adds r0, r1, 0 adds r0, 0x24 @@ -92164,13 +92164,13 @@ _081B55B8: lsrs r1, 16 bl get_mapheader_by_bank_and_number adds r1, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r1, 0x14] bl sub_81245DC - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA16B _081B55E8: - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r6, 0 bl sub_81B5674 ldr r0, =gUnknown_0203CEC4 @@ -92230,7 +92230,7 @@ sub_81B5674: @ 81B5674 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -93782,7 +93782,7 @@ IsHPRecoveryItem: @ 81B62D0 lsrs r0, 16 cmp r0, 0xAF bne _081B62EC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003214 adds r0, r1 @@ -93852,104 +93852,104 @@ _081B6334: .4byte _081B6494 .4byte _081B64A8 _081B6380: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9C3E - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B6394: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9C7C - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B63A8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9C8A - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B63BC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9CA2 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B63D0: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9C5F - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B63E4: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9DBE - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B63F8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9DE1 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B640C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9CE0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B6420: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085E96E3 b _081B6474 .pool _081B6430: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EA33C b _081B6474 .pool _081B6440: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EA343 b _081B6474 .pool _081B6450: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085EA35B b _081B6474 .pool _081B6460: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085E96E6 b _081B6474 .pool _081B6470: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085E96EE _081B6474: - bl CopyString - ldr r0, =gUnknown_02021FC4 + bl StringCopy + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9D25 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B6494: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9CF5 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B64A8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9CB7 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B64C4 .pool _081B64BC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E96F6 - bl ExpandStringRefs + bl StringExpandPlaceholders _081B64C4: pop {r0} bx r0 @@ -94208,12 +94208,12 @@ _081B66A8: b _081B6710 .pool _081B66E4: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname adds r0, r6, 0 bl GetMedicineItemEffectMessage - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 _081B66F4: movs r1, 0x1 bl sub_81B1B5C @@ -94252,12 +94252,12 @@ sub_81B672C: @ 81B672C muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -94386,10 +94386,10 @@ _081B6874: adds r0, r6, 0 movs r1, 0x1 bl remove_item - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r7, 0 bl option_menu_get_string ldr r2, [sp, 0x4] @@ -94398,23 +94398,23 @@ _081B6874: ldr r0, [sp, 0x8] cmp r0, r8 beq _081B68C4 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9D45 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B68E0 .pool _081B68C4: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9D90 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081B68E0 .pool _081B68D8: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9D6D - bl ExpandStringRefs + bl StringExpandPlaceholders _081B68E0: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 _081B68E2: movs r1, 0x1 bl sub_81B1B5C @@ -94549,13 +94549,13 @@ _081B69F0: ldr r1, =gUnknown_085E96E6 _081B69F2: adds r0, r2, 0 - bl CopyString + bl StringCopy b _081B6A08 .pool _081B6A00: ldr r1, =gUnknown_085E96EE adds r0, r2, 0 - bl CopyString + bl StringCopy _081B6A08: pop {r0} bx r0 @@ -94686,7 +94686,7 @@ dp05_ether: @ 81B6AFC ldrh r0, [r0] cmp r0, 0xAF bne _081B6B20 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003214 adds r0, r1 @@ -94835,15 +94835,15 @@ _081B6C34: bl pokemon_getattr lsls r0, 16 lsrs r4, r0, 16 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0xD muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy adds r0, r5, 0 bl GetMedicineItemEffectMessage - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 _081B6C7E: movs r1, 0x1 bl sub_81B1B5C @@ -94966,9 +94966,9 @@ _081B6D6C: sub_81B6D74: @ 81B6D74 push {r4,lr} adds r1, r0, 0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -95022,20 +95022,20 @@ sub_81B6DC4: @ 81B6DC4 mov r8, r0 ldr r0, =gUnknown_0203CE7C ldrh r4, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname adds r0, r4, 0 bl ItemIdToBattleMoveId strh r0, [r7, 0xE] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xE ldrsh r2, [r7, r1] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy movs r0, 0 mov r1, r8 strh r0, [r1, 0x2] @@ -95126,21 +95126,21 @@ sub_81B6EB4: @ 81B6EB4 movs r1, 0x1 bl remove_item _081B6EF0: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0 ldrsh r2, [r6, r1] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9AA5 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -95424,15 +95424,15 @@ sub_81B7154: @ 81B7154 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xD muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r0, =gUnknown_085E9BB8 bl sub_81B6D74 ldr r1, =gTasks @@ -95495,7 +95495,7 @@ sub_81B7230: @ 81B7230 adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_0203CEC8 movs r3, 0xE ldrsh r2, [r1, r3] @@ -95503,11 +95503,11 @@ sub_81B7230: @ 81B7230 muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9B5D adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -95581,21 +95581,21 @@ _081B7300: beq _081B7392 b _081B73C2 _081B7306: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r4, 0 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xE ldrsh r2, [r7, r1] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9B76 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -95631,10 +95631,10 @@ _081B738C: movs r0, 0x5 bl audio_play _081B7392: - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r4, 0 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_0203CEC8 movs r3, 0xE ldrsh r2, [r1, r3] @@ -95642,7 +95642,7 @@ _081B7392: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r0, =gUnknown_085E9AE9 bl sub_81B6D74 ldr r1, =gTasks @@ -95762,10 +95762,10 @@ _081B74B4: ldrh r0, [r0] movs r1, 0x1 bl remove_item - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 adds r0, r5, 0 movs r1, 0x38 bl pokemon_getattr @@ -95773,11 +95773,11 @@ _081B74B4: adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9D0A adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -96195,20 +96195,20 @@ sub_81B787C: @ 81B787C muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r6, =gUnknown_020244E2 ldrh r2, [r6] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9AE9 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -96251,18 +96251,18 @@ sub_81B7910: @ 81B7910 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xD muls r1, r5 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9AA5 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x1 bl sub_81B1B5C @@ -96566,12 +96566,12 @@ sub_81B7C10: @ 81B7C10 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E9C17 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81B1B5C @@ -96653,7 +96653,7 @@ GetItemEffectType: @ 81B7CEC _081B7D00: cmp r1, 0xAF bne _081B7D18 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003214 adds r4, r0, r1 @@ -96864,21 +96864,21 @@ sub_81B7E4C: @ 81B7E4C movs r0, 0xE adds r0, r7 mov r8, r0 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname ldr r4, =gUnknown_020375E2 ldrb r0, [r4] bl sub_81B2360 strh r0, [r7, 0xE] - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xE ldrsh r2, [r7, r1] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy movs r0, 0x2 mov r1, r8 strh r0, [r1, 0x2] @@ -97190,7 +97190,7 @@ sub_81B814C: @ 81B814C bl pokemon_getattr lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -97377,7 +97377,7 @@ _081B82FA: bl sub_81B841C ldrh r0, [r6] bl pokemon_item_not_removed - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 movs r1, 0 bl sub_81B1B5C b _081B8378 @@ -97546,7 +97546,7 @@ sub_81B8474: @ 81B8474 ldr r1, =gUnknown_0203CEE8 movs r0, 0 strb r0, [r1] - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_0203BCB8 ldrh r1, [r0] adds r1, 0x6 @@ -97685,7 +97685,7 @@ sub_81B85AC: @ 81B85AC lsrs r0, 24 cmp r4, r0 bhi _081B8608 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000191a @@ -97772,10 +97772,10 @@ sub_81B865C: @ 81B865C b _081B8758 .pool _081B8688: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x11 b _081B8758 .pool @@ -98300,12 +98300,12 @@ sub_81B8A7C: @ 81B8A7C cmp r5, 0x5 bne _081B8AC4 _081B8AA2: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_806EBF8 adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r0, =gUnknown_02021FC4 + bl StringCopy + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E97B2 b _081B8C42 .pool @@ -98320,10 +98320,10 @@ _081B8AC4: bl pokemon_getattr cmp r0, 0 bne _081B8AF8 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r4, 0 bl GetMonNickname - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E978F b _081B8C42 .pool @@ -98366,7 +98366,7 @@ _081B8B24: bl pokemon_getattr cmp r0, 0 beq _081B8B60 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E97E5 b _081B8C42 .pool @@ -98381,10 +98381,10 @@ _081B8B60: ldrb r1, [r1] cmp r0, r1 bne _081B8B94 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r6, 0 bl GetMonNickname - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E976F b _081B8C42 .pool @@ -98432,9 +98432,9 @@ _081B8BFC: muls r0, r5 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9754 b _081B8C42 .pool @@ -98450,12 +98450,12 @@ _081B8C20: lsrs r0, 24 muls r0, r7 add r0, r8 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetMonNickname - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9738 _081B8C42: - bl ExpandStringRefs + bl StringExpandPlaceholders _081B8C46: movs r0, 0 _081B8C48: @@ -99831,15 +99831,15 @@ sub_81B9718: @ 81B9718 adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl GetMonNickname - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r1, 0xD muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy pop {r4,r5} pop {r0} bx r0 @@ -100134,7 +100134,7 @@ sub_81B99B4: @ 81B99B4 thumb_func_start sub_81B99D4 sub_81B99D4: @ 81B99D4 push {lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca8 adds r0, r2 @@ -100151,7 +100151,7 @@ sub_81B99D4: @ 81B99D4 negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -100169,7 +100169,7 @@ sub_81B99D4: @ 81B99D4 thumb_func_start sub_81B9A28 sub_81B9A28: @ 81B9A28 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000e6a adds r0, r2 @@ -100181,7 +100181,7 @@ sub_81B9A28: @ 81B9A28 thumb_func_start sub_81B9A44 sub_81B9A44: @ 81B9A44 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E4 ldrh r1, [r1] @@ -100240,7 +100240,7 @@ _081B9AAC: thumb_func_start sub_81B9ABC sub_81B9ABC: @ 81B9ABC push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -100268,7 +100268,7 @@ sub_81B9ABC: @ 81B9ABC thumb_func_start sub_81B9B00 sub_81B9B00: @ 81B9B00 push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_086160D4 bl GenerateRandomNumber @@ -100285,7 +100285,7 @@ sub_81B9B00: @ 81B9B00 thumb_func_start sub_81B9B28 sub_81B9B28: @ 81B9B28 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000e6a adds r0, r1 @@ -100300,7 +100300,7 @@ sub_81B9B28: @ 81B9B28 ldr r1, =0x00000e6a adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000e6a @@ -100340,7 +100340,7 @@ sub_81B9B80: @ 81B9B80 thumb_func_start sub_81B9BA0 sub_81B9BA0: @ 81B9BA0 push {lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca8 adds r0, r2 @@ -100357,7 +100357,7 @@ sub_81B9BA0: @ 81B9BA0 negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -100375,7 +100375,7 @@ sub_81B9BA0: @ 81B9BA0 thumb_func_start sub_81B9BF4 sub_81B9BF4: @ 81B9BF4 ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000e6c adds r0, r2 @@ -100387,7 +100387,7 @@ sub_81B9BF4: @ 81B9BF4 thumb_func_start sub_81B9C10 sub_81B9C10: @ 81B9C10 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E4 ldrh r1, [r1] @@ -100401,7 +100401,7 @@ sub_81B9C10: @ 81B9C10 thumb_func_start sub_81B9C2C sub_81B9C2C: @ 81B9C2C push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -100429,7 +100429,7 @@ sub_81B9C2C: @ 81B9C2C thumb_func_start sub_81B9C70 sub_81B9C70: @ 81B9C70 push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_086160F4 bl GenerateRandomNumber @@ -100446,7 +100446,7 @@ sub_81B9C70: @ 81B9C70 thumb_func_start sub_81B9C98 sub_81B9C98: @ 81B9C98 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000e6c adds r0, r1 @@ -100461,7 +100461,7 @@ sub_81B9C98: @ 81B9C98 ldr r1, =0x00000e6c adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000e6c @@ -100486,7 +100486,7 @@ _081B9CE6: thumb_func_start sub_81B9CF0 sub_81B9CF0: @ 81B9CF0 push {lr} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_02038BCA ldrh r1, [r1] bl sub_8162E20 @@ -100513,7 +100513,7 @@ sub_81B9D08: @ 81B9D08 thumb_func_start sub_81B9D28 sub_81B9D28: @ 81B9D28 push {lr} - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldr r2, =0x00000ca8 adds r0, r2 @@ -100530,7 +100530,7 @@ sub_81B9D28: @ 81B9D28 negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -100548,7 +100548,7 @@ sub_81B9D28: @ 81B9D28 thumb_func_start sub_81B9D7C sub_81B9D7C: @ 81B9D7C ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000e6e adds r0, r2 @@ -100560,7 +100560,7 @@ sub_81B9D7C: @ 81B9D7C thumb_func_start sub_81B9D98 sub_81B9D98: @ 81B9D98 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =gUnknown_020375E4 ldrh r1, [r1] @@ -100574,7 +100574,7 @@ sub_81B9D98: @ 81B9D98 thumb_func_start sub_81B9DB4 sub_81B9DB4: @ 81B9DB4 push {r4,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =gUnknown_020375E2 ldrh r1, [r1] @@ -100602,7 +100602,7 @@ sub_81B9DB4: @ 81B9DB4 thumb_func_start sub_81B9DF8 sub_81B9DF8: @ 81B9DF8 push {r4,r5,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r4, [r0] ldr r5, =gUnknown_08616120 bl GenerateRandomNumber @@ -100619,7 +100619,7 @@ sub_81B9DF8: @ 81B9DF8 thumb_func_start sub_81B9E20 sub_81B9E20: @ 81B9E20 push {r4,r5,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r1, =0x00000e6e adds r0, r1 @@ -100634,7 +100634,7 @@ sub_81B9E20: @ 81B9E20 ldr r1, =0x00000e6e adds r0, r1 ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name ldr r0, [r4] ldr r1, =0x00000e6e @@ -100835,7 +100835,7 @@ _081B9FCC: _081B9FD4: cmp r2, r6 bne _081BA01C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] mov r2, r8 lsls r3, r2, 1 @@ -100902,7 +100902,7 @@ sub_81BA040: @ 81BA040 ldr r1, =gUnknown_0203BC8C ldr r0, =gSlateportBattleTentMons str r0, [r1] - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr ldr r1, =0x0000ffff mov r8, r1 _081BA062: @@ -100928,7 +100928,7 @@ _081BA066: ldrh r0, [r0] cmp r0, r3 beq _081BA0AA - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r1, r4 ldrh r2, [r0] @@ -100979,7 +100979,7 @@ _081BA0DE: b _081BA062 .pool _081BA110: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r6, =0x00000cb2 adds r3, r1, r6 @@ -101019,7 +101019,7 @@ _081BA13E: ldr r3, [r4] lsls r0, 4 adds r0, r3 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldrh r6, [r0] ldr r1, [r1] _081BA166: @@ -101580,7 +101580,7 @@ _081BA5C8: cmp r2, 0 beq _081BA638 ldr r4, =gUnknown_08616124 - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldrb r0, [r0, 0x14] lsls r1, r0, 29 diff --git a/asm/rom_81BAD84.s b/asm/rom_81BAD84.s index 2bdbb32ec..e463fb30e 100644 --- a/asm/rom_81BAD84.s +++ b/asm/rom_81BAD84.s @@ -2058,7 +2058,7 @@ _081BBE54: bl pokemon_getattr ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] - bl CopyString_Limit10 + bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] @@ -6394,7 +6394,7 @@ nullsub_128: @ 81BE668 thumb_func_start sub_81BE66C sub_81BE66C: @ 81BE66C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xD0 @@ -6448,7 +6448,7 @@ sub_81BE6B8: @ 81BE6B8 b _081BE718 .pool _081BE6CC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xD0 @@ -6490,7 +6490,7 @@ _081BE718: thumb_func_start sub_81BE72C sub_81BE72C: @ 81BE72C push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xD0 @@ -6598,7 +6598,7 @@ sub_81BE808: @ 81BE808 sub sp, 0x4 lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -9603,7 +9603,7 @@ _081C02A8: lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString adds r0, r5, 0 bl sub_81B205C strb r0, [r6, 0x7] @@ -13723,19 +13723,19 @@ sub_81C2628: @ 81C2628 ldr r0, =0x0000ffff cmp r5, r0 beq _081C26CE - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 ldr r1, =gUnknown_085E8D4F adds r0, r6, 0 - bl CopyString - ldr r4, =gUnknown_02021DC4 + bl StringCopy + ldr r4, =gStringVar2 adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 adds r1, r4, 0 - bl AppendString + bl StringAppend mov r0, r8 bl sub_806EBA4 lsls r0, 24 @@ -13785,19 +13785,19 @@ _081C26E8: movs r0, 0x1 bl sub_81C228C _081C26EE: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r1, =gUnknown_085E8D4D adds r0, r4, 0 - bl CopyString - ldr r5, =gUnknown_02021DC4 + bl StringCopy + ldr r5, =gStringVar2 ldrb r1, [r7, 0x5] adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 adds r1, r5, 0 - bl AppendString + bl StringAppend movs r6, 0 str r6, [sp] movs r5, 0x1 @@ -13827,7 +13827,7 @@ _081C26EE: muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy str r6, [sp] str r5, [sp, 0x4] movs r0, 0x13 @@ -13858,7 +13858,7 @@ sub_81C2794: @ 81C2794 ldr r0, =gUnknown_0203CF1C ldr r0, [r0] adds r0, 0xC - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r1, r4, 0 bl GetMonNickname movs r0, 0 @@ -14738,17 +14738,17 @@ sub_81C2F5C: @ 81C2F5C lsrs r0, 24 cmp r0, 0x1 beq _081C2FC0 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 ldr r1, =gUnknown_085E8D59 adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203CF1C ldr r1, [r1] adds r1, 0xB8 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -14882,7 +14882,7 @@ sub_81C307C: @ 81C307C cmp r0, 0x1 bne _081C30E0 _081C30C2: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085EA5DB bl sub_81AFC28 b _081C3182 @@ -14950,7 +14950,7 @@ _081C3158: _081C316E: ldr r1, =gUnknown_085EA544 _081C3170: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 bl sub_81AFC28 adds r0, r6, 0 bl Free @@ -14972,7 +14972,7 @@ sub_81C3194: @ 81C3194 bl sub_81C2D2C lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r2, 0 str r2, [sp] str r2, [sp, 0x4] @@ -15020,7 +15020,7 @@ _081C3202: adds r0, r4, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x3 adds r1, r4, 0 bl sub_81AFC0C @@ -15055,10 +15055,10 @@ sub_81C3220: @ 81C3220 ldrh r4, [r0] adds r0, r1, r2 ldrb r5, [r0, 0x13] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r2, 0x8 adds r1, r2 - bl CopyString + bl StringCopy b _081C3282 .pool _081C326C: @@ -15066,11 +15066,11 @@ _081C326C: adds r4, r0, 0 ldr r0, =0x0000ffff ands r4, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r5, [r1, 0x8] - ldr r0, =gUnknown_02021CC4 - bl CopyString + ldr r0, =gStringVar1 + bl StringCopy _081C3282: adds r0, r6, 0 adds r0, 0x32 @@ -15082,10 +15082,10 @@ _081C3282: ands r0, r1 cmp r4, r0 bne _081C32A4 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x36 - bl CompareStringWithoutExtendedControlCodes + bl StringCompareWithoutExtCtrlCodes cmp r0, 0 beq _081C32B4 _081C32A4: @@ -15238,13 +15238,13 @@ sub_81C335C: @ 81C335C sub_81C33CC: @ 81C33CC push {r4,r5,lr} sub sp, 0x8 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 ldr r1, =gUnknown_085E8D59 adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085E8D38 adds r0, r5, 0 - bl AppendString + bl StringAppend movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -15516,7 +15516,7 @@ _081C3628: .pool _081C3644: ldrh r0, [r1] - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r1, r4, 0 bl itemid_get_name adds r5, r4, 0 @@ -15563,15 +15563,15 @@ sub_81C3690: @ 81C3690 b _081C36C8 .pool _081C36B0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r1] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA3B4 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r5, r4, 0 _081C36C8: movs r0, 0x1 @@ -15626,28 +15626,28 @@ sub_81C3710: @ 81C3710 mov r0, r9 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] adds r0, 0x92 ldrh r1, [r0] mov r0, r8 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] adds r0, 0x94 ldrh r1, [r0] adds r0, r6, 0 movs r2, 0x1 movs r3, 0x7 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] adds r0, 0x96 ldrh r1, [r0] adds r0, r5, 0 movs r2, 0x1 movs r3, 0x7 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 movs r0, 0 mov r1, r9 @@ -15661,7 +15661,7 @@ sub_81C3710: @ 81C3710 movs r0, 0x3 adds r1, r5, 0 bl sub_81AFC0C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0861CE82 bl sub_81AFC28 mov r0, r9 @@ -15690,7 +15690,7 @@ sub_81C37D8: @ 81C37D8 bl sub_81C2D2C lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r2, 0 str r2, [sp] str r2, [sp, 0x4] @@ -15708,7 +15708,7 @@ sub_81C3808: @ 81C3808 push {r4-r6,lr} mov r6, r8 push {r6} - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r8, r0 ldr r4, =gUnknown_0203CF1C ldr r0, [r4] @@ -15717,23 +15717,23 @@ sub_81C3808: @ 81C3808 mov r0, r8 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r6, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r6, =gStringVar2 ldr r0, [r4] adds r0, 0x9A ldrh r1, [r0] adds r0, r6, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar3 ldr r0, [r4] adds r0, 0x9C ldrh r1, [r0] adds r0, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 movs r0, 0 mov r1, r8 @@ -15744,7 +15744,7 @@ sub_81C3808: @ 81C3808 movs r0, 0x2 adds r1, r5, 0 bl sub_81AFC0C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_0861CE8E bl sub_81AFC28 pop {r3} @@ -15764,7 +15764,7 @@ sub_81C3890: @ 81C3890 bl sub_81C2D2C lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 movs r2, 0 str r2, [sp] str r2, [sp, 0x4] @@ -15790,12 +15790,12 @@ sub_81C38C0: @ 81C38C0 bl sub_81C2D2C lsls r0, 24 lsrs r6, r0, 24 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r1, [r5, 0x10] adds r0, r4, 0 movs r2, 0x1 movs r3, 0x7 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -15837,11 +15837,11 @@ sub_81C38C0: @ 81C38C0 _081C3948: movs r1, 0 _081C394A: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 movs r2, 0x1 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -16090,7 +16090,7 @@ sub_81C3B08: @ 81C3B08 mov r0, r8 movs r2, 0 bl sub_81C25A4 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r8, r0 mov r5, r10 adds r5, 0x8C @@ -16098,13 +16098,13 @@ sub_81C3B08: @ 81C3B08 ldrb r1, [r5] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar2 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 movs r0, 0 mov r1, r8 @@ -16112,7 +16112,7 @@ sub_81C3B08: @ 81C3B08 movs r0, 0x1 adds r1, r4, 0 bl sub_81AFC0C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0861CE97 adds r0, r4, 0 bl sub_81AFC28 @@ -16204,12 +16204,12 @@ sub_81C3C5C: @ 81C3C5C b _081C3CAC .pool _081C3C9C: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrb r1, [r2, 0x1] adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r1, r4, 0 _081C3CAC: movs r0, 0 @@ -16230,12 +16230,12 @@ _081C3CAC: b _081C3CEC .pool _081C3CDC: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrb r1, [r1, 0x3] adds r0, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r1, r4, 0 _081C3CEC: movs r0, 0 @@ -16575,7 +16575,7 @@ _081C3FD0: movs r3, 0x41 bl sub_81C25A4 _081C3FEC: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldr r1, =gBattleMoves lsls r0, r5, 1 adds r0, r5 @@ -16585,7 +16585,7 @@ _081C3FEC: adds r0, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 movs r0, 0 adds r1, r4, 0 @@ -16593,7 +16593,7 @@ _081C3FEC: movs r0, 0x1 adds r1, r4, 0 bl sub_81AFC0C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_0861CE97 adds r0, r4, 0 bl sub_81AFC28 @@ -18855,7 +18855,7 @@ _081C530A: thumb_func_start sub_81C5314 sub_81C5314: @ 81C5314 push {r4-r7,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =0x00000ca9 adds r0, r2, r1 @@ -18919,7 +18919,7 @@ _081C5382: ldr r0, [r5] adds r0, r4 ldr r1, =gUnknown_085E8DB4 - bl CopyString + bl StringCopy ldr r1, [r5] lsls r2, r6, 3 ldr r3, =0x00000824 @@ -18969,18 +18969,18 @@ sub_81C540C: @ 81C540C lsrs r0, 24 cmp r0, 0x4 bne _081C5450 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 subs r1, 0x84 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r1, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r1, =gStringVar2 adds r0, r4, 0 bl itemid_get_name ldr r1, =gUnknown_085E9210 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081C5458 .pool _081C5450: @@ -19022,7 +19022,7 @@ _081C5476: negs r0, r0 cmp r4, r0 beq _081C54E0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r3, r4, 1 ldr r1, =0x00000ca9 @@ -19104,8 +19104,8 @@ _081C5558: movs r1, 0xFF bl sub_81C5AB8 _081C5560: - ldr r0, =gUnknown_02021CC4 - ldr r1, =gUnknown_03005D90 + ldr r0, =gStringVar1 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] ldr r2, =0x00000ca9 adds r1, r3, r2 @@ -19122,11 +19122,11 @@ _081C5560: ldrb r1, [r3] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x7 adds r1, r4, 0 movs r2, 0x77 @@ -19161,7 +19161,7 @@ sub_81C55D8: @ 81C55D8 negs r0, r0 cmp r3, r0 beq _081C561C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r3, 1 ldr r1, =0x00000ca9 @@ -19182,18 +19182,18 @@ sub_81C55D8: @ 81C55D8 b _081C5638 .pool _081C561C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085E91B0 ldr r1, =gUnknown_0203CF30 ldrb r1, [r1, 0x4] lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E91C0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders _081C5638: movs r0, 0x1 movs r1, 0 @@ -19315,7 +19315,7 @@ sub_81C5738: @ 81C5738 lsrs r0, 24 lsls r1, 24 lsrs r1, 24 - ldr r2, =gUnknown_03005D90 + ldr r2, =gSaveBlock2Ptr ldr r6, [r2] ldr r3, =0x00000ca9 adds r2, r6, r3 @@ -19369,7 +19369,7 @@ sub_81C57A8: @ 81C57A8 adds r7, r4, 0 lsls r1, 24 lsrs r5, r1, 24 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -19464,7 +19464,7 @@ sub_81C586C: @ 81C586C mov r7, r9 mov r6, r8 push {r6,r7} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] ldr r1, =0x00000ca9 adds r0, r3, r1 @@ -19556,7 +19556,7 @@ _081C58FE: thumb_func_start sub_81C5924 sub_81C5924: @ 81C5924 push {r4-r6,lr} - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldr r1, =0x00000ca9 adds r0, r2, r1 @@ -19970,7 +19970,7 @@ _081C5CA0: bl audio_play ldr r2, =gUnknown_0203CE7C mov r12, r2 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] lsls r3, r6, 1 ldr r0, =0x00000ca9 @@ -20098,12 +20098,12 @@ _081C5DD8: _081C5DDA: ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DBE adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -20691,12 +20691,12 @@ sub_81C62C4: @ 81C62C4 _081C62F4: ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8EE0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -20738,18 +20738,18 @@ sub_81C6350: @ 81C6350 adds r4, r0 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x10 ldrsh r1, [r4, r2] movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8F0E adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -20802,15 +20802,15 @@ sub_81C63D0: @ 81C63D0 sub_81C6404: @ 81C6404 push {r4,lr} sub sp, 0xC - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r1, 0x1 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x3 bl sub_81C6CEC movs r0, 0x1 @@ -20841,16 +20841,16 @@ sub_81C645C: @ 81C645C push {r4,lr} sub sp, 0xC adds r1, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, 16 asrs r1, 16 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 adds r1, r4, 0 movs r2, 0x28 @@ -20953,18 +20953,18 @@ sub_81C654C: @ 81C654C adds r6, r4, r5 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x10 ldrsh r1, [r6, r2] movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r6, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r6, =gStringVar4 ldr r1, =gUnknown_085E8EF9 adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -21089,12 +21089,12 @@ sub_81C66AC: @ 81C66AC lsrs r4, 24 ldr r0, =gUnknown_0203CE7C ldrh r0, [r0] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E8E11 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_81C66EC adds r0, r4, 0 adds r1, r5, 0 @@ -21243,7 +21243,7 @@ sub_81C67CC: @ 81C67CC movs r1, 0x10 movs r2, 0x1 bl sub_81AF15C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r3, [r0] movs r0, 0x2 ldrsh r2, [r5, r0] @@ -21261,12 +21261,12 @@ sub_81C67CC: @ 81C67CC adds r3, r0 adds r3, r2 ldrh r0, [r3] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r6, =gUnknown_02021FC4 + ldr r6, =gStringVar4 ldr r1, =gUnknown_085E8DFE adds r0, r6, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 movs r1, 0 bl FillWindowPixelBuffer @@ -21528,7 +21528,7 @@ sub_81C6A94: @ 81C6A94 movs r0, 0xA bl Alloc adds r5, r0, 0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 ldr r2, [r1] ldr r4, =0x00000ca9 @@ -22007,7 +22007,7 @@ sub_81C6E98: @ 81C6E98 ldr r0, =gUnknown_08D9ADD0 adds r1, r4, 0 bl LZDecompressWram - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000ca9 adds r0, r1 @@ -26889,7 +26889,7 @@ _081C9488: .4byte _081C94E0 .4byte _081C9516 _081C949C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r1, [r0, 0x15] movs r0, 0x8 @@ -27464,7 +27464,7 @@ _081C98D8: bl sub_81CAE08 cmp r0, 0 beq _081C9914 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -30283,7 +30283,7 @@ _081CAED4: _081CAEDC: cmp r4, 0x4E beq _081CAEFC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -30383,17 +30383,17 @@ _081CAFA4: bne _081CAFC4 ldrh r0, [r1, 0x1E] bl sub_81D15BC - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_81967AC strb r0, [r6] b _081CAFCC .pool _081CAFC4: ldrh r0, [r1, 0x1E] - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 bl sub_81D189C _081CAFCC: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 _081CAFCE: pop {r4-r6} pop {r1} @@ -30636,7 +30636,7 @@ _081CB170: bl sub_81CAE08 cmp r0, 0 beq _081CB18A - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -30656,7 +30656,7 @@ _081CB192: beq _081CB1C0 adds r0, r4, 0 bl sub_81D1854 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x000009ca adds r1, r2 @@ -30700,7 +30700,7 @@ sub_81CB1D0: @ 81CB1D0 ldrb r1, [r1, 0x14] cmp r0, r1 bne _081CB258 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -32212,7 +32212,7 @@ sub_81CBE0C: @ 81CBE0C mov r0, sp movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 mov r1, sp movs r2, 0x1 @@ -32253,7 +32253,7 @@ _081CBE68: mov r0, sp movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r4, 0 mov r1, sp movs r2, 0x3 @@ -32346,7 +32346,7 @@ sub_81CBEF8: @ 81CBEF8 _081CBF1C: ldr r1, =gUnknown_085EC00F add r0, sp, 0xC - bl CopyString + bl StringCopy _081CBF24: movs r0, 0x7 add r1, sp, 0xC @@ -33127,7 +33127,7 @@ _081CC51A: sub_81CC524: @ 81CC524 push {lr} bl sub_8124658 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] movs r1, 0x1 ands r1, r0 @@ -33352,7 +33352,7 @@ sub_81CC6D0: @ 81CC6D0 bl sub_81CC5E4 cmp r0, 0 bne _081CC6EC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x15] lsrs r0, 3 @@ -34222,7 +34222,7 @@ sub_81CCDE8: @ 81CCDE8 sub sp, 0xC mov r9, r0 movs r5, 0 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 movs r4, 0x88 lsls r4, 21 lsls r1, 24 @@ -34234,7 +34234,7 @@ _081CCE08: adds r0, r6, 0 movs r2, 0 movs r3, 0xC - bl CopyStringPadded + bl StringCopyPadded mov r1, r9 ldrb r0, [r1, 0x8] lsrs r1, r4, 24 @@ -35291,7 +35291,7 @@ sub_81CD624: @ 81CD624 adds r0, r5, 0 movs r2, 0 movs r3, 0xC - bl CopyStringPadded + bl StringCopyPadded b _081CD80E .pool _081CD690: @@ -35301,7 +35301,7 @@ _081CD690: adds r3, r5, 0 bl sub_81D2C68 adds r0, r5, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0xB @@ -35353,7 +35353,7 @@ _081CD706: ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl CompareString + bl StringCompare cmp r0, 0 bne _081CD71C movs r6, 0xFF @@ -35451,7 +35451,7 @@ _081CD790: mov r1, r8 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r3, r0, 0 subs r4, r3, r4 lsls r4, 16 @@ -37272,9 +37272,9 @@ sub_81CE738: @ 81CE738 lsrs r1, 16 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085EBFD7 - bl CopyString + bl StringCopy pop {r1} bx r1 .pool @@ -37403,7 +37403,7 @@ _081CE80C: adds r5, 0x11 ldr r1, =gUnknown_085EBFD7 adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r0, =0x00001821 adds r6, r0 ldrb r0, [r6] @@ -37421,7 +37421,7 @@ _081CE80C: adds r0, r5, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldrb r0, [r6] str r7, [sp] str r4, [sp, 0x4] @@ -39386,13 +39386,13 @@ sub_81CF7F4: @ 81CF7F4 bl sub_81CF0F0 adds r7, r0, 0 bl sub_81AFBF0 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r0, 0 adds r1, r4, 0 bl sub_81AFC0C movs r0, 0xFF strb r0, [r4] - ldr r5, =gUnknown_02021DC4 + ldr r5, =gStringVar2 ldr r1, =gUnknown_085EC029 adds r0, r5, 0 bl sub_81AFC28 @@ -39414,7 +39414,7 @@ sub_81CF7F4: @ 81CF7F4 adds r1, r7, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r1, r8 ldrb r0, [r1, 0x8] mov r1, r10 @@ -39504,7 +39504,7 @@ sub_81CF8E4: @ 81CF8E4 bl level_by_exp lsls r0, 24 lsrs r7, r0, 24 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 bl pokemon_getattr @@ -39522,14 +39522,14 @@ _081CF924: bl sub_80690C0 lsls r0, 24 lsrs r7, r0, 24 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 bl pokemon_getattr_encrypted _081CF94A: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -39550,9 +39550,9 @@ _081CF974: _081CF97C: ldr r1, =gUnknown_086235C8 _081CF97E: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -39565,7 +39565,7 @@ _081CF97E: adds r1, r7, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -40782,14 +40782,14 @@ sub_81D02B0: @ 81D02B0 add r0, sp, 0xC movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xBA strb r1, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 add r1, sp, 0xC movs r2, 0x38 @@ -40881,7 +40881,7 @@ sub_81D035C: @ 81D035C lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 bl pokemon_getattr @@ -40900,14 +40900,14 @@ _081D03A4: lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 bl pokemon_getattr_encrypted _081D03CC: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -40928,9 +40928,9 @@ _081D03F8: _081D0400: ldr r1, =gUnknown_086237E8 _081D0402: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -40943,7 +40943,7 @@ _081D0402: mov r1, r8 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 @@ -40953,7 +40953,7 @@ _081D0402: ldrh r1, [r7, 0x2] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN pop {r3} mov r8, r3 pop {r4-r7} @@ -41390,7 +41390,7 @@ _081D0730: bl pokemon_getattr_encrypted _081D0752: adds r0, r5, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 pop {r4-r7} pop {r0} bx r0 @@ -42291,18 +42291,18 @@ sub_81D0E84: @ 81D0E84 add r0, sp, 0xC movs r2, 0x3 bl memcpy - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_81D07D8 adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN bl sub_81AFBF0 movs r0, 0 adds r1, r4, 0 bl sub_81AFC0C - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EC030 adds r0, r4, 0 bl sub_81AFC28 @@ -42376,7 +42376,7 @@ _081D0F2E: b _081D0FAA .pool _081D0F60: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, r5 ldr r1, =0x0000318f @@ -42454,7 +42454,7 @@ sub_81D0FF0: @ 81D0FF0 adds r0, r5, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 mov r6, sp adds r6, 0xD adds r0, r4, 0 @@ -42487,9 +42487,9 @@ _081D1040: _081D1048: ldr r1, =gUnknown_08624BD8 _081D104A: - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r5, 0 - bl CopyString + bl StringCopy movs r1, 0xBA strb r1, [r0] adds r0, 0x1 @@ -42503,7 +42503,7 @@ _081D104A: ldrb r1, [r1] movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r4, r7, 24 lsrs r4, 24 movs r0, 0x1 @@ -42560,19 +42560,19 @@ sub_81D10D0: @ 81D10D0 adds r4, 0x1 bl sub_81D06D4 adds r6, r0, 0 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 adds r0, r5, 0 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xBA strb r1, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 @@ -43309,7 +43309,7 @@ _081D168E: sub_81D1694: @ 81D1694 push {lr} adds r2, r0, 0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldrb r0, [r2, 0x1] ldrb r1, [r1, 0x8] @@ -43470,7 +43470,7 @@ sub_81D1790: @ 81D1790 ldrh r0, [r1, 0x4] cmp r0, 0x48 bhi _081D17B8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x000009ca adds r0, r2 @@ -43491,7 +43491,7 @@ _081D17BA: thumb_func_start sub_81D17C0 sub_81D17C0: @ 81D17C0 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x000009ca adds r1, r2 @@ -43788,7 +43788,7 @@ _081D1974: _081D1984: ldr r1, [r4] mov r0, r9 - bl ExpandStringRefs + bl StringExpandPlaceholders pop {r3,r4} mov r8, r3 mov r9, r4 @@ -43860,7 +43860,7 @@ _081D19F8: _081D1A0A: ldr r1, [r4] mov r0, r10 - bl ExpandStringRefs + bl StringExpandPlaceholders b _081D1A5C .pool _081D1A1C: @@ -43875,7 +43875,7 @@ _081D1A24: lsls r0, 24 cmp r0, 0 beq _081D1A50 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000009ca adds r0, r1 @@ -43895,7 +43895,7 @@ _081D1A50: adds r0, r6 ldr r1, [r0] mov r0, r10 - bl ExpandStringRefs + bl StringExpandPlaceholders _081D1A5C: pop {r3-r5} mov r8, r3 @@ -44308,7 +44308,7 @@ sub_81D1D44: @ 81D1D44 negs r0, r0 cmp r3, r0 beq _081D1DAC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr lsls r1, r3, 3 adds r1, r3 lsls r1, 2 @@ -44317,18 +44317,18 @@ sub_81D1D44: @ 81D1D44 ldr r0, =0x00002cca adds r1, r0 add r0, sp, 0x14 - bl CopyString + bl StringCopy add r0, sp, 0x14 bl sub_81DB52C add r0, sp, 0x14 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi _081D1D8C add r0, sp, 0x14 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString _081D1D8C: movs r0, 0 str r0, [sp] @@ -45961,7 +45961,7 @@ _081D29C4: add r0, sp, 0xC movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r3, r4, 24 lsrs r3, 24 mov r0, r10 @@ -45984,7 +45984,7 @@ _081D2A3C: add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r5, sp, 0xC _081D2A4A: movs r0, 0x19 @@ -46008,7 +46008,7 @@ _081D2A70: add r0, sp, 0xC movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN add r5, sp, 0xC _081D2A7E: movs r0, 0x29 @@ -46333,7 +46333,7 @@ sub_81D2CD0: @ 81D2CD0 adds r0, r5, 0 movs r2, 0 movs r3, 0xC - bl CopyStringPadded + bl StringCopyPadded b _081D2E70 .pool _081D2D20: @@ -46343,7 +46343,7 @@ _081D2D20: adds r3, r5, 0 bl sub_81D2C68 adds r0, r5, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 adds r0, r4, 0 adds r1, r6, 0 movs r2, 0xB @@ -46397,7 +46397,7 @@ _081D2D9A: ldr r0, =gSpeciesNames adds r1, r0 adds r0, r5, 0 - bl CompareString + bl StringCompare cmp r0, 0 bne _081D2DB0 movs r6, 0xFF @@ -46494,7 +46494,7 @@ _081D2E24: mov r1, r8 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r3, r0, 0 strb r4, [r3] adds r3, 0x1 @@ -47664,7 +47664,7 @@ _081D36CA: ldr r1, =gUnknown_085EEA73 _081D3704: adds r0, r6, 0 - bl CopyString + bl StringCopy mov r0, r10 str r0, [sp] mov r1, r9 @@ -47694,7 +47694,7 @@ _081D373A: adds r0, r6, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r2, r4, 0 adds r2, 0x38 mov r1, r10 @@ -47799,7 +47799,7 @@ _081D3808: mov r0, r9 movs r2, 0 adds r3, r4, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x4 subs r0, r4 lsls r4, r0, 1 @@ -47890,7 +47890,7 @@ sub_81D388C: @ 81D388C thumb_func_start sub_81D38D4 sub_81D38D4: @ 81D38D4 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d6d adds r0, r1 @@ -49049,7 +49049,7 @@ sub_81D4238: @ 81D4238 sub_81D4258: @ 81D4258 push {lr} sub sp, 0x4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -49947,7 +49947,7 @@ sub_81D4998: @ 81D4998 bl VarGet lsls r0, 16 lsrs r2, r0, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000391a @@ -49979,7 +49979,7 @@ _081D49E0: FieldObjectIsFarawayIslandMew: @ 81D49E8 push {lr} adds r2, r0, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000391a @@ -50001,7 +50001,7 @@ _081D4A0E: thumb_func_start unown_chamber_related unown_chamber_related: @ 81D4A14 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000391a @@ -51267,7 +51267,7 @@ sp194_trainer_tower: @ 81D5494 thumb_func_start sub_81D54BC sub_81D54BC: @ 81D54BC push {r4-r6,lr} - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] ldr r3, =0x00000ef9 adds r1, r3 @@ -51282,7 +51282,7 @@ sub_81D54BC: @ 81D54BC negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] ldr r1, =0x00003d68 adds r0, r1 @@ -51476,7 +51476,7 @@ _081D560A: mov r6, r9 cmp r6, 0x1 ble _081D55EE - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] ldr r1, =0x00003d64 adds r0, r1 @@ -51524,7 +51524,7 @@ sub_81D56B0: @ 81D56B0 adds r1, 0x61 strb r1, [r0] ldr r1, =gUnknown_0862A5F8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00003d6e adds r0, r2 @@ -51688,7 +51688,7 @@ sub_81D581C: @ 81D581C bl sub_81D3B34 cmp r0, 0 bne _081D5844 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] ldr r0, =0x00003d6e adds r1, r0 @@ -51698,7 +51698,7 @@ sub_81D581C: @ 81D581C b _081D5854 .pool _081D5844: - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] ldr r0, =0x00003d6e adds r1, r0 @@ -51742,7 +51742,7 @@ _081D5854: negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xEE lsls r1, 4 @@ -51770,7 +51770,7 @@ sub_81D58D8: @ 81D58D8 ldr r3, =gUnknown_020375F0 movs r0, 0 strh r0, [r3] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d6e adds r2, r0, r1 @@ -51813,7 +51813,7 @@ sub_81D5924: @ 81D5924 ldrb r0, [r0, 0x6] cmp r0, 0x4 bne _081D5952 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r0, [r0] ldr r7, =0x00003d6e @@ -51838,7 +51838,7 @@ _081D596C: lsrs r0, 24 cmp r0, 0x1 bne _081D59BC - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 adds r0, r5, 0 bl itemid_get_name mov r0, r8 @@ -51848,7 +51848,7 @@ _081D596C: movs r2, 0x1 orrs r0, r2 strb r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ef9 adds r1, r0 @@ -51876,7 +51876,7 @@ _081D59C0: thumb_func_start sub_81D59D0 sub_81D59D0: @ 81D59D0 push {r4-r6,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, [r4] ldr r6, =0x00003d6e adds r0, r2, r6 @@ -51926,7 +51926,7 @@ _081D5A48: movs r0, 0x1 strh r0, [r1] _081D5A4E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r3, =0x00003d6e adds r1, r3 @@ -51943,7 +51943,7 @@ _081D5A4E: thumb_func_start sub_81D5A70 sub_81D5A70: @ 81D5A70 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =0x00003d6e adds r0, r2, r1 @@ -51972,7 +51972,7 @@ _081D5AAE: thumb_func_start sub_81D5AB4 sub_81D5AB4: @ 81D5AB4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003d6e adds r1, r0 @@ -51987,7 +51987,7 @@ sub_81D5AB4: @ 81D5AB4 thumb_func_start sub_81D5AD0 sub_81D5AD0: @ 81D5AD0 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d6e adds r2, r0, r1 @@ -52030,7 +52030,7 @@ _081D5B20: thumb_func_start sub_81D5B2C sub_81D5B2C: @ 81D5B2C push {r4-r7,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d64 adds r0, r1 @@ -52062,21 +52062,21 @@ _081D5B40: movs r1, 0x64 bl __divsi3 adds r4, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar3 adds r1, r4, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN pop {r4-r7} pop {r0} bx r0 @@ -52092,11 +52092,11 @@ sub_81D5BBC: @ 81D5BBC ldrb r0, [r1, 0x6] cmp r0, 0x4 beq _081D5BEC - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r1, 0x6] movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_020375F0 movs r0, 0 b _081D5BF0 @@ -52133,7 +52133,7 @@ sub_81D5C18: @ 81D5C18 lsls r0, 16 cmp r0, 0 beq _081D5C42 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d6e adds r0, r1 @@ -52222,7 +52222,7 @@ sub_81D5C8C: @ 81D5C8C movs r0, 0 mov r8, r0 mov r10, r4 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 mov r9, r1 _081D5CD6: lsls r3, r7, 24 @@ -52242,7 +52242,7 @@ _081D5CD6: movs r2, 0 bl box_print adds r7, 0xF - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, =0x00003718 adds r4, r1 ldr r0, [r0] @@ -52258,11 +52258,11 @@ _081D5CD6: adds r1, r5, 0 bl __umodsi3 adds r5, r0, 0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN adds r0, r5, 0 movs r1, 0x3C bl __udivsi3 @@ -52271,25 +52271,25 @@ _081D5CD6: movs r1, 0x3C bl __umodsi3 adds r5, r0, 0 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0xA8 muls r0, r5 movs r1, 0x64 bl __udivsi3 adds r1, r0, 0 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN mov r0, r9 ldr r1, =gUnknown_085EF895 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085EF8A3 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 mov r1, r9 movs r2, 0xD0 @@ -52350,7 +52350,7 @@ sub_81D5DF8: @ 81D5DF8 mov r5, r8 push {r5-r7} sub sp, 0x8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0xC7 lsls r1, 4 @@ -52361,7 +52361,7 @@ sub_81D5DF8: @ 81D5DF8 beq _081D5F0E bl sub_81D56B0 movs r7, 0 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r3, =0x00000cb4 ldr r0, =0x0000ffff adds r2, r0, 0 @@ -52380,7 +52380,7 @@ _081D5E26: bls _081D5E26 movs r0, 0 str r0, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0xC7 lsls r2, 4 @@ -52468,7 +52468,7 @@ _081D5E64: strh r0, [r5, 0xE] ldr r0, =gUnknown_082C83F0 str r0, [r5, 0x10] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r4, =0x00000cb4 adds r0, r4 @@ -52790,7 +52790,7 @@ _081D6176: thumb_func_start battle_init battle_init: @ 81D6180 lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] lsrs r0, 23 adds r1, r0 @@ -52820,7 +52820,7 @@ GetTrainerHillTrainerFlag: @ 81D619C ldrb r1, [r1, 0x8] adds r0, r1 lsls r0, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] movs r2, 0xEE lsls r2, 4 @@ -52848,7 +52848,7 @@ sub_81D61E8: @ 81D61E8 movs r3, 0 ldr r0, =gUnknown_02038BCA mov r8, r0 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, =gUnknown_0832A328 mov r12, r1 adds r5, r6, 0 @@ -53187,7 +53187,7 @@ sub_81D6490: @ 81D6490 thumb_func_start sub_81D64AC sub_81D64AC: @ 81D64AC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] movs r1, 0xEE lsls r1, 4 @@ -53217,7 +53217,7 @@ _081D64D4: thumb_func_start sub_81D64DC sub_81D64DC: @ 81D64DC ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000ef9 adds r0, r2 @@ -53230,7 +53230,7 @@ sub_81D64DC: @ 81D64DC thumb_func_start sub_81D64FC sub_81D64FC: @ 81D64FC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ef9 adds r1, r0 @@ -53244,7 +53244,7 @@ sub_81D64FC: @ 81D64FC thumb_func_start sub_81D6518 sub_81D6518: @ 81D6518 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r0, =0x00000ef9 adds r1, r0 @@ -53286,7 +53286,7 @@ _081D6562: thumb_func_start sub_81D6568 sub_81D6568: @ 81D6568 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00003d6e adds r0, r1 @@ -53312,7 +53312,7 @@ _081D6594: thumb_func_start sub_81D65A0 sub_81D65A0: @ 81D65A0 push {r4,r5,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, [r4] ldr r5, =gUnknown_020375E2 ldr r0, =0x00003d6e @@ -53441,7 +53441,7 @@ _081D66A2: bl sub_81D65E8 lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r5, [r0] ldr r1, =0x00003d6e adds r0, r5, r1 @@ -59464,11 +59464,11 @@ sub_81D99BC: @ 81D99BC bl sub_80D2578 cmp r0, 0 bne _081D99DC - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0x1 b _081D99DE .pool @@ -59484,11 +59484,11 @@ _081D99DE: walda_maybe: @ 81D99E4 push {r4,lr} sub sp, 0x8 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0 str r0, [sp] ldr r0, =sub_81D9A1C @@ -59509,7 +59509,7 @@ walda_maybe: @ 81D99E4 sub_81D9A1C: @ 81D9A1C push {r4,r5,lr} ldr r4, =gUnknown_020375E0 - ldr r5, =gUnknown_02021DC4 + ldr r5, =gStringVar2 adds r0, r5, 0 bl sub_81D9A98 strh r0, [r4] @@ -59540,11 +59540,11 @@ _081D9A62: adds r0, r5, 0 bl sub_80D255C _081D9A68: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_03005DAC ldr r0, =sub_80AF168 str r0, [r1] @@ -59569,7 +59569,7 @@ _081D9AA6: bl sub_80D2548 adds r1, r0, 0 adds r0, r4, 0 - bl CompareString + bl StringCompare cmp r0, 0 beq _081D9ABA movs r0, 0 @@ -59588,7 +59588,7 @@ sub_81D9AC4: @ 81D9AC4 mov r7, r8 push {r7} sub sp, 0x10 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r0, 0xA bl sub_80842DC @@ -59682,7 +59682,7 @@ sub_81D9B68: @ 81D9B68 lsrs r0, 16 mov r9, r0 adds r0, r5, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0xF @@ -60955,7 +60955,7 @@ sub_81DA5D4: @ 81DA5D4 bcs _081DA61C mov r4, r9 _081DA5F4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r4] ldr r2, =0x000009ca @@ -60987,7 +60987,7 @@ _081DA61C: bcs _081DA654 mov r4, r9 _081DA62E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r4] ldr r2, =0x000009ca @@ -61018,7 +61018,7 @@ _081DA654: movs r5, 0 cmp r5, r7 bcs _081DA6BA - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r3, =0x000009ca mov r4, r9 _081DA674: @@ -62848,12 +62848,12 @@ sub_81DB468: @ 81DB468 ldr r1, =gPokedexEntries adds r2, r1 adds r1, r2, 0 - bl CopyString + bl StringCopy movs r1, 0 strb r1, [r0] adds r0, 0x1 ldr r1, =gUnknown_085E8268 - bl CopyString + bl StringCopy pop {r0} bx r0 .pool @@ -62868,7 +62868,7 @@ sub_81DB494: @ 81DB494 cmp r5, 0 beq _081DB4B6 adds r1, r5, 0 - bl CopyString + bl StringCopy adds r4, r0, 0 lsls r0, r6, 24 lsrs r0, 24 @@ -62906,9 +62906,9 @@ sub_81DB4DC: @ 81DB4DC adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 24 lsrs r1, r0, 24 cmp r5, 0xFC @@ -62949,18 +62949,18 @@ _081DB51E: sub_81DB52C: @ 81DB52C push {r4,lr} adds r4, r0, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi _081DB546 adds r0, r4, 0 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _081DB54C _081DB546: adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes _081DB54C: pop {r4} pop {r0} @@ -62973,20 +62973,20 @@ sub_81DB554: @ 81DB554 adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x5 bhi _081DB572 adds r0, r4, 0 movs r1, 0x1 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _081DB5A4 _081DB572: cmp r5, 0xFC bne _081DB57E adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes b _081DB5A4 _081DB57E: adds r1, r4, 0 @@ -63060,12 +63060,12 @@ sub_81DB5E8: @ 81DB5E8 push {r4,r5,lr} adds r5, r0, 0 adds r4, r2, 0 - bl CopyString + bl StringCopy lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 adds r1, r4, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r4,r5} pop {r0} bx r0 diff --git a/asm/rotating_gate.s b/asm/rotating_gate.s index a2bb34cf1..b10e27e65 100644 --- a/asm/rotating_gate.s +++ b/asm/rotating_gate.s @@ -8,7 +8,7 @@ thumb_func_start GetCurrentMapRotatingGatePuzzleType GetCurrentMapRotatingGatePuzzleType: @ 80FB7E8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0x86 @@ -190,7 +190,7 @@ sub_80FB928: @ 80FB928 lsls r1, 16 lsrs r1, 16 mov r10, r1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r1, [r2] subs r0, r1, 0x2 @@ -557,7 +557,7 @@ sub_80FBC10: @ 80FBC10 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldrh r1, [r2] subs r0, r1, 0x2 diff --git a/asm/roulette.s b/asm/roulette.s index 08bcd5bf2..369ed9221 100644 --- a/asm/roulette.s +++ b/asm/roulette.s @@ -2757,7 +2757,7 @@ sub_8141A18: @ 8141A18 sub sp, 0xC lsls r0, 24 lsrs r0, 24 - ldr r3, =gUnknown_02021CC4 + ldr r3, =gStringVar1 ldr r1, =gUnknown_0203AB88 mov r9, r1 ldr r1, [r1] @@ -2774,12 +2774,12 @@ sub_8141A18: @ 8141A18 adds r0, r3, 0 movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r2, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r2, =gStringVar4 mov r8, r2 ldr r1, =gUnknown_082A5BEF mov r0, r8 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r5, =gUnknown_0203AB8C ldrb r0, [r5] movs r1, 0 @@ -4635,14 +4635,14 @@ sub_81429F0: @ 81429F0 adds r0, r1 adds r0, r2 ldrb r1, [r0] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x2 movs r3, 0x1 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_082A5B12 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0 bl sub_81973FC @@ -4701,11 +4701,11 @@ sub_8142A88: @ 8142A88 adds r0, r1 adds r0, r2 ldrb r4, [r0] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 movs r2, 0x2 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0x22 ldrsh r0, [r6, r1] cmp r0, r4 @@ -4740,10 +4740,10 @@ sub_8142A88: @ 8142A88 b _08142BB0 .pool _08142B28: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_082A5B12 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0 bl sub_81973FC @@ -4770,10 +4770,10 @@ _08142B28: b _08142BB0 .pool _08142B78: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r1, =gUnknown_082A5B4E adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0 bl sub_81973FC diff --git a/asm/rtc.s b/asm/rtc.s index dc63514fe..3d22eea82 100644 --- a/asm/rtc.s +++ b/asm/rtc.s @@ -466,20 +466,20 @@ GameFreakRTC_FormatDecimalTimeString: @ 802F40C adds r6, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r4, 0xF0 strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -495,20 +495,20 @@ GameFreakRTC_FormatHexTimeString: @ 802F444 adds r6, r3, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToHexString + bl ConvertIntToHexStringN movs r4, 0xF0 strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToHexString + bl ConvertIntToHexStringN strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToHexString + bl ConvertIntToHexStringN movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -538,20 +538,20 @@ GameFreakRTC_FormatDecimalYearMonthDayString: @ 802F494 adds r6, r3, 0 movs r2, 0x2 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r4, 0xAE strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -567,20 +567,20 @@ GameFreakRTC_FormatHexYearMonthDayString: @ 802F4CC adds r6, r3, 0 movs r2, 0x2 movs r3, 0x4 - bl ConvertIntToHexString + bl ConvertIntToHexStringN movs r4, 0xAE strb r4, [r0] adds r0, 0x1 adds r1, r5, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToHexString + bl ConvertIntToHexStringN strb r4, [r0] adds r0, 0x1 adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToHexString + bl ConvertIntToHexStringN movs r1, 0xFF strb r1, [r0] pop {r4-r6} @@ -666,7 +666,7 @@ GameFreakRTC_CalcLocalDateTime: @ 802F588 adds r0, r4, 0 bl GameFreakRTC_GetRTCDateTime ldr r1, =gUnknown_03005CF8 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] adds r2, 0x98 adds r0, r4, 0 @@ -703,7 +703,7 @@ GameFreakRTC_CalcRTCToLocalDelta: @ 802F5C8 ldr r5, =gUnknown_03000DC0 adds r0, r5, 0 bl GameFreakRTC_GetRTCDateTime - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r1, 0x98 adds r0, r5, 0 diff --git a/asm/safari_zone.s b/asm/safari_zone.s index 05f9e17e6..5ea9bf61f 100644 --- a/asm/safari_zone.s +++ b/asm/safari_zone.s @@ -213,7 +213,7 @@ sub_80FC258: @ 80FC258 bl GetXYCoordsOneStepInFrontOfPlayer movs r5, 0 _080FC26A: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =gUnknown_0203A054 lsls r0, r5, 4 @@ -244,8 +244,8 @@ _080FC26A: lsls r0, 2 adds r0, r1 ldr r1, [r0] - ldr r0, =gUnknown_02021CC4 - bl CopyString + ldr r0, =gStringVar1 + bl StringCopy b _080FC2D6 .pool _080FC2C4: @@ -277,7 +277,7 @@ sub_80FC2E8: @ 80FC2E8 bl PlayerGetDestCoords movs r5, 0 adds r6, r4, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r7, [r0] mov r4, sp ldr r0, =gUnknown_0203A054 @@ -405,7 +405,7 @@ sub_80FC3E8: @ 80FC3E8 movs r0, 0x8 adds r0, r2 mov r9, r0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr _080FC408: lsls r5, r1, 4 adds r4, r5, r2 @@ -503,14 +503,14 @@ sub_80FC4B4: @ 80FC4B4 ldr r0, =0x0000ffff cmp r1, r0 beq _080FC4EC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r2, =gUnknown_0203A054 lsls r1, 4 adds r1, r2 ldrb r1, [r1, 0x5] movs r2, 0x2 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x1 b _080FC4EE .pool diff --git a/asm/save.s b/asm/save.s index 9330cc552..c8a77d7ff 100644 --- a/asm/save.s +++ b/asm/save.s @@ -1312,7 +1312,7 @@ _08153182: sub_8153190: @ 8153190 push {r4,r5,lr} ldr r3, =gUnknown_03006220 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, =gUnknown_085CDC00 ldrh r1, [r2] ldr r0, [r0] @@ -1320,7 +1320,7 @@ sub_8153190: @ 8153190 str r0, [r3] ldrh r0, [r2, 0x2] strh r0, [r3, 0x4] - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr adds r3, 0x8 adds r2, 0x4 movs r4, 0x3 diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 08e755325..64e5c8684 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -2324,7 +2324,7 @@ s42_get_map_camera_pos: @ 809A45C lsls r0, 16 lsrs r0, 16 bl GetVarPointer - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r1, [r2] ldrh r1, [r1] strh r1, [r5] @@ -2550,7 +2550,7 @@ s4F_execute_movement: @ 809A5E8 adds r3, r0, 0 lsls r0, r4, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -2630,7 +2630,7 @@ s51_waitmove: @ 809A698 strh r1, [r0] _0809A6B4: ldr r1, =gUnknown_020375CC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x4 ldrsb r0, [r2, r0] @@ -2694,7 +2694,7 @@ s53_hide_sprite: @ 809A740 bl VarGet lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -2738,7 +2738,7 @@ s55_show_sprite: @ 809A798 bl VarGet lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -2800,7 +2800,7 @@ s57_move_sprites: @ 809A7F0 bl VarGet lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -2869,7 +2869,7 @@ s64_set_sprite_top_left_corner: @ 809A8B0 bl VarGet lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -3026,7 +3026,7 @@ s5B_npc_set_direction: @ 809A9DC str r1, [r4, 0x8] lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -3643,10 +3643,10 @@ sub_809AE6C: @ 809AE6C sub sp, 0x20 bl script_read_word adds r1, r0, 0 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r1, 0x6 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r2, 0x1 negs r2, r2 movs r0, 0x6 @@ -3755,7 +3755,7 @@ _0809AEC6: movs r1, 0x11 bl FillWindowPixelBuffer ldrb r0, [r5] - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 str r4, [sp] movs r1, 0xFF str r1, [sp, 0x4] @@ -3822,7 +3822,7 @@ s7D_load_pokename: @ 809AFBC ldr r0, =gSpeciesNames adds r1, r0 adds r0, r2, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -3856,7 +3856,7 @@ s7E_load_first_pokenames: @ 809AFFC ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -3889,7 +3889,7 @@ s7F_load_pokename_team: @ 809B048 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 movs r0, 0 pop {r4} pop {r1} @@ -3979,7 +3979,7 @@ sub_809B114: @ 809B114 lsrs r1, 11 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4009,7 +4009,7 @@ s82_load_item_name: @ 809B150 ldr r0, =gMoveNames adds r1, r0 adds r0, r2, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4042,7 +4042,7 @@ s83_load_textvar_var: @ 809B190 ldr r0, [r5] adds r1, r4, 0 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0 pop {r4,r5} pop {r1} @@ -4071,7 +4071,7 @@ s84_load_textvar_std_expression: @ 809B1D4 adds r0, r1 ldr r1, [r0] adds r0, r2, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4118,7 +4118,7 @@ s85_load_textvar_pointer: @ 809B248 lsls r4, 2 adds r4, r0 ldr r0, [r4] - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4134,8 +4134,8 @@ sBE_virtual_load_text: @ 809B270 ldr r0, =gUnknown_020375C4 ldr r0, [r0] subs r1, r0 - ldr r0, =gUnknown_02021FC4 - bl ExpandStringRefs + ldr r0, =gStringVar4 + bl StringExpandPlaceholders movs r0, 0 pop {r1} bx r1 @@ -4158,7 +4158,7 @@ sBF_virtual_load_textbuffer: @ 809B294 lsls r4, 2 adds r4, r0 ldr r0, [r4] - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4186,7 +4186,7 @@ sC6_load_textvar_box_label: @ 809B2C8 bl sav3_get_box_name adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -4369,7 +4369,7 @@ s90_add_money: @ 809B458 str r0, [r4, 0x8] cmp r1, 0 bne _0809B47E - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -4397,7 +4397,7 @@ s91_subtract_money: @ 809B48C str r0, [r4, 0x8] cmp r1, 0 bne _0809B4B2 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -4426,7 +4426,7 @@ s92_check_money: @ 809B4C0 cmp r1, 0 bne _0809B4EE ldr r4, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -4460,7 +4460,7 @@ s93_display_money: @ 809B500 str r2, [r0, 0x8] cmp r1, 0 bne _0809B530 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -4499,7 +4499,7 @@ s95_update_money: @ 809B548 str r2, [r0, 0x8] cmp r1, 0 bne _0809B56E - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -4944,7 +4944,7 @@ s9F_changeposition_fly: @ 809B870 thumb_func_start sA0_check_gender sA0_check_gender: @ 809B88C ldr r1, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] strh r0, [r1] @@ -5633,7 +5633,7 @@ sub_809BDD0: @ 809BDD0 bl sub_806F07C adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} @@ -5661,7 +5661,7 @@ sub_809BE0C: @ 809BE0C bl sub_806F0B0 adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy movs r0, 0 pop {r4} pop {r1} diff --git a/asm/script.s b/asm/script.s index bd63ecf59..a898942b0 100644 --- a/asm/script.s +++ b/asm/script.s @@ -625,7 +625,7 @@ _080990A8: thumb_func_start sub_80990AC sub_80990AC: @ 80990AC push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000372c adds r0, r1 @@ -645,7 +645,7 @@ killram: @ 80990D0 sub sp, 0x4 movs r0, 0 str r0, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00003728 adds r1, r0 @@ -678,7 +678,7 @@ sub_80990FC: @ 80990FC lsrs r7, r3, 24 lsls r0, 24 lsrs r6, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r10, r0 ldr r5, [r0] ldr r1, =0x0000372c @@ -727,7 +727,7 @@ sub_8099188: @ 8099188 adds r4, r1, 0 lsls r0, 24 lsrs r3, r0, 24 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r5, [r6] ldr r0, =0x0000372c adds r2, r5, r0 @@ -775,7 +775,7 @@ _080991F2: thumb_func_start sub_80991F8 sub_80991F8: @ 80991F8 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r2, =0x0000372c adds r1, r0, r2 @@ -812,7 +812,7 @@ _0809923E: thumb_func_start sub_8099244 sub_8099244: @ 8099244 push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r5, [r6] ldr r0, =0x0000372c adds r4, r5, r0 diff --git a/asm/script_menu.s b/asm/script_menu.s index 382010cda..667cbe6c4 100644 --- a/asm/script_menu.s +++ b/asm/script_menu.s @@ -106,9 +106,9 @@ _080E1EC0: ldrb r0, [r4] cmp r0, 0x1 bne _080E1EEC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] - bl GetStringLength + bl StringLength adds r0, r5, r0 lsls r0, 16 lsrs r5, r0, 16 @@ -828,10 +828,10 @@ _080E24B0: adds r3, r7, 0 bl Print _080E24C6: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EB183 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders adds r0, r6, 0 adds r1, r4, 0 adds r2, r7, 0 @@ -1715,7 +1715,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl Print - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] movs r0, 0x49 str r0, [sp] @@ -1819,7 +1819,7 @@ display_text_and_get_width_internal: @ 80E2D10 sub sp, 0x40 adds r1, r0, 0 mov r0, sp - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x1 mov r1, sp movs r2, 0 diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index 2c2aba2c2..d7dced430 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -8,7 +8,7 @@ thumb_func_start sub_80F87D8 sub_80F87D8: @ 80F87D8 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r1, =gUnknown_02039E00 ldrb r3, [r1, 0x15] @@ -115,7 +115,7 @@ _080F88A0: _080F88A4: movs r1, 0xC _080F88A6: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, 5 adds r0, r1 @@ -187,7 +187,7 @@ _080F8934: sub_80F8940: @ 80F8940 push {lr} movs r3, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002f98 adds r1, r0, r2 @@ -349,15 +349,15 @@ _080F8A6E: lsls r4, r6, 6 mov r0, r10 adds r1, r4, r0 - ldr r0, =gUnknown_02021CC4 - bl CopyString - ldr r5, =gUnknown_02021DC4 + ldr r0, =gStringVar1 + bl StringCopy + ldr r5, =gStringVar2 mov r0, r10 adds r0, 0xB adds r4, r0 adds r0, r5, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy adds r0, r5, 0 bl sub_81DB5AC mov r1, r9 @@ -501,7 +501,7 @@ _080F8BBA: ldr r0, =gUnknown_0858D8EC adds r0, r5, r0 ldrb r0, [r0] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -1440,7 +1440,7 @@ sub_80F9370: @ 80F9370 bl ItemIdToBerryType lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl GetBerryNameByBerryType _080F9392: adds r0, r4, 0 diff --git a/asm/secret_base.s b/asm/secret_base.s index 94cdf27ec..3f516b001 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -40,7 +40,7 @@ _080E8B0A: sub_80E8B28: @ 80E8B28 push {r4,r5,lr} movs r4, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr _080E8B2E: lsls r1, r4, 2 adds r1, r4 @@ -89,7 +89,7 @@ _080E8B86: cmp r3, 0x13 bhi _080E8BB0 ldr r2, =gUnknown_0203A01C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r3, 2 adds r0, r3 @@ -116,7 +116,7 @@ _080E8BB0: thumb_func_start sub_80E8BC8 sub_80E8BC8: @ 80E8BC8 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001a9c adds r0, r1 @@ -439,7 +439,7 @@ sub_80E8E18: @ 80E8E18 push {r4-r6,lr} mov r6, r8 push {r6} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] ldr r1, =gUnknown_0203A01C ldrb r1, [r1] @@ -448,7 +448,7 @@ sub_80E8E18: @ 80E8E18 strb r1, [r0] movs r3, 0 ldr r5, =0x00001aa5 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr _080E8E32: ldr r1, [r2] adds r1, r5 @@ -466,11 +466,11 @@ _080E8E32: ldr r0, =0x00004054 movs r1, 0 bl VarSet - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r4, [r6] ldr r0, =0x00001a9e adds r4, r0 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 ldr r5, [r1] adds r0, r5, 0 @@ -480,7 +480,7 @@ _080E8E32: lsrs r2, 24 adds r0, r4, 0 adds r1, r5, 0 - bl CopyString_LimitN + bl StringCopyN ldr r3, [r6] mov r1, r8 ldr r0, [r1] @@ -536,7 +536,7 @@ _080E8EEE: cmp r0, 0x8 bne _080E8F82 movs r4, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr _080E8F0A: ldr r1, [r7] lsls r0, r4, 2 @@ -670,7 +670,7 @@ _080E900C: bl VarGet lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsls r1, r0, 2 adds r1, r0 @@ -709,7 +709,7 @@ sub_80E9068: @ 80E9068 movs r0, 0x1 movs r1, 0 bl fade_screen - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x4 ldrsb r1, [r0, r1] @@ -837,7 +837,7 @@ sub_80E916C: @ 80E916C ldrb r0, [r0] movs r1, 0xA bl __udivsi3 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] movs r5, 0x4 ldrsb r5, [r1, r5] @@ -895,7 +895,7 @@ sub_80E91F8: @ 80E91F8 thumb_func_start CurrentMapIsSecretBase CurrentMapIsSecretBase: @ 80E9214 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] @@ -931,7 +931,7 @@ sub_80E9238: @ 80E9238 bl VarGet lsls r0, 16 lsrs r5, r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr lsls r0, r5, 2 adds r0, r5 lsls r0, 5 @@ -1044,7 +1044,7 @@ sub_80E933C: @ 80E933C lsls r0, 24 cmp r0, 0 bne _080E9374 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x0000271c adds r1, r0, r1 @@ -1061,7 +1061,7 @@ _080E9374: bl VarGet lsls r0, 16 lsrs r0, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr lsls r1, r0, 2 adds r1, r0 lsls r1, 5 @@ -1210,7 +1210,7 @@ _080E9462: lsrs r0, 16 bl FlagReset ldrb r0, [r6] - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r2, [r5] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -1315,7 +1315,7 @@ _080E9588: cmp r0, 0xD bhi _080E95B6 ldrb r0, [r1] - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -1518,7 +1518,7 @@ sub_80E9728: @ 80E9728 thumb_func_start sub_80E9744 sub_80E9744: @ 80E9744 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001a9c adds r0, r1 @@ -1549,7 +1549,7 @@ sub_80E9780: @ 80E9780 adds r6, r0, 0 lsls r1, 24 lsrs r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 lsls r5, r1, 2 adds r5, r1 @@ -1565,7 +1565,7 @@ sub_80E9780: @ 80E9780 lsrs r2, 24 adds r0, r6, 0 adds r1, r4, 0 - bl CopyString_LimitN + bl StringCopyN movs r1, 0xFF strb r1, [r0] mov r1, r8 @@ -1575,10 +1575,10 @@ sub_80E9780: @ 80E9780 adds r0, r1 ldrb r1, [r0] adds r0, r6, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString ldr r1, =gUnknown_085EA72F adds r0, r6, 0 - bl AppendString + bl StringAppend pop {r3} mov r8, r3 pop {r4-r6} @@ -1613,7 +1613,7 @@ sub_80E980C: @ 80E980C bl VarGet lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr mov r8, r1 lsls r5, r0, 2 adds r5, r0 @@ -1622,7 +1622,7 @@ sub_80E980C: @ 80E980C adds r4, r5, r4 ldr r0, =0x00001a9e adds r4, r0 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 adds r0, r4, 0 bl sub_80E8DF4 adds r2, r0, 0 @@ -1630,7 +1630,7 @@ sub_80E980C: @ 80E980C lsrs r2, 24 adds r0, r6, 0 adds r1, r4, 0 - bl CopyString_LimitN + bl StringCopyN movs r1, 0xFF strb r1, [r0] mov r1, r8 @@ -1640,7 +1640,7 @@ sub_80E980C: @ 80E980C adds r0, r1 ldrb r1, [r0] adds r0, r6, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString pop {r3} mov r8, r3 pop {r4-r6} @@ -1654,7 +1654,7 @@ sub_80E9878: @ 80E9878 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsls r1, r0, 2 adds r1, r0 @@ -1735,7 +1735,7 @@ sub_80E9914: @ 80E9914 sub sp, 0x24 movs r0, 0 mov r10, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00001ad0 adds r2, r1, r2 @@ -1905,7 +1905,7 @@ _080E9A60: thumb_func_start sub_80E9A90 sub_80E9A90: @ 80E9A90 push {r4-r6,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x00001aaa adds r1, r0, r4 @@ -1951,7 +1951,7 @@ _080E9AE0: adds r7, r1, 0 cmp r0, 0x8 bne _080E9B5C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001a9c adds r0, r1 @@ -2019,7 +2019,7 @@ sub_80E9B70: @ 80E9B70 bl sub_80E9AD0 movs r0, 0x14 bl sav12_xor_increment - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x00001aaa adds r1, r0, r4 @@ -2109,7 +2109,7 @@ sub_80E9C2C: @ 80E9C2C push {lr} ldr r0, =0x00004054 bl VarGet - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsls r0, 16 lsrs r0, 16 @@ -2579,13 +2579,13 @@ sub_80E9FFC: @ 80E9FFC bl RemoveWindow movs r0, 0 bl schedule_bg_copy_tilemap_to_vram - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r4, 0x8] bl sub_80E9780 - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EA737 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r2, =sub_80EA06C adds r0, r5, 0 adds r1, r4, 0 @@ -2639,7 +2639,7 @@ sub_80EA08C: @ 80EA08C mov r1, r9 mov r2, r10 bl sub_81AE6C8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x8 ldrsh r1, [r6, r0] @@ -2790,7 +2790,7 @@ sub_80EA20C: @ 80EA20C push {r4,lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r4, [r1] lsls r1, r0, 2 adds r1, r0 @@ -2912,7 +2912,7 @@ sub_80EA30C: @ 80EA30C push {lr} ldr r0, =0x00004054 bl VarGet - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r3, [r1] lsls r0, 16 lsrs r0, 16 @@ -2951,7 +2951,7 @@ sub_80EA354: @ 80EA354 cmp r0, 0 bne _080EA39A movs r3, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r4, =0x00001a9d movs r6, 0x21 negs r6, r6 @@ -2982,7 +2982,7 @@ _080EA39A: lsrs r0, 24 strh r0, [r4] ldr r2, =gUnknown_020375F0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r5, 2 adds r0, r5 @@ -3499,7 +3499,7 @@ sub_80EA828: @ 80EA828 mov r8, r3 lsls r0, 24 lsrs r5, r0, 24 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] lsls r2, r5, 2 adds r2, r5 @@ -3555,7 +3555,7 @@ _080EA892: _080EA8A0: cmp r3, 0x5 ble _080EA8B8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r5, 2 adds r0, r5 @@ -3691,7 +3691,7 @@ sub_80EA990: @ 80EA990 lsls r0, 24 lsrs r3, r0, 24 movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r4, =0x00001a9c _080EA99E: @@ -3727,7 +3727,7 @@ _080EA9D0: sub_80EA9D8: @ 80EA9D8 push {r4,lr} movs r2, 0x1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r4, =0x00001a9c _080EA9E2: @@ -3763,7 +3763,7 @@ _080EAA12: sub_80EAA18: @ 80EAA18 push {r4,lr} movs r3, 0x1 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] _080EAA20: lsls r2, r3, 16 @@ -3820,7 +3820,7 @@ sub_80EAA64: @ 80EAA64 negs r0, r0 cmp r2, r0 beq _080EAAC4 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r2, 2 adds r0, r2 @@ -3880,7 +3880,7 @@ sub_80EAAF4: @ 80EAAF4 mov r6, r8 push {r6,r7} sub sp, 0xA0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001a9c adds r7, r0, r1 @@ -4006,7 +4006,7 @@ sub_80EABDC: @ 80EABDC beq _080EABF8 ldrb r0, [r5, 0x1] lsls r0, 27 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r3, [r1] lsrs r0, 31 adds r6, r1, 0 @@ -4429,7 +4429,7 @@ sub_80EAEF4: @ 80EAEF4 ldr r1, [r4, 0xC] ldr r2, [r4, 0x18] bl sub_80EAC5C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00001a9c adds r0, r1 @@ -4657,7 +4657,7 @@ _080EB0D4: mov r0, sp bl sub_80EAEF4 movs r3, 0x1 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr movs r7, 0x10 negs r7, r7 _080EB0E2: @@ -4693,7 +4693,7 @@ _080EB112: bls _080EB0E2 bl sub_80EAAF4 movs r3, 0x1 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr adds r6, r7, 0 adds r4, r5, 0 movs r5, 0x3F diff --git a/asm/shop.s b/asm/shop.s index a2d518a08..294c7f3e0 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -590,7 +590,7 @@ _080DFF78: ldr r0, [r4] adds r0, r5 ldr r1, =gUnknown_085E8CF7 - bl CopyString + bl StringCopy ldr r2, =gUnknown_02039F74 ldr r0, [r2] lsls r1, r6, 3 @@ -660,7 +660,7 @@ _080E0020: ldr r0, =gUnknown_085A5C09 adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy _080E002C: str r5, [r6] str r4, [r6, 0x4] @@ -787,7 +787,7 @@ BuyMenuPrintPriceInList: @ 80E0114 ldrb r0, [r0, 0xF] cmp r0, 0 bne _080E0164 - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 lsls r0, r1, 16 lsrs r0, 16 bl itemid_get_market_price @@ -803,23 +803,23 @@ BuyMenuPrintPriceInList: @ 80E0114 adds r1, r4, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN b _080E0176 .pool _080E0164: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_085A5C08 lsls r1, 5 adds r1, r2 ldrh r1, [r1, 0x14] movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080E0176: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E969C adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0x7 adds r1, r4, 0 movs r2, 0x78 @@ -1249,7 +1249,7 @@ BuyMenuDrawGraphics: @ 80E0524 movs r0, 0x13 movs r1, 0xB bl AddMoneyLabelObject - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -2044,7 +2044,7 @@ _080E0B80: ldrh r0, [r0, 0x14] str r0, [r1] _080E0B92: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -2071,7 +2071,7 @@ _080E0BD0: bne _080E0C38 lsls r0, r5, 16 lsrs r5, r0, 16 - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 adds r0, r5, 0 bl itemid_get_name adds r0, r5, 0 @@ -2080,7 +2080,7 @@ _080E0BD0: lsrs r0, 24 cmp r0, 0x3 bne _080E0C24 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 adds r0, r5, 0 bl ItemIdToBattleMoveId lsls r0, 16 @@ -2090,7 +2090,7 @@ _080E0BD0: ldr r0, =gMoveNames adds r1, r0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_085E9417 b _080E0C26 .pool @@ -2104,33 +2104,33 @@ _080E0C28: b _080E0C8E .pool _080E0C38: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 lsls r1, r5, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 mov r3, r8 ldr r1, [r3] adds r1, r7 ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldrb r0, [r4, 0xF] cmp r0, 0x1 bne _080E0C7C - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9468 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080E0C84 .pool _080E0C7C: - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 ldr r1, =gUnknown_085E9493 - bl ExpandStringRefs + bl StringExpandPlaceholders _080E0C84: - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 ldr r2, =BuyMenuConfirmPurchase adds r0, r6, 0 bl BuyMenuDisplayMessage @@ -2165,15 +2165,15 @@ Task_BuyHowManyDialogueInit: @ 80E0CA4 movs r2, 0x1 movs r3, 0xD bl SetWindowBorderStyle - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E93D5 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -2193,7 +2193,7 @@ Task_BuyHowManyDialogueInit: @ 80E0CA4 bl BuyMenuPrintItemQuantityAndPrice movs r0, 0 bl schedule_bg_copy_tilemap_to_vram - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] movs r1, 0x92 lsls r1, 3 @@ -2302,15 +2302,15 @@ _080E0DF0: movs r0, 0x1 bl PutWindowTilemap ldrh r0, [r5, 0xA] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 bl itemid_get_name - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 movs r2, 0x2 ldrsh r1, [r5, r2] movs r2, 0 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar3 ldr r1, [r7] movs r2, 0x80 lsls r2, 6 @@ -2318,7 +2318,7 @@ _080E0DF0: ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085E943F ldr r2, =BuyMenuConfirmPurchase adds r0, r6, 0 @@ -2454,7 +2454,7 @@ BuyMenuSubtractMoney: @ 80E0F88 lsrs r6, r0, 24 movs r0, 0x26 bl sav12_xor_increment - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] movs r4, 0x92 lsls r4, 3 @@ -2635,16 +2635,16 @@ BuyMenuPrintItemQuantityAndPrice: @ 80E10EC movs r1, 0x26 movs r2, 0x1 bl PrintMoneyAmount - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0x2 ldrsh r1, [r4, r2] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r4, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r4, =gStringVar4 ldr r1, =gUnknown_085E8DA0 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 str r0, [sp] str r0, [sp, 0x4] diff --git a/asm/start_menu.s b/asm/start_menu.s index 65a41f047..ae9c30e0c 100644 --- a/asm/start_menu.s +++ b/asm/start_menu.s @@ -259,16 +259,16 @@ sub_809F654: @ 809F654 ldrb r0, [r4] movs r1, 0 bl sub_81973FC - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_0203A04C ldrb r1, [r1] movs r2, 0x1 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EE6FF adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r0, [r4] movs r1, 0x1 str r1, [sp] @@ -294,7 +294,7 @@ sub_809F654: @ 809F654 sub_809F6C8: @ 809F6C8 push {r4,r5,lr} sub sp, 0xC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -317,9 +317,9 @@ _0809F6F4: ldrb r0, [r4] movs r1, 0 bl sub_81973FC - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =gUnknown_08510510 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb2 adds r1, r3 @@ -327,11 +327,11 @@ _0809F6F4: lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString - ldr r5, =gUnknown_02021FC4 + bl StringCopy + ldr r5, =gStringVar4 ldr r1, =gUnknown_085EE716 adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldrb r0, [r4] movs r1, 0x1 str r1, [sp] @@ -399,7 +399,7 @@ PrintStartMenuActions: @ 809F7C0 ldrb r2, [r0] ldr r0, =gUnknown_08510540 mov r9, r0 - ldr r1, =gUnknown_02021FC4 + ldr r1, =gStringVar4 mov r10, r1 _0809F7DA: ldr r0, =gUnknown_02037610 @@ -436,7 +436,7 @@ _0809F828: adds r0, r3, r1 ldr r1, [r0] mov r0, r10 - bl ExpandStringRefs + bl StringExpandPlaceholders bl get_start_menu_window_id_maybe lsls r0, 24 lsrs r0, 24 @@ -1317,9 +1317,9 @@ sub_809FF98: @ 809FF98 push {r4,lr} adds r2, r0, 0 adds r4, r1, 0 - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 adds r1, r2, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 movs r1, 0x1 bl sub_819786C @@ -2213,7 +2213,7 @@ _080A06EC: ldrb r0, [r6] movs r1, 0 bl sub_81973FC - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] movs r1, 0x4 @@ -2224,7 +2224,7 @@ _080A06EC: mov r9, r0 _080A0710: movs r4, 0x1 - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 movs r0, 0x3 adds r1, r5, 0 movs r2, 0x6 diff --git a/asm/string_util.s b/asm/string_util.s index ed287e682..8de4972c0 100644 --- a/asm/string_util.s +++ b/asm/string_util.s @@ -5,1013 +5,9 @@ .text - 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 - movs r3, 0 -_08008B18: - adds r2, r4, r3 - adds r0, r1, r3 - ldrb r0, [r0] - strb r0, [r2] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _08008B2C - adds r0, r2, 0 - b _08008B3C -_08008B2C: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, r5 - bcc _08008B18 - adds r0, r4, r3 - movs r1, 0xFF - strb r1, [r0] -_08008B3C: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end CopyString_Limit10 - - thumb_func_start GetStringEnd_Limit7 -@ u8 *GetStringEnd_Limit7(u8 *s) -GetStringEnd_Limit7: @ 8008B44 - push {r4,lr} - adds r3, r0, 0 - movs r4, 0xA - movs r2, 0 -_08008B4C: - adds r1, r3, r2 - ldrb r0, [r1] - cmp r0, 0xFF - bne _08008B58 - adds r0, r1, 0 - b _08008B68 -_08008B58: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r4 - bcc _08008B4C - adds r0, r3, r2 - movs r1, 0xFF - strb r1, [r0] -_08008B68: - pop {r4} - pop {r1} - bx r1 - thumb_func_end GetStringEnd_Limit7 - - 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 - movs r3, 0 -_08008B78: - adds r2, r4, r3 - adds r0, r1, r3 - ldrb r0, [r0] - strb r0, [r2] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _08008B8C - adds r0, r2, 0 - b _08008B98 -_08008B8C: - adds r3, 0x1 - cmp r3, r5 - blt _08008B78 - adds r0, r4, r3 - movs r1, 0xFF - strb r1, [r0] -_08008B98: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end CopyString_Limit7 - - thumb_func_start CopyString -@ u8 *CopyString(u8 *dest, u8 *src) -CopyString: @ 8008BA0 - push {lr} - adds r3, r0, 0 - b _08008BAC -_08008BA6: - strb r2, [r3] - adds r3, 0x1 - adds r1, 0x1 -_08008BAC: - ldrb r2, [r1] - adds r0, r2, 0 - cmp r0, 0xFF - bne _08008BA6 - movs r0, 0xFF - strb r0, [r3] - adds r0, r3, 0 - pop {r1} - bx r1 - thumb_func_end CopyString - - thumb_func_start AppendString -@ u8 *AppendString(u8 *dest, u8 *src) -AppendString: @ 8008BC0 - push {lr} - adds r2, r0, 0 - b _08008BC8 -_08008BC6: - adds r2, 0x1 -_08008BC8: - ldrb r0, [r2] - cmp r0, 0xFF - bne _08008BC6 - adds r0, r2, 0 - bl CopyString - pop {r1} - bx r1 - thumb_func_end AppendString - - 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 - lsls r2, 24 - lsrs r5, r2, 24 - movs r3, 0 - adds r0, r5, 0 - cmp r3, r0 - bcs _08008BFE - adds r2, r0, 0 -_08008BEC: - adds r1, r4, r3 - adds r0, r6, r3 - ldrb r0, [r0] - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, r2 - bcc _08008BEC -_08008BFE: - adds r0, r4, r5 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end CopyString_LimitN - - 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 - lsrs r2, 24 - b _08008C14 -_08008C12: - adds r3, 0x1 -_08008C14: - ldrb r0, [r3] - cmp r0, 0xFF - bne _08008C12 - adds r0, r3, 0 - bl CopyString_LimitN - pop {r1} - bx r1 - thumb_func_end AppendString_LimitN - - thumb_func_start GetStringLength -@ u16 GetStringLength(u8 *s) -GetStringLength: @ 8008C24 - push {lr} - adds r2, r0, 0 - movs r1, 0 - ldrb r0, [r2] - cmp r0, 0xFF - beq _08008C3E -_08008C30: - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - adds r0, r2, r1 - ldrb r0, [r0] - cmp r0, 0xFF - bne _08008C30 -_08008C3E: - adds r0, r1, 0 - pop {r1} - bx r1 - thumb_func_end GetStringLength - - thumb_func_start CompareString -@ u8 CompareString(u8 *s1, u8 *s2) -CompareString: @ 8008C44 - push {lr} - adds r2, r0, 0 - b _08008C56 -_08008C4A: - cmp r0, 0xFF - bne _08008C52 - movs r0, 0 - b _08008C64 -_08008C52: - adds r2, 0x1 - adds r1, 0x1 -_08008C56: - ldrb r0, [r2] - ldrb r3, [r1] - cmp r0, r3 - beq _08008C4A - ldrb r0, [r2] - ldrb r1, [r1] - subs r0, r1 -_08008C64: - pop {r1} - bx r1 - thumb_func_end CompareString - - thumb_func_start CompareString_LimitN -@ u8 CompareString_LimitN(u8 *s1, u8 *s2, u32 n) -CompareString_LimitN: @ 8008C68 - push {r4,lr} - adds r3, r0, 0 - b _08008C80 -_08008C6E: - cmp r0, 0xFF - beq _08008C7C - adds r3, 0x1 - adds r1, 0x1 - subs r2, 0x1 - cmp r2, 0 - bne _08008C80 -_08008C7C: - movs r0, 0 - b _08008C8E -_08008C80: - ldrb r0, [r3] - ldrb r4, [r1] - cmp r0, r4 - beq _08008C6E - ldrb r0, [r3] - ldrb r1, [r1] - subs r0, r1 -_08008C8E: - pop {r4} - pop {r1} - bx r1 - thumb_func_end CompareString_LimitN - - thumb_func_start IsStringLengthLessThanN -@ bool8 IsStringLengthLessThanN(u8 *s, s32 n) -IsStringLengthLessThanN: @ 8008C94 - push {lr} - adds r3, r0, 0 - movs r2, 0 - cmp r2, r1 - bge _08008CB8 -_08008C9E: - adds r0, r3, r2 - ldrb r0, [r0] - cmp r0, 0 - beq _08008CAE - cmp r0, 0xFF - beq _08008CAE - movs r0, 0x1 - b _08008CBA -_08008CAE: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r1 - blt _08008C9E -_08008CB8: - movs r0, 0 -_08008CBA: - pop {r1} - bx r1 - thumb_func_end IsStringLengthLessThanN - - 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} - adds r4, r0, 0 - adds r6, r1, 0 - lsls r3, 24 - ldr r0, =gPowersOfTen - lsrs r3, 22 - subs r3, 0x4 - adds r3, r0 - ldr r0, [r3] - movs r7, 0 - cmp r2, 0x1 - bne _08008CDE - movs r7, 0x2 -_08008CDE: - cmp r2, 0x2 - bne _08008CE4 - movs r7, 0x1 -_08008CE4: - adds r5, r0, 0 - cmp r5, 0 - ble _08008D60 - ldr r0, =gDigits - mov r8, r0 -_08008CEE: - adds r0, r6, 0 - adds r1, r5, 0 - bl __divsi3 - lsls r0, 16 - lsrs r2, r0, 16 - adds r3, r2, 0 - adds r0, r5, 0 - muls r0, r2 - subs r1, r6, r0 - cmp r7, 0x1 - bne _08008D26 - adds r3, r4, 0 - adds r4, 0x1 - cmp r2, 0x9 - bhi _08008D20 - mov r6, r8 - adds r0, r2, r6 - ldrb r0, [r0] - b _08008D22 - .pool -_08008D20: - movs r0, 0xAC -_08008D22: - strb r0, [r3] - b _08008D50 -_08008D26: - cmp r2, 0 - bne _08008D2E - cmp r5, 0x1 - bne _08008D46 -_08008D2E: - movs r7, 0x1 - adds r2, r4, 0 - adds r4, 0x1 - cmp r3, 0x9 - bhi _08008D40 - mov r6, r8 - adds r0, r3, r6 - ldrb r0, [r0] - b _08008D42 -_08008D40: - movs r0, 0xAC -_08008D42: - strb r0, [r2] - b _08008D50 -_08008D46: - cmp r7, 0x2 - bne _08008D50 - movs r0, 0x77 - strb r0, [r4] - adds r4, 0x1 -_08008D50: - adds r6, r1, 0 - adds r0, r5, 0 - movs r1, 0xA - bl __divsi3 - adds r5, r0, 0 - cmp r5, 0 - bgt _08008CEE -_08008D60: - movs r0, 0xFF - strb r0, [r4] - adds r0, r4, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ConvertIntToDecimalString - - 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} - adds r4, r0, 0 - adds r6, r1, 0 - lsls r3, 24 - ldr r0, =gPowersOfTen - lsrs r3, 22 - subs r3, 0x4 - adds r3, r0 - ldr r0, [r3] - movs r7, 0 - cmp r2, 0x1 - bne _08008D8E - movs r7, 0x2 -_08008D8E: - cmp r2, 0x2 - bne _08008D94 - movs r7, 0x1 -_08008D94: - adds r5, r0, 0 - cmp r5, 0 - ble _08008E10 - ldr r0, =gDigits - mov r8, r0 -_08008D9E: - adds r0, r6, 0 - adds r1, r5, 0 - bl __udivsi3 - lsls r0, 16 - lsrs r2, r0, 16 - adds r3, r2, 0 - adds r0, r5, 0 - muls r0, r2 - subs r1, r6, r0 - cmp r7, 0x1 - bne _08008DD6 - adds r3, r4, 0 - adds r4, 0x1 - cmp r2, 0x9 - bhi _08008DD0 - mov r6, r8 - adds r0, r2, r6 - ldrb r0, [r0] - b _08008DD2 - .pool -_08008DD0: - movs r0, 0xAC -_08008DD2: - strb r0, [r3] - b _08008E00 -_08008DD6: - cmp r2, 0 - bne _08008DDE - cmp r5, 0x1 - bne _08008DF6 -_08008DDE: - movs r7, 0x1 - adds r2, r4, 0 - adds r4, 0x1 - cmp r3, 0x9 - bhi _08008DF0 - mov r6, r8 - adds r0, r3, r6 - ldrb r0, [r0] - b _08008DF2 -_08008DF0: - movs r0, 0xAC -_08008DF2: - strb r0, [r2] - b _08008E00 -_08008DF6: - cmp r7, 0x2 - bne _08008E00 - movs r0, 0x77 - strb r0, [r4] - adds r4, 0x1 -_08008E00: - adds r6, r1, 0 - adds r0, r5, 0 - movs r1, 0xA - bl __divsi3 - adds r5, r0, 0 - cmp r5, 0 - bgt _08008D9E -_08008E10: - movs r0, 0xFF - strb r0, [r4] - adds r0, r4, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ConvertUnsignedIntToDecimalString - - 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 - push {r6,r7} - sub sp, 0x4 - adds r6, r0, 0 - mov r8, r1 - lsls r3, 24 - lsrs r3, 24 - movs r1, 0x1 - movs r0, 0x1 - cmp r1, r3 - bcs _08008E46 -_08008E3A: - lsls r1, 4 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - cmp r0, r3 - bcc _08008E3A -_08008E46: - movs r3, 0 - cmp r2, 0x1 - bne _08008E4E - movs r3, 0x2 -_08008E4E: - cmp r2, 0x2 - bne _08008E54 - movs r3, 0x1 -_08008E54: - adds r5, r1, 0 - cmp r5, 0 - ble _08008ECA - ldr r0, =gDigits - mov r9, r0 -_08008E5E: - mov r0, r8 - adds r1, r5, 0 - str r3, [sp] - bl __divsi3 - adds r4, r0, 0 - adds r7, r4, 0 - mov r0, r8 - adds r1, r5, 0 - bl __modsi3 - adds r1, r0, 0 - ldr r3, [sp] - cmp r3, 0x1 - bne _08008E90 - adds r2, r6, 0 - adds r6, 0x1 - cmp r4, 0xF - bhi _08008EAA - mov r7, r9 - adds r0, r4, r7 - ldrb r0, [r0] - b _08008EAC - .pool -_08008E90: - cmp r4, 0 - bne _08008E98 - cmp r5, 0x1 - bne _08008EB0 -_08008E98: - movs r3, 0x1 - adds r2, r6, 0 - adds r6, 0x1 - cmp r7, 0xF - bhi _08008EAA - mov r4, r9 - adds r0, r7, r4 - ldrb r0, [r0] - b _08008EAC -_08008EAA: - movs r0, 0xAC -_08008EAC: - strb r0, [r2] - b _08008EBA -_08008EB0: - cmp r3, 0x2 - bne _08008EBA - movs r0, 0x77 - strb r0, [r6] - adds r6, 0x1 -_08008EBA: - mov r8, r1 - adds r0, r5, 0 - cmp r5, 0 - bge _08008EC4 - adds r0, 0xF -_08008EC4: - asrs r5, r0, 4 - cmp r5, 0 - bgt _08008E5E -_08008ECA: - movs r0, 0xFF - strb r0, [r6] - adds r0, r6, 0 - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ConvertIntToHexString - - thumb_func_start ExpandStringRefs -@ u8 *ExpandStringRefs(u8 *dest, u8 *src) -ExpandStringRefs: @ 8008EE0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 -_08008EE6: - ldrb r2, [r5] - adds r5, 0x1 - adds r0, r2, 0 - subs r0, 0xFA - cmp r0, 0x5 - bhi _08008FBA - lsls r0, 2 - ldr r1, =_08008F00 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08008F00: - .4byte _08008FBA - .4byte _08008FBA - .4byte _08008F2C - .4byte _08008F18 - .4byte _08008FBA - .4byte _08008FC0 -_08008F18: - ldrb r0, [r5] - adds r5, 0x1 - bl GetExpandedStringRef - adds r1, r0, 0 - adds r0, r4, 0 - bl ExpandStringRefs - adds r4, r0, 0 - b _08008EE6 -_08008F2C: - strb r2, [r4] - adds r4, 0x1 - ldrb r2, [r5] - adds r5, 0x1 - strb r2, [r4] - adds r4, 0x1 - subs r0, r2, 0x4 - cmp r0, 0x14 - bhi _08008FB0 - lsls r0, 2 - ldr r1, =_08008F4C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08008F4C: - .4byte _08008FA0 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008EE6 - .4byte _08008FB0 - .4byte _08008EE6 - .4byte _08008FB0 - .4byte _08008FA8 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008EE6 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008FB0 - .4byte _08008EE6 - .4byte _08008EE6 - .4byte _08008EE6 - .4byte _08008EE6 -_08008FA0: - ldrb r0, [r5] - strb r0, [r4] - adds r5, 0x1 - adds r4, 0x1 -_08008FA8: - ldrb r0, [r5] - strb r0, [r4] - adds r5, 0x1 - adds r4, 0x1 -_08008FB0: - ldrb r0, [r5] - strb r0, [r4] - adds r5, 0x1 - adds r4, 0x1 - b _08008EE6 -_08008FBA: - strb r2, [r4] - adds r4, 0x1 - b _08008EE6 -_08008FC0: - movs r0, 0xFF - strb r0, [r4] - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - 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 - adds r5, r0, 0 - adds r6, r1, 0 - ldr r1, =gUnknown_082EC80C - mov r0, sp - movs r2, 0x4 - bl memcpy - add r4, sp, 0x4 - ldr r1, =gUnknown_082EC810 - adds r0, r4, 0 - movs r2, 0x5 - bl memcpy - adds r0, r5, 0 - mov r1, sp -_08008FEE: - bl CopyString - adds r5, r0, 0 -_08008FF4: - ldrb r0, [r6] - adds r6, 0x1 - cmp r0, 0xFE - beq _0800900C - cmp r0, 0xFF - bne _08009012 - b _0800901E - .pool -_0800900C: - adds r0, r5, 0 - adds r1, r4, 0 - b _08008FEE -_08009012: - strb r0, [r5] - adds r5, 0x1 - adds r0, 0x40 - strb r0, [r5] - adds r5, 0x1 - b _08008FF4 -_0800901E: - strb r0, [r5] - adds r0, r5, 0 - add sp, 0xC - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8008FCC - - thumb_func_start StringRef_GetPossiblyUnusedStringVar -@ u8 *StringRef_GetPossiblyUnusedStringVar() -StringRef_GetPossiblyUnusedStringVar: @ 800902C - ldr r0, =gUnknown_020223AC - bx lr - .pool - thumb_func_end StringRef_GetPossiblyUnusedStringVar - - thumb_func_start StringRef_GetPlayerName -@ u8 *StringRef_GetPlayerName() -StringRef_GetPlayerName: @ 8009034 - ldr r0, =gUnknown_03005D90 - ldr r0, [r0] - bx lr - .pool - thumb_func_end StringRef_GetPlayerName - - thumb_func_start StringRef_GetStringVar1 -@ u8 *StringRef_GetStringVar1() -StringRef_GetStringVar1: @ 8009040 - ldr r0, =gUnknown_02021CC4 - bx lr - .pool - thumb_func_end StringRef_GetStringVar1 - - thumb_func_start StringRef_GetStringVar2 -@ u8 *StringRef_GetStringVar2() -StringRef_GetStringVar2: @ 8009048 - ldr r0, =gUnknown_02021DC4 - bx lr - .pool - thumb_func_end StringRef_GetStringVar2 - - thumb_func_start StringRef_GetStringVar3 -@ u8 *StringRef_GetStringVar3() -StringRef_GetStringVar3: @ 8009050 - ldr r0, =gUnknown_02021EC4 - bx lr - .pool - thumb_func_end StringRef_GetStringVar3 - - thumb_func_start StringRef_GetDummiedOutGenderDependentString -@ u8 *StringRef_GetDummiedOutGenderDependentString() -StringRef_GetDummiedOutGenderDependentString: @ 8009058 - push {lr} - ldr r0, =gUnknown_03005D90 - ldr r0, [r0] - ldrb r0, [r0, 0x8] - cmp r0, 0 - beq _08009070 - ldr r0, =gExpandedPlaceholder_Chan - b _08009072 - .pool -_08009070: - ldr r0, =gExpandedPlaceholder_Kun -_08009072: - pop {r1} - bx r1 - .pool - thumb_func_end StringRef_GetDummiedOutGenderDependentString - - thumb_func_start StringRef_GetRivalName -@ u8 *StringRef_GetRivalName() -StringRef_GetRivalName: @ 800907C - push {lr} - ldr r0, =gUnknown_03005D90 - ldr r0, [r0] - ldrb r0, [r0, 0x8] - cmp r0, 0 - beq _08009094 - ldr r0, =gExpandedPlaceholder_Brendan - b _08009096 - .pool -_08009094: - ldr r0, =gExpandedPlaceholder_May -_08009096: - pop {r1} - bx r1 - .pool - thumb_func_end StringRef_GetRivalName - - thumb_func_start StringRef_GetEmeraldString -@ u8 *StringRef_GetEmeraldString() -StringRef_GetEmeraldString: @ 80090A0 - ldr r0, =gExpandedPlaceholder_Emerald - bx lr - .pool - thumb_func_end StringRef_GetEmeraldString - - thumb_func_start StringRef_GetAquaString -@ u8 *StringRef_GetAquaString() -StringRef_GetAquaString: @ 80090A8 - ldr r0, =gExpandedPlaceholder_Aqua - bx lr - .pool - thumb_func_end StringRef_GetAquaString - - thumb_func_start StringRef_GetMagmaString -@ u8 *StringRef_GetMagmaString() -StringRef_GetMagmaString: @ 80090B0 - ldr r0, =gExpandedPlaceholder_Magma - bx lr - .pool - thumb_func_end StringRef_GetMagmaString - - thumb_func_start StringRef_GetArchieString -@ u8 *StringRef_GetArchieString() -StringRef_GetArchieString: @ 80090B8 - ldr r0, =gExpandedPlaceholder_Archie - bx lr - .pool - thumb_func_end StringRef_GetArchieString - - thumb_func_start StringRef_GetMaxieString -@ u8 *StringRef_GetMaxieString() -StringRef_GetMaxieString: @ 80090C0 - ldr r0, =gExpandedPlaceholder_Maxie - bx lr - .pool - thumb_func_end StringRef_GetMaxieString - - thumb_func_start StringRef_GetKyogreString -@ u8 *StringRef_GetKyogreString() -StringRef_GetKyogreString: @ 80090C8 - ldr r0, =gExpandedPlaceholder_Kyogre - bx lr - .pool - thumb_func_end StringRef_GetKyogreString - - thumb_func_start StringRef_GetGroudonString -@ u8 *StringRef_GetGroudonString() -StringRef_GetGroudonString: @ 80090D0 - ldr r0, =gExpandedPlaceholder_Groudon - bx lr - .pool - thumb_func_end StringRef_GetGroudonString - - thumb_func_start GetExpandedStringRef -@ u8 *GetExpandedStringRef(u8 code) -GetExpandedStringRef: @ 80090D8 - push {lr} - cmp r0, 0xD - bhi _080090F0 - ldr r1, =gStringRefFunctionTable - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 - b _080090F2 - .pool -_080090F0: - ldr r0, =gExpandedPlaceholder_Empty -_080090F2: - pop {r1} - bx r1 - .pool - thumb_func_end GetExpandedStringRef - - thumb_func_start RepeatChar -@ u8 *RepeatChar(u8 *dest, u8 c, u16 n) -RepeatChar: @ 80090FC - push {lr} - adds r3, r0, 0 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 16 - lsrs r2, 16 - movs r0, 0 - cmp r0, r2 - bcs _0800911C -_0800910E: - strb r1, [r3] - adds r3, 0x1 - adds r0, 0x1 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r2 - bcc _0800910E -_0800911C: - movs r0, 0xFF - strb r0, [r3] - adds r0, r3, 0 - pop {r1} - bx r1 - thumb_func_end RepeatChar - - 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 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 16 - lsrs r3, 16 - b _08009148 -_08009138: - strb r1, [r4] - adds r5, 0x1 - adds r4, 0x1 - cmp r3, 0 - beq _08009148 - subs r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 -_08009148: - ldrb r1, [r5] - adds r0, r1, 0 - cmp r0, 0xFF - bne _08009138 - subs r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - ldr r0, =0x0000ffff - cmp r3, r0 - beq _0800916C - adds r1, r0, 0 -_0800915E: - strb r2, [r4] - adds r4, 0x1 - subs r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, r1 - bne _0800915E -_0800916C: - movs r0, 0xFF - strb r0, [r4] - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end CopyStringPadded - - thumb_func_start RepeatStringTerminator -@ u8 *RepeatStringTerminator(u8 *dest, u16 n) -RepeatStringTerminator: @ 800917C - push {lr} - lsls r2, r1, 16 - lsrs r2, 16 - movs r1, 0xFF - bl RepeatChar - pop {r1} - bx r1 - thumb_func_end RepeatStringTerminator - - thumb_func_start CopyString_LimitN_Multibyte + thumb_func_start StringCopyN_Multibyte @ u8 *CopyString_LimitN_Multibyte(u8 *dest, u8 *src, u32 n) -CopyString_LimitN_Multibyte: @ 800918C +StringCopyN_Multibyte: @ 800918C push {r4,r5,lr} adds r4, r0, 0 adds r3, r1, 0 @@ -1047,11 +43,11 @@ _080091BE: pop {r4,r5} pop {r1} bx r1 - thumb_func_end CopyString_LimitN_Multibyte + thumb_func_end StringCopyN_Multibyte - thumb_func_start GetStringLength_Multibyte + thumb_func_start StringLength_Multibyte @ u32 GetStringLength_Multibyte(u8 *s) -GetStringLength_Multibyte: @ 80091CC +StringLength_Multibyte: @ 80091CC push {lr} adds r2, r0, 0 movs r3, 0 @@ -1071,7 +67,7 @@ _080091DE: adds r0, r3, 0 pop {r1} bx r1 - thumb_func_end GetStringLength_Multibyte + thumb_func_end StringLength_Multibyte thumb_func_start WriteColorChangeControlCode @ u8 *WriteColorChangeControlCode(u8 *dest, u8 colorType, u8 color) @@ -1173,9 +169,9 @@ _08009276: bx r1 thumb_func_end sub_800924C - thumb_func_start GetExtendedControlCodeLength + thumb_func_start GetExtCtrlCodeLength @ u8 GetExtendedControlCodeLength(u8 code) -GetExtendedControlCodeLength: @ 800927C +GetExtCtrlCodeLength: @ 800927C push {lr} lsls r0, 24 lsrs r1, r0, 24 @@ -1189,18 +185,18 @@ _0800928E: pop {r1} bx r1 .pool - thumb_func_end GetExtendedControlCodeLength + thumb_func_end GetExtCtrlCodeLength - thumb_func_start SkipExtendedControlCode + thumb_func_start SkipExtCtrlCode @ u8 *SkipExtendedControlCode(u8 *s) -SkipExtendedControlCode: @ 8009298 +SkipExtCtrlCode: @ 8009298 push {r4,lr} adds r4, r0, 0 b _080092AC _0800929E: adds r4, 0x1 ldrb r0, [r4] - bl GetExtendedControlCodeLength + bl GetExtCtrlCodeLength lsls r0, 24 lsrs r0, 24 adds r4, r0 @@ -1212,11 +208,11 @@ _080092AC: pop {r4} pop {r1} bx r1 - thumb_func_end SkipExtendedControlCode + thumb_func_end SkipExtCtrlCode - thumb_func_start CompareStringWithoutExtendedControlCodes + thumb_func_start StringCompareWithoutExtCtrlCodes @ u8 CompareStringWithoutExtendedControlCodes(u8 *s1, u8 *s2) -CompareStringWithoutExtendedControlCodes: @ 80092BC +StringCompareWithoutExtCtrlCodes: @ 80092BC push {r4-r6,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -1238,10 +234,10 @@ _080092D4: adds r5, 0x1 _080092DE: adds r0, r4, 0 - bl SkipExtendedControlCode + bl SkipExtCtrlCode adds r4, r0, 0 adds r0, r5, 0 - bl SkipExtendedControlCode + bl SkipExtCtrlCode adds r5, r0, 0 ldrb r1, [r4] ldrb r0, [r5] @@ -1256,20 +252,20 @@ _080092FE: pop {r4-r6} pop {r1} bx r1 - thumb_func_end CompareStringWithoutExtendedControlCodes + thumb_func_end StringCompareWithoutExtCtrlCodes - thumb_func_start StopMusicWhileStringIsPrinted + thumb_func_start ConvertInternationalString @ void StopMusicWhileStringIsPrinted(u8 *s, bool8 stopMusic) -StopMusicWhileStringIsPrinted: @ 8009308 +ConvertInternationalString: @ 8009308 push {r4,lr} adds r4, r0, 0 lsls r1, 24 lsrs r1, 24 cmp r1, 0x1 bne _08009368 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 24 lsrs r2, r0, 24 adds r1, r2, 0 @@ -1313,11 +309,11 @@ _08009368: pop {r4} pop {r0} bx r0 - thumb_func_end StopMusicWhileStringIsPrinted + thumb_func_end ConvertInternationalString - thumb_func_start StripExtendedControlCodes + thumb_func_start StripExtCtrlCodes @ void StripExtendedControlCodes(u8 *s) -StripExtendedControlCodes: @ 8009370 +StripExtCtrlCodes: @ 8009370 push {r4-r6,lr} adds r5, r0, 0 movs r4, 0 @@ -1335,7 +331,7 @@ _0800937E: lsrs r4, r0, 16 adds r0, r5, r4 ldrb r0, [r0] - bl GetExtendedControlCodeLength + bl GetExtCtrlCodeLength lsls r0, 24 lsrs r0, 24 adds r0, r4, r0 @@ -1367,6 +363,6 @@ _080093C0: pop {r4-r6} pop {r0} bx r0 - thumb_func_end StripExtendedControlCodes + thumb_func_end StripExtCtrlCodes .align 2, 0 @ Don't pad with nop. diff --git a/asm/text.s b/asm/text.s index 7b1e9c53c..afd82d532 100644 --- a/asm/text.s +++ b/asm/text.s @@ -3417,15 +3417,15 @@ _08005F8A: beq _08005FA0 b _08005F02 _08005F90: - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 b _08005FA2 .pool _08005F98: - ldr r6, =gUnknown_02021DC4 + ldr r6, =gStringVar2 b _08005FA2 .pool _08005FA0: - ldr r6, =gUnknown_02021EC4 + ldr r6, =gStringVar3 _08005FA2: cmp r6, 0 bne _08005FE0 diff --git a/asm/text_window.s b/asm/text_window.s index e9ce0b4a1..4e445166a 100644 --- a/asm/text_window.s +++ b/asm/text_window.s @@ -125,7 +125,7 @@ sub_809882C: @ 809882C lsrs r4, 16 lsls r3, 24 lsrs r3, 24 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldrb r1, [r1, 0x14] lsrs r1, 3 @@ -659,7 +659,7 @@ sub_8098C6C: @ 8098C6C lsls r4, 24 lsrs r4, 24 ldr r2, =gUnknown_0851021C - ldr r5, =gUnknown_03005D90 + ldr r5, =gSaveBlock2Ptr ldr r1, [r5] ldrb r1, [r1, 0x14] lsrs r1, 3 diff --git a/asm/trade.s b/asm/trade.s index db4f075c0..07f16d8e3 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -753,7 +753,7 @@ _08077810: b _08077B22 .pool _08077834: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r5, =gUnknown_02032188 ldr r1, [r5] @@ -813,7 +813,7 @@ _080778BC: _080778C8: b _08077B1A _080778CA: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r0, 0x1 movs r2, 0x78 @@ -1371,7 +1371,7 @@ _08077DD8: b _080780D8 .pool _08077DFC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r5, =gUnknown_02032188 ldr r1, [r5] @@ -1437,7 +1437,7 @@ _08077E90: b _080780D8 .pool _08077EA0: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] movs r0, 0x1 movs r2, 0x78 @@ -2287,7 +2287,7 @@ _0807861A: .pool _08078644: ldr r0, =gUnknown_020228C4 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x00002be0 adds r1, r2 @@ -2329,7 +2329,7 @@ _0807868A: .pool _080786B4: ldr r0, =gUnknown_020228C4 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r1, [r1] ldr r2, =0x000031a8 adds r1, r2 @@ -2393,7 +2393,7 @@ _08078726: bl pokemon_getattr mov r0, sp ldr r1, =gUnknown_0832DF94 - bl CompareStringWithoutExtendedControlCodes + bl StringCompareWithoutExtCtrlCodes cmp r0, 0 bne _08078766 adds r0, r4, 0 @@ -4693,7 +4693,7 @@ _08079A64: _08079A74: adds r0, r4, 0 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 movs r0, 0 movs r1, 0x2 bl GetFontAttribute @@ -4769,7 +4769,7 @@ _08079AFE: bls _08079ADE ldr r1, =gUnknown_0832DABC adds r0, r6, 0 - bl CopyString + bl StringCopy movs r4, 0 _08079B20: lsls r0, r4, 1 @@ -4784,11 +4784,11 @@ _08079B20: ldr r0, =gMoveNames adds r1, r0 adds r0, r6, 0 - bl AppendString + bl StringAppend _08079B3C: adds r0, r6, 0 ldr r1, =gUnknown_0832DAD2 - bl AppendString + bl StringAppend adds r0, r4, 0x1 lsls r0, 16 lsrs r4, r0, 16 @@ -4799,10 +4799,10 @@ _08079B3C: _08079B5C: ldr r1, =gUnknown_0832DABC adds r0, r6, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0832DADF adds r0, r6, 0 - bl AppendString + bl StringAppend _08079B6C: add sp, 0x8 pop {r3,r4} @@ -4888,7 +4888,7 @@ _08079C02: bl pokemon_getattr adds r0, r5, 0 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 adds r0, r6, 0 adds r1, r4, 0 adds r2, r5, 0 @@ -6081,7 +6081,7 @@ _0807A596: sub_807A5B0: @ 807A5B0 push {r4,r5,lr} movs r3, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x000031a8 _0807A5B8: ldr r0, [r5] @@ -7701,10 +7701,10 @@ _0807B2D0: movs r0, 0x6 strb r0, [r1, 0x1] ldr r4, =gUnknown_020229F0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r5, =gUnknown_02024744 adds r0, r5, 0 movs r1, 0x7 @@ -7713,7 +7713,7 @@ _0807B2D0: adds r0, r4, 0 adds r0, 0x1C mov r1, sp - bl CopyString + bl StringCopy subs r4, 0x8 movs r0, 0 mov r8, r0 @@ -7940,7 +7940,7 @@ sub_807B4D0: @ 807B4D0 mov r8, r0 cmp r6, 0xFF beq _0807B52A - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr lsls r1, r6, 3 adds r1, r6 lsls r1, 2 @@ -8523,7 +8523,7 @@ sub_807BAD8: @ 807BAD8 beq _0807BB68 bl link_get_multiplayer_id lsls r0, 24 - ldr r3, =gUnknown_02021CC4 + ldr r3, =gStringVar1 movs r2, 0x80 lsls r2, 17 eors r2, r0 @@ -8534,7 +8534,7 @@ sub_807BAD8: @ 807BAD8 ldr r0, =gUnknown_020229F0 adds r1, r0 adds r0, r3, 0 - bl CopyString + bl StringCopy ldr r5, =gUnknown_02032298 ldrb r0, [r5, 0x1] movs r1, 0x6 @@ -8548,9 +8548,9 @@ sub_807BAD8: @ 807BAD8 movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 ldrb r0, [r5] muls r0, r4 ldr r1, =gUnknown_020244EC @@ -8558,9 +8558,9 @@ sub_807BAD8: @ 807BAD8 movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 b _0807BBA4 .pool _0807BB68: @@ -8571,13 +8571,13 @@ _0807BB68: lsls r4, 2 ldr r0, =gUnknown_08338ED0 adds r4, r0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x2B - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r4, 0 - bl CopyString_Limit10 + bl StringCopy10 ldr r0, =gUnknown_020375E2 ldrh r1, [r0] movs r0, 0x64 @@ -8587,9 +8587,9 @@ _0807BB68: movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 mov r1, sp - bl CopyString_Limit10 + bl StringCopy10 _0807BBA4: add sp, 0x14 pop {r4,r5} @@ -9003,10 +9003,10 @@ _0807C0F8: bl _0807CFB4 .pool _0807C120: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE942 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -9069,10 +9069,10 @@ _0807C178: ldrh r0, [r1] adds r0, 0x1 strh r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE959 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -10470,10 +10470,10 @@ _0807CDDC: lsls r1, 5 movs r0, 0 bl SetGpuReg - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE966 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -10541,10 +10541,10 @@ _0807CE70: adds r0, 0x1 movs r5, 0 strh r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE977 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -11065,10 +11065,10 @@ _0807D4D4: bl _0807E400 .pool _0807D4FC: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE942 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -11131,10 +11131,10 @@ _0807D554: ldrh r0, [r1] adds r0, 0x1 strh r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE959 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -12575,10 +12575,10 @@ _0807E228: lsls r1, 5 movs r0, 0 bl SetGpuReg - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE966 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -12646,10 +12646,10 @@ _0807E2BC: adds r0, 0x1 movs r5, 0 strh r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EE977 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -13184,18 +13184,18 @@ sub_807E73C: @ 807E73C lsls r4, 2 ldr r0, =gUnknown_08338ED0 adds r4, r0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x38] movs r6, 0xB muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r4, 0xC] muls r1, r6 adds r1, r5 - bl CopyString + bl StringCopy ldrh r0, [r4, 0x38] pop {r4-r6} pop {r1} @@ -13223,16 +13223,16 @@ sub_807E784: @ 807E784 movs r1, 0x2 mov r2, sp bl pokemon_getattr - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 mov r1, sp - bl CopyString_Limit10 - ldr r0, =gUnknown_02021DC4 + bl StringCopy10 + ldr r0, =gStringVar2 ldrh r2, [r4, 0xC] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy add sp, 0x20 pop {r4} pop {r0} @@ -13437,7 +13437,7 @@ _0807E98E: adds r1, r6, 0 adds r1, 0x2B adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0 bl sub_81DB4DC @@ -13750,7 +13750,7 @@ _0807ED10: ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF6D2 b _0807EDA6 .pool @@ -13813,11 +13813,11 @@ _0807ED98: adds r1, r2, r0 movs r0, 0x32 strb r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_082C8959 _0807EDA6: adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -14633,10 +14633,10 @@ _0807F4C0: adds r1, r2, r0 movs r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_085EF6D2 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 @@ -14667,10 +14667,10 @@ _0807F50A: movs r5, 0 movs r1, 0x3 strb r1, [r0] - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r1, =gUnknown_082C8959 adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders movs r0, 0 adds r1, r4, 0 movs r2, 0 diff --git a/asm/trader.s b/asm/trader.s index 079aad825..a85f13b3d 100644 --- a/asm/trader.s +++ b/asm/trader.s @@ -8,7 +8,7 @@ thumb_func_start sub_81339F8 sub_81339F8: @ 81339F8 push {r4-r6,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002e28 adds r5, r1, r0 @@ -28,7 +28,7 @@ _08133A12: lsls r1, r4, 2 adds r1, r6 ldr r1, [r1] - bl CopyString + bl StringCopy adds r1, r5, 0x1 adds r1, r4 ldr r0, =gUnknown_085B09F4 @@ -53,7 +53,7 @@ _08133A12: thumb_func_start sub_8133A60 sub_8133A60: @ 8133A60 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e59 adds r0, r1 @@ -77,7 +77,7 @@ sub_8133A78: @ 8133A78 lsls r1, 3 ldr r0, =gTasks + 0x8 adds r7, r1, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002e28 adds r0, r4 @@ -269,7 +269,7 @@ sub_8133C48: @ 8133C48 push {r4-r7,lr} lsls r0, 24 lsrs r7, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002e28 adds r6, r0, r1 @@ -305,20 +305,20 @@ _08133C90: lsls r4, 24 asrs r4, 24 strh r4, [r0] - ldr r5, =gUnknown_02021CC4 + ldr r5, =gStringVar1 movs r0, 0xB adds r1, r4, 0 muls r1, r0 adds r1, 0x5 adds r1, r6, r1 adds r0, r5, 0 - bl CopyString + bl StringCopy adds r0, r6, 0 adds r0, 0x32 adds r0, r4 ldrb r1, [r0] adds r0, r5, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString adds r0, r6, 0x1 adds r0, r4 ldrb r1, [r0] @@ -333,7 +333,7 @@ _08133CCA: thumb_func_start sub_8133CD8 sub_8133CD8: @ 8133CD8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =gUnknown_020375F0 ldr r2, =0x00002e59 @@ -402,7 +402,7 @@ sub_8133D2C: @ 8133D2C negs r1, r1 cmp r0, r1 bne _08133D72 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r5] lsls r1, 5 adds r1, r4 @@ -446,18 +446,18 @@ sub_8133DA0: @ 8133DA0 adds r0, r1 ldrb r0, [r0] strh r0, [r5] - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_020375E0 ldrh r1, [r1] lsls r1, 5 ldr r4, =gUnknown_085A5C09 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r5] lsls r1, 5 adds r1, r4 - bl CopyString + bl StringCopy b _08133E04 .pool _08133DFC: @@ -495,7 +495,7 @@ sub_8133E38: @ 8133E38 push {r4-r6,lr} mov r6, r8 push {r6} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r6, [r0] ldr r0, =0x00002e28 adds r5, r6, r0 @@ -512,10 +512,10 @@ sub_8133E38: @ 8133E38 muls r0, r1 adds r0, 0x5 adds r5, r0 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r2, =0x00002e29 adds r0, r6, r2 ldrh r1, [r4] diff --git a/asm/trainer_card.s b/asm/trainer_card.s index 24675c1ed..981031e28 100644 --- a/asm/trainer_card.s +++ b/asm/trainer_card.s @@ -934,7 +934,7 @@ sub_80C2EC4: @ 80C2EC4 lsls r1, 24 lsrs r1, 24 mov r8, r1 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r1, [r6] ldrb r0, [r1, 0x8] strb r0, [r5] @@ -993,7 +993,7 @@ _080C2F14: movs r0, 0x15 bl sav12_xor_get_clamped_above strh r0, [r5, 0x20] - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] movs r1, 0x92 lsls r1, 3 @@ -1019,10 +1019,10 @@ _080C2F74: lsrs r2, r0, 24 cmp r2, 0x3 bls _080C2F74 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] adds r0, r7, 0 - bl CopyString + bl StringCopy mov r0, r8 cmp r0, 0x1 beq _080C3004 @@ -1098,7 +1098,7 @@ sub_80C3020: @ 80C3020 adds r1, r4, 0 adds r1, 0x60 strh r0, [r1] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000eba adds r0, r2 @@ -1159,7 +1159,7 @@ sub_80C30A4: @ 80C30A4 lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x3A] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r2, =0x00000eba adds r1, r2 @@ -1716,20 +1716,20 @@ sub_80C3574: @ 80C3574 sub sp, 0x2C ldr r1, =gUnknown_085ECF71 add r0, sp, 0xC - bl CopyString + bl StringCopy adds r5, r0, 0 ldr r4, =gUnknown_02039CE8 ldr r1, [r4] ldr r0, =0x00000564 adds r1, r0 adds r0, r5, 0 - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x00007caa adds r0, r1 ldrb r1, [r0] adds r0, r5, 0 - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString ldr r0, [r4] ldr r1, =0x0000052a adds r0, r1 @@ -1777,7 +1777,7 @@ sub_80C3608: @ 80C3608 sub sp, 0x2C ldr r1, =gUnknown_085ECF78 add r0, sp, 0xC - bl CopyString + bl StringCopy ldr r4, =gUnknown_02039CE8 ldr r1, [r4] ldr r2, =0x00000542 @@ -1785,7 +1785,7 @@ sub_80C3608: @ 80C3608 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] ldr r1, =0x0000052a adds r0, r1 @@ -1865,7 +1865,7 @@ _080C36C4: movs r3, 0x39 bl box_print _080C36DE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r4, =gUnknown_02039CE8 ldr r1, [r4] movs r2, 0xAB @@ -1874,11 +1874,11 @@ _080C36DE: ldr r1, [r1] movs r2, 0 movs r3, 0x6 - bl ConvertIntToDecimalString - ldr r5, =gUnknown_02021FC4 + bl ConvertIntToDecimalStringN + ldr r5, =gStringVar4 ldr r1, =gUnknown_085E969C adds r0, r5, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r0, [r4] ldr r1, =0x0000052b adds r0, r1 @@ -1906,7 +1906,7 @@ _080C3740: movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -1981,7 +1981,7 @@ _080C37DC: movs r3, 0x49 bl box_print _080C37F6: - ldr r5, =gUnknown_02021FC4 + ldr r5, =gStringVar4 ldr r4, =gUnknown_02039CE8 ldr r0, [r4] movs r1, 0xA8 @@ -1991,9 +1991,9 @@ _080C37F6: adds r0, r5, 0 movs r2, 0 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, =gUnknown_085ECF8E - bl CopyString + bl StringCopy ldr r0, [r4] ldr r1, =0x0000052b adds r0, r1 @@ -2021,7 +2021,7 @@ _080C3854: movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_02021FC4 + ldr r0, =gStringVar4 str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -2091,7 +2091,7 @@ _080C38E2: b _080C3914 .pool _080C390C: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrh r5, [r0, 0xE] ldrb r6, [r0, 0x10] @@ -2139,13 +2139,13 @@ _080C395C: movs r1, 0 adds r3, r4, 0 bl FillWindowPixelRect - ldr r2, =gUnknown_02021FC4 + ldr r2, =gStringVar4 mov r9, r2 mov r0, r9 adds r1, r5, 0 movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r2, r7, 24 lsrs r2, 24 ldr r0, =gUnknown_0856FB0C @@ -2183,7 +2183,7 @@ _080C395C: adds r1, r6, 0 movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN lsls r2, r7, 24 lsrs r2, 24 mov r0, r8 @@ -2312,27 +2312,27 @@ sub_80C3AF0: @ 80C3AF0 adds r0, 0x4D ldr r2, =0x00000564 adds r1, r2 - bl CopyString + bl StringCopy ldr r1, [r4] adds r0, r1, 0 adds r0, 0x4D ldr r2, =0x00007caa adds r1, r2 ldrb r1, [r1] - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString ldr r1, [r4] ldr r2, =0x0000052a adds r0, r1, r2 ldrb r0, [r0] cmp r0, 0 beq _080C3B30 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, 0x4D - bl CopyString + bl StringCopy ldr r0, [r4] adds r0, 0x4D ldr r1, =gUnknown_085ECFA6 - bl ExpandStringRefs + bl StringExpandPlaceholders _080C3B30: pop {r4} pop {r0} @@ -2402,33 +2402,33 @@ sub_80C3BC4: @ 80C3BC4 ldrb r0, [r1, 0xB] cmp r0, 0 beq _080C3C0E - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0x0000053a adds r1, r2 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x3 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 ldr r1, [r4] ldr r2, =0x0000053c adds r1, r2 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021EC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar3 ldr r1, [r4] ldr r2, =0x0000053e adds r1, r2 ldrh r1, [r1] movs r2, 0x2 movs r3, 0x2 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] adds r0, 0x93 ldr r1, =gUnknown_0856FB4C - bl ExpandStringRefs + bl StringExpandPlaceholders _080C3C0E: pop {r4} pop {r0} @@ -2540,7 +2540,7 @@ sub_80C3CF4: @ 80C3CF4 lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl CopyString + bl StringCopy ldr r1, [r4] ldr r2, =0x00000165 adds r0, r1, r2 @@ -2550,7 +2550,7 @@ sub_80C3CF4: @ 80C3CF4 ldrh r1, [r1] movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r1, [r4] ldr r2, =0x000001ab adds r0, r1, r2 @@ -2559,7 +2559,7 @@ sub_80C3CF4: @ 80C3CF4 ldrh r1, [r1] movs r2, 0 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080C3D40: pop {r4} pop {r0} @@ -2575,19 +2575,19 @@ sub_80C3D60: @ 80C3D60 ldrb r0, [r1, 0xC] cmp r0, 0 beq _080C3D9A - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0x00000165 adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, [r5] ldr r2, =0x000001ab adds r1, r2 - bl CopyString - ldr r4, =gUnknown_02021FC4 + bl StringCopy + ldr r4, =gStringVar4 ldr r1, =gUnknown_085ECFED adds r0, r4, 0 - bl ExpandStringRefs + bl StringExpandPlaceholders ldr r1, [r5] adds r1, 0xD9 ldr r3, =gUnknown_0856FB0C @@ -2616,7 +2616,7 @@ sub_80C3DC0: @ 80C3DC0 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080C3DDE: pop {r0} bx r0 @@ -2663,7 +2663,7 @@ sub_80C3E20: @ 80C3E20 adds r0, r2, r3 movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080C3E48: pop {r0} bx r0 @@ -2716,7 +2716,7 @@ sub_80C3E98: @ 80C3E98 adds r0, r2, r3 movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080C3EBE: pop {r0} bx r0 @@ -2765,16 +2765,16 @@ sub_80C3F14: @ 80C3F14 ldrh r0, [r1] cmp r0, 0 beq _080C3F46 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] ldr r1, =0x00000395 adds r0, r1 ldr r1, =gUnknown_085ED096 - bl ExpandStringRefs + bl StringExpandPlaceholders _080C3F46: pop {r4} pop {r0} @@ -2830,7 +2830,7 @@ sub_80C3FA4: @ 80C3FA4 ldrh r1, [r2] movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN _080C3FCE: pop {r0} bx r0 @@ -2884,26 +2884,26 @@ _080C4044: ldrb r0, [r1, 0xD] cmp r0, 0 beq _080C40B6 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r2, =0x0000054c adds r1, r2 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString - ldr r0, =gUnknown_02021DC4 + bl ConvertIntToDecimalStringN + ldr r0, =gStringVar2 ldr r1, [r4] ldr r2, =0x0000054e adds r1, r2 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x4 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 ldr r1, =gUnknown_085ED0E0 - bl ExpandStringRefs + bl StringExpandPlaceholders b _080C40B6 .pool _080C4094: @@ -2912,16 +2912,16 @@ _080C4094: ldrh r0, [r1] cmp r0, 0 beq _080C40B6 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r1] movs r2, 0x1 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 ldr r1, =gUnknown_085ED0C8 - bl ExpandStringRefs + bl StringExpandPlaceholders _080C40B6: pop {r4} pop {r0} @@ -4610,7 +4610,7 @@ sub_80C4EE4: @ 80C4EE4 movs r1, 0 strb r1, [r0] ldr r2, [r4] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x12] strb r0, [r2, 0x6] @@ -4994,7 +4994,7 @@ _080C5232: adds r5, r2, 0 _080C5240: ldr r1, [r5] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000eb8 adds r0, r2 @@ -6387,14 +6387,14 @@ _080C5DC2: movs r2, 0x5 movs r3, 0x4 bl box_print - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 ldr r5, =gUnknown_02039CEC ldr r0, [r5] ldrh r1, [r0, 0x6] adds r0, r4, 0 movs r2, 0 movs r3, 0x5 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN movs r0, 0x8 adds r1, r4, 0 movs r2, 0x5B @@ -7789,7 +7789,7 @@ sub_80C6974: @ 80C6974 beq _080C6A40 b _080C6B7A _080C6A40: - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, [r4] movs r0, 0x5 ldrsb r0, [r2, r0] @@ -7854,7 +7854,7 @@ _080C6AB4: _080C6ACE: ldrh r7, [r1, 0x28] _080C6AD0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r4, [r0, 0x2A] lsls r0, r7, 16 @@ -7883,7 +7883,7 @@ _080C6AF2: ldm r0!, {r2,r3,r6} stm r1!, {r2,r3,r6} mov r1, sp - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] adds r0, 0x4 @@ -7925,7 +7925,7 @@ _080C6B3E: negs r0, r0 ands r0, r2 strb r0, [r1, 0x5] - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -8353,7 +8353,7 @@ sub_80C6EAC: @ 80C6EAC str r0, [sp, 0x18] str r1, [sp, 0x1C] ldr r0, [sp, 0x20] - bl GetStringLength_Multibyte + bl StringLength_Multibyte lsls r0, 24 ldr r2, =0x00ffffff ldr r1, [sp, 0x18] diff --git a/asm/truck_scene.s b/asm/truck_scene.s index 4c5a4784c..e190ece15 100644 --- a/asm/truck_scene.s +++ b/asm/truck_scene.s @@ -65,7 +65,7 @@ sub_80FB0F8: @ 80FB0F8 ldrsh r0, [r5, r1] adds r0, 0x1E bl sub_80FB0DC - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, [r4] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -201,7 +201,7 @@ _080FB20C: ldrsh r0, [r7, r4] adds r0, 0x1E bl sub_80FB0DC - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r2, [r6] ldrb r1, [r2, 0x5] ldrb r2, [r2, 0x4] @@ -303,7 +303,7 @@ _080FB304: ldrsb r6, [r0, r6] adds r0, r6, 0 bl SetCameraPanning - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -553,7 +553,7 @@ sub_80FB540: @ 80FB540 lsrs r6, r0, 24 cmp r6, 0 bne _080FB58A - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] diff --git a/asm/tv.s b/asm/tv.s index 2de4f42ae..ca3784449 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -9,7 +9,7 @@ sub_80EBEE0: @ 80EBEE0 push {r4-r7,lr} movs r3, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr movs r5, 0 ldr r7, =0x000027ce _080EBEEA: @@ -55,7 +55,7 @@ _080EBF0A: special_0x44: @ 80EBF3C push {r4-r7,lr} movs r4, 0x5 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] movs r2, 0xA2 lsls r2, 6 @@ -89,7 +89,7 @@ _080EBF70: lsls r0, 24 lsrs r5, r0, 24 adds r7, r5, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _080EBF86: ldr r1, [r6] lsls r0, r5, 3 @@ -156,7 +156,7 @@ sub_80EBFF4: @ 80EBFF4 movs r0, 0xFF b _080EC03E _080EC006: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r3, =0x00002b90 adds r0, r2, r3 @@ -199,7 +199,7 @@ UpdateTVScreensOnMap: @ 80EC044 beq _080EC06A cmp r0, 0x2 beq _080EC0BE - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r0, [r0, 0x4] cmp r0, 0xD @@ -332,7 +332,7 @@ TurnOnTVScreen: @ 80EC14C thumb_func_start special_0x45 special_0x45: @ 80EC168 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =gUnknown_020375E0 ldrh r2, [r0] @@ -351,7 +351,7 @@ special_0x45: @ 80EC168 sub_80EC18C: @ 80EC18C push {r4,lr} movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] _080EC194: lsls r0, r2, 3 @@ -389,7 +389,7 @@ _080EC1CC: thumb_func_start special_0x4a special_0x4a: @ 80EC1D4 push {lr} - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r2, =gUnknown_020375E0 ldrh r1, [r2] lsls r0, r1, 3 @@ -426,7 +426,7 @@ GabbyAndTyNewGameInitData: @ 80EC21C mov r5, r9 mov r4, r8 push {r4-r6} - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r2, [r3] ldr r1, =0x00002ba4 adds r0, r2, r1 @@ -540,7 +540,7 @@ GabbyAndTyNewGameInitData: @ 80EC21C thumb_func_start GabbyAndTyBeforeInterview GabbyAndTyBeforeInterview: @ 80EC31C push {r4,lr} - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r2, [r3] ldr r0, =gUnknown_03005D10 mov r12, r0 @@ -665,7 +665,7 @@ _080EC416: strb r1, [r0] _080EC41E: bl TakeTVShowInSearchOfTrainersOffTheAir - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r4, =0x00002ba8 adds r0, r4 @@ -684,7 +684,7 @@ _080EC436: thumb_func_start GabbyAndTyAfterInterview GabbyAndTyAfterInterview: @ 80EC448 push {r4-r6,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r2, [r5] ldr r6, =0x00002bae adds r0, r2, r6 @@ -757,7 +757,7 @@ GabbyAndTyAfterInterview: @ 80EC448 thumb_func_start TakeTVShowInSearchOfTrainersOffTheAir TakeTVShowInSearchOfTrainersOffTheAir: @ 80EC4E8 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002bae adds r1, r0 @@ -773,7 +773,7 @@ TakeTVShowInSearchOfTrainersOffTheAir: @ 80EC4E8 thumb_func_start GabbyAndTyGetBattleNum GabbyAndTyGetBattleNum: @ 80EC504 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r2, =0x00002bad adds r1, r0, r2 @@ -794,7 +794,7 @@ _080EC522: thumb_func_start IsTVShowInSearchOfTrainersAiring IsTVShowInSearchOfTrainersAiring: @ 80EC530 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bae adds r0, r1 @@ -808,7 +808,7 @@ IsTVShowInSearchOfTrainersAiring: @ 80EC530 thumb_func_start GabbyAndTyGetLastQuote GabbyAndTyGetLastQuote: @ 80EC548 push {r4,r5,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r2, =0x00002baa adds r1, r0, r2 @@ -816,7 +816,7 @@ GabbyAndTyGetLastQuote: @ 80EC548 ldr r4, =0x0000ffff cmp r0, r4 beq _080EC584 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r1] bl CopyEasyChatWord ldr r1, [r5] @@ -840,7 +840,7 @@ _080EC586: thumb_func_start GabbyAndTyGetLastBattleTrivia GabbyAndTyGetLastBattleTrivia: @ 80EC58C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002baf adds r0, r1 @@ -1055,12 +1055,12 @@ _080EC75E: adds r0, r1 adds r1, r5, 0 adds r1, 0x2A - bl CompareString + bl StringCompare cmp r0, 0 bne _080EC776 b _080EC888 _080EC776: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -1103,7 +1103,7 @@ _080EC7A8: beq _080EC888 _080EC7CA: movs r4, 0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -1126,7 +1126,7 @@ _080EC7CA: movs r0, 0x1 adds r3, r6, 0 adds r3, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 adds r7, r6, 0x4 b _080EC84E @@ -1137,7 +1137,7 @@ _080EC81C: mov r12, r0 adds r3, r6, 0 adds r3, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r8, r1 adds r7, r6, 0x4 adds r1, r5, 0 @@ -1165,16 +1165,16 @@ _080EC84E: mov r0, r8 ldr r1, [r0] adds r0, r3, 0 - bl CopyString + bl StringCopy ldr r4, =gUnknown_03005D3A adds r0, r7, 0 adds r1, r4, 0 - bl CopyString + bl StringCopy adds r0, r7, 0 bl sub_81DB604 adds r5, r0, 0 adds r0, r7, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes subs r4, 0x2A ldrh r0, [r4, 0x28] strh r0, [r6, 0x10] @@ -1196,7 +1196,7 @@ _080EC888: thumb_func_start sub_80EC8A4 sub_80EC8A4: @ 80EC8A4 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002b2c adds r4, r1, r0 @@ -1268,7 +1268,7 @@ _080EC92E: cmp r0, 0x1 bne _080EC9B4 _080EC940: - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] ldr r6, =0x000027cc adds r0, r6 @@ -1314,9 +1314,9 @@ _080EC940: strb r0, [r4, 0x12] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -1381,7 +1381,7 @@ sub_80ECA38: @ 80ECA38 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r7, [r0] ldr r1, =0x00002b2c @@ -1404,9 +1404,9 @@ sub_80ECA38: @ 80ECA38 strb r0, [r4, 0x1] adds r0, r4, 0 adds r0, 0x14 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02039F2C ldrh r0, [r0] strb r0, [r4, 0x1C] @@ -1435,7 +1435,7 @@ sub_80ECA38: @ 80ECA38 adds r0, r4, 0x4 ldr r2, =0x00002b30 adds r1, r7, r2 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -1476,7 +1476,7 @@ sub_80ECB00: @ 80ECB00 lsls r3, 16 lsrs r3, 16 mov r8, r3 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -1508,9 +1508,9 @@ sub_80ECB00: @ 80ECB00 movs r5, 0x1 strb r5, [r4, 0x1] adds r0, r4, 0x4 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_02022FEC ldr r1, [r0] movs r0, 0x40 @@ -1541,13 +1541,13 @@ _080ECBA4: ldr r6, =gUnknown_020229F0 adds r1, r5, r6 mov r0, sp - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 adds r0, 0xC mov r1, sp - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -1595,7 +1595,7 @@ sub_80ECC04: @ 80ECC04 lsls r0, 24 lsrs r0, 24 mov r9, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r0, [r0] ldr r7, =0x000027cc @@ -1635,17 +1635,17 @@ _080ECC68: strb r7, [r4, 0x1] adds r0, r4, 0 adds r0, 0xC - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy mov r0, sp mov r1, r10 - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0x4 mov r1, sp - bl CopyString + bl StringCopy movs r0, 0x7 ands r5, r0 ldrb r1, [r4, 0x3] @@ -1696,7 +1696,7 @@ _080ECCEE: sub_80ECD00: @ 80ECD00 push {r4-r6,lr} sub sp, 0x20 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E4 ldrh r1, [r0] lsls r0, r1, 3 @@ -1713,9 +1713,9 @@ sub_80ECD00: @ 80ECD00 lsls r0, 1 strb r0, [r4, 0x16] adds r0, r4, 0x2 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy movs r0, 0xB strb r0, [r4] movs r5, 0x1 @@ -1724,15 +1724,15 @@ sub_80ECD00: @ 80ECD00 strb r0, [r4, 0xA] lsrs r0, 8 strb r0, [r4, 0xB] - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 mov r0, sp - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 adds r0, 0xC mov r1, sp - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -1764,7 +1764,7 @@ sub_80ECDA4: @ 80ECDA4 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x000027cc adds r0, r4 @@ -1799,7 +1799,7 @@ sub_80ECDF4: @ 80ECDF4 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002b2c adds r4, r0, r1 @@ -1827,7 +1827,7 @@ sub_80ECE34: @ 80ECE34 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002b2c adds r4, r0, r1 @@ -1855,7 +1855,7 @@ sub_80ECE74: @ 80ECE74 push {r4,r5,lr} lsls r0, 16 lsrs r5, r0, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002b2c adds r4, r0, r1 @@ -1885,7 +1885,7 @@ sub_80ECEB4: @ 80ECEB4 lsrs r7, r0, 24 lsls r1, 24 lsrs r6, r1, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002b2c adds r5, r4, r0 @@ -1910,9 +1910,9 @@ sub_80ECEB4: @ 80ECEB4 adds r2, 0xD adds r1, r2 adds r0, r4, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes strb r7, [r5, 0xC] adds r1, r6, 0x1 ldr r0, =gUnknown_02039F30 @@ -1950,7 +1950,7 @@ _080ECF4C: thumb_func_start sub_80ECF5C sub_80ECF5C: @ 80ECF5C push {r4-r7,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r6, [r0] ldr r0, =0x00002b2c adds r5, r6, r0 @@ -1973,14 +1973,14 @@ sub_80ECF5C: @ 80ECF5C strh r0, [r4, 0x2] adds r0, r4, 0 adds r0, 0x16 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 adds r0, 0x8 ldr r2, =0x00002b34 adds r1, r6, r2 - bl CopyString + bl StringCopy ldrb r0, [r5, 0x13] lsls r0, 29 lsrs r0, 29 @@ -2032,7 +2032,7 @@ _080ECFFA: _080ED01C: strb r0, [r4, 0x1F] _080ED01E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -2050,7 +2050,7 @@ sub_80ED03C: @ 80ED03C push {r4-r6,lr} lsls r0, 16 lsrs r6, r0, 16 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x00002b2c adds r5, r0, r1 @@ -2089,7 +2089,7 @@ sub_80ED090: @ 80ED090 push {r7} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r0, =0x00002b2c adds r7, r4, r0 @@ -2153,7 +2153,7 @@ sub_80ED090: @ 80ED090 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes mov r1, r8 ldrb r0, [r1] muls r0, r6 @@ -2173,7 +2173,7 @@ _080ED134: thumb_func_start sub_80ED164 sub_80ED164: @ 80ED164 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2189,15 +2189,15 @@ sub_80ED164: @ 80ED164 movs r0, 0x1 strb r0, [r6, 0x1] adds r0, r6, 0x2 - ldr r4, =gUnknown_03005D90 + ldr r4, =gSaveBlock2Ptr ldr r1, [r4] - bl CopyString + bl StringCopy adds r0, r6, 0 adds r0, 0xC ldr r1, [r4] ldr r2, =0x00000bd8 adds r1, r2 - bl CopyString + bl StringCopy ldr r1, [r4] ldr r2, =0x00000bd4 adds r0, r1, r2 @@ -2240,7 +2240,7 @@ _080ED1F6: strb r0, [r6, 0x1D] cmp r0, 0x1 beq _080ED21C - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r2, =0x00000beb adds r0, r2 @@ -2261,7 +2261,7 @@ _080ED21E: @ void SaveRecordedItemPurchasesForTVShow() SaveRecordedItemPurchasesForTVShow: @ 80ED238 push {r4-r7,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldrh r1, [r0, 0x4] ldr r0, =0x00003c1a @@ -2339,9 +2339,9 @@ _080ED2B6: strb r0, [r5, 0x2] adds r0, r5, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r5, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -2372,25 +2372,25 @@ sub_80ED320: @ 80ED320 muls r0, r7 ldr r6, =gUnknown_020244EC adds r0, r6 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr mov r9, r1 ldr r0, [r1] - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 bls _080ED400 adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r0, 16 cmp r0, 0x1 bls _080ED400 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2431,7 +2431,7 @@ sub_80ED320: @ 80ED320 adds r0, 0xF mov r2, r9 ldr r1, [r2] - bl CopyString + bl StringCopy mov r1, r8 ldrh r0, [r1] muls r0, r7 @@ -2441,7 +2441,7 @@ sub_80ED320: @ 80ED320 adds r2, r5, 0 bl pokemon_getattr adds r0, r5, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r4, 0 bl sub_80ECA10 ldr r0, =gUnknown_82E9531 @@ -2467,7 +2467,7 @@ _080ED400: thumb_func_start StartMassOutbreak StartMassOutbreak: @ 80ED430 push {r4,r5,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r0, [r0] lsls r1, r0, 3 @@ -2549,7 +2549,7 @@ sub_80ED4DC: @ 80ED4DC ldrh r0, [r0] cmp r0, 0x1 beq _080ED532 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2590,7 +2590,7 @@ _080ED532: thumb_func_start sub_80ED548 sub_80ED548: @ 80ED548 push {r4,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2606,9 +2606,9 @@ sub_80ED548: @ 80ED548 strb r0, [r4, 0x1] adds r0, r4, 0 adds r0, 0x10 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -2634,7 +2634,7 @@ sub_80ED548: @ 80ED548 thumb_func_start sub_80ED5B8 sub_80ED5B8: @ 80ED5B8 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2652,9 +2652,9 @@ sub_80ED5B8: @ 80ED5B8 strb r0, [r4, 0x1] adds r0, r4, 0 adds r0, 0x10 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy strh r5, [r4, 0x2] adds r0, r4, 0 bl sub_80ECA10 @@ -2672,7 +2672,7 @@ sub_80ED610: @ 80ED610 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -2716,9 +2716,9 @@ sub_80ED610: @ 80ED610 orrs r1, r0 strb r1, [r5, 0x4] adds r0, r5, 0x5 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -2730,7 +2730,7 @@ sub_80ED610: @ 80ED610 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -2791,7 +2791,7 @@ sub_80ED718: @ 80ED718 cmp r0, 0 beq _080ED7E4 movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r3, =0x000027cc _080ED72E: @@ -2814,7 +2814,7 @@ _080ED72E: lsrs r5, r0, 24 cmp r5, 0 bne _080ED7E4 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r1, =0x000027cc adds r0, r1 @@ -2891,7 +2891,7 @@ _080ED7E4: thumb_func_start EndMassOutbreak EndMassOutbreak: @ 80ED808 push {r4,r5,lr} - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r0, [r3] ldr r2, =0x00002b90 adds r1, r0, r2 @@ -2972,7 +2972,7 @@ sub_80ED8B4: @ 80ED8B4 push {r4-r7,lr} lsls r0, 16 lsrs r5, r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r0, [r1] ldr r2, =0x00002b90 adds r0, r2 @@ -3028,7 +3028,7 @@ UpdateMassOutbreakTimeLeft: @ 80ED924 push {lr} lsls r0, 16 lsrs r2, r0, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002ba2 adds r1, r0, r3 @@ -3096,7 +3096,7 @@ _080ED99C: thumb_func_start sub_80ED9A8 sub_80ED9A8: @ 80ED9A8 push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -3139,9 +3139,9 @@ sub_80ED9A8: @ 80ED9A8 strh r0, [r4, 0x4] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3165,7 +3165,7 @@ sub_80EDA3C: @ 80EDA3C thumb_func_start sub_80EDA48 sub_80EDA48: @ 80EDA48 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r2, =0x00002b2c adds r1, r0, r2 @@ -3194,7 +3194,7 @@ sub_80EDA80: @ 80EDA80 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] ldr r1, =0x00002b2c adds r5, r0, r1 @@ -3250,9 +3250,9 @@ sub_80EDA80: @ 80EDA80 strb r0, [r4, 0xA] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3277,7 +3277,7 @@ sub_80EDB44: @ 80EDB44 movs r0, 0x1A movs r1, 0x1 bl sub_80EF46C - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x000027cc adds r0, r1 @@ -3373,14 +3373,14 @@ _080EDC1C: adds r6, 0x1 cmp r6, 0x6 bls _080EDBEA - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r1, [r0] ldr r2, =0x00000eb8 adds r0, r1, r2 ldrh r0, [r0] strh r0, [r4, 0x8] adds r0, r7, 0 - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3397,7 +3397,7 @@ _080EDC40: sub_80EDC60: @ 80EDC60 push {r4-r7,lr} adds r5, r0, 0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] ldr r6, =0x000027cc adds r0, r6 @@ -3429,7 +3429,7 @@ sub_80EDC60: @ 80EDC60 movs r0, 0x1B strb r0, [r4] strb r1, [r4, 0x1] - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r0, [r1] ldrb r0, [r0, 0x8] strb r0, [r4, 0x8] @@ -3440,7 +3440,7 @@ sub_80EDC60: @ 80EDC60 adds r0, r4, 0 adds r0, 0x13 ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3456,7 +3456,7 @@ _080EDCCE: thumb_func_start sub_80EDCE8 sub_80EDCE8: @ 80EDCE8 push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -3498,9 +3498,9 @@ sub_80EDCE8: @ 80EDCE8 strh r0, [r4, 0x6] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3518,7 +3518,7 @@ sub_80EDD78: @ 80EDD78 push {r4-r6,lr} lsls r0, 16 lsrs r4, r0, 16 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -3588,7 +3588,7 @@ _080EDE0C: _080EDE12: lsls r0, 16 lsrs r3, r0, 16 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -3609,9 +3609,9 @@ _080EDE12: strb r5, [r4, 0x2] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EC9E8 ldr r0, =gUnknown_82E9531 @@ -3655,7 +3655,7 @@ sub_80EDE98: @ 80EDE98 mov r8, r0 movs r3, 0 ldr r6, =gUnknown_030060D0 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr adds r2, r6, 0 movs r1, 0 _080EDEAC: @@ -3961,7 +3961,7 @@ sub_80EE104: @ 80EE104 movs r0, 0x1F movs r1, 0x1 bl sub_80EF46C - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x000027cc adds r0, r1 @@ -3989,9 +3989,9 @@ sub_80EE104: @ 80EE104 strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r0, r4, 0 bl sub_80EDE98 adds r0, r4, 0 @@ -4011,7 +4011,7 @@ _080EE168: thumb_func_start sub_80EE184 sub_80EE184: @ 80EE184 push {r4-r7,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -4050,7 +4050,7 @@ _080EE1B6: movs r5, 0 ldr r6, =gUnknown_03005D10 ldr r3, =gUnknown_02037318 - ldr r7, =gUnknown_03005D90 + ldr r7, =gSaveBlock2Ptr adds r2, r6, 0 adds r2, 0x36 _080EE1DA: @@ -4078,7 +4078,7 @@ _080EE1FE: adds r0, r4, 0 adds r0, 0x13 ldr r1, [r7] - bl CopyString + bl StringCopy ldrh r0, [r6, 0x6] strh r0, [r4, 0xA] ldr r0, =gUnknown_0202433A @@ -4166,7 +4166,7 @@ _080EE2C2: thumb_func_start sub_80EE2CC sub_80EE2CC: @ 80EE2CC push {r4-r6,lr} - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -4200,9 +4200,9 @@ sub_80EE2CC: @ 80EE2CC strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =gUnknown_020375E0 ldrb r1, [r0] movs r0, 0x4 @@ -4244,7 +4244,7 @@ sub_80EE35C: @ 80EE35C lsls r3, 16 lsrs r3, 16 str r3, [sp] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 ldr r0, [r0] ldr r5, =0x000027cc @@ -4280,9 +4280,9 @@ sub_80EE35C: @ 80EE35C strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy mov r0, r10 strh r0, [r4, 0x4] mov r1, r9 @@ -4346,7 +4346,7 @@ sub_80EE44C: @ 80EE44C mov r8, r0 lsls r1, 24 lsrs r7, r1, 24 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r5, =0x000027cc adds r0, r5 @@ -4380,9 +4380,9 @@ sub_80EE44C: @ 80EE44C strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy mov r0, r8 strb r0, [r4, 0x2] strb r7, [r4, 0x3] @@ -4409,7 +4409,7 @@ sub_80EE4DC: @ 80EE4DC lsls r1, 24 lsrs r1, 24 mov r8, r1 - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] ldr r5, =0x000027cc adds r0, r5 @@ -4443,16 +4443,16 @@ sub_80EE4DC: @ 80EE4DC strb r1, [r5, 0x1] adds r0, r5, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy adds r4, r5, 0x4 adds r0, r6, 0 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r6, 0 bl sub_80EE5A4 strb r0, [r5, 0x2] @@ -4697,7 +4697,7 @@ _080EE728: thumb_func_start sub_80EE72C sub_80EE72C: @ 80EE72C push {r4-r6,lr} - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r6, =0x000027cc adds r0, r6 @@ -4731,9 +4731,9 @@ sub_80EE72C: @ 80EE72C strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, [r5] ldr r2, =0x00002bb0 adds r1, r0, r2 @@ -4758,7 +4758,7 @@ _080EE79C: thumb_func_start sub_80EE7C0 sub_80EE7C0: @ 80EE7C0 push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x000027cc adds r0, r1 @@ -4804,7 +4804,7 @@ sub_80EE818: @ 80EE818 lsrs r0, 24 cmp r0, 0x1 bne _080EE870 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r7, r0, r1 @@ -4841,7 +4841,7 @@ _080EE866: cmp r6, 0x17 bls _080EE83C _080EE870: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -4858,7 +4858,7 @@ _080EE870: b _080EE8C2 .pool _080EE89C: - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x000027cc adds r0, r4 @@ -4887,7 +4887,7 @@ sub_80EE8C8: @ 80EE8C8 lsrs r6, r0, 16 lsls r1, 24 lsrs r4, r1, 24 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r1, =0x000027cc adds r0, r1 @@ -4917,9 +4917,9 @@ _080EE8F4: strb r1, [r7, 0x1] adds r0, r7, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy strh r6, [r7, 0x2] strb r4, [r7, 0xD] subs r0, r4, 0x1 @@ -5009,9 +5009,9 @@ _080EE9E8: b _080EEA3C .pool _080EEA00: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr mov r8, r2 - ldr r6, =gUnknown_03005D90 + ldr r6, =gSaveBlock2Ptr ldr r0, [r6] ldr r1, =0x00000caa adds r0, r1 @@ -5071,7 +5071,7 @@ sub_80EEA70: @ 80EEA70 bne _080EEA86 b _080EEB8C _080EEA86: - ldr r7, =gUnknown_03005D8C + ldr r7, =gSaveBlock1Ptr ldr r0, [r7] ldr r1, =0x000027cc adds r0, r1 @@ -5099,21 +5099,21 @@ _080EEA86: strb r1, [r5, 0x1] adds r0, r5, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy ldr r0, =0x000040ec bl VarGet strh r0, [r5, 0x2] bl sub_80E980C - ldr r1, =gUnknown_02021CC4 + ldr r1, =gStringVar1 mov r0, sp - bl CopyString + bl StringCopy mov r0, sp - bl StripExtendedControlCodes + bl StripExtCtrlCodes adds r0, r5, 0x4 mov r1, sp - bl CopyString + bl StringCopy ldr r0, =0x000040ed bl VarGet strh r0, [r5, 0x10] @@ -5231,7 +5231,7 @@ sub_80EEBF4: @ 80EEBF4 movs r0, 0x25 movs r1, 0x1 bl sub_80EF46C - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] ldr r1, =0x000027cc adds r0, r1 @@ -5259,9 +5259,9 @@ sub_80EEBF4: @ 80EEBF4 strb r1, [r4, 0x1] adds r0, r4, 0 adds r0, 0x13 - ldr r1, =gUnknown_03005D90 + ldr r1, =gSaveBlock2Ptr ldr r1, [r1] - bl CopyString + bl StringCopy strb r5, [r4, 0x4] ldr r1, =gUnknown_0858D0EC lsls r0, r5, 2 @@ -5420,7 +5420,7 @@ sub_80EED88: @ 80EED88 lsls r0, 24 cmp r0, 0 beq _080EEE0C - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr ldr r0, [r6] ldr r7, =0x00002b50 adds r0, r7 @@ -5532,7 +5532,7 @@ _080EEE60: sub_80EEE78: @ 80EEE78 push {r4,lr} lsls r0, 24 - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] lsrs r0, 22 adds r1, r0 @@ -5560,9 +5560,9 @@ sub_80EEE78: @ 80EEE78 sub_80EEEB8: @ 80EEEB8 push {r4-r7,lr} movs r2, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _080EEEBE: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r2, 2 adds r0, r1 @@ -5614,7 +5614,7 @@ _080EEF12: sub_80EEF20: @ 80EEF20 push {r4,lr} movs r2, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] _080EEF28: lsls r0, r2, 2 @@ -5663,7 +5663,7 @@ sub_80EEF6C: @ 80EEF6C b _080EF01A .pool _080EEF84: - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] lsls r4, r2, 2 adds r1, r0, r4 @@ -5704,10 +5704,10 @@ _080EEFD0: .pool _080EEFE8: ldrh r1, [r2] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 movs r2, 0 movs r3, 0x1 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN ldr r0, [r5] adds r0, r4 ldr r1, =0x00002b51 @@ -5748,7 +5748,7 @@ _080EF044: b _080EF08C _080EF048: movs r2, 0 - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr _080EF04C: ldr r1, [r4] lsls r0, r2, 2 @@ -5797,7 +5797,7 @@ _080EF0A2: movs r0, 0x1 b _080EF0D6 _080EF0A6: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0x80 @@ -5811,7 +5811,7 @@ _080EF0A6: b _080EF0D4 .pool _080EF0C8: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] ldr r0, =0x0000150d @@ -5837,7 +5837,7 @@ _080EF0EE: b _080EF112 _080EF0F2: movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r4, =0x00002b50 _080EF0FA: @@ -5868,7 +5868,7 @@ sub_80EF120: @ 80EF120 lsls r0, 16 lsrs r7, r0, 16 movs r6, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr mov r8, r0 _080EF130: mov r1, r8 @@ -5959,7 +5959,7 @@ _080EF1E0: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x14] - bl CopyString + bl StringCopy b _080EF244 .pool _080EF1FC: @@ -5969,7 +5969,7 @@ _080EF1FC: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x18] - bl CopyString + bl StringCopy b _080EF244 .pool _080EF218: @@ -5979,7 +5979,7 @@ _080EF218: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x1C] - bl CopyString + bl StringCopy b _080EF244 .pool _080EF234: @@ -5989,7 +5989,7 @@ _080EF234: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x20] - bl CopyString + bl StringCopy _080EF244: pop {r0} bx r0 @@ -6026,7 +6026,7 @@ _080EF280: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1] - bl CopyString + bl StringCopy b _080EF300 .pool _080EF29C: @@ -6036,7 +6036,7 @@ _080EF29C: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x4] - bl CopyString + bl StringCopy b _080EF300 .pool _080EF2B8: @@ -6046,7 +6046,7 @@ _080EF2B8: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x8] - bl CopyString + bl StringCopy b _080EF300 .pool _080EF2D4: @@ -6056,7 +6056,7 @@ _080EF2D4: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0xC] - bl CopyString + bl StringCopy b _080EF300 .pool _080EF2F0: @@ -6066,7 +6066,7 @@ _080EF2F0: ldr r0, [r0] ldr r1, =gUnknown_0858BAF0 ldr r1, [r1, 0x10] - bl CopyString + bl StringCopy _080EF300: pop {r0} bx r0 @@ -6077,7 +6077,7 @@ _080EF300: @ void SetContestCategoryStringVarForInterview() SetContestCategoryStringVarForInterview: @ 80EF30C push {lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -6115,7 +6115,7 @@ sub_80EF340: @ 80EF340 lsrs r3, 24 adds r1, r5, 0 movs r2, 0 - bl ConvertIntToDecimalString + bl ConvertIntToDecimalStringN pop {r4,r5} pop {r0} bx r0 @@ -6265,7 +6265,7 @@ sub_80EF46C: @ 80EF46C lsls r1, 24 lsrs r1, 24 mov r9, r1 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x000027cc adds r0, r4 @@ -6379,7 +6379,7 @@ sub_80EF550: @ 80EF550 lsls r0, 24 lsrs r6, r0, 24 movs r1, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x000027cc _080EF55C: ldr r3, [r5] @@ -6494,7 +6494,7 @@ sub_80EF64C: @ 80EF64C ldrh r0, [r0] cmp r0, 0 bne _080EF6A0 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -6510,8 +6510,8 @@ sub_80EF64C: @ 80EF64C ldr r0, =gSpeciesNames adds r1, r0 adds r0, r4, 0 - bl CopyString - ldr r2, =gUnknown_03005D8C + bl StringCopy + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6540,7 +6540,7 @@ sub_80EF6C4: @ 80EF6C4 ldrh r0, [r0] cmp r0, 0 bne _080EF6F0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6568,7 +6568,7 @@ sub_80EF704: @ 80EF704 ldrh r0, [r0] cmp r0, 0 bne _080EF774 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 bl sub_8139688 lsls r0, 24 lsrs r0, 24 @@ -6584,19 +6584,19 @@ sub_80EF704: @ 80EF704 ldr r0, =gSpeciesNames adds r1, r0 adds r0, r6, 0 - bl CopyString + bl StringCopy bl sub_8139688 lsls r0, 24 lsrs r0, 24 muls r0, r5 adds r0, r4 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl GetStringEnd_Limit7 - ldr r2, =gUnknown_03005D8C + bl StringGetEnd10 + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6643,7 +6643,7 @@ sub_80EF7B4: @ 80EF7B4 ldrh r0, [r0] cmp r0, 0 bne _080EF7E0 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6689,7 +6689,7 @@ sub_80EF80C: @ 80EF80C ldrh r0, [r0] cmp r0, 0 bne _080EF838 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6717,7 +6717,7 @@ sub_80EF84C: @ 80EF84C ldrh r0, [r0] cmp r0, 0 bne _080EF878 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_030060BC movs r1, 0 ldrsb r1, [r0, r1] @@ -6746,7 +6746,7 @@ sub_80EF88C: @ 80EF88C muls r1, r0 ldr r0, =gUnknown_020244EC adds r5, r1, r0 - ldr r6, =gUnknown_02021CC4 + ldr r6, =gStringVar1 adds r0, r5, 0 movs r1, 0x2 adds r2, r6, 0 @@ -6770,7 +6770,7 @@ sub_80EF88C: @ 80EF88C ldr r1, =gSpeciesNames adds r0, r1 adds r1, r6, 0 - bl CompareString + bl StringCompare cmp r0, 0 bne _080EF8EC movs r0, 0 @@ -6943,7 +6943,7 @@ sub_80EF9E8: @ 80EF9E8 muls r1, r5 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy adds r0, r5, 0 pop {r4,r5} pop {r1} @@ -7005,7 +7005,7 @@ _080EFA7E: thumb_func_start sub_80EFA88 sub_80EFA88: @ 80EFA88 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -7148,7 +7148,7 @@ _080EFB84: adds r3, r4, 0x4 cmp r0, r6 beq _080EFB78 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r3, r1 ldrh r1, [r1] bl CopyEasyChatWord @@ -7230,7 +7230,7 @@ _080EFC06: mov r4, r8 adds r4, 0xF adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -7280,7 +7280,7 @@ _080EFC72: mov r4, r8 adds r4, 0x4 adds r0, r4, 0 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -7325,14 +7325,14 @@ _080EFCC4: ldrb r1, [r5, 0x1F] _080EFCC8: mov r0, sp - bl StopMusicWhileStringIsPrinted + bl ConvertInternationalString b _080EFD30 _080EFCD0: movs r0, 0xB muls r4, r0 ldr r7, =gSpeciesNames adds r0, r4, r7 - bl GetStringLength + bl StringLength lsls r0, 16 lsrs r2, r0, 16 cmp r6, 0 @@ -7385,7 +7385,7 @@ _080EFD30: adds r1, r0 ldr r0, [r1] mov r1, sp - bl CopyString + bl StringCopy add sp, 0x10 pop {r3,r4} mov r8, r3 @@ -7400,7 +7400,7 @@ _080EFD30: sub_80EFD54: @ 80EFD54 push {r4,lr} movs r1, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r0, =gUnknown_020375E0 ldrh r2, [r0] @@ -7439,13 +7439,13 @@ sub_80EFD98: @ 80EFD98 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 - bl CompareString + bl StringCompare cmp r0, 0 beq _080EFDD4 bl sub_80ED320 @@ -7478,7 +7478,7 @@ sub_80EFDDC: @ 80EFDDC adds r0, r1, 0 ldr r6, =gUnknown_020244EC adds r0, r6 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 movs r1, 0x2 bl pokemon_getattr mov r1, r9 @@ -7487,7 +7487,7 @@ sub_80EFDDC: @ 80EFDDC muls r1, r0 adds r0, r1, 0 adds r0, r6 - ldr r1, =gUnknown_02021DC4 + ldr r1, =gStringVar2 mov r10, r1 movs r1, 0x2 mov r2, r10 @@ -7551,7 +7551,7 @@ c2_080CC144: @ 80EFE98 muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r2, =gUnknown_02021DC4 + ldr r2, =gStringVar2 movs r1, 0x2 bl pokemon_setattr bl c2_exit_to_overworld_1_continue_scripts_restart_music @@ -7572,10 +7572,10 @@ sub_80EFEC4: @ 80EFEC4 ldrb r1, [r1] bl get_pokemon_by_box_and_pos adds r6, r0, 0 - ldr r2, =gUnknown_02021EC4 + ldr r2, =gStringVar3 movs r1, 0x2 bl pokemon_getattr_encrypted - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 mov r8, r0 adds r0, r6, 0 movs r1, 0x2 @@ -7621,7 +7621,7 @@ sub_80EFF48: @ 80EFF48 ldrb r0, [r0] ldr r1, =gUnknown_020375F8 ldrb r1, [r1] - ldr r2, =gUnknown_02021DC4 + ldr r2, =gStringVar2 bl sub_80D1E90 bl c2_exit_to_overworld_1_continue_scripts_restart_music pop {r0} @@ -7638,12 +7638,12 @@ sub_80EFF6C: @ 80EFF6C muls r0, r1 ldr r1, =gUnknown_020244EC adds r0, r1 - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 bl pokemon_getattr adds r0, r4, 0 - bl GetStringEnd_Limit7 + bl StringGetEnd10 pop {r4} pop {r0} bx r0 @@ -7724,7 +7724,7 @@ _080F001C: thumb_func_start sub_80F0020 sub_80F0020: @ 80F0020 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r2, [r0] ldrb r0, [r2, 0xD] lsls r0, 24 @@ -7743,13 +7743,13 @@ sub_80F0020: @ 80F0020 thumb_func_start CheckForBigMovieOrEmergencyNewsOnTV CheckForBigMovieOrEmergencyNewsOnTV: @ 80F0040 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] cmp r0, 0x1 bne _080F0060 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -7795,13 +7795,13 @@ _080F009E: thumb_func_start GetMomOrDadStringForTVMessage GetMomOrDadStringForTVMessage: @ 80F00A4 push {r4,lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 ldrsb r0, [r1, r0] cmp r0, 0x1 bne _080F0104 - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldrb r0, [r0, 0x8] cmp r0, 0 @@ -7810,9 +7810,9 @@ GetMomOrDadStringForTVMessage: @ 80F00A4 ldrsb r0, [r1, r0] cmp r0, 0 bne _080F0104 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD08 - bl CopyString + bl StringCopy ldr r0, =0x00004003 movs r1, 0x1 bl VarSet @@ -7823,9 +7823,9 @@ _080F00EC: ldrsb r0, [r1, r0] cmp r0, 0x2 bne _080F0104 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD08 - bl CopyString + bl StringCopy ldr r0, =0x00004003 movs r1, 0x1 bl VarSet @@ -7858,15 +7858,15 @@ _080F0104: cmp r0, 0 bne _080F0158 _080F0142: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD08 - bl CopyString + bl StringCopy b _080F01A8 .pool _080F0158: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD04 - bl CopyString + bl StringCopy b _080F01A8 .pool _080F016C: @@ -7877,18 +7877,18 @@ _080F016C: ands r0, r1 cmp r0, 0 beq _080F0198 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD08 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0x1 bl VarSet b _080F01A8 .pool _080F0198: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAD04 - bl CopyString + bl StringCopy adds r0, r4, 0 movs r1, 0x2 bl VarSet @@ -7905,7 +7905,7 @@ sub_80F01B8: @ 80F01B8 ldr r0, =0x000040bc movs r1, 0 bl VarSet - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrb r1, [r0, 0x5] ldrb r2, [r0, 0x4] @@ -8011,7 +8011,7 @@ _080F0290: beq _080F0304 b _080F031E _080F029A: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -8027,7 +8027,7 @@ _080F029A: b _080F031E .pool _080F02C4: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x000027cc adds r1, r0 @@ -8040,7 +8040,7 @@ _080F02DC: movs r0, 0xE1 lsls r0, 2 adds r1, r5, r0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r3, =0x000027cc adds r2, r3 @@ -8058,14 +8058,14 @@ _080F0304: movs r3, 0xE1 lsls r3, 3 adds r2, r5, r3 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r4, =0x000027cc adds r3, r4 adds r0, r5, 0 bl sub_80F0358 _080F031E: - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r0, [r5] ldr r4, =0x000027cc adds r0, r4 @@ -8585,7 +8585,7 @@ sub_80F0708: @ 80F0708 movs r0, 0 mov r9, r0 _080F0716: - ldr r3, =gUnknown_03005D8C + ldr r3, =gSaveBlock1Ptr ldr r1, [r3] mov r4, r9 lsls r2, r4, 3 @@ -8952,7 +8952,7 @@ _080F0A48: .4byte _080F0A7C .4byte _080F0A7C _080F0A7C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] mov r4, r9 adds r0, r7, r4 @@ -8966,7 +8966,7 @@ _080F0A7C: b _080F0AE2 .pool _080F0AA0: - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, [r2] mov r1, r9 adds r4, r7, r1 @@ -9016,7 +9016,7 @@ _080F0AF2: sub_80F0B00: @ 80F0B00 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] lsls r1, r0, 3 adds r1, r0 @@ -9046,7 +9046,7 @@ sub_80F0B24: @ 80F0B24 asrs r2, r0, 24 cmp r2, 0 bne _080F0B56 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] lsls r0, r4, 3 adds r0, r4 @@ -9074,7 +9074,7 @@ sub_80F0B64: @ 80F0B64 movs r2, 0 ldr r4, =0x000027cd movs r3, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr _080F0B7C: ldr r0, [r5] lsls r1, r2, 3 @@ -9108,7 +9108,7 @@ _080F0BA2: sub_80F0BB8: @ 80F0BB8 push {r4-r6,lr} movs r5, 0 - ldr r6, =gUnknown_03005D8C + ldr r6, =gSaveBlock1Ptr _080F0BBE: ldr r1, [r6] lsls r0, r5, 3 @@ -9146,7 +9146,7 @@ sub_80F0C04: @ 80F0C04 push {r4,r5,lr} movs r3, 0 movs r2, 0x5 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r4, [r0] ldr r5, =0x000027cc _080F0C10: @@ -9181,7 +9181,7 @@ _080F0C2E: bge _080F0C6E adds r5, r0, 0 _080F0C4A: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000027cc adds r0, r1 @@ -9248,7 +9248,7 @@ _080F0CC2: beq _080F0D28 b _080F0D3E _080F0CCC: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002b50 adds r0, r1 @@ -9262,7 +9262,7 @@ _080F0CCC: b _080F0D3E .pool _080F0CF0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r0, =0x00002b50 adds r1, r0 @@ -9273,7 +9273,7 @@ _080F0CF0: _080F0D08: adds r1, r5, 0 adds r1, 0x40 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =0x00002b50 adds r2, r0 @@ -9289,7 +9289,7 @@ _080F0D28: adds r1, 0x40 adds r2, r5, 0 adds r2, 0x80 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r3, [r0] ldr r0, =0x00002b50 adds r3, r0 @@ -9521,7 +9521,7 @@ sub_80F0EEC: @ 80F0EEC push {r4,lr} movs r4, 0 _080F0EF0: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r4, 2 adds r0, r1 @@ -9555,7 +9555,7 @@ sub_80F0F24: @ 80F0F24 cmp r0, 0x1 beq _080F0F50 movs r2, 0 - ldr r5, =gUnknown_03005D8C + ldr r5, =gSaveBlock1Ptr ldr r4, =0x00002b51 movs r3, 0 _080F0F3C: @@ -10300,7 +10300,7 @@ _080F152C: thumb_func_start sub_80F153C sub_80F153C: @ 80F153C push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E0 ldrh r1, [r0] @@ -10475,7 +10475,7 @@ _080F16E6: thumb_func_start DoTVShowBravoTrainerPokemonProfile DoTVShowBravoTrainerPokemonProfile: @ 80F16EC push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -10512,7 +10512,7 @@ _080F1734: .4byte _080F190C .4byte _080F193C _080F1758: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] @@ -10534,7 +10534,7 @@ _080F1758: adds r0, r1 adds r1, r4, 0 adds r1, 0x8 - bl CompareString + bl StringCompare cmp r0, 0 bne _080F17A4 ldr r1, =gUnknown_0203A030 @@ -10547,14 +10547,14 @@ _080F17A4: b _080F1950 .pool _080F17B0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0x8 ldrb r2, [r4, 0x1F] @@ -10567,7 +10567,7 @@ _080F17B0: b _080F194C .pool _080F17E8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] @@ -10587,12 +10587,12 @@ _080F180C: b _080F1950 .pool _080F1818: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x4] bl CopyEasyChatWord ldrb r1, [r4, 0x13] @@ -10606,12 +10606,12 @@ _080F1818: b _080F1950 .pool _080F184C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x4] bl CopyEasyChatWord ldrb r1, [r4, 0x13] @@ -10625,7 +10625,7 @@ _080F184C: b _080F1950 .pool _080F1880: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] @@ -10635,7 +10635,7 @@ _080F1880: lsrs r1, 29 movs r0, 0x1 bl CopyContestCategoryToStringVar - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r4, 0x6] bl CopyEasyChatWord ldrh r0, [r4, 0x14] @@ -10651,21 +10651,21 @@ _080F18B8: b _080F1950 .pool _080F18C4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r4, 0x6] bl CopyEasyChatWord ldr r1, =gUnknown_0203A030 @@ -10673,29 +10673,29 @@ _080F18C4: b _080F1950 .pool _080F190C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x16 ldrb r2, [r4, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone b _080F1952 .pool _080F193C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy _080F194C: ldr r1, =gUnknown_0203A030 movs r0, 0x2 @@ -10716,7 +10716,7 @@ _080F1952: thumb_func_start DoTVShowBravoTrainerBattleTower DoTVShowBravoTrainerBattleTower: @ 80F1974 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -10760,17 +10760,17 @@ _080F19C0: .4byte _080F1B94 .4byte _080F1BCC _080F19FC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x2 ldrb r2, [r4, 0x1D] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0xA] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrh r0, [r4, 0x16] cmp r0, 0x6 bls _080F1A34 @@ -10789,15 +10789,15 @@ _080F1A40: ldrb r0, [r4, 0x1A] cmp r0, 0x32 bne _080F1A58 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAEB1 - bl CopyString + bl StringCopy b _080F1A60 .pool _080F1A58: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EAEB8 - bl CopyString + bl StringCopy _080F1A60: ldrh r1, [r4, 0x16] movs r0, 0x1 @@ -10817,7 +10817,7 @@ _080F1A84: b _080F1BEA .pool _080F1A90: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] @@ -10833,33 +10833,33 @@ _080F1AA6: b _080F1B1C .pool _080F1AB4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x14] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy b _080F1AA6 .pool _080F1AE0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x14] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r0, [r4, 0x1B] cmp r0, 0 bne _080F1B1C @@ -10876,14 +10876,14 @@ _080F1B1C: b _080F1BEA .pool _080F1B28: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] b _080F1B54 .pool _080F1B38: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] @@ -10894,7 +10894,7 @@ _080F1B48: strb r0, [r2] b _080F1BEA _080F1B4E: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x2 ldrb r2, [r4, 0x1D] _080F1B54: @@ -10905,7 +10905,7 @@ _080F1B54: b _080F1BEA .pool _080F1B68: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x18] bl CopyEasyChatWord ldrb r0, [r4, 0x1B] @@ -10923,14 +10923,14 @@ _080F1B88: b _080F1BEA .pool _080F1B94: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x18] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x2 ldrb r2, [r4, 0x1D] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1E] @@ -10941,17 +10941,17 @@ _080F1B94: b _080F1BEA .pool _080F1BCC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x2 ldrb r2, [r4, 0x1D] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0xA] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone _080F1BEA: ldr r0, =gUnknown_0858D240 @@ -10968,7 +10968,7 @@ _080F1BEA: thumb_func_start DoTVShowTodaysSmartShopper DoTVShowTodaysSmartShopper: @ 80F1C0C push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -11010,12 +11010,12 @@ _080F1C58: .4byte _080F1DD8 .4byte _080F1E1C _080F1C8C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x3] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r5, 0x12] movs r2, 0 bl GetMapName @@ -11034,17 +11034,17 @@ _080F1CBC: b _080F1E2C .pool _080F1CC8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x3] bl sub_81DB5E8 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r5, 0x6] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrh r1, [r5, 0xC] movs r0, 0x2 bl sub_80EF340 @@ -11091,12 +11091,12 @@ _080F1D40: b _080F1E2C .pool _080F1D4C: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r5, 0x8] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrh r1, [r5, 0xE] movs r0, 0x2 bl sub_80EF340 @@ -11109,12 +11109,12 @@ _080F1D4C: b _080F1E2C .pool _080F1D7C: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r5, 0xA] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrh r1, [r5, 0x10] movs r0, 0x2 bl sub_80EF340 @@ -11152,17 +11152,17 @@ _080F1DD2: strb r0, [r2] b _080F1E2C _080F1DD8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x3] bl sub_81DB5E8 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r5, 0x6] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrb r0, [r5, 0x2] cmp r0, 0x1 bne _080F1E10 @@ -11179,7 +11179,7 @@ _080F1E10: b _080F1E2C .pool _080F1E1C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x3] @@ -11201,7 +11201,7 @@ _080F1E2C: DoTVShowTheNameRaterShow: @ 80F1E48 push {r4-r6,lr} sub sp, 0x8 - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -11249,19 +11249,19 @@ _080F1E94: .4byte _080F20A4 .4byte _080F20F0 _080F1EE0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0xF ldrb r2, [r5, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r5, 0x4 ldrb r2, [r5, 0x1F] bl sub_81DB5E8 @@ -11294,7 +11294,7 @@ _080F1F44: strb r0, [r2] b _080F20FE _080F1F4A: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0xF ldrb r2, [r5, 0x1E] @@ -11326,7 +11326,7 @@ _080F1F82: b _080F20FE .pool _080F1F90: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1F] bl sub_81DB5E8 @@ -11351,7 +11351,7 @@ _080F1F90: b _080F20FE .pool _080F1FCC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0xF ldrb r2, [r5, 0x1E] @@ -11400,13 +11400,13 @@ _080F202C: movs r2, 0x2 movs r3, 0x1 bl sub_80EFBDC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrh r0, [r5, 0x2] str r0, [sp] str r5, [sp, 0x4] @@ -11450,13 +11450,13 @@ _080F20A4: movs r2, 0x2 movs r3, 0x1 bl sub_80EFBDC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x1C] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrh r0, [r5, 0x1C] str r0, [sp] str r5, [sp, 0x4] @@ -11475,7 +11475,7 @@ _080F20EC: movs r6, 0x12 strb r6, [r2] _080F20F0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1F] bl sub_81DB5E8 @@ -11496,7 +11496,7 @@ _080F20FE: thumb_func_start DoTVShowPokemonTodaySuccessfulCapture DoTVShowPokemonTodaySuccessfulCapture: @ 80F211C push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -11537,19 +11537,19 @@ _080F2168: .4byte _080F2324 .4byte _080F2354 _080F2198: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x10] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] bl sub_81DB5E8 @@ -11572,12 +11572,12 @@ _080F21EC: strb r0, [r2] b _080F2358 _080F21F2: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrb r0, [r5, 0xF] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrb r1, [r5, 0x12] movs r0, 0x2 bl sub_80EF340 @@ -11596,19 +11596,19 @@ _080F2220: b _080F2358 .pool _080F222C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x10] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] bl sub_81DB5E8 @@ -11619,18 +11619,18 @@ _080F2264: strb r0, [r2] b _080F2358 _080F226A: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x10] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy _080F2286: ldr r1, =gUnknown_0203A030 movs r0, 0x6 @@ -11638,19 +11638,19 @@ _080F2286: b _080F2358 .pool _080F22A0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x10] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] bl sub_81DB5E8 @@ -11667,14 +11667,14 @@ _080F22A0: b _080F2358 .pool _080F22F4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r5, 0x10] movs r4, 0xB muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] bl sub_81DB5E8 @@ -11684,14 +11684,14 @@ _080F22F4: b _080F233E .pool _080F2324: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r5, 0x10] movs r4, 0xB muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r5, 0x4 ldrb r2, [r5, 0x3] bl sub_81DB5E8 @@ -11717,7 +11717,7 @@ _080F2358: thumb_func_start DoTVShowPokemonTodayFailedCapture DoTVShowPokemonTodayFailedCapture: @ 80F2370 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -11752,40 +11752,40 @@ _080F23B8: .4byte _080F24A0 .4byte _080F24BC _080F23D4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0xC] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x1 strb r0, [r1] b _080F24C0 .pool _080F2408: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x2] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r4, 0x12] movs r2, 0 bl GetMapName - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r2, [r4, 0xE] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r0, [r4, 0x11] cmp r0, 0x1 bne _080F2450 @@ -11801,7 +11801,7 @@ _080F2450: b _080F24C0 .pool _080F245C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x2] @@ -11829,7 +11829,7 @@ _080F2494: b _080F24C0 .pool _080F24A0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x2] @@ -11856,7 +11856,7 @@ _080F24C0: thumb_func_start DoTVShowPokemonFanClubLetter DoTVShowPokemonFanClubLetter: @ 80F24D8 push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -11937,18 +11937,18 @@ _080F2524: .4byte _080F26A6 .4byte _080F26CC _080F25F4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x10 ldrb r2, [r5, 0x18] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x32 strb r0, [r1] @@ -12012,7 +12012,7 @@ _080F2684: bl TVShowDone b _080F26F0 _080F26A6: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r1, r5, 0x4 adds r0, r4, 0 movs r2, 0x2 @@ -12026,7 +12026,7 @@ _080F26A6: b _080F26FC .pool _080F26CC: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r1, r5, 0x4 adds r0, r4, 0 movs r2, 0x2 @@ -12055,7 +12055,7 @@ _080F26FC: thumb_func_start DoTVShowRecentHappenings DoTVShowRecentHappenings: @ 80F2708 push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -12135,7 +12135,7 @@ _080F2754: .4byte _080F288C .4byte _080F2868 _080F2820: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x10 ldrb r2, [r5, 0x18] @@ -12166,7 +12166,7 @@ _080F2862: bl TVShowDone b _080F288C _080F2868: - ldr r4, =gUnknown_02021FC4 + ldr r4, =gStringVar4 adds r1, r5, 0x4 adds r0, r4, 0 movs r2, 0x2 @@ -12195,7 +12195,7 @@ _080F2898: thumb_func_start DoTVShowPokemonFanClubOpinions DoTVShowPokemonFanClubOpinions: @ 80F28A4 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -12223,18 +12223,18 @@ _080F28E8: beq _080F2968 b _080F297E _080F28EE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x5 ldrb r2, [r4, 0xD] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0x10 ldrb r2, [r4, 0xE] @@ -12246,18 +12246,18 @@ _080F28EE: b _080F297E .pool _080F2930: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x5 ldrb r2, [r4, 0xD] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r4, 0x1C] bl CopyEasyChatWord movs r0, 0x4 @@ -12265,11 +12265,11 @@ _080F2930: b _080F297E .pool _080F2968: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x5 ldrb r2, [r4, 0xD] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r4, 0x1E] bl CopyEasyChatWord bl TVShowDone @@ -12293,7 +12293,7 @@ DoTVShowDummiedOut: @ 80F299C thumb_func_start DoTVShowPokemonNewsMassOutbreak DoTVShowPokemonNewsMassOutbreak: @ 80F29A0 push {r4,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -12303,17 +12303,17 @@ DoTVShowPokemonNewsMassOutbreak: @ 80F29A0 adds r0, r1 ldr r4, [r2] adds r4, r0 - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r4, 0x10] movs r2, 0 bl GetMapName - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0xC] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone bl StartMassOutbreak ldr r1, =gUnknown_0858D19C @@ -12332,7 +12332,7 @@ DoTVShowPokemonNewsMassOutbreak: @ 80F29A0 thumb_func_start DoTVShowPokemonContestLiveUpdates DoTVShowPokemonContestLiveUpdates: @ 80F2A10 push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -12394,17 +12394,17 @@ _080F2A5C: .4byte _080F30E0 .4byte _080F30FC _080F2AE0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r6, 0x1C] bl sub_818E868 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r6, 0 adds r1, 0x14 ldrb r2, [r6, 0x1D] @@ -12441,13 +12441,13 @@ _080F2B48: b _080F311C .pool _080F2B54: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r6, 0xF] cmp r1, 0x8 bne _080F2B6C @@ -12485,13 +12485,13 @@ _080F2B9A: _080F2BA0: b _080F2D20 _080F2BA2: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy _080F2BB2: ldrb r1, [r6, 0xF] cmp r1, 0x8 @@ -12503,14 +12503,14 @@ _080F2BBA: b _080F2B88 .pool _080F2BC8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 adds r1, r6, 0 adds r1, 0x14 ldrb r2, [r6, 0x1D] @@ -12535,41 +12535,41 @@ _080F2C08: .4byte _080F2C58 .4byte _080F2C6C _080F2C1C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB0E8 - bl CopyString + bl StringCopy b _080F2C74 .pool _080F2C30: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB0ED - bl CopyString + bl StringCopy b _080F2C74 .pool _080F2C44: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB0F4 - bl CopyString + bl StringCopy b _080F2C74 .pool _080F2C58: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB0F9 - bl CopyString + bl StringCopy b _080F2C74 .pool _080F2C6C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085EB0FF - bl CopyString + bl StringCopy _080F2C74: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r6, 0xF] cmp r1, 0x8 beq _080F2CF0 @@ -12652,7 +12652,7 @@ _080F2D20: b _080F311C .pool _080F2D2C: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12660,7 +12660,7 @@ _080F2D2C: b _080F2F72 .pool _080F2D40: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12668,7 +12668,7 @@ _080F2D40: b _080F2F72 .pool _080F2D54: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12676,13 +12676,13 @@ _080F2D54: b _080F2F72 .pool _080F2D68: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r0, [r6, 0x1C] cmp r0, 0x4 bls _080F2D80 @@ -12732,7 +12732,7 @@ _080F2DDC: b _080F311C .pool _080F2DE8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12740,7 +12740,7 @@ _080F2DE8: b _080F2F72 .pool _080F2DFC: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12748,7 +12748,7 @@ _080F2DFC: b _080F2F72 .pool _080F2E10: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12756,7 +12756,7 @@ _080F2E10: b _080F2F72 .pool _080F2E24: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12764,7 +12764,7 @@ _080F2E24: b _080F2F72 .pool _080F2E38: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12772,13 +12772,13 @@ _080F2E38: b _080F2F72 .pool _080F2E4C: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r0, [r6, 0x1C] cmp r0, 0x4 bls _080F2E64 @@ -12828,7 +12828,7 @@ _080F2EC0: b _080F311C .pool _080F2ECC: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12836,7 +12836,7 @@ _080F2ECC: b _080F2F72 .pool _080F2EE0: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12844,7 +12844,7 @@ _080F2EE0: b _080F2F72 .pool _080F2EF4: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12852,7 +12852,7 @@ _080F2EF4: b _080F2F72 .pool _080F2F08: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12860,7 +12860,7 @@ _080F2F08: b _080F2F72 .pool _080F2F1C: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12868,7 +12868,7 @@ _080F2F1C: b _080F2F72 .pool _080F2F30: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12876,7 +12876,7 @@ _080F2F30: b _080F2F72 .pool _080F2F44: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 @@ -12884,43 +12884,43 @@ _080F2F44: b _080F2F72 .pool _080F2F58: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r2, [r6, 0x10] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames _080F2F72: adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x17 strb r0, [r1] b _080F311C .pool _080F2F94: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x12] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r6, 0x4 ldrb r2, [r6, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r6, 0x2] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy ldrb r0, [r6, 0xC] cmp r0, 0x8 beq _080F3028 @@ -13001,27 +13001,27 @@ _080F3058: b _080F311C .pool _080F3064: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r6, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy b _080F30EA .pool _080F3080: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0x4 ldrb r2, [r6, 0x1E] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy b _080F30EA .pool _080F30A8: @@ -13029,23 +13029,23 @@ _080F30A8: strb r0, [r2] b _080F311C _080F30AE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x14 ldrb r2, [r6, 0x1D] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 b _080F30E2 .pool _080F30E0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 _080F30E2: adds r1, r6, 0x4 ldrb r2, [r6, 0x1E] @@ -13057,18 +13057,18 @@ _080F30EA: b _080F311C .pool _080F30FC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x14 ldrb r2, [r6, 0x1D] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x12] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone _080F311C: ldr r0, =gUnknown_0858D27C @@ -13085,7 +13085,7 @@ _080F311C: thumb_func_start DoTVShowPokemonBattleUpdate DoTVShowPokemonBattleUpdate: @ 80F3140 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -13141,11 +13141,11 @@ _080F31C4: strb r0, [r2] b _080F3362 _080F31CA: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1A] @@ -13153,15 +13153,15 @@ _080F31CA: ldrb r0, [r4, 0x18] cmp r0, 0 bne _080F3200 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_085ECB64 - bl CopyString + bl StringCopy b _080F3208 .pool _080F3200: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldr r1, =gUnknown_085ECB6B - bl CopyString + bl StringCopy _080F3208: ldr r1, =gUnknown_0203A030 movs r0, 0x2 @@ -13169,53 +13169,53 @@ _080F3208: b _080F3362 .pool _080F321C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x16] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x3 strb r0, [r1] b _080F3362 .pool _080F3268: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1A] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x4 strb r0, [r1] b _080F3362 .pool _080F329C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1A] @@ -13224,11 +13224,11 @@ _080F329C: b _080F3362 .pool _080F32C0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1A] @@ -13239,46 +13239,46 @@ _080F32C0: b _080F3362 .pool _080F32EC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x16] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r2, [r4, 0x14] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x7 strb r0, [r1] b _080F3362 .pool _080F3338: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x19] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x1A] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r2, [r4, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone _080F3362: ldr r0, =gUnknown_0858D300 @@ -13295,7 +13295,7 @@ _080F3362: thumb_func_start DoTVShow3CheersForPokeblocks DoTVShow3CheersForPokeblocks: @ 80F3388 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -13329,7 +13329,7 @@ _080F33D0: .4byte _080F35F4 .4byte _080F3620 _080F33E8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x14] @@ -13368,56 +13368,56 @@ _080F3430: .4byte _080F3480 .4byte _080F3494 _080F3444: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB48 - bl CopyString + bl StringCopy b _080F349C .pool _080F3458: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB4E - bl CopyString + bl StringCopy b _080F349C .pool _080F346C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB52 - bl CopyString + bl StringCopy b _080F349C .pool _080F3480: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB58 - bl CopyString + bl StringCopy b _080F349C .pool _080F3494: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB5F - bl CopyString + bl StringCopy _080F349C: ldrb r0, [r4, 0x2] cmp r0, 0x18 bls _080F34BC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB2A - bl CopyString + bl StringCopy b _080F34DC .pool _080F34BC: cmp r0, 0x16 bls _080F34D4 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB20 - bl CopyString + bl StringCopy b _080F34DC .pool _080F34D4: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB1B - bl CopyString + bl StringCopy _080F34DC: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x14] @@ -13428,7 +13428,7 @@ _080F34DC: b _080F3624 .pool _080F3500: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x15] b _080F3606 @@ -13453,56 +13453,56 @@ _080F3524: .4byte _080F3574 .4byte _080F3588 _080F3538: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB48 - bl CopyString + bl StringCopy b _080F3590 .pool _080F354C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB4E - bl CopyString + bl StringCopy b _080F3590 .pool _080F3560: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB52 - bl CopyString + bl StringCopy b _080F3590 .pool _080F3574: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB58 - bl CopyString + bl StringCopy b _080F3590 .pool _080F3588: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldr r1, =gUnknown_085ECB5F - bl CopyString + bl StringCopy _080F3590: ldrb r0, [r4, 0x2] cmp r0, 0x10 bls _080F35B0 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB34 - bl CopyString + bl StringCopy b _080F35D0 .pool _080F35B0: cmp r0, 0xD bls _080F35C8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB3A - bl CopyString + bl StringCopy b _080F35D0 .pool _080F35C8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB3E - bl CopyString + bl StringCopy _080F35D0: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x14] @@ -13513,11 +13513,11 @@ _080F35D0: b _080F3624 .pool _080F35F4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0x4 ldrb r2, [r4, 0x15] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x14] @@ -13573,8 +13573,8 @@ _080F3668: .4byte _080F379C .4byte _080F37A2 _080F368C: - ldr r0, =gUnknown_02021CC4 - ldr r4, =gUnknown_03005D8C + ldr r0, =gStringVar1 + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] ldr r2, =0x00002bac adds r1, r2 @@ -13603,7 +13603,7 @@ _080F36D4: strb r0, [r2] b _080F37EA _080F36DA: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002bae adds r0, r1 @@ -13645,8 +13645,8 @@ _080F3726: strb r0, [r2] b _080F37EA _080F372C: - ldr r0, =gUnknown_02021CC4 - ldr r4, =gUnknown_03005D8C + ldr r0, =gStringVar1 + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] ldr r2, =0x00002ba4 adds r1, r2 @@ -13655,8 +13655,8 @@ _080F372C: muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldr r1, [r4] ldr r2, =0x00002ba8 adds r1, r2 @@ -13665,15 +13665,15 @@ _080F372C: muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldr r1, [r4] ldr r2, =0x00002ba6 adds r1, r2 ldrh r1, [r1] muls r1, r6 adds r1, r5 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x8 strb r0, [r1] @@ -13684,14 +13684,14 @@ _080F379C: strb r0, [r2] b _080F37EA _080F37A2: - ldr r0, =gUnknown_02021CC4 - ldr r4, =gUnknown_03005D8C + ldr r0, =gStringVar1 + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] ldr r2, =0x00002baa adds r1, r2 ldrh r1, [r1] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, [r4] ldr r2, =0x00002ba4 adds r1, r2 @@ -13700,15 +13700,15 @@ _080F37A2: muls r1, r6 ldr r5, =gSpeciesNames adds r1, r5 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldr r1, [r4] ldr r2, =0x00002ba6 adds r1, r2 ldrh r1, [r1] muls r1, r6 adds r1, r5 - bl CopyString + bl StringCopy ldr r1, =gUnknown_020375F0 movs r0, 0x1 strh r0, [r1] @@ -13731,7 +13731,7 @@ _080F37EA: thumb_func_start DoTVShowPokemonAngler DoTVShowPokemonAngler: @ 80F3828 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -13766,18 +13766,18 @@ _080F3870: b _080F38E0 .pool _080F3880: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x6] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x4] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r4, 0x3] movs r0, 0x2 bl sub_80EF340 @@ -13785,18 +13785,18 @@ _080F3880: b _080F38E0 .pool _080F38B8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x6] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r4, 0x4] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r4, 0x2] movs r0, 0x2 bl sub_80EF340 @@ -13816,7 +13816,7 @@ _080F38E0: thumb_func_start DoTVShowTheWorldOfMasters DoTVShowTheWorldOfMasters: @ 80F3904 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -13844,7 +13844,7 @@ _080F3948: beq _080F3994 b _080F39BE _080F394E: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xB] @@ -13860,34 +13860,34 @@ _080F394E: b _080F39BE .pool _080F3974: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r4, 0x8] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy movs r0, 0x2 strb r0, [r6] b _080F39BE .pool _080F3994: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xB] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r4, 0xA] movs r2, 0 bl GetMapName - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r2, [r4, 0x4] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy bl TVShowDone _080F39BE: ldr r0, =gUnknown_0858D3B8 @@ -13904,7 +13904,7 @@ _080F39BE: thumb_func_start DoTVShowTodaysRivalTrainer DoTVShowTodaysRivalTrainer: @ 80F39E4 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -13973,7 +13973,7 @@ _080F3A8C: strb r0, [r2] b _080F3BE8 _080F3A92: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xC] @@ -13981,7 +13981,7 @@ _080F3A92: ldrh r1, [r4, 0x2] movs r0, 0x1 bl sub_80EF340 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrb r1, [r4, 0x7] movs r2, 0 bl GetMapName @@ -13992,7 +13992,7 @@ _080F3AB0: b _080F3B24 .pool _080F3AC0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xC] @@ -14003,7 +14003,7 @@ _080F3AC0: b _080F3AB0 .pool _080F3ADC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xC] @@ -14014,7 +14014,7 @@ _080F3ADC: b _080F3AB0 .pool _080F3AF8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xC] @@ -14113,7 +14113,7 @@ _080F3BCC: b _080F3BE8 .pool _080F3BD8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xC] @@ -14134,7 +14134,7 @@ _080F3BE8: thumb_func_start DoTVShowDewfordTrendWatcherNetwork DoTVShowDewfordTrendWatcherNetwork: @ 80F3C04 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -14169,10 +14169,10 @@ _080F3C4C: .4byte _080F3D0C .4byte _080F3D40 _080F3C68: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x6] bl CopyEasyChatWord ldrb r0, [r4, 0x8] @@ -14190,13 +14190,13 @@ _080F3C94: b _080F3D54 .pool _080F3CA0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x6] bl CopyEasyChatWord - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x9] @@ -14207,10 +14207,10 @@ _080F3CA0: b _080F3D54 .pool _080F3CD4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x6] bl CopyEasyChatWord ldrb r0, [r4, 0x8] @@ -14228,13 +14228,13 @@ _080F3D00: b _080F3D54 .pool _080F3D0C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x6] bl CopyEasyChatWord - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x9] @@ -14245,10 +14245,10 @@ _080F3D0C: b _080F3D54 .pool _080F3D40: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x6] bl CopyEasyChatWord bl TVShowDone @@ -14267,7 +14267,7 @@ _080F3D54: thumb_func_start DoTVShowHoennTreasureInvestigators DoTVShowHoennTreasureInvestigators: @ 80F3D74 push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -14295,12 +14295,12 @@ _080F3DB8: beq _080F3E3C b _080F3E5C _080F3DBE: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrh r0, [r5, 0x2] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldrb r0, [r5, 0x4] cmp r0, 0x57 bne _080F3DFC @@ -14326,18 +14326,18 @@ _080F3DFC: strb r0, [r7] b _080F3E5C _080F3E02: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrh r0, [r5, 0x2] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x5] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrb r1, [r5, 0x4] movs r2, 0 bl GetMapName @@ -14345,13 +14345,13 @@ _080F3E02: b _080F3E5C .pool _080F3E3C: - ldr r4, =gUnknown_02021CC4 + ldr r4, =gStringVar1 ldrh r0, [r5, 0x2] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x5] @@ -14372,7 +14372,7 @@ _080F3E5C: thumb_func_start DoTVShowFindThatGamer DoTVShowFindThatGamer: @ 80F3E7C push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -14404,7 +14404,7 @@ _080F3EC0: _080F3ECA: b _080F4008 _080F3ECC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] @@ -14417,15 +14417,15 @@ _080F3ECC: b _080F3F04 .pool _080F3EE8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB0C - bl CopyString + bl StringCopy b _080F3F04 .pool _080F3EFC: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB12 - bl CopyString + bl StringCopy _080F3F04: ldrb r1, [r4, 0x2] cmp r1, 0x1 @@ -14441,7 +14441,7 @@ _080F3F1C: b _080F4008 .pool _080F3F28: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] @@ -14454,15 +14454,15 @@ _080F3F28: b _080F3F60 .pool _080F3F44: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB0C - bl CopyString + bl StringCopy b _080F3F60 .pool _080F3F58: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB12 - bl CopyString + bl StringCopy _080F3F60: ldrh r1, [r4, 0x4] movs r0, 0x2 @@ -14471,7 +14471,7 @@ _080F3F60: b _080F4008 .pool _080F3F78: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] @@ -14484,15 +14484,15 @@ _080F3F78: b _080F3FB0 .pool _080F3F94: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB0C - bl CopyString + bl StringCopy b _080F3FB0 .pool _080F3FA8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB12 - bl CopyString + bl StringCopy _080F3FB0: ldrh r1, [r4, 0x4] movs r0, 0x2 @@ -14503,7 +14503,7 @@ _080F3FB0: b _080F4008 .pool _080F3FCC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] @@ -14516,15 +14516,15 @@ _080F3FCC: b _080F4004 .pool _080F3FE8: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB12 - bl CopyString + bl StringCopy b _080F4004 .pool _080F3FFC: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB0C - bl CopyString + bl StringCopy _080F4004: bl TVShowDone _080F4008: @@ -14542,7 +14542,7 @@ _080F4008: thumb_func_start DoTVShowBreakingNewsTV DoTVShowBreakingNewsTV: @ 80F4028 push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -14595,19 +14595,19 @@ _080F40B4: strb r0, [r2] b _080F4344 _080F40BA: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName @@ -14617,23 +14617,23 @@ _080F40BA: b _080F4344 .pool _080F40FC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r6, 0x2] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x3 strb r0, [r1] @@ -14643,24 +14643,24 @@ _080F4140: ldrh r1, [r6, 0x8] movs r0, 0 bl sub_80EF340 - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r6, 0x6] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x4 strb r0, [r1] b _080F4344 .pool _080F4168: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName @@ -14668,19 +14668,19 @@ _080F4168: b _080F4344 .pool _080F418C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x2] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName @@ -14690,23 +14690,23 @@ _080F418C: b _080F4344 .pool _080F41D0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r6, 0x2] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy ldrb r0, [r6, 0x5] cmp r0, 0x2 beq _080F423C @@ -14748,14 +14748,14 @@ _080F4248: b _080F4344 .pool _080F4254: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r6, 0xC] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r2, [r6, 0xA] movs r1, 0xB muls r1, r2 @@ -14764,36 +14764,36 @@ _080F4254: b _080F42A8 .pool _080F4284: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r6, 0x2] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 _080F42A8: - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x8 strb r0, [r1] b _080F4344 .pool _080F42C8: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName @@ -14803,19 +14803,19 @@ _080F42C8: b _080F4344 .pool _080F42F4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r6, 0x2] movs r4, 0xB muls r1, r4 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName @@ -14824,7 +14824,7 @@ _080F42F4: b _080F4344 .pool _080F4334: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xE] @@ -14845,7 +14845,7 @@ _080F4344: thumb_func_start DoTVShowSecretBaseVisit DoTVShowSecretBaseVisit: @ 80F4360 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -14888,7 +14888,7 @@ _080F43AC: .4byte _080F4538 .4byte _080F4584 _080F43E4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0xC] @@ -14908,12 +14908,12 @@ _080F4408: b _080F4588 .pool _080F4414: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r5, 0x4] lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl CopyString + bl StringCopy ldrb r0, [r5, 0x3] cmp r0, 0x1 bne _080F443C @@ -14929,12 +14929,12 @@ _080F443C: b _080F4588 .pool _080F4448: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r5, 0x5] lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r5, 0x3] cmp r1, 0x3 beq _080F4484 @@ -14967,26 +14967,26 @@ _080F4490: b _080F4588 .pool _080F449C: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r5, 0x6] lsls r1, 5 ldr r4, =gUnknown_085A5C09 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrb r1, [r5, 0x7] lsls r1, 5 adds r1, r4 b _080F44CA .pool _080F44C0: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrb r1, [r5, 0x6] lsls r1, 5 ldr r2, =gUnknown_085A5C09 adds r1, r2 _080F44CA: - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x8 strb r0, [r1] @@ -14997,7 +14997,7 @@ _080F44E4: strb r0, [r2] b _080F4588 _080F44EA: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0xC] @@ -15033,25 +15033,25 @@ _080F452C: b _080F4588 .pool _080F4538: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0xC] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r5, 0x8] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r5, 0xA] movs r4, 0xD muls r1, r4 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r0, =gUnknown_0203A030 strb r4, [r0] b _080F4588 @@ -15073,7 +15073,7 @@ _080F4588: thumb_func_start DoTVShowPokemonLotterWinnerFlashReport DoTVShowPokemonLotterWinnerFlashReport: @ 80F45A0 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15088,7 +15088,7 @@ DoTVShowPokemonLotterWinnerFlashReport: @ 80F45A0 strh r0, [r1] ldr r0, =gUnknown_0203A030 ldrb r6, [r0] - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x5] @@ -15096,38 +15096,38 @@ DoTVShowPokemonLotterWinnerFlashReport: @ 80F45A0 ldrb r0, [r5, 0x4] cmp r0, 0 bne _080F45FC - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB72 - bl CopyString + bl StringCopy b _080F4634 .pool _080F45FC: cmp r0, 0x1 bne _080F4614 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB7A - bl CopyString + bl StringCopy b _080F4634 .pool _080F4614: cmp r0, 0x2 bne _080F462C - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB80 - bl CopyString + bl StringCopy b _080F4634 .pool _080F462C: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldr r1, =gUnknown_085ECB87 - bl CopyString + bl StringCopy _080F4634: - ldr r4, =gUnknown_02021EC4 + ldr r4, =gStringVar3 ldrh r0, [r5, 0x2] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy bl TVShowDone ldr r1, =gUnknown_0858D494 lsls r0, r6, 2 @@ -15143,7 +15143,7 @@ _080F4634: thumb_func_start DoTVShowThePokemonBattleSeminar DoTVShowThePokemonBattleSeminar: @ 80F466C push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15178,61 +15178,61 @@ _080F46B4: .4byte _080F4814 .4byte _080F4838 _080F46D0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0x11] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r6, 0x6] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0x4] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x1 strb r0, [r1] b _080F4858 .pool _080F4714: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0x11] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x4] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r2, [r6, 0x2] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x2 strb r0, [r1] b _080F4858 .pool _080F4760: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r6, 0x6] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 - bl CopyString + bl StringCopy ldrb r1, [r6, 0x10] cmp r1, 0x2 beq _080F479C @@ -15264,47 +15264,47 @@ _080F47A8: b _080F4858 .pool _080F47B4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x8] movs r5, 0xD muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0xC] muls r1, r5 adds r1, r4 b _080F4820 .pool _080F47EC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x8] movs r5, 0xD muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0xA] muls r1, r5 adds r1, r4 b _080F4820 .pool _080F4814: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r2, [r6, 0x8] movs r1, 0xD muls r1, r2 ldr r2, =gMoveNames adds r1, r2 _080F4820: - bl CopyString + bl StringCopy _080F4824: ldr r1, =gUnknown_0203A030 movs r0, 0x6 @@ -15312,18 +15312,18 @@ _080F4824: b _080F4858 .pool _080F4838: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0xE] movs r5, 0xD muls r1, r5 ldr r4, =gMoveNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0x2] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy bl TVShowDone _080F4858: ldr r0, =gUnknown_0858D498 @@ -15340,7 +15340,7 @@ _080F4858: thumb_func_start DoTVShowTrainerFanClubSpecial DoTVShowTrainerFanClubSpecial: @ 80F487C push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15374,16 +15374,16 @@ _080F48C4: .4byte _080F4944 .4byte _080F4978 _080F48DC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x18] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x2 ldrb r2, [r4, 0x17] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r4, 0x14] bl CopyEasyChatWord ldrb r1, [r4, 0x16] @@ -15417,12 +15417,12 @@ _080F4938: b _080F499A .pool _080F4944: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x18] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x2 ldrb r2, [r4, 0x17] bl sub_81DB5E8 @@ -15435,16 +15435,16 @@ _080F4944: b _080F499A .pool _080F4978: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0xC ldrb r2, [r4, 0x18] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x2 ldrb r2, [r4, 0x17] bl sub_81DB5E8 - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r4, 0x14] bl CopyEasyChatWord bl TVShowDone @@ -15463,7 +15463,7 @@ _080F499A: thumb_func_start DoTVShowTrainerFanClub DoTVShowTrainerFanClub: @ 80F49BC push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15504,7 +15504,7 @@ _080F4A08: .4byte _080F4B14 .4byte _080F4B1A _080F4A38: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] @@ -15606,15 +15606,15 @@ _080F4B14: strb r0, [r2] b _080F4B3A _080F4B1A: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x8] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 ldrh r1, [r4, 0x4] bl CopyEasyChatWord - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 ldrh r1, [r4, 0x6] bl CopyEasyChatWord bl TVShowDone @@ -15633,7 +15633,7 @@ _080F4B3A: thumb_func_start DoTVShowSpotTheCuties DoTVShowSpotTheCuties: @ 80F4B5C push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15677,12 +15677,12 @@ _080F4BA4: .4byte _080F4D64 .4byte _080F4D80 _080F4BE4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xF] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x4 ldrb r2, [r4, 0x10] bl sub_81DB5E8 @@ -15709,12 +15709,12 @@ _080F4C24: b _080F4D84 .pool _080F4C30: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0xF] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x4 ldrb r2, [r4, 0x10] bl sub_81DB5E8 @@ -15727,7 +15727,7 @@ _080F4C30: b _080F4D84 .pool _080F4C64: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x4 ldrb r2, [r4, 0x10] bl sub_81DB5E8 @@ -15830,7 +15830,7 @@ _080F4D58: b _080F4D84 .pool _080F4D64: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0x4 ldrb r2, [r4, 0x10] bl sub_81DB5E8 @@ -15856,7 +15856,7 @@ _080F4D84: thumb_func_start DoTVShowPokemonNewsBattleFrontier DoTVShowPokemonNewsBattleFrontier: @ 80F4D9C push {r4-r7,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -15984,7 +15984,7 @@ _080F4EC8: strb r0, [r2] b _080F5014 _080F4ECE: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xC] @@ -15998,7 +15998,7 @@ _080F4ECE: b _080F5014 .pool _080F4EF4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xC] @@ -16012,7 +16012,7 @@ _080F4EF4: b _080F5014 .pool _080F4F18: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xC] @@ -16026,77 +16026,77 @@ _080F4F18: b _080F5014 .pool _080F4F3C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x4] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0x6] muls r1, r5 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0x8] muls r1, r5 adds r1, r4 b _080F4FEC .pool _080F4F74: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x4] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0x6] muls r1, r5 adds r1, r4 b _080F4FEC .pool _080F4F9C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r1, [r6, 0x4] movs r5, 0xB muls r1, r5 ldr r4, =gSpeciesNames adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021DC4 + bl StringCopy + ldr r0, =gStringVar2 ldrh r1, [r6, 0x6] muls r1, r5 adds r1, r4 - bl CopyString - ldr r0, =gUnknown_02021EC4 + bl StringCopy + ldr r0, =gStringVar3 ldrh r1, [r6, 0x8] muls r1, r5 adds r1, r4 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x11 strb r0, [r1] b _080F5014 .pool _080F4FE0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrh r2, [r6, 0xA] movs r1, 0xB muls r1, r2 ldr r2, =gSpeciesNames adds r1, r2 _080F4FEC: - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 movs r0, 0x12 strb r0, [r1] b _080F5014 .pool _080F5004: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r6, 0 adds r1, 0x13 ldrb r2, [r6, 0xC] @@ -16117,7 +16117,7 @@ _080F5014: thumb_func_start DoTVShowWhatsNo1InHoennToday DoTVShowWhatsNo1InHoennToday: @ 80F5030 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -16154,7 +16154,7 @@ _080F5078: .4byte _080F5130 .4byte _080F5154 _080F509C: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x5] @@ -16220,7 +16220,7 @@ _080F5124: b _080F5164 .pool _080F5130: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x5] @@ -16234,7 +16234,7 @@ _080F5130: b _080F5164 .pool _080F5154: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x5] @@ -16325,7 +16325,7 @@ DoTVShowSecretBaseSecrets: @ 80F51EC mov r7, r9 mov r6, r8 push {r6,r7} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -16400,11 +16400,11 @@ _080F5240: .4byte _080F5526 .4byte _080F5526 _080F52F0: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1C] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16434,7 +16434,7 @@ _080F5328: b _080F542A .pool _080F5348: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16490,7 +16490,7 @@ _080F53B2: b _080F542A .pool _080F53C4: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16547,11 +16547,11 @@ _080F542C: b _080F552A .pool _080F5444: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1C] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16582,11 +16582,11 @@ _080F548C: b _080F552A .pool _080F5498: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1C] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16597,11 +16597,11 @@ _080F5498: b _080F552A .pool _080F54C4: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r5, 0x4 ldrb r2, [r5, 0x1C] bl sub_81DB5E8 - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r5, 0 adds r1, 0x13 ldrb r2, [r5, 0x1B] @@ -16616,12 +16616,12 @@ _080F54EC: movs r0, 0x3 b _080F5528 _080F54F0: - ldr r4, =gUnknown_02021DC4 + ldr r4, =gStringVar2 ldrh r0, [r5, 0x10] bl itemid_get_item adds r1, r0, 0 adds r0, r4, 0 - bl CopyString + bl StringCopy ldr r1, =gUnknown_0203A030 ldrb r0, [r5, 0x12] strb r0, [r1] @@ -16663,7 +16663,7 @@ _080F552A: thumb_func_start DoTVShowSafariFanClub DoTVShowSafariFanClub: @ 80F5548 push {r4,r5,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -16720,7 +16720,7 @@ _080F55D6: strb r0, [r2] b _080F56BC _080F55DC: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x4] @@ -16756,7 +16756,7 @@ _080F5628: strb r0, [r2] b _080F56BC _080F562E: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x4] @@ -16770,7 +16770,7 @@ _080F562E: b _080F5674 .pool _080F5650: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x4] @@ -16804,7 +16804,7 @@ _080F5694: strb r0, [r2] b _080F56BC _080F569A: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 adds r1, r4, 0 adds r1, 0x13 ldrb r2, [r4, 0x4] @@ -16831,7 +16831,7 @@ _080F56BC: thumb_func_start DoTVShowPokemonContestLiveUpdates2 DoTVShowPokemonContestLiveUpdates2: @ 80F56D4 push {r4-r6,lr} - ldr r2, =gUnknown_03005D8C + ldr r2, =gSaveBlock1Ptr ldr r0, =gUnknown_020375E0 ldrh r1, [r0] lsls r0, r1, 3 @@ -16859,7 +16859,7 @@ _080F5718: beq _080F574E b _080F575E _080F571E: - ldr r0, =gUnknown_02021CC4 + ldr r0, =gStringVar1 ldrb r1, [r4, 0xA] bl sub_818E868 ldrb r1, [r4, 0x16] @@ -16879,12 +16879,12 @@ _080F573E: strb r0, [r6] b _080F575E _080F5744: - ldr r0, =gUnknown_02021EC4 + ldr r0, =gStringVar3 adds r1, r4, 0x2 ldrb r2, [r4, 0x17] bl sub_81DB5E8 _080F574E: - ldr r0, =gUnknown_02021DC4 + ldr r0, =gStringVar2 adds r1, r4, 0 adds r1, 0xB ldrb r2, [r4, 0x18] @@ -16910,7 +16910,7 @@ TVShowDone: @ 80F577C ldr r1, =gUnknown_0203A030 movs r0, 0 strb r0, [r1] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] ldr r0, =gUnknown_020375E0 ldrh r1, [r0] diff --git a/asm/var.s b/asm/var.s index 04612534c..333dee065 100644 --- a/asm/var.s +++ b/asm/var.s @@ -31,7 +31,7 @@ _0809D660: b _0809D688 .pool _0809D67C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr lsls r1, r2, 1 ldr r2, =0xffff939c adds r1, r2 diff --git a/asm/weather.s b/asm/weather.s index 955aa5047..9602e3af8 100644 --- a/asm/weather.s +++ b/asm/weather.s @@ -7506,7 +7506,7 @@ _080AED78: thumb_func_start sub_80AED7C sub_80AED7C: @ 80AED7C push {r4,r5,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r1, [r4] adds r1, 0x2E ldrb r5, [r1] @@ -7529,7 +7529,7 @@ sub_80AED7C: @ 80AED7C thumb_func_start sav1_get_weather_probably sav1_get_weather_probably: @ 80AEDAC - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x2E ldrb r0, [r0] @@ -7540,7 +7540,7 @@ sav1_get_weather_probably: @ 80AEDAC thumb_func_start sub_80AEDBC sub_80AEDBC: @ 80AEDBC push {r4,r5,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r0, [r4] adds r0, 0x2E ldrb r5, [r0] @@ -7762,7 +7762,7 @@ _080AEF94: _080AEF9C: ldr r1, =gUnknown_0854FE60 _080AEF9E: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x2F ldrb r0, [r0] @@ -7780,7 +7780,7 @@ _080AEFB6: thumb_func_start sub_80AEFBC sub_80AEFBC: @ 80AEFBC lsls r0, 16 - ldr r1, =gUnknown_03005D8C + ldr r1, =gSaveBlock1Ptr ldr r2, [r1] adds r2, 0x2F lsrs r0, 16 diff --git a/asm/wild_encounter.s b/asm/wild_encounter.s index 384ec038a..3763743c9 100644 --- a/asm/wild_encounter.s +++ b/asm/wild_encounter.s @@ -121,7 +121,7 @@ sub_80B4984: @ 80B4984 push {r6,r7} sub sp, 0x10 movs r7, 0 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0x88 @@ -179,7 +179,7 @@ _080B4A04: movs r0, 0x1 b _080B4A7C _080B4A08: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r3, =0x00002e6a adds r0, r3 @@ -605,7 +605,7 @@ _080B4D08: lsls r0, 2 adds r3, r0, r5 ldrb r1, [r3] - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r2, [r0] movs r0, 0x4 ldrsb r0, [r2, r0] @@ -1029,7 +1029,7 @@ SetUpMassOutbreakEncounter: @ 80B505C ands r0, r1 cmp r0, 0 beq _080B508C - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x00002b94 adds r0, r1 @@ -1042,7 +1042,7 @@ SetUpMassOutbreakEncounter: @ 80B505C b _080B50C6 .pool _080B508C: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r1, [r0] ldr r2, =0x00002b90 adds r0, r1, r2 @@ -1053,7 +1053,7 @@ _080B508C: bl sub_80B4E68 movs r4, 0 _080B50A2: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] lsls r1, r4, 1 ldr r2, =0x00002b98 @@ -1080,7 +1080,7 @@ _080B50C6: thumb_func_start DoMassOutbreakEncounterTest DoMassOutbreakEncounterTest: @ 80B50DC push {r4,lr} - ldr r4, =gUnknown_03005D8C + ldr r4, =gSaveBlock1Ptr ldr r2, [r4] ldr r1, =0x00002b90 adds r0, r2, r1 @@ -1219,7 +1219,7 @@ _080B51F2: _080B5200: cmp r0, 0x8 bne _080B5216 - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] adds r0, 0x2E ldrb r0, [r0] @@ -1275,7 +1275,7 @@ _080B525A: thumb_func_start sub_80B5260 sub_80B5260: @ 80B5260 push {lr} - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldrh r1, [r0, 0x4] movs r0, 0xE0 @@ -1378,7 +1378,7 @@ _080B5330: beq _080B5338 b _080B54FE _080B5338: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 @@ -1556,7 +1556,7 @@ _080B5492: cmp r0, 0x1 bne _080B54E4 _080B54BA: - ldr r0, =gUnknown_03005D8C + ldr r0, =gSaveBlock1Ptr ldr r0, [r0] ldr r1, =0x000031dc adds r0, r1 @@ -1695,7 +1695,7 @@ _080B55E4: beq _080B55EC b _080B56F2 _080B55EC: - ldr r0, =gUnknown_03005D90 + ldr r0, =gSaveBlock2Ptr ldr r0, [r0] ldr r1, =0x00000cb2 adds r0, r1 diff --git a/data/string_util.s b/data/string_util.s index 0c540b5ba..69c4c19bf 100644 --- a/data/string_util.s +++ b/data/string_util.s @@ -3,11 +3,11 @@ .section .rodata -gDigits:: @ 82EC7D4 +sDigits:: @ 82EC7D4 .string "0123456789ABCDEF" .align 2 -gPowersOfTen:: @ 82EC7E4 +sPowersOfTen:: @ 82EC7E4 .4byte 1 .4byte 10 .4byte 100 @@ -19,28 +19,28 @@ gPowersOfTen:: @ 82EC7E4 .4byte 100000000 .4byte 1000000000 -gUnknown_082EC80C:: @ 82EC80C +sSetBrailleFont:: @ 82EC80C .incbin "baserom.gba", 0x2ec80c, 0x4 -gUnknown_082EC810:: @ 82EC810 +sGotoLine2:: @ 82EC810 .incbin "baserom.gba", 0x2ec810, 0x8 .align 2 -gStringRefFunctionTable:: @ 82EC818 - .4byte StringRef_GetPossiblyUnusedStringVar - .4byte StringRef_GetPlayerName - .4byte StringRef_GetStringVar1 - .4byte StringRef_GetStringVar2 - .4byte StringRef_GetStringVar3 - .4byte StringRef_GetDummiedOutGenderDependentString - .4byte StringRef_GetRivalName - .4byte StringRef_GetEmeraldString - .4byte StringRef_GetAquaString - .4byte StringRef_GetMagmaString - .4byte StringRef_GetArchieString - .4byte StringRef_GetMaxieString - .4byte StringRef_GetKyogreString - .4byte StringRef_GetGroudonString +sExpandPlaceholderFuncs:: @ 82EC818 + .4byte ExpandPlaceholder_UnknownStringVar + .4byte ExpandPlaceholder_PlayerName + .4byte ExpandPlaceholder_StringVar1 + .4byte ExpandPlaceholder_StringVar2 + .4byte ExpandPlaceholder_StringVar3 + .4byte ExpandPlaceholder_KunChan + .4byte ExpandPlaceholder_RivalName + .4byte ExpandPlaceholder_Version + .4byte ExpandPlaceholder_Aqua + .4byte ExpandPlaceholder_Magma + .4byte ExpandPlaceholder_Archie + .4byte ExpandPlaceholder_Maxie + .4byte ExpandPlaceholder_Kyogre + .4byte ExpandPlaceholder_Groudon gExtendedControlCodeLengths:: @ 82EC850 .byte 1 diff --git a/include/global.h b/include/global.h index 0047fcbdb..1f7df2ca6 100644 --- a/include/global.h +++ b/include/global.h @@ -3,4 +3,81 @@ #include "gba/gba.h" +enum +{ + VERSION_SAPPHIRE = 1, + VERSION_RUBY = 2, + VERSION_EMERALD = 3, +}; + +enum LanguageId { + LANGUAGE_JAPANESE = 1, + LANGUAGE_ENGLISH = 2, + LANGUAGE_GERMAN = 5, +}; + +#define GAME_LANGUAGE (LANGUAGE_ENGLISH) + +enum +{ + MALE, + FEMALE +}; + +enum +{ + OPTIONS_BUTTON_MODE_NORMAL, + OPTIONS_BUTTON_MODE_LR, + OPTIONS_BUTTON_MODE_L_EQUALS_A +}; + +enum +{ + OPTIONS_TEXT_SPEED_SLOW, + OPTIONS_TEXT_SPEED_MID, + OPTIONS_TEXT_SPEED_FAST +}; + +enum +{ + OPTIONS_SOUND_MONO, + OPTIONS_SOUND_STEREO +}; + +enum +{ + OPTIONS_BATTLE_STYLE_SHIFT, + OPTIONS_BATTLE_STYLE_SET +}; + +enum +{ + BAG_ITEMS = 1, + BAG_POKEBALLS, + BAG_TMsHMs, + BAG_BERRIES, + BAG_KEYITEMS +}; + +struct SaveBlock2 +{ + /*0x00*/ u8 playerName[8]; + /*0x08*/ u8 playerGender; // MALE, FEMALE + /*0x09*/ u8 specialSaveWarp; + /*0x0A*/ u8 playerTrainerId[4]; + /*0x0E*/ u16 playTimeHours; + /*0x10*/ u8 playTimeMinutes; + /*0x11*/ u8 playTimeSeconds; + /*0x12*/ u8 playTimeVBlanks; + /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] + /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] + u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes + u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] + u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in +}; + +extern struct SaveBlock2 *gSaveBlock2Ptr; + #endif // GUARD_GLOBAL_H diff --git a/include/string_util.h b/include/string_util.h new file mode 100644 index 000000000..c20965380 --- /dev/null +++ b/include/string_util.h @@ -0,0 +1,32 @@ +#ifndef GUARD_STRING_UTIL_H +#define GUARD_STRING_UTIL_H + +enum StringConvertMode +{ + STR_CONV_MODE_LEFT_ALIGN, + STR_CONV_MODE_RIGHT_ALIGN, + STR_CONV_MODE_LEADING_ZEROS +}; + +u8 *StringCopy10(u8 *dest, const u8 *src); +u8 *StringGetEnd10(u8 *str); +u8 *StringCopy8(u8 *dest, const u8 *src); +u8 *StringCopy(u8 *dest, const u8 *src); +u8 *StringAppend(u8 *dest, const u8 *src); +u8 *StringCopyN(u8 *dest, const u8 *src, u8 n); +u8 *StringAppendN(u8 *dest, const u8 *src, u8 n); +u16 StringLength(const u8 *str); +s32 StringCompare(const u8 *str1, const u8 *str2); +s32 StringCompareN(const u8 *str1, const u8 *str2, u32 n); +u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n); +u8 *ConvertIntToDecimalStringN_DigitWidth6(u8 *dest, s32 value, enum StringConvertMode mode, u8 n); +u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n); +u8 *ConvertIntToDecimalString(u8 *dest, s32 value); +u8 *StringExpandPlaceholders(u8 *dest, const u8 *src); +u8 *StringBraille(u8 *dest, const u8 *src); +u8 *GetExpandedPlaceholder(u32 id); +u8 *StringFill(u8 *dest, u8 c, u16 n); +u8 *StringCopyPadded(u8 *dest, const u8 *src, u8 c, u16 n); +u8 *StringFillWithTerminator(u8 *dest, u16 n); + +#endif // GUARD_STRING_UTIL_H diff --git a/include/text.h b/include/text.h new file mode 100644 index 000000000..98d8406b5 --- /dev/null +++ b/include/text.h @@ -0,0 +1,14 @@ +#ifndef GUARD_TEXT_H +#define GUARD_TEXT_H + +#define CHAR_SPACE 0x00 +#define CHAR_QUESTION_MARK 0xAC +#define CHAR_HYPHEN 0xAE +#define CHAR_CURRENCY 0xB7 +#define CHAR_COLON 0xF0 +#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code +#define PLACEHOLDER_BEGIN 0xFD // string placeholder +#define CHAR_NEWLINE 0xFE +#define EOS 0xFF // end of string + +#endif // GUARD_TEXT_H diff --git a/ld_script.txt b/ld_script.txt index b15c5618c..83c6bc49d 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -48,6 +48,7 @@ SECTIONS { asm/window.o(.text); asm/text.o(.text); asm/sprite.o(.text); + src/string_util.o(.text); asm/string_util.o(.text); asm/link.o(.text); asm/rtc.o(.text); diff --git a/src/string_util.c b/src/string_util.c new file mode 100644 index 000000000..35b48ceae --- /dev/null +++ b/src/string_util.c @@ -0,0 +1,544 @@ +#include "global.h" +#include "string_util.h" +#include "text.h" + +#define MAX_PLACEHOLDER_ID 0xD + +extern const u8 sDigits[]; +extern const s32 sPowersOfTen[]; +extern const u8 sSetBrailleFont[]; +extern const u8 sGotoLine2[]; + +typedef u8 *(*ExpandPlaceholderFunc)(void); + +extern const ExpandPlaceholderFunc sExpandPlaceholderFuncs[]; + +extern u8 gUnknownStringVar[]; +extern u8 gStringVar1[]; +extern u8 gStringVar2[]; +extern u8 gStringVar3[]; +extern u8 gStringVar4[]; + +extern u8 gExpandedPlaceholder_Empty[]; +extern u8 gExpandedPlaceholder_Kun[]; +extern u8 gExpandedPlaceholder_Chan[]; +extern u8 gExpandedPlaceholder_Sapphire[]; +extern u8 gExpandedPlaceholder_Ruby[]; +extern u8 gExpandedPlaceholder_Emerald[]; +extern u8 gExpandedPlaceholder_Aqua[]; +extern u8 gExpandedPlaceholder_Magma[]; +extern u8 gExpandedPlaceholder_Archie[]; +extern u8 gExpandedPlaceholder_Maxie[]; +extern u8 gExpandedPlaceholder_Kyogre[]; +extern u8 gExpandedPlaceholder_Groudon[]; +extern u8 gExpandedPlaceholder_Brendan[]; +extern u8 gExpandedPlaceholder_May[]; + +u8 *StringCopy10(u8 *dest, const u8 *src) +{ + u8 i; + u32 limit = 10; + + for (i = 0; i < limit; i++) + { + dest[i] = src[i]; + + if (dest[i] == EOS) + return &dest[i]; + } + + dest[i] = EOS; + return &dest[i]; +} + +u8 *StringGetEnd10(u8 *str) +{ + u8 i; + u32 limit = 10; + + for (i = 0; i < limit; i++) + if (str[i] == EOS) + return &str[i]; + + str[i] = EOS; + return &str[i]; +} + +u8 *StringCopy7(u8 *dest, const u8 *src) +{ + s32 i; + s32 limit = 7; + + for (i = 0; i < limit; i++) + { + dest[i] = src[i]; + + if (dest[i] == EOS) + return &dest[i]; + } + + dest[i] = EOS; + return &dest[i]; +} + +u8 *StringCopy(u8 *dest, const u8 *src) +{ + while (*src != EOS) + { + *dest = *src; + dest++; + src++; + } + + *dest = EOS; + return dest; +} + +u8 *StringAppend(u8 *dest, const u8 *src) +{ + while (*dest != EOS) + dest++; + + return StringCopy(dest, src); +} + +u8 *StringCopyN(u8 *dest, const u8 *src, u8 n) +{ + u16 i; + + for (i = 0; i < n; i++) + dest[i] = src[i]; + + return &dest[n]; +} + +u8 *StringAppendN(u8 *dest, const u8 *src, u8 n) +{ + while (*dest != EOS) + dest++; + + return StringCopyN(dest, src, n); +} + +u16 StringLength(const u8 *str) +{ + u16 length = 0; + + while (str[length] != EOS) + length++; + + return length; +} + +s32 StringCompare(const u8 *str1, const u8 *str2) +{ + while (*str1 == *str2) + { + if (*str1 == EOS) + return 0; + str1++; + str2++; + } + + return *str1 - *str2; +} + +s32 StringCompareN(const u8 *str1, const u8 *str2, u32 n) +{ + while (*str1 == *str2) + { + if (*str1 == EOS) + return 0; + str1++; + str2++; + if (--n == 0) + return 0; + } + + return *str1 - *str2; +} + +bool8 IsStringLengthAtLeast(const u8 *str, s32 n) +{ + u8 i; + + for (i = 0; i < n; i++) + if (str[i] && str[i] != EOS) + return TRUE; + + return FALSE; +} + +u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n) +{ + enum { WAITING_FOR_NONZERO_DIGIT, WRITING_DIGITS, WRITING_SPACES } state; + s32 powerOfTen; + s32 largestPowerOfTen = sPowersOfTen[n - 1]; + + state = WAITING_FOR_NONZERO_DIGIT; + + if (mode == STR_CONV_MODE_RIGHT_ALIGN) + state = WRITING_SPACES; + + if (mode == STR_CONV_MODE_LEADING_ZEROS) + state = WRITING_DIGITS; + + for (powerOfTen = largestPowerOfTen; powerOfTen > 0; powerOfTen /= 10) + { + u8 c; + u16 digit = value / powerOfTen; + s32 temp = value - (powerOfTen * digit); + + if (state == WRITING_DIGITS) + { + u8 *out = dest++; + + if (digit <= 9) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (digit != 0 || powerOfTen == 1) + { + u8 *out; + state = WRITING_DIGITS; + out = dest++; + + if (digit <= 9) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (state == WRITING_SPACES) + { + *dest++ = 0x77; + } + + value = temp; + } + + *dest = EOS; + return dest; +} + +u8 *ConvertUIntToDecimalStringN(u8 *dest, u32 value, enum StringConvertMode mode, u8 n) +{ + enum { WAITING_FOR_NONZERO_DIGIT, WRITING_DIGITS, WRITING_SPACES } state; + s32 powerOfTen; + s32 largestPowerOfTen = sPowersOfTen[n - 1]; + + state = WAITING_FOR_NONZERO_DIGIT; + + if (mode == STR_CONV_MODE_RIGHT_ALIGN) + state = WRITING_SPACES; + + if (mode == STR_CONV_MODE_LEADING_ZEROS) + state = WRITING_DIGITS; + + for (powerOfTen = largestPowerOfTen; powerOfTen > 0; powerOfTen /= 10) + { + u8 c; + u16 digit = value / powerOfTen; + u32 temp = value - (powerOfTen * digit); + + if (state == WRITING_DIGITS) + { + u8 *out = dest++; + + if (digit <= 9) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (digit != 0 || powerOfTen == 1) + { + u8 *out; + state = WRITING_DIGITS; + out = dest++; + + if (digit <= 9) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (state == WRITING_SPACES) + { + *dest++ = 0x77; + } + + value = temp; + } + + *dest = EOS; + return dest; +} + +u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n) +{ + enum { WAITING_FOR_NONZERO_DIGIT, WRITING_DIGITS, WRITING_SPACES } state; + u8 i; + s32 powerOfSixteen; + s32 largestPowerOfSixteen = 1; + + for (i = 1; i < n; i++) + largestPowerOfSixteen *= 16; + + state = WAITING_FOR_NONZERO_DIGIT; + + if (mode == STR_CONV_MODE_RIGHT_ALIGN) + state = WRITING_SPACES; + + if (mode == STR_CONV_MODE_LEADING_ZEROS) + state = WRITING_DIGITS; + + for (powerOfSixteen = largestPowerOfSixteen; powerOfSixteen > 0; powerOfSixteen /= 16) + { + u8 c; + u32 digit = value / powerOfSixteen; + s32 temp = value % powerOfSixteen; + + if (state == WRITING_DIGITS) + { + char *out = dest++; + + if (digit <= 0xF) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (digit != 0 || powerOfSixteen == 1) + { + char *out; + state = WRITING_DIGITS; + out = dest++; + + if (digit <= 0xF) + c = sDigits[digit]; + else + c = CHAR_QUESTION_MARK; + + *out = c; + } + else if (state == WRITING_SPACES) + { + *dest++ = 0x77; + } + + value = temp; + } + + *dest = EOS; + return dest; +} + +u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) +{ + for (;;) + { + u8 c = *src++; + u8 placeholderId; + u8 *expandedString; + + switch (c) + { + case PLACEHOLDER_BEGIN: + placeholderId = *src++; + expandedString = GetExpandedPlaceholder(placeholderId); + dest = StringExpandPlaceholders(dest, expandedString); + break; + case EXT_CTRL_CODE_BEGIN: + *dest++ = c; + c = *src++; + *dest++ = c; + + switch (c) + { + case 0x07: + case 0x09: + case 0x0F: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + break; + case 0x04: + *dest++ = *src++; + case 0x0B: + *dest++ = *src++; + default: + *dest++ = *src++; + } + break; + case EOS: + *dest = EOS; + return dest; + case 0xFA: + case 0xFB: + case 0xFE: + default: + *dest++ = c; + } + } +} + +u8 *StringBraille(u8 *dest, const u8 *src) +{ + u8 setBrailleFont[4]; + u8 gotoLine2[5]; + + memcpy(setBrailleFont, sSetBrailleFont, 4); + memcpy(gotoLine2, sGotoLine2, 5); + + dest = StringCopy(dest, setBrailleFont); + + for (;;) + { + u8 c = *src++; + + switch (c) + { + case EOS: + *dest = c; + return dest; + case 0xFE: + dest = StringCopy(dest, gotoLine2); + break; + default: + *dest++ = c; + *dest++ = c + 0x40; + break; + } + } +} + +u8 *ExpandPlaceholder_UnknownStringVar(void) +{ + return gUnknownStringVar; +} + +u8 *ExpandPlaceholder_PlayerName(void) +{ + return gSaveBlock2Ptr->playerName; +} + +u8 *ExpandPlaceholder_StringVar1(void) +{ + return gStringVar1; +} + +u8 *ExpandPlaceholder_StringVar2(void) +{ + return gStringVar2; +} + +u8 *ExpandPlaceholder_StringVar3(void) +{ + return gStringVar3; +} + +u8 *ExpandPlaceholder_KunChan(void) +{ + if (gSaveBlock2Ptr->playerGender == MALE) + return gExpandedPlaceholder_Kun; + else + return gExpandedPlaceholder_Chan; +} + +u8 *ExpandPlaceholder_RivalName(void) +{ + if (gSaveBlock2Ptr->playerGender == MALE) + return gExpandedPlaceholder_May; + else + return gExpandedPlaceholder_Brendan; +} + +u8 *ExpandPlaceholder_Version(void) +{ + return gExpandedPlaceholder_Emerald; +} + +u8 *ExpandPlaceholder_Aqua(void) +{ + return gExpandedPlaceholder_Aqua; +} + +u8 *ExpandPlaceholder_Magma(void) +{ + return gExpandedPlaceholder_Magma; +} + +u8 *ExpandPlaceholder_Archie(void) +{ + return gExpandedPlaceholder_Archie; +} + +u8 *ExpandPlaceholder_Maxie(void) +{ + return gExpandedPlaceholder_Maxie; +} + +u8 *ExpandPlaceholder_Kyogre(void) +{ + return gExpandedPlaceholder_Kyogre; +} + +u8 *ExpandPlaceholder_Groudon(void) +{ + return gExpandedPlaceholder_Groudon; +} + +u8 *GetExpandedPlaceholder(u32 id) +{ + if (id > MAX_PLACEHOLDER_ID) + return gExpandedPlaceholder_Empty; + else + return sExpandPlaceholderFuncs[id](); +} + +u8 *StringFill(u8 *dest, u8 c, u16 n) +{ + u16 i; + + for (i = 0; i < n; i++) + *dest++ = c; + + *dest = EOS; + return dest; +} + +u8 *StringCopyPadded(u8 *dest, const u8 *src, u8 c, u16 n) +{ + while (*src != EOS) + { + *dest++ = *src++; + + if (n) + n--; + } + + n--; + + while (n != (u16)-1) + { + *dest++ = c; + n--; + } + + *dest = EOS; + return dest; +} + +u8 *StringFillWithTerminator(u8 *dest, u16 n) +{ + return StringFill(dest, EOS, n); +} diff --git a/sym_common.txt b/sym_common.txt index 4a8aebd0b..03d6a758c 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -276,10 +276,10 @@ gUnknown_03005D84: @ 3005D84 gUnknown_03005D88: @ 3005D88 .space 0x4 -gUnknown_03005D8C: @ 3005D8C +gSaveBlock1Ptr: @ 3005D8C .space 0x4 -gUnknown_03005D90: @ 3005D90 +gSaveBlock2Ptr: @ 3005D90 .space 0x4 gUnknown_03005D94: @ 3005D94 diff --git a/sym_ewram.txt b/sym_ewram.txt index 794c81d8d..fe852547a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -64,19 +64,19 @@ gUnknown_02021BC0: @ 2021BC0 gUnknown_02021CC0: @ 2021CC0 .space 0x4 -gUnknown_02021CC4: @ 2021CC4 +gStringVar1: @ 2021CC4 .space 0x100 -gUnknown_02021DC4: @ 2021DC4 +gStringVar2: @ 2021DC4 .space 0x100 -gUnknown_02021EC4: @ 2021EC4 +gStringVar3: @ 2021EC4 .space 0x100 -gUnknown_02021FC4: @ 2021FC4 +gStringVar4: @ 2021FC4 .space 0x3E8 -gUnknown_020223AC: @ 20223AC +gUnknownStringVar: @ 20223AC .space 0x10 gUnknown_020223BC: @ 20223BC