mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 05:43:51 +01:00
Show gender differences in evo scene
This commit is contained in:
parent
b0a1153a2b
commit
4aa7c096b7
@ -18,6 +18,8 @@ bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette
|
||||
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
|
||||
void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality);
|
||||
|
||||
void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality);
|
||||
|
||||
void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic);
|
||||
|
@ -67,6 +67,14 @@ void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffe
|
||||
LZ77UnCompWram(src->data, buffer);
|
||||
}
|
||||
|
||||
void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality)
|
||||
{
|
||||
if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE)
|
||||
DecompressPicFromTable(&gMonFrontPicTableFemale[species], buffer, species);
|
||||
else
|
||||
DecompressPicFromTable(&gMonFrontPicTable[species], buffer, species);
|
||||
}
|
||||
|
||||
void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality)
|
||||
{
|
||||
bool8 isFrontPic;
|
||||
|
@ -259,9 +259,9 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u
|
||||
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
|
||||
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
DecompressPicFromTable(&gMonFrontPicTable[currSpecies],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
currSpecies);
|
||||
DecompressPicFromTableGender(gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
currSpecies,
|
||||
personality);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x110, 0x20);
|
||||
|
||||
@ -274,9 +274,9 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u
|
||||
gSprites[ID].invisible = TRUE;
|
||||
|
||||
// postEvo sprite
|
||||
DecompressPicFromTable(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies);
|
||||
DecompressPicFromTableGender(gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies,
|
||||
personality);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
|
||||
@ -351,9 +351,9 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 4;
|
||||
|
||||
DecompressPicFromTable(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies);
|
||||
DecompressPicFromTableGender(gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies,
|
||||
personality);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
@ -423,9 +423,9 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
u32 trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
DecompressPicFromTable(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies);
|
||||
DecompressPicFromTableGender(gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies,
|
||||
personality);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
gMain.state++;
|
||||
@ -487,9 +487,9 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, u8 preEvoSprit
|
||||
sEvoStructPtr = AllocZeroed(sizeof(struct EvoInfo));
|
||||
sEvoStructPtr->preEvoSpriteId = preEvoSpriteId;
|
||||
|
||||
DecompressPicFromTable(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
postEvoSpecies);
|
||||
DecompressPicFromTableGender(gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
postEvoSpecies,
|
||||
personality);
|
||||
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
|
Loading…
x
Reference in New Issue
Block a user