Further documentation of party_menu.c

This commit is contained in:
Slawter666 2019-05-12 23:41:25 +01:00 committed by huderlem
parent d1a12be53a
commit 2fdc489bc0
5 changed files with 514 additions and 476 deletions

View File

@ -33,7 +33,7 @@ struct Struct203CEC8
u8 unk8_0:4; u8 unk8_0:4;
u8 mode:2; u8 mode:2;
u8 unk8_2:2; u8 unk8_2:2;
s8 unk9; s8 slotId;
s8 unkA; s8 unkA;
u8 unkB; u8 unkB;
u16 unkC; u16 unkC;

View File

@ -2091,45 +2091,45 @@ extern const u8 gDaycareText_DontLikeOther[];
extern const u8 gDaycareText_PlayOther[]; extern const u8 gDaycareText_PlayOther[];
// party menu // party menu
extern const u8 gUnknown_085E9E43[]; extern const u8 gText_ChoosePokemon[];
extern const u8 gUnknown_085EA010[]; extern const u8 gText_ChoosePokemonCancel[];
extern const u8 gUnknown_085EA02A[]; extern const u8 gText_ChoosePokemonConfirm[];
extern const u8 gUnknown_085E9E55[]; extern const u8 gText_MoveToWhere[];
extern const u8 gUnknown_085E9E64[]; extern const u8 gText_TeachWhichPokemon[];
extern const u8 gUnknown_085E9E79[]; extern const u8 gText_UseOnWhichPokemon[];
extern const u8 gUnknown_085E9E8F[]; extern const u8 gText_GiveToWhichPokemon[];
extern const u8 gUnknown_085E9EBC[]; extern const u8 gText_NothingToCut[];
extern const u8 gUnknown_085E9ED4[]; extern const u8 gText_CantSurfHere[];
extern const u8 gUnknown_085E9EE9[]; extern const u8 gText_AlreadySurfing[];
extern const u8 gUnknown_085E9FDB[]; extern const u8 gText_CurrentIsTooFast[];
extern const u8 gUnknown_085EA046[]; extern const u8 gText_EnjoyCycling[];
extern const u8 gUnknown_085EA05B[]; extern const u8 gText_InUseAlready_PM[];
extern const u8 gUnknown_085E9F01[]; extern const u8 gText_CantUseHere[];
extern const u8 gUnknown_085E9F58[]; extern const u8 gText_NoPokemonForBattle[];
extern const u8 gUnknown_085E9F6F[]; extern const u8 gText_ChoosePokemon2[];
extern const u8 gUnknown_085E9F81[]; extern const u8 gText_NotEnoughHp[];
extern const u8 gUnknown_085E9F90[]; extern const u8 gText_PokemonAreNeeded[];
extern const u8 gUnknown_085E9FA7[]; extern const u8 gText_PokemonCantBeSame[];
extern const u8 gUnknown_085E9FC2[]; extern const u8 gText_NoIdenticalHoldItems[];
extern const u8 gUnknown_085E9EA6[]; extern const u8 gText_DoWhatWithPokemon[];
extern const u8 gUnknown_085E9F16[]; extern const u8 gText_RestoreWhichMove[];
extern const u8 gUnknown_085E9F2A[]; extern const u8 gText_BoostPp[];
extern const u8 gUnknown_085E9F42[]; extern const u8 gText_DoWhatWithItem[];
extern const u8 gUnknown_085E9FF9[]; extern const u8 gText_DoWhatWithMail[];
extern const u8 gUnknown_085EA073[]; extern const u8 gText_AlreadyHoldingOne[];
extern const u8 gUnknown_085EA091[]; extern const u8 gText_NoUse[];
extern const u8 gUnknown_085EA099[]; extern const u8 gText_Able[];
extern const u8 gUnknown_085EA09E[]; extern const u8 gText_First_PM[];
extern const u8 gUnknown_085EA0A4[]; extern const u8 gText_Second_PM[];
extern const u8 gUnknown_085EA0AB[]; extern const u8 gText_Third_PM[];
extern const u8 gUnknown_085EA0E7[]; extern const u8 gText_Fourth[];
extern const u8 gUnknown_085EA0B1[]; extern const u8 gText_Able2[];
extern const u8 gUnknown_085EA0B6[]; extern const u8 gText_NotAble[];
extern const u8 gUnknown_085EA0BF[]; extern const u8 gText_Able3[];
extern const u8 gUnknown_085EA0C5[]; extern const u8 gText_NotAble2[];
extern const u8 gUnknown_085EA0CF[]; extern const u8 gText_Learned[];
extern const u8 gUnknown_085EA0D7[]; extern const u8 gText_Have[];
extern const u8 gUnknown_085EA0DC[]; extern const u8 gText_DontHave[];
extern const u8 gText_Take[]; extern const u8 gText_Take[];
extern const u8 gText_Mail[]; extern const u8 gText_Mail[];
extern const u8 gText_Take2[]; extern const u8 gText_Take2[];

