summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pokemon/pokemon_storage_system_2.c2
-rw-r--r--src/pokemon/pokemon_storage_system_4.c75
2 files changed, 76 insertions, 1 deletions
diff --git a/src/pokemon/pokemon_storage_system_2.c b/src/pokemon/pokemon_storage_system_2.c
index 4657ed158..512bde5db 100644
--- a/src/pokemon/pokemon_storage_system_2.c
+++ b/src/pokemon/pokemon_storage_system_2.c
@@ -343,7 +343,7 @@ void sub_8096B5C(void)
switch (gPokemonStorageSystemPtr->unk_0006)
{
case 0:
- ShowPokemonSummaryScreen(gPokemonStorageSystemPtr->unk_2690, gPokemonStorageSystemPtr->unk_268d, gPokemonStorageSystemPtr->unk_268c, sub_80969A0, gPokemonStorageSystemPtr->unk_268e);
+ ShowPokemonSummaryScreen(gPokemonStorageSystemPtr->unk_2690.pokemon, gPokemonStorageSystemPtr->unk_268d, gPokemonStorageSystemPtr->unk_268c, sub_80969A0, gPokemonStorageSystemPtr->unk_268e);
break;
case 1:
DoNamingScreen(1, gPokemonStorage.boxNames[gPokemonStorage.currentBox], 0, 0, 0, sub_80969A0);
diff --git a/src/pokemon/pokemon_storage_system_4.c b/src/pokemon/pokemon_storage_system_4.c
index 2469d42b1..40de7d634 100644
--- a/src/pokemon/pokemon_storage_system_4.c
+++ b/src/pokemon/pokemon_storage_system_4.c
@@ -1,12 +1,14 @@
// Includes
#include "global.h"
+#include "ewram.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "palette.h"
#include "string_util.h"
#include "text.h"
#include "menu.h"
+#include "pokemon_summary_screen.h"
#include "pokemon_storage_system.h"
// Static type declarations
@@ -1786,3 +1788,76 @@ s8 sub_809B960(void)
}
return -1;
}
+
+void sub_809BB90(void)
+{
+ if (gUnknown_020384E6)
+ gUnknown_02038480 = gPokemonStorageSystemPtr->unk_25b4;
+}
+
+void sub_809BBC0(void)
+{
+ if (gUnknown_020384E6)
+ {
+ if (gUnknown_020384E7 == 14)
+ gPokemonStorageSystemPtr->unk_25b4 = gUnknown_02038480;
+ else
+ gPokemonStorageSystemPtr->unk_25b4.box = gUnknown_02038480.box;
+ }
+}
+
+void sub_809BC18(void)
+{
+ if (gUnknown_020384E6)
+ {
+ sub_809BB90();
+ gPokemonStorageSystemPtr->unk_2690.pokemon = &gUnknown_02038480;
+ gPokemonStorageSystemPtr->unk_268d = 0;
+ gPokemonStorageSystemPtr->unk_268c = 0;
+ gPokemonStorageSystemPtr->unk_268e = 0;
+ }
+ else if (gUnknown_020384E4 == 1)
+ {
+ gPokemonStorageSystemPtr->unk_2690.pokemon = gPlayerParty;
+ gPokemonStorageSystemPtr->unk_268d = gUnknown_020384E5;
+ gPokemonStorageSystemPtr->unk_268c = StorageSystemGetPartySize() - 1;
+ gPokemonStorageSystemPtr->unk_268e = 0;
+ }
+ else
+ {
+ gPokemonStorageSystemPtr->unk_2690.box = gPokemonStorage.boxes[gPokemonStorage.currentBox];
+ gPokemonStorageSystemPtr->unk_268d = gUnknown_020384E5;
+ gPokemonStorageSystemPtr->unk_268c = 30 - 1;
+ gPokemonStorageSystemPtr->unk_268e = 5;
+ }
+}
+
+void sub_809BD14(void)
+{
+ if (gUnknown_020384E6)
+ sub_809BBC0();
+ else
+ gUnknown_020384E5 = pssData.monIndex;
+}
+
+s16 party_compaction(void)
+{
+ s16 retVal = -1;
+ u16 i;
+ u16 last;
+
+ for (i = 0, last = 0; i < PARTY_SIZE; i++)
+ {
+ if ((u16)GetMonData(gPlayerParty + i, MON_DATA_SPECIES) != SPECIES_NONE)
+ {
+ if (i != last)
+ gPlayerParty[last] = gPlayerParty[i];
+ last++;
+ }
+ else if (retVal == -1)
+ retVal = i;
+ }
+ for (; last < PARTY_SIZE; last++)
+ ZeroMonData(gPlayerParty + last);
+ return retVal;
+}