From d979ac3bf3924051de8bb4154e8398083535eabb Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Feb 2019 00:05:20 -0500 Subject: Document main_menu state machine, name window constants The new names for the constants (and newly named functions) give a much better understanding of what the window system is trying to do. --- src/egg_hatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/egg_hatch.c') diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e1d94889a..f52f66a2a 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void) case 1: if (!gPaletteFade.active) { - FillWindowPixelBuffer(sEggHatchData->windowId, 0); + FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_BUFFER_TRANSPARENT); sEggHatchData->CB2_PalCounter = 0; sEggHatchData->CB2_state++; } @@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { - FillWindowPixelBuffer(windowId, 0xFF); + FillWindowPixelBuffer(windowId, PIXEL_BUFFER_UNKNOWN); sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; -- cgit v1.2.3 From c96f8751cddf1a203bd5f310683ea35bf9cb8db2 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Thu, 21 Feb 2019 23:27:12 -0500 Subject: Improve window palette macros --- src/egg_hatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/egg_hatch.c') diff --git a/src/egg_hatch.c b/src/egg_hatch.c index f52f66a2a..8fb21dbbe 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void) case 1: if (!gPaletteFade.active) { - FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_BUFFER_TRANSPARENT); + FillWindowPixelBuffer(sEggHatchData->windowId, PALETTE_NUM_TO_FILL_VALUE(0)); sEggHatchData->CB2_PalCounter = 0; sEggHatchData->CB2_state++; } @@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { - FillWindowPixelBuffer(windowId, PIXEL_BUFFER_UNKNOWN); + FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15)); sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; -- cgit v1.2.3 From 3716da5430a976d05afecdf82f43f14fc2584949 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 17:25:39 -0500 Subject: Rename macro with correct name for pixel values --- src/egg_hatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/egg_hatch.c') diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 66114f19f..a9b6001ec 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void) case 1: if (!gPaletteFade.active) { - FillWindowPixelBuffer(sEggHatchData->windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_FILL(0)); sEggHatchData->CB2_PalCounter = 0; sEggHatchData->CB2_state++; } @@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; -- cgit v1.2.3