move some data to friend area action menu

This commit is contained in:
Seth Barberee
2022-12-30 11:12:14 -08:00
parent ea2bbf7c86
commit 31e1c409e8
7 changed files with 56 additions and 109 deletions

View File

@@ -4672,80 +4672,3 @@ gUnknown_80DD74C: @ 80DD74C
.byte 0x00, 0x00, 0x00, 0x00
.global gUnknown_80DD764
gUnknown_80DD764: @ 80DD764
.string "You have chosen to say farewell\n"
.string "to this Pokémon.{EXTRA_MSG}"
.string "The Pokémon will leave its Friend Area.\n"
.string "It will no longer be available for\n"
.string "adventures. Is that OK?\0"
.align 2,0
.global gUnknown_80DD7FC
gUnknown_80DD7FC: @ 80DD7FC
.string "If you say farewell to this\n"
.string "Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
.string "You will never be able to get another one\n"
.string "like it to join your team.\n"
.string "Will you release it anyway?\0"
.align 2,0
.global gUnknown_80DD8A0
gUnknown_80DD8A0: @ 80DD8A0
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
.align 2,0
.global gUnknown_80DD8D0
gUnknown_80DD8D0: @ 80DD8D0
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.\0"
.align 2,0
.global gFriendActionStandby
gFriendActionStandby: @ 80DD8F8
.string "Stand By\0"
.align 2,0
.global gFriendActionMakeLeader
gFriendActionMakeLeader: @ 80DD904
.string "Make Leader\0"
.global gFriendActionJoinTeam
gFriendActionJoinTeam: @ 80DD910
.string "Join Team\0"
.align 2,0
.global gFriendActionSayFarewell
gFriendActionSayFarewell: @ 80DD91C
.string "Say Farewell\0"
.align 2,0
.global gFriendActionGive
gFriendActionGive: @ 80DD92C
.string "Give\0"
.align 2,0
.global gFriendActionTake
gFriendActionTake: @ 80DD934
.string "Take\0"
.align 2,0
.global gFriendActionSummary
gFriendActionSummary: @ 80DD93C
.string "Summary\0"
.align 2,0
.global gFriendActionMoves
gFriendActionMoves: @ 80DD944
.string "Moves\0"
.align 2,0
.global gFriendActionCheckIQ
gFriendActionCheckIQ: @ 80DD94C
.string "Check IQ\0"
.align 2,0
.global gUnknown_80DD958
gUnknown_80DD958: @ 80DD958
.string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0"
.string "pksdir0\0"

View File

