Fixed field move mon palette at night.

This commit is contained in:
Ariel A 2022-08-29 01:04:26 -04:00
parent 4654913cb6
commit c704591c8c
2 changed files with 5 additions and 2 deletions

View File

@ -127,6 +127,7 @@
#define FLDEFF_PAL_TAG_SMALL_SPARKLE 0x100F
#define FLDEFF_PAL_TAG_HOF_MONITOR 0x1010
#define FLDEFF_PAL_TAG_UNKNOWN 0x1011
#define FLDEFF_PAL_TAG_FIELD_MOVE_MON 0x8400
// tile tags, for field effects that may have many copies on screen at once
#define FLDEFF_TILE_TAG_SHADOW_SMALL 0x1400

View File

@ -914,8 +914,10 @@ 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)
{
const struct CompressedSpritePalette *spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, 1, x, y, 0, spritePalette->tag);
PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10);
// 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, 1, x, y, paletteSlot, TAG_NONE);
PreservePaletteInWeather(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_FIELD_MOVE_MON) + 0x10);
if (spriteId == 0xFFFF)
return MAX_SPRITES;
else