From f58cc47e173900537200c796501386f4e3a1f0d6 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 18 Nov 2018 20:32:27 +0100 Subject: [PATCH] USE RGB constants in hall of fame --- src/hall_of_fame.c | 15 ++++++++------- src/lottery_corner.c | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 514eb365d..315990256 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -31,6 +31,7 @@ #include "trainer_pokemon_sprites.h" #include "data2.h" #include "rom_81520A8.h" +#include "constants/rgb.h" struct HallofFameMon { @@ -388,7 +389,7 @@ static bool8 InitHallOfFameScreen(void) if (!sub_8175024()) { SetVBlankCallback(VBlankCB_HallOfFame); - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); gMain.state++; } break; @@ -626,7 +627,7 @@ static void Task_Hof_TryDisplayAnotherMon(u8 taskId) if (gTasks[taskId].tDisplayedMonId <= 4 && currMon[1].species != SPECIES_NONE) // there is another pokemon to display { gTasks[taskId].tDisplayedMonId++; - BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0); + BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24)); gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.priority = 1; gTasks[taskId].func = Task_Hof_DisplayMon; } @@ -641,7 +642,7 @@ static void Task_Hof_PaletteFadeAndPrintWelcomeText(u8 taskId) { u16 i; - BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, 0); + BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, RGB_BLACK); for (i = 0; i < PARTY_SIZE; i++) { if (gTasks[taskId].tMonSpriteId(i) != 0xFF) @@ -670,7 +671,7 @@ static void sub_8173DC0(u8 taskId) if (gTasks[taskId].tMonSpriteId(i) != 0xFF) gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1; } - BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0); + BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24)); FillWindowPixelBuffer(0, 0); CopyWindowToVram(0, 3); gTasks[taskId].tFrameCount = 7; @@ -738,7 +739,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId) static void Task_Hof_HandlePaletteOnExit(u8 taskId) { CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); - BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, 0); + BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Task_Hof_HandleExit; } @@ -940,7 +941,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId) } } - BlendPalettes(0xFFFF0000, 0xC, 0x63B0); + BlendPalettes(0xFFFF0000, 0xC, RGB(16, 29, 24)); ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].tCurrPageNo, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_HOFNumber); @@ -973,7 +974,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId) currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId); gSprites[currMonID].oam.priority = 0; sUnknown_0203BCD4 = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000; - BlendPalettesUnfaded(sUnknown_0203BCD4, 0xC, 0x63B0); + BlendPalettesUnfaded(sUnknown_0203BCD4, 0xC, RGB(16, 29, 24)); currMon = &savedTeams->mon[gTasks[taskId].tCurrMonId]; if (currMon->species != SPECIES_EGG) diff --git a/src/lottery_corner.c b/src/lottery_corner.c index f04fd0bdd..bd7d17ef7 100644 --- a/src/lottery_corner.c +++ b/src/lottery_corner.c @@ -60,7 +60,6 @@ void PickLotteryCornerTicket(void) { struct Pokemon *mon = &gPlayerParty[i]; - // UB: Too few arguments for function GetMonData if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { // do not calculate ticket values for eggs.