@@ -424,6 +424,8 @@ SECTIONS {
src/debug.o(.rodata);
src/save.o(.rodata);
data/data_80D47B8.o(.rodata);
src/friend_area_action_menu.o(.rodata);
src/friend_area_action_menu_1.o(.rodata);
src/wonder_mail.o(.rodata);
src/thank_you_wonder_mail.o(.rodata);
src/wonder_mail_2.o(.rodata);

View File

@@ -13,10 +13,6 @@ extern struct UnkTextStruct2 gUnknown_80DD74C;
extern struct UnkTextStruct2 gUnknown_80DD704;
extern struct UnkTextStruct2 gUnknown_80DD6EC;
extern struct UnkTextStruct2 gUnknown_80DD71C;
extern const char gUnknown_80DD764[];
extern const char gUnknown_80DD7FC[];
extern const char gUnknown_80DD8A0[];
extern const char gUnknown_80DD8D0[];
extern void sub_80141B4(const char *r0, u32, u32 *r1, u32);
extern void sub_8014248(const char *r0, u32, u32, struct MenuItem *r4, u32, u32, u32, u32 *r5, u32);
@@ -58,6 +54,27 @@ extern void sub_8027D00();
extern void CreateFriendActionMenu();
extern void sub_80276A8();
ALIGNED(4) const u8 gFriendAreaActionSayFarewellPrompt[] = _(
"You have chosen to say farewell\n"
"to this Pokémon.{EXTRA_MSG}"
"The Pokémon will leave its Friend Area.\n"
"It will no longer be available for\n"
"adventures. Is that OK?");
ALIGNED(4) const u8 gFriendAreaActionSayFarewellConfirm[] = _(
"If you say farewell to this\n"
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
"You will never be able to get another one\n"
"like it to join your team.\n"
"Will you release it anyway?");
ALIGNED(4) const u8 gUnknown_80DD8A0[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD8D0[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.");
u32 sub_8027074(void)
{
@@ -139,7 +156,7 @@ void SetFriendAreaActionMenuState(u32 newState)
void sub_802719C(void)
{
s32 iVar3;
s32 index;
sub_8006518(gUnknown_203B2BC->unk180);
switch(gUnknown_203B2BC->state)
@@ -156,9 +173,9 @@ void sub_802719C(void)
sub_8012CAC(&gUnknown_203B2BC->unk180[2], gUnknown_203B2BC->menuItems);
break;
default:
for(iVar3 = 0; iVar3 < 4; iVar3++)
for(index = 0; index < 4; index++)
{
gUnknown_203B2BC->unk180[iVar3] = gUnknown_80DD6EC;
gUnknown_203B2BC->unk180[index] = gUnknown_80DD6EC;
}
break;
}
@@ -214,19 +231,11 @@ void sub_8027274(void)
break;
case 8:
sub_8027794();
// You have chosen to say farewell to this Pokemon.
// The pokemon will leave its friend area.
// It will no longer be available for adventures.
// Is that OK?
sub_8014248(gUnknown_80DD764,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
sub_8014248(gFriendAreaActionSayFarewellPrompt,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case 9:
sub_8027794();
// If you say farewell to this Pokemon, it will be gone forever.
// You will never be able to get another one
// like it to join your team.
// Will you release it anyway?
sub_8014248(gUnknown_80DD7FC,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
sub_8014248(gFriendAreaActionSayFarewellConfirm,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case 0x10:
sub_8093560(gUnknown_203B2BC->unk20,gUnknown_203B2BC->unk28,&gUnknown_203B2BC->unk68);

View File

@@ -33,8 +33,7 @@ extern struct PokemonStruct *sub_808D3F8(void);
extern struct PokemonStruct *sub_808D3BC(void);
extern u32 sub_801F890(void);
extern void sub_801F8D0(void);
extern u8 gUnknown_80DD958[];
extern void xxx_format_and_draw(u32, u32, u8 *, ...);
extern void xxx_format_and_draw(u32, u32, const u8 *, ...);
extern void sub_8008C54(u32);
extern void sub_80073B8(u32);
extern void sub_80073E0(u32);
@@ -56,6 +55,20 @@ extern void sub_808ED00();
extern s16 sub_8023B44(void);
extern void sub_8023C60(void);
ALIGNED(4) const u8 gFriendActionStandby[] = "Stand By";
ALIGNED(4) const u8 gFriendActionMakeLeader[] = "Make Leader";
ALIGNED(4) const u8 gFriendActionJoinTeam[] = "Join Team";
ALIGNED(4) const u8 gFriendActionSayFarewell[] = "Say Farewell";
ALIGNED(4) const u8 gFriendActionGive[] = "Give";
ALIGNED(4) const u8 gFriendActionTake[] = "Take";
ALIGNED(4) const u8 gFriendActionSummary[] = "Summary";
ALIGNED(4) const u8 gFriendActionMoves[] = "Moves";
ALIGNED(4) const u8 gFriendActionCheckIQ[] = "Check IQ";
ALIGNED(4) const u8 gUnknown_80DD958[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
static const u8 filler[] = "pksdir0";
void sub_80277FC(void)
{
struct PokemonStruct *pokeStruct;

View File

@@ -99,7 +99,7 @@ void sub_80268CC(void)
if (sub_808D750(gUnknown_203B2B8->pokeSpecies)) {
#ifdef NONMATCHING
puVar3 = &gUnknown_203B2B8->pokeSpecies[gRecruitedPokemonRef->pokemon];
pokeStruct = &gUnknown_203B2B8->pokeSpecies[gRecruitedPokemonRef->pokemon];
#else
register size_t offset asm("r1") = offsetof(struct unkStruct_203B45C, pokemon[gUnknown_203B2B8->pokeSpecies]);
struct PokemonStruct* p = gRecruitedPokemonRef->pokemon;

View File

@@ -137,7 +137,7 @@ void UpdateKangaskhanStorageState(u32 newState)
void sub_8016E80(void)
{
s32 iVar3;
s32 index;
sub_8006518(gUnknown_203B208->unkEC);
switch(gUnknown_203B208->currState)
@@ -164,8 +164,8 @@ void sub_8016E80(void)
gUnknown_203B208->unkEC[2] = gUnknown_80DB760;
break;
default:
for(iVar3 = 0; iVar3 < 4; iVar3++)
gUnknown_203B208->unkEC[iVar3] = gUnknown_80DB748;
for(index = 0; index < 4; index++)
gUnknown_203B208->unkEC[index] = gUnknown_80DB748;
break;
}
ResetUnusedInputStruct();

View File

@@ -210,19 +210,19 @@ void sub_8017928(void)
void sub_80179A8(void)
{
s32 iVar1;
s32 index;
s32 menuAction;
if (sub_80144A4(&menuAction) == 0) {
switch(menuAction)
{
case 4:
for(iVar1 = 0; iVar1 < INVENTORY_SIZE; iVar1++)
for(index = 0; index < INVENTORY_SIZE; index++)
{
if (sub_801AED0(iVar1) != 0) {
MoveToStorage(&gTeamInventory_203B460->teamItems[iVar1]);
gTeamInventory_203B460->teamItems[iVar1].itemIndex = 0;
gTeamInventory_203B460->teamItems[iVar1].itemFlags = 0;
if (sub_801AED0(index) != 0) {
MoveToStorage(&gTeamInventory_203B460->teamItems[index]);
gTeamInventory_203B460->teamItems[index].itemIndex = 0;
gTeamInventory_203B460->teamItems[index].itemFlags = 0;
}
}
FillInventoryGaps();
@@ -542,7 +542,7 @@ void sub_8017F10(u32 newState)
void sub_8017F28(void)
{
s32 iVar2;
s32 index;
sub_8006518(gUnknown_203B20C->unkF0);
@@ -579,9 +579,9 @@ void sub_8017F28(void)
break;
default:
case 0:
for(iVar2 = 0; iVar2 < 4; iVar2++)
for(index = 0; index < 4; index++)
{
gUnknown_203B20C->unkF0[iVar2] = gUnknown_80DB7B8;
gUnknown_203B20C->unkF0[index] = gUnknown_80DB7B8;
}
break;
}