Show Pokémon's shadow instead of question mark for unseen mons in Dexnav - Pawkkie/Team-Aquas-Asset-Repo GitHub Wiki

[!IMPORTANT] This does not work if you are using Merrp's icon branch!

All credits go to CFRU.

  1. Add the following to include/pokemon_icon.h
u8 CreateMonIconNoPalette(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality);
  1. Add the following to src/pokemon_icon.c
u8 CreateMonIconNoPalette(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality)
{
    u8 spriteId;
    u16 palIndex;
    struct MonIconSpriteTemplate iconTemplate =
    {
        .oam = &sMonIconOamData,
        .image = GetMonIconPtr(species, personality),
        .anims = sMonIconAnims,
        .affineAnims = sMonIconAffineAnims,
        .callback = callback,
        .paletteTag = POKE_ICON_BASE_PAL_TAG + gSpeciesInfo[species].iconPalIndex,
    };
    species = SanitizeSpeciesId(species);
    palIndex = IndexOfSpritePaletteTag(iconTemplate.paletteTag);
    memcpy(&gPlttBufferUnfaded[OBJ_PLTT_ID(palIndex+3)], &gPlttBufferUnfaded[palIndex+3], 16);
    memcpy(&gPlttBufferFaded[OBJ_PLTT_ID(palIndex+3)], &gPlttBufferFaded[palIndex+3], 16);
    TintPalette_CustomTone(&gPlttBufferFaded[OBJ_PLTT_ID(palIndex+3)], 16, 0, 0, 0);
    TintPalette_CustomTone(&gPlttBufferUnfaded[OBJ_PLTT_ID(palIndex+3)], 16, 0, 0, 0);

    if (species > NUM_SPECIES)
        iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG;
#if P_GENDER_DIFFERENCES
    else if (gSpeciesInfo[species].iconSpriteFemale != NULL && IsPersonalityFemale(species, personality))
        iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gSpeciesInfo[species].iconPalIndexFemale;
#endif

    spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority);

    UpdateMonIconFrame(&gSprites[spriteId]);

    return spriteId;
}
  1. Now open src/dexnav.c and replace your TryDrawIconInSlot with following:
static void TryDrawIconInSlot(u16 species, s16 x, s16 y)
{
    u8 spriteId;
    if (species == SPECIES_NONE || species > NUM_SPECIES)
    {
        CreateNoDataIcon(x, y);   //'X' in slot
    }
    else if (!GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN))
    {
        spriteId = CreateMonIconNoPalette(species, SpriteCB_MonIcon, x, y, 0, 0xFFFFFFFF); // Loads grayscale copy of palette to slots 3-6
        gSprites[spriteId].oam.paletteNum += 3; // Use grayscale palette for this icon
    }
    else
    {
        CreateMonIcon(species, SpriteCB_MonIcon, x, y, 0, 0xFFFFFFFF);
    }
}

And you're done! You should now see unseen mons as shadowed icons instead of question marks.

mGBA_cmsNBzkiv7