summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-01-15 22:45:08 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-01-15 22:45:08 -0500
commitc4bae7a571f5aea6785e108089e904f9dad67701 (patch)
treececba529ab866981353afdd75322211a669721ce
parent470c09225f4c058831c2226195af413204f5f03c (diff)
sub_809C04C
-rw-r--r--asm/pokemon_storage_system.s472
-rw-r--r--include/pokemon_storage_system.h2
-rw-r--r--src/pokemon/pokemon_storage_system_4.c163
3 files changed, 161 insertions, 476 deletions
diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s
index 854190e40..eb4a9650e 100644
--- a/asm/pokemon_storage_system.s
+++ b/asm/pokemon_storage_system.s
@@ -5,478 +5,6 @@
.text
- thumb_func_start sub_809C04C
-sub_809C04C: @ 809C04C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x4
- adds r7, r0, 0
- lsls r1, 24
- lsrs r1, 24
- movs r0, 0
- str r0, [sp]
- ldr r0, _0809C0FC @ =gPokemonStorageSystemPtr
- ldr r6, [r0]
- ldr r2, _0809C100 @ =0x000011f2
- adds r2, r6
- mov r8, r2
- mov r0, sp
- ldrh r0, [r0]
- strh r0, [r2]
- cmp r1, 0
- bne _0809C120
- adds r0, r7, 0
- movs r1, 0x41
- bl GetMonData
- ldr r2, _0809C104 @ =0x000011f0
- adds r1, r6, r2
- strh r0, [r1]
- lsls r0, 16
- cmp r0, 0
- bne _0809C08C
- b _0809C1EC
-_0809C08C:
- adds r0, r7, 0
- movs r1, 0x2D
- bl GetMonData
- ldr r2, _0809C108 @ =0x000011f9
- adds r1, r6, r2
- strb r0, [r1]
- ldr r0, _0809C10C @ =0x000011fa
- adds r4, r6, r0
- adds r0, r7, 0
- movs r1, 0x2
- adds r2, r4, 0
- bl GetMonData
- adds r0, r4, 0
- bl StringGetEnd10
- adds r0, r7, 0
- movs r1, 0x38
- bl GetMonData
- ldr r2, _0809C110 @ =0x000011f8
- adds r1, r6, r2
- strb r0, [r1]
- adds r0, r7, 0
- movs r1, 0x8
- bl GetMonData
- ldr r2, _0809C114 @ =0x000011f7
- adds r1, r6, r2
- strb r0, [r1]
- adds r0, r7, 0
- movs r1, 0
- bl GetMonData
- ldr r2, _0809C118 @ =0x000011ec
- adds r1, r6, r2
- str r0, [r1]
- adds r0, r7, 0
- bl GetMonSpritePal
- ldr r2, _0809C11C @ =0x000011e8
- adds r1, r6, r2
- str r0, [r1]
- adds r0, r7, 0
- bl GetMonGender
- lsls r0, 24
- lsrs r0, 24
- str r0, [sp]
- adds r0, r7, 0
- movs r1, 0xC
- bl GetMonData
- b _0809C1B2
- .align 2, 0
-_0809C0FC: .4byte gPokemonStorageSystemPtr
-_0809C100: .4byte 0x000011f2
-_0809C104: .4byte 0x000011f0
-_0809C108: .4byte 0x000011f9
-_0809C10C: .4byte 0x000011fa
-_0809C110: .4byte 0x000011f8
-_0809C114: .4byte 0x000011f7
-_0809C118: .4byte 0x000011ec
-_0809C11C: .4byte 0x000011e8
-_0809C120:
- cmp r1, 0x1
- bne _0809C1D4
- adds r0, r7, 0
- movs r1, 0x41
- bl GetBoxMonData
- ldr r2, _0809C1B8 @ =0x000011f0
- adds r5, r6, r2
- strh r0, [r5]
- lsls r0, 16
- cmp r0, 0
- beq _0809C1EC
- adds r0, r7, 0
- movs r1, 0x1
- bl GetBoxMonData
- mov r9, r0
- adds r0, r7, 0
- movs r1, 0x2D
- bl GetBoxMonData
- ldr r2, _0809C1BC @ =0x000011f9
- adds r1, r6, r2
- strb r0, [r1]
- ldr r0, _0809C1C0 @ =0x000011fa
- adds r4, r6, r0
- adds r0, r7, 0
- movs r1, 0x2
- adds r2, r4, 0
- bl GetBoxMonData
- adds r0, r4, 0
- bl StringGetEnd10
- adds r0, r7, 0
- bl GetLevelFromBoxMonExp
- ldr r2, _0809C1C4 @ =0x000011f8
- adds r1, r6, r2
- strb r0, [r1]
- adds r0, r7, 0
- movs r1, 0x8
- bl GetBoxMonData
- ldr r2, _0809C1C8 @ =0x000011f7
- adds r1, r6, r2
- strb r0, [r1]
- adds r0, r7, 0
- movs r1, 0
- bl GetBoxMonData
- adds r2, r0, 0
- ldr r0, _0809C1CC @ =0x000011ec
- adds r4, r6, r0
- str r2, [r4]
- ldrh r0, [r5]
- mov r1, r9
- bl GetMonSpritePalFromOtIdPersonality
- ldr r2, _0809C1D0 @ =0x000011e8
- adds r1, r6, r2
- str r0, [r1]
- ldrh r0, [r5]
- ldr r1, [r4]
- bl GetGenderFromSpeciesAndPersonality
- lsls r0, 24
- lsrs r0, 24
- str r0, [sp]
- adds r0, r7, 0
- movs r1, 0xC
- bl GetBoxMonData
-_0809C1B2:
- mov r1, r8
- strh r0, [r1]
- b _0809C1DE
- .align 2, 0
-_0809C1B8: .4byte 0x000011f0
-_0809C1BC: .4byte 0x000011f9
-_0809C1C0: .4byte 0x000011fa
-_0809C1C4: .4byte 0x000011f8
-_0809C1C8: .4byte 0x000011f7
-_0809C1CC: .4byte 0x000011ec
-_0809C1D0: .4byte 0x000011e8
-_0809C1D4:
- ldr r2, _0809C220 @ =0x000011f0
- adds r0, r6, r2
- mov r1, sp
- ldrh r1, [r1]
- strh r1, [r0]
-_0809C1DE:
- ldr r0, _0809C224 @ =gPokemonStorageSystemPtr
- ldr r4, [r0]
- ldr r2, _0809C220 @ =0x000011f0
- adds r0, r4, r2
- ldrh r1, [r0]
- cmp r1, 0
- bne _0809C23C
-_0809C1EC:
- ldr r0, _0809C224 @ =gPokemonStorageSystemPtr
- ldr r1, [r0]
- ldr r0, _0809C228 @ =0x000011fa
- adds r2, r1, r0
- movs r0, 0xFF
- strb r0, [r2]
- ldr r0, _0809C22C @ =0x0000120f
- adds r2, r1, r0
- movs r0, 0x1
- negs r0, r0
- strb r0, [r2]
- ldr r0, _0809C230 @ =0x00001234
- adds r2, r1, r0
- movs r0, 0x1
- negs r0, r0
- strb r0, [r2]
- ldr r0, _0809C234 @ =0x00001259
- adds r2, r1, r0
- movs r0, 0x1
- negs r0, r0
- strb r0, [r2]
- ldr r2, _0809C238 @ =0x0000127a
- adds r1, r2
- strb r0, [r1]
- b _0809C43E
- .align 2, 0
-_0809C220: .4byte 0x000011f0
-_0809C224: .4byte gPokemonStorageSystemPtr
-_0809C228: .4byte 0x000011fa
-_0809C22C: .4byte 0x0000120f
-_0809C230: .4byte 0x00001234
-_0809C234: .4byte 0x00001259
-_0809C238: .4byte 0x0000127a
-_0809C23C:
- ldr r2, _0809C28C @ =0x000011f9
- adds r0, r4, r2
- ldrb r0, [r0]
- cmp r0, 0
- beq _0809C2A4
- ldr r0, _0809C290 @ =0x0000120f
- adds r7, r4, r0
- movs r0, 0xFC
- strb r0, [r7]
- movs r0, 0x4
- strb r0, [r7, 0x1]
- movs r0, 0xF
- strb r0, [r7, 0x2]
- movs r0, 0
- strb r0, [r7, 0x3]
- movs r0, 0x1
- strb r0, [r7, 0x4]
- ldr r1, _0809C294 @ =0x00001214
- adds r7, r4, r1
- adds r2, 0x1
- adds r1, r4, r2
- adds r0, r7, 0
- bl StringCopy
- ldr r0, _0809C298 @ =0x00001234
- adds r1, r4, r0
- movs r0, 0xFF
- strb r0, [r1]
- ldr r2, _0809C29C @ =0x00001259
- adds r1, r4, r2
- movs r0, 0x1
- negs r0, r0
- strb r0, [r1]
- ldr r0, _0809C2A0 @ =0x0000127a
- adds r1, r4, r0
- movs r0, 0x1
- negs r0, r0
- strb r0, [r1]
- b _0809C43E
- .align 2, 0
-_0809C28C: .4byte 0x000011f9
-_0809C290: .4byte 0x0000120f
-_0809C294: .4byte 0x00001214
-_0809C298: .4byte 0x00001234
-_0809C29C: .4byte 0x00001259
-_0809C2A0: .4byte 0x0000127a
-_0809C2A4:
- cmp r1, 0x20
- beq _0809C2AC
- cmp r1, 0x1D
- bne _0809C2B0
-_0809C2AC:
- movs r1, 0xFF
- str r1, [sp]
-_0809C2B0:
- ldr r0, _0809C388 @ =gPokemonStorageSystemPtr
- ldr r4, [r0]
- ldr r2, _0809C38C @ =0x0000120f
- adds r7, r4, r2
- movs r0, 0xFC
- mov r9, r0
- strb r0, [r7]
- movs r1, 0x4
- mov r8, r1
- strb r1, [r7, 0x1]
- movs r2, 0xF
- strb r2, [r7, 0x2]
- movs r0, 0
- strb r0, [r7, 0x3]
- movs r6, 0x1
- strb r6, [r7, 0x4]
- ldr r1, _0809C390 @ =0x00001214
- adds r7, r4, r1
- ldr r2, _0809C394 @ =0x000011fa
- adds r1, r4, r2
- adds r0, r7, 0
- bl StringCopy
- ldr r0, _0809C398 @ =0x00001234
- adds r7, r4, r0
- mov r1, r9
- strb r1, [r7]
- mov r2, r8
- strb r2, [r7, 0x1]
- movs r0, 0xF
- strb r0, [r7, 0x2]
- movs r1, 0
- strb r1, [r7, 0x3]
- strb r6, [r7, 0x4]
- mov r2, r9
- strb r2, [r7, 0x5]
- movs r0, 0x13
- mov r10, r0
- strb r0, [r7, 0x6]
- movs r1, 0x7
- strb r1, [r7, 0x7]
- movs r0, 0xBA
- strb r0, [r7, 0x8]
- ldr r2, _0809C39C @ =0x0000123d
- adds r7, r4, r2
- ldr r1, _0809C3A0 @ =0x000011f0
- adds r0, r4, r1
- ldrh r1, [r0]
- movs r0, 0xB
- muls r1, r0
- ldr r0, _0809C3A4 @ =gSpeciesNames
- adds r1, r0
- adds r0, r7, 0
- bl StringCopy
- adds r7, r0, 0
- mov r2, r9
- strb r2, [r7]
- mov r0, r10
- strb r0, [r7, 0x1]
- movs r0, 0x50
- strb r0, [r7, 0x2]
- movs r0, 0xFF
- strb r0, [r7, 0x3]
- ldr r1, _0809C3A8 @ =0x00001259
- adds r7, r4, r1
- strb r2, [r7]
- mov r2, r8
- strb r2, [r7, 0x1]
- movs r0, 0xF
- strb r0, [r7, 0x2]
- movs r1, 0
- strb r1, [r7, 0x3]
- strb r6, [r7, 0x4]
- mov r2, r9
- strb r2, [r7, 0x5]
- mov r0, r10
- strb r0, [r7, 0x6]
- movs r6, 0x8
- strb r6, [r7, 0x7]
- ldr r1, _0809C3AC @ =0x00001261
- adds r7, r4, r1
- movs r0, 0x34
- strb r0, [r7]
- ldr r2, _0809C3B0 @ =0x00001262
- adds r7, r4, r2
- ldr r0, _0809C3B4 @ =0x000011f8
- adds r4, r0
- ldrb r1, [r4]
- adds r0, r7, 0
- movs r2, 0x22
- movs r3, 0x1
- bl sub_8072C14
- adds r7, r0, 0
- mov r1, r9
- strb r1, [r7]
- movs r0, 0x11
- strb r0, [r7, 0x1]
- strb r6, [r7, 0x2]
- adds r7, 0x3
- ldr r2, [sp]
- cmp r2, 0
- beq _0809C3B8
- cmp r2, 0xFE
- beq _0809C3D0
- b _0809C3EA
- .align 2, 0
-_0809C388: .4byte gPokemonStorageSystemPtr
-_0809C38C: .4byte 0x0000120f
-_0809C390: .4byte 0x00001214
-_0809C394: .4byte 0x000011fa
-_0809C398: .4byte 0x00001234
-_0809C39C: .4byte 0x0000123d
-_0809C3A0: .4byte 0x000011f0
-_0809C3A4: .4byte gSpeciesNames
-_0809C3A8: .4byte 0x00001259
-_0809C3AC: .4byte 0x00001261
-_0809C3B0: .4byte 0x00001262
-_0809C3B4: .4byte 0x000011f8
-_0809C3B8:
- mov r0, r9
- strb r0, [r7]
- mov r1, r8
- strb r1, [r7, 0x1]
- strb r1, [r7, 0x2]
- mov r2, sp
- ldrb r2, [r2]
- strb r2, [r7, 0x3]
- movs r0, 0x5
- strb r0, [r7, 0x4]
- movs r0, 0xB5
- b _0809C3E6
-_0809C3D0:
- mov r0, r9
- strb r0, [r7]
- mov r1, r8
- strb r1, [r7, 0x1]
- movs r0, 0x6
- strb r0, [r7, 0x2]
- movs r2, 0
- strb r2, [r7, 0x3]
- movs r0, 0x7
- strb r0, [r7, 0x4]
- movs r0, 0xB6
-_0809C3E6:
- strb r0, [r7, 0x5]
- adds r7, 0x6
-_0809C3EA:
- movs r5, 0xFF
- strb r5, [r7]
- ldr r0, _0809C450 @ =gPokemonStorageSystemPtr
- ldr r2, [r0]
- ldr r1, _0809C454 @ =0x0000127a
- adds r7, r2, r1
- ldr r0, _0809C458 @ =0x000011f2
- adds r3, r2, r0
- ldrh r0, [r3]
- cmp r0, 0
- beq _0809C43C
- movs r4, 0xFC
- strb r4, [r7]
- movs r1, 0x4
- strb r1, [r7, 0x1]
- movs r0, 0xF
- strb r0, [r7, 0x2]
- movs r0, 0
- strb r0, [r7, 0x3]
- movs r0, 0x1
- strb r0, [r7, 0x4]
- ldr r0, _0809C45C @ =0x0000127f
- adds r7, r2, r0
- strb r4, [r7]
- movs r0, 0x6
- strb r0, [r7, 0x1]
- strb r1, [r7, 0x2]
- ldr r1, _0809C460 @ =0x00001282
- adds r7, r2, r1
- ldrh r0, [r3]
- bl ItemId_GetItem
- adds r1, r0, 0
- adds r0, r7, 0
- bl StringCopy
- adds r7, r0, 0
- strb r4, [r7]
- movs r0, 0x7
- strb r0, [r7, 0x1]
- adds r7, 0x2
-_0809C43C:
- strb r5, [r7]
-_0809C43E:
- add sp, 0x4
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .align 2, 0
-_0809C450: .4byte gPokemonStorageSystemPtr
-_0809C454: .4byte 0x0000127a
-_0809C458: .4byte 0x000011f2
-_0809C45C: .4byte 0x0000127f
-_0809C460: .4byte 0x00001282
- thumb_func_end sub_809C04C
-
thumb_func_start sub_809C464
sub_809C464: @ 809C464
push {r4-r7,lr}
diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h
index 8dd51259c..5319b7a2d 100644
--- a/include/pokemon_storage_system.h
+++ b/include/pokemon_storage_system.h
@@ -159,7 +159,7 @@ struct PokemonStorageSystemData {
u8 unk_11e2;
u8 unk_11e3;
u8 filler_11e4[4];
- u8 *unk_11e8;
+ const u8 *unk_11e8;
u32 unk_11ec;
u16 unk_11f0;
u16 unk_11f2;
diff --git a/src/pokemon/pokemon_storage_system_4.c b/src/pokemon/pokemon_storage_system_4.c
index ada4b43bd..eb5a6cb0b 100644
--- a/src/pokemon/pokemon_storage_system_4.c
+++ b/src/pokemon/pokemon_storage_system_4.c
@@ -2,12 +2,14 @@
// Includes
#include "global.h"
#include "ewram.h"
+#include "data2.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "palette.h"
#include "string_util.h"
#include "text.h"
#include "menu.h"
+#include "item.h"
#include "pokemon_summary_screen.h"
#include "pokemon_storage_system.h"
@@ -64,7 +66,7 @@ void diegohint1(u8 a0, u8 a1);
bool8 sub_809BF2C(void);
void sub_809BF74(void);
void sub_809C028(void);
-void sub_809C04C(struct BoxPokemon *pokemon, u8 a1);
+void sub_809C04C(void *pokemon, u8 a1);
void sub_809CC04(void);
// .rodata
@@ -1602,7 +1604,7 @@ void diegohint1(u8 a0, u8 a1)
ExpandBoxMon(gPokemonStorage.boxes[a0] + a1, &gPokemonStorageSystemPtr->unk_2618);
diegohint2(a0, a1);
gPokemonStorageSystemPtr->unk_25b4 = gPokemonStorageSystemPtr->unk_2618;
- sub_809C04C(&gPokemonStorageSystemPtr->unk_25b4.box, 0);
+ sub_809C04C(&gPokemonStorageSystemPtr->unk_25b4, 0);
gUnknown_020384E7 = a0;
gUnknown_020384E8 = a1;
}
@@ -1922,7 +1924,7 @@ void sub_809BF74(void)
case 1:
if (gUnknown_020384E5 < PARTY_SIZE)
{
- sub_809C04C(&gPlayerParty[gUnknown_020384E5].box, 0);
+ sub_809C04C(gPlayerParty + gUnknown_020384E5, 0);
break;
}
// fallthrough
@@ -1944,3 +1946,158 @@ void sub_809C028(void)
else
sub_809BF74();
}
+
+void sub_809C04C(void *pokemon, u8 a1)
+{
+ u8 *buf;
+ u16 gender = MON_MALE;
+ gPokemonStorageSystemPtr->unk_11f2 = 0;
+ if (a1 == 0)
+ {
+ struct Pokemon *pkmn = (struct Pokemon *)pokemon;
+ gPokemonStorageSystemPtr->unk_11f0 = GetMonData(pokemon, MON_DATA_SPECIES2);
+ if (gPokemonStorageSystemPtr->unk_11f0 != SPECIES_NONE)
+ {
+ gPokemonStorageSystemPtr->unk_11f9 = GetMonData(pkmn, MON_DATA_IS_EGG);
+ GetMonData(pkmn, MON_DATA_NICKNAME, gPokemonStorageSystemPtr->unk_11fa);
+ StringGetEnd10(gPokemonStorageSystemPtr->unk_11fa);
+ gPokemonStorageSystemPtr->unk_11f8 = GetMonData(pkmn, MON_DATA_LEVEL);
+ gPokemonStorageSystemPtr->unk_11f7 = GetMonData(pkmn, MON_DATA_MARKINGS);
+ gPokemonStorageSystemPtr->unk_11ec = GetMonData(pkmn, MON_DATA_PERSONALITY);
+ gPokemonStorageSystemPtr->unk_11e8 = GetMonSpritePal(pkmn);
+ gender = GetMonGender(pkmn);
+ gPokemonStorageSystemPtr->unk_11f2 = GetMonData(pkmn, MON_DATA_HELD_ITEM);
+ }
+ }
+ else if (a1 == 1)
+ {
+ struct BoxPokemon *boxmon = (struct BoxPokemon *)pokemon;
+ gPokemonStorageSystemPtr->unk_11f0 = GetBoxMonData(pokemon, MON_DATA_SPECIES2);
+ if (gPokemonStorageSystemPtr->unk_11f0 != SPECIES_NONE)
+ {
+ u32 otId = GetBoxMonData(boxmon, MON_DATA_OT_ID);
+ gPokemonStorageSystemPtr->unk_11f9 = GetBoxMonData(boxmon, MON_DATA_IS_EGG);
+ GetBoxMonData(boxmon, MON_DATA_NICKNAME, gPokemonStorageSystemPtr->unk_11fa);
+ StringGetEnd10(gPokemonStorageSystemPtr->unk_11fa);
+ gPokemonStorageSystemPtr->unk_11f8 = GetLevelFromBoxMonExp(boxmon);
+ gPokemonStorageSystemPtr->unk_11f7 = GetBoxMonData(boxmon, MON_DATA_MARKINGS);
+ gPokemonStorageSystemPtr->unk_11ec = GetBoxMonData(boxmon, MON_DATA_PERSONALITY);
+ gPokemonStorageSystemPtr->unk_11e8 = GetMonSpritePalFromOtIdPersonality(gPokemonStorageSystemPtr->unk_11f0, otId, gPokemonStorageSystemPtr->unk_11ec);
+ gender = GetGenderFromSpeciesAndPersonality(gPokemonStorageSystemPtr->unk_11f0, gPokemonStorageSystemPtr->unk_11ec);
+ gPokemonStorageSystemPtr->unk_11f2 = GetBoxMonData(boxmon, MON_DATA_HELD_ITEM);
+ }
+ }
+ else
+ {
+ gPokemonStorageSystemPtr->unk_11f0 = SPECIES_NONE;
+ }
+ if (gPokemonStorageSystemPtr->unk_11f0 == SPECIES_NONE)
+ {
+ gPokemonStorageSystemPtr->unk_11fa[0] = EOS;
+ gPokemonStorageSystemPtr->unk_120f[0] = EOS;
+ gPokemonStorageSystemPtr->unk_1234[0] = EOS;
+ gPokemonStorageSystemPtr->unk_1259[0] = EOS;
+ gPokemonStorageSystemPtr->unk_127a[0] = EOS;
+ }
+ else if (gPokemonStorageSystemPtr->unk_11f9)
+ {
+ buf = gPokemonStorageSystemPtr->unk_120f;
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x0F; // WHITE2
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x01; // DARK_GREY
+ buf = gPokemonStorageSystemPtr->unk_120f + 5;
+ buf = StringCopy(buf, gPokemonStorageSystemPtr->unk_11fa);
+ gPokemonStorageSystemPtr->unk_1234[0] = EOS;
+ gPokemonStorageSystemPtr->unk_1259[0] = EOS;
+ gPokemonStorageSystemPtr->unk_127a[0] = EOS;
+ }
+ else
+ {
+ if (gPokemonStorageSystemPtr->unk_11f0 == SPECIES_NIDORAN_M || gPokemonStorageSystemPtr->unk_11f0 == SPECIES_NIDORAN_F)
+ gender = MON_GENDERLESS;
+ buf = gPokemonStorageSystemPtr->unk_120f;
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x0F; // WHITE2
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x01; // DARK_GREY
+ buf = gPokemonStorageSystemPtr->unk_120f + 5;
+ buf = StringCopy(buf, gPokemonStorageSystemPtr->unk_11fa);
+ buf = gPokemonStorageSystemPtr->unk_1234;
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x0F; // WHITE2
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x01; // DARK_GREY
+ buf[5] = EXT_CTRL_CODE_BEGIN;
+ buf[6] = 0x13; // CLEAR_TO
+ buf[7] = 7;
+ buf[8] = CHAR_SLASH;
+ buf = gPokemonStorageSystemPtr->unk_1234 + 9;
+ buf = StringCopy(buf, gSpeciesNames[gPokemonStorageSystemPtr->unk_11f0]);
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x13; // CLEAR_TO
+ buf[2] = 0x50;
+ buf[3] = EOS;
+ buf = gPokemonStorageSystemPtr->unk_1259;
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x0F; // WHITE2
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x01; // DARK_GREY
+ buf[5] = EXT_CTRL_CODE_BEGIN;
+ buf[6] = 0x13; // CLEAR_TO
+ buf[7] = 8;
+ buf = gPokemonStorageSystemPtr->unk_1259 + 8;
+ buf[0] = 0x34; // LV
+ buf = gPokemonStorageSystemPtr->unk_1259 + 9;
+ buf = sub_8072C14(buf, gPokemonStorageSystemPtr->unk_11f8, 0x22, STR_CONV_MODE_RIGHT_ALIGN);
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x11; // CLEAR
+ buf[2] = 8;
+ buf += 3;
+ switch (gender)
+ {
+ case MON_MALE:
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x04; // BLUE
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x05; // YELLOW
+ buf[5] = CHAR_MALE;
+ buf += 6;
+ break;
+ case MON_FEMALE:
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x06; // CYAN
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x07; // MAGENTA
+ buf[5] = CHAR_FEMALE;
+ buf += 6;
+ break;
+ }
+ buf[0] = EOS;
+ buf = gPokemonStorageSystemPtr->unk_127a;
+ if (gPokemonStorageSystemPtr->unk_11f2)
+ {
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x04; // COLOR_HIGHLIGHT_SHADOW
+ buf[2] = 0x0F; // WHITE2
+ buf[3] = 0x00; // TRANSPARENT
+ buf[4] = 0x01; // DARK_GREY
+ buf = gPokemonStorageSystemPtr->unk_127a + 5;
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x06; // size
+ buf[2] = 0x04;
+ buf = gPokemonStorageSystemPtr->unk_127a + 8;
+ buf = StringCopy(buf, ItemId_GetItem(gPokemonStorageSystemPtr->unk_11f2)->name);
+ buf[0] = EXT_CTRL_CODE_BEGIN;
+ buf[1] = 0x07; // UNKNOWN_7;
+ buf += 2;
+ }
+ buf[0] = EOS;
+ }
+}