diff --git a/graphics/pokemon/question_mark/circled/anim_front.png b/graphics/pokemon/question_mark/circled/anim_front.png index a998f7849e..adc8ca4a04 100644 Binary files a/graphics/pokemon/question_mark/circled/anim_front.png and b/graphics/pokemon/question_mark/circled/anim_front.png differ diff --git a/graphics/pokemon/question_mark/circled/back.png b/graphics/pokemon/question_mark/circled/back.png index 4769ad6807..1b94433966 100644 Binary files a/graphics/pokemon/question_mark/circled/back.png and b/graphics/pokemon/question_mark/circled/back.png differ diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 72dd6e7bdb..af71780414 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -325,9 +325,8 @@ #define SPECIES_FLAG_ALOLAN_FORM (1 << 5) #define SPECIES_FLAG_GALARIAN_FORM (1 << 6) #define SPECIES_FLAG_HISUIAN_FORM (1 << 7) -#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 8) -#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 9) -#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 10) +#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 8) +#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 9) #define LEGENDARY_PERFECT_IV_COUNT 3 diff --git a/include/data.h b/include/data.h index 6e41ac703a..5bf555e281 100644 --- a/include/data.h +++ b/include/data.h @@ -153,7 +153,7 @@ extern const struct MonCoords gTrainerBackPicCoords[]; extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; // functionally unused extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern const u8 gEnemyMonElevation[NUM_SPECIES]; +extern const u8 gEnemyMonElevation[NUM_SPECIES + 1]; extern const union AnimCmd *const *const gMonFrontAnimsPtrTable[]; extern const struct CompressedSpriteSheet gMonFrontPicTable[]; diff --git a/include/pokemon.h b/include/pokemon.h index 022c155ae1..6ca07fbcf6 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -494,6 +494,7 @@ u8 GetDefaultMoveTarget(u8 battlerId); u8 GetMonGender(struct Pokemon *mon); u8 GetBoxMonGender(struct BoxPokemon *boxMon); u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality); +bool32 IsPersonalityFemale(u16 species, u32 personality); u32 GetUnownSpeciesId(u32 personality); void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition); void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosition); @@ -606,7 +607,7 @@ u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32 arg); bool32 DoesSpeciesHaveFormChangeMethod(u16 species, u16 method); u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove); -bool32 ShouldShowFemaleDifferences(u16 species, u32 personality); +bool32 SpeciesHasGenderDifferences(u16 species); bool32 TryFormChange(u32 monId, u32 side, u16 method); void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method); u32 GetMonFriendshipScore(struct Pokemon *pokemon); diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 6e27689f91..08e905fef6 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -3,7 +3,8 @@ extern const u8 gMonIconPaletteIndices[]; extern const u8 gMonIconPaletteIndicesFemale[]; -extern const u8 *const gMonIconTable[]; +extern const u8 *const gMonIconTable[NUM_SPECIES + 1]; +extern const u8 *const gMonIconTableFemale[NUM_SPECIES + 1]; extern const struct SpritePalette gMonIconPaletteTable[]; const u8 *GetMonIconTiles(u16 species, u32 personality); diff --git a/src/data/pokemon/species_info.h b/src/data/pokemon/species_info.h index f2b9eb9cc4..37028623b9 100644 --- a/src/data/pokemon/species_info.h +++ b/src/data/pokemon/species_info.h @@ -17,6 +17,7 @@ #endif #define PIKACHU_SPECIES_INFO(gender, flip) \ + { \ .baseHP = 35, \ .baseAttack = 55, \ .baseSpeed = 90, \ @@ -34,10 +35,11 @@ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_LIGHTNING_ROD},\ .bodyColor = BODY_COLOR_YELLOW, \ - .noFlip = flip + .noFlip = flip, \ + } -#define COSPLAY_PIKACHU_SPECIES_INFO(flip) { PIKACHU_SPECIES_INFO(MON_FEMALE, flip), } -#define CAP_PIKACHU_SPECIES_INFO(flip) { PIKACHU_SPECIES_INFO(MON_MALE, flip), } +#define COSPLAY_PIKACHU_SPECIES_INFO(flip) PIKACHU_SPECIES_INFO(MON_FEMALE, flip) +#define CAP_PIKACHU_SPECIES_INFO(flip) PIKACHU_SPECIES_INFO(MON_MALE, flip) #define PICHU_SPECIES_INFO(flip) \ { \ @@ -905,7 +907,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CHLOROPHYLL}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_CHARMANDER] = @@ -1112,7 +1113,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE, ABILITY_TINTED_LENS}, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_WEEDLE] = @@ -1277,7 +1277,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS, ABILITY_HUSTLE}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_RATICATE] = @@ -1300,7 +1299,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS, ABILITY_HUSTLE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SPEAROW] = @@ -1397,11 +1395,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .noFlip = FALSE, }, - [SPECIES_PIKACHU] = - { - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, - PIKACHU_SPECIES_INFO(PERCENT_FEMALE(50), FLIP), - }, + [SPECIES_PIKACHU] = PIKACHU_SPECIES_INFO(PERCENT_FEMALE(50), FLIP), [SPECIES_RAICHU] = { @@ -1427,7 +1421,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_LIGHTNING_ROD}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SANDSHREW] = @@ -1799,7 +1792,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE, ABILITY_INFILTRATOR}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_GOLBAT] = @@ -1822,7 +1814,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE, ABILITY_INFILTRATOR}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ODDISH] = @@ -1869,7 +1860,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_STENCH}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_VILEPLUME] = @@ -1897,7 +1887,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_EFFECT_SPORE}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_PARAS] = @@ -2339,7 +2328,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS, ABILITY_MAGIC_GUARD}, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ALAKAZAM] = @@ -2367,7 +2355,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS, ABILITY_MAGIC_GUARD}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MACHOP] = @@ -2812,7 +2799,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD, ABILITY_TANGLED_FEET}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_DODRIO] = @@ -2840,7 +2826,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD, ABILITY_TANGLED_FEET}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SEEL] = @@ -3116,7 +3101,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INSOMNIA, ABILITY_FOREWARN, ABILITY_INNER_FOCUS}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_KRABBY] = @@ -3439,7 +3423,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD, ABILITY_RECKLESS}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_RHYDON] = @@ -3462,7 +3445,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD, ABILITY_RECKLESS}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_CHANSEY] = @@ -3600,7 +3582,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL, ABILITY_LIGHTNING_ROD}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SEAKING] = @@ -3624,7 +3605,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL, ABILITY_LIGHTNING_ROD}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_STARYU] = @@ -3721,7 +3701,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_TECHNICIAN, ABILITY_STEADFAST}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_JYNX] = @@ -3857,7 +3836,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_RATTLED}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_GYARADOS] = @@ -3880,7 +3858,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_MOXIE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_LAPRAS] = @@ -3951,7 +3928,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_ADAPTABILITY, ABILITY_ANTICIPATION}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_VAPOREON] = @@ -4432,7 +4408,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LEAF_GUARD}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_CYNDAQUIL] = @@ -4682,7 +4657,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD, ABILITY_RATTLED}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_LEDIAN] = @@ -4705,7 +4679,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD, ABILITY_IRON_FIST}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SPINARAK] = @@ -4974,7 +4947,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD, ABILITY_MAGIC_BOUNCE}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MAREEP] = @@ -5150,7 +5122,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD, ABILITY_RATTLED}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_POLITOED] = @@ -5174,7 +5145,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP, ABILITY_DRIZZLE}, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_HOPPIP] = @@ -5267,7 +5237,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RUN_AWAY, ABILITY_PICKUP, ABILITY_SKILL_LINK}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SUNKERN] = @@ -5357,7 +5326,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB, ABILITY_UNAWARE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_QUAGSIRE] = @@ -5380,7 +5348,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB, ABILITY_UNAWARE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ESPEON] = @@ -5447,7 +5414,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INSOMNIA, ABILITY_SUPER_LUCK, ABILITY_PRANKSTER}, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SLOWKING] = @@ -5517,7 +5483,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE, ABILITY_TELEPATHY}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_GIRAFARIG] = @@ -5540,7 +5505,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD, ABILITY_SAP_SIPPER}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_PINECO] = @@ -5629,7 +5593,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL, ABILITY_IMMUNITY}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_STEELIX] = @@ -5653,7 +5616,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_SHEER_FORCE}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SNUBBULL] = @@ -5755,7 +5717,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_TECHNICIAN, ABILITY_LIGHT_METAL}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SHUCKLE] = @@ -5803,7 +5764,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_GUTS, ABILITY_MOXIE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SNEASEL] = @@ -5827,7 +5787,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE, ABILITY_PICKPOCKET}, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_TEDDIURSA] = @@ -5872,7 +5831,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_GUTS, ABILITY_QUICK_FEET, ABILITY_UNNERVE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SLUGMA] = @@ -5967,7 +5925,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_OBLIVIOUS, ABILITY_SNOW_CLOAK, ABILITY_THICK_FAT}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_CORSOLA] = @@ -6043,7 +6000,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SUCTION_CUPS, ABILITY_SNIPER, ABILITY_MOODY}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_DELIBIRD] = @@ -6159,7 +6115,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE, ABILITY_UNNERVE}, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_KINGDRA] = @@ -6230,7 +6185,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_SAND_VEIL}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_PORYGON2] = @@ -6767,7 +6721,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_COMBUSKEN] = @@ -6791,7 +6744,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_BLAZIKEN] = @@ -6814,7 +6766,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MUDKIP] = @@ -7046,7 +6997,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_RIVALRY}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_CASCOON] = @@ -7092,7 +7042,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_COMPOUND_EYES}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_LOTAD] = @@ -7162,7 +7111,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH, ABILITY_OWN_TEMPO}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SEEDOT] = @@ -7209,7 +7157,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD, ABILITY_PICKPOCKET}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SHIFTRY] = @@ -7233,7 +7180,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD, ABILITY_PICKPOCKET}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_TAILLOW] = @@ -8012,7 +7958,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_PURE_POWER, ABILITY_NONE, ABILITY_TELEPATHY}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MEDICHAM] = @@ -8035,7 +7980,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_PURE_POWER, ABILITY_NONE, ABILITY_TELEPATHY}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ELECTRIKE] = @@ -10062,7 +10006,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE, ABILITY_RECKLESS}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_STARAVIA] = @@ -10085,7 +10028,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_RECKLESS}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_STARAPTOR] = @@ -10134,7 +10076,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SIMPLE, ABILITY_UNAWARE, ABILITY_MOODY}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_BIBAREL] = @@ -10180,7 +10121,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_RUN_AWAY}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_KRICKETUNE] = @@ -10204,7 +10144,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_TECHNICIAN}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SHINX] = @@ -10227,7 +10166,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RIVALRY, ABILITY_INTIMIDATE, ABILITY_GUTS}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_LUXIO] = @@ -10482,7 +10420,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_HONEY_GATHER, ABILITY_NONE, ABILITY_HUSTLE}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_VESPIQUEN] = @@ -10624,7 +10561,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_TECHNICIAN, ABILITY_PICKUP, ABILITY_SKILL_LINK}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_DRIFLOON] = @@ -11055,7 +10991,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_GABITE] = @@ -11078,7 +11013,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_GARCHOMP] = @@ -11101,7 +11035,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MUNCHLAX] = @@ -11193,7 +11126,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE, ABILITY_SAND_FORCE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_HIPPOWDON] = @@ -11216,7 +11148,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE, ABILITY_SAND_FORCE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SKORUPI] = @@ -11468,7 +11399,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE, ABILITY_PICKPOCKET}, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_MAGNEZONE] = @@ -11537,7 +11467,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_SOLID_ROCK, ABILITY_RECKLESS}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_TANGROWTH] = @@ -11560,7 +11489,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_REGENERATOR}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ELECTIVIRE] = @@ -11745,7 +11673,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_OBLIVIOUS, ABILITY_SNOW_CLOAK, ABILITY_THICK_FAT}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_PORYGON_Z] = @@ -12843,7 +12770,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_BIG_PECKS, ABILITY_SUPER_LUCK, ABILITY_RIVALRY}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_BLITZLE] = @@ -14457,7 +14383,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_WATER_ABSORB, ABILITY_CURSED_BODY, ABILITY_DAMP}, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_JELLICENT] = @@ -14480,7 +14405,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_WATER_ABSORB, ABILITY_CURSED_BODY, ABILITY_DAMP}, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_ALOMOMOLA] = @@ -16140,7 +16064,6 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_RIVALRY, ABILITY_UNNERVE, ABILITY_MOXIE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_FLABEBE] = FLABEBE_SPECIES_INFO, @@ -23319,7 +23242,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE, ABILITY_POISON_TOUCH}, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, - .flags = SPECIES_FLAG_HISUIAN_FORM | SPECIES_FLAG_GENDER_DIFFERENCE, + .flags = SPECIES_FLAG_HISUIAN_FORM, }, #if P_GEN_5_POKEMON == TRUE diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h index 268975d582..c849eaf2f2 100644 --- a/src/data/pokemon_graphics/back_pic_coordinates.h +++ b/src/data/pokemon_graphics/back_pic_coordinates.h @@ -21,7 +21,7 @@ // the sprite's non-transparent pixels actually are. // .size is the dimensions of this drawn pixel area. // .y_offset is the number of pixels between the drawn pixel area and the bottom edge. -const struct MonCoords gMonBackPicCoords[] = +const struct MonCoords gMonBackPicCoords[NUM_SPECIES + 1] = { [SPECIES_NONE] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 12 }, [SPECIES_BULBASAUR] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 13 }, diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h index b73dd70d04..7ade799523 100644 --- a/src/data/pokemon_graphics/back_pic_table.h +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -1,4 +1,4 @@ -const struct CompressedSpriteSheet gMonBackPicTable[] = +const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES + 1] = { SPECIES_SPRITE(NONE, gMonBackPic_CircledQuestionMark), SPECIES_SPRITE(BULBASAUR, gMonBackPic_Bulbasaur), @@ -1338,7 +1338,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(EGG, gMonFrontPic_Egg), }; -const struct CompressedSpriteSheet gMonBackPicTableFemale[] = +const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] = { SPECIES_SPRITE(VENUSAUR, gMonBackPic_VenusaurF), SPECIES_SPRITE(BUTTERFREE, gMonBackPic_ButterfreeF), diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index 64bd433fa4..9471451ea9 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -1,6 +1,6 @@ // This determines how much higher above the usual position the enemy Pokémon // is during battle. Species that float or fly have nonzero values. -const u8 gEnemyMonElevation[NUM_SPECIES] = +const u8 gEnemyMonElevation[NUM_SPECIES + 1] = { [SPECIES_BUTTERFREE] = 10, [SPECIES_BEEDRILL] = 9, diff --git a/src/data/pokemon_graphics/footprint_table.h b/src/data/pokemon_graphics/footprint_table.h index 8e21b0604e..38737ac439 100644 --- a/src/data/pokemon_graphics/footprint_table.h +++ b/src/data/pokemon_graphics/footprint_table.h @@ -1,4 +1,4 @@ -const u8 *const gMonFootprintTable[] = +const u8 *const gMonFootprintTable[NUM_SPECIES + 1] = { [SPECIES_NONE] = gMonFootprint_Bulbasaur, [SPECIES_BULBASAUR] = gMonFootprint_Bulbasaur, diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index f8f0bb119a..d30dc4266e 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -11665,7 +11665,7 @@ SINGLE_ANIMATION(LycanrocDusk); SINGLE_ANIMATION(EnamorusTherian); #endif -const union AnimCmd *const *const gMonFrontAnimsPtrTable[] = +const union AnimCmd *const *const gMonFrontAnimsPtrTable[NUM_SPECIES + 1] = { [SPECIES_NONE] = sAnims_None, [SPECIES_BULBASAUR] = sAnims_Bulbasaur, diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index ea158229c5..eb2786fde0 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -2,7 +2,7 @@ // the sprite's non-transparent pixels actually are. // .size is the dimensions of this drawn pixel area. // .y_offset is the number of pixels between the drawn pixel area and the bottom edge. -const struct MonCoords gMonFrontPicCoords[] = +const struct MonCoords gMonFrontPicCoords[NUM_SPECIES + 1] = { [SPECIES_NONE] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 12 }, [SPECIES_BULBASAUR] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 13 }, diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index adb60c0b6b..8ef0d34c36 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -1,4 +1,4 @@ -const struct CompressedSpriteSheet gMonFrontPicTable[] = +const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES + 1] = { SPECIES_SPRITE(NONE, gMonFrontPic_CircledQuestionMark), SPECIES_SPRITE(BULBASAUR, gMonFrontPic_Bulbasaur), @@ -1337,7 +1337,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(EGG, gMonFrontPic_Egg), }; -const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = +const struct CompressedSpriteSheet gMonFrontPicTableFemale[NUM_SPECIES + 1] = { SPECIES_SPRITE(VENUSAUR, gMonFrontPic_VenusaurF), SPECIES_SPRITE(BUTTERFREE, gMonFrontPic_ButterfreeF), @@ -1394,7 +1394,6 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = SPECIES_SPRITE(SHIFTRY, gMonFrontPic_ShiftryF), SPECIES_SPRITE(MEDITITE, gMonFrontPic_MedititeF), SPECIES_SPRITE(MEDICHAM, gMonFrontPic_MedichamF), - #if P_GEN_4_POKEMON == TRUE SPECIES_SPRITE(STARLY, gMonFrontPic_StarlyF), SPECIES_SPRITE(STARAVIA, gMonFrontPic_StaraviaF), @@ -1403,13 +1402,10 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = SPECIES_SPRITE(KRICKETOT, gMonFrontPic_KricketotF), SPECIES_SPRITE(KRICKETUNE, gMonFrontPic_KricketuneF), SPECIES_SPRITE(SHINX, gMonFrontPic_ShinxF), - SPECIES_SPRITE(COMBEE, gMonFrontPic_Combee), SPECIES_SPRITE(AMBIPOM, gMonFrontPic_AmbipomF), SPECIES_SPRITE(GIBLE, gMonFrontPic_GibleF), SPECIES_SPRITE(GABITE, gMonFrontPic_GabiteF), SPECIES_SPRITE(GARCHOMP, gMonFrontPic_GarchompF), - SPECIES_SPRITE(HIPPOPOTAS, gMonFrontPic_Hippopotas), - SPECIES_SPRITE(HIPPOWDON, gMonFrontPic_Hippowdon), SPECIES_SPRITE(WEAVILE, gMonFrontPic_WeavileF), SPECIES_SPRITE(RHYPERIOR, gMonFrontPic_RhyperiorF), SPECIES_SPRITE(TANGROWTH, gMonFrontPic_TangrowthF), @@ -1423,6 +1419,5 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = #if P_GEN_6_POKEMON == TRUE SPECIES_SPRITE(PYROAR, gMonFrontPic_PyroarF), #endif - SPECIES_SPRITE(SNEASEL_HISUIAN, gMonFrontPic_SneaselHisuianF), }; diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h index fd2a054745..1fa65f3b33 100644 --- a/src/data/pokemon_graphics/palette_table.h +++ b/src/data/pokemon_graphics/palette_table.h @@ -1,4 +1,4 @@ -const struct CompressedSpritePalette gMonPaletteTable[] = +const struct CompressedSpritePalette gMonPaletteTable[NUM_SPECIES + 1] = { SPECIES_PAL(NONE, gMonPalette_CircledQuestionMark), SPECIES_PAL(BULBASAUR, gMonPalette_Bulbasaur), @@ -1336,92 +1336,16 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(EGG, gMonPalette_Egg), }; -const struct CompressedSpritePalette gMonPaletteTableFemale[] = +const struct CompressedSpritePalette gMonPaletteTableFemale[NUM_SPECIES + 1] = { - SPECIES_PAL(VENUSAUR, gMonPalette_Venusaur), - SPECIES_PAL(BUTTERFREE, gMonPalette_Butterfree), - SPECIES_PAL(RATTATA, gMonPalette_Rattata), - SPECIES_PAL(RATICATE, gMonPalette_Raticate), - SPECIES_PAL(PIKACHU, gMonPalette_Pikachu), - SPECIES_PAL(RAICHU, gMonPalette_Raichu), - SPECIES_PAL(ZUBAT, gMonPalette_Zubat), - SPECIES_PAL(GOLBAT, gMonPalette_Golbat), - SPECIES_PAL(GLOOM, gMonPalette_Gloom), - SPECIES_PAL(VILEPLUME, gMonPalette_Vileplume), - SPECIES_PAL(KADABRA, gMonPalette_Kadabra), - SPECIES_PAL(ALAKAZAM, gMonPalette_Alakazam), - SPECIES_PAL(DODUO, gMonPalette_Doduo), - SPECIES_PAL(DODRIO, gMonPalette_Dodrio), - SPECIES_PAL(HYPNO, gMonPalette_Hypno), - SPECIES_PAL(RHYHORN, gMonPalette_Rhyhorn), - SPECIES_PAL(RHYDON, gMonPalette_Rhydon), - SPECIES_PAL(GOLDEEN, gMonPalette_Goldeen), - SPECIES_PAL(SEAKING, gMonPalette_Seaking), - SPECIES_PAL(SCYTHER, gMonPalette_Scyther), - SPECIES_PAL(MAGIKARP, gMonPalette_Magikarp), - SPECIES_PAL(GYARADOS, gMonPalette_Gyarados), - SPECIES_PAL(EEVEE, gMonPalette_Eevee), - SPECIES_PAL(MEGANIUM, gMonPalette_Meganium), - SPECIES_PAL(LEDYBA, gMonPalette_Ledyba), - SPECIES_PAL(LEDIAN, gMonPalette_Ledian), - SPECIES_PAL(XATU, gMonPalette_Xatu), - SPECIES_PAL(SUDOWOODO, gMonPalette_Sudowoodo), - SPECIES_PAL(POLITOED, gMonPalette_Politoed), - SPECIES_PAL(AIPOM, gMonPalette_Aipom), - SPECIES_PAL(WOOPER, gMonPalette_Wooper), - SPECIES_PAL(QUAGSIRE, gMonPalette_Quagsire), - SPECIES_PAL(MURKROW, gMonPalette_Murkrow), - SPECIES_PAL(WOBBUFFET, gMonPalette_Wobbuffet), - SPECIES_PAL(GIRAFARIG, gMonPalette_Girafarig), - SPECIES_PAL(GLIGAR, gMonPalette_Gligar), - SPECIES_PAL(STEELIX, gMonPalette_Steelix), - SPECIES_PAL(SCIZOR, gMonPalette_Scizor), - SPECIES_PAL(HERACROSS, gMonPalette_Heracross), - SPECIES_PAL(SNEASEL, gMonPalette_Sneasel), - SPECIES_PAL(URSARING, gMonPalette_Ursaring), - SPECIES_PAL(PILOSWINE, gMonPalette_Piloswine), - SPECIES_PAL(OCTILLERY, gMonPalette_Octillery), - SPECIES_PAL(HOUNDOOM, gMonPalette_Houndoom), - SPECIES_PAL(DONPHAN, gMonPalette_Donphan), - SPECIES_PAL(TORCHIC, gMonPalette_Torchic), - SPECIES_PAL(COMBUSKEN, gMonPalette_Combusken), - SPECIES_PAL(BLAZIKEN, gMonPalette_Blaziken), - SPECIES_PAL(BEAUTIFLY, gMonPalette_Beautifly), - SPECIES_PAL(DUSTOX, gMonPalette_Dustox), - SPECIES_PAL(LUDICOLO, gMonPalette_Ludicolo), - SPECIES_PAL(NUZLEAF, gMonPalette_Nuzleaf), - SPECIES_PAL(SHIFTRY, gMonPalette_Shiftry), - SPECIES_PAL(MEDITITE, gMonPalette_Meditite), - SPECIES_PAL(MEDICHAM, gMonPalette_Medicham), - #if P_GEN_4_POKEMON == TRUE - SPECIES_PAL(STARLY, gMonPalette_Starly), - SPECIES_PAL(STARAVIA, gMonPalette_Staravia), - SPECIES_PAL(STARAPTOR, gMonPalette_Staraptor), - SPECIES_PAL(BIDOOF, gMonPalette_Bidoof), - SPECIES_PAL(KRICKETOT, gMonPalette_Kricketot), - SPECIES_PAL(KRICKETUNE, gMonPalette_Kricketune), - SPECIES_PAL(SHINX, gMonPalette_Shinx), SPECIES_PAL(COMBEE, gMonPalette_CombeeF), - SPECIES_PAL(AMBIPOM, gMonPalette_Ambipom), - SPECIES_PAL(GIBLE, gMonPalette_Gible), - SPECIES_PAL(GABITE, gMonPalette_Gabite), - SPECIES_PAL(GARCHOMP, gMonPalette_Garchomp), SPECIES_PAL(HIPPOPOTAS, gMonPalette_HippopotasF), SPECIES_PAL(HIPPOWDON, gMonPalette_HippowdonF), - SPECIES_PAL(WEAVILE, gMonPalette_Weavile), - SPECIES_PAL(RHYPERIOR, gMonPalette_Rhyperior), - SPECIES_PAL(TANGROWTH, gMonPalette_Tangrowth), - SPECIES_PAL(MAMOSWINE, gMonPalette_Mamoswine), #endif #if P_GEN_5_POKEMON == TRUE SPECIES_PAL(UNFEZANT, gMonPalette_UnfezantF), SPECIES_PAL(FRILLISH, gMonPalette_FrillishF), SPECIES_PAL(JELLICENT, gMonPalette_JellicentF), #endif -#if P_GEN_6_POKEMON == TRUE - SPECIES_PAL(PYROAR, gMonPalette_Pyroar), -#endif - - SPECIES_PAL(SNEASEL_HISUIAN, gMonPalette_SneaselHisuian), }; diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h index b890f1fb10..b674617b67 100644 --- a/src/data/pokemon_graphics/shiny_palette_table.h +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -1,4 +1,4 @@ -const struct CompressedSpritePalette gMonShinyPaletteTable[] = +const struct CompressedSpritePalette gMonShinyPaletteTable[NUM_SPECIES + 1] = { SPECIES_SHINY_PAL(NONE, gMonShinyPalette_CircledQuestionMark), SPECIES_SHINY_PAL(BULBASAUR, gMonShinyPalette_Bulbasaur), @@ -1335,92 +1335,16 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(EGG, gMonPalette_Egg), }; -const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] = +const struct CompressedSpritePalette gMonShinyPaletteTableFemale[NUM_SPECIES + 1] = { - SPECIES_SHINY_PAL(VENUSAUR, gMonShinyPalette_Venusaur), - SPECIES_SHINY_PAL(BUTTERFREE, gMonShinyPalette_Butterfree), - SPECIES_SHINY_PAL(RATTATA, gMonShinyPalette_Rattata), - SPECIES_SHINY_PAL(RATICATE, gMonShinyPalette_Raticate), - SPECIES_SHINY_PAL(PIKACHU, gMonShinyPalette_Pikachu), - SPECIES_SHINY_PAL(RAICHU, gMonShinyPalette_Raichu), - SPECIES_SHINY_PAL(ZUBAT, gMonShinyPalette_Zubat), - SPECIES_SHINY_PAL(GOLBAT, gMonShinyPalette_Golbat), - SPECIES_SHINY_PAL(GLOOM, gMonShinyPalette_Gloom), - SPECIES_SHINY_PAL(VILEPLUME, gMonShinyPalette_Vileplume), - SPECIES_SHINY_PAL(KADABRA, gMonShinyPalette_Kadabra), - SPECIES_SHINY_PAL(ALAKAZAM, gMonShinyPalette_Alakazam), - SPECIES_SHINY_PAL(DODUO, gMonShinyPalette_Doduo), - SPECIES_SHINY_PAL(DODRIO, gMonShinyPalette_Dodrio), - SPECIES_SHINY_PAL(HYPNO, gMonShinyPalette_Hypno), - SPECIES_SHINY_PAL(RHYHORN, gMonShinyPalette_Rhyhorn), - SPECIES_SHINY_PAL(RHYDON, gMonShinyPalette_Rhydon), - SPECIES_SHINY_PAL(GOLDEEN, gMonShinyPalette_Goldeen), - SPECIES_SHINY_PAL(SEAKING, gMonShinyPalette_Seaking), - SPECIES_SHINY_PAL(SCYTHER, gMonShinyPalette_Scyther), - SPECIES_SHINY_PAL(MAGIKARP, gMonShinyPalette_Magikarp), - SPECIES_SHINY_PAL(GYARADOS, gMonShinyPalette_Gyarados), - SPECIES_SHINY_PAL(EEVEE, gMonShinyPalette_Eevee), - SPECIES_SHINY_PAL(MEGANIUM, gMonShinyPalette_Meganium), - SPECIES_SHINY_PAL(LEDYBA, gMonShinyPalette_Ledyba), - SPECIES_SHINY_PAL(LEDIAN, gMonShinyPalette_Ledian), - SPECIES_SHINY_PAL(XATU, gMonShinyPalette_Xatu), - SPECIES_SHINY_PAL(SUDOWOODO, gMonShinyPalette_Sudowoodo), - SPECIES_SHINY_PAL(POLITOED, gMonShinyPalette_Politoed), - SPECIES_SHINY_PAL(AIPOM, gMonShinyPalette_Aipom), - SPECIES_SHINY_PAL(WOOPER, gMonShinyPalette_Wooper), - SPECIES_SHINY_PAL(QUAGSIRE, gMonShinyPalette_Quagsire), - SPECIES_SHINY_PAL(MURKROW, gMonShinyPalette_Murkrow), - SPECIES_SHINY_PAL(WOBBUFFET, gMonShinyPalette_Wobbuffet), - SPECIES_SHINY_PAL(GIRAFARIG, gMonShinyPalette_Girafarig), - SPECIES_SHINY_PAL(GLIGAR, gMonShinyPalette_Gligar), - SPECIES_SHINY_PAL(STEELIX, gMonShinyPalette_Steelix), - SPECIES_SHINY_PAL(SCIZOR, gMonShinyPalette_Scizor), - SPECIES_SHINY_PAL(HERACROSS, gMonShinyPalette_Heracross), - SPECIES_SHINY_PAL(SNEASEL, gMonShinyPalette_Sneasel), - SPECIES_SHINY_PAL(URSARING, gMonShinyPalette_Ursaring), - SPECIES_SHINY_PAL(PILOSWINE, gMonShinyPalette_Piloswine), - SPECIES_SHINY_PAL(OCTILLERY, gMonShinyPalette_Octillery), - SPECIES_SHINY_PAL(HOUNDOOM, gMonShinyPalette_Houndoom), - SPECIES_SHINY_PAL(DONPHAN, gMonShinyPalette_Donphan), - SPECIES_SHINY_PAL(TORCHIC, gMonShinyPalette_Torchic), - SPECIES_SHINY_PAL(COMBUSKEN, gMonShinyPalette_Combusken), - SPECIES_SHINY_PAL(BLAZIKEN, gMonShinyPalette_Blaziken), - SPECIES_SHINY_PAL(BEAUTIFLY, gMonShinyPalette_Beautifly), - SPECIES_SHINY_PAL(DUSTOX, gMonShinyPalette_Dustox), - SPECIES_SHINY_PAL(LUDICOLO, gMonShinyPalette_Ludicolo), - SPECIES_SHINY_PAL(NUZLEAF, gMonShinyPalette_Nuzleaf), - SPECIES_SHINY_PAL(SHIFTRY, gMonShinyPalette_Shiftry), - SPECIES_SHINY_PAL(MEDITITE, gMonShinyPalette_Meditite), - SPECIES_SHINY_PAL(MEDICHAM, gMonShinyPalette_Medicham), - #if P_GEN_4_POKEMON == TRUE - SPECIES_SHINY_PAL(STARLY, gMonShinyPalette_Starly), - SPECIES_SHINY_PAL(STARAVIA, gMonShinyPalette_Staravia), - SPECIES_SHINY_PAL(STARAPTOR, gMonShinyPalette_Staraptor), - SPECIES_SHINY_PAL(BIDOOF, gMonShinyPalette_Bidoof), - SPECIES_SHINY_PAL(KRICKETOT, gMonShinyPalette_Kricketot), - SPECIES_SHINY_PAL(KRICKETUNE, gMonShinyPalette_Kricketune), - SPECIES_SHINY_PAL(SHINX, gMonShinyPalette_Shinx), SPECIES_SHINY_PAL(COMBEE, gMonShinyPalette_CombeeF), - SPECIES_SHINY_PAL(AMBIPOM, gMonShinyPalette_Ambipom), - SPECIES_SHINY_PAL(GIBLE, gMonShinyPalette_Gible), - SPECIES_SHINY_PAL(GABITE, gMonShinyPalette_Gabite), - SPECIES_SHINY_PAL(GARCHOMP, gMonShinyPalette_Garchomp), SPECIES_SHINY_PAL(HIPPOPOTAS, gMonShinyPalette_HippopotasF), SPECIES_SHINY_PAL(HIPPOWDON, gMonShinyPalette_HippowdonF), - SPECIES_SHINY_PAL(WEAVILE, gMonShinyPalette_Weavile), - SPECIES_SHINY_PAL(RHYPERIOR, gMonShinyPalette_Rhyperior), - SPECIES_SHINY_PAL(TANGROWTH, gMonShinyPalette_Tangrowth), - SPECIES_SHINY_PAL(MAMOSWINE, gMonShinyPalette_Mamoswine), #endif #if P_GEN_5_POKEMON == TRUE SPECIES_SHINY_PAL(UNFEZANT, gMonShinyPalette_UnfezantF), SPECIES_SHINY_PAL(FRILLISH, gMonShinyPalette_FrillishF), SPECIES_SHINY_PAL(JELLICENT, gMonShinyPalette_JellicentF), #endif -#if P_GEN_6_POKEMON == TRUE - SPECIES_SHINY_PAL(PYROAR, gMonShinyPalette_Pyroar), -#endif - - SPECIES_SHINY_PAL(SNEASEL_HISUIAN, gMonShinyPalette_SneaselHisuian), }; diff --git a/src/decompress.c b/src/decompress.c index f5d4ff233d..54e7200be4 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -63,17 +63,19 @@ void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePale void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species) { if (species > NUM_SPECIES) - LZ77UnCompWram(gMonFrontPicTable[0].data, buffer); + LZ77UnCompWram(gMonFrontPicTable[SPECIES_NONE].data, buffer); else LZ77UnCompWram(src->data, buffer); } void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality) { - if (ShouldShowFemaleDifferences(species, personality)) - DecompressPicFromTable(&gMonFrontPicTableFemale[species], buffer, species); + if (gMonFrontPicTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, buffer); + else if (gMonFrontPicTable[species].data != NULL) + LZ77UnCompWram(gMonFrontPicTable[species].data, buffer); else - DecompressPicFromTable(&gMonFrontPicTable[species], buffer, species); + LZ77UnCompWram(gMonFrontPicTable[SPECIES_NONE].data, buffer); } void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality) @@ -83,35 +85,28 @@ void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 pe void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic) { - if (species == SPECIES_UNOWN) - { - u32 id = GetUnownSpeciesId(personality); + if (species > NUM_SPECIES) + species = SPECIES_NONE; + else if (species == SPECIES_UNOWN) + species = GetUnownSpeciesId(personality); - if (!isFrontPic) - LZ77UnCompWram(gMonBackPicTable[id].data, dest); - else - LZ77UnCompWram(gMonFrontPicTable[id].data, dest); - } - else if (species > NUM_SPECIES) // is species unknown? draw the ? icon + if (isFrontPic) { - if (isFrontPic) - LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else - LZ77UnCompWram(gMonBackPicTable[0].data, dest); - } - else if (ShouldShowFemaleDifferences(species, personality)) - { - if (isFrontPic) + if (gMonFrontPicTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + else if (gMonFrontPicTable[species].data != NULL) + LZ77UnCompWram(gMonFrontPicTable[species].data, dest); else - LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + LZ77UnCompWram(gMonFrontPicTable[SPECIES_NONE].data, dest); } else { - if (isFrontPic) - LZ77UnCompWram(gMonFrontPicTable[species].data, dest); - else + if (gMonBackPicTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) + LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + else if (gMonBackPicTable[species].data != NULL) LZ77UnCompWram(gMonBackPicTable[species].data, dest); + else + LZ77UnCompWram(gMonBackPicTable[SPECIES_NONE].data, dest); } DrawSpindaSpots(species, personality, dest, isFrontPic); diff --git a/src/field_effect.c b/src/field_effect.c index b8e3cecc66..acd6e9e94d 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -236,7 +236,7 @@ static void Task_MoveDeoxysRock(u8 taskId); static u8 sActiveList[32]; // External declarations -extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const. +extern const struct CompressedSpritePalette gMonPaletteTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; extern u8 *gFieldEffectScriptPointers[]; diff --git a/src/pokemon.c b/src/pokemon.c index fca93e67e0..3a431aba2e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4478,6 +4478,11 @@ u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) return MON_MALE; } +bool32 IsPersonalityFemale(u16 species, u32 personality) +{ + return GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; +} + u32 GetUnownSpeciesId(u32 personality) { u16 unownLetter = GetUnownLetterByPersonality(personality); @@ -4502,9 +4507,19 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) if (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_PLAYER_RIGHT) gMultiuseSpriteTemplate.anims = gAnims_MonPic; else if (speciesTag > SPECIES_SHINY_TAG) + { + if (gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG] != NULL) gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG]; else + gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[SPECIES_NONE]; + } + else + { + if (gMonFrontAnimsPtrTable[speciesTag] != NULL) gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag]; + else + gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[SPECIES_NONE]; + } } void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerPicId, u8 battlerPosition) @@ -7627,17 +7642,21 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonShinyPaletteTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) return gMonShinyPaletteTableFemale[species].data; - else + else if (gMonShinyPaletteTable[species].data != NULL) return gMonShinyPaletteTable[species].data; + else + return gMonShinyPaletteTable[SPECIES_NONE].data; } else { - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonPaletteTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) return gMonPaletteTableFemale[species].data; - else + else if (gMonPaletteTable[species].data != NULL) return gMonPaletteTable[species].data; + else + return gMonPaletteTable[SPECIES_NONE].data; } } @@ -7656,17 +7675,21 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonShinyPaletteTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) return &gMonShinyPaletteTableFemale[species]; - else + else if (gMonShinyPaletteTable[species].data != NULL) return &gMonShinyPaletteTable[species]; + else + return &gMonShinyPaletteTable[SPECIES_NONE]; } else { - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonPaletteTableFemale[species].data != NULL && IsPersonalityFemale(species, personality)) return &gMonPaletteTableFemale[species]; - else + else if (gMonPaletteTable[species].data != NULL) return &gMonPaletteTable[species]; + else + return &gMonPaletteTable[SPECIES_NONE]; } } @@ -8491,11 +8514,16 @@ void TrySpecialOverworldEvo(void) SetMainCallback2(CB2_ReturnToField); } -bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) +bool32 SpeciesHasGenderDifferences(u16 species) { - if (species >= NUM_SPECIES) - return FALSE; - return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; + if (gMonFrontPicTableFemale[species].data != NULL + || gMonPaletteTableFemale[species].data != NULL + || gMonBackPicTableFemale[species].data != NULL + || gMonShinyPaletteTableFemale[species].data != NULL + || gMonIconTableFemale[species] != NULL) + return TRUE; + + return FALSE; } bool32 TryFormChange(u32 monId, u32 side, u16 method) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index bed5f221f2..2bfcbfac1c 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -415,21 +415,21 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11); if (data->currentSubmenu == 0) { - if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) + if (SpeciesHasGenderDifferences(species)) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL); } else if (data->currentSubmenu == 1) { - if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) + if (SpeciesHasGenderDifferences(species)) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL); } else if (data->currentSubmenu == 2) { - if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) + if (SpeciesHasGenderDifferences(species)) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL); @@ -483,7 +483,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) text[i++] = CHAR_SPACE; text[i++] = CHAR_HYPHEN; - if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) + if (SpeciesHasGenderDifferences(species)) { if (data->isFemale) text[i++] = CHAR_FEMALE; @@ -686,17 +686,21 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe { if (isShiny) { - if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale) + if (gMonShinyPaletteTableFemale[species].data != NULL && isFemale) return &gMonShinyPaletteTableFemale[species]; - else + else if (gMonShinyPaletteTable[species].data != NULL) return &gMonShinyPaletteTable[species]; + else + return &gMonShinyPaletteTable[SPECIES_NONE]; } else { - if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale) + if (gMonPaletteTableFemale[species].data != NULL && isFemale) return &gMonPaletteTableFemale[species]; - else + else if (gMonPaletteTable[species].data != NULL) return &gMonPaletteTable[species]; + else + return &gMonPaletteTable[SPECIES_NONE]; } } @@ -712,17 +716,21 @@ static void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bo if (isShiny) { - if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale) + if (gMonShinyPaletteTableFemale[species].data != NULL && isFemale) lzPaletteData = gMonShinyPaletteTableFemale[species].data; - else + else if (gMonShinyPaletteTable[species].data != NULL) lzPaletteData = gMonShinyPaletteTable[species].data; + else + lzPaletteData = gMonShinyPaletteTable[SPECIES_NONE].data; } else { - if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale) + if (gMonPaletteTableFemale[species].data != NULL && isFemale) lzPaletteData = gMonPaletteTableFemale[species].data; - else + else if (gMonPaletteTable[species].data != NULL) lzPaletteData = gMonPaletteTable[species].data; + else + lzPaletteData = gMonPaletteTable[SPECIES_NONE].data; } LZDecompressWram(lzPaletteData, gDecompressionBuffer); @@ -1450,7 +1458,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) ReloadPokemonSprites(data); ApplyOffsetSpriteValues(data); } - if (JOY_NEW(SELECT_BUTTON) && (gSpeciesInfo[data->currentmonId].flags & SPECIES_FLAG_GENDER_DIFFERENCE)) + if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifferences(data->currentmonId)) { data->isFemale = !data->isFemale; PrintDigitChars(data); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index c1a4694858..7c1bf27c87 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -24,9 +24,9 @@ struct MonIconSpriteTemplate static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); static void FreeAndDestroyMonIconSprite_(struct Sprite *sprite); -const u8 *const gMonIconTable[] = +const u8 *const gMonIconTable[NUM_SPECIES + 1] = { - [SPECIES_NONE] = gMonIcon_Bulbasaur, + [SPECIES_NONE] = gMonIcon_QuestionMark, [SPECIES_BULBASAUR] = gMonIcon_Bulbasaur, [SPECIES_IVYSAUR] = gMonIcon_Ivysaur, [SPECIES_VENUSAUR] = gMonIcon_Venusaur, @@ -1298,87 +1298,12 @@ const u8 *const gMonIconTable[] = [SPECIES_EGG] = gMonIcon_Egg, }; -const u8 *const gMonIconTableFemale[] = +// Female icon palette indexes still need to be defined in gMonIconPaletteIndicesFemale, even if they are the same as males. +const u8 *const gMonIconTableFemale[NUM_SPECIES + 1] = { - [SPECIES_VENUSAUR] = gMonIcon_Venusaur, - [SPECIES_BUTTERFREE] = gMonIcon_Butterfree, - [SPECIES_RATTATA] = gMonIcon_Rattata, - [SPECIES_RATICATE] = gMonIcon_Raticate, - [SPECIES_PIKACHU] = gMonIcon_Pikachu, - [SPECIES_RAICHU] = gMonIcon_Raichu, - [SPECIES_ZUBAT] = gMonIcon_Zubat, - [SPECIES_GOLBAT] = gMonIcon_Golbat, - [SPECIES_GLOOM] = gMonIcon_Gloom, - [SPECIES_VILEPLUME] = gMonIcon_Vileplume, - [SPECIES_KADABRA] = gMonIcon_Kadabra, - [SPECIES_ALAKAZAM] = gMonIcon_Alakazam, - [SPECIES_DODUO] = gMonIcon_Doduo, - [SPECIES_DODRIO] = gMonIcon_Dodrio, - [SPECIES_HYPNO] = gMonIcon_Hypno, - [SPECIES_RHYHORN] = gMonIcon_Rhyhorn, - [SPECIES_RHYDON] = gMonIcon_Rhydon, - [SPECIES_GOLDEEN] = gMonIcon_Goldeen, - [SPECIES_SEAKING] = gMonIcon_Seaking, - [SPECIES_SCYTHER] = gMonIcon_Scyther, - [SPECIES_MAGIKARP] = gMonIcon_Magikarp, - [SPECIES_GYARADOS] = gMonIcon_Gyarados, - [SPECIES_EEVEE] = gMonIcon_Eevee, - [SPECIES_MEGANIUM] = gMonIcon_Meganium, - [SPECIES_LEDYBA] = gMonIcon_Ledyba, - [SPECIES_LEDIAN] = gMonIcon_Ledian, - [SPECIES_XATU] = gMonIcon_Xatu, - [SPECIES_SUDOWOODO] = gMonIcon_Sudowoodo, - [SPECIES_POLITOED] = gMonIcon_Politoed, - [SPECIES_AIPOM] = gMonIcon_Aipom, - [SPECIES_WOOPER] = gMonIcon_Wooper, - [SPECIES_QUAGSIRE] = gMonIcon_Quagsire, - [SPECIES_MURKROW] = gMonIcon_Murkrow, - [SPECIES_WOBBUFFET] = gMonIcon_Wobbuffet, - [SPECIES_GIRAFARIG] = gMonIcon_Girafarig, - [SPECIES_GLIGAR] = gMonIcon_Gligar, - [SPECIES_STEELIX] = gMonIcon_Steelix, - [SPECIES_SCIZOR] = gMonIcon_Scizor, - [SPECIES_HERACROSS] = gMonIcon_Heracross, - [SPECIES_SNEASEL] = gMonIcon_Sneasel, - [SPECIES_URSARING] = gMonIcon_Ursaring, - [SPECIES_PILOSWINE] = gMonIcon_Piloswine, - [SPECIES_OCTILLERY] = gMonIcon_Octillery, - [SPECIES_HOUNDOOM] = gMonIcon_Houndoom, - [SPECIES_DONPHAN] = gMonIcon_Donphan, - [SPECIES_TORCHIC] = gMonIcon_Torchic, - [SPECIES_COMBUSKEN] = gMonIcon_Combusken, - [SPECIES_BLAZIKEN] = gMonIcon_Blaziken, - [SPECIES_BEAUTIFLY] = gMonIcon_Beautifly, - [SPECIES_DUSTOX] = gMonIcon_Dustox, - [SPECIES_LUDICOLO] = gMonIcon_Ludicolo, - [SPECIES_NUZLEAF] = gMonIcon_Nuzleaf, - [SPECIES_SHIFTRY] = gMonIcon_Shiftry, - [SPECIES_MEDITITE] = gMonIcon_Meditite, - [SPECIES_MEDICHAM] = gMonIcon_Medicham, -#if P_GEN_4_POKEMON == TRUE - [SPECIES_STARLY] = gMonIcon_Starly, - [SPECIES_STARAVIA] = gMonIcon_Staravia, - [SPECIES_STARAPTOR] = gMonIcon_Staraptor, - [SPECIES_BIDOOF] = gMonIcon_Bidoof, - [SPECIES_KRICKETOT] = gMonIcon_Kricketot, - [SPECIES_KRICKETUNE] = gMonIcon_Kricketune, - [SPECIES_SHINX] = gMonIcon_Shinx, - [SPECIES_COMBEE] = gMonIcon_Combee, - [SPECIES_AMBIPOM] = gMonIcon_Ambipom, - [SPECIES_GIBLE] = gMonIcon_Gible, - [SPECIES_GABITE] = gMonIcon_Gabite, - [SPECIES_GARCHOMP] = gMonIcon_Garchomp, -#if P_HIPPO_GENDER_DIFF_ICONS == TRUE +#if P_GEN_4_POKEMON == TRUE && P_HIPPO_GENDER_DIFF_ICONS == TRUE [SPECIES_HIPPOPOTAS] = gMonIcon_HippopotasF, [SPECIES_HIPPOWDON] = gMonIcon_HippowdonF, -#else - [SPECIES_HIPPOPOTAS] = gMonIcon_Hippopotas, - [SPECIES_HIPPOWDON] = gMonIcon_Hippowdon, -#endif - [SPECIES_WEAVILE] = gMonIcon_Weavile, - [SPECIES_RHYPERIOR] = gMonIcon_Rhyperior, - [SPECIES_TANGROWTH] = gMonIcon_Tangrowth, - [SPECIES_MAMOSWINE] = gMonIcon_Mamoswine, #endif #if P_GEN_5_POKEMON == TRUE [SPECIES_UNFEZANT] = gMonIcon_UnfezantF, @@ -1388,7 +1313,6 @@ const u8 *const gMonIconTableFemale[] = #if P_GEN_6_POKEMON == TRUE [SPECIES_PYROAR] = gMonIcon_PyroarF, #endif - [SPECIES_SNEASEL_HISUIAN] = gMonIcon_SneaselHisuian, }; const u8 gMonIconPaletteIndices[] = @@ -2610,79 +2534,9 @@ const u8 gMonIconPaletteIndices[] = const u8 gMonIconPaletteIndicesFemale[] = { - [SPECIES_VENUSAUR] = 4, - [SPECIES_BUTTERFREE] = 0, - [SPECIES_RATTATA] = 2, - [SPECIES_RATICATE] = 2, - [SPECIES_PIKACHU] = 2, - [SPECIES_RAICHU] = 0, - [SPECIES_ZUBAT] = 2, - [SPECIES_GOLBAT] = 2, - [SPECIES_GLOOM] = 0, - [SPECIES_VILEPLUME] = 0, - [SPECIES_KADABRA] = 2, - [SPECIES_ALAKAZAM] = 2, - [SPECIES_DODUO] = 2, - [SPECIES_DODRIO] = 2, - [SPECIES_HYPNO] = 2, - [SPECIES_RHYHORN] = 1, - [SPECIES_RHYDON] = 1, - [SPECIES_GOLDEEN] = 0, - [SPECIES_SEAKING] = 0, - [SPECIES_SCYTHER] = 1, - [SPECIES_MAGIKARP] = 0, - [SPECIES_GYARADOS] = 0, - [SPECIES_EEVEE] = 2, - [SPECIES_MEGANIUM] = 1, - [SPECIES_LEDYBA] = 0, - [SPECIES_LEDIAN] = 0, - [SPECIES_XATU] = 1, - [SPECIES_SUDOWOODO] = 1, - [SPECIES_POLITOED] = 1, - [SPECIES_AIPOM] = 2, - [SPECIES_WOOPER] = 0, - [SPECIES_QUAGSIRE] = 0, - [SPECIES_MURKROW] = 2, - [SPECIES_WOBBUFFET] = 0, - [SPECIES_GIRAFARIG] = 1, - [SPECIES_GLIGAR] = 0, - [SPECIES_STEELIX] = 0, - [SPECIES_SCIZOR] = 0, - [SPECIES_HERACROSS] = 0, - [SPECIES_SNEASEL] = 0, - [SPECIES_URSARING] = 2, - [SPECIES_PILOSWINE] = 2, - [SPECIES_OCTILLERY] = 0, - [SPECIES_HOUNDOOM] = 0, - [SPECIES_DONPHAN] = 0, - [SPECIES_TORCHIC] = 0, - [SPECIES_COMBUSKEN] = 0, - [SPECIES_BLAZIKEN] = 0, - [SPECIES_BEAUTIFLY] = 0, - [SPECIES_DUSTOX] = 5, - [SPECIES_LUDICOLO] = 1, - [SPECIES_NUZLEAF] = 1, - [SPECIES_SHIFTRY] = 5, - [SPECIES_MEDITITE] = 0, - [SPECIES_MEDICHAM] = 0, #if P_GEN_4_POKEMON == TRUE - [SPECIES_STARLY] = 0, - [SPECIES_STARAVIA] = 0, - [SPECIES_BIDOOF] = 2, - [SPECIES_KRICKETOT] = 2, - [SPECIES_KRICKETUNE] = 2, - [SPECIES_SHINX] = 0, - [SPECIES_COMBEE] = 0, - [SPECIES_AMBIPOM] = 2, - [SPECIES_GIBLE] = 0, - [SPECIES_GABITE] = 0, - [SPECIES_GARCHOMP] = 0, [SPECIES_HIPPOPOTAS] = 1, [SPECIES_HIPPOWDON] = 1, - [SPECIES_WEAVILE] = 0, - [SPECIES_RHYPERIOR] = 0, - [SPECIES_TANGROWTH] = 0, - [SPECIES_MAMOSWINE] = 2, #endif #if P_GEN_5_POKEMON == TRUE [SPECIES_UNFEZANT] = 1, @@ -2692,10 +2546,6 @@ const u8 gMonIconPaletteIndicesFemale[] = #if P_GEN_6_POKEMON == TRUE [SPECIES_PYROAR] = 2, #endif -#if P_GEN_8_POKEMON == TRUE - [SPECIES_BASCULEGION] = 0, -#endif - [SPECIES_SNEASEL_HISUIAN] = 2, }; const struct SpritePalette gMonIconPaletteTable[] = @@ -2826,7 +2676,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u if (species > NUM_SPECIES) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if (ShouldShowFemaleDifferences(species, personality)) + else if (gMonIconTableFemale[species] && IsPersonalityFemale(species, personality)) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2941,7 +2791,7 @@ void LoadMonIconPalette(u16 species) void LoadMonIconPalettePersonality(u16 species, u32 personality) { u8 palIndex; - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonIconTableFemale[species] != NULL && IsPersonalityFemale(species, personality)) palIndex = gMonIconPaletteIndicesFemale[species]; else palIndex = gMonIconPaletteIndices[species]; @@ -2982,10 +2832,15 @@ const u8 *GetMonIconTiles(u16 species, u32 personality) { const u8 *iconSprite; - if (ShouldShowFemaleDifferences(species, personality)) + if (species > NUM_SPECIES) + species = SPECIES_NONE; + + if (gMonIconTableFemale[species] != NULL && IsPersonalityFemale(species, personality)) iconSprite = gMonIconTableFemale[species]; - else + else if (gMonIconTable[species] != NULL) iconSprite = gMonIconTable[species]; + else + iconSprite = gMonIconTable[SPECIES_NONE]; return iconSprite; } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 50f315abde..0d621d2051 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5110,7 +5110,7 @@ static u16 TryLoadMonIconTiles(u16 species, u32 personality) u16 i, offset; // Treat female mons as a seperate species as they may have a different icon than males - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonIconTableFemale[species] != NULL && IsPersonalityFemale(species, personality)) species |= 0x8000; // 1 << 15 // Search icon list for this species @@ -5177,7 +5177,7 @@ static struct Sprite *CreateMonIconSprite(u16 species, u32 personality, s16 x, s struct SpriteTemplate template = sSpriteTemplate_MonIcon; species = GetIconSpecies(species, personality); - if (ShouldShowFemaleDifferences(species, personality)) + if (gMonIconTableFemale[species] != NULL && IsPersonalityFemale(species, personality)) { template.paletteTag = PALTAG_MON_ICON_0 + gMonIconPaletteIndicesFemale[species]; }