summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-09-02 18:47:26 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-09-02 18:47:26 -0400
commite36682b776b03c69b7d6dc3f2bfce5e97c255830 (patch)
tree859283087ad84519df8af93ca050bc8e6031de73 /src
parent01b88dba1f0a7f28c8d047e711affeaa14c257d4 (diff)
sub_804A33C
Diffstat (limited to 'src')
-rw-r--r--src/trade.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/trade.c b/src/trade.c
index 302d323d3..ad97b0ca7 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -71,7 +71,8 @@ struct TradeEwramSubstruct {
/*0x0042*/ u8 partyCounts[2];
/*0x0044*/ u8 tradeMenuOptionsActive[13];
/*0x0051*/ u8 unk_0051[6];
- /*0x0056*/ u8 filler_0057[30];
+ /*0x0057*/ u8 filler_0057[6];
+ /*0x005d*/ u8 unk_005d[4][6];
/*0x0075*/ u8 unk_0075;
/*0x0076*/ u8 filler_0076[4];
/*0x007a*/ u8 unk_007a;
@@ -2017,6 +2018,7 @@ static void sub_8049E9C(u8 a0)
}
}
+// TODO: Figure out what the f**k is going on here
//static void sub_8049ED4(u8 a0)
//{
// struct Pokemon pokemon;
@@ -2024,8 +2026,8 @@ static void sub_8049E9C(u8 a0)
// u8 temp0 = gUnknown_03004824->unk_0082[a0];
// u8 sp_plus_6c = temp0 < PARTY_SIZE ? 1 : 0;
// u8 r8 = temp0 % 6;
-// u8 stringLength;
-// u8 string[12];
+// s8 stringLength;
+// u8 string[10];
//
// switch (gUnknown_03004824->unk_0080[a0])
// {
@@ -2098,6 +2100,36 @@ u8 sub_804A2B4(u8 *a0, u8 whichParty, u8 whichPokemon)
return GetStringWidthGivenWindowConfig(&gWindowConfig_81E7294, a0);
}
+void sub_804A33C(u8 *a0, u8 whichParty, u8 whichPokemon)
+{
+ u16 i;
+ u16 moves[4];
+ if (gUnknown_03004824->unk_005d[whichParty][whichPokemon] == 0)
+ {
+ for (i = 0; i < 4; i ++)
+ {
+ if (whichParty == 0)
+ moves[i] = GetMonData(&gPlayerParty[whichPokemon], MON_DATA_MOVE1 + i, NULL);
+ else
+ moves[i] = GetMonData(&gEnemyParty[whichPokemon], MON_DATA_MOVE1 + i, NULL);
+ }
+ StringCopy(a0, gOtherText_Terminator);
+ for (i = 0; i < 4; i ++)
+ {
+ if (moves[i] != 0)
+ {
+ StringAppend(a0, gMoveNames[moves[i]]);
+ }
+ StringAppend(a0, gOtherText_ControlAndMiscText);
+ }
+ }
+ else
+ {
+ StringCopy(a0, gOtherText_Terminator);
+ StringAppend(a0, gOtherText_FourQuestions);
+ }
+}
+
asm(".section .text.sub_804A96C");
/*static*/ void sub_804A96C(struct UnkStructD *arg0, u8 left, u8 top, const u16 *tilemap, u8 width, u8 height, u16 sp8) {