View File

@ -32,7 +32,7 @@ bool8 SetUpFieldMove_SoftBoiled(void)
void sub_8161560(u8 taskId) void sub_8161560(u8 taskId)
{ {
gUnknown_0203CEC8.unkB = 0xA; gUnknown_0203CEC8.unkB = 0xA;
gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.unk9; gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId;
sub_81B0FCC(GetCursorSelectionMonId(), 0x1); sub_81B0FCC(GetCursorSelectionMonId(), 0x1);
display_pokemon_menu_message(0x5); display_pokemon_menu_message(0x5);
gTasks[taskId].func = sub_81B1370; gTasks[taskId].func = sub_81B1370;
@ -42,7 +42,7 @@ void sub_81615A8(u8 taskId)
{ {
u16 hp; u16 hp;
u8 unk9 = gUnknown_0203CEC8.unk9; u8 slotId = gUnknown_0203CEC8.slotId;
u8 pokemonIndex = gUnknown_0203CEC8.unkA; u8 pokemonIndex = gUnknown_0203CEC8.unkA;
if(pokemonIndex > 6) if(pokemonIndex > 6)
{ {
@ -53,20 +53,20 @@ void sub_81615A8(u8 taskId)
} }
hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP); hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP);
if(hp == 0 || unk9 == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp) if(hp == 0 || slotId == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp)
{ {
sub_81617B8(taskId); sub_81617B8(taskId);
return; return;
} }
PlaySE(SE_KAIFUKU); PlaySE(SE_KAIFUKU);
sub_81B1F18(taskId, unk9, -1, GetMonData(&gPlayerParty[unk9], MON_DATA_MAX_HP)/5, sub_816166C); sub_81B1F18(taskId, slotId, -1, GetMonData(&gPlayerParty[slotId], MON_DATA_MAX_HP)/5, sub_816166C);
} }
static void sub_816166C(u8 taskId) static void sub_816166C(u8 taskId)
{ {
PlaySE(SE_KAIFUKU); PlaySE(SE_KAIFUKU);
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAX_HP)/5, sub_81616C0); sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAX_HP)/5, sub_81616C0);
} }
static void sub_81616C0(u8 taskId) static void sub_81616C0(u8 taskId)
@ -83,8 +83,8 @@ static void sub_8161724(u8 taskId)
if(sub_81B1BD4() == 1) if(sub_81B1BD4() == 1)
return; return;
gUnknown_0203CEC8.unkB = 0x0; gUnknown_0203CEC8.unkB = 0x0;
sub_81B0FCC(gUnknown_0203CEC8.unk9, 0); sub_81B0FCC(gUnknown_0203CEC8.slotId, 0);
gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA; gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA;
sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); sub_81B0FCC(gUnknown_0203CEC8.unkA, 1);
ClearStdWindowAndFrameToTransparent(0x6, FALSE); ClearStdWindowAndFrameToTransparent(0x6, FALSE);
ClearWindowTilemap(0x6); ClearWindowTilemap(0x6);

File diff suppressed because it is too large Load Diff

View File

