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.
This commit is contained in:
28
src/tv.c
28
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user