From 5fff2f2234755af166612a4829d178408eb740bb Mon Sep 17 00:00:00 2001 From: Sebastian Gabl Date: Wed, 15 Jan 2020 14:48:17 +0100 Subject: [PATCH] Use SHINY_ODDS macro where intended The 3 locations where SHINY_ODDS was added generate mon sprites for display in the dex, at game start and on starter choice. The arguments are intended for otId but in this case they are set to the same value as SHINY_ODDS to prevent the pictures created from using the shiny palette. --- src/main_menu.c | 2 +- src/pokedex.c | 2 +- src/starter_choose.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main_menu.c b/src/main_menu.c index 7c4e82c76..61a60a8e7 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1884,7 +1884,7 @@ static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite *sprite) static u8 NewGameBirchSpeech_CreateLotadSprite(u8 a, u8 b) { - return CreatePicSprite2(SPECIES_LOTAD, 8, 0, 1, a, b, 14, -1); + return CreatePicSprite2(SPECIES_LOTAD, SHINY_ODDS, 0, 1, a, b, 14, -1); } static void AddBirchSpeechObjects(u8 taskId) diff --git a/src/pokedex.c b/src/pokedex.c index 78c204d2d..bd766fbf7 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4674,7 +4674,7 @@ u32 sub_80C0E68(u16 a) u16 CreateMonSpriteFromNationalDexNumber(u16 nationalNum, s16 x, s16 y, u16 paletteSlot) { nationalNum = NationalPokedexNumToSpecies(nationalNum); - return CreateMonPicSprite_HandleDeoxys(nationalNum, 8, sub_80C0E68(nationalNum), TRUE, x, y, paletteSlot, 0xFFFF); + return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, sub_80C0E68(nationalNum), TRUE, x, y, paletteSlot, 0xFFFF); } u16 sub_80C0EF8(u16 species, s16 x, s16 y, s8 paletteSlot) diff --git a/src/starter_choose.c b/src/starter_choose.c index 348491992..11b84a9e2 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -640,7 +640,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) { u8 spriteId; - spriteId = CreatePicSprite2(species, 8, 0, 1, x, y, 0xE, 0xFFFF); + spriteId = CreatePicSprite2(species, SHINY_ODDS, 0, 1, x, y, 0xE, 0xFFFF); gSprites[spriteId].oam.priority = 0; return spriteId; }