@ -424,45 +424,45 @@ const u8 gText_PkmnGotOverInfatuation[] = _("{STR_VAR_1} got over its\ninfatuati
const u8 gText_ThrowAwayItem[] = _("Throw away this\n{STR_VAR_1}?"); const u8 gText_ThrowAwayItem[] = _("Throw away this\n{STR_VAR_1}?");
const u8 gText_ItemThrownAway[] = _("The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}"); const u8 gText_ItemThrownAway[] = _("The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}");
const u8 gUnknown_085E9E2E[] = _("Teach which POKéMON?"); const u8 gUnknown_085E9E2E[] = _("Teach which POKéMON?");
const u8 gUnknown_085E9E43[] = _("Choose a POKéMON."); const u8 gText_ChoosePokemon[] = _("Choose a POKéMON.");
const u8 gUnknown_085E9E55[] = _("Move to where?"); const u8 gText_MoveToWhere[] = _("Move to where?");
const u8 gUnknown_085E9E64[] = _("Teach which POKéMON?"); const u8 gText_TeachWhichPokemon[] = _("Teach which POKéMON?");
const u8 gUnknown_085E9E79[] = _("Use on which POKéMON?"); const u8 gText_UseOnWhichPokemon[] = _("Use on which POKéMON?");
const u8 gUnknown_085E9E8F[] = _("Give to which POKéMON?"); const u8 gText_GiveToWhichPokemon[] = _("Give to which POKéMON?");
const u8 gUnknown_085E9EA6[] = _("Do what with this {PKMN}?"); const u8 gText_DoWhatWithPokemon[] = _("Do what with this {PKMN}?");
const u8 gUnknown_085E9EBC[] = _("There's nothing to CUT."); const u8 gText_NothingToCut[] = _("There's nothing to CUT.");
const u8 gUnknown_085E9ED4[] = _("You can't SURF here."); const u8 gText_CantSurfHere[] = _("You can't SURF here.");
const u8 gUnknown_085E9EE9[] = _("You're already SURFING."); const u8 gText_AlreadySurfing[] = _("You're already SURFING.");
const u8 gUnknown_085E9F01[] = _("Can't use that here."); const u8 gText_CantUseHere[] = _("Can't use that here.");
const u8 gUnknown_085E9F16[] = _("Restore which move?"); const u8 gText_RestoreWhichMove[] = _("Restore which move?");
const u8 gUnknown_085E9F2A[] = _("Boost PP of which move?"); const u8 gText_BoostPp[] = _("Boost PP of which move?");
const u8 gUnknown_085E9F42[] = _("Do what with an item?"); const u8 gText_DoWhatWithItem[] = _("Do what with an item?");
const u8 gUnknown_085E9F58[] = _("No POKéMON for battle!"); const u8 gText_NoPokemonForBattle[] = _("No POKéMON for battle!");
const u8 gUnknown_085E9F6F[] = _("Choose a POKéMON."); const u8 gText_ChoosePokemon2[] = _("Choose a POKéMON.");
const u8 gUnknown_085E9F81[] = _("Not enough HP…"); const u8 gText_NotEnoughHp[] = _("Not enough HP…");
const u8 gUnknown_085E9F90[] = _("{STR_VAR_1} POKéMON are needed."); const u8 gText_PokemonAreNeeded[] = _("{STR_VAR_1} POKéMON are needed.");
const u8 gUnknown_085E9FA7[] = _("POKéMON can't be the same."); const u8 gText_PokemonCantBeSame[] = _("POKéMON can't be the same.");
const u8 gUnknown_085E9FC2[] = _("No identical hold items."); const u8 gText_NoIdenticalHoldItems[] = _("No identical hold items.");
const u8 gUnknown_085E9FDB[] = _("The current is much too fast!"); const u8 gText_CurrentIsTooFast[] = _("The current is much too fast!");
const u8 gUnknown_085E9FF9[] = _("Do what with the MAIL?"); const u8 gText_DoWhatWithMail[] = _("Do what with the MAIL?");
const u8 gUnknown_085EA010[] = _("Choose POKéMON or CANCEL."); const u8 gText_ChoosePokemonCancel[] = _("Choose POKéMON or CANCEL.");
const u8 gUnknown_085EA02A[] = _("Choose POKéMON and confirm."); const u8 gText_ChoosePokemonConfirm[] = _("Choose POKéMON and confirm.");
const u8 gUnknown_085EA046[] = _("Let's enjoy cycling!"); const u8 gText_EnjoyCycling[] = _("Let's enjoy cycling!");
const u8 gUnknown_085EA05B[] = _("This is in use already."); const u8 gText_InUseAlready_PM[] = _("This is in use already.");
const u8 gUnknown_085EA073[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}."); const u8 gText_AlreadyHoldingOne[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}.");
const u8 gUnknown_085EA091[] = _("No use."); const u8 gText_NoUse[] = _("No use.");
const u8 gUnknown_085EA099[] = _("ABLE"); const u8 gText_Able[] = _("ABLE");
const u8 gUnknown_085EA09E[] = _("FIRST"); const u8 gText_First_PM[] = _("FIRST");
const u8 gUnknown_085EA0A4[] = _("SECOND"); const u8 gText_Second_PM[] = _("SECOND");
const u8 gUnknown_085EA0AB[] = _("THIRD"); const u8 gText_Third_PM[] = _("THIRD");
const u8 gUnknown_085EA0B1[] = _("ABLE"); const u8 gText_Able2[] = _("ABLE");
const u8 gUnknown_085EA0B6[] = _("NOT ABLE"); const u8 gText_NotAble[] = _("NOT ABLE");
const u8 gUnknown_085EA0BF[] = _("ABLE!"); const u8 gText_Able3[] = _("ABLE!");
const u8 gUnknown_085EA0C5[] = _("NOT ABLE!"); const u8 gText_NotAble2[] = _("NOT ABLE!");
const u8 gUnknown_085EA0CF[] = _("LEARNED"); const u8 gText_Learned[] = _("LEARNED");
const u8 gUnknown_085EA0D7[] = _("HAVE"); const u8 gText_Have[] = _("HAVE");
const u8 gUnknown_085EA0DC[] = _("DON'T HAVE"); const u8 gText_DontHave[] = _("DON'T HAVE");
const u8 gUnknown_085EA0E7[] = _("FOURTH"); const u8 gText_Fourth[] = _("FOURTH");
const u8 gText_PkmnCantParticipate[] = _("That POKéMON can't participate.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnCantParticipate[] = _("That POKéMON can't participate.{PAUSE_UNTIL_PRESS}");
const u8 gText_CancelParticipation[] = _("Cancel participation?"); const u8 gText_CancelParticipation[] = _("Cancel participation?");
const u8 gText_CancelBattle[] = _("Cancel the battle?"); const u8 gText_CancelBattle[] = _("Cancel the battle?");