summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evolution_scene.c20
-rw-r--r--src/pokemon.c8
-rw-r--r--src/pokemon_size_record.c5
-rw-r--r--src/trade.c2
4 files changed, 18 insertions, 17 deletions
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index 6f5a4dce7..7b25754db 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -553,20 +553,20 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
const struct Evolution *evos2;
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies][1].targetSpecies));
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]));
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data));
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data));
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, (&data));
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]);
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data);
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data);
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, &data);
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + CONTEST_CATEGORIES_COUNT; i++)
- SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
- for (i = MON_DATA_CHAMPION_RIBBON; i <= MON_DATA_FILLER; i++)
- SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
+ SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);
+ for (i = MON_DATA_CHAMPION_RIBBON; i <= MON_DATA_UNUSED_RIBBONS; i++)
+ SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_STATUS, (&data));
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_STATUS, &data);
data = 0xFF;
- SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MAIL, (&data));
+ SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MAIL, &data);
CalculateMonStats(&gPlayerParty[gPlayerPartyCount]);
CalculatePlayerPartyCount();
diff --git a/src/pokemon.c b/src/pokemon.c
index 5812e987a..c263cacc6 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -3928,8 +3928,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
case MON_DATA_WORLD_RIBBON:
retVal = substruct3->worldRibbon;
break;
- case MON_DATA_FILLER:
- retVal = substruct3->filler;
+ case MON_DATA_UNUSED_RIBBONS:
+ retVal = substruct3->unusedRibbons;
break;
case MON_DATA_EVENT_LEGAL:
retVal = substruct3->eventLegal;
@@ -4307,8 +4307,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
case MON_DATA_WORLD_RIBBON:
SET8(substruct3->worldRibbon);
break;
- case MON_DATA_FILLER:
- SET8(substruct3->filler);
+ case MON_DATA_UNUSED_RIBBONS:
+ SET8(substruct3->unusedRibbons);
break;
case MON_DATA_EVENT_LEGAL:
SET8(substruct3->eventLegal);
diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c
index 5b80fd428..2f76c5d69 100644
--- a/src/pokemon_size_record.c
+++ b/src/pokemon_size_record.c
@@ -36,7 +36,8 @@ static const struct UnknownStruct sBigMonSizeTable[] =
{ 1700, 1, -26 },
};
-static const u8 sGiftRibbonsMonDataIds[] =
+// - 4 for unused gift ribbon bits in MON_DATA_UNUSED_RIBBONS
+static const u8 sGiftRibbonsMonDataIds[GIFT_RIBBONS_COUNT - 4] =
{
MON_DATA_MARINE_RIBBON, MON_DATA_LAND_RIBBON, MON_DATA_SKY_RIBBON,
MON_DATA_COUNTRY_RIBBON, MON_DATA_NATIONAL_RIBBON, MON_DATA_EARTH_RIBBON,
@@ -200,7 +201,7 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
u8 array[8];
memcpy(array, sGiftRibbonsMonDataIds, sizeof(sGiftRibbonsMonDataIds));
- if (index < 11 && ribbonId < 65)
+ if (index < GIFT_RIBBONS_COUNT && ribbonId < 65)
{
gSaveBlock1Ptr->giftRibbons[index] = ribbonId;
for (i = 0; i < PARTY_SIZE; i++)
diff --git a/src/trade.c b/src/trade.c
index afefce93c..29279985e 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -110,7 +110,7 @@ static EWRAM_DATA struct {
/*0x007F*/ u8 unused_7F;
/*0x0080*/ u16 linkData[20];
/*0x00A8*/ u8 timer;
- /*0x00A9*/ u8 giftRibbons[11];
+ /*0x00A9*/ u8 giftRibbons[GIFT_RIBBONS_COUNT];
/*0x00B4*/ u8 filler_B4[0x8D0-0xB4];
/*0x08D0*/ struct {
bool8 queued;