summaryrefslogtreecommitdiff
path: root/src/tv.c
diff options
context:
space:
mode:
authorDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-02-15 11:40:16 -0500
committerDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-02-15 11:40:16 -0500
commitb89c3e901e1de2f3513d74fa548373d82d3f26d0 (patch)
tree8e6fa5b51b3f71c1cf7928af02d22bc745b5fb77 /src/tv.c
parent5f58ea02c66a7e1a7d0164ba497bfa2d7527328b (diff)
Fix giftRibbons Field in SaveBlock1 & Relabel Gift Ribbons in pokemon.h
The giftRibbons field has been split out into proper subfields. The new ExternalEvent structs deal with interconnectivity between external games/peripherals and Emerald, such as PokéCoupon storage and the flag for receiving Wishmaker Jirachi. The giftRibbon fields in `PokemonSubstruct3` have also been renamed to their appropriate ribbons, and commented with distribution info if applicable. The previous `fatefulEncounter` field was actually filler, and relabeled as such, while the obedient bit was renamed `fatefulEncounter`. All relevant constants and functions dealing with the Pokémon data structure were renamed with these changes in mind.
Diffstat (limited to 'src/tv.c')
-rw-r--r--src/tv.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tv.c b/src/tv.c
index effd3e4b2..2369c1186 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -2398,13 +2398,13 @@ u8 GetRibbonCount(struct Pokemon *pokemon)
nRibbons += GetMonData(pokemon, MON_DATA_VICTORY_RIBBON);
nRibbons += GetMonData(pokemon, MON_DATA_ARTIST_RIBBON);
nRibbons += GetMonData(pokemon, MON_DATA_EFFORT_RIBBON);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_1);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_2);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_3);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_4);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_5);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_6);
- nRibbons += GetMonData(pokemon, MON_DATA_GIFT_RIBBON_7);
+ nRibbons += GetMonData(pokemon, MON_DATA_MARINE_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_LAND_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_SKY_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_COUNTRY_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_NATIONAL_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_EARTH_RIBBON);
+ nRibbons += GetMonData(pokemon, MON_DATA_WORLD_RIBBON);
return nRibbons;
}
@@ -2420,13 +2420,13 @@ u8 TV_MonDataIdxToRibbon(u8 monDataIdx)
if (monDataIdx == MON_DATA_VICTORY_RIBBON) return 22;
if (monDataIdx == MON_DATA_ARTIST_RIBBON) return 23;
if (monDataIdx == MON_DATA_EFFORT_RIBBON) return 24;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_1) return 25;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_2) return 26;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_3) return 27;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_4) return 28;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_5) return 29;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_6) return 30;
- if (monDataIdx == MON_DATA_GIFT_RIBBON_7) return 31;
+ if (monDataIdx == MON_DATA_MARINE_RIBBON) return 25;
+ if (monDataIdx == MON_DATA_LAND_RIBBON) return 26;
+ if (monDataIdx == MON_DATA_SKY_RIBBON) return 27;
+ if (monDataIdx == MON_DATA_COUNTRY_RIBBON) return 28;
+ if (monDataIdx == MON_DATA_NATIONAL_RIBBON) return 29;
+ if (monDataIdx == MON_DATA_EARTH_RIBBON) return 30;
+ if (monDataIdx == MON_DATA_WORLD_RIBBON) return 31;
return 0;
}