From b71f4b17d8ecce0176f5721d9d4746e8074fd668 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 29 Oct 2024 14:41:09 +0100 Subject: [PATCH] rename format string related --- asm/code_800F990.s | 4 +- asm/code_8010F28.s | 4 +- asm/code_801EE10.s | 4 +- asm/code_8040094.s | 2 +- asm/code_8045A00.s | 20 ++--- asm/code_8046CE4.s | 14 ++-- asm/code_805D8C8.s | 42 +++++----- asm/code_805D8C8_1.s | 8 +- asm/code_8066D04.s | 44 +++++------ asm/code_8069E0C.s | 4 +- asm/code_806E8B0.s | 2 +- asm/code_80718D8.s | 10 +-- asm/code_8072CF4.s | 4 +- asm/code_807CD9C.s | 6 +- asm/code_807E5AC.s | 12 +-- asm/code_808417C.s | 8 +- asm/code_809A560.s | 22 +++--- asm/code_809C5C4.s | 2 +- asm/dungeon_2.s | 20 ++--- asm/ground_script.s | 12 +-- asm/pokemon_3.s | 24 +++--- include/string_format.h | 12 +-- src/adventure_log.c | 12 +-- src/code_8015080.c | 2 +- src/code_801602C.c | 4 +- src/code_801AFA4.c | 6 +- src/code_801B3C0.c | 2 +- src/code_801B60C.c | 8 +- src/code_801D014.c | 8 +- src/code_801F428.c | 2 +- src/code_801F808.c | 2 +- src/code_80227B8.c | 12 +-- src/code_802DB28.c | 8 +- src/code_804267C.c | 2 +- src/code_8042B34.c | 12 +-- src/code_8048480.c | 14 ++-- src/code_805D8C8_1.c | 54 ++++++------- src/code_8066D04.c | 44 +++++------ src/code_8069E0C.c | 10 +-- src/code_806CD90.c | 22 +++--- src/code_806FDF4.c | 16 ++-- src/code_80718D8.c | 54 ++++++------- src/code_8072B78.c | 4 +- src/code_8073CF0.c | 26 +++---- src/code_8077274_1.c | 86 ++++++++++---------- src/code_807CD9C.c | 6 +- src/code_807E1A0.c | 4 +- src/code_8084778.c | 4 +- src/code_809447C.c | 42 +++++----- src/code_809A560.c | 8 +- src/dungeon_ai.c | 2 +- src/dungeon_ai_attack.c | 8 +- src/dungeon_ai_leader.c | 4 +- src/dungeon_cutscenes.c | 130 +++++++++++++++---------------- src/dungeon_items.c | 2 +- src/dungeon_message.c | 22 +++--- src/dungeon_move.c | 40 +++++----- src/dungeon_pokemon_attributes.c | 6 +- src/felicity_bank.c | 14 ++-- src/friend_area_action_menu.c | 2 +- src/friend_list_menu.c | 8 +- src/friend_rescue.c | 4 +- src/ground_script_1.c | 4 +- src/gulpin_shop.c | 4 +- src/gulpin_shop_801FB50.c | 16 ++-- src/iq_skill_info_menu.c | 4 +- src/iq_skill_list_menu.c | 6 +- src/items.c | 4 +- src/kangaskhan_storage1.c | 10 +-- src/kecleon_bros1.c | 28 +++---- src/kecleon_bros4.c | 6 +- src/load_screen.c | 2 +- src/luminous_cave.c | 6 +- src/makuhita_dojo1.c | 8 +- src/mission_reward.c | 16 ++-- src/move_actions.c | 36 ++++----- src/move_effects_target.c | 90 ++++++++++----------- src/moves.c | 6 +- src/party_list_menu.c | 16 ++-- src/personality_test1.c | 2 +- src/pokemon_mail.c | 86 ++++++++++---------- src/pokemon_news2.c | 6 +- src/pokemon_news3.c | 6 +- src/post_office_guide1.c | 2 +- src/post_office_guide2.c | 10 +-- src/status.c | 108 ++++++++++++------------- src/status_actions.c | 18 ++--- src/status_checks.c | 4 +- src/string_format.c | 34 ++++---- src/thank_you_wonder_mail.c | 4 +- src/trade_items_menu.c | 16 ++-- src/trap.c | 10 +-- src/wigglytuff_shop3.c | 16 ++-- src/wonder_mail.c | 2 +- src/wonder_mail_2.c | 2 +- 95 files changed, 792 insertions(+), 792 deletions(-) diff --git a/asm/code_800F990.s b/asm/code_800F990.s index 983e35980..a510da1b9 100644 --- a/asm/code_800F990.s +++ b/asm/code_800F990.s @@ -1084,7 +1084,7 @@ sub_80101F8: adds r2, 0x50 adds r1, r3, 0 movs r3, 0 - bl xxx_format_string + bl CopyFormatString b _08010220 .align 2, 0 _08010214: .4byte gUnknown_80D3EFC @@ -2307,7 +2307,7 @@ _08010BD0: pop {r0} bx r0 .align 2, 0 -_08010C08: .4byte gAvailablePokemonNames +_08010C08: .4byte gFormatBuffer_Monsters _08010C0C: .4byte gUnknown_80D4074 thumb_func_end sub_8010B74 diff --git a/asm/code_8010F28.s b/asm/code_8010F28.s index 5c8fcb239..e19eb0dd4 100644 --- a/asm/code_8010F28.s +++ b/asm/code_8010F28.s @@ -887,8 +887,8 @@ _08011624: .4byte 0x00004df8 _08011628: .4byte 0x00004ddc _0801162C: .4byte 0x00004de0 _08011630: .4byte gUnknown_80D4104 -_08011634: .4byte gFormatData_202DE30 -_08011638: .4byte gFormatItems +_08011634: .4byte gFormatArgs +_08011638: .4byte gFormatBuffer_Items _0801163C: .4byte gUnknown_80D4120 _08011640: ldr r1, _08011690 diff --git a/asm/code_801EE10.s b/asm/code_801EE10.s index a55a9075a..e3d6b668e 100644 --- a/asm/code_801EE10.s +++ b/asm/code_801EE10.s @@ -74,7 +74,7 @@ _0801F2E0: b _0801F31A .align 2, 0 _0801F30C: .4byte gUnknown_203B270 -_0801F310: .4byte gAvailablePokemonNames +_0801F310: .4byte gFormatBuffer_Monsters _0801F314: .4byte gUnknown_80DC28C _0801F318: movs r0, 0x4 @@ -182,7 +182,7 @@ _0801F3DC: pop {r0} bx r0 .align 2, 0 -_0801F3EC: .4byte gFormatItems +_0801F3EC: .4byte gFormatBuffer_Items _0801F3F0: .4byte gUnknown_203B270 _0801F3F4: .4byte gUnknown_80DC2A0 thumb_func_end sub_801F280 diff --git a/asm/code_8040094.s b/asm/code_8040094.s index 6b1bf2584..901f1929a 100644 --- a/asm/code_8040094.s +++ b/asm/code_8040094.s @@ -1739,7 +1739,7 @@ _08040EB8: .4byte gUnknown_202F224 _08040EBC: .4byte gDungeon _08040EC0: .4byte 0x00018204 _08040EC4: .4byte gUnknown_8106A8C -_08040EC8: .4byte gFormatData_202DE30 +_08040EC8: .4byte gFormatArgs _08040ECC: .4byte gPtrMagnitudeMessage _08040ED0: cmp r1, 0x76 diff --git a/asm/code_8045A00.s b/asm/code_8045A00.s index 12fcf8310..77143e088 100644 --- a/asm/code_8045A00.s +++ b/asm/code_8045A00.s @@ -69,8 +69,8 @@ _08045E1E: ldr r0, _08045E3C b _08046048 .align 2, 0 -_08045E34: .4byte gFormatItems -_08045E38: .4byte gAvailablePokemonNames +_08045E34: .4byte gFormatBuffer_Items +_08045E38: .4byte gFormatBuffer_Monsters _08045E3C: .4byte gMonTerrifiedCouldntPickUpItem _08045E40: ldrb r0, [r5, 0x2] @@ -94,7 +94,7 @@ _08045E40: ldr r0, _08045E78 b _08045FD0 .align 2, 0 -_08045E74: .4byte gFormatItems +_08045E74: .4byte gFormatBuffer_Items _08045E78: .4byte gPickedUpItem _08045E7C: ldr r0, _08045EA8 @@ -282,7 +282,7 @@ _08045FD0: b _08045FF2 .align 2, 0 _08045FDC: .4byte 0x00ff0008 -_08045FE0: .4byte gFormatItems +_08045FE0: .4byte gFormatBuffer_Items _08045FE4: .4byte gPickedUpItem2 _08045FE8: ldr r0, _08045FFC @@ -339,8 +339,8 @@ _08046048: bl TryDisplayDungeonLoggableMessage b _080460E0 .align 2, 0 -_08046054: .4byte gFormatItems -_08046058: .4byte gAvailablePokemonNames +_08046054: .4byte gFormatBuffer_Items +_08046058: .4byte gFormatBuffer_Monsters _0804605C: .4byte gMonSteppedOnItem _08046060: movs r0, 0xA5 @@ -363,7 +363,7 @@ _08046060: ldr r0, _08046090 b _080460AC .align 2, 0 -_0804608C: .4byte gFormatItems +_0804608C: .4byte gFormatBuffer_Items _08046090: .4byte gPickedUpItem2 _08046094: adds r0, r5, 0 @@ -382,7 +382,7 @@ _080460AC: bl TryDisplayDungeonLoggableMessage b _080460DA .align 2, 0 -_080460B8: .4byte gAvailablePokemonNames +_080460B8: .4byte gFormatBuffer_Monsters _080460BC: .4byte gMonCouldntPickUpItem _080460C0: ldr r0, _080460F0 @@ -408,7 +408,7 @@ _080460E0: pop {r0} bx r0 .align 2, 0 -_080460F0: .4byte gFormatItems +_080460F0: .4byte gFormatBuffer_Items _080460F4: .4byte gPickedUpItemToolbox thumb_func_end sub_8045DB4 @@ -1128,7 +1128,7 @@ _08046644: b _0804671E .align 2, 0 _08046688: .4byte gUnknown_80F4468 -_0804668C: .4byte gFormatItems +_0804668C: .4byte gFormatBuffer_Items _08046690: cmp r0, 0x2 beq _080466A4 diff --git a/asm/code_8046CE4.s b/asm/code_8046CE4.s index 73a27c892..e7544cb38 100644 --- a/asm/code_8046CE4.s +++ b/asm/code_8046CE4.s @@ -446,8 +446,8 @@ _080474A6: _080474B8: .4byte 0x00000195 _080474BC: .4byte gDungeon _080474C0: .4byte 0x0001c05e -_080474C4: .4byte gAvailablePokemonNames -_080474C8: .4byte gFormatItems +_080474C4: .4byte gFormatBuffer_Monsters +_080474C8: .4byte gFormatBuffer_Items _080474CC: .4byte gUnknown_80F94C4 _080474D0: ldr r1, [sp, 0x260] @@ -478,8 +478,8 @@ _080474E2: bl TryDisplayDungeonLoggableMessage3 b _08047524 .align 2, 0 -_0804750C: .4byte gAvailablePokemonNames -_08047510: .4byte gFormatItems +_0804750C: .4byte gFormatBuffer_Monsters +_08047510: .4byte gFormatBuffer_Items _08047514: .4byte gUnknown_80F94D8 _08047518: ldr r0, _08047564 @@ -565,7 +565,7 @@ _080475A8: pop {r0} bx r0 .align 2, 0 -_080475BC: .4byte gFormatItems +_080475BC: .4byte gFormatBuffer_Items _080475C0: .4byte gUnknown_80F9530 thumb_func_end sub_8047190 @@ -952,8 +952,8 @@ _080478B8: b _08047904 .align 2, 0 _080478CC: .4byte 0xffffff00 -_080478D0: .4byte gFormatItems -_080478D4: .4byte gAvailablePokemonNames +_080478D0: .4byte gFormatBuffer_Items +_080478D4: .4byte gFormatBuffer_Monsters _080478D8: .4byte gUnknown_80F94C4 _080478DC: cmp r7, 0 diff --git a/asm/code_805D8C8.s b/asm/code_805D8C8.s index 7676c51ba..67e5364b0 100644 --- a/asm/code_805D8C8.s +++ b/asm/code_805D8C8.s @@ -1587,7 +1587,7 @@ _08062650: adds r5, r0, 0 b _080626EA .align 2, 0 -_080626CC: .4byte gFormatItems +_080626CC: .4byte gFormatBuffer_Items _080626D0: .4byte gUnknown_80FE95C _080626D4: movs r0, 0x2 @@ -1717,7 +1717,7 @@ _0806276C: adds r5, r0, 0 b _080627FE .align 2, 0 -_080627E0: .4byte gFormatItems +_080627E0: .4byte gFormatBuffer_Items _080627E4: .4byte gUnknown_80FE960 _080627E8: movs r0, 0x2 @@ -1866,7 +1866,7 @@ sub_806285C: add r4, sp, 0x4 b _08062938 .align 2, 0 -_0806291C: .4byte gFormatItems +_0806291C: .4byte gFormatBuffer_Items _08062920: .4byte gUnknown_80FE964 _08062924: movs r0, 0x2 @@ -2198,7 +2198,7 @@ _08062BCA: movs r0, 0x1 b _08062BDA .align 2, 0 -_08062BD0: .4byte gAvailablePokemonNames +_08062BD0: .4byte gFormatBuffer_Monsters _08062BD4: .4byte gUnknown_80FE978 _08062BD8: movs r0, 0 @@ -2305,7 +2305,7 @@ _08062C8A: pop {r0} bx r0 .align 2, 0 -_08062CA0: .4byte gFormatItems +_08062CA0: .4byte gFormatBuffer_Items _08062CA4: .4byte gUnknown_8106C98 thumb_func_end sub_8062B74 @@ -2349,7 +2349,7 @@ _08062CF4: movs r0, 0x1 b _08062D02 .align 2, 0 -_08062CF8: .4byte gAvailablePokemonNames +_08062CF8: .4byte gFormatBuffer_Monsters _08062CFC: .4byte gUnknown_80FE940 _08062D00: movs r0, 0 @@ -2401,7 +2401,7 @@ _08062D52: pop {r0} bx r0 .align 2, 0 -_08062D60: .4byte gFormatItems +_08062D60: .4byte gFormatBuffer_Items _08062D64: .4byte gUnknown_8106C98 thumb_func_end sub_8062CA8 @@ -3359,7 +3359,7 @@ _08063508: .4byte gUnknown_8106CAC _0806350C: .4byte gUnknown_202EE10 _08063510: .4byte gUnknown_202F2D8 _08063514: .4byte gUnknown_2027370 -_08063518: .4byte gAvailablePokemonNames +_08063518: .4byte gFormatBuffer_Monsters _0806351C: movs r0, 0x2 ands r0, r1 @@ -3472,7 +3472,7 @@ _080635D0: movs r0, 0x2 b _08063606 .align 2, 0 -_080635FC: .4byte gAvailablePokemonNames +_080635FC: .4byte gFormatBuffer_Monsters _08063600: .4byte gUnknown_80FE978 _08063604: movs r0, 0x4 @@ -3543,7 +3543,7 @@ _08063676: pop {r0} bx r0 .align 2, 0 -_0806368C: .4byte gFormatItems +_0806368C: .4byte gFormatBuffer_Items _08063690: .4byte gUnknown_202EE10 _08063694: .4byte gUnknown_8106CC4 thumb_func_end sub_8063578 @@ -4032,7 +4032,7 @@ sub_80639E4: .align 2, 0 _08063A5C: .4byte gUnknown_202F278 _08063A60: .4byte gUnknown_8106CC8 -_08063A64: .4byte gAvailablePokemonNames +_08063A64: .4byte gFormatBuffer_Monsters _08063A68: .4byte gUnknown_8106CCC _08063A6C: .4byte gUnknown_202EE10 thumb_func_end sub_80639E4 @@ -4127,7 +4127,7 @@ _08063AEC: .align 2, 0 _08063B1C: .4byte gDungeon _08063B20: .4byte 0x0001357c -_08063B24: .4byte gFormatItems +_08063B24: .4byte gFormatBuffer_Items _08063B28: .4byte 0x00000133 _08063B2C: .4byte gUnknown_80F8B40 _08063B30: @@ -4192,7 +4192,7 @@ sub_8063B54: .align 2, 0 _08063BA4: .4byte gDungeon _08063BA8: .4byte 0x0001357c -_08063BAC: .4byte gFormatItems +_08063BAC: .4byte gFormatBuffer_Items _08063BB0: .4byte 0x00000133 thumb_func_end sub_8063B54 @@ -4294,9 +4294,9 @@ _08063C5C: .align 2, 0 _08063C70: .4byte gDungeon _08063C74: .4byte 0x0001357c -_08063C78: .4byte gFormatItems +_08063C78: .4byte gFormatBuffer_Items _08063C7C: .4byte 0x00000119 -_08063C80: .4byte gFormatItems + 0x50 +_08063C80: .4byte gFormatBuffer_Items + 0x50 _08063C84: .4byte 0x00000133 thumb_func_end sub_8063BB4 @@ -4447,7 +4447,7 @@ _08063D70: .align 2, 0 _08063D98: .4byte gDungeon _08063D9C: .4byte 0x0001357c -_08063DA0: .4byte gFormatItems +_08063DA0: .4byte gFormatBuffer_Items _08063DA4: .4byte 0x00000119 _08063DA8: .4byte 0x00000133 _08063DAC: .4byte gUnknown_80F8B88 @@ -4906,7 +4906,7 @@ _08064130: b _0806414E .align 2, 0 _08064140: .4byte gUnknown_202F2D8 -_08064144: .4byte gFormatItems +_08064144: .4byte gFormatBuffer_Items _08064148: .4byte gUnknown_80FDF00 _0806414C: ldr r0, _0806415C @@ -5143,7 +5143,7 @@ _08064262: .align 2, 0 _08064304: .4byte gUnknown_202EE10 _08064308: .4byte gUnknown_202F2D8 -_0806430C: .4byte gAvailablePokemonNames +_0806430C: .4byte gFormatBuffer_Monsters thumb_func_end sub_8064228 thumb_func_start sub_8064310 @@ -9017,7 +9017,7 @@ _08066244: .align 2, 0 _08066254: .4byte gUnknown_80FEA80 _08066258: .4byte gUnknown_8106D8C -_0806625C: .4byte gAvailablePokemonNames +_0806625C: .4byte gFormatBuffer_Monsters _08066260: ldr r0, _08066284 ldr r2, [r0] @@ -9130,7 +9130,7 @@ _0806633E: bx r1 .align 2, 0 _08066348: .4byte gUnknown_8106D8C -_0806634C: .4byte gAvailablePokemonNames +_0806634C: .4byte gFormatBuffer_Monsters _08066350: .4byte gUnknown_203B084 _08066354: .4byte gUnknown_202F2F8 thumb_func_end sub_8066288 @@ -9232,7 +9232,7 @@ _0806641A: bx r1 .align 2, 0 _08066424: .4byte gUnknown_8106D8C -_08066428: .4byte gAvailablePokemonNames +_08066428: .4byte gFormatBuffer_Monsters _0806642C: .4byte gUnknown_203B080 _08066430: .4byte gUnknown_202F2F8 thumb_func_end sub_8066358 diff --git a/asm/code_805D8C8_1.s b/asm/code_805D8C8_1.s index 7e850607d..c8b821026 100644 --- a/asm/code_805D8C8_1.s +++ b/asm/code_805D8C8_1.s @@ -240,7 +240,7 @@ _08068AB2: .align 2, 0 _08068AE0: .4byte gRecruitedPokemonRef _08068AE4: .4byte 0x00008df8 -_08068AE8: .4byte gAvailablePokemonNames +_08068AE8: .4byte gFormatBuffer_Monsters _08068AEC: .4byte gUnknown_80FE0F4 _08068AF0: cmp r0, 0x47 @@ -310,7 +310,7 @@ _08068B3E: _08068B6C: .4byte gRecruitedPokemonRef _08068B70: .4byte 0x00008df8 _08068B74: .4byte 0x000055aa -_08068B78: .4byte gAvailablePokemonNames +_08068B78: .4byte gFormatBuffer_Monsters _08068B7C: .4byte gUnknown_80FE134 _08068B80: adds r5, 0x1 @@ -326,7 +326,7 @@ _08068B80: ldr r0, _08068BA0 b _08068BB2 .align 2, 0 -_08068B9C: .4byte gAvailablePokemonNames +_08068B9C: .4byte gFormatBuffer_Monsters _08068BA0: .4byte gUnknown_80FE0F4 _08068BA4: cmp r0, 0x47 @@ -690,7 +690,7 @@ _08068E52: movs r0, 0x1 b _08068E82 .align 2, 0 -_08068E78: .4byte gFormatItems +_08068E78: .4byte gFormatBuffer_Items _08068E7C: .4byte gUnknown_80FE1A4 _08068E80: movs r0, 0 diff --git a/asm/code_8066D04.s b/asm/code_8066D04.s index 8dd5f5b3e..c2de119cc 100644 --- a/asm/code_8066D04.s +++ b/asm/code_8066D04.s @@ -54,7 +54,7 @@ _08066E54: ldr r0, _08066E7C b _08066F1E .align 2, 0 -_08066E78: .4byte gFormatItems +_08066E78: .4byte gFormatBuffer_Items _08066E7C: .4byte gUnknown_80F8BE0 _08066E80: ldr r1, [sp, 0x8] @@ -73,7 +73,7 @@ _08066E80: ldr r0, _08066EA4 b _08066F1E .align 2, 0 -_08066EA0: .4byte gFormatItems + 0x50 +_08066EA0: .4byte gFormatBuffer_Items + 0x50 _08066EA4: .4byte gItemStickyCannotMove3 _08066EA8: mov r2, r9 @@ -185,7 +185,7 @@ _08066F7E: pop {r0} bx r0 .align 2, 0 -_08066F90: .4byte gFormatItems +_08066F90: .4byte gFormatBuffer_Items _08066F94: .4byte 0x0000014d _08066F98: .4byte gSwappedGroundItem _08066F9C: .4byte gDungeon @@ -236,7 +236,7 @@ sub_8066FA4: ldr r0, _08067004 b _0806709E .align 2, 0 -_08067000: .4byte gFormatItems +_08067000: .4byte gFormatBuffer_Items _08067004: .4byte gItemStickyCannotMove3 _08067008: mov r0, r9 @@ -317,7 +317,7 @@ _0806709E: bl TryDisplayDungeonLoggableMessage b _080670EE .align 2, 0 -_080670A8: .4byte gFormatItems + 0x50 +_080670A8: .4byte gFormatBuffer_Items + 0x50 _080670AC: .4byte 0xffffff00 _080670B0: .4byte gNothingCanBePutDownHere _080670B4: @@ -421,8 +421,8 @@ _08067188: pop {r0} bx r0 .align 2, 0 -_08067190: .4byte gFormatItems -_08067194: .4byte gAvailablePokemonNames +_08067190: .4byte gFormatBuffer_Items +_08067194: .4byte gFormatBuffer_Monsters _08067198: .4byte gDungeon _0806719C: .4byte 0x00003a08 thumb_func_end sub_8067110 @@ -459,7 +459,7 @@ sub_80671A0: ldr r0, _080671E4 b _08067230 .align 2, 0 -_080671E0: .4byte gFormatItems +_080671E0: .4byte gFormatBuffer_Items _080671E4: .4byte gUnknown_80F8BE0 _080671E8: ldrb r0, [r4, 0x2] @@ -485,7 +485,7 @@ _08067202: ldr r0, _0806721C b _08067230 .align 2, 0 -_08067218: .4byte gFormatItems +_08067218: .4byte gFormatBuffer_Items _0806721C: .4byte gUnknown_80F8BE0 _08067220: adds r0, r6, 0 @@ -680,8 +680,8 @@ _08067384: bl TryDisplayDungeonLoggableMessage b _080673C6 .align 2, 0 -_080673B0: .4byte gFormatItems -_080673B4: .4byte gAvailablePokemonNames +_080673B0: .4byte gFormatBuffer_Items +_080673B4: .4byte gFormatBuffer_Monsters _080673B8: .4byte gMonThrewItem2 _080673BC: ldr r0, _080673F8 @@ -976,7 +976,7 @@ _08067600: movs r0, 0 b _08067716 .align 2, 0 -_08067608: .4byte gAvailablePokemonNames +_08067608: .4byte gFormatBuffer_Monsters _0806760C: .4byte gUnknown_80FE008 _08067610: adds r0, r6, 0x4 @@ -1224,7 +1224,7 @@ _080677B4: ldr r0, _08067808 b _08067832 .align 2, 0 -_080677F0: .4byte gAvailablePokemonNames +_080677F0: .4byte gFormatBuffer_Monsters _080677F4: .4byte gSayFarewellQ _080677F8: .4byte gUnknown_80F913C _080677FC: .4byte gRecruitedPokemonRef @@ -1285,7 +1285,7 @@ _0806786C: .align 2, 0 _08067874: .4byte gSendMonBackWithItemQ _08067878: .4byte gMonWentBack -_0806787C: .4byte gAvailablePokemonNames +_0806787C: .4byte gFormatBuffer_Monsters _08067880: .4byte 0x0000021d thumb_func_end sub_8067794 @@ -1385,7 +1385,7 @@ sub_8067904: b _08067962 .align 2, 0 _08067940: .4byte gUnknown_202F208 -_08067944: .4byte gAvailablePokemonNames +_08067944: .4byte gFormatBuffer_Monsters _08067948: .4byte gMonCringing _0806794C: adds r0, r6, 0 @@ -1404,7 +1404,7 @@ _08067962: bl TryDisplayDungeonLoggableMessage b _08067A56 .align 2, 0 -_0806796C: .4byte gAvailablePokemonNames +_0806796C: .4byte gFormatBuffer_Monsters _08067970: .4byte gMonParalyzed _08067974: movs r0, 0xB0 @@ -2130,7 +2130,7 @@ sub_8067F00: mov r10, r1 b _08067FF6 .align 2, 0 -_08067F44: .4byte gAvailablePokemonNames +_08067F44: .4byte gFormatBuffer_Monsters _08067F48: .4byte gUnknown_8106E28 _08067F4C: ldr r4, _08067F8C @@ -2162,9 +2162,9 @@ _08067F4C: bl strcpy b _08067FA4 .align 2, 0 -_08067F8C: .4byte gAvailablePokemonNames -_08067F90: .4byte gFormatData_202DE30 -_08067F94: .4byte gFormatItems +_08067F8C: .4byte gFormatBuffer_Monsters +_08067F90: .4byte gFormatArgs +_08067F94: .4byte gFormatBuffer_Items _08067F98: .4byte gUnknown_8106E2C _08067F9C: ldr r0, _08067FCC @@ -2191,7 +2191,7 @@ _08067FA4: bl PrintFormatStringOnWindow b _08067FE6 .align 2, 0 -_08067FCC: .4byte gFormatItems +_08067FCC: .4byte gFormatBuffer_Items _08067FD0: .4byte gUnknown_8106E30 _08067FD4: .4byte gUnknown_8106E34 _08067FD8: @@ -2262,7 +2262,7 @@ _0806804C: pop {r0} bx r0 .align 2, 0 -_08068064: .4byte gFormatData_202DE30 +_08068064: .4byte gFormatArgs _08068068: .4byte gUnknown_8106E6C thumb_func_end sub_8067F00 diff --git a/asm/code_8069E0C.s b/asm/code_8069E0C.s index d0e63154f..fc6d11927 100644 --- a/asm/code_8069E0C.s +++ b/asm/code_8069E0C.s @@ -579,7 +579,7 @@ _0806A818: mov r0, sp b _0806A836 .align 2, 0 -_0806A828: .4byte gAvailablePokemonNames +_0806A828: .4byte gFormatBuffer_Monsters _0806A82C: adds r1, 0x1 cmp r1, r9 @@ -634,7 +634,7 @@ _0806A87A: pop {r0} bx r0 .align 2, 0 -_0806A890: .4byte gFormatItems +_0806A890: .4byte gFormatBuffer_Items _0806A894: .4byte gUnknown_80FEAC4 thumb_func_end sub_806A7E8 diff --git a/asm/code_806E8B0.s b/asm/code_806E8B0.s index 1f95989e2..a155a5157 100644 --- a/asm/code_806E8B0.s +++ b/asm/code_806E8B0.s @@ -702,7 +702,7 @@ _0806F098: .4byte gDungeon _0806F09C: .4byte 0x00000ccc _0806F0A0: .4byte gUnknown_8106F24 _0806F0A4: .4byte gUnknown_8106F04 -_0806F0A8: .4byte gAvailablePokemonNames + 0x50 +_0806F0A8: .4byte gFormatBuffer_Monsters + 0x50 _0806F0AC: .4byte gUnknown_80FAE00 _0806F0B0: ldr r0, _0806F15C diff --git a/asm/code_80718D8.s b/asm/code_80718D8.s index 1fda8adc4..32972ad78 100644 --- a/asm/code_80718D8.s +++ b/asm/code_80718D8.s @@ -178,8 +178,8 @@ _08072894: bl DisplayDungeonLoggableMessage b _08072928 .align 2, 0 -_080728C8: .4byte gAvailablePokemonNames -_080728CC: .4byte gFormatItems +_080728C8: .4byte gFormatBuffer_Monsters +_080728CC: .4byte gFormatBuffer_Items _080728D0: .4byte gUnknown_80F9F04 _080728D4: mov r1, r8 @@ -373,8 +373,8 @@ _08072A0C: bl DisplayDungeonLoggableMessage b _08072A8C .align 2, 0 -_08072A44: .4byte gAvailablePokemonNames -_08072A48: .4byte gFormatItems +_08072A44: .4byte gFormatBuffer_Monsters +_08072A48: .4byte gFormatBuffer_Items _08072A4C: .4byte gUnknown_80F9F04 _08072A50: movs r0, 0 @@ -434,7 +434,7 @@ _08072AB0: pop {r1} bx r1 .align 2, 0 -_08072AC0: .4byte gAvailablePokemonNames +_08072AC0: .4byte gFormatBuffer_Monsters _08072AC4: .4byte gUnknown_80F9F2C thumb_func_end sub_8072938 diff --git a/asm/code_8072CF4.s b/asm/code_8072CF4.s index 305f13b9a..b1f3b13b7 100644 --- a/asm/code_8072CF4.s +++ b/asm/code_8072CF4.s @@ -171,7 +171,7 @@ _080733FC: b _08073456 .align 2, 0 _08073434: .4byte 0x00000147 -_08073438: .4byte gAvailablePokemonNames +_08073438: .4byte gFormatBuffer_Monsters _0807343C: .4byte gUnknown_80FCF38 _08073440: adds r0, r5, 0x4 @@ -408,7 +408,7 @@ _080735EE: pop {r0} bx r0 .align 2, 0 -_08073600: .4byte gAvailablePokemonNames +_08073600: .4byte gFormatBuffer_Monsters _08073604: .4byte gUnknown_80FCF50 _08073608: .4byte 0x00000165 thumb_func_end sub_807348C diff --git a/asm/code_807CD9C.s b/asm/code_807CD9C.s index 40d18888a..391f34e32 100644 --- a/asm/code_807CD9C.s +++ b/asm/code_807CD9C.s @@ -651,7 +651,7 @@ sub_807DA14: ldr r0, _0807DA4C b _0807DA5C .align 2, 0 -_0807DA48: .4byte gAvailablePokemonNames +_0807DA48: .4byte gFormatBuffer_Monsters _0807DA4C: .4byte gUnknown_80FCB98 _0807DA50: bl IsCurrentFixedRoomBossFight @@ -1321,7 +1321,7 @@ _0807DF8E: .align 2, 0 _0807DFA8: .4byte gDungeon _0807DFAC: .4byte 0x000135cc -_0807DFB0: .4byte gAvailablePokemonNames +_0807DFB0: .4byte gFormatBuffer_Monsters _0807DFB4: mov r0, r10 bl GetApparentWeather @@ -1552,7 +1552,7 @@ _0807E174: pop {r0} bx r0 .align 2, 0 -_0807E184: .4byte gAvailablePokemonNames +_0807E184: .4byte gFormatBuffer_Monsters _0807E188: .4byte gUnknown_80F96BC _0807E18C: .4byte gUnknown_8107178 _0807E190: .4byte 0xffff0000 diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index 29e0b4e27..af8aa17e5 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -257,7 +257,7 @@ _0807E866: _0807E874: .4byte gDungeon _0807E878: .4byte 0x000181f8 _0807E87C: .4byte 0x0001356c -_0807E880: .4byte gAvailablePokemonNames +_0807E880: .4byte gFormatBuffer_Monsters _0807E884: .4byte gUnknown_80FC5E0 _0807E888: .4byte 0x000135cc thumb_func_end sub_807E7FC @@ -1392,7 +1392,7 @@ _0807F158: _0807F168: .4byte gDungeon _0807F16C: .4byte 0xffff0000 _0807F170: .4byte 0xff00ffff -_0807F174: .4byte gFormatData_202DE30 +_0807F174: .4byte gFormatArgs _0807F178: .4byte gUnknown_80FE5C0 _0807F17C: .4byte 0x0000068c _0807F180: .4byte 0x0000e240 @@ -1451,7 +1451,7 @@ _0807F1EC: .4byte 0xffff0000 _0807F1F0: .4byte 0xff00ffff _0807F1F4: .4byte gDungeon _0807F1F8: .4byte 0x00000694 -_0807F1FC: .4byte gFormatData_202DE30 +_0807F1FC: .4byte gFormatArgs _0807F200: .4byte gUnknown_80FE568 _0807F204: ldr r0, _0807F224 @@ -1752,7 +1752,7 @@ sub_807F43C: ldr r0, _0807F46C b _0807F694 .align 2, 0 -_0807F468: .4byte gAvailablePokemonNames +_0807F468: .4byte gFormatBuffer_Monsters _0807F46C: .4byte gUnknown_80FCB40 _0807F470: ldr r0, [sp, 0xEC] @@ -1767,7 +1767,7 @@ _0807F470: mov r0, r8 b _0807F698 .align 2, 0 -_0807F488: .4byte gAvailablePokemonNames +_0807F488: .4byte gFormatBuffer_Monsters _0807F48C: .4byte gUnknown_80FCB70 _0807F490: mov r1, r8 @@ -2249,7 +2249,7 @@ _0807F7FC: bl sub_807F9BC b _0807F99C .align 2, 0 -_0807F860: .4byte gAvailablePokemonNames +_0807F860: .4byte gFormatBuffer_Monsters _0807F864: .4byte gUnknown_80FE690 _0807F868: .4byte 0x000001a3 _0807F86C: .4byte gAdjacentTileOffsets diff --git a/asm/code_808417C.s b/asm/code_808417C.s index b1eda6474..f105d3a3f 100644 --- a/asm/code_808417C.s +++ b/asm/code_808417C.s @@ -336,7 +336,7 @@ sub_8084448: ldr r0, _08084480 b _080844F0 .align 2, 0 -_0808447C: .4byte gAvailablePokemonNames +_0808447C: .4byte gFormatBuffer_Monsters _08084480: .4byte gUnknown_80FA464 _08084484: ldr r4, _080844FC @@ -405,7 +405,7 @@ _080844F0: _080844FC: .4byte gDungeon _08084500: .4byte 0x0000068a _08084504: .4byte gUnknown_80FA32C -_08084508: .4byte gFormatItems +_08084508: .4byte gFormatBuffer_Items _0808450C: .4byte gTeamInventoryRef _08084510: .4byte gUnknown_80FA448 _08084514: @@ -530,7 +530,7 @@ sub_80845E0: ldr r0, _08084624 b _080846B4 .align 2, 0 -_08084620: .4byte gAvailablePokemonNames +_08084620: .4byte gFormatBuffer_Monsters _08084624: .4byte gUnknown_80FA530 _08084628: adds r7, r4, 0 @@ -594,7 +594,7 @@ _08084680: ldr r0, _080846A0 b _080846B4 .align 2, 0 -_0808469C: .4byte gAvailablePokemonNames + 160 +_0808469C: .4byte gFormatBuffer_Monsters + 160 _080846A0: .4byte gUnknown_80FA54C _080846A4: adds r0, r6, 0 diff --git a/asm/code_809A560.s b/asm/code_809A560.s index 878a73988..695ddcf56 100644 --- a/asm/code_809A560.s +++ b/asm/code_809A560.s @@ -289,9 +289,9 @@ _0809AAE6: movs r0, 0x1 b _0809AB3C .align 2, 0 -_0809AB28: .4byte gAvailablePokemonNames +_0809AB28: .4byte gFormatBuffer_Monsters _0809AB2C: .4byte gUndefineText -_0809AB30: .4byte gPlayerName +_0809AB30: .4byte gFormatBuffer_Names _0809AB34: mov r0, r9 bl sub_809A83C @@ -352,8 +352,8 @@ _0809ABA0: pop {r1} bx r1 .align 2, 0 -_0809ABA8: .4byte gAvailablePokemonNames -_0809ABAC: .4byte gPlayerName +_0809ABA8: .4byte gFormatBuffer_Monsters +_0809ABAC: .4byte gFormatBuffer_Names _0809ABB0: .4byte gSpeechBubbleChar thumb_func_end sub_809AB4C @@ -403,8 +403,8 @@ _0809AC0A: pop {r1} bx r1 .align 2, 0 -_0809AC10: .4byte gAvailablePokemonNames -_0809AC14: .4byte gPlayerName +_0809AC10: .4byte gFormatBuffer_Monsters +_0809AC14: .4byte gFormatBuffer_Names thumb_func_end sub_809ABB4 thumb_func_start sub_809AC18 @@ -453,8 +453,8 @@ _0809AC6E: pop {r1} bx r1 .align 2, 0 -_0809AC74: .4byte gAvailablePokemonNames -_0809AC78: .4byte gPlayerName +_0809AC74: .4byte gFormatBuffer_Monsters +_0809AC78: .4byte gFormatBuffer_Names thumb_func_end sub_809AC18 thumb_func_start sub_809AC7C @@ -1096,7 +1096,7 @@ _0809B128: .align 2, 0 _0809B134: .4byte gUnknown_202E5D8 _0809B138: .4byte gUnknown_8116188 -_0809B13C: .4byte gPlayerName +_0809B13C: .4byte gFormatBuffer_Names _0809B140: .4byte sub_809B428 _0809B144: .4byte gUnknown_8116148 _0809B148: @@ -1449,7 +1449,7 @@ _0809B3C0: .align 2, 0 _0809B3D0: .4byte gUnknown_202E5D8 _0809B3D4: .4byte gUnknown_8116188 -_0809B3D8: .4byte gPlayerName +_0809B3D8: .4byte gFormatBuffer_Names _0809B3DC: .4byte gUnknown_3001B64 _0809B3E0: .4byte gUnknown_8116190 _0809B3E4: .4byte sub_809B428 @@ -3272,7 +3272,7 @@ _0809C2CA: b _0809C318 .align 2, 0 _0809C304: .4byte gTeamInventoryRef -_0809C308: .4byte gFormatItems +_0809C308: .4byte gFormatBuffer_Items _0809C30C: ldr r0, [r6] movs r3, 0x86 diff --git a/asm/code_809C5C4.s b/asm/code_809C5C4.s index 5dcc2f747..5e120a8dd 100644 --- a/asm/code_809C5C4.s +++ b/asm/code_809C5C4.s @@ -107,7 +107,7 @@ _0809CC82: pop {r1} bx r1 .align 2, 0 -_0809CC8C: .4byte gFormatItems +_0809CC8C: .4byte gFormatBuffer_Items thumb_func_end sub_809CBBC thumb_func_start sub_809CC90 diff --git a/asm/dungeon_2.s b/asm/dungeon_2.s index 0053e15c0..a03cfca46 100644 --- a/asm/dungeon_2.s +++ b/asm/dungeon_2.s @@ -103,7 +103,7 @@ _080903F2: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString b _08090430 .align 2, 0 _0809040C: .4byte gUnknown_8108F40 @@ -119,7 +119,7 @@ _0809041C: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString _08090430: adds r0, r7, 0 mov r1, sp @@ -147,7 +147,7 @@ _0809043C: ldr r0, _08090470 b _08090476 .align 2, 0 -_08090464: .4byte gFormatData_202DE30 +_08090464: .4byte gFormatArgs _08090468: .4byte gUnknown_81159DC _0809046C: .4byte gDungeons _08090470: .4byte gUnknown_8115A80 @@ -158,7 +158,7 @@ _08090476: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -180,7 +180,7 @@ _0809048E: b _080904BA .align 2, 0 _080904AC: .4byte gUnknown_8115ADC -_080904B0: .4byte gAvailablePokemonNames +_080904B0: .4byte gFormatBuffer_Monsters _080904B4: .4byte gUnknown_8115B3C _080904B8: ldr r0, _08090528 @@ -189,7 +189,7 @@ _080904BA: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -250,7 +250,7 @@ _08090536: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -323,7 +323,7 @@ _080905D0: .4byte gUnknown_8115C4C _080905D4: .4byte gUnknown_8108F42 _080905D8: .4byte gUnknown_8108F4A _080905DC: .4byte gDungeons -_080905E0: .4byte gFormatItems +_080905E0: .4byte gFormatBuffer_Items _080905E4: .4byte gUnknown_8115CB8 _080905E8: ldr r0, _080906A0 @@ -332,7 +332,7 @@ _080905EA: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 @@ -432,7 +432,7 @@ _080906B6: mov r1, sp add r2, sp, 0xC8 movs r3, 0 - bl xxx_format_string + bl CopyFormatString adds r0, r7, 0 mov r1, sp bl sub_8090888 diff --git a/asm/ground_script.s b/asm/ground_script.s index 39a16b3af..23f75bf91 100644 --- a/asm/ground_script.s +++ b/asm/ground_script.s @@ -492,7 +492,7 @@ _080A1968: .align 2, 0 _080A1970: .4byte gUnknown_8116710 _080A1974: .4byte gUnknown_2039D98 -_080A1978: .4byte gPlayerName +_080A1978: .4byte gFormatBuffer_Names _080A197C: ldr r0, _080A1984 movs r1, 0x53 @@ -608,7 +608,7 @@ _080A1A52: .align 2, 0 _080A1A64: .4byte gUnknown_8116760 _080A1A68: .4byte gUnknown_2039D98 -_080A1A6C: .4byte gPlayerName +_080A1A6C: .4byte gFormatBuffer_Names _080A1A70: movs r0, 0x9E movs r1, 0x1 @@ -1023,7 +1023,7 @@ _080A1DA8: .align 2, 0 _080A1DE0: .4byte 0x000001a3 _080A1DE4: .4byte 0x0000019b -_080A1DE8: .4byte gUnknown_202E628 +_080A1DE8: .4byte gFormatBuffer_FriendArea _080A1DEC: movs r0, 0 movs r1, 0x1F @@ -1053,7 +1053,7 @@ _080A1E14: bne _080A1EBE b _080A203C .align 2, 0 -_080A1E2C: .4byte gUnknown_202E628 +_080A1E2C: .4byte gFormatBuffer_FriendArea _080A1E30: ldr r0, _080A1E38 movs r1, 0x20 @@ -1126,7 +1126,7 @@ _080A1EBE: movs r0, 0x1 b _080A236C .align 2, 0 -_080A1EC4: .4byte gUnknown_202E628 +_080A1EC4: .4byte gFormatBuffer_FriendArea _080A1EC8: .4byte gUnknown_81167E8 _080A1ECC: .4byte gUnknown_2039D98 _080A1ED0: @@ -1171,7 +1171,7 @@ _080A1F28: bl AddToTeamMoney b _080A236A .align 2, 0 -_080A1F30: .4byte gFormatItems +_080A1F30: .4byte gFormatBuffer_Items _080A1F34: .4byte gUnknown_81167EC _080A1F38: .4byte 0x00002710 _080A1F3C: diff --git a/asm/pokemon_3.s b/asm/pokemon_3.s index 3b4300ce4..d2c796c17 100644 --- a/asm/pokemon_3.s +++ b/asm/pokemon_3.s @@ -128,7 +128,7 @@ _0808F874: ldr r0, [r0] mov pc, r0 .align 2, 0 -_0808F880: .4byte gAvailablePokemonNames +_0808F880: .4byte gFormatBuffer_Monsters _0808F884: .4byte _0808F888 .align 2, 0 _0808F888: @@ -258,7 +258,7 @@ _0808F964: b _0808F9D8 .align 2, 0 _0808F998: .4byte gUnknown_8107754 -_0808F99C: .4byte gFormatData_202DE30 +_0808F99C: .4byte gFormatArgs _0808F9A0: .4byte gLevel810DD6C_Ptr _0808F9A4: .4byte gExpPts810DD9C_Ptr _0808F9A8: .4byte gUnknown_810DDB8 @@ -335,7 +335,7 @@ _0808FA0E: _0808FA44: .4byte gUnknown_810DE38 _0808FA48: .4byte gUnknown_810DDFC _0808FA4C: .4byte gUnknown_810DE24 -_0808FA50: .4byte gFormatData_202DE30 +_0808FA50: .4byte gFormatArgs _0808FA54: .4byte gUnknown_810DE28 _0808FA58: .4byte gUnknown_810DE54 _0808FA5C: @@ -367,7 +367,7 @@ _0808FA74: b _0808FAA6 .align 2, 0 _0808FA94: .4byte gUnknown_810DE50 -_0808FA98: .4byte gFormatItems +_0808FA98: .4byte gFormatBuffer_Items _0808FA9C: ldr r0, _0808FB24 ldr r1, _0808FB28 @@ -435,12 +435,12 @@ _0808FB10: str r4, [sp] b _0808FECC .align 2, 0 -_0808FB24: .4byte gFormatItems +_0808FB24: .4byte gFormatBuffer_Items _0808FB28: .4byte gUnknown_810DE58 _0808FB2C: .4byte gUnknown_810DE6C -_0808FB30: .4byte gFormatData_202DE30 +_0808FB30: .4byte gFormatArgs _0808FB34: .4byte gUnknown_8115718 -_0808FB38: .4byte gAvailablePokemonNames +_0808FB38: .4byte gFormatBuffer_Monsters _0808FB3C: .4byte gUnknown_810DE80 _0808FB40: .4byte gUnknown_810DE98 _0808FB44: @@ -611,7 +611,7 @@ _0808FC96: b _0808FD98 .align 2, 0 _0808FCA0: .4byte gStatusNames -_0808FCA4: .4byte gFormatItems + 0x50 +_0808FCA4: .4byte gFormatBuffer_Items + 0x50 _0808FCA8: .4byte gUnknown_8107784 _0808FCAC: .4byte gUnknown_810DF78 _0808FCB0: @@ -680,7 +680,7 @@ _0808FCFC: bl strcpy b _0808FD4E .align 2, 0 -_0808FD3C: .4byte gFormatItems + 0x50 +_0808FD3C: .4byte gFormatBuffer_Items + 0x50 _0808FD40: .4byte gUnknown_8107788 _0808FD44: adds r0, r6, 0 @@ -883,10 +883,10 @@ _0808FED6: bx r0 .align 2, 0 _0808FEEC: .4byte gUnknown_8107798 -_0808FEF0: .4byte gAvailablePokemonNames -_0808FEF4: .4byte gFormatData_202DE30 +_0808FEF0: .4byte gFormatBuffer_Monsters +_0808FEF4: .4byte gFormatArgs _0808FEF8: .4byte gUnknown_810DEB4 -_0808FEFC: .4byte gFormatItems +_0808FEFC: .4byte gFormatBuffer_Items _0808FF00: .4byte gUnknown_810DEC8 _0808FF04: .4byte gUnknown_810DEDC _0808FF08: .4byte gUnknown_810DFB4 diff --git a/include/string_format.h b/include/string_format.h index d701b14f8..c274d8857 100644 --- a/include/string_format.h +++ b/include/string_format.h @@ -41,12 +41,12 @@ struct MonPortraitMsg #define FORMAT_BUFFER_LEN 80 #define FRIEND_AREA_BUFFER_LEN 184 -extern s32 gFormatData_202DE30[10]; -extern u8 gFormatItems[4][FORMAT_BUFFER_LEN]; -extern u8 gAvailablePokemonNames[10][FORMAT_BUFFER_LEN]; -extern u8 gPlayerName[10][FORMAT_BUFFER_LEN]; +extern s32 gFormatArgs[10]; +extern u8 gFormatBuffer_Items[4][FORMAT_BUFFER_LEN]; +extern u8 gFormatBuffer_Monsters[10][FORMAT_BUFFER_LEN]; +extern u8 gFormatBuffer_Names[10][FORMAT_BUFFER_LEN]; extern u8 gUnknown_202E5D8[FORMAT_BUFFER_LEN]; -extern u8 gUnknown_202E628[FRIEND_AREA_BUFFER_LEN]; +extern u8 gFormatBuffer_FriendArea[FRIEND_AREA_BUFFER_LEN]; void sub_8014144(void); void sub_801416C(s32 param_1,s32 param_2); @@ -57,7 +57,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me void sub_8014490(void); s32 sub_80144A4(s32 *a0); void DrawDialogueBoxString(void); -const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags); +const u8 *CopyFormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags); void PrintFormatStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr); void PrintFormatStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing); diff --git a/src/adventure_log.c b/src/adventure_log.c index b57f1deba..455071297 100644 --- a/src/adventure_log.c +++ b/src/adventure_log.c @@ -108,32 +108,32 @@ static void DisplayAdventureLog(void) switch (temp) { case 12: v1 = sub_80978B8(); - gFormatData_202DE30[0] = (s16)v1; + gFormatArgs[0] = (s16)v1; PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); break; case 7: v2 = sub_8097880(); - gFormatData_202DE30[0] = (s16)v2; + gFormatArgs[0] = (s16)v2; PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); break; case 11: v3 = sub_8097838(); - gFormatData_202DE30[0] = (s16)v3; + gFormatArgs[0] = (s16)v3; PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); break; case 8: v4 = sub_80977B8(); - gFormatData_202DE30[0] = v4; + gFormatArgs[0] = v4; PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); break; case 9: v5 = sub_80977F8(); - gFormatData_202DE30[0] = v5; + gFormatArgs[0] = v5; PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); break; case 10: v6 = sub_8097870(); - gFormatData_202DE30[0] = (s16)v6; + gFormatArgs[0] = (s16)v6; // fallthrough default: PrintFormatStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0); diff --git a/src/code_8015080.c b/src/code_8015080.c index b43f87000..92a4214fd 100644 --- a/src/code_8015080.c +++ b/src/code_8015080.c @@ -64,7 +64,7 @@ bool8 sub_8015080(u8 *buffer, const MenuItem *menuItems) ResetUnusedInputStruct(); xxx_call_save_unk_text_struct_800641C(gUnknown_203B1F8->unk54, 1, 1); sub_80073B8(0); - xxx_format_string(buffer, gUnknown_203B1F8->buffer, gUnknown_203B1F8->buffer + 0x400, 0); + CopyFormatString(buffer, gUnknown_203B1F8->buffer, gUnknown_203B1F8->buffer + 0x400, 0); PrintStringOnWindow(4, 4, gUnknown_203B1F8->buffer, 0, 0); sub_80073E0(0); sub_8012D60(&gUnknown_203B1F8->unk4, menuItems, 0, 0, -1, 2); diff --git a/src/code_801602C.c b/src/code_801602C.c index 3205e3725..8bfef832a 100644 --- a/src/code_801602C.c +++ b/src/code_801602C.c @@ -103,9 +103,9 @@ static void sub_8016110(void) case CONFIRM_NAME_MENU_PROMPT: BuildConfirmNameMenu(); if (sUnknown_203B200->unk4 == 1) - sub_80922B4(gAvailablePokemonNames[0], sUnknown_203B200->pokeName, POKEMON_NAME_LENGTH); + sub_80922B4(gFormatBuffer_Monsters[0], sUnknown_203B200->pokeName, POKEMON_NAME_LENGTH); else - sub_80922B4(gAvailablePokemonNames[0], sUnknown_203B200->pokeName, POKEMON_NAME_LENGTH); + sub_80922B4(gFormatBuffer_Monsters[0], sUnknown_203B200->pokeName, POKEMON_NAME_LENGTH); CreateMenuDialogueBoxAndPortrait(sIsNameOKPrompt, 0, 3, sUnknown_203B200->menus, 0, 4, 0, NULL, 32); break; diff --git a/src/code_801AFA4.c b/src/code_801AFA4.c index a38a27fc4..be210b9d1 100644 --- a/src/code_801AFA4.c +++ b/src/code_801AFA4.c @@ -29,7 +29,7 @@ bool8 sub_801AFA4(u32 index) sUnknown_203B22C->teamItemIndex = index; sUnknown_203B22C->id = gTeamInventoryRef->teamItems[index].id; sUnknown_203B22C->moveID = GetItemMoveID(sUnknown_203B22C->id); - sub_8092C84(gAvailablePokemonNames[7], sUnknown_203B22C->moveID); + sub_8092C84(gFormatBuffer_Monsters[7], sUnknown_203B22C->moveID); sub_8099690(0); if (GetNumMonsAbleToLearnItemMove() == 0) @@ -112,7 +112,7 @@ static void sub_801B178(void) u8 *bufferPtr; for (monIndex = 0; monIndex < sUnknown_203B22C->monsAbleToLearnMove; monIndex++) { - bufferPtr = gAvailablePokemonNames[monIndex]; + bufferPtr = gFormatBuffer_Monsters[monIndex]; PrintPokeNameToBuffer(bufferPtr, &gRecruitedPokemonRef->pokemon[sUnknown_203B22C->unk50[monIndex]]); sUnknown_203B22C->menuItems[monIndex].text = bufferPtr; sUnknown_203B22C->menuItems[monIndex].menuAction = monIndex + 4; @@ -139,7 +139,7 @@ static void sub_801B200(void) default: sUnknown_203B22C->chosenPokemon = sUnknown_203B22C->unk50[temp - 4]; sUnknown_203B22C->pokeStruct = &gRecruitedPokemonRef->pokemon[sUnknown_203B22C->chosenPokemon]; - PrintPokeNameToBuffer(gAvailablePokemonNames[8], sUnknown_203B22C->pokeStruct); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[8], sUnknown_203B22C->pokeStruct); unk_CopyMoves4To8(sUnknown_203B22C->moves, sUnknown_203B22C->pokeStruct->moves); for (moveIndex = 0; moveIndex < MAX_MON_MOVES * 2; moveIndex++) { diff --git a/src/code_801B3C0.c b/src/code_801B3C0.c index 0237cfeb6..f5fc7c95f 100644 --- a/src/code_801B3C0.c +++ b/src/code_801B3C0.c @@ -81,7 +81,7 @@ static void sub_801B480(void) CallPrepareTextbox_8008C54(sUnknown_203B230->unk24); sub_80073B8(sUnknown_203B230->unk24); preload = sUnknown_203B230->unk10[sUnknown_203B230->unk8]; - strcpy(gAvailablePokemonNames[0], preload->pokeName); + strcpy(gFormatBuffer_Monsters[0], preload->pokeName); PrintFormatStringOnWindow(16, 0, sFmtPkmn0, sUnknown_203B230->unk24, 0); // {POKEMON_0} PrintFormatStringOnWindow(4, 16, sUnknown_203B230->unk10[sUnknown_203B230->unk8]->unk4, sUnknown_203B230->unk24, 0); sub_80073E0(sUnknown_203B230->unk24); diff --git a/src/code_801B60C.c b/src/code_801B60C.c index 5e005f2a5..985e814e8 100644 --- a/src/code_801B60C.c +++ b/src/code_801B60C.c @@ -55,8 +55,8 @@ bool8 sub_801B60C(u32 r0, u8 id, u8 quantity) sUnknown_203B234->unk14.unk0 = 0; sUnknown_203B234->unk14.unk4 = 0; sUnknown_203B234->unk14.unk8 = 1; - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0], GetPlayerPokemonStruct(), COLOR_YELLOW); - sub_8090E14(gFormatItems[0], &sUnknown_203B234->unk10, &sUnknown_203B234->unk14); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0], GetPlayerPokemonStruct(), COLOR_YELLOW); + sub_8090E14(gFormatBuffer_Items[0], &sUnknown_203B234->unk10, &sUnknown_203B234->unk14); sub_801B748(0); return TRUE; } @@ -385,13 +385,13 @@ static void sub_801BCCC(void) case 3: sUnknown_203B234->unk24 = sub_801A8AC(); sUnknown_203B234->unk20 = gTeamInventoryRef->teamItems[sUnknown_203B234->unk24]; - sub_8090E14(gFormatItems[1], &sUnknown_203B234->unk20, &sUnknown_203B234->unk14); + sub_8090E14(gFormatBuffer_Items[1], &sUnknown_203B234->unk20, &sUnknown_203B234->unk14); sub_801B748(10); break; case 4: sUnknown_203B234->unk24 = sub_801A8AC(); sUnknown_203B234->unk20 = gTeamInventoryRef->teamItems[sUnknown_203B234->unk24]; - sub_8090E14(gFormatItems[1], &sUnknown_203B234->unk20, &sUnknown_203B234->unk14); + sub_8090E14(gFormatBuffer_Items[1], &sUnknown_203B234->unk20, &sUnknown_203B234->unk14); sub_8099690(0); sub_801B748(11); break; diff --git a/src/code_801D014.c b/src/code_801D014.c index 3383cbf79..2bfa19c5a 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -246,8 +246,8 @@ static void sub_801D3A8(void) case 0: case 1: if (sUnknown_203B250->pokeStruct != NULL) { - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0], sUnknown_203B250->pokeStruct, 7); - sUnknown_203B250->unk18.unk0 = gAvailablePokemonNames[0]; + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0], sUnknown_203B250->pokeStruct, 7); + sUnknown_203B250->unk18.unk0 = gFormatBuffer_Monsters[0]; sub_8012D60(&sUnknown_203B250->unk18, sUnknown_203B250->unk68, 0, sUnknown_203B250->unkA8, sUnknown_203B250->menuAction, 0); } else { @@ -323,7 +323,7 @@ static void sub_801D4C0(void) loopMax++; } else { - strcpy(gAvailablePokemonNames[0], sTripleQuestionMark); + strcpy(gFormatBuffer_Monsters[0], sTripleQuestionMark); if (sub_8096E2C()) { sUnknown_203B250->unk68[loopMax].text = gCommonFriend[0]; @@ -579,7 +579,7 @@ static void sub_801D894(void) location = GetFriendAreaName(sUnknown_203B250->currFriendAreaLocation); // TODO this is def a hack - xxx_format_string(location, buffer, (u8 *)(&preload_string + 1), 0); + CopyFormatString(location, buffer, (u8 *)(&preload_string + 1), 0); location_length = sub_8008ED0(buffer); x_coord = (128 - location_length) / 2; // Centers the location name CallPrepareTextbox_8008C54(1); diff --git a/src/code_801F428.c b/src/code_801F428.c index ef5188e52..3a6a84cf9 100644 --- a/src/code_801F428.c +++ b/src/code_801F428.c @@ -21,7 +21,7 @@ struct unkStruct_203B274 }; EWRAM_DATA_2 struct unkStruct_203B274 *gUnknown_203B274 = {0}; -extern u8 gAvailablePokemonNames[]; +extern u8 gFormatBuffer_Monsters[]; static const UnkTextStruct2 sUnknown_80DC2AC = { 0, 0, 0, 0, diff --git a/src/code_801F808.c b/src/code_801F808.c index 41f0b1464..9750eb753 100644 --- a/src/code_801F808.c +++ b/src/code_801F808.c @@ -147,7 +147,7 @@ void sub_801F9A4(void) CallPrepareTextbox_8008C54(gUnknown_203B278->unk5C); sub_80073B8(gUnknown_203B278->unk5C); name = &(gUnknown_203B278->unk14[gUnknown_203B278->unkC]->pokeName); - strcpy(gAvailablePokemonNames[0], *name); + strcpy(gFormatBuffer_Monsters[0], *name); PrintFormatStringOnWindow(0x10,0,gUnknown_80DC310,gUnknown_203B278->unk5C,0); // $m0 PrintFormatStringOnWindow(4,0x10,gUnknown_203B278->unk14[gUnknown_203B278->unkC]->unk4,gUnknown_203B278->unk5C,0); sub_80073E0(gUnknown_203B278->unk5C); diff --git a/src/code_80227B8.c b/src/code_80227B8.c index 23106ff38..0c87ef4f1 100644 --- a/src/code_80227B8.c +++ b/src/code_80227B8.c @@ -42,8 +42,8 @@ bool8 sub_80227B8(PokemonStruct1 *pkmn) sUnknown_203B294->pokeStruct = pkmn; if (pkmn != NULL) { - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0], pkmn, COLOR_WHITE_2); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[1], pkmn, COLOR_YELLOW); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0], pkmn, COLOR_WHITE_2); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[1], pkmn, COLOR_YELLOW); if (HasGummiItem()) sub_8022924(0); @@ -51,8 +51,8 @@ bool8 sub_80227B8(PokemonStruct1 *pkmn) sub_8022924(17); } else { - strcpy(gAvailablePokemonNames[0], sTripleQuestionMark); - strcpy(gAvailablePokemonNames[1], sTripleQuestionMark); + strcpy(gFormatBuffer_Monsters[0], sTripleQuestionMark); + strcpy(gFormatBuffer_Monsters[1], sTripleQuestionMark); if (GetNumberOfFilledInventorySlots() == 0) sub_8022924(18); @@ -198,7 +198,7 @@ static void sub_8022A10(void) if (r5 != r6) { sUnknown_203B294->fallbackState = 10; - strcpy(gFormatItems[1], GetIQSkillName(sUnknown_203B294->unk40)); + strcpy(gFormatBuffer_Items[1], GetIQSkillName(sUnknown_203B294->unk40)); PlaySound(203); CreateDialogueBoxAndPortrait(sFmtIQHelpedLearn, 0, 0, 0x101); sUnknown_203B294->unk40++; @@ -372,7 +372,7 @@ static void sub_8022EF4(void) sUnknown_203B294->unk40 = 1; boostAmount = sUnknown_203B294->gummi.boostAmount; - sub_8090E14(gFormatItems[0], &gTeamInventoryRef->teamItems[sUnknown_203B294->itemIndex], NULL); + sub_8090E14(gFormatBuffer_Items[0], &gTeamInventoryRef->teamItems[sUnknown_203B294->itemIndex], NULL); if (boostAmount != -1) ShiftItemsDownFrom(sUnknown_203B294->itemIndex); diff --git a/src/code_802DB28.c b/src/code_802DB28.c index 02df8c92b..bf2abbc05 100644 --- a/src/code_802DB28.c +++ b/src/code_802DB28.c @@ -117,13 +117,13 @@ static void sub_802DC9C(void) switch (sUnknown_203B2FC->state) { case 0: CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, sUnknown_203B2FC->jobInfo->clientSpecies); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], sUnknown_203B2FC->jobInfo->clientSpecies); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], sUnknown_203B2FC->jobInfo->clientSpecies); speciesText = GetMonSpecies(sUnknown_203B2FC->jobInfo->clientSpecies); - strcpy(gAvailablePokemonNames[0], speciesText); + strcpy(gFormatBuffer_Monsters[0], speciesText); speciesText = GetMonSpecies(sUnknown_203B2FC->jobInfo->targetSpecies); - strcpy(gAvailablePokemonNames[1], speciesText); + strcpy(gFormatBuffer_Monsters[1], speciesText); UnlockExclusivePokemon(sUnknown_203B2FC->jobInfo->clientSpecies); - BufferItemName(gFormatItems[0], sUnknown_203B2FC->jobInfo->targetItem, NULL); + BufferItemName(gFormatBuffer_Items[0], sUnknown_203B2FC->jobInfo->targetItem, NULL); sUnknown_203B2FC->fallbackState = 6; switch (sUnknown_203B2FC->jobInfo->missionType) { diff --git a/src/code_804267C.c b/src/code_804267C.c index 06740ebfe..538e0f568 100644 --- a/src/code_804267C.c +++ b/src/code_804267C.c @@ -111,7 +111,7 @@ void sub_80427AC(void) enInfo->unkF3 = FALSE; sub_80429A0(entity); if (!enInfo->isNotTeamMember) { - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); DisplayDungeonLoggableMessageTrue(entity, *gPtrFeralFoundItemMessage); } } diff --git a/src/code_8042B34.c b/src/code_8042B34.c index 3c687b206..b3928cb87 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -506,8 +506,8 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) } if (r9) { - gFormatData_202DE30[0] = gDungeon->unk67B; - if (gFormatData_202DE30[0] != 0) { + gFormatArgs[0] = gDungeon->unk67B; + if (gFormatArgs[0] != 0) { DisplayDungeonMessage(0, gUnknown_80FEC48, 1); } else { @@ -531,7 +531,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) if (sub_8099394(&sp)) { unkStruct_203B480 *mailStr = GetMailatIndex(sp); if (mailStr->rescuesAllowed) { - gFormatData_202DE30[0] = mailStr->rescuesAllowed; + gFormatArgs[0] = mailStr->rescuesAllowed; DisplayDungeonMessage(0, gUnknown_81002B8, 1); } else { @@ -1080,7 +1080,7 @@ bool8 sub_8043ED0(bool8 a0) Entity *leader = GetLeader(); if (EntityExists(leader)) { if (!a0) { - strcpy(gAvailablePokemonNames[0], gDungeon->faintStringBuffer); + strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); DisplayDungeonMessage(0, gUnknown_80F89B4, 1); } sub_8042B0C(leader); @@ -1092,7 +1092,7 @@ bool8 sub_8043ED0(bool8 a0) Entity *leader = GetLeader(); if (EntityExists(leader)) { if (!a0) { - strcpy(gAvailablePokemonNames[0], gDungeon->faintStringBuffer); + strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); DisplayDungeonMessage(0, gUnknown_80F89D4, 1); } sub_8042B0C(leader); @@ -1104,7 +1104,7 @@ bool8 sub_8043ED0(bool8 a0) Entity *leader = GetLeader(); if (EntityExists(leader)) { if (!a0) { - strcpy(gAvailablePokemonNames[0], gDungeon->faintStringBuffer); + strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); DisplayDungeonMessage(0, gUnknown_80F89D8, 1); } sub_8042B0C(leader); diff --git a/src/code_8048480.c b/src/code_8048480.c index e6c7a2281..199e7afe2 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -219,8 +219,8 @@ void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity return; } PlaySoundEffect(0x14d); - sub_8045BF8(gFormatItems[0],item); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + sub_8045BF8(gFormatBuffer_Items[0],item); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDBB8); // $m0 caught the $i0 info->heldItem = *item; sub_806A6E8(target); @@ -233,7 +233,7 @@ void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity } } if ((item->flags & ITEM_FLAG_STICKY)) { - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); TryDisplayDungeonLoggableMessage3(pokemon,target,*gItemStickyDoesntWorkText); if (param_1 != '\0') { sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,0x217,0,0,0); @@ -595,7 +595,7 @@ void RawstBerryItemAction(Entity *pokemon, Entity *target) SendNonVolatileEndMessage(pokemon, target); else { - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); // Pointer to "But nothing happened!" TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FB580); } @@ -609,7 +609,7 @@ void HungerSeedItemAction(Entity *pokemon, Entity * target) else { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); if (IQSkillIsEnabled(target, IQ_SELF_CURER)) TryDisplayDungeonLoggableMessage3(pokemon, target, *gPtrSelfHealPreventedHungerMessage); else @@ -1032,14 +1032,14 @@ bool8 sub_8048D50(Entity * pokemon, Item *item) entityInfo = pokemon->info; if ((item->flags & ITEM_FLAG_STICKY) != 0) { - sub_8045BF8(gFormatItems[0], item); + sub_8045BF8(gFormatBuffer_Items[0], item); TryDisplayDungeonLoggableMessage(pokemon,*gItemStickyDoesntWorkText); return FALSE; } else { if ((entityInfo->muzzled.muzzled == TRUE) && (IsEdibleItem(item->id))) { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FDCA4); return FALSE; } diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index 256b9bb29..f05fd191f 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -1753,7 +1753,7 @@ void sub_805F02C(void) sub_803F508(r7); sub_8041AD0(leader); sub_8041AE0(GetLeader()); - SetMessageArgument(gAvailablePokemonNames[0], r7, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], r7, 0); TryDisplayDungeonLoggableMessage(r7, gUnknown_80F9BB0); sub_807EC28(FALSE); r8->unk64 = 0; @@ -2116,7 +2116,7 @@ void ShowFieldMenu(u8 a0_, bool8 a1) break; } else { - SetMessageArgument(gAvailablePokemonNames[0], GetLeader(), 0); + SetMessageArgument(gFormatBuffer_Monsters[0], GetLeader(), 0); DisplayDungeonMessage(0, gUnknown_80FDE18, 1); } } @@ -2164,7 +2164,7 @@ extern const u8 *const gUnknown_80FE954; const u8 *GetCurrentDungeonName(void); void GetWeatherName(u8 *dst, u8 weatherId); -extern s32 gFormatData_202DE30[]; +extern s32 gFormatArgs[]; void DrawFieldMenu(u8 a0) { @@ -2234,27 +2234,27 @@ void DrawFieldMenu(u8 a0) sub_80073B8(2); DeconstructPlayTime(gPlayTimeRef, &hours, &minutes, &seconds); - gFormatData_202DE30[0] = FixedPointToInt(leaderInfo->belly); - gFormatData_202DE30[1] = FixedPointToInt(leaderInfo->maxBelly); + gFormatArgs[0] = FixedPointToInt(leaderInfo->belly); + gFormatArgs[1] = FixedPointToInt(leaderInfo->maxBelly); PrintFormatStringOnWindow(0x73, 0, gUnknown_80F9174, 2, 0); - gFormatData_202DE30[0] = gTeamInventoryRef->teamMoney; + gFormatArgs[0] = gTeamInventoryRef->teamMoney; PrintFormatStringOnWindow(0x73, 12, gUnknown_80F9190, 2, 0); - GetWeatherName(gAvailablePokemonNames[0], GetApparentWeather(NULL)); + GetWeatherName(gFormatBuffer_Monsters[0], GetApparentWeather(NULL)); PrintFormatStringOnWindow(0x73, 24, gUnknown_80F91A8, 2, 0); - gFormatData_202DE30[0] = hours; - gFormatData_202DE30[1] = minutes; - gFormatData_202DE30[2] = seconds; + gFormatArgs[0] = hours; + gFormatArgs[1] = minutes; + gFormatArgs[2] = seconds; PrintFormatStringOnWindow(0x73, 36, gUnknown_80F91C8, 2, 0); for (yLoop = 0, i = 0; i < MAX_TEAM_MEMBERS; i++) { Entity *teamMon = gDungeon->teamPokemon[i]; if (EntityExists(teamMon)) { EntityInfo *monInfo = teamMon->info; - SetMessageArgument(gAvailablePokemonNames[0], teamMon, 0); - gFormatData_202DE30[0] = monInfo->HP; - gFormatData_202DE30[1] = monInfo->maxHPStat; + SetMessageArgument(gFormatBuffer_Monsters[0], teamMon, 0); + gFormatArgs[0] = monInfo->HP; + gFormatArgs[1] = monInfo->maxHPStat; PrintFormatStringOnWindow(4, yLoop, gUnknown_80F91E0, 2, 0); yLoop += 12; if (yLoop >= 12 * MAX_TEAM_MEMBERS) @@ -2773,7 +2773,7 @@ void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 break; case 3: { Item *item = &a1->info->heldItem; - SetMessageArgument_2(gAvailablePokemonNames[0], a1Info, 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], a1Info, 0); PrintFormatStringOnWindow(x, 0, gUnknown_80FE940, 0, 0); if (item->flags & ITEM_FLAG_EXISTS) { gUnknown_202EE10.unk1A++; @@ -2787,7 +2787,7 @@ void CreateFieldItemMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, UnkTextStruct3 Entity *chosenTeamMember = gDungeon->teamPokemon[sUnknown_202F248[a0] - MAX_TEAM_MEMBERS]; if (EntityExists(chosenTeamMember)) { Item *item = &chosenTeamMember->info->heldItem; - SetMessageArgument_2(gAvailablePokemonNames[0], chosenTeamMember->info, 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], chosenTeamMember->info, 0); PrintFormatStringOnWindow(x, 0, gUnknown_80FE940, 0, 0); if (item->flags & ITEM_FLAG_EXISTS) { gUnknown_202EE10.unk1A++; @@ -3379,38 +3379,38 @@ void DrawFieldTeamMenu(struct UnkFieldTeamMenuStruct *a0, UnkTextStruct3 *a1, bo EntityInfo *monInfo = teamMon->info; s32 color = (a0->unk14[i] != 0) ? 6 : 2; - sub_8070968(gAvailablePokemonNames[0], monInfo, color); + sub_8070968(gFormatBuffer_Monsters[0], monInfo, color); if (sub_806A538(gRecruitedPokemonRef->pokemon2[monInfo->teamIndex].unkA)) { if (monInfo->HP <= monInfo->maxHPStat / 4) { - strcpy(gAvailablePokemonNames[1], gHeartRedTiny); + strcpy(gFormatBuffer_Monsters[1], gHeartRedTiny); } else if (monInfo->HP <= (monInfo->maxHPStat / 4) * 2) { - strcpy(gAvailablePokemonNames[1], gHeartRedSmall); + strcpy(gFormatBuffer_Monsters[1], gHeartRedSmall); } else if (monInfo->HP <= (monInfo->maxHPStat / 4) * 3) { - strcpy(gAvailablePokemonNames[1], gHeartRedMedium); + strcpy(gFormatBuffer_Monsters[1], gHeartRedMedium); } else { - strcpy(gAvailablePokemonNames[1], gHeartRedLarge); + strcpy(gFormatBuffer_Monsters[1], gHeartRedLarge); } } else { if (monInfo->HP <= monInfo->maxHPStat / 4) { - strcpy(gAvailablePokemonNames[1], gHeartYellowTiny); + strcpy(gFormatBuffer_Monsters[1], gHeartYellowTiny); } else if (monInfo->HP <= (monInfo->maxHPStat / 4) * 2) { - strcpy(gAvailablePokemonNames[1], gHeartYellowSmall); + strcpy(gFormatBuffer_Monsters[1], gHeartYellowSmall); } else if (monInfo->HP <= (monInfo->maxHPStat / 4) * 3) { - strcpy(gAvailablePokemonNames[1], gHeartYellowMedium); + strcpy(gFormatBuffer_Monsters[1], gHeartYellowMedium); } else { - strcpy(gAvailablePokemonNames[1], gHeartYellowLarge); + strcpy(gFormatBuffer_Monsters[1], gHeartYellowLarge); } } - gFormatData_202DE30[0] = monInfo->HP; - gFormatData_202DE30[1] = monInfo->maxHPStat; + gFormatArgs[0] = monInfo->HP; + gFormatArgs[1] = monInfo->maxHPStat; y = sub_8013800(&gUnknown_202EE10, i); if (monInfo->isTeamLeader) { PrintFormatStringOnWindow(9, y, gUnknown_8106BD4, 0, 0); @@ -3709,7 +3709,7 @@ void PrintMonTactics(s32 firstId, u8 *tacticIds, EntityInfo *mon, s32 windowId) if (tactic == TACTIC_UNUSED) break; - CopyTacticsNameToBuffer(gAvailablePokemonNames[0], tactic); + CopyTacticsNameToBuffer(gFormatBuffer_Monsters[0], tactic); if (mon->tactic == tactic) { PrintFormatStringOnWindow(0x10, y, gUnknown_8106BEC, windowId, 0); } diff --git a/src/code_8066D04.c b/src/code_8066D04.c index 7a24b441b..32ee74a86 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -53,14 +53,14 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2) itemPtr = &gTeamInventoryRef->teamItems[index]; if (((itemPtr->flags & ITEM_FLAG_EXISTS)) && ((itemPtr->flags & ITEM_FLAG_SET))) { if ((itemPtr->flags & ITEM_FLAG_STICKY)) { - sub_8045BF8(gFormatItems[0],itemPtr); + sub_8045BF8(gFormatBuffer_Items[0],itemPtr); TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotEquip); return; } itemPtr->flags &= ~(ITEM_FLAG_SET); } } - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); PlaySoundEffect(0x133); if (param_2 != 0) { if ((item->flags & ITEM_FLAG_STICKY)) { @@ -78,7 +78,7 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2) } item->flags |= ITEM_FLAG_SET; if (((item->flags & ITEM_FLAG_STICKY)) && (param_2 != 0)) { - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0); } } @@ -94,12 +94,12 @@ void HandleUnsetItemAction(Entity *entity,bool8 enableMessage) item = &gTeamInventoryRef->teamItems[index]; if (((item->flags & ITEM_FLAG_EXISTS)) && ((item->flags & ITEM_FLAG_SET))) { if ((item->flags & ITEM_FLAG_STICKY)) { - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); TryDisplayDungeonLoggableMessage(entity,*gItemStickyCannotEquip); return; } item->flags &= ~(ITEM_FLAG_SET); - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); PlaySoundEffect(0x133); if (enableMessage) { TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8D20); @@ -131,15 +131,15 @@ void HandleGiveItemAction(Entity *param_1) bVar3 = FALSE; if ((!bVar3) && ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET))) { - sub_8045BF8(gFormatItems[1],item); + sub_8045BF8(gFormatBuffer_Items[1],item); TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotMove2); } else { - SetMessageArgument(gAvailablePokemonNames[1],entity,0); + SetMessageArgument(gFormatBuffer_Monsters[1],entity,0); if (((info2->heldItem).flags & ITEM_FLAG_EXISTS)) { if (((info2->heldItem).flags & ITEM_FLAG_STICKY)) { - sub_8045BF8(gFormatItems[1],&info2->heldItem); + sub_8045BF8(gFormatBuffer_Items[1],&info2->heldItem); TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotMove1); return; } @@ -155,8 +155,8 @@ void HandleGiveItemAction(Entity *param_1) AddItemToInventory(&item1); } info2->heldItem = item2; - sub_8045BF8(gFormatItems[0],&item2); - sub_8045BF8(gFormatItems[1],&item1); + sub_8045BF8(gFormatBuffer_Items[0],&item2); + sub_8045BF8(gFormatBuffer_Items[1],&item1); PlaySoundEffect(0x14d); TryDisplayDungeonLoggableMessage(param_1,*gMonTookAndReturnedItem); if ((item2.flags & ITEM_FLAG_STICKY)) { @@ -168,7 +168,7 @@ void HandleGiveItemAction(Entity *param_1) item3.flags &= ~(ITEM_FLAG_SET); sub_8044DF0(param_1, 0, 101); info2->heldItem = item3; - sub_8045BF8(gFormatItems[0],&item3); + sub_8045BF8(gFormatBuffer_Items[0],&item3); PlaySoundEffect(0x14d); TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8D44); if ((item3.flags & ITEM_FLAG_STICKY)) { @@ -205,15 +205,15 @@ void HandleTakeItemAction(Entity *param_1) else { if ((heldItem->flags & ITEM_FLAG_STICKY)) { - sub_8045BF8(gFormatItems[0],heldItem); + sub_8045BF8(gFormatBuffer_Items[0],heldItem); TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0); } else { item = *heldItem; item.flags &= ~(ITEM_FLAG_SET); - sub_8045BF8(gFormatItems[0],&item); - SetMessageArgument(gAvailablePokemonNames[0],entity,0); + sub_8045BF8(gFormatBuffer_Items[0],&item); + SetMessageArgument(gFormatBuffer_Monsters[0],entity,0); heldItem->id = ITEM_NOTHING; heldItem->quantity = 0; heldItem->flags = 0; @@ -246,20 +246,20 @@ void sub_8066BD4(Entity *param_1) item = sub_8044D90(param_1,1,0x1565); if (heldItem->flags & ITEM_FLAG_STICKY) { - sub_8045BF8(gFormatItems[0],heldItem); + sub_8045BF8(gFormatBuffer_Items[0],heldItem); TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0); } else if ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) { - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0); } else { heldItem->flags &= ~(ITEM_FLAG_SET); item->flags &= ~(ITEM_FLAG_SET); - sub_8045BF8(gFormatItems[0],heldItem); - sub_8045BF8(gFormatItems[1],item); - SetMessageArgument(gAvailablePokemonNames[1],entity,0); + sub_8045BF8(gFormatBuffer_Items[0],heldItem); + sub_8045BF8(gFormatBuffer_Items[1],item); + SetMessageArgument(gFormatBuffer_Monsters[1],entity,0); temp = info->heldItem; info->heldItem = *item; *item = temp; @@ -298,7 +298,7 @@ void HandlePlaceItemAction(Entity *param_1) info = entity->info; item = sub_8044D90(entity,0,4); - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); if (info->action.unk4[0].actionUseIndex == 0x80) { TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8DE0); } @@ -315,7 +315,7 @@ void HandlePlaceItemAction(Entity *param_1) if(((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == TERRAIN_TYPE_NORMAL) && (tile->object == NULL)) { item->flags &= ~(ITEM_FLAG_SET); - sub_8045BF8(gFormatItems[0],item); + sub_8045BF8(gFormatBuffer_Items[0],item); if (sub_80460F8(&entity->pos,item,1) == 0) { _message: TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8E04); @@ -327,7 +327,7 @@ void HandlePlaceItemAction(Entity *param_1) item->flags = 0; FillInventoryGaps(); PlaySoundEffect(0x14d); - SetMessageArgument(gAvailablePokemonNames[0],entity,0); + SetMessageArgument(gFormatBuffer_Monsters[0],entity,0); TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8E28); sub_807AB38(entity,gDungeon->unk3A08); } diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c index 741acbe54..39989b7b6 100644 --- a/src/code_8069E0C.c +++ b/src/code_8069E0C.c @@ -172,7 +172,7 @@ void sub_8069F9C(Entity *pokemon,Entity * target,Move *move) } iVar6->abilities[abilityIndex] = local_20[randomIndex]; gDungeon->unkC = 1; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC7C); sub_8042900(target); sub_806ABAC(pokemon,target); @@ -190,9 +190,9 @@ _0806A068: iVar6->types[0] = type; iVar6->types[1] = TYPE_NONE; iVar6->isColorChanged = TRUE; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); __src = GetUnformattedTypeString(iVar6->types[0]); - strcpy(gFormatItems[0],__src); + strcpy(gFormatBuffer_Items[0],__src); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCAC); sub_8042968(target); } @@ -215,9 +215,9 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move) entityInfo->types[0] = uVar2_u32; entityInfo->types[1] = 0; sub_8041BBC(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); typeString = GetUnformattedTypeString(uVar2_u32); - strcpy(gFormatItems[0],typeString); + strcpy(gFormatBuffer_Items[0],typeString); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDCC8); } } diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 056d14048..e0bc73ebb 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -513,14 +513,14 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc } if (arg4 != 0x20E && HasAbility(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) { - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCA90); sub_8042238(attacker, target); dmgStruct->unkF = 1; return FALSE; } if (targetData->immobilize.immobilizeStatus == STATUS_FROZEN) { - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9600); sub_8042238(attacker, target); dmgStruct->unkF = 1; @@ -561,8 +561,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc } } - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); if (dmgStruct->dmg == 0) { if (sub_8045888(attacker) && sub_8045888(target)) { if (targetData->unk152 == 0) { @@ -594,7 +594,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc else { const u8 *str; - gFormatData_202DE30[0] = dmgStruct->dmg; + gFormatArgs[0] = dmgStruct->dmg; str = gUnknown_80F9764[dmgStruct->residualDmgType]; ASM_MATCH_TRICK(dmgStruct); @@ -708,8 +708,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc r8 = 0; targetData->unk14C = 0; - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); if (dmgStruct->residualDmgType == 19 || dmgStruct->residualDmgType == 20) { if (targetData->isNotTeamMember) { TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9E44); @@ -784,7 +784,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_806A390(target); sub_806CCB4(target, sub_806CEBC(target)); EntityUpdateStatusSprites(target); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C); sub_806F63C(target); return FALSE; @@ -841,8 +841,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_806A390(target); sub_806CCB4(target, sub_806CEBC(target)); EntityUpdateStatusSprites(target); - SetMessageArgument(gAvailablePokemonNames[0], target, 0); - SetMessageArgument(gAvailablePokemonNames[1], teamMember, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], teamMember, 0); DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD484); sub_806F63C(target); return FALSE; @@ -895,7 +895,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_806A390(target); sub_806CCB4(target, sub_806CEBC(target)); EntityUpdateStatusSprites(target); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C); sub_806F63C(target); return FALSE; diff --git a/src/code_806FDF4.c b/src/code_806FDF4.c index 6cf278b2e..62ca6b8a3 100644 --- a/src/code_806FDF4.c +++ b/src/code_806FDF4.c @@ -24,7 +24,7 @@ #include "dungeon_util_1.h" #include "type_chart.h" -extern u8 gUnknown_202E628[]; +extern u8 gFormatBuffer_FriendArea[]; extern u8 gUnknown_202EE70[MAX_TEAM_BODY_SIZE]; extern s16 gUnknown_80F5008; extern s16 gUnknown_80F5700[]; @@ -742,7 +742,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa entity2->unk22 = 0; sub_807A0CC(entity1, entity2); sub_806CE68(entity2, direction); - CopyCyanMonsterNametoBuffer(gAvailablePokemonNames[0],param_3->id); + CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[0],param_3->id); if (DisplayDungeonYesNoMessage(0,*gUnknown_80F9FE8,1) == 0) { if (param_3->id != MONSTER_JIRACHI) { @@ -811,12 +811,12 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa DisplayDungeonMessage(0,*gUnknown_80FA0C8,1); } } - sub_808D9DC(gAvailablePokemonNames[0],pokeStruct2,0); + sub_808D9DC(gFormatBuffer_Monsters[0],pokeStruct2,0); TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA0F0); if (flag) { leader = xxx_call_GetLeader(); - SetMessageArgument(gAvailablePokemonNames[0],leader,0); - sub_8092558(gUnknown_202E628,friendArea); + SetMessageArgument(gFormatBuffer_Monsters[0],leader,0); + sub_8092558(gFormatBuffer_FriendArea,friendArea); PlaySound(0xce); DisplayDungeonMessage(0,*gUnknown_80FA120,1); } @@ -1074,12 +1074,12 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr) } if (flag) { leader = xxx_call_GetLeader(); - SetMessageArgument(gAvailablePokemonNames[0],leader,0); - sub_8092558(gUnknown_202E628,friendArea); + SetMessageArgument(gFormatBuffer_Monsters[0],leader,0); + sub_8092558(gFormatBuffer_FriendArea,friendArea); PlaySound(0xce); DisplayDungeonMessage(0,*gUnknown_80FA120,1); } - sub_808D9DC(gAvailablePokemonNames[3],pokeStruct2,0); + sub_808D9DC(gFormatBuffer_Monsters[3],pokeStruct2,0); *entityPtr = local_2c; } return TRUE; diff --git a/src/code_80718D8.c b/src/code_80718D8.c index 4457d5518..c893d5421 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -99,7 +99,7 @@ void sub_8071B48(void) if (dungeon->unk662 > 900) { entity2 = dungeon->unk17B34; if ((EntityExists(entity2)) && (entity2->spawnGenID == dungeon->unk17B40)) { - SetMessageArgument(gAvailablePokemonNames[0],entity2,0); + SetMessageArgument(gFormatBuffer_Monsters[0],entity2,0); entityPtr = entity2; } } @@ -354,8 +354,8 @@ void sub_8071DA4(Entity *entity) " movs r1, 0\n" " b _08071F02\n" " .align 2, 0\n" -"_08071EE8: .4byte gFormatData_202DE30\n" -"_08071EEC: .4byte gAvailablePokemonNames\n" +"_08071EE8: .4byte gFormatArgs\n" +"_08071EEC: .4byte gFormatBuffer_Monsters\n" "_08071EF0: .4byte gUnknown_80F9E64\n" "_08071EF4: .4byte 0x00000149\n" "_08071EF8:\n" @@ -487,9 +487,9 @@ void sub_8071DA4(Entity *entity) " pop {r0}\n" " bx r0\n" " .align 2, 0\n" -"_08071FF4: .4byte gFormatData_202DE30\n" -"_08071FF8: .4byte gAvailablePokemonNames\n" -"_08071FFC: .4byte gFormatItems\n" +"_08071FF4: .4byte gFormatArgs\n" +"_08071FF8: .4byte gFormatBuffer_Monsters\n" +"_08071FFC: .4byte gFormatBuffer_Items\n" "_08072000: .4byte gUnknown_80FF730\n" "_08072004: .4byte 0x00000149"); } @@ -528,11 +528,11 @@ void sub_8072008(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 para info->exp = leveldata.expRequired; flag |= (sub_80723D0(pokemon,target,param_4,param_5)); if ((flag != 0) && (!info->isNotTeamMember)) { - gFormatData_202DE30[0] = info->maxHPStat - maxHP; - gFormatData_202DE30[1] = info->atk - atk[0]; - gFormatData_202DE30[2] = info->def - def[0]; - gFormatData_202DE30[3] = info->spAtk - atk[1]; - gFormatData_202DE30[4] = info->spDef - def[1]; + gFormatArgs[0] = info->maxHPStat - maxHP; + gFormatArgs[1] = info->atk - atk[0]; + gFormatArgs[2] = info->def - def[0]; + gFormatArgs[3] = info->spAtk - atk[1]; + gFormatArgs[4] = info->spDef - def[1]; if (param_4 != 0) { sub_807218C(target); } @@ -544,8 +544,8 @@ void sub_8072008(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 para for(tacticIndex = 0; tacticIndex < NUM_TACTICS; tacticIndex++) { if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); - CopyTacticsNameToBuffer(gFormatItems[0],tacticIndex); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); + CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF730); } } @@ -553,7 +553,7 @@ void sub_8072008(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 para info->expGainedInTurn = 0; info->unk149 = 0; if ((flag == 0) && (param_4 != 0)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F9B74); } } @@ -571,7 +571,7 @@ void sub_807218C(Entity *pokemon) info = pokemon->info; sub_806A2BC(pokemon, 0); - SetMessageArgument_2(gAvailablePokemonNames[0], info, 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); if(sub_8070BC0(pokemon)) { r3 = 0; @@ -599,34 +599,34 @@ void sub_807218C(Entity *pokemon) buffer[0] = 0; - if(gFormatData_202DE30[0]> 0) + if(gFormatArgs[0]> 0) { strcat(buffer, *gUnknown_80F9ACC); r6++; } - if(gFormatData_202DE30[1]> 0) + if(gFormatArgs[1]> 0) { if(gUnknown_8107010[r6] != 0) strcat(buffer, gUnknown_8107018[gUnknown_8107010[r6]]); strcat(buffer, *gUnknown_80F9AEC); r6++; } - if(gFormatData_202DE30[2]> 0) + if(gFormatArgs[2]> 0) { if(gUnknown_8107010[r6] != 0) strcat(buffer, gUnknown_8107018[gUnknown_8107010[r6]]); strcat(buffer, *gUnknown_80F9B10); r6++; } - if(gFormatData_202DE30[3]> 0) + if(gFormatArgs[3]> 0) { if(gUnknown_8107010[r6] != 0) strcat(buffer, gUnknown_8107018[gUnknown_8107010[r6]]); strcat(buffer, *gUnknown_80F9B34); r6++; } - if(gFormatData_202DE30[4]> 0) + if(gFormatArgs[4]> 0) { if(gUnknown_8107010[r6] != 0) strcat(buffer, gUnknown_8107018[gUnknown_8107010[r6]]); @@ -668,7 +668,7 @@ void LevelDownTarget(Entity *pokemon, Entity *target, u32 level) if(!flag) { - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80F9B94); } } @@ -707,17 +707,17 @@ bool8 sub_80723D0(Entity *pokemon, Entity *target, u8 param_3, u8 param_4) sub_806A2BC(target, 0); if(!flag) sub_8083D58(); - gFormatData_202DE30[0] = level; + gFormatArgs[0] = level; - SetMessageArgument_2(gAvailablePokemonNames[0], info, 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); DisplayDungeonLoggableMessage(target, *gUnknown_80F9E80); } else { if(!flag) sub_8083D58(); - gFormatData_202DE30[0] = level; - SetMessageArgument_2(gAvailablePokemonNames[0], info, 0); + gFormatArgs[0] = level; + SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); DisplayDungeonLoggableMessageTrue(target, *gUnknown_80F9E80); } } @@ -859,11 +859,11 @@ bool8 sub_80725A4(Entity *pokemon, Entity *target) } - SetMessageArgument_2(gAvailablePokemonNames[0], info, 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); if(info->level != oldLevel) { - gFormatData_202DE30[0] = info->level; + gFormatArgs[0] = info->level; sub_80421C0(target, 0xD3 << 1); TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80F9EC8); // $m0 dropped to Level $d0! return TRUE; diff --git a/src/code_8072B78.c b/src/code_8072B78.c index 8cfb1b2e9..27b92d443 100644 --- a/src/code_8072B78.c +++ b/src/code_8072B78.c @@ -109,8 +109,8 @@ void sub_8072B78(Entity *pokemon, Entity *target, s16 id) id_s32 = id; entityInfo = target->info; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); - CopyCyanMonsterNametoBuffer(gAvailablePokemonNames[1],id_s32); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); + CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1],id_s32); file = GetSpriteData(id_s32); fu(entityInfo, id_s32); GetPokemonLevelData(&levelData,id_s32,entityInfo->level); diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index 40b5d4ae9..6bda0098a 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -138,7 +138,7 @@ void sub_8073D14(Entity *entity) return; if (sub_8044B28()) return; - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); if (entityInfo->isTeamLeader) return; if (entityInfo->shopkeeper == 1) @@ -154,8 +154,8 @@ void sub_8073D14(Entity *entity) return; if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) { - sub_8045BF8(gFormatItems[0], groundItem); - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); DisplayDungeonLoggableMessageTrue(entity, gMonTerrifiedCouldntPickUpItem); } else if (!_entityInfo->isNotTeamMember && GetItemCategory(groundItem->id) == CATEGORY_POKE) { @@ -167,7 +167,7 @@ void sub_8073D14(Entity *entity) PlaySoundEffect(0x14C); } AddToTeamMoney(GetMoneyValue(groundItem)); - sub_8045BF8(gFormatItems[0], groundItem); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); sub_80461C8(&entity->pos, 1); DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem); } @@ -229,7 +229,7 @@ void sub_8073D14(Entity *entity) if (groundItem->flags & ITEM_FLAG_STICKY) carriedItems[newInventoryId]->flags |= ITEM_FLAG_STICKY; - sub_8045BF8(gFormatItems[0], groundItem); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); sub_80461C8(&entity->pos, 1); PlaySoundEffect(0x14A); if (inventoryIds[newInventoryId] <= -1) @@ -247,7 +247,7 @@ void sub_8073D14(Entity *entity) } if (i == nItems) { - sub_8045BF8(gFormatItems[0], groundItem); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); DisplayDungeonLoggableMessageTrue(entity, gMonSteppedOnItem); } else { @@ -260,16 +260,16 @@ void sub_8073D14(Entity *entity) if (inventoryIds[i] <= -1) { _entityInfo->heldItem = *groundItem; - sub_8045BF8(gFormatItems[0], groundItem); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); sub_80461C8(&entity->pos, 1); DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2); } else if (AddItemToInventory(groundItem)) { - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); DisplayDungeonLoggableMessageTrue(entity, gMonCouldntPickUpItem); } else { - sub_8045BF8(gFormatItems[0], groundItem); + sub_8045BF8(gFormatBuffer_Items[0], groundItem); sub_80461C8(&entity->pos, 1); DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItemToolbox); } @@ -571,7 +571,7 @@ void sub_8074094(Entity *entity) UseAttack(NULL); if (!EntityExists(entity) || sub_8044B28()) return; - SetMessageArgument(gAvailablePokemonNames[1], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], entity, 0); TryDisplayDungeonLoggableMessage(entity, gUnknown_80FEB30); TrySendImmobilizeSleepEndMsg(entity, entity); if (entityInfo->protection.protectionStatus == STATUS_PROTECT) { @@ -611,7 +611,7 @@ void sub_8074094(Entity *entity) if (entityInfo->charging.chargingStatusTurns == 0) { entityInfo->charging.chargingStatus = 0; entityInfo->unk14A = 0; - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); TryDisplayDungeonLoggableMessage(entity, gUnknown_80FABD8); } } @@ -767,7 +767,7 @@ void TickStatusHeal(Entity *entity) if (entityInfo->terrifiedTurns != 0) { sub_80838EC(&entityInfo->terrifiedTurns); if (entityInfo->terrifiedTurns == 0) { - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); TryDisplayDungeonLoggableMessage(entity, gPtrStenchWavedOffMessage); } } @@ -791,7 +791,7 @@ void TickStatusHeal(Entity *entity) s32 newSpdStage = CalcSpeedStage(entity); if (oldSpdStage != newSpdStage) { - SetMessageArgument(gAvailablePokemonNames[0], entity, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0); TryDisplayDungeonLoggableMessage(entity, gUnknown_80FA124[newSpdStage]); } } diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index 242979c11..8e5c9de30 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -216,7 +216,7 @@ void MuzzleTarget(Entity *pokemon, Entity *target) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->muzzled.muzzled != TRUE) { entityInfo->muzzled.muzzled = TRUE; entityInfo->muzzled.muzzledTurns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1; @@ -250,7 +250,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED) TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FBF04); else { - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); iVar5 = sub_803D870(auStack544, 0); if (iVar5 == 0) @@ -280,7 +280,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) sub_806CF98(target); nullsub_87(target); sub_806CCB4(target, sub_806CEBC(target)); - CopyCyanMonsterNametoBuffer(gAvailablePokemonNames[1], entityInfo->apparentID); + CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], entityInfo->apparentID); TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FBEC0); EntityUpdateStatusSprites(target); } @@ -301,7 +301,7 @@ void MobileStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED) { SendTransformEndMessage(pokemon,target); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->transformStatus.transformStatus != STATUS_MOBILE) { entityInfo->transformStatus.transformStatus = STATUS_MOBILE; entityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1; @@ -330,7 +330,7 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->hitChanceStages[1] > 10) { entityInfo->hitChanceStages[1] = 10; flag = TRUE; @@ -386,7 +386,7 @@ void BlindTarget(Entity *pokemon, Entity *target) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->eyesightStatus.eyesightStatus != STATUS_BLINKER) { entityInfo->eyesightStatus.eyesightStatus = STATUS_BLINKER; entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1; @@ -413,7 +413,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target) if(!HasSafeguardStatus(pokemon, target, TRUE)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->eyesightStatus.eyesightStatus != STATUS_CROSS_EYED) { sub_8041E1C(target); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB834); @@ -439,7 +439,7 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->eyesightStatus.eyesightStatus != STATUS_EYEDROPS) { entityInfo->eyesightStatus.eyesightStatus = STATUS_EYEDROPS; entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1; @@ -507,7 +507,7 @@ void RaiseAtkStatTarget(Entity * pokemon, Entity *target, s32 increment) EntityInfo *entityInfo; if (EntityExists(target)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); entityInfo = GetEntInfo(target); oldStat = entityInfo->atk; @@ -537,7 +537,7 @@ void RaiseSpAtkStatTarget(Entity * pokemon, Entity *target, s32 increment) EntityInfo *entityInfo; if (EntityExists(target)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); entityInfo = GetEntInfo(target); oldStat = entityInfo->spAtk; @@ -567,7 +567,7 @@ void RaiseDefStatTarget(Entity * pokemon, Entity *target, s32 increment) EntityInfo *entityInfo; if (EntityExists(target)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); entityInfo = GetEntInfo(target); oldStat = entityInfo->def; @@ -597,7 +597,7 @@ void RaiseSpDefStatTarget(Entity * pokemon, Entity *target, s32 increment) EntityInfo *entityInfo; if (EntityExists(target)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); entityInfo = GetEntInfo(target); oldStat = entityInfo->spDef; @@ -624,7 +624,7 @@ void LongTossStatusTarget(Entity * pokemon, Entity * target) EntityInfo *entityInfo; entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); if (entityInfo->itemStatus.itemStatus != STATUS_LONG_TOSS) { entityInfo->itemStatus.itemStatus = STATUS_LONG_TOSS; sub_8041EA4(target); @@ -641,7 +641,7 @@ void PierceStatusTarget(Entity * pokemon, Entity * target) EntityInfo *entityInfo; entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); if (entityInfo->itemStatus.itemStatus != STATUS_PIERCE) { entityInfo->itemStatus.itemStatus = STATUS_PIERCE; sub_8041EB4(target); @@ -665,7 +665,7 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move * if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if ((entityInfo->charging.chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC074); } @@ -740,7 +740,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus == newStatus) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB10C); } @@ -762,7 +762,7 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_SAFEGUARD) { entityInfo->protection.protectionStatus = STATUS_SAFEGUARD; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1; @@ -782,7 +782,7 @@ void MistStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_MIST) { entityInfo->protection.protectionStatus = STATUS_MIST; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1; @@ -802,7 +802,7 @@ void WishStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_WISH) { entityInfo->protection.protectionStatus = STATUS_WISH; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1; @@ -822,7 +822,7 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_MAGIC_COAT) { entityInfo->protection.protectionStatus = STATUS_MAGIC_COAT; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1; @@ -842,7 +842,7 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_LIGHT_SCREEN) { entityInfo->protection.protectionStatus = STATUS_LIGHT_SCREEN; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1; @@ -862,7 +862,7 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_REFLECT) { entityInfo->protection.protectionStatus = STATUS_REFLECT; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1; @@ -886,11 +886,11 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->protection.protectionStatus != STATUS_PROTECT) { entityInfo->protection.protectionStatus = STATUS_PROTECT; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9B0); } else { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9D8); } EntityUpdateStatusSprites(target); @@ -903,7 +903,7 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_MIRROR_COAT) { entityInfo->protection.protectionStatus = STATUS_MIRROR_COAT; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1; @@ -923,7 +923,7 @@ void EndureStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_ENDURING) { entityInfo->protection.protectionStatus = STATUS_ENDURING; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1; @@ -943,7 +943,7 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_MIRROR_MOVE) { entityInfo->protection.protectionStatus = STATUS_MIRROR_MOVE; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1; @@ -968,7 +968,7 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target) TryDisplayDungeonLoggableMessage3(pokemon,target,*gPtrForecastPreventsConversion2Message); else { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_CONVERSION2) { entityInfo->protection.protectionStatus = STATUS_CONVERSION2; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1; @@ -989,7 +989,7 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->protection.protectionStatus != STATUS_VITAL_THROW) { entityInfo->protection.protectionStatus = STATUS_VITAL_THROW; entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1; @@ -1042,7 +1042,7 @@ void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3) else if (param_3 != 0) { sub_80420C8(target); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (statChanged) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBD18); } @@ -1159,7 +1159,7 @@ void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8 return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->sleep.sleep) { case STATUS_NONE: case 6: @@ -1209,7 +1209,7 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->nonVolatile.nonVolatileStatus) { case STATUS_NONE: case 5: @@ -1240,7 +1240,7 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->immobilize.immobilizeStatus) { case STATUS_NONE: case 8: @@ -1280,7 +1280,7 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->volatileStatus.volatileStatus) { case STATUS_NONE: case 8: @@ -1320,7 +1320,7 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->protection.protectionStatus) { case STATUS_NONE: case 0xF: @@ -1377,7 +1377,7 @@ void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->waitingStruct.waitingStatus) { case STATUS_NONE: case 4: @@ -1400,7 +1400,7 @@ void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus) sub_806CCB4(target,uVar3); gDungeon->decoyActive = FALSE; if (waitingStatus != STATUS_DECOY) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA9A0); } break; @@ -1416,7 +1416,7 @@ void SendLinkedEndMessage(Entity * pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->linked.linkedStatus) { case STATUS_NONE: @@ -1442,7 +1442,7 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->moveStatus.moveStatus) { case STATUS_NONE: case 5: @@ -1475,7 +1475,7 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->transformStatus.transformStatus) { case STATUS_NONE: case 4: @@ -1510,7 +1510,7 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->eyesightStatus.eyesightStatus) { case STATUS_NONE: case 4: @@ -1542,7 +1542,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target) return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); switch(entityInfo->muzzled.muzzled) { case FALSE: case 2: @@ -1592,7 +1592,7 @@ void SendThawedMessage(Entity *pokemon, Entity *target) entityInfo->immobilize.immobilizeStatus = STATUS_NONE; entityInfo->immobilize.immobilizeStatusTurns = 0; entityInfo->immobilize.immobilizeStatusDamageCountdown = 0; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA8BC); // $m0 thawed out! EntityUpdateStatusSprites(target); } diff --git a/src/code_807CD9C.c b/src/code_807CD9C.c index cc32babf7..d4ef26768 100644 --- a/src/code_807CD9C.c +++ b/src/code_807CD9C.c @@ -70,11 +70,11 @@ void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction) else { if (pokemon == target) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying! return; } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (HasAbility(target,ABILITY_SUCTION_CUPS)) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying! return; @@ -226,7 +226,7 @@ void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, Position *pos) info = target->info; flag = FALSE; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (HasAbility(target,ABILITY_SUCTION_CUPS)) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAE8); return; diff --git a/src/code_807E1A0.c b/src/code_807E1A0.c index 888bee3ab..bcec7c83c 100644 --- a/src/code_807E1A0.c +++ b/src/code_807E1A0.c @@ -74,12 +74,12 @@ void sub_807E254(Entity *pokemon,Entity *target) if (HasAbility(pokemon, ABILITY_SUCTION_CUPS)) { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAC0); // $m0 is anchored! It won't switch places } else if(HasAbility(target, ABILITY_SUCTION_CUPS)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAC0); // $m0 is anchored! It won't switch places } else diff --git a/src/code_8084778.c b/src/code_8084778.c index 38d1499d1..5fdf19ed1 100644 --- a/src/code_8084778.c +++ b/src/code_8084778.c @@ -13,12 +13,12 @@ void sub_8084778(void) s32 i; WonderMail *wm; - strcpy(gAvailablePokemonNames[3], gUnknown_8107224); + strcpy(gFormatBuffer_Monsters[3], gUnknown_8107224); for (i = 0; i < MAX_ACCEPTED_JOBS; i++) { wm = GetJobSlotInfo(i); if (wm->mailType == MAIL_TYPE_TAKEN_JOB && gDungeon->dungeonLocation.id == wm->unk4.dungeon.id && wm->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT) { - CopyCyanMonsterNametoBuffer(gAvailablePokemonNames[3], wm->targetSpecies); + CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[3], wm->targetSpecies); break; } } diff --git a/src/code_809447C.c b/src/code_809447C.c index f5a731af7..cab198c2a 100644 --- a/src/code_809447C.c +++ b/src/code_809447C.c @@ -57,8 +57,8 @@ static void sub_80944BC(s16 moveID, u8 *buffer) // Needed this cast/variable to match moveID_u16 = moveID_s32; sub_8092AA8(&move, moveID_u16); - sub_80928C0(gFormatItems[0], &move, NULL); - xxx_format_string(*gUnknown_811383C, buffer, buffer + 200, 0); // $m0's $i0 + sub_80928C0(gFormatBuffer_Items[0], &move, NULL); + CopyFormatString(*gUnknown_811383C, buffer, buffer + 200, 0); // $m0's $i0 } else { strncpy(buffer, gUnknown_8113080[moveID - 0x1F4].text, 200); } @@ -84,18 +84,18 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3) sub_80073B8(param_1); PrintFormatStringOnWindow(0x10,0,param_2,param_1,0); - PrintYellowDungeonNametoBuffer(gAvailablePokemonNames[0], ¶m_3->dungeonLocation); + PrintYellowDungeonNametoBuffer(gFormatBuffer_Monsters[0], ¶m_3->dungeonLocation); PrintFormatStringOnWindow(4,0x10,*gUnknown_8113850,param_1,0); // #+Place: $m0 y = 0x1A; - sub_80922B4(gAvailablePokemonNames[0], param_3->buffer1, POKEMON_NAME_LENGTH); - sub_80922B4(gAvailablePokemonNames[1], param_3->buffer2, POKEMON_NAME_LENGTH); + sub_80922B4(gFormatBuffer_Monsters[0], param_3->buffer1, POKEMON_NAME_LENGTH); + sub_80922B4(gFormatBuffer_Monsters[1], param_3->buffer2, POKEMON_NAME_LENGTH); if (sub_8094528(param_3->moveID) != 0) { // $m1 was defeated by - xxx_format_string(*gUnknown_8113868,buffer,(u8*)((u32 **)&buffer + 50),0); // TODO: fix this hack + CopyFormatString(*gUnknown_8113868,buffer,(u8*)((u32 **)&buffer + 50),0); // TODO: fix this hack } else { // $m1 - xxx_format_string(*gUnknown_8113870,buffer,(u8*)((u32 **)&buffer + 50),0); // TODO: fix this hack + CopyFormatString(*gUnknown_8113870,buffer,(u8*)((u32 **)&buffer + 50),0); // TODO: fix this hack } x = (0xb0 - sub_8008ED0(buffer)) / 2; @@ -108,46 +108,46 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3) PrintFormatStringOnWindow(x,y,buffer,param_1,0); y += 0x10; - gFormatData_202DE30[0] = param_3->exp; - gFormatData_202DE30[1] = param_3->level; - if (gFormatData_202DE30[1] >= 100) { + gFormatArgs[0] = param_3->exp; + gFormatArgs[1] = param_3->level; + if (gFormatArgs[1] >= 100) { PrintFormatStringOnWindow(4,y,*gUnknown_81138C0,param_1,0); } else { PrintFormatStringOnWindow(4,y,*gUnknown_8113898,param_1,0); } y += 0xA; - gFormatData_202DE30[0] = param_3->maxHPStat; + gFormatArgs[0] = param_3->maxHPStat; PrintFormatStringOnWindow(4,y,*gUnknown_81138D0,param_1,0); y += 0xA; - gFormatData_202DE30[0] = param_3->atk; - gFormatData_202DE30[1] = param_3->def; + gFormatArgs[0] = param_3->atk; + gFormatArgs[1] = param_3->def; if (param_3->attBoost) { - gFormatData_202DE30[0] = gFormatData_202DE30[0] + param_3->attBoost; + gFormatArgs[0] = gFormatArgs[0] + param_3->attBoost; PrintFormatStringOnWindow(4,y,*gUnknown_8113950,param_1,0); } else { PrintFormatStringOnWindow(4,y,*gUnknown_81138E4,param_1,0); } if (param_3->defBoost) { - gFormatData_202DE30[1] = gFormatData_202DE30[1] + param_3->defBoost; + gFormatArgs[1] = gFormatArgs[1] + param_3->defBoost; PrintFormatStringOnWindow(4,y,*gUnknown_8113974,param_1,0); } else { PrintFormatStringOnWindow(4,y,*gUnknown_8113900,param_1,0); } y += 0xA; - gFormatData_202DE30[0] = param_3->spAtk; - gFormatData_202DE30[1] = param_3->spDef; + gFormatArgs[0] = param_3->spAtk; + gFormatArgs[1] = param_3->spDef; if (param_3->spAttBoost) { - gFormatData_202DE30[0] = gFormatData_202DE30[0] + param_3->spAttBoost; + gFormatArgs[0] = gFormatArgs[0] + param_3->spAttBoost; PrintFormatStringOnWindow(4,y,*gUnknown_8113990,param_1,0); } else { PrintFormatStringOnWindow(4,y,*gUnknown_8113918,param_1,0); } if (param_3->spDefBoost) { - gFormatData_202DE30[1] = gFormatData_202DE30[1] + param_3->spDefBoost; + gFormatArgs[1] = gFormatArgs[1] + param_3->spDefBoost; PrintFormatStringOnWindow(4,y,*gUnknown_81139B4,param_1,0); } else { @@ -156,10 +156,10 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3) y += 0x10; item = &(param_3->heldItem); if ((param_3->heldItem.flags & ITEM_FLAG_EXISTS)) { - sub_8090E14(gFormatItems[0],item,0); + sub_8090E14(gFormatBuffer_Items[0],item,0); } else { - strcpy(gFormatItems[0],*gUnknown_81139B8); + strcpy(gFormatBuffer_Items[0],*gUnknown_81139B8); } PrintFormatStringOnWindow(4,y,*gUnknown_81139CC,param_1,0); sub_80073E0(param_1); diff --git a/src/code_809A560.c b/src/code_809A560.c index 7e6e04c2f..7f5d74596 100644 --- a/src/code_809A560.c +++ b/src/code_809A560.c @@ -8,8 +8,8 @@ IWRAM_DATA struct unkStruct_3001B64 *gUnknown_3001B64 = {0}; extern u16 gUnknown_20399DC; extern u16 gUnknown_20399DE; extern u8 gInvalidityText[]; -extern u8 gAvailablePokemonNames[]; -extern u8 gPlayerName[]; +extern u8 gFormatBuffer_Monsters[]; +extern u8 gFormatBuffer_Names[]; extern u8 ScriptPrintText_809B2B8(u32 *, u32, u32, u32); extern u32 IsTextboxOpen_809B40C(u32 *); @@ -217,8 +217,8 @@ void sub_809A83C(s16 param_1) temp->unk10 = 0; temp->faceData = NULL; temp->unk1C = 0; - strcpy(gAvailablePokemonNames + (param_1 * 0x50), gInvalidityText); - strcpy(gPlayerName + (param_1 * 0x50), gInvalidityText); + strcpy(gFormatBuffer_Monsters + (param_1 * 0x50), gInvalidityText); + strcpy(gFormatBuffer_Names + (param_1 * 0x50), gInvalidityText); if(temp->faceFile) { CloseFile(temp->faceFile); diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index 35db68c31..90c7e5ecc 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -89,7 +89,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused) if (CheckVariousConditions(pokemon)) { pokemonInfo->useHeldItem = FALSE; - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); TryDisplayDungeonLoggableMessage(pokemon, gPtrCouldntBeUsedMessage); return; } diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index ae9adba4c..69ac19d21 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -991,7 +991,7 @@ void HandleUseOrbAction(Entity *pokemon) IVar5 = *item; if (item->flags & ITEM_FLAG_STICKY) { - sub_8045BF8(gFormatItems[0], item); + sub_8045BF8(gFormatBuffer_Items[0], item); TryDisplayDungeonLoggableMessage(pokemon, *gItemStickyDoesntWorkText); return; } @@ -1018,20 +1018,20 @@ void HandleUseOrbAction(Entity *pokemon) } if (entityInfo->volatileStatus.volatileStatus == 1) { - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC714); r4 = FALSE; r8 = FALSE; } else if (entityInfo->volatileStatus.volatileStatus == 7) { - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC718); r4 = FALSE; r8 = FALSE; } else if (entityInfo->nonVolatile.nonVolatileStatus == 4) { - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC6A8); r4 = FALSE; r8 = FALSE; diff --git a/src/dungeon_ai_leader.c b/src/dungeon_ai_leader.c index fdd78037f..af590aa35 100644 --- a/src/dungeon_ai_leader.c +++ b/src/dungeon_ai_leader.c @@ -282,7 +282,7 @@ bool8 sub_8072CF4(Entity *entity) sub_80671A0(entity); break; } - SetMessageArgument(gAvailablePokemonNames[0],entity,0); + SetMessageArgument(gFormatBuffer_Monsters[0],entity,0); TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FE6D4); break; case ACTION_TALK_FIELD: @@ -310,7 +310,7 @@ bool8 sub_8072CF4(Entity *entity) HandleThrowItemAIAction(entity); break; case ACTION_SECOND_THOUGHTS: - SetMessageArgument(gAvailablePokemonNames[0],entity,0); + SetMessageArgument(gFormatBuffer_Monsters[0],entity,0); TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FE478); break; default: diff --git a/src/dungeon_cutscenes.c b/src/dungeon_cutscenes.c index 64320b194..0ebfb91ca 100644 --- a/src/dungeon_cutscenes.c +++ b/src/dungeon_cutscenes.c @@ -524,8 +524,8 @@ void sub_8086B14(void) sub_8086A3C(skarmoryEntity); diglettEntity->info->unk15C = 1; sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 2); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_DIGLETT); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_SKARMORY); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_DIGLETT); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_SKARMORY); } void sub_8086B94(void) @@ -668,9 +668,9 @@ void sub_8086E9C(void) sub_80855E4(sub_8086A3C); sub_808563C(sub_8086A3C); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_METAPOD); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_GENGAR); - CopyMonsterNametoBuffer(gAvailablePokemonNames[4], MONSTER_CATERPIE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_METAPOD); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_GENGAR); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[4], MONSTER_CATERPIE); } void sub_8086F00(void) @@ -682,9 +682,9 @@ void sub_8086F00(void) sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_METAPOD); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_GENGAR); - CopyMonsterNametoBuffer(gAvailablePokemonNames[4], MONSTER_CATERPIE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_METAPOD); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_GENGAR); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[4], MONSTER_CATERPIE); } // From @jiangzhengwenjz: @@ -835,8 +835,8 @@ void sub_8087230(void) SetFacingDirection(zapdosEntity, DIRECTION_SOUTH); sub_8086A3C(zapdosEntity); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SHIFTRY); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ZAPDOS); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SHIFTRY); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ZAPDOS); } void sub_808729C(void) @@ -858,8 +858,8 @@ void sub_808729C(void) sub_8086A3C(zapdosEntity); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SHIFTRY); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ZAPDOS); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SHIFTRY); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ZAPDOS); } void sub_8087334(u8 param_1, u8 param_2) @@ -1066,7 +1066,7 @@ void sub_80877E8(void) SetFacingDirection(moltresEntity, DIRECTION_SOUTH); sub_8086A3C(moltresEntity); sub_8085860(leaderEntity->pos.x + -3,leaderEntity->pos.y + -2); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_MOLTRES); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_MOLTRES); } void sub_8087848(void) @@ -1095,7 +1095,7 @@ void sub_8087848(void) XPos = GetCameraXPos(); YPos = GetCameraYPos(); sub_803F878(XPos, YPos + -0x1000); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_MOLTRES); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_MOLTRES); } void sub_80878F4(u8 param_1, u8 param_2) @@ -1475,7 +1475,7 @@ void sub_8087F54(void) SetFacingDirection(articunoEntity, DIRECTION_SOUTH); sub_8086A3C(articunoEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_ARTICUNO); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_ARTICUNO); } void sub_8087FB4(void) @@ -1489,7 +1489,7 @@ void sub_8087FB4(void) sub_8085930(DIRECTION_NORTH); SetFacingDirection(articunoEntity, DIRECTION_SOUTH); sub_806CDD4(articunoEntity, 0xF, DIRECTION_SOUTH); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_ARTICUNO); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_ARTICUNO); } void sub_8087FF8(void) @@ -1512,7 +1512,7 @@ void sub_8087FF8(void) sub_8086A3C(articunoEntity); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_ARTICUNO); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_ARTICUNO); } void sub_8088088(u8 param_1, u8 param_2) @@ -1768,8 +1768,8 @@ void sub_808862C(void) SetFacingDirection(groudonEntity, DIRECTION_SOUTH); sub_8086A3C(groudonEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_GROUDON); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ALAKAZAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } void sub_80886C4(void) @@ -1796,8 +1796,8 @@ void sub_80886C4(void) XPos = GetCameraXPos(); YPos = GetCameraYPos(); sub_803F878(XPos,YPos + -0x1000); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_GROUDON); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ALAKAZAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } void sub_808875C(void) @@ -1823,8 +1823,8 @@ void sub_808875C(void) sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_GROUDON); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ALAKAZAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } void sub_8088818(u8 param_1, u8 param_2) @@ -2085,8 +2085,8 @@ void sub_8088DC0(void) sub_8086A3C(alakazamEntity); sub_806CDD4(alakazamEntity,0xe,DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_GROUDON); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ALAKAZAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } void sub_8088E5C(void) @@ -2106,8 +2106,8 @@ void sub_8088E5C(void) sub_8068FE0(groudonEntity,0x21c,0); sub_8068FE0(alakazamEntity,0x21c,0); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_GROUDON); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_ALAKAZAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } void sub_8088EE8(void) @@ -2351,7 +2351,7 @@ void sub_80892C8(void) SetFacingDirection(RayquazaEntity, DIRECTION_SOUTH); sub_8086A3C(RayquazaEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_RAYQUAZA); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA); } void sub_8089328(void) @@ -2373,7 +2373,7 @@ void sub_8089328(void) sub_8086A3C(rayquazaEntity); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_RAYQUAZA); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA); } void sub_80893B4(u8 param_1, u8 param_2) @@ -2660,7 +2660,7 @@ void sub_8089914(void) SetFacingDirection(MewtwoEntity, DIRECTION_SOUTH); sub_8086A3C(MewtwoEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_MEWTWO); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_MEWTWO); } void sub_8089978(void) @@ -2684,7 +2684,7 @@ void sub_8089978(void) sub_8086A3C(MewtwoEntity); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_MEWTWO); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_MEWTWO); } void sub_8089A00(u8 param_1, u8 param_2) @@ -2809,7 +2809,7 @@ void sub_8089C44(void) sub_8085930(DIRECTION_NORTH); SetFacingDirection(EnteiEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_ENTEI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_ENTEI); } @@ -2830,7 +2830,7 @@ void sub_8089C90(void) SetFacingDirection(EnteiEntity, DIRECTION_SOUTH); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_ENTEI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_ENTEI); } void sub_8089CFC(u8 param_1, u8 param_2) @@ -2938,7 +2938,7 @@ void sub_8089EFC(void) sub_8085930(DIRECTION_NORTH); SetFacingDirection(RaikouEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_RAIKOU); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_RAIKOU); } @@ -2954,7 +2954,7 @@ void sub_8089F44(void) sub_8085930(DIRECTION_NORTH); SetFacingDirection(RaikouEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_RAIKOU); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_RAIKOU); } @@ -2975,7 +2975,7 @@ void sub_8089F8C(void) SetFacingDirection(RaikouEntity, DIRECTION_SOUTH); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_RAIKOU); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_RAIKOU); } void sub_8089FF0(u8 param_1, u8 param_2) @@ -3095,7 +3095,7 @@ void sub_808A264(void) SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH); sub_8086A3C(SuicuneEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SUICUNE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SUICUNE); } void sub_808A2C0(void) @@ -3110,7 +3110,7 @@ void sub_808A2C0(void) sub_8085930(DIRECTION_NORTH); SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SUICUNE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SUICUNE); } void sub_808A308(void) @@ -3130,7 +3130,7 @@ void sub_808A308(void) SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SUICUNE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SUICUNE); } void sub_808A36C(u8 param_1, u8 param_2) @@ -3271,7 +3271,7 @@ void sub_808A608(void) SetFacingDirection(HoOhEntity, DIRECTION_SOUTH); sub_8086A3C(HoOhEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -6); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_HO_OH); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_HO_OH); } void sub_808A668(void) @@ -3294,7 +3294,7 @@ void sub_808A668(void) sub_8086A3C(HoOhEntity); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 6); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_HO_OH); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_HO_OH); } void sub_808A6E8(u8 param_1, u8 param_2) @@ -3447,7 +3447,7 @@ void sub_808A9E4(void) sub_80855E4(sub_8086A3C); SetFacingDirection(LatiosEntity, DIRECTION_NORTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 4); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_LATIOS); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS); } void sub_808AA3C(void) @@ -3463,7 +3463,7 @@ void sub_808AA3C(void) sub_80855E4(sub_8086A3C); SetFacingDirection(LatiosEntity, DIRECTION_NORTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_LATIOS); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS); } void sub_808AA94(void) @@ -3479,7 +3479,7 @@ void sub_808AA94(void) sub_80855E4(sub_8086A3C); sub_8068FE0(LatiosEntity,0x21c,0); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_LATIOS); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS); } void sub_808AAF0(u8 param_1, u8 param_2) @@ -3593,7 +3593,7 @@ void sub_808ACC0(void) sub_8098044(0x22); sub_8098044(0x1d); sub_80855E4(SetupRegiFacingDirection); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_REGIROCK); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_REGIROCK); } } @@ -3620,7 +3620,7 @@ void sub_808AD48(void) sub_8098044(0x22); sub_8098044(0x1d); sub_80855E4(SetupRegiFacingDirection); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_REGICE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_REGICE); } } @@ -3648,7 +3648,7 @@ void sub_808ADCC(void) sub_8098044(0x22); sub_8098044(0x1d); sub_80855E4(SetupRegiFacingDirection); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_REGISTEEL); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_REGISTEEL); } } @@ -3728,7 +3728,7 @@ void sub_808AFB0(u8 param_1) sub_8052D44(IDStack,leaderEntity,0); if (!sub_8098100(0x22) && (param_1 == 0x2E) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ROCK_PART) != 0)) { sub_8097FD0(0x1d); - SetMessageArgument(gAvailablePokemonNames[0],GetLeader(),0); + SetMessageArgument(gFormatBuffer_Monsters[0],GetLeader(),0); // {POKEMON_0} obtained the Rock Part that Regirock was guarding DisplayDungeonDialogue(&gRegirockPostFightDialogue_2); sub_80421C0(0,0xd4); @@ -3746,7 +3746,7 @@ void sub_808B030(u8 param_1) sub_8052D44(IDStack,leaderEntity,0); if (!sub_8098100(0x22) && (param_1 == 0x2F) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ICE_PART) != 0)) { sub_8097FD0(0x1d); - SetMessageArgument(gAvailablePokemonNames[0],GetLeader(),0); + SetMessageArgument(gFormatBuffer_Monsters[0],GetLeader(),0); // {POKEMON_0} obtained the Ice Part that Regice was guarding DisplayDungeonDialogue(&gRegicePostFightDialogue_2); sub_80421C0(0,0xd4); @@ -3764,7 +3764,7 @@ void sub_808B0B0(u8 param_1) sub_8052D44(IDStack,leaderEntity,0); if (!sub_8098100(0x22) && (param_1 == 0x30) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_STEEL_PART) != 0)) { sub_8097FD0(0x1d); - SetMessageArgument(gAvailablePokemonNames[0], GetLeader(), 0); + SetMessageArgument(gFormatBuffer_Monsters[0], GetLeader(), 0); // {POKEMON_0} obtained the Steel Part that Registeel was guarding DisplayDungeonDialogue(&gRegisteelPostFightDialogue_2); sub_80421C0(0,0xd4); @@ -3880,7 +3880,7 @@ void sub_808B2F4(void) SetFacingDirection(jirachiEntity, DIRECTION_SOUTH); sub_8086A3C(jirachiEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_JIRACHI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI); } void sub_808B35C(void) @@ -3905,7 +3905,7 @@ void sub_808B35C(void) } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_JIRACHI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI); } void sub_808B3E4(u8 param_1, u8 param_2, u8 param_3) @@ -3965,7 +3965,7 @@ void sub_808B50C(void) Entity * jirachiEntity; jirachiEntity = GetEntityFromClientType(0x1a); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_JIRACHI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI); sub_80855E4(sub_808BBA8); sub_808BBA8(jirachiEntity); sub_8041888(0); @@ -4006,7 +4006,7 @@ void JirachiWish(void) Position pos3; jirachiEntity = GetEntityFromClientType(0x1a); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_JIRACHI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI); sub_80855E4(sub_808BBA8); sub_808BBA8(jirachiEntity); sub_8041888(0); @@ -4117,8 +4117,8 @@ void JirachiWish(void) UnlockFriendArea(friendArea); PlaySoundEffect(0xd4); leaderEntity = GetLeader(); - SetMessageArgument(gAvailablePokemonNames[0],leaderEntity,0); - WriteFriendAreaName(gFormatItems[0],friendArea,FALSE); + SetMessageArgument(gFormatBuffer_Monsters[0],leaderEntity,0); + WriteFriendAreaName(gFormatBuffer_Items[0],friendArea,FALSE); // Obtained the friend area! DisplayDungeonDialogue(&gUnknown_8105B68); } @@ -4384,7 +4384,7 @@ void sub_808BDEC(void) SetFacingDirection(lugiaEntity, DIRECTION_SOUTH); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_LUGIA); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_LUGIA); } void sub_808BE70(u8 param_1,u8 param_2,u8 param_3) @@ -4525,8 +4525,8 @@ void sub_808C10C(void) XPos = GetCameraXPos(); YPos = GetCameraYPos(); sub_803F878(XPos,YPos + -0x1000); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2],MONSTER_KYOGRE); - CopyMonsterNametoBuffer(gAvailablePokemonNames[3], MONSTER_GROUDON); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2],MONSTER_KYOGRE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[3], MONSTER_GROUDON); } void sub_808C1A4(u8 param_1,u8 param_2,u8 param_3) @@ -4639,7 +4639,7 @@ void sub_808C3A0(void) sub_808563C(SetupDeoxysFacingDirection); } sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_DEOXYS_NORMAL); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_DEOXYS_NORMAL); } void sub_808C414(u8 param_1,u8 param_2,u8 param_3) @@ -4742,7 +4742,7 @@ void sub_808C5C0(void) XPos = GetCameraXPos(); YPos = GetCameraYPos(); sub_803F878(XPos,YPos - 0x1000); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_CELEBI); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_CELEBI); } void nullsub_100(u8 r0, u8 r1, u8 r3) @@ -4944,7 +4944,7 @@ void sub_808C9C4(void) sub_80855E4(sub_8086A3C); SetFacingDirection(medichamEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_MEDICHAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_MEDICHAM); } void MedichamRescueDialogue(void) @@ -5011,7 +5011,7 @@ void sub_808CB5C(void) sub_8085930(DIRECTION_NORTH); sub_8068FE0(medichamEntity, 0x21C, 0); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_MEDICHAM); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_MEDICHAM); } void DummyFightDialogue(void) @@ -5031,7 +5031,7 @@ void sub_808CBB0(void) sub_80855E4(sub_8086A3C); SetFacingDirection(smeargleEntity, DIRECTION_SOUTH); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SMEARGLE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SMEARGLE); } void SmeargleRescueDialogue(void) @@ -5102,7 +5102,7 @@ void sub_808CD44(void) sub_80855E4(sub_8086A3C); sub_8068FE0(smeargleEntity, 540, 0); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3); - CopyMonsterNametoBuffer(gAvailablePokemonNames[2], MONSTER_SMEARGLE); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[2], MONSTER_SMEARGLE); } void sub_808CD9C(void) diff --git a/src/dungeon_items.c b/src/dungeon_items.c index 4b2fb2ff2..b49563d19 100644 --- a/src/dungeon_items.c +++ b/src/dungeon_items.c @@ -149,7 +149,7 @@ void MusicBoxCreation(void) sub_80416E0(&entity->pixelPos,0x10c,FALSE); sub_80421C0(entity,0xd7); sub_803E708(0x3c,0x41); - SetMessageArgument(gAvailablePokemonNames[0],entity,0); + SetMessageArgument(gFormatBuffer_Monsters[0],entity,0); DisplayDungeonMessage(0,*gUnknown_81053A8,1); sub_803E708(10,0x41); PlaySoundEffect(0xd4); diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 214971ef0..470ff08c8 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -220,7 +220,7 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2) break; gDungeon->unk1BDD4.unk1C054[gDungeon->unk1BDD4.unk1C060] = r7; - str = xxx_format_string(str, txt, txt + 62, 128); + str = CopyFormatString(str, txt, txt + 62, 128); if (*str == '\r') str++; if (*str == '\n') str++; CopyStringToMessageLog(txt, r7, r8); @@ -435,34 +435,34 @@ void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo) EntityInfo *leaderInfo = GetEntInfo(leader); PokemonStruct2 *monStruct2 = &gRecruitedPokemonRef->pokemon2[leaderInfo->teamIndex]; - sub_808DA0C(gAvailablePokemonNames[0], monStruct2); + sub_808DA0C(gFormatBuffer_Monsters[0], monStruct2); leaderId = leaderInfo->apparentID; } else { leaderId = MONSTER_NONE; - strcpy(gAvailablePokemonNames[0], gUnknown_80F7AF8); // ?? + strcpy(gFormatBuffer_Monsters[0], gUnknown_80F7AF8); // ?? } if (partner != NULL) { EntityInfo *partnerInfo = GetEntInfo(partner); PokemonStruct2 *monStruct2 = &gRecruitedPokemonRef->pokemon2[partnerInfo->teamIndex]; - sub_808DA0C(gAvailablePokemonNames[1], monStruct2); + sub_808DA0C(gFormatBuffer_Monsters[1], monStruct2); partnerId = partnerInfo->apparentID; } else { partnerId = MONSTER_NONE; - strcpy(gAvailablePokemonNames[1], gUnknown_80F7AF8); // ?? + strcpy(gFormatBuffer_Monsters[1], gUnknown_80F7AF8); // ?? } switch (dialogueInfo->unk4) { case 425: dialogueMonId = leaderId; - sprintfStatic(gUnknown_202E5D8, gUnknown_80F7AFC, gAvailablePokemonNames); + sprintfStatic(gUnknown_202E5D8, gUnknown_80F7AFC, gFormatBuffer_Monsters); break; case 426: dialogueMonId = partnerId; - sprintfStatic(gUnknown_202E5D8, gUnknown_80F7AFC, gAvailablePokemonNames[1]); + sprintfStatic(gUnknown_202E5D8, gUnknown_80F7AFC, gFormatBuffer_Monsters[1]); break; case 427: dialogueMonId = MONSTER_NONE; @@ -624,20 +624,20 @@ s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const void sub_8052D44(s16 *ids, Entity *leader, Entity *partner) { if (EntityExists(leader)) { - SetMessageArgument(gAvailablePokemonNames[0], leader, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], leader, 0); ids[0] = GetEntInfo(leader)->apparentID; } else { - strcpy(gAvailablePokemonNames[0], gUnknown_80F7AF8); + strcpy(gFormatBuffer_Monsters[0], gUnknown_80F7AF8); ids[0] = 0; } if (EntityExists(partner)) { - SetMessageArgument(gAvailablePokemonNames[1], partner, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], partner, 0); ids[1] = GetEntInfo(partner)->apparentID; } else { - strcpy(gAvailablePokemonNames[1], gUnknown_80F7AF8); + strcpy(gFormatBuffer_Monsters[1], gUnknown_80F7AF8); ids[1] = 0; } } diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 2c1b2391e..8f0f73e1a 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -552,7 +552,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move s16 targetFlags = GetMoveTargetAndRangeForPokemon(attacker, move, FALSE); s32 targetFlagsAnd = targetFlags & 0xF; if ((targetFlagsAnd == 0 || targetFlagsAnd == 4 || targetFlagsAnd == 5 || targetFlagsAnd == 2) && !r4) { - SetMessageArgument(gAvailablePokemonNames[1], currTarget, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], currTarget, 0); TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC574); // protected itself! moveHits = FALSE; } @@ -565,7 +565,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move if (moveHits) { if (HasAbility(currTarget, ABILITY_SOUNDPROOF) && IsSoundMove(move)) { - SetMessageArgument(gAvailablePokemonNames[1], currTarget, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], currTarget, 0); TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move! moveHits = FALSE; } @@ -596,7 +596,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move else { sub_80421C0(attacker, 0x157); } - SetMessageArgument_2(gAvailablePokemonNames[1], GetEntInfo(currTarget), 0); + SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(currTarget), 0); // Interesting that these 3 strings are the same. Curious if that's the case in Blue/Europe versions. if (attacker == currTarget) { TryDisplayDungeonLoggableMessage3(attacker, attacker, gUnknown_80F9380); // The move missed @@ -1699,7 +1699,7 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam HandleDealingDamage(attacker, target, dmgStruct, isFalseSwipe, TRUE, unk, TRUE, 0); } else { - SetMessageArgument_2(gAvailablePokemonNames[1], GetEntInfo(target), 0); + SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(target), 0); if (sub_8045888(attacker) && sub_8045888(target)) { sub_803ED30(9999, target, 1, -1); TryDisplayDungeonLoggableMessage4(attacker, target, gUnknown_80F9688); // It took no damage! @@ -1806,17 +1806,17 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 attackerInfo->abilityEffectFlags = 0; attackerInfo->unk159 = 0; if (attackerInfo->volatileStatus.volatileStatus == STATUS_CRINGE) { - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC714); // is cringing! return FALSE; } else if (attackerInfo->volatileStatus.volatileStatus == STATUS_INFATUATED) { - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC718); // is infatuated! return FALSE; } else if (attackerInfo->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) { - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6A8); // is paralyzed! return FALSE; } @@ -1870,7 +1870,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 } else { if (!statusMoveMatch) { - sub_80928C0(gFormatItems[0], currMove, NULL); + sub_80928C0(gFormatBuffer_Items[0], currMove, NULL); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80F93C8); // The move can't be used! moveUsable = FALSE; } @@ -1885,7 +1885,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 Move assistMove = *currMove; assistMove.id = sub_8057144(attacker); - sub_80928C0(gFormatItems[0], &assistMove, NULL); + sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FD2DC); // Assist: moveWasUsed = TryUseChosenMove(attacker, var_34, itemId, arg_0, isLinkedMove, &assistMove); } @@ -1935,7 +1935,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 assistMove = mimicMove; assistMove.id = sub_8057144(attacker); movePtr = &assistMove; - sub_80928C0(gFormatItems[0], &assistMove, NULL); + sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FD2DC); // Assist: } TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr); @@ -2007,7 +2007,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker) InfatuateStatusTarget(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_STENCH) { - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEFD0); // A horrid stench billowed out sub_80428A0(attacker); entInfo->terrifiedTurns = gUnknown_80F5004; @@ -2075,8 +2075,8 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, } } - SetMessageArgument_2(gAvailablePokemonNames[0], GetEntInfo(attacker), 0); - sub_80928C0(gFormatItems[0], move, NULL); + SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0); + sub_80928C0(gFormatBuffer_Items[0], move, NULL); if (MoveMatchesChargingStatus(attacker, move)) { msg = gUnknown_80FC72C; // mon loosed move GetEntInfo(attacker)->unkFF = 0; @@ -2097,22 +2097,22 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, } if (GetEntInfo(attacker)->muzzled.muzzled == TRUE && FailsWhileMuzzled(move->id)) { - SetMessageArgument(gAvailablePokemonNames[0], attacker, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0); TryDisplayDungeonLoggableMessage(attacker, msg); sub_803E708(0xA, 0x3F); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC710); // is muzzled! return FALSE; } else if (!moveUsable) { - SetMessageArgument_2(gAvailablePokemonNames[0], GetEntInfo(attacker), 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0); if (itemId == 0) { - sub_80928C0(gFormatItems[0], move, NULL); + sub_80928C0(gFormatBuffer_Items[0], move, NULL); TryDisplayDungeonLoggableMessage(attacker, msg); sub_803E708(0xA, 0x3F); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6D0); // But the move couldn't be used! } else { - BufferItemName(gFormatItems[0], itemId, NULL); + BufferItemName(gFormatBuffer_Items[0], itemId, NULL); TryDisplayDungeonLoggableMessage(attacker, msg); sub_803E708(0xA, 0x3F); TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used! @@ -2229,12 +2229,12 @@ bool8 sub_8056468(Entity *entity, Move *move, const u8 *str, Entity **unkArray, } if (r7) { - SetMessageArgument_2(gAvailablePokemonNames[0], GetEntInfo(entity), 0); + SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(entity), 0); if (itemId == 0) { - sub_80928C0(gFormatItems[0], move, NULL); + sub_80928C0(gFormatBuffer_Items[0], move, NULL); } else { - BufferItemName(gFormatItems[0], itemId, NULL); + BufferItemName(gFormatBuffer_Items[0], itemId, NULL); } } diff --git a/src/dungeon_pokemon_attributes.c b/src/dungeon_pokemon_attributes.c index 04cb4ae2b..f7036aad8 100644 --- a/src/dungeon_pokemon_attributes.c +++ b/src/dungeon_pokemon_attributes.c @@ -28,7 +28,7 @@ bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage { if (target->info->protection.protectionStatus == STATUS_SAFEGUARD) { if (displayMessage) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC2FC); } return TRUE; @@ -40,7 +40,7 @@ bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage) { if (target->info->protection.protectionStatus == STATUS_MIST) { if (displayMessage) { - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FC31C); } return TRUE; @@ -48,7 +48,7 @@ bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage) else { if (HasAbility(target, ABILITY_CLEAR_BODY) || HasAbility(target, ABILITY_WHITE_SMOKE)) { if (displayMessage) { - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCEFC); } return TRUE; diff --git a/src/felicity_bank.c b/src/felicity_bank.c index 5c079292f..46f79fb5c 100644 --- a/src/felicity_bank.c +++ b/src/felicity_bank.c @@ -60,9 +60,9 @@ bool8 CreateFelicityBank(s32 mode) sFelicityBankWork->menuAction = 0; sFelicityBankWork->mode = mode; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PERSIAN); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_PERSIAN); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_PERSIAN); monName = GetMonSpecies(MONSTER_PERSIAN); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); if (sFelicityBankWork->mode == FEL_MODE_ASLEEP) sFelicityBankWork->monPortraitPtr = NULL; @@ -177,7 +177,7 @@ static void UpdateFelicityBankDialogue(void) CreateMenuDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY], 0, sFelicityBankWork->menuAction, sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->monPortraitPtr, 0xC); else { - gFormatData_202DE30[0] = gTeamInventoryRef->teamSavings; + gFormatArgs[0] = gTeamInventoryRef->teamSavings; CreateMenuDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY], 0, sFelicityBankWork->menuAction, sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->monPortraitPtr, 0xC); } @@ -191,7 +191,7 @@ static void UpdateFelicityBankDialogue(void) if (gTeamInventoryRef->teamSavings == 0) CreateDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__NO_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); else { - gFormatData_202DE30[0] = gTeamInventoryRef->teamSavings; + gFormatArgs[0] = gTeamInventoryRef->teamSavings; CreateDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__HAS_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } break; @@ -230,7 +230,7 @@ static void UpdateFelicityBankDialogue(void) break; case FELICITY_BANK_STORE_RECEIPT: sFelicityBankWork->fallbackState = 1; - gFormatData_202DE30[0] = sFelicityBankWork->chosenAmount; + gFormatArgs[0] = sFelicityBankWork->chosenAmount; CreateDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__RECEIPT], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; case FELICITY_BANK_TAKE: @@ -244,7 +244,7 @@ static void UpdateFelicityBankDialogue(void) } else { sFelicityBankWork->fallbackState = FELICITY_BANK_TAKE_HOW_MUCH; - gFormatData_202DE30[0] = gTeamInventoryRef->teamSavings; + gFormatArgs[0] = gTeamInventoryRef->teamSavings; CreateDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__HOW_MUCH], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } break; @@ -268,7 +268,7 @@ static void UpdateFelicityBankDialogue(void) break; case FELICITY_BANK_TAKE_DEPOSIT: sFelicityBankWork->fallbackState = 1; - gFormatData_202DE30[0] = sFelicityBankWork->chosenAmount; + gFormatArgs[0] = sFelicityBankWork->chosenAmount; CreateDialogueBoxAndPortrait(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__RECEIPT], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; } diff --git a/src/friend_area_action_menu.c b/src/friend_area_action_menu.c index 335075dfd..54f9a468e 100644 --- a/src/friend_area_action_menu.c +++ b/src/friend_area_action_menu.c @@ -702,7 +702,7 @@ void sub_8027D40(u32 r0, BulkItem *heldItem) a3.unk4 = 0; a3.unk8 = 1; slot.flags = ITEM_FLAG_EXISTS; - sub_8090E14(gFormatItems[0], &slot, &a3); + sub_8090E14(gFormatBuffer_Items[0], &slot, &a3); PrintFormatStringOnWindow(4, 3, sItemBuffered, r0, 0); sub_80073E0(r0); } diff --git a/src/friend_list_menu.c b/src/friend_list_menu.c index b9cf7f1ee..43700b83c 100644 --- a/src/friend_list_menu.c +++ b/src/friend_list_menu.c @@ -199,8 +199,8 @@ void sub_8025518(void) sub_8025E68(3,&gUnknown_203B2B4->item2); } sub_8023DA4(); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0],gUnknown_203B2B4->pokeStruct,7); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[1],gUnknown_203B2B4->pokeStruct,6); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],gUnknown_203B2B4->pokeStruct,7); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[1],gUnknown_203B2B4->pokeStruct,6); sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->menuAction1,2); break; case FRIEND_LIST_MENU_STATE_SUMMARY: @@ -540,7 +540,7 @@ void sub_8025CB4(void) a3.unk4 = 0; a3.unk8 = 1; item.flags = ITEM_FLAG_EXISTS; - sub_8090E14(gFormatItems[1],&item,&a3); + sub_8090E14(gFormatBuffer_Items[1],&item,&a3); GivePokemonItem(gUnknown_203B2B4->species,&gUnknown_203B2B4->item1); sub_801A928(); nullsub_104(); @@ -640,7 +640,7 @@ void sub_8025E68(u32 r0, BulkItem *heldItem) a3.unk4 = 0; a3.unk8 = 1; item.flags = ITEM_FLAG_EXISTS; - sub_8090E14(gFormatItems[0], &item, &a3); + sub_8090E14(gFormatBuffer_Items[0], &item, &a3); PrintFormatStringOnWindow(4, 3, sItemBuffered, r0, 0); sub_80073E0(r0); } diff --git a/src/friend_rescue.c b/src/friend_rescue.c index 8c754a7be..bea103414 100644 --- a/src/friend_rescue.c +++ b/src/friend_rescue.c @@ -325,7 +325,7 @@ u32 CreateFriendRescueMenu(void) gUnknown_203B33C->speciesNum = -1; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0],monName); + strcpy(gFormatBuffer_Monsters[0],monName); for(counter = 0; counter < 0x36; counter++){ gUnknown_203B33C->passwordBuffer[counter] = 0; } @@ -2916,7 +2916,7 @@ void sub_80352A4(void) sub_802F2C0(); CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); mailIndex = GetMailIndex(6, gUnknown_203B33C->unk420); DeleteMailAtIndex(mailIndex); SetFriendRescueMenuState(0x70); diff --git a/src/ground_script_1.c b/src/ground_script_1.c index cc34579e1..412efd5ea 100644 --- a/src/ground_script_1.c +++ b/src/ground_script_1.c @@ -129,7 +129,7 @@ void DeleteGroundEffects(void); u32 sub_80A14E8(u32, u8, u32, u32); s16 HandleAction(void *, DebugLocation *); -extern int gFormatData_202DE30[10]; +extern int gFormatArgs[10]; extern s16 gCurrentMap; extern s16 gUnknown_2039A32; @@ -707,7 +707,7 @@ s32 ExecuteScriptCommand(Action *action) { case 0: o = 1; break; case 2: o = -1; break; } - gFormatData_202DE30[curCmd.argShort] = GetDungeonFloorCount(a) + o; + gFormatArgs[curCmd.argShort] = GetDungeonFloorCount(a) + o; break; } } diff --git a/src/gulpin_shop.c b/src/gulpin_shop.c index 178b95f99..5153212a4 100644 --- a/src/gulpin_shop.c +++ b/src/gulpin_shop.c @@ -151,8 +151,8 @@ static void sub_801EA28(void) break; case 4: sub_801EC7C(); - sub_8092C84(gAvailablePokemonNames[0], sGulpinShopWork->unk1C); - sub_8092C84(gAvailablePokemonNames[1], sGulpinShopWork->unk1E); + sub_8092C84(gFormatBuffer_Monsters[0], sGulpinShopWork->unk1C); + sub_8092C84(gFormatBuffer_Monsters[1], sGulpinShopWork->unk1E); switch (sGulpinShopWork->mode) { case GULPIN_SHOP_MODE_AWAKE: diff --git a/src/gulpin_shop_801FB50.c b/src/gulpin_shop_801FB50.c index 84755ffb1..bde6bdc8b 100644 --- a/src/gulpin_shop_801FB50.c +++ b/src/gulpin_shop_801FB50.c @@ -89,10 +89,10 @@ bool8 sub_801FB50(u32 mode) gUnknown_203B27C->mode = mode; gUnknown_203B27C->unk15 = FALSE; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_GULPIN); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_GULPIN); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_GULPIN); name = GetMonSpecies(MONSTER_GULPIN); - strcpy(gAvailablePokemonNames[6], name); - PrintPokeNameToBuffer(gAvailablePokemonNames[4], GetPlayerPokemonStruct()); + strcpy(gFormatBuffer_Monsters[6], name); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[4], GetPlayerPokemonStruct()); if (gUnknown_203B27C->mode == GULPIN_SHOP_MODE_ASLEEP) gUnknown_203B27C->monPortraitPtr = NULL; @@ -349,7 +349,7 @@ static void sub_801FF28(void) case 0x19: sub_8094060(gUnknown_203B27C->moves,gUnknown_203B27C->pokeStruct->moves); gUnknown_203B27C->fallbackState = 0x10; - sub_8092C84(gAvailablePokemonNames[0],gUnknown_203B27C->unk1E); + sub_8092C84(gFormatBuffer_Monsters[0],gUnknown_203B27C->unk1E); CreateDialogueBoxAndPortrait(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_10],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0x1a: @@ -397,7 +397,7 @@ static void sub_801FF28(void) break; case 0x22: sub_80208B0(); - sub_8092C84(gAvailablePokemonNames[1],gUnknown_203B27C->unk20); + sub_8092C84(gFormatBuffer_Monsters[1],gUnknown_203B27C->unk20); if (gUnknown_203B27C->isNextMoveLinked) { CreateMenuDialogueBoxAndPortrait(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_18],0,0x11,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0, gUnknown_203B27C->monPortraitPtr,0xc); @@ -409,7 +409,7 @@ static void sub_801FF28(void) break; case 0x23: gUnknown_203B27C->fallbackState = 0x1f; - sub_8092C84(gAvailablePokemonNames[1],gUnknown_203B27C->unk20); + sub_8092C84(gFormatBuffer_Monsters[1],gUnknown_203B27C->unk20); if (gUnknown_203B27C->isNextMoveLinked) { CreateDialogueBoxAndPortrait(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_20],0,gUnknown_203B27C->monPortraitPtr,0x10d); @@ -691,14 +691,14 @@ static void sub_8020A80(void) gUnknown_203B27C->speciesNum = sub_8023B44(); gUnknown_203B27C->pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B27C->speciesNum]; gUnknown_203B27C->isTeamLeader = gUnknown_203B27C->pokeStruct->isTeamLeader; - PrintPokeNameToBuffer(gAvailablePokemonNames[5], gUnknown_203B27C->pokeStruct); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[5], gUnknown_203B27C->pokeStruct); sub_801FDA8(0x11); break; case 4: gUnknown_203B27C->speciesNum = sub_8023B44(); gUnknown_203B27C->pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B27C->speciesNum]; gUnknown_203B27C->isTeamLeader = gUnknown_203B27C->pokeStruct->isTeamLeader; - PrintPokeNameToBuffer(gAvailablePokemonNames[5], gUnknown_203B27C->pokeStruct); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[5], gUnknown_203B27C->pokeStruct); sub_801FDA8(0x12); break; case 0: diff --git a/src/iq_skill_info_menu.c b/src/iq_skill_info_menu.c index 289abd286..d9fa68bb4 100644 --- a/src/iq_skill_info_menu.c +++ b/src/iq_skill_info_menu.c @@ -84,7 +84,7 @@ static void sub_801C6E4(void) CallPrepareTextbox_8008C54(sIQSkillInfoMenu->unk24); sub_80073B8(sIQSkillInfoMenu->unk24); skillName = GetIQSkillName(sIQSkillInfoMenu->chosenIQSkill); - strcpy(gFormatItems[0], skillName); + strcpy(gFormatBuffer_Items[0], skillName); PrintFormatStringOnWindow(16, 0, sFmtMoveItem0, 0, 0); // {MOVE_ITEM_0} PrintStringOnWindow(8, 16, GetIQSkillDescription(sIQSkillInfoMenu->chosenIQSkill), sIQSkillInfoMenu->unk24, 0); sub_80073E0(sIQSkillInfoMenu->unk24); @@ -95,7 +95,7 @@ static void sub_801C6E4(void) CallPrepareTextbox_8008C54(sIQSkillInfoMenu->unk24); sub_80073B8(sIQSkillInfoMenu->unk24); preload = sIQSkillInfoMenu->unk10[sIQSkillInfoMenu->unk8]; - strcpy(gAvailablePokemonNames[0], preload->pokeName); + strcpy(gFormatBuffer_Monsters[0], preload->pokeName); PrintFormatStringOnWindow(16, 0, sFmtPkmn0, sIQSkillInfoMenu->unk24, 0); // {POKEMON_0} PrintFormatStringOnWindow(4, 16, sIQSkillInfoMenu->unk10[sIQSkillInfoMenu->unk8]->unk4, sIQSkillInfoMenu->unk24, 0); sub_80073E0(sIQSkillInfoMenu->unk24); diff --git a/src/iq_skill_list_menu.c b/src/iq_skill_list_menu.c index 1e9c74707..bf26ca498 100644 --- a/src/iq_skill_list_menu.c +++ b/src/iq_skill_list_menu.c @@ -140,12 +140,12 @@ void BuildIQSkillList(void) skillIndex = sIQSkillListMenu->iqSkills[(sIQSkillListMenu->s24.s0.input.unk1E * sIQSkillListMenu->s24.s0.input.unk1C) + counter]; y = sub_8013800(&sIQSkillListMenu->s24.s0.input, counter); - strncpy(gFormatItems[1], GetIQSkillName(skillIndex), 80); + strncpy(gFormatBuffer_Items[1], GetIQSkillName(skillIndex), 80); if (IsIQSkillSet((u8 *)&sIQSkillListMenu->pokeStruct->IQSkills, 1 << skillIndex)) - strcpy(gFormatItems[1] - 80, sStarBullet); + strcpy(gFormatBuffer_Items[1] - 80, sStarBullet); else - strcpy(gFormatItems[1] - 80, sUnknown_80DBE18); + strcpy(gFormatBuffer_Items[1] - 80, sUnknown_80DBE18); PrintFormatStringOnWindow(12, y, sFmt01, sIQSkillListMenu->s24.s0.unk34, 0); } diff --git a/src/items.c b/src/items.c index 5d0517bcb..7db1ef6ff 100644 --- a/src/items.c +++ b/src/items.c @@ -640,7 +640,7 @@ u32 sub_80913E0(Item* slot, u32 a2, struct subStruct_203B240 ** a3) BufferItemName(buffer88, slot->id, NULL); if (slot->id == ITEM_TM_USED_TM) { // empty TM - BufferItemName(gFormatItems[0], (u8)(slot->quantity + 125), NULL); + BufferItemName(gFormatBuffer_Items[0], (u8)(slot->quantity + 125), NULL); } sub_80073B8(a2); PrintFormatStringOnWindow(16, 0, buffer88, a2, 0); @@ -660,7 +660,7 @@ u32 sub_80913E0(Item* slot, u32 a2, struct subStruct_203B240 ** a3) typestring = GetUnformattedTypeString(moves_data); PrintFormatStringOnWindow(64, 84, typestring, a2, 0); result = GetMoveBasePP(buffer8); - gFormatData_202DE30[0] = result; + gFormatArgs[0] = result; PrintFormatStringOnWindow(128, 84, gPtrPPD0Text, a2, 0); } diff --git a/src/kangaskhan_storage1.c b/src/kangaskhan_storage1.c index 070266611..f3753911e 100644 --- a/src/kangaskhan_storage1.c +++ b/src/kangaskhan_storage1.c @@ -56,9 +56,9 @@ bool8 CreateKangaskhanStorage(u32 mode) gKangaskhanStorageWork->menuAction3 = 0; gKangaskhanStorageWork->mode = mode; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KANGASKHAN); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_KANGASKHAN); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_KANGASKHAN); monName = GetMonSpecies(MONSTER_KANGASKHAN); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); if (gKangaskhanStorageWork->mode == KANG_MODE_ASLEEP) gKangaskhanStorageWork->monPortraitPtr = NULL; @@ -228,7 +228,7 @@ static void sub_8016FF8(void) CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_FULL], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case KANGASKHAN_STORAGE_IS_MONEY_USED_TM: - sub_8090E14(gFormatItems[0], &gKangaskhanStorageWork->storedItem, 0); + sub_8090E14(gFormatBuffer_Items[0], &gKangaskhanStorageWork->storedItem, 0); gKangaskhanStorageWork->fallbackState = 14; gKangaskhanStorageWork->monPortrait.spriteId = FALSE; CreateDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__INVALID_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); @@ -261,7 +261,7 @@ static void sub_8016FF8(void) break; case 17: sub_80177F8(); - sub_8090E14(gFormatItems[0], &gKangaskhanStorageWork->storedItem, 0); + sub_8090E14(gFormatBuffer_Items[0], &gKangaskhanStorageWork->storedItem, 0); gKangaskhanStorageWork->monPortrait.spriteId = FALSE; CreateMenuDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_ONE_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, gKangaskhanStorageWork->monPortraitPtr, 12); @@ -330,7 +330,7 @@ static void sub_8016FF8(void) break; case 27: sub_80177F8(); - sub_8090E14(gFormatItems[0], &gKangaskhanStorageWork->storedItem, 0); + sub_8090E14(gFormatBuffer_Items[0], &gKangaskhanStorageWork->storedItem, 0); gKangaskhanStorageWork->monPortrait.spriteId = FALSE; CreateMenuDialogueBoxAndPortrait(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WITHDRAW_ONE_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, gKangaskhanStorageWork->monPortraitPtr, 12); diff --git a/src/kecleon_bros1.c b/src/kecleon_bros1.c index c83aa8273..1d721c625 100644 --- a/src/kecleon_bros1.c +++ b/src/kecleon_bros1.c @@ -73,33 +73,33 @@ bool8 CreateKecleonBros(u32 mode) sKecleonBrosWork1->isKecleonItemShop = TRUE; sKecleonBrosWork1->monPortraitPtr = &sKecleonBrosWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_KECLEON); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); break; case KECLEON_BROS_MODE_ITEMS_ASLEEP: sKecleonBrosWork1->isKecleonItemShop = TRUE; sKecleonBrosWork1->monPortraitPtr = NULL; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_KECLEON); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); break; case KECLEON_BROS_MODE_WARES_AWAKE: sKecleonBrosWork1->isKecleonItemShop = FALSE; sKecleonBrosWork1->monPortraitPtr = &sKecleonBrosWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_KECLEON); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); break; case KECLEON_BROS_MODE_WARES_ASLEEP: sKecleonBrosWork1->isKecleonItemShop = FALSE; sKecleonBrosWork1->monPortraitPtr = NULL; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_KECLEON); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); break; default: break; @@ -286,7 +286,7 @@ static void UpdateKecleonStoreDialogue(void) CreateDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_19], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_CANT_SELL_ITEM: - sub_8090E14(gFormatItems[0], &sKecleonBrosWork1->soldItem, NULL); + sub_8090E14(gFormatBuffer_Items[0], &sKecleonBrosWork1->soldItem, NULL); sKecleonBrosWork1->fallbackState = KECLEON_STORE_SELL_ITEM_MENU; SetKecleonPortraitSpriteId(TRUE); CreateDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_20], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); @@ -337,8 +337,8 @@ static void UpdateKecleonStoreDialogue(void) break; case KECLEON_STORE_BUY_ITEM: BuildKecleonBrosYesNoMenu(); - sub_8090E14(gFormatItems[0], &sKecleonBrosWork1->soldItem, 0); - gFormatData_202DE30[0] = sKecleonBrosWork1->itemSellPrice; + sub_8090E14(gFormatBuffer_Items[0], &sKecleonBrosWork1->soldItem, 0); + gFormatArgs[0] = sKecleonBrosWork1->itemSellPrice; SetKecleonPortraitSpriteId(FALSE); CreateMenuDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5,sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; @@ -390,8 +390,8 @@ static void UpdateKecleonStoreDialogue(void) break; case KECLEON_STORE_SELL_ITEM: BuildKecleonBrosYesNoMenu(); - sub_8090E14(gFormatItems[0], &sKecleonBrosWork1->soldItem, NULL); - gFormatData_202DE30[0] = sKecleonBrosWork1->itemSellPrice; + sub_8090E14(gFormatBuffer_Items[0], &sKecleonBrosWork1->soldItem, NULL); + gFormatArgs[0] = sKecleonBrosWork1->itemSellPrice; SetKecleonPortraitSpriteId(FALSE); CreateMenuDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_09], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; @@ -412,7 +412,7 @@ static void UpdateKecleonStoreDialogue(void) break; case KECLEON_STORE_SELL_ALL_ITEMS: BuildKecleonBrosYesNoMenu(); - gFormatData_202DE30[0] = sKecleonBrosWork1->inventoryItemSellPrice; + gFormatArgs[0] = sKecleonBrosWork1->inventoryItemSellPrice; SetKecleonPortraitSpriteId(FALSE); CreateMenuDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_10], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; diff --git a/src/kecleon_bros4.c b/src/kecleon_bros4.c index 004c6868f..fdc1e28eb 100644 --- a/src/kecleon_bros4.c +++ b/src/kecleon_bros4.c @@ -234,7 +234,7 @@ void sub_801A9E0(void) if (gUnknown_203B224->unk4[teamItemIndex] != 0 || sub_801ADA0(teamItemIndex)) PrintStringOnWindow(8,sub_8013800(&gUnknown_203B224->unk54.s0.input,r7), buf1, gUnknown_203B224->unk54.s0.unk34, 0); else { - strncpy(gFormatItems[0], buf1, 80); + strncpy(gFormatBuffer_Items[0], buf1, 80); PrintFormatStringOnWindow(8, sub_8013800(&gUnknown_203B224->unk54.s0.input, r7), sFmtMoveItem0, gUnknown_203B224->unk54.s0.unk34, 0); } break; @@ -260,7 +260,7 @@ void sub_801A9E0(void) } else { sub_8090E14(buf1, &item, 0); - strncpy(gFormatItems[0], buf1, 80); + strncpy(gFormatBuffer_Items[0], buf1, 80); PrintFormatStringOnWindow(8, sub_8013800(&gUnknown_203B224->unk54.s0.input, r7), sFmtMoveItem0, gUnknown_203B224->unk54.s0.unk34, 0); } break; @@ -278,7 +278,7 @@ void sub_801A9E0(void) if (IsGummiItem(item.id)) PrintStringOnWindow(8, sub_8013800(&gUnknown_203B224->unk54.s0.input, r7), buf1, gUnknown_203B224->unk54.s0.unk34, 0); else { - strncpy(gFormatItems[0], buf1, 80); + strncpy(gFormatBuffer_Items[0], buf1, 80); PrintFormatStringOnWindow(8, sub_8013800(&gUnknown_203B224->unk54.s0.input, r7), sFmtMoveItem0, gUnknown_203B224->unk54.s0.unk34, 0); } break; diff --git a/src/load_screen.c b/src/load_screen.c index 7013dffb4..20ee55587 100644 --- a/src/load_screen.c +++ b/src/load_screen.c @@ -312,7 +312,7 @@ void DrawLoadScreenText(void) { default: sprintfStatic(auStack356,gUnknown_80E7804,sub_8098FB4()); - xxx_format_string(auStack356,gLoadScreen->formattedLocation,gLoadScreen->formattedPlayTime,0); + CopyFormatString(auStack356,gLoadScreen->formattedLocation,gLoadScreen->formattedPlayTime,0); break; case 0x7: case 0xB: diff --git a/src/luminous_cave.c b/src/luminous_cave.c index 42078e986..600815b81 100644 --- a/src/luminous_cave.c +++ b/src/luminous_cave.c @@ -303,16 +303,16 @@ static void UpdateLuminousCaveDialogue(void) CreateDialogueBoxAndPortrait(sLetUsBegin,0,0,0x105); break; case LUMINOUS_CAVE_CHANGED_APPEARANCE: - PrintColoredPokeNameToBuffer(gPlayerName[0],sLuminousCaveWork->pokeStruct, COLOR_CYAN); + PrintColoredPokeNameToBuffer(gFormatBuffer_Names[0],sLuminousCaveWork->pokeStruct, COLOR_CYAN); PlaySound(0x1ff); sLuminousCaveWork->fallbackState = LUMINOUS_CAVE_EVOLVED; CreateDialogueBoxAndPortrait(sFmtChangedAppearance,0,0,0x105); break; case LUMINOUS_CAVE_EVOLVED: monName = GetMonSpecies(sLuminousCaveWork->pokeStruct->speciesNum); - strcpy(gAvailablePokemonNames[0],monName); + strcpy(gFormatBuffer_Monsters[0],monName); monName = GetMonSpecies(sLuminousCaveWork->evolveStatus.targetEvolveSpecies); - strcpy(gAvailablePokemonNames[1],monName); + strcpy(gFormatBuffer_Monsters[1],monName); sLuminousCaveWork->evolutionComplete = TRUE; sub_80977D0(); sub_808F734(sLuminousCaveWork->pokeStruct,sLuminousCaveWork->evolveStatus.targetEvolveSpecies); diff --git a/src/makuhita_dojo1.c b/src/makuhita_dojo1.c index 10d57be46..73f0a50dc 100644 --- a/src/makuhita_dojo1.c +++ b/src/makuhita_dojo1.c @@ -92,9 +92,9 @@ bool8 MakuhitaDojo_New(u32 mode) sMakuhitaDojoWork1->monPortraitPtr = &sMakuhitaDojoWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_MAKUHITA); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_MAKUHITA); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_MAKUHITA); monName = GetMonSpecies(MONSTER_MAKUHITA); - strcpy(gAvailablePokemonNames[6], monName); + strcpy(gFormatBuffer_Monsters[6], monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_MAKUHITA); sMakuhitaDojoWork1->monPortrait.faceFile = faceFile; @@ -199,7 +199,7 @@ static void MakuhitaDojo_UpdateDialogue(void) sMakuhitaDojoWork1->fallbackState = 13; dLoc.id = sub_80A2740(sMakuhitaDojoWork1->unk10); dLoc.floor = 1; - PrintYellowDungeonNametoBuffer(gAvailablePokemonNames[0], &dLoc); + PrintYellowDungeonNametoBuffer(gFormatBuffer_Monsters[0], &dLoc); CreateDialogueBoxAndPortrait(gCommonMakuhita[sMakuhitaDojoWork1->dlgMode][MAKUHITA_DLG_4], 0, sMakuhitaDojoWork1->monPortraitPtr, 0x10D); break; case 7: @@ -215,7 +215,7 @@ static void MakuhitaDojo_UpdateDialogue(void) CreateDialogueBoxAndPortrait(gCommonMakuhita[sMakuhitaDojoWork1->dlgMode][MAKUHITA_DLG_7], 0, sMakuhitaDojoWork1->monPortraitPtr, 0x10D); break; case 9: - PrintColoredPokeNameToBuffer(gPlayerName[0], GetPlayerPokemonStruct(), COLOR_YELLOW); + PrintColoredPokeNameToBuffer(gFormatBuffer_Names[0], GetPlayerPokemonStruct(), COLOR_YELLOW); sMakuhitaDojoWork1->fallbackState = 11; PlaySound(203); CreateDialogueBoxAndPortrait(sReceivedBonslyDoll, 0, 0, 0x101); diff --git a/src/mission_reward.c b/src/mission_reward.c index fa9797799..8547da8d3 100644 --- a/src/mission_reward.c +++ b/src/mission_reward.c @@ -29,7 +29,7 @@ struct unkStruct_203B310 EWRAM_DATA_2 struct unkStruct_203B310 *gUnknown_203B310 = {0}; -extern u8 gUnknown_202E628[]; +extern u8 gFormatBuffer_FriendArea[]; extern u8 gUnknown_202E5D8[]; enum FriendRewardStates @@ -126,7 +126,7 @@ u32 sub_802F204(unkStruct_802F204 *r0, bool8 displayClientSprite) // NOTE: dumb var to get correct ordering preload = gUnknown_203B310; strcpy(gUnknown_202E5D8, preload->unk10->clientName); - PrintPokeNameToBuffer(gAvailablePokemonNames[0], GetPlayerPokemonStruct()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetPlayerPokemonStruct()); gUnknown_203B310->monPortrait.faceFile = GetDialogueSpriteDataPtr(gUnknown_203B310->unk10->clientSpecies); gUnknown_203B310->monPortrait.faceData = NULL; @@ -212,7 +212,7 @@ void HandleMissionReward(void) SetRewardSceneState(PREP_FRIEND_AREA_REWARD); } else { - gFormatData_202DE30[0] = moneyReward; + gFormatArgs[0] = moneyReward; if (gUnknown_203B310->displayClientDialogueSprite) { CreateDialogueBoxAndPortrait(gUnknown_80E0434,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = MONEY_REWARD; @@ -238,7 +238,7 @@ void HandleMissionReward(void) SetRewardSceneState(PREP_ITEM_REWARD); } else { - WriteFriendAreaName(gUnknown_202E628,gUnknown_203B310->unk10->friendAreaReward,FALSE); + WriteFriendAreaName(gFormatBuffer_FriendArea,gUnknown_203B310->unk10->friendAreaReward,FALSE); if (gUnknown_203B310->displayClientDialogueSprite) { CreateDialogueBoxAndPortrait(gUnknown_80E04B4,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = UNLOCK_FRIEND_AREA; @@ -286,7 +286,7 @@ void HandleMissionReward(void) local_20.unk0 = 0; local_20.unk4 = 0; local_20.unk8 = 1; - sub_8090E14(gFormatItems[1],&item,&local_20); + sub_8090E14(gFormatBuffer_Items[1],&item,&local_20); if (gUnknown_203B310->displayClientDialogueSprite) { CreateDialogueBoxAndPortrait(gUnknown_80E0640,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = GIVE_ITEM_REWARD; @@ -338,7 +338,7 @@ void HandleMissionReward(void) else { gUnknown_203B310->nextState = REWARD_EXIT; } - gFormatData_202DE30[0] = gUnknown_203B310->unk10->teamRankPtsReward; + gFormatArgs[0] = gUnknown_203B310->unk10->teamRankPtsReward; CreateDialogueBoxAndPortrait(gUnknown_80E0670,0,0,0x101); } break; @@ -346,9 +346,9 @@ void HandleMissionReward(void) PlaySound(0xc9); gUnknown_203B310->nextState = REWARD_EXIT; rankString = GetTeamRankString(gUnknown_203B310->currTeamRank); - strcpy(gAvailablePokemonNames[2],rankString); + strcpy(gFormatBuffer_Monsters[2],rankString); rankString = GetTeamRankString(GetRescueTeamRank()); - strcpy(gAvailablePokemonNames[3],rankString); + strcpy(gFormatBuffer_Monsters[3],rankString); CreateDialogueBoxAndPortrait(gUnknown_80E06A8,0,0,0x101); break; case REWARD_EXIT: diff --git a/src/move_actions.c b/src/move_actions.c index 917fd963d..f788a83f8 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -451,8 +451,8 @@ bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 para if (targetInfo->HP > targetInfo->maxHPStat) { targetInfo->HP = targetInfo->maxHPStat; } - SetMessageArgument(gAvailablePokemonNames[0],attacker,0); - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],attacker,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); SetExpMultplier(attackerInfo); // $m0 and $m1 shared their HP @@ -477,7 +477,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 if ((movePtr->moveFlags & MOVE_FLAG_EXISTS) != 0) { if ((movePtr->moveFlags & MOVE_FLAG_DISABLED) == 0) { if ((movePtr->moveFlags & MOVE_FLAG_LAST_USED) != 0) { - sub_80928C0(gFormatItems[0],movePtr,0); + sub_80928C0(gFormatBuffer_Items[0],movePtr,0); // $i0 was tormented TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCFBC); movePtr->moveFlags |= MOVE_FLAG_DISABLED; @@ -495,7 +495,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 InitPokemonMove(&struggleMove, MOVE_STRUGGLE); entityInfo->moves.struggleMoveFlags |= MOVE_FLAG_DISABLED; isTormented = TRUE; - sub_80928C0(gFormatItems[0],&struggleMove,0); + sub_80928C0(gFormatBuffer_Items[0],&struggleMove,0); // $i0 was tormented TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCFBC); } @@ -624,7 +624,7 @@ bool8 sub_8057D9C(Entity * pokemon, Entity * target, Move *move, s32 param_4) } } - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); if (flag) { TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD350); } @@ -728,7 +728,7 @@ bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4) if (flashFireStatus != FLASH_FIRE_STATUS_NONE) { if (target->info->unk152 == 0) { target->info->unk152 = 1; - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE00); // Fire moves won't become stronger } @@ -780,7 +780,7 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4 hasGrudge = FALSE; entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); if (entityInfo->grudge) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD2B4); } @@ -1407,7 +1407,7 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, u32 para iVar4->offensiveMultipliers[index] = iVar3->offensiveMultipliers[index]; iVar4->defensiveMultipliers[index] = iVar3->defensiveMultipliers[index]; } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBD58); // It psyched itself up! SetExpMultplier(iVar4); return TRUE; @@ -1670,7 +1670,7 @@ bool32 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 } else { InitPokemonMove(move, moveId); - sub_80928C0(gFormatItems[0], move, 0); + sub_80928C0(gFormatBuffer_Items[0], move, 0); move->moveFlags2 |= MOVE_FLAG2_UNK4; move->moveFlags2 |= MOVE_FLAG_REPLACE; TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FE38C); @@ -2027,7 +2027,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,u32 para info->types[0] = moveType; info->types[1] = TYPE_NONE; info->isColorChanged = TRUE; - sub_80928C0(gFormatItems[0], moveStack[newIndex], NULL); + sub_80928C0(gFormatBuffer_Items[0], moveStack[newIndex], NULL); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FE330); return TRUE; } @@ -2170,7 +2170,7 @@ bool8 sub_8059E54(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 pa movePower = GetMovePower(pokemon,move); moveCritChance = GetMoveCritChance(move); sub_806EAF4(pokemon,target,moveType,movePower,moveCritChance,local_30,0x100,move->id,0); - SetMessageArgument_2(gAvailablePokemonNames[0],pokemon->info,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],pokemon->info,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC7C8); local_30[0] = local_30[0] / 2; if (local_30[0] == 0) { @@ -2220,7 +2220,7 @@ bool8 sub_8059FC8(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 pa movePower = GetMovePower(pokemon,move); moveCritChance = GetMoveCritChance(move); sub_806EAF4(pokemon,target,moveType,movePower,moveCritChance,local_30,0x200,move->id,0); - SetMessageArgument_2(gAvailablePokemonNames[0],pokemon->info,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],pokemon->info,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC7C8); local_30[0] = local_30[0] / 2; if (local_30[0] == 0) { @@ -2276,8 +2276,8 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4) r8 = target->info; sp = r8; - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); if (HasAbility(target, ABILITY_STICKY_HOLD)) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCE4); return FALSE; @@ -2594,8 +2594,8 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ entityInfo = GetEntInfo(pokemon); targetEntityInfo = GetEntInfo(target); - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); if (HasAbility(target, ABILITY_STICKY_HOLD)) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCE8); @@ -2644,7 +2644,7 @@ void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position *pos) SetEntityPixelPos(&stackEntity,(target->pos.x * 0x18 + 4) * 0x100, (target->pos.y * 0x18 + 4) * 0x100); stackEntity.spawnGenID = 0; - SetMessageArgument(gFormatItems[0],&stackEntity,0); + SetMessageArgument(gFormatBuffer_Items[0],&stackEntity,0); sub_804652C(pokemon,&stackEntity,item,1,0); } @@ -2772,7 +2772,7 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, u32 para flag = TRUE; } else { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC5CC); } return flag; diff --git a/src/move_effects_target.c b/src/move_effects_target.c index 49da1dada..08c126e71 100644 --- a/src/move_effects_target.c +++ b/src/move_effects_target.c @@ -226,7 +226,7 @@ void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage) { if ((!EntityExists(target)) || - ((SetMessageArgument(gAvailablePokemonNames[0],target,0), param_3 != 0 && + ((SetMessageArgument(gFormatBuffer_Monsters[0],target,0), param_3 != 0 && (HasSafeguardStatus(pokemon,target,displayMessage))))) { return TRUE; } @@ -375,7 +375,7 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target) if ((entityInfo->sleep.sleep == STATUS_SLEEP) || (entityInfo->sleep.sleep == STATUS_NAPPING) || (entityInfo->sleep.sleep == STATUS_NIGHTMARE)) { isAsleep = TRUE; } - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); if (entityInfo->sleep.sleep != STATUS_SLEEPLESS) { @@ -407,7 +407,7 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns if ((param_3 != 0) && (HasSafeguardStatus(pokemon,target,displayMessage))) { return; } - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (entityInfo->volatileStatus.volatileStatus != STATUS_PAUSED) { entityInfo->volatileStatus.volatileStatus = STATUS_PAUSED; entityInfo->volatileStatus.volatileStatusTurns = turns + 1; @@ -440,14 +440,14 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa entityInfo = target->info; if (!HasSafeguardStatus(pokemon,target,displayMessage)) { if (HasAbility(target,ABILITY_OBLIVIOUS)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (displayMessage) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC4C); } } else { - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (entityInfo->volatileStatus.volatileStatus != STATUS_INFATUATED) { entityInfo->volatileStatus.volatileStatus = STATUS_INFATUATED; entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1; @@ -479,7 +479,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis if (!HasSafeguardStatus(pokemon,target,displayMessage)) { entityInfo = target->info; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (HasAbility(target, ABILITY_WATER_VEIL)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCE5C); @@ -536,7 +536,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis if ((EntityExists(entity)) && (GetEntityType(entity) == ENTITY_MONSTER)) { if (!hasSynchronized) { hasSynchronized = TRUE; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF01C); } if (sub_807167C(target,entity) == TREATMENT_TREAT_AS_ENEMY) { @@ -566,7 +566,7 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag if (!HasSafeguardStatus(pokemon,target,displayMessage)) { entityInfo = target->info; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (HasHeldItem(target, ITEM_PECHA_SCARF)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD524); @@ -623,7 +623,7 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag if ((EntityExists(entity)) && (GetEntityType(entity) == ENTITY_MONSTER)) { if (!hasSynchronized) { hasSynchronized = TRUE; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF01C); } if (sub_807167C(target,entity) == TREATMENT_TREAT_AS_ENEMY) { @@ -655,7 +655,7 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM if (!HasSafeguardStatus(pokemon,target,displayMessage)) { entityInfo = target->info; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (HasHeldItem(target, ITEM_PECHA_SCARF)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD524); @@ -705,7 +705,7 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM if ((EntityExists(entity)) && (GetEntityType(entity) == ENTITY_MONSTER)) { if (!hasSynchronized) { hasSynchronized = TRUE; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF01C); } if (sub_807167C(target,entity) == TREATMENT_TREAT_AS_ENEMY) { @@ -731,7 +731,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) return; } - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); entityInfo = target->info; if ((entityInfo->immobilize.immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) { @@ -782,10 +782,10 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32 sub_8076CB4(entityInfo->unk9C); } else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA844); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->immobilize.immobilizeStatus != STATUS_CONSTRICTION) { entityInfo->immobilize.immobilizeStatus = STATUS_CONSTRICTION; entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1; @@ -812,10 +812,10 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target) sub_8076CB4(entityInfo->unk9C); } else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA844); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->immobilize.immobilizeStatus != STATUS_SHADOW_HOLD) { entityInfo->immobilize.immobilizeStatus = STATUS_SHADOW_HOLD; entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1; @@ -840,7 +840,7 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP || entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) { sub_8076CB4(entityInfo->unk9C); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->immobilize.immobilizeStatus != STATUS_INGRAIN) { entityInfo->immobilize.immobilizeStatus = STATUS_INGRAIN; entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1; @@ -887,7 +887,7 @@ void WrapTarget(Entity * pokemon, Entity * target) targetEntityInfo->unk9C = *piVar3; *piVar3 +=1; nullsub_69(pokemon, target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6D8); sub_806CE94(target,8); goto _08076C98; @@ -895,19 +895,19 @@ void WrapTarget(Entity * pokemon, Entity * target) } } if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAP) { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6FC); } if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAP) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6FC); } if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAPPED) { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB718); } if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB718); } _08076C98: @@ -949,7 +949,7 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target) if ((u8)(targetEntityInfo->immobilize.immobilizeStatus - 3U) < 2) { sub_8076CB4(targetEntityInfo->unk9C); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (targetEntityInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED) { targetEntityInfo->immobilize.immobilizeStatus = STATUS_PETRIFIED; if (targetEntityInfo->isTeamLeader) { @@ -993,35 +993,35 @@ void LowerAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 de return; } if (index != STAT_STAGE_ATK) { - strcpy(gFormatItems[0],*gUnknown_80FC0C8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0C8); } else { - strcpy(gFormatItems[0],*gUnknown_80FC0B8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0B8); } if (param_5) { if (sub_8071728(pokemon,target,displayMessage)) { return; } if (HasHeldItem(target, ITEM_TWIST_BAND)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD550); } else { if ((!HasAbility(target, ABILITY_HYPER_CUTTER)) || (index != STAT_STAGE_ATK)) goto _08076EE4; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA60); } } else { _08076EE4: entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8041F28(target,index); if (decrement == 1) { - strcpy(gFormatItems[1],*gUnknown_80FC0E4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4); } else { - strcpy(gFormatItems[1],*gUnknown_80FC0D4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0D4); } attackStage = entityInfo->offensiveStages[index]; attackStage -= decrement; @@ -1048,20 +1048,20 @@ void LowerDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 d return; } if (index != STAT_STAGE_DEF) { - strcpy(gFormatItems[0],*gUnknown_80FC0AC); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0AC); } else { - strcpy(gFormatItems[0],*gUnknown_80FC09C); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC09C); } if (!param_5 || !sub_8071728(pokemon,target,displayMessage)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8041F4C(target,index); if (decrement == 1) { - strcpy(gFormatItems[1],*gUnknown_80FC0E4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4); } else { - strcpy(gFormatItems[1],*gUnknown_80FC0D4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0D4); } defenseStage = entityInfo->defensiveStages[index]; defenseStage = defenseStage - decrement; @@ -1088,20 +1088,20 @@ void RaiseAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 in return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8041F70(target,index); if (index != STAT_STAGE_ATK) { - strcpy(gFormatItems[0],*gUnknown_80FC0C8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0C8); } else { - strcpy(gFormatItems[0],*gUnknown_80FC0B8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0B8); } if (increment == 1) { - strcpy(gFormatItems[1],*gUnknown_80FC0E4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4); } else { - strcpy(gFormatItems[1],*gUnknown_80FC0D4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0D4); } attackStage = entityInfo->offensiveStages[index]; @@ -1128,20 +1128,20 @@ void RaiseDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 i return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8041F94(target,index); if (index != STAT_STAGE_DEF) { - strcpy(gFormatItems[0],*gUnknown_80FC0AC); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0AC); } else { - strcpy(gFormatItems[0],*gUnknown_80FC09C); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC09C); } if (increment == 1) { - strcpy(gFormatItems[1],*gUnknown_80FC0E4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4); } else { - strcpy(gFormatItems[1],*gUnknown_80FC0D4); + strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0D4); } defenseStage = entityInfo->defensiveStages[index]; diff --git a/src/moves.c b/src/moves.c index e018e9bae..2c9ffcce4 100644 --- a/src/moves.c +++ b/src/moves.c @@ -1382,7 +1382,7 @@ s32 unk_PrintMoveDescription(s32 x, Move *move, s32 a3, struct subStruct_203B240 u8 buffer[800]; sub_80073B8(a3); - sub_80928C0(gAvailablePokemonNames[0], move, 0); + sub_80928C0(gFormatBuffer_Monsters[0], move, 0); PrintFormatStringOnWindow(8 * x + 16, 0, gUnknown_8109930, a3, 0); y = 19; moveDescription = sMovesData[move->id].description; @@ -1406,14 +1406,14 @@ static void unk_MovePrintData(Move *move, s32 y) const u8 *text; sub_80078A4(y, 4, 72, 200, COLOR_WHITE_2); - sub_8092D54(gAvailablePokemonNames[0], move); + sub_8092D54(gFormatBuffer_Monsters[0], move); PrintFormatStringOnWindow(4, 74, gUnknown_810CF00, y, 0); PrintFormatStringOnWindow(4, 86, gPtrTypeText, y, 0); type = GetMoveType(move); text = GetUnformattedTypeString(type); PrintFormatStringOnWindow(64, 86, text, y, 0); power = GetMoveBasePower(move); - gFormatData_202DE30[0] = power; + gFormatArgs[0] = power; } static void CopyAndResetMove(Move *dest, Move *src) diff --git a/src/party_list_menu.c b/src/party_list_menu.c index 0321bb138..7b8ae362b 100644 --- a/src/party_list_menu.c +++ b/src/party_list_menu.c @@ -200,15 +200,15 @@ void HandlePartyListMenuCallback(void) case PARTY_LIST_STATE_MAIN_MENU: sub_8026E08(3); sub_8026DAC(0,&sUnknown_203B2B8->item2); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0],sUnknown_203B2B8->pokeStruct,7); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[1],sUnknown_203B2B8->pokeStruct,6); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],sUnknown_203B2B8->pokeStruct,7); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[1],sUnknown_203B2B8->pokeStruct,6); sub_8012D60(&sUnknown_203B2B8->unk7C,sUnknown_203B2B8->unk16C,0,sUnknown_203B2B8->unk20C,sUnknown_203B2B8->menuAction1,2); break; case PARTY_LIST_STATE_MAIN_MENU_1: sub_8026E08(3); sub_8026DAC(0,&sUnknown_203B2B8->item2); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[0],sUnknown_203B2B8->pokeStruct,7); - PrintColoredPokeNameToBuffer(gAvailablePokemonNames[1],sUnknown_203B2B8->pokeStruct,6); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],sUnknown_203B2B8->pokeStruct,7); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[1],sUnknown_203B2B8->pokeStruct,6); sub_8012EA4(&sUnknown_203B2B8->unk7C,1); break; case PARTY_LIST_STATE_SUMMARY: @@ -691,7 +691,7 @@ void PartyListMenu_HandleMenu2(void) temp.unk4 = 0; temp.unk8 = 1; slot.flags = ITEM_FLAG_EXISTS; - sub_8090E14(gFormatItems[1],&slot,&temp); + sub_8090E14(gFormatBuffer_Items[1],&slot,&temp); GivePokemonItem(sUnknown_203B2B8->pokeSpecies,&sUnknown_203B2B8->item1); sub_801A928(); nullsub_104(); @@ -779,7 +779,7 @@ void sub_8026DAC(u32 r0, BulkItem *item) temp.unk4 = 0; temp.unk8 = 1; slot.flags = ITEM_FLAG_EXISTS; - sub_8090E14(gFormatItems[0], &slot, &temp); + sub_8090E14(gFormatBuffer_Items[0], &slot, &temp); PrintFormatStringOnWindow(4, 3, sPartyMenuItemPlaceholder, r0, 0); sub_80073E0(r0); } @@ -792,9 +792,9 @@ void sub_8026E08(u32 r0) CallPrepareTextbox_8008C54(r0); sub_80073B8(r0); - sub_80922B4(gAvailablePokemonNames[0], sUnknown_203B2B8->pokeStruct->name, POKEMON_NAME_LENGTH); + sub_80922B4(gFormatBuffer_Monsters[0], sUnknown_203B2B8->pokeStruct->name, POKEMON_NAME_LENGTH); sub_808D930(buffer, sUnknown_203B2B8->pokeStruct->speciesNum); - sprintfStatic(buffer1, sUnknown_80DD6E0, gAvailablePokemonNames[0]); + sprintfStatic(buffer1, sUnknown_80DD6E0, gFormatBuffer_Monsters[0]); x = sub_8008ED0(buffer1); PrintStringOnWindow(((sUnknown_80DD370.unkC << 3) - x) / 2, 3, buffer1, r0, 0); sub_80073E0(r0); diff --git a/src/personality_test1.c b/src/personality_test1.c index e23bab4d2..a96b15ee3 100644 --- a/src/personality_test1.c +++ b/src/personality_test1.c @@ -375,7 +375,7 @@ static void PromptNewQuestion(void) static void PrintPersonalityTypeDescription(void) { - CopyMonsterNametoBuffer(gAvailablePokemonNames[0], sPersonalityTestTracker->StarterID); + CopyMonsterNametoBuffer(gFormatBuffer_Monsters[0], sPersonalityTestTracker->StarterID); CreateDialogueBoxAndPortrait(sPersonalityTypeDescriptionTable[sPersonalityTestTracker->playerNature], 0, 0, 0x101); } diff --git a/src/pokemon_mail.c b/src/pokemon_mail.c index 7021c7fdd..9eda24164 100644 --- a/src/pokemon_mail.c +++ b/src/pokemon_mail.c @@ -17,8 +17,8 @@ #include "text_util.h" #include "text2.h" -extern u8 gFormatItems[]; -extern u8 gAvailablePokemonNames[]; // 202DF98 +extern u8 gFormatBuffer_Items[]; +extern u8 gFormatBuffer_Monsters[]; // 202DF98 #include "data/pokemon_mail.h" @@ -57,13 +57,13 @@ void CreateRescueTitle(unkStruct_802C39C *param_1) PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; case 12: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E8830, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E8830, gFormatBuffer_Items); PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; case 11: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E8848, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E8848, gFormatBuffer_Items); PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; case 4: @@ -78,24 +78,24 @@ void CreateRescueTitle(unkStruct_802C39C *param_1) case 10: { u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80EAE5C[bVar2 % 4], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80EAE5C[bVar2 % 4], gFormatBuffer_Monsters); PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; } case 9: { u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E910C[bVar2 % 10], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E910C[bVar2 % 10], gFormatBuffer_Monsters); PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; } default: { u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E8C98[bVar2 % 15], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E8C98[bVar2 % 15], gFormatBuffer_Monsters); PrintStringOnWindow(21, param_1->y, buf_1, param_1->unk0[0], 0); break; } @@ -163,13 +163,13 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) PrintStringOnWindow(10, y, gMedichamMissionDescription, param_1->unk0[0], 0); break; case 4: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E8968, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E8968, gFormatBuffer_Items); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); break; case 5: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E89B0, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E89B0, gFormatBuffer_Items); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); break; case 6: @@ -177,8 +177,8 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) break; case 7: monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E9F8C[param_1->unk0[1]].text, gAvailablePokemonNames, gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E9F8C[param_1->unk0[1]].text, gFormatBuffer_Monsters, gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); break; case 9: @@ -194,12 +194,12 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) case 16: { u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; u8 bVar3 = param_1->unk8->seed + param_1->unk8->dungeon.floor; - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80EB3F8[bVar2 % 22], gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80EB3F8[bVar2 % 22], gFormatBuffer_Items); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y += 12; - sprintfStatic(buf_1, gUnknown_80EB72C[bVar3 % 22], gFormatItems); + sprintfStatic(buf_1, gUnknown_80EB72C[bVar3 % 22], gFormatBuffer_Items); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y -= 12; break; @@ -208,12 +208,12 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; u8 bVar3 = param_1->unk8->seed + param_1->unk8->dungeon.floor; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80EAEB8[bVar2 % 20], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80EAEB8[bVar2 % 20], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y += 12; - sprintfStatic(buf_1, gUnknown_80EB198[bVar3 % 4], gAvailablePokemonNames); + sprintfStatic(buf_1, gUnknown_80EB198[bVar3 % 4], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y -= 12; break; @@ -222,12 +222,12 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; u8 bVar3 = param_1->unk8->seed + param_1->unk8->dungeon.floor; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80EB220[bVar2 % 6], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80EB220[bVar2 % 6], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y += 12; - sprintfStatic(buf_1, gUnknown_80EB2F0[bVar3 % 6], gAvailablePokemonNames); + sprintfStatic(buf_1, gUnknown_80EB2F0[bVar3 % 6], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y -= 12; break; @@ -236,12 +236,12 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; u8 bVar3 = param_1->unk8->seed + param_1->unk8->dungeon.floor; monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E91D4[bVar2 % 45], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E91D4[bVar2 % 45], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y += 12; - sprintfStatic(buf_1, gUnknown_80E9820[bVar3 % 10], gAvailablePokemonNames); + sprintfStatic(buf_1, gUnknown_80E9820[bVar3 % 10], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y -= 12; break; @@ -250,12 +250,12 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) u8 bVar2 = param_1->unk8->seed + param_1->unk8->dungeon.id; u8 bVar3 = param_1->unk8->seed + param_1->unk8->dungeon.floor; monName = GetMonSpecies(param_1->clientSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E8DE4[bVar2 % 13], gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E8DE4[bVar2 % 13], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y += 12; - sprintfStatic(buf_1, gUnknown_80E8FB0[bVar3 % 13], gAvailablePokemonNames); + sprintfStatic(buf_1, gUnknown_80E8FB0[bVar3 % 13], gFormatBuffer_Monsters); PrintStringOnWindow(10, y, buf_1, param_1->unk0[0], 0); y -= 12; break; @@ -282,13 +282,13 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) PrintStringOnWindow(68, y, gUnknown_80E8AEC, param_1->unk0[0], 0); break; case MISSION_TYPE_DELIVER_ITEM: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E8AFC, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E8AFC, gFormatBuffer_Items); PrintStringOnWindow(68, y, buf_1, param_1->unk0[0], 0); break; case MISSION_TYPE_FIND_ITEM: - BufferItemName(gFormatItems, param_1->targetItem, NULL); - sprintfStatic(buf_1, gUnknown_80E8B10, gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->targetItem, NULL); + sprintfStatic(buf_1, gUnknown_80E8B10, gFormatBuffer_Items); PrintStringOnWindow(68, y, buf_1, param_1->unk0[0], 0); break; case MISSION_TYPE_RESCUE_CLIENT: @@ -296,14 +296,14 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) break; case MISSION_TYPE_ESCORT_CLIENT: monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E8B2C, gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E8B2C, gFormatBuffer_Monsters); PrintStringOnWindow(68, y, buf_1, param_1->unk0[0], 0); break; case MISSION_TYPE_RESCUE_TARGET: monName = GetMonSpecies(param_1->targetSpecies); - strcpy(gAvailablePokemonNames, monName); - sprintfStatic(buf_1, gUnknown_80E8B40, gAvailablePokemonNames); + strcpy(gFormatBuffer_Monsters, monName); + sprintfStatic(buf_1, gUnknown_80E8B40, gFormatBuffer_Monsters); PrintStringOnWindow(68, y, buf_1, param_1->unk0[0], 0); break; case MISSION_TYPE_SPECIAL_MISSION: @@ -347,8 +347,8 @@ void CreateRescueDescription(unkStruct_802C39C *param_1) break; case ITEM: // Item case ITEM_EXTRA: // Item + ? - BufferItemName(gFormatItems, param_1->rewardItem, NULL); - sprintfStatic(buf_1, gMissionRewardText[param_1->rewardType], gFormatItems); + BufferItemName(gFormatBuffer_Items, param_1->rewardItem, NULL); + sprintfStatic(buf_1, gMissionRewardText[param_1->rewardType], gFormatBuffer_Items); PrintStringOnWindow(68, y, buf_1, param_1->unk0[0], 0); break; case 4: // Friend Area diff --git a/src/pokemon_news2.c b/src/pokemon_news2.c index e864f89b4..462d90246 100644 --- a/src/pokemon_news2.c +++ b/src/pokemon_news2.c @@ -143,12 +143,12 @@ static void sub_802BC08(void) void sub_802BC7C(void) { - PrintPokeNameToBuffer(gAvailablePokemonNames[0], sub_808D3BC()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], sub_808D3BC()); if (gGameOptionsRef->playerGender == FEMALE) - strcpy(gAvailablePokemonNames[1], sShe); + strcpy(gFormatBuffer_Monsters[1], sShe); else - strcpy(gAvailablePokemonNames[1], sHe); + strcpy(gFormatBuffer_Monsters[1], sHe); } static void sub_802BCC4(void) diff --git a/src/pokemon_news3.c b/src/pokemon_news3.c index cdb6c812c..9a1d21e35 100644 --- a/src/pokemon_news3.c +++ b/src/pokemon_news3.c @@ -17,7 +17,7 @@ #include "text1.h" #include "text2.h" -extern u8 gAvailablePokemonNames[]; // 202DF98 +extern u8 gFormatBuffer_Monsters[]; // 202DF98 static EWRAM_DATA_2 struct unkStruct_203B2D8 *sUnknown_203B2D8 = {0}; static EWRAM_DATA_2 u16 sUnknown_203B2DC = {0}; @@ -143,8 +143,8 @@ void CreateMailMenu(void) if (mail->mailType == MAIL_TYPE_UNK1) { y = sub_8013800(&sUnknown_203B2D8->unk4.s0.input, i); sub_803B6B0(10, y, 6, sUnknown_203B2D8->unk4.s0.unk34); - PrintPokeNameToBuffer(gAvailablePokemonNames, GetPlayerPokemonStruct()); - sprintfStatic(buffer, GetPokemonMailHeadline(mail->unk4.dungeon.floor), gAvailablePokemonNames); + PrintPokeNameToBuffer(gFormatBuffer_Monsters, GetPlayerPokemonStruct()); + sprintfStatic(buffer, GetPokemonMailHeadline(mail->unk4.dungeon.floor), gFormatBuffer_Monsters); PrintStringOnWindow(21, y, buffer, sUnknown_203B2D8->unk4.s0.unk34, 0); } else { diff --git a/src/post_office_guide1.c b/src/post_office_guide1.c index 5fbd374fa..679e80a16 100644 --- a/src/post_office_guide1.c +++ b/src/post_office_guide1.c @@ -51,7 +51,7 @@ bool8 CreateHelperPelipperMenu(s16 speciesID) sPostOfficeHelper = MemoryAlloc(sizeof(PostOfficeWork), 8); CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, species_32); monName = GetMonSpecies(species_32); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); sPostOfficeHelper->monPortrait.faceFile = NULL; sPostOfficeHelper->monPortrait.faceData = NULL; diff --git a/src/post_office_guide2.c b/src/post_office_guide2.c index 78398bdb3..c824d4a3a 100644 --- a/src/post_office_guide2.c +++ b/src/post_office_guide2.c @@ -18,7 +18,7 @@ #include "text1.h" #include "text2.h" -extern u8 gFormatItems[]; +extern u8 gFormatBuffer_Items[]; static EWRAM_DATA_2 unkStruct_203B330 *sUnknown_203B330 = {0}; @@ -146,13 +146,13 @@ static void DisplayMissionObjectives(void) switch (jobInfo->missionType) { case WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM: - BufferItemName(gFormatItems, jobInfo->targetItem, NULL); - sprintfStatic(buffer1, sFmtBring, gFormatItems); + BufferItemName(gFormatBuffer_Items, jobInfo->targetItem, NULL); + sprintfStatic(buffer1, sFmtBring, gFormatBuffer_Items); PrintStringOnWindow(40, yCoord, buffer1, sUnknown_203B330->unk10, 0); break; case WONDER_MAIL_MISSION_TYPE_FIND_ITEM: - BufferItemName(gFormatItems, jobInfo->targetItem, NULL); - sprintfStatic(buffer1, sFmtFind, gFormatItems); + BufferItemName(gFormatBuffer_Items, jobInfo->targetItem, NULL); + sprintfStatic(buffer1, sFmtFind, gFormatBuffer_Items); PrintStringOnWindow(40, yCoord, buffer1, sUnknown_203B330->unk10, 0); break; case WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT: diff --git a/src/status.c b/src/status.c index cca5283c0..2bc0a2193 100644 --- a/src/status.c +++ b/src/status.c @@ -134,7 +134,7 @@ extern u8 *gUnknown_80FBDF0[]; extern u8 *gUnknown_80FBDC4[]; extern u8 *gUnknown_80FBE14[]; -extern s32 gFormatData_202DE30[10]; +extern s32 gFormatArgs[10]; extern void sub_8041D84(Entity *); extern void sub_804178C(u32); @@ -215,7 +215,7 @@ void UpdateFlashFireBoost(Entity * pokemon, Entity *target) if (EntityExists(target)) { entityInfo = target->info; entityInfo_1 = entityInfo; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); flashFireBoost = UpdateFlashFireBoost_sub(entityInfo); if (entityInfo_1->flashFireBoost != flashFireBoost) { entityInfo_1->flashFireBoost = flashFireBoost; @@ -235,31 +235,31 @@ void ChangeAttackMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage } if (statStage != STAT_STAGE_ATK) { - strcpy(gFormatItems[0],*gUnknown_80FC0C8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0C8); } else { - strcpy(gFormatItems[0],*gUnknown_80FC0B8); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0B8); } if ((param_4 < 0x100) && sub_8071728(pokemon,target,displayMessage)) { return; } if ((HasHeldItem(target,ITEM_TWIST_BAND)) && (param_4 < 0x100)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD550); return; } if (HasAbility(target, ABILITY_HYPER_CUTTER) && (statStage == STAT_STAGE_ATK) && (param_4 < 0x100)) { if (displayMessage) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA60); } return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); oldMulti = entityInfo->offensiveMultipliers[statStage]; if (param_4 < 0x100) { @@ -300,17 +300,17 @@ void ChangeDefenseMultiplierTarget(Entity *pokemon, Entity *target, u32 statStag } if (statStage != STAT_STAGE_DEF) { - strcpy(gFormatItems[0],*gUnknown_80FC0AC); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0AC); } else { - strcpy(gFormatItems[0],*gUnknown_80FC09C); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC09C); } if ((param_4 < 0x100) && sub_8071728(pokemon,target,displayMessage)) { return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); oldMulti = entityInfo->defensiveMultipliers[statStage]; if (param_4 < 0x100) { @@ -347,13 +347,13 @@ void RaiseAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8042040(target,statStage); if (statStage != STAT_STAGE_ACCURACY) { - strcpy(gFormatItems[0],*gUnknown_80FC090); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC090); } else { - strcpy(gFormatItems[0],*gUnknown_80FC084); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC084); } if (entityInfo->hitChanceStages[statStage] < MAX_STAT_STAGE) { entityInfo->hitChanceStages[statStage]++; @@ -372,22 +372,22 @@ void LowerAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage, if (EntityExists(target)) { if (statStage != STAT_STAGE_ACCURACY) { - strcpy(gFormatItems[0],*gUnknown_80FC090); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC090); } else { - strcpy(gFormatItems[0],*gUnknown_80FC084); + strcpy(gFormatBuffer_Items[0],*gUnknown_80FC084); } if (!sub_8071728(pokemon,target,displayMessage)) { if (HasAbility(target, ABILITY_KEEN_EYE) && (statStage == STAT_STAGE_ACCURACY)){ if(displayMessage) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA64); } } else { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); sub_8042060(target,statStage); if (entityInfo->hitChanceStages[statStage] != 0) { entityInfo->hitChanceStages[statStage]--; @@ -409,13 +409,13 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage) if (EntityExists(target)) { if (!HasSafeguardStatus(pokemon, target, displayMessage)) { if (HasAbility(target, ABILITY_INNER_FOCUS)){ - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if(displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC18); } else { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if(entityInfo->volatileStatus.volatileStatus != STATUS_CRINGE) { entityInfo->volatileStatus.volatileStatus = STATUS_CRINGE; @@ -444,7 +444,7 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) { if (HasAbility(target, ABILITY_LIMBER)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (displayMessage) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCBF8); } @@ -453,7 +453,7 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag { bVar6 = TRUE; entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS) { entityInfo->nonVolatile.nonVolatileStatus = STATUS_PARALYSIS; entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1; @@ -477,7 +477,7 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag if ((EntityExists(mapPokemonEntity)) && (GetEntityType(mapPokemonEntity) == ENTITY_MONSTER)) { if (!bVar7) { bVar7 = TRUE; - SetMessageArgument_2(gAvailablePokemonNames[0],entityInfo,0); + SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF01C); } if (sub_807167C(target,mapPokemonEntity) == 1) { @@ -505,7 +505,7 @@ void RaiseMovementSpeedTarget(Entity * pokemon, Entity * target, s32 turns, bool turns = CalculateStatusTurns(target,gUnknown_80F4E40,FALSE) + 1; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); movSpeed = CalcSpeedStage(target); if (movSpeed == MAX_SPEED_STAGE) { if (displayMessage) @@ -550,7 +550,7 @@ void LowerMovementSpeedTarget(Entity * pokemon, Entity * target, s32 levels, boo return; } entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); movSpeed = CalcSpeedStage(target); if (movSpeed == 0) { if (displayMessage) @@ -593,7 +593,7 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage return; } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (HasHeldItem(target,ITEM_PERSIM_BAND)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD500); @@ -627,7 +627,7 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->volatileStatus.volatileStatus != STATUS_COWERING) { entityInfo->volatileStatus.volatileStatus = STATUS_COWERING; entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1; @@ -682,9 +682,9 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo maxHPStat = entityInfo->maxHPStat - maxHPStat; HP = entityInfo->HP - HP; EntityUpdateStatusSprites(target); - gFormatData_202DE30[0] = HP; - gFormatData_202DE30[1] = maxHPStat; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + gFormatArgs[0] = HP; + gFormatArgs[1] = maxHPStat; + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if ((HP == 0) && (maxHPStat == 0)) { if (displayMessage_u8) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB204); // $m0's HP remained unchanged @@ -731,7 +731,7 @@ void HandleScannerOrb(Entity* pokemon, Entity* target) { target->info->scanning = TRUE; nullsub_75(target); - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAEA0); // Item locations became evident sub_803F580(0); sub_8040A84(); @@ -756,7 +756,7 @@ void HandleStairsOrb(Entity* pokemon, Entity* target) { target->info->stairSpotter = TRUE; nullsub_76(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAEC8); sub_803F580(0); sub_8040A84(); @@ -776,7 +776,7 @@ void HandleRadarOrb(Entity* pokemon, Entity* target) { target->info->powerEars = TRUE; nullsub_77(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAFAC); sub_803F580(0); sub_8040A84(); @@ -802,7 +802,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) if (HasSafeguardStatus(pokemon,target,displayMessage)) { return; } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (MonsterIsType(target, TYPE_GRASS)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gPtrCantLeechSeedMonMessage); @@ -875,7 +875,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) if (((EntityExists(target)) && (GetEntityType(pokemon) == ENTITY_MONSTER)) && (GetEntityType(target) == ENTITY_MONSTER)) { entityInfo = pokemon->info; - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); linkedStatus = &entityInfo->linked.linkedStatus; if (entityInfo->linked.linkedStatus != STATUS_DESTINY_BOND) { @@ -912,7 +912,7 @@ void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->moveStatus.moveStatus != STATUS_SURE_SHOT) { entityInfo->moveStatus.moveStatus = STATUS_SURE_SHOT; entityInfo->moveStatus.moveStatusTurns = turns + 1; @@ -932,7 +932,7 @@ void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns) if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->moveStatus.moveStatus != STATUS_WHIFFER) { entityInfo->moveStatus.moveStatus = STATUS_WHIFFER; entityInfo->moveStatus.moveStatusTurns = turns + 1; @@ -952,7 +952,7 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->moveStatus.moveStatus != STATUS_SET_DAMAGE) { entityInfo->moveStatus.moveStatus = STATUS_SET_DAMAGE; entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1; @@ -972,7 +972,7 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target) if (EntityExists(target)) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->moveStatus.moveStatus != STATUS_FOCUS_ENERGY) { entityInfo->moveStatus.moveStatus = STATUS_FOCUS_ENERGY; entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1; @@ -997,7 +997,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) { targetEntityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (targetEntityInfo->waitingStruct.waitingStatus == STATUS_DECOY) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB994); } @@ -1012,7 +1012,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3) } } sub_8041D38(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_NONE) { SendWaitingEndMessage(pokemon,target, STATUS_DECOY); } @@ -1072,7 +1072,7 @@ void CurseStatusTarget(Entity *pokemon, Entity * target) targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1; targetEntityInfo->waitingStruct.curseDamageCountdown = 0; } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB004); } else { @@ -1112,7 +1112,7 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target) gDungeon->snatchPokemon = target; gDungeon->unk17B3C = targetEntityInfo->unk98; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB01C); EntityUpdateStatusSprites(target); } @@ -1124,7 +1124,7 @@ void TauntStatusTarget(Entity * pokemon, Entity * target) if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->volatileStatus.volatileStatus != STATUS_TAUNTED) { entityInfo->volatileStatus.volatileStatus = STATUS_TAUNTED; entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1; @@ -1144,12 +1144,12 @@ void HandleStockpile(Entity * pokemon, Entity * target) if ((EntityExists(target))) { entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->stockpileStage < MAX_STOCKPILE_STAGE) { entityInfo->stockpileStage++; sub_804178C(1); sub_8041D5C(target); - gFormatData_202DE30[0] = entityInfo->stockpileStage; + gFormatArgs[0] = entityInfo->stockpileStage; TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBA38); } else { @@ -1170,7 +1170,7 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target) if (targetEntityInfo_1->transformStatus.transformStatus == STATUS_TRANSFORMED) { SendTransformEndMessage(pokemon,target); } - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (targetEntityInfo_1->transformStatus.transformStatus != STATUS_INVISIBLE) { targetEntityInfo_1->transformStatus.transformStatus = STATUS_INVISIBLE; targetEntityInfo_1->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1; @@ -1191,7 +1191,7 @@ void PerishSongTarget(Entity * pokemon, Entity * target) if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) { nullsub_82(target); entityInfo = target->info; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->perishSongTurns == 0) { entityInfo->perishSongTurns = CalculateStatusTurns(target,gUnknown_80F4EEC,FALSE) + 1; TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB04); @@ -1217,11 +1217,11 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target) if ((EntityInfo->moves.moves[index].moveFlags & MOVE_FLAG_EXISTS) && (movePtr->moveFlags & MOVE_FLAG_LAST_USED)) break; } if ((index == MAX_MON_MOVES) && ((EntityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBBD4); } else { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (EntityInfo->volatileStatus.volatileStatus != STATUS_ENCORE) { EntityInfo->volatileStatus.volatileStatus = STATUS_ENCORE; EntityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1; @@ -1251,7 +1251,7 @@ void sub_8078A58(struct Entity *pokemon, struct Entity *target, s32 param_3, s32 bellyBefore = targetInfo->maxBelly; targetInfo->maxBelly = FixedPoint_Subtract(bellyBefore, sp0); targetInfo->belly = FixedPoint_Min(targetInfo->belly, targetInfo->maxBelly); - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->maxBelly)) { sub_8041D9C(target); @@ -1265,7 +1265,7 @@ void sub_8078A58(struct Entity *pokemon, struct Entity *target, s32 param_3, s32 bellyBefore = targetInfo->belly; targetInfo->belly = FixedPoint_Subtract(bellyBefore, sp8); - SetMessageArgument(gAvailablePokemonNames[0], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], target, 0); if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->belly)) { nullsub_84(target); @@ -1327,12 +1327,12 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBE64); // $m0's belly filled up full! } if (FixedPointToInt(sp_0x20) == FixedPointToInt(targetInfo->maxBelly)) { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBDF0); // $m0's belly won't get any bigger! } else { sub_8041DB0(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBDC4); // m0's max belly size increased! } } @@ -1349,7 +1349,7 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel *bellyPtr = *puVar8; } nullsub_85(target); - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (FixedPointToInt(oldBelly) == FixedPointToInt(*bellyPtr)) { if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBE14); // $m0's belly didn't change! } diff --git a/src/status_actions.c b/src/status_actions.c index e2b419178..4d47eba20 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -226,9 +226,9 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target) entityInfo->types[0] = newType; entityInfo->types[1] = TYPE_NONE; entityInfo->isColorChanged = TRUE; - SetMessageArgument(gAvailablePokemonNames[1],target,0); + SetMessageArgument(gFormatBuffer_Monsters[1],target,0); typeString = GetUnformattedTypeString(newType); - strcpy(gFormatItems[0], typeString); + strcpy(gFormatBuffer_Items[0], typeString); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FEB08); return TRUE; } @@ -439,7 +439,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4 } } } - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); if (moveCounter != 0) { SetExpMultplier(entityInfo); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDCE4); @@ -697,8 +697,8 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4) iVar3 = pokemon->info; iVar5 = target->info; iVar6 = target->info; - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); - SetMessageArgument(gAvailablePokemonNames[1], target, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[1], target, 0); if (HasAbility(target, ABILITY_STICKY_HOLD)) { return TRUE; } @@ -858,7 +858,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_ entityInfo = target->info; targetID = entityInfo->id; oldID = entityInfo->id; - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (entityInfo->clientType != CLIENT_TYPE_NONE) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD450); return FALSE; @@ -875,7 +875,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_ TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD450); } else { - CopyCyanMonsterNametoBuffer(gAvailablePokemonNames[1], targetID); + CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], targetID); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD434); sub_806BB6C(target, targetID); didTransfer = TRUE; @@ -883,7 +883,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_ } } else { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD450); } return didTransfer; @@ -921,7 +921,7 @@ bool8 sub_805BEC8(Entity * pokemon, Entity * target, Move *move, s32 param_4) bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - SetMessageArgument(gAvailablePokemonNames[0],pokemon,0); + SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0); if (gDungeon->unk66E != 0) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD4DC); // $m0 can't escape! } diff --git a/src/status_checks.c b/src/status_checks.c index ad8030632..f067079b9 100644 --- a/src/status_checks.c +++ b/src/status_checks.c @@ -27,7 +27,7 @@ extern char *gPtrMoveInterruptedMessage[]; bool8 HasStatusAffectingActions(Entity *pokemon) { EntityInfo *pokemonInfo = pokemon->info; - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN); switch (pokemonInfo->sleep.sleep) { @@ -117,7 +117,7 @@ bool8 sub_80701A4(Entity *pokemon) pokemonInfo = pokemon->info; flag = FALSE; - SetMessageArgument(gAvailablePokemonNames[0], pokemon, 0); + SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0); SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN); switch(pokemonInfo->sleep.sleep) { diff --git a/src/string_format.c b/src/string_format.c index c82102dfd..53b6559b1 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -127,17 +127,17 @@ static void nullsub_35(void); static bool8 AppendString(const u8 *, u8 **, u8 *, u16 r3); // 'd', 'v' and 'V' -EWRAM_DATA s32 gFormatData_202DE30[10] = {0}; +EWRAM_DATA s32 gFormatArgs[10] = {0}; // 'i', apparently only i0 and i1 are actually used though it's yet to be verified -EWRAM_DATA u8 gFormatItems[4][FORMAT_BUFFER_LEN] = {0}; +EWRAM_DATA u8 gFormatBuffer_Items[4][FORMAT_BUFFER_LEN] = {0}; // 'm' which probably stands for 'monster', available through m0 to m9 -EWRAM_DATA u8 gAvailablePokemonNames[10][FORMAT_BUFFER_LEN] = {0}; +EWRAM_DATA u8 gFormatBuffer_Monsters[10][FORMAT_BUFFER_LEN] = {0}; // 'n' which probably stands for 'name', available through n0 to n9 -EWRAM_DATA u8 gPlayerName[10][FORMAT_BUFFER_LEN] = {0}; +EWRAM_DATA u8 gFormatBuffer_Names[10][FORMAT_BUFFER_LEN] = {0}; // Seems to be a general buffer EWRAM_DATA u8 gUnknown_202E5D8[FORMAT_BUFFER_LEN] = {0}; // 'h' - Friend Area buffer. This buffer seems larger than others. It's possible it actually has the same length, but there were some unused buffers right after it. -EWRAM_DATA u8 gUnknown_202E628[FRIEND_AREA_BUFFER_LEN] = {0}; +EWRAM_DATA u8 gFormatBuffer_FriendArea[FRIEND_AREA_BUFFER_LEN] = {0}; static EWRAM_DATA SpriteOAM sDialogueBoxArrowSprite = {0}; @@ -218,7 +218,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me { bool8 portraitOn = FALSE; - xxx_format_string(text, sDialogueTextBuffer, sDialogueTextBuffer + DIALOGUE_TEXT_BUFFER_SIZE - 1, flags); + CopyFormatString(text, sDialogueTextBuffer, sDialogueTextBuffer + DIALOGUE_TEXT_BUFFER_SIZE - 1, flags); gUnknown_202E794 = sDialogueTextBuffer; gUnknown_202E748.unk24 = a1; gUnknown_202EC10 = a5; @@ -634,7 +634,7 @@ static void sub_8014A88(void) break; r5 += 12;; - xxx_format_string(menuItem->text, text, text + sizeof(text), 0); + CopyFormatString(menuItem->text, text, text + sizeof(text), 0); val = sub_8008ED0(text); if (r7 < val) { r7 = val; @@ -683,7 +683,7 @@ static void UNUSED nullsub_35(void) { } -const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) +const u8 *CopyFormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) { u8 txtArray[60]; bool8 r10 = TRUE; @@ -734,7 +734,7 @@ const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) switch (*str) { case 'i': str++; - txtPtr = gFormatItems[*str - '0']; + txtPtr = gFormatBuffer_Items[*str - '0']; str++; break; case 'm': @@ -745,13 +745,13 @@ const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) PrintColoredPokeNameToBuffer(sFormatBuffer_UnknownMonster, monStruct, 0); } else { - txtPtr = gAvailablePokemonNames[*str - '0']; + txtPtr = gFormatBuffer_Monsters[*str - '0']; str++; } break; case 'n': str++; - txtPtr = gPlayerName[*str - '0']; + txtPtr = gFormatBuffer_Names[*str - '0']; str++; break; case 't': @@ -766,11 +766,11 @@ const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) break; case 'h': str++; - txtPtr = gUnknown_202E628; + txtPtr = gFormatBuffer_FriendArea; break; case 'd': str++; - sprintfStatic(txtArray, gUnknown_80D4900, gFormatData_202DE30[*(str++) - '0']); + sprintfStatic(txtArray, gUnknown_80D4900, gFormatArgs[*(str++) - '0']); txtPtr = txtArray; break; case 'v': { @@ -778,7 +778,7 @@ const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) u8 *unkTxtPtr; str++; - a = gFormatData_202DE30[*(str++) - '0']; + a = gFormatArgs[*(str++) - '0']; sprintfStatic(txtArray, gUnknown_80D4904, *(str++) - '0', a); unkTxtPtr = txtArray; while (*unkTxtPtr != '\0') { @@ -796,7 +796,7 @@ const u8 *xxx_format_string(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) u8 *unkTxtPtr; str++; - a = gFormatData_202DE30[*(str++) - '0']; + a = gFormatArgs[*(str++) - '0']; sprintfStatic(txtArray, gUnknown_80D4908, *(str++) - '0', a); unkTxtPtr = txtArray; while (*unkTxtPtr != '\0') { @@ -874,7 +874,7 @@ void PrintFormatStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 te { u8 formatString[FORMAT_STR_MAX_LEN]; - xxx_format_string(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); + CopyFormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); formatString[FORMAT_STR_MAX_LEN - 1] = '\0'; PrintStringOnWindow(x, y, formatString, windowId, terminatingChr); } @@ -883,7 +883,7 @@ void PrintFormatStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 t { u8 formatString[FORMAT_STR_MAX_LEN]; - xxx_format_string(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); + CopyFormatString(str, formatString, formatString + FORMAT_STR_MAX_LEN, 0); formatString[FORMAT_STR_MAX_LEN - 1] = '\0'; PrintStringOnWindow2(x, y, formatString, windowId, terminatingChr, lineSpacing); } diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c index 6de4515b9..1bba01aac 100644 --- a/src/thank_you_wonder_mail.c +++ b/src/thank_you_wonder_mail.c @@ -245,7 +245,7 @@ u32 CreateThankYouMailPelipper(void) CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); sUnknown_203B2C4->monPortrait.faceFile = faceFile; @@ -1227,7 +1227,7 @@ void sub_802AB98(void) sub_802F2C0(); CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); DeleteMailAtIndex(GetMailIndex(6, sUnknown_203B2C4->unk430)); SetThankYouMailMenuState(0x24); break; diff --git a/src/trade_items_menu.c b/src/trade_items_menu.c index 7266383c4..9c9629a4e 100644 --- a/src/trade_items_menu.c +++ b/src/trade_items_menu.c @@ -526,8 +526,8 @@ void sub_8036B28(void) sub_8036F74(); break; case TRADE_ITEMS_SEND_ITEM_CONFIRM: - gFormatData_202DE30[0] = sTradeItemsMenu->unk14.unk0; - BufferItemName(gFormatItems[0],sTradeItemsMenu->itemToSend.id,NULL); + gFormatArgs[0] = sTradeItemsMenu->unk14.unk0; + BufferItemName(gFormatBuffer_Items[0],sTradeItemsMenu->itemToSend.id,NULL); CreateMenuDialogueBoxAndPortrait(sFmtWillBeSentPrompt,0,5, sUnknown_80E6154,0,4,0,0,0x101); break; case TRADE_ITEMS_RECEIVE_ITEM: @@ -585,18 +585,18 @@ void sub_8036B28(void) break; case 0xe: if (sTradeItemsMenu->unk24C.quantity == 0) { - gFormatData_202DE30[0] = sTradeItemsMenu->unk244.quantity; - BufferItemName(gFormatItems[0],sTradeItemsMenu->unk244.itemIdx.id,NULL); + gFormatArgs[0] = sTradeItemsMenu->unk244.quantity; + BufferItemName(gFormatBuffer_Items[0],sTradeItemsMenu->unk244.itemIdx.id,NULL); } else { - gFormatData_202DE30[0] = sTradeItemsMenu->unk24C.quantity; - BufferItemName(gFormatItems[0],sTradeItemsMenu->unk24C.itemIdx.id,NULL); + gFormatArgs[0] = sTradeItemsMenu->unk24C.quantity; + BufferItemName(gFormatBuffer_Items[0],sTradeItemsMenu->unk24C.itemIdx.id,NULL); } CreateDialogueBoxAndPortrait(sFmtYouReceived,0,0,0x101); break; case 0xd: - gFormatData_202DE30[0] = sTradeItemsMenu->unk14.unk0; - BufferItemName(gFormatItems[0],sTradeItemsMenu->itemToSend.id,NULL); + gFormatArgs[0] = sTradeItemsMenu->unk14.unk0; + BufferItemName(gFormatBuffer_Items[0],sTradeItemsMenu->itemToSend.id,NULL); CreateDialogueBoxAndPortrait(sFmtYouSent,0,0,0x101); break; case 0xB: diff --git a/src/trap.c b/src/trap.c index 960c156de..b9cae6eaf 100644 --- a/src/trap.c +++ b/src/trap.c @@ -246,7 +246,7 @@ void sub_807FE9C(Entity *pokemon, Position *pos, int param_3, char param_4) return; } trapData = GetTrapData(entity); - GetTrapName(gAvailablePokemonNames[0],trapData->id); + GetTrapName(gFormatBuffer_Monsters[0],trapData->id); target = tile->monster; if ((target != NULL) && (GetEntityType(target) != ENTITY_MONSTER)) { target = NULL; @@ -429,7 +429,7 @@ void HandleStickyTrap(Entity *pokemon,Entity *target) } else { newIndex = DungeonRandInt(itemCount); - sub_8045BF8(gFormatItems[0], itemStack[newIndex]); + sub_8045BF8(gFormatBuffer_Items[0], itemStack[newIndex]); itemStack[newIndex]->flags |= ITEM_FLAG_STICKY; sub_80421C0(target, 0x192); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDC18); @@ -563,7 +563,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile) } else { - SetMessageArgument(gAvailablePokemonNames[0],target,0); + SetMessageArgument(gFormatBuffer_Monsters[0],target,0); if (info->isNotTeamMember) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F970C); // $m0 fell into the pitfall! } @@ -656,7 +656,7 @@ void HandlePPZeroTrap(Entity *param_1,Entity *param_2) if (counter != 0) { moveIndex = DungeonRandInt(counter); moveStack[moveIndex]->PP = 0; - sub_80928C0(gFormatItems[0],moveStack[moveIndex],0); + sub_80928C0(gFormatBuffer_Items[0],moveStack[moveIndex],0); sub_806A9B4(param_2, indexStack[moveIndex]); flag = TRUE; } @@ -697,7 +697,7 @@ void HandleSealTrap(Entity *param_1,Entity *param_2) if (counter != 0) { moveIndex = DungeonRandInt(counter); moveStack[moveIndex]->moveFlags2 |= MOVE_FLAG_SEALED; - sub_80928C0(gFormatItems[0],moveStack[moveIndex], NULL); + sub_80928C0(gFormatBuffer_Items[0],moveStack[moveIndex], NULL); flag = TRUE; } if(flag) diff --git a/src/wigglytuff_shop3.c b/src/wigglytuff_shop3.c index 9e121e5df..7e2a645b2 100644 --- a/src/wigglytuff_shop3.c +++ b/src/wigglytuff_shop3.c @@ -19,7 +19,7 @@ #include "wigglytuff_shop3.h" extern u8 gUnknown_202E5D8[]; -extern u8 gUnknown_202E628[]; +extern u8 gFormatBuffer_FriendArea[]; static EWRAM_DATA_2 WigglytuffShop3Work *sWigglytuffShop3Work = {0}; @@ -64,9 +64,9 @@ bool8 CreateWigglytuffShop(u32 mode) sWigglytuffShop3Work->menuAction2 = 0; sWigglytuffShop3Work->mode = mode; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_WIGGLYTUFF); - CopyYellowMonsterNametoBuffer(gAvailablePokemonNames[7], MONSTER_WIGGLYTUFF); + CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_WIGGLYTUFF); str = GetMonSpecies(MONSTER_WIGGLYTUFF); - strcpy(gAvailablePokemonNames[6], str); + strcpy(gFormatBuffer_Monsters[6], str); if (sWigglytuffShop3Work->mode == 1) sWigglytuffShop3Work->monPortraitPtr = NULL; @@ -230,8 +230,8 @@ static void UpdateWigglytuffDialogue(void) break; case BUY_FRIEND_AREA: CreateWigglytuffConfirmFriendAreaMenu(); - WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); - gFormatData_202DE30[0] = sWigglytuffShop3Work->friendAreaPrice; + WriteFriendAreaName(gFormatBuffer_FriendArea, sWigglytuffShop3Work->chosenFriendArea, FALSE); + gFormatArgs[0] = sWigglytuffShop3Work->friendAreaPrice; CreateMenuDialogueBoxAndPortrait(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_05], 0, 5, sWigglytuffShop3Work->unk1C, 0, 4, 0, sWigglytuffShop3Work->monPortraitPtr, 12); break; case FRIEND_AREA_INFO: @@ -239,7 +239,7 @@ static void UpdateWigglytuffDialogue(void) break; case CONFIRM_BUY_FRIEND_AREA: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKD; - WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); + WriteFriendAreaName(gFormatBuffer_FriendArea, sWigglytuffShop3Work->chosenFriendArea, FALSE); CreateDialogueBoxAndPortrait(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_06], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_UNKD: @@ -302,8 +302,8 @@ static void UpdateWigglytuffDialogue(void) } string = GetMonSpecies(sWigglytuffShop3Work->chosenSpecies); - strcpy(gAvailablePokemonNames[0], string); - WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); + strcpy(gFormatBuffer_Monsters[0], string); + WriteFriendAreaName(gFormatBuffer_FriendArea, sWigglytuffShop3Work->chosenFriendArea, FALSE); CreateDialogueBoxAndPortrait(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_14], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_HAS_FRIEND_AREA: diff --git a/src/wonder_mail.c b/src/wonder_mail.c index 62e990f69..9a566c99d 100644 --- a/src/wonder_mail.c +++ b/src/wonder_mail.c @@ -197,7 +197,7 @@ u32 sub_8027F88(void) sUnknown_203B2C0->speciesNum = -1; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); sUnknown_203B2C0->monPortrait.faceFile = faceFile; sUnknown_203B2C0->monPortrait.faceData = (void *) faceFile->data; diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c index 70bfb0b2d..6f6f7ed96 100644 --- a/src/wonder_mail_2.c +++ b/src/wonder_mail_2.c @@ -216,7 +216,7 @@ void sub_802B57C(void) sub_802F2C0(); CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); monName = GetMonSpecies(MONSTER_PELIPPER); - strcpy(gAvailablePokemonNames[0], monName); + strcpy(gFormatBuffer_Monsters[0], monName); sub_802B548(2); } }