USE RGB constants in hall of fame

This commit is contained in:
DizzyEggg 2018-11-18 20:32:27 +01:00
parent 27ee7d567e
commit f58cc47e17
2 changed files with 8 additions and 8 deletions

View File

@ -31,6 +31,7 @@
#include "trainer_pokemon_sprites.h" #include "trainer_pokemon_sprites.h"
#include "data2.h" #include "data2.h"
#include "rom_81520A8.h" #include "rom_81520A8.h"
#include "constants/rgb.h"
struct HallofFameMon struct HallofFameMon
{ {
@ -388,7 +389,7 @@ static bool8 InitHallOfFameScreen(void)
if (!sub_8175024()) if (!sub_8175024())
{ {
SetVBlankCallback(VBlankCB_HallOfFame); SetVBlankCallback(VBlankCB_HallOfFame);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gMain.state++; gMain.state++;
} }
break; 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 if (gTasks[taskId].tDisplayedMonId <= 4 && currMon[1].species != SPECIES_NONE) // there is another pokemon to display
{ {
gTasks[taskId].tDisplayedMonId++; 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; gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.priority = 1;
gTasks[taskId].func = Task_Hof_DisplayMon; gTasks[taskId].func = Task_Hof_DisplayMon;
} }
@ -641,7 +642,7 @@ static void Task_Hof_PaletteFadeAndPrintWelcomeText(u8 taskId)
{ {
u16 i; u16 i;
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, 0); BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, RGB_BLACK);
for (i = 0; i < PARTY_SIZE; i++) for (i = 0; i < PARTY_SIZE; i++)
{ {
if (gTasks[taskId].tMonSpriteId(i) != 0xFF) if (gTasks[taskId].tMonSpriteId(i) != 0xFF)
@ -670,7 +671,7 @@ static void sub_8173DC0(u8 taskId)
if (gTasks[taskId].tMonSpriteId(i) != 0xFF) if (gTasks[taskId].tMonSpriteId(i) != 0xFF)
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1; 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); FillWindowPixelBuffer(0, 0);
CopyWindowToVram(0, 3); CopyWindowToVram(0, 3);
gTasks[taskId].tFrameCount = 7; gTasks[taskId].tFrameCount = 7;
@ -738,7 +739,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId)
static void Task_Hof_HandlePaletteOnExit(u8 taskId) static void Task_Hof_HandlePaletteOnExit(u8 taskId)
{ {
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, 0); BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_Hof_HandleExit; 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); ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].tCurrPageNo, STR_CONV_MODE_RIGHT_ALIGN, 3);
StringExpandPlaceholders(gStringVar4, gText_HOFNumber); StringExpandPlaceholders(gStringVar4, gText_HOFNumber);
@ -973,7 +974,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId)
currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId); currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId);
gSprites[currMonID].oam.priority = 0; gSprites[currMonID].oam.priority = 0;
sUnknown_0203BCD4 = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000; 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]; currMon = &savedTeams->mon[gTasks[taskId].tCurrMonId];
if (currMon->species != SPECIES_EGG) if (currMon->species != SPECIES_EGG)

View File

@ -60,7 +60,6 @@ void PickLotteryCornerTicket(void)
{ {
struct Pokemon *mon = &gPlayerParty[i]; struct Pokemon *mon = &gPlayerParty[i];
// UB: Too few arguments for function GetMonData
if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE)
{ {
// do not calculate ticket values for eggs. // do not calculate ticket values for eggs.