Fixed showmonpic palette being affected by time of day and weather. Fixed #8.
This commit is contained in:
parent
b1bdd3e0b7
commit
05a6147e5c
@ -913,27 +913,23 @@ u8 AddNewGameBirchObject(s16 x, s16 y, u8 subpriority)
|
||||
return CreateSprite(&sSpriteTemplate_NewGameBirch, x, y, subpriority);
|
||||
}
|
||||
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
|
||||
|
||||
u8 CreateMonSprite_FieldMove(u16 species, u32 otId, u32 personality, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
s32 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, TRUE, x, y, 0, gMonPaletteTable[species].tag);
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10);
|
||||
// force load unique tag here to avoid collision with follower pokemon
|
||||
u32 paletteSlot = AllocSpritePalette(FLDEFF_PAL_TAG_FIELD_MOVE_MON);
|
||||
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, x, y, paletteSlot, TAG_NONE);
|
||||
PreservePaletteInWeather(paletteSlot + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return MAX_SPRITES;
|
||||
else
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
u8 CreateMonSprite_FieldMove(u16 species, u32 otId, u32 personality, s16 x, s16 y, u8 subpriority)
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
const struct CompressedSpritePalette *spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
|
||||
// force load unique tag here to avoid collision with follower pokemon
|
||||
u8 paletteSlot = AllocSpritePalette(FLDEFF_PAL_TAG_FIELD_MOVE_MON);
|
||||
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, x, y, paletteSlot, TAG_NONE);
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_FIELD_MOVE_MON) + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return MAX_SPRITES;
|
||||
else
|
||||
return spriteId;
|
||||
// Reuse logic; (otId ^ pid) >= SHINY_ODDS ensures non-shiny
|
||||
return CreateMonSprite_FieldMove(species, 0, SHINY_ODDS, x, y, subpriority);
|
||||
}
|
||||
|
||||
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user