From b494b6e9871553a42830de64c9d48fe1a8477e4c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 14:28:10 -0300 Subject: [PATCH 1/8] Fixing Litleo's and Pyroar's gender ratio. --- src/data/pokemon/base_stats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h index debc22d498..f41528ac91 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/base_stats.h @@ -19121,7 +19121,7 @@ const struct BaseStats gBaseStats[] = .catchRate = 220, .expYield = 74, .evYield_SpAttack = 1, - .genderRatio = MON_MALE, + .genderRatio = PERCENT_FEMALE(87.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, @@ -19150,7 +19150,7 @@ const struct BaseStats gBaseStats[] = .catchRate = 65, .expYield = 177, .evYield_SpAttack = 2, - .genderRatio = MON_MALE, + .genderRatio = PERCENT_FEMALE(87.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, From 4d4b111327f2d5d404bb0a44bd0f071a45855233 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 16:21:45 -0300 Subject: [PATCH 2/8] Front pic gender differences for Eevee --- graphics/pokemon/eevee/anim_frontf.png | Bin 0 -> 945 bytes include/data.h | 2 ++ include/graphics.h | 1 + src/data.c | 5 +++++ src/data/graphics/pokemon.h | 1 + src/data/pokemon_graphics/front_pic_table.h | 5 +++++ src/decompress.c | 2 ++ 7 files changed, 16 insertions(+) create mode 100644 graphics/pokemon/eevee/anim_frontf.png diff --git a/graphics/pokemon/eevee/anim_frontf.png b/graphics/pokemon/eevee/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..e923202b400a88f86bd877a15894bcdf928209b5 GIT binary patch literal 945 zcmV;i15W&jP)$I>7c!j%rL~rr;b;XDeuWA_X@GD`ED9+z1wb->{7C|GA+uE)RSAE5Hg@f9kwS|+ zjh;9FxA*Rzp-kjN@>84h@jd4*aGy&d(+0qBfaCfuhrF=ni3T1vrW8WJJtz_crhTBS zAGX`Nw51UO2;r<5m@R|>pb!`i5OzS-08R(SE+JnVWAhmD5dpBPZ4C|1IRHuGbb$B_ zPq|pb0)>bak%uYlI>|=>OvyZBOY@{T0E()Qq1Bz{aGQMjkn`n2YT_|<1^DPl%5!po z7SK>2Rh|JE{%SAs)br}tjp1G35Qq3ri`fYVE<{O6Cm47fkQUPk2DnFKF%HlP zhCN}yqaifsOD7l=Yb>S@9DnZwqY`K_rRnu}u$^F71b&Qf`@qI*;8ZtwJ_|m+<^AKc z5e(D=XdxO&=>e@^)TKeeNC=4ue+Q6o3<3pX3j$HajiR^?5^f+5GvqJ8tPilOO>GSr z2ndFVC`V}x1O)>WW$G4a3`FPP4~3YLM|8L}75YP@JSVv3YK{Kj^@D>y{PXb(dr|ED Tvv~?@00000NkvXXu0mjf6?}*z literal 0 HcmV?d00001 diff --git a/include/data.h b/include/data.h index 3d2169200c..544bbfd1de 100644 --- a/include/data.h +++ b/include/data.h @@ -108,6 +108,8 @@ extern const u8 gEnemyMonElevation[NUM_SPECIES]; extern const union AnimCmd *const *const gMonFrontAnimsPtrTable[]; extern const struct CompressedSpriteSheet gMonFrontPicTable[]; +extern const struct CompressedSpriteSheet gMonFrontPicTableFemale[]; +extern const bool8 SpeciesHasGenderDifference[NUM_SPECIES]; extern const struct Trainer gTrainers[]; extern const u8 gTrainerClassNames[][13]; diff --git a/include/graphics.h b/include/graphics.h index ce4a502634..856c06ef1e 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -169,6 +169,7 @@ extern const u32 gMonFrontPic_Gyarados[]; extern const u32 gMonFrontPic_Lapras[]; extern const u32 gMonFrontPic_Ditto[]; extern const u32 gMonFrontPic_Eevee[]; +extern const u32 gMonFrontPic_EeveeF[]; extern const u32 gMonFrontPic_Vaporeon[]; extern const u32 gMonFrontPic_Jolteon[]; extern const u32 gMonFrontPic_Flareon[]; diff --git a/src/data.c b/src/data.c index 3d36bd0b89..89866cc13a 100644 --- a/src/data.c +++ b/src/data.c @@ -300,6 +300,11 @@ const union AnimCmd *const gUnknown_082FF70C[] = #define TRAINER_BACK_PAL(trainerPic, pal) [TRAINER_BACK_PIC_##trainerPic] = {pal, TRAINER_BACK_PIC_##trainerPic} +const bool8 SpeciesHasGenderDifference[NUM_SPECIES] = +{ + [SPECIES_EEVEE] = TRUE, +}; + #include "data/pokemon_graphics/front_pic_coordinates.h" #include "data/pokemon_graphics/back_pic_coordinates.h" diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index be20ff6ab8..ce501b3db1 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -132,6 +132,7 @@ const u32 gMonFrontPic_Gyarados[] = INCBIN_U32("graphics/pokemon/gyarados/anim_f const u32 gMonFrontPic_Lapras[] = INCBIN_U32("graphics/pokemon/lapras/anim_front.4bpp.lz"); const u32 gMonFrontPic_Ditto[] = INCBIN_U32("graphics/pokemon/ditto/anim_front.4bpp.lz"); const u32 gMonFrontPic_Eevee[] = INCBIN_U32("graphics/pokemon/eevee/anim_front.4bpp.lz"); +const u32 gMonFrontPic_EeveeF[] = INCBIN_U32("graphics/pokemon/eevee/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Vaporeon[] = INCBIN_U32("graphics/pokemon/vaporeon/anim_front.4bpp.lz"); const u32 gMonFrontPic_Jolteon[] = INCBIN_U32("graphics/pokemon/jolteon/anim_front.4bpp.lz"); const u32 gMonFrontPic_Flareon[] = INCBIN_U32("graphics/pokemon/flareon/anim_front.4bpp.lz"); diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index a3466ebe94..580db22964 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -943,3 +943,8 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(UNOWN_EMARK, gMonFrontPic_UnownExclamationMark), SPECIES_SPRITE(UNOWN_QMARK, gMonFrontPic_UnownQuestionMark), }; + +const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = +{ + SPECIES_SPRITE(EEVEE, gMonFrontPic_EeveeF), +}; \ No newline at end of file diff --git a/src/decompress.c b/src/decompress.c index a4cd2f66b7..c40d32d4fa 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -363,6 +363,8 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); else LZ77UnCompWram(src->data, dest); From 3849f7dd5d224fd368b0633d9566dc76a82a734a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 16:45:25 -0300 Subject: [PATCH 3/8] Female Eevee backsprite. --- graphics/pokemon/eevee/backf.png | Bin 0 -> 696 bytes include/data.h | 1 + include/graphics.h | 1 + src/data/graphics/pokemon.h | 1 + src/data/pokemon_graphics/back_pic_table.h | 5 +++++ src/decompress.c | 21 ++++++++++++++++++++- 6 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 graphics/pokemon/eevee/backf.png diff --git a/graphics/pokemon/eevee/backf.png b/graphics/pokemon/eevee/backf.png new file mode 100644 index 0000000000000000000000000000000000000000..7689d995b607d6faed2de20b80c8932cb78726dd GIT binary patch literal 696 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e_7YEDSN12|Y{F9dVruRnHR2_% z5hcO-X(i=}MX3z#J}y9G6v|SI6pZyu3R{;v1S;VuDe!X#$`}LL3|ypG*G1yRUtWDevqbP5W$poq<7Xefs7ImD$?K z4_pHnB)ZRL$4%%p`(P!Y)KFCBI_b~XwL070EMo3tDCxI(p1=L67yHy8!Scd$Q_HMF z{XG}B-ECoyeeUD_Ly~FYIoF+vVLWQw2Uq?J*p{?FCn`fCb=RpwlD&QVqZb%xMjOsZ zmiWu%omP27l0!KxVvc$&^Qv9yb`R{2alAgf`+yv~5K~@%?pp?@7$(8KTEl)#0p7xr zhH4rAWvNpZ25}w?d@JamW|_3IaiQqi?@LTS7`5&^=xKXSxA&3MM(dZ>Upd8X?RQB| zRS5L`_s5z!`8|{DqNp2Ma=I66;~D1E%3pkS`yk_kUCevaH*GtxwKsE`gZ|_gm3Yny{C~^v^v{|b{fnn)d<&B1ZT7XCuekI=N^^tGWjAIyCx?}dFPCg`WWM(3 zACHc8Wr*awH}`JE`c0P?%6@LK*oY;n^OEg*GnQFf`ePPwHmvcSt9V!7<)^7^`u+N~ bG5;C28csbe#JXW2DE2*F{an^LB{Ts5Vk#W^ literal 0 HcmV?d00001 diff --git a/include/data.h b/include/data.h index 544bbfd1de..f10770a1fe 100644 --- a/include/data.h +++ b/include/data.h @@ -93,6 +93,7 @@ extern const union AnimCmd *const gUnknown_082FF70C[]; extern const struct MonCoords gMonFrontPicCoords[]; extern const struct MonCoords gMonBackPicCoords[]; extern const struct CompressedSpriteSheet gMonBackPicTable[]; +extern const struct CompressedSpriteSheet gMonBackPicTableFemale[]; extern const struct CompressedSpritePalette gMonPaletteTable[]; extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[]; diff --git a/include/graphics.h b/include/graphics.h index 856c06ef1e..4eeb5fbcfb 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -1020,6 +1020,7 @@ extern const u32 gMonBackPic_Gyarados[]; extern const u32 gMonBackPic_Lapras[]; extern const u32 gMonBackPic_Ditto[]; extern const u32 gMonBackPic_Eevee[]; +extern const u32 gMonBackPic_EeveeF[]; extern const u32 gMonBackPic_Vaporeon[]; extern const u32 gMonBackPic_Jolteon[]; extern const u32 gMonBackPic_Flareon[]; diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index ce501b3db1..e5325be40d 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -983,6 +983,7 @@ const u32 gMonBackPic_Gyarados[] = INCBIN_U32("graphics/pokemon/gyarados/back.4b const u32 gMonBackPic_Lapras[] = INCBIN_U32("graphics/pokemon/lapras/back.4bpp.lz"); const u32 gMonBackPic_Ditto[] = INCBIN_U32("graphics/pokemon/ditto/back.4bpp.lz"); const u32 gMonBackPic_Eevee[] = INCBIN_U32("graphics/pokemon/eevee/back.4bpp.lz"); +const u32 gMonBackPic_EeveeF[] = INCBIN_U32("graphics/pokemon/eevee/backf.4bpp.lz"); const u32 gMonBackPic_Vaporeon[] = INCBIN_U32("graphics/pokemon/vaporeon/back.4bpp.lz"); const u32 gMonBackPic_Jolteon[] = INCBIN_U32("graphics/pokemon/jolteon/back.4bpp.lz"); const u32 gMonBackPic_Flareon[] = INCBIN_U32("graphics/pokemon/flareon/back.4bpp.lz"); diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h index 14c8a29f85..0589e7f45f 100644 --- a/src/data/pokemon_graphics/back_pic_table.h +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -943,3 +943,8 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(UNOWN_EMARK, gMonBackPic_UnownExclamationMark), SPECIES_SPRITE(UNOWN_QMARK, gMonBackPic_UnownQuestionMark), }; + +const struct CompressedSpriteSheet gMonBackPicTableFemale[] = +{ + SPECIES_SPRITE(EEVEE, gMonBackPic_EeveeF), +}; diff --git a/src/decompress.c b/src/decompress.c index c40d32d4fa..a7b783b78e 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -95,6 +95,13 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + else + LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + } else LZ77UnCompWram(src->data, dest); @@ -311,6 +318,13 @@ void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + else + LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + } else LZ77UnCompWram(src->data, dest); @@ -364,7 +378,12 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) - LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + else + LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + } else LZ77UnCompWram(src->data, dest); From d7fbaa6cbfde8c6aeac0360776c707163f1472fa Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 17:12:57 -0300 Subject: [PATCH 4/8] Support for gender palettes. --- include/data.h | 2 ++ src/data/pokemon_graphics/palette_table.h | 5 ++++ .../pokemon_graphics/shiny_palette_table.h | 5 ++++ src/pokemon.c | 28 ++++++++++++++++--- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/include/data.h b/include/data.h index f10770a1fe..ba56d9679d 100644 --- a/include/data.h +++ b/include/data.h @@ -95,7 +95,9 @@ extern const struct MonCoords gMonBackPicCoords[]; extern const struct CompressedSpriteSheet gMonBackPicTable[]; extern const struct CompressedSpriteSheet gMonBackPicTableFemale[]; extern const struct CompressedSpritePalette gMonPaletteTable[]; +extern const struct CompressedSpritePalette gMonPaletteTableFemale[]; extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; +extern const struct CompressedSpritePalette gMonShinyPaletteTableFemale[]; extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[]; extern const struct MonCoords gTrainerFrontPicCoords[]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h index bb490ea38f..2b81ed6f51 100644 --- a/src/data/pokemon_graphics/palette_table.h +++ b/src/data/pokemon_graphics/palette_table.h @@ -943,3 +943,8 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(UNOWN_EMARK, gMonPalette_Unown), SPECIES_PAL(UNOWN_QMARK, gMonPalette_Unown), }; + +const struct CompressedSpritePalette gMonPaletteTableFemale[] = +{ + SPECIES_PAL(EEVEE, gMonPalette_Eevee), +}; diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h index 2713581e9b..334de18c00 100644 --- a/src/data/pokemon_graphics/shiny_palette_table.h +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -943,3 +943,8 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(UNOWN_EMARK, gMonShinyPalette_Unown), SPECIES_SHINY_PAL(UNOWN_QMARK, gMonShinyPalette_Unown), }; + +const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] = +{ + SPECIES_SHINY_PAL(EEVEE, gMonShinyPalette_Eevee), +}; diff --git a/src/pokemon.c b/src/pokemon.c index 2898c8fedd..292ba61dd1 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6745,9 +6745,19 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); if (shinyValue < SHINY_ODDS) - return gMonShinyPaletteTable[species].data; + { + if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + return gMonShinyPaletteTableFemale[species].data; + else + return gMonShinyPaletteTable[species].data; + } else - return gMonPaletteTable[species].data; + { + if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + return gMonPaletteTableFemale[species].data; + else + return gMonPaletteTable[species].data; + } } const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon) @@ -6764,9 +6774,19 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); if (shinyValue < SHINY_ODDS) - return &gMonShinyPaletteTable[species]; + { + if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + return &gMonShinyPaletteTableFemale[species]; + else + return &gMonShinyPaletteTable[species]; + } else - return &gMonPaletteTable[species]; + { + if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + return &gMonPaletteTableFemale[species]; + else + return &gMonPaletteTable[species]; + } } bool32 IsHMMove2(u16 move) From 5e332813501b20475a5592e94127c1a4ee3605d4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 17:48:03 -0300 Subject: [PATCH 5/8] Support for gender difference mon icons. --- include/pokemon_icon.h | 3 ++- src/pokemon_icon.c | 23 +++++++++++++++++++---- src/pokemon_storage_system.c | 6 +++--- src/trainer_card.c | 2 +- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index dbd7f2895f..88ad969e31 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -2,8 +2,9 @@ #define GUARD_POKEMON_ICON_H extern const u8 gMonIconPaletteIndices[]; +extern const u8 gMonIconPaletteIndicesFemale[]; -const u8 *GetMonIconTiles(u16 species, bool32); +const u8 *GetMonIconTiles(u16 species, bool32, u32 personality); void sub_80D304C(u16 offset); u8 GetValidMonIconPalIndex(u16 species); const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 8efecfaf9e..78b963e78e 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -4,6 +4,7 @@ #include "palette.h" #include "pokemon_icon.h" #include "sprite.h" +#include "data.h" #define POKE_ICON_BASE_PAL_TAG 56000 @@ -962,7 +963,10 @@ const u8 *const gMonIconTable[] = [SPECIES_UNOWN_Z] = gMonIcon_UnownZ, [SPECIES_UNOWN_EMARK] = gMonIcon_UnownExclamationMark, [SPECIES_UNOWN_QMARK] = gMonIcon_UnownQuestionMark, - +}; +const u8 *const gMonIconTableFemale[] = +{ + [SPECIES_EEVEE] = gMonIcon_Eevee, }; const u8 gMonIconPaletteIndices[] = @@ -1876,6 +1880,11 @@ const u8 gMonIconPaletteIndices[] = [SPECIES_EGG] = 1, }; +const u8 gMonIconPaletteIndicesFemale[] = +{ + [SPECIES_EEVEE] = 2, +}; + const struct SpritePalette gMonIconPaletteTable[] = { { gMonIconPalettes[0], POKE_ICON_BASE_PAL_TAG + 0 }, @@ -2004,6 +2013,8 @@ 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 (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2025,7 +2036,7 @@ u8 sub_80D2D78(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 .paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndices[species], }; - iconTemplate.image = GetMonIconTiles(species, extra); + iconTemplate.image = GetMonIconTiles(species, extra, 0); spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); UpdateMonIconFrame(&gSprites[spriteId]); @@ -2080,7 +2091,7 @@ u16 sub_80D2E84(u16 species) const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 handleDeoxys) { - return GetMonIconTiles(GetIconSpecies(species, personality), handleDeoxys); + return GetMonIconTiles(GetIconSpecies(species, personality), handleDeoxys, personality); } void FreeAndDestroyMonIconSprite(struct Sprite *sprite) @@ -2142,13 +2153,17 @@ void SpriteCB_MonIcon(struct Sprite *sprite) UpdateMonIconFrame(sprite); } -const u8* GetMonIconTiles(u16 species, bool32 handleDeoxys) +const u8* GetMonIconTiles(u16 species, bool32 handleDeoxys, u32 personality) { const u8* iconSprite = gMonIconTable[species]; if (species == SPECIES_DEOXYS && handleDeoxys == TRUE) { iconSprite = (const u8*)(0x400 + (u32)iconSprite); // use the specific Deoxys form icon (Speed in this case) } + else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + { + iconSprite = gMonIconTableFemale[species]; + } return iconSprite; } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 4db9fbf92f..211ade0cd1 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5145,7 +5145,7 @@ static void sub_80CC100(struct Sprite *sprite) sprite->pos1.y = sPSSData->field_CB4->pos1.y + sPSSData->field_CB4->pos2.y + 4; } -static u16 sub_80CC124(u16 species) +static u16 sub_80CC124(u16 species, u32 personality) { u16 i, var; @@ -5169,7 +5169,7 @@ static u16 sub_80CC124(u16 species) sPSSData->field_B58[i] = species; sPSSData->field_B08[i]++; var = 16 * i; - CpuCopy32(GetMonIconTiles(species, TRUE), (void*)(OBJ_VRAM0) + var * 32, 0x200); + CpuCopy32(GetMonIconTiles(species, TRUE, personality), (void*)(OBJ_VRAM0) + var * 32, 0x200); return var; } @@ -5197,7 +5197,7 @@ static struct Sprite *CreateMonIconSprite(u16 species, u32 personality, s16 x, s species = GetIconSpecies(species, personality); tempalte.paletteTag = 0xDAC0 + gMonIconPaletteIndices[species]; - tileNum = sub_80CC124(species); + tileNum = sub_80CC124(species, personality); if (tileNum == 0xFFFF) return NULL; diff --git a/src/trainer_card.c b/src/trainer_card.c index 2d9ec2b090..0473382e44 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -1379,7 +1379,7 @@ static void LoadMonIconGfx(void) for (i = 0; i < PARTY_SIZE; i++) { if (sData->trainerCard.monSpecies[i]) - LoadBgTiles(3, GetMonIconTiles(sData->trainerCard.monSpecies[i], 0), 512, 16 * i + 32); + LoadBgTiles(3, GetMonIconTiles(sData->trainerCard.monSpecies[i], FALSE, 0), 512, 16 * i + 32); } } From ed34e90848034c31c07b3f5c0422ac7081b33775 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 18:08:45 -0300 Subject: [PATCH 6/8] Fixed new-line at EOF --- src/data/pokemon_graphics/front_pic_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index 580db22964..102df1f6b5 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -947,4 +947,4 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = { SPECIES_SPRITE(EEVEE, gMonFrontPic_EeveeF), -}; \ No newline at end of file +}; From 209ff3aa5e6e228d60ebf7b31a7b85cea8edb06d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 6 Nov 2020 18:11:05 -0300 Subject: [PATCH 7/8] Fixed spacing. --- src/pokemon_icon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 78b963e78e..b0db3f12ec 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -964,6 +964,7 @@ const u8 *const gMonIconTable[] = [SPECIES_UNOWN_EMARK] = gMonIcon_UnownExclamationMark, [SPECIES_UNOWN_QMARK] = gMonIcon_UnownQuestionMark, }; + const u8 *const gMonIconTableFemale[] = { [SPECIES_EEVEE] = gMonIcon_Eevee, From 79edca1ae81e7a9df46bfa53eab3e3102a6de6ed Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 7 Nov 2020 21:24:20 -0300 Subject: [PATCH 8/8] =?UTF-8?q?Fixed=20Pok=C3=A9dex=20showing=20by=20defau?= =?UTF-8?q?lt=20Female=20version=20differences.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pokedex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index b0c2a11945..32d0c092dc 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4607,7 +4607,7 @@ static u32 GetPokedexMonPersonality(u16 species) } else { - return 0; + return 0xFF; //Changed from 0 to make it so the Pokédex shows the default mon pics instead of the female versions. } }