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/berry_fix_program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/berry_fix_program.c') diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 3631c083a..7e72a9f3b 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -226,8 +226,8 @@ static void berry_fix_gpu_set(void) DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); - FillWindowPixelBuffer(2, 0); - FillWindowPixelBuffer(3, 0); + FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT); + FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT); FillWindowPixelBuffer(0, 0xAA); width = GetStringWidth(0, sUnknown_08617E9B, 0); -- 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/berry_fix_program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/berry_fix_program.c') diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 7e72a9f3b..24198fc87 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -226,9 +226,9 @@ static void berry_fix_gpu_set(void) DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); - FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT); - FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT); - FillWindowPixelBuffer(0, 0xAA); + FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0xA)); width = GetStringWidth(0, sUnknown_08617E9B, 0); left = (0x78 - width) / 2; @@ -273,7 +273,7 @@ static int berry_fix_text_update(int checkval) static void berry_fix_text_print(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); - FillWindowPixelBuffer(1, 0xAA); + FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0xA)); AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]); PutWindowTilemap(1); CopyWindowToVram(1, 2); -- 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/berry_fix_program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/berry_fix_program.c') diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 24198fc87..37be569f8 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -226,9 +226,9 @@ static void berry_fix_gpu_set(void) DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); width = GetStringWidth(0, sUnknown_08617E9B, 0); left = (0x78 - width) / 2; @@ -273,7 +273,7 @@ static int berry_fix_text_update(int checkval) static void berry_fix_text_print(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]); PutWindowTilemap(1); CopyWindowToVram(1, 2); -- cgit v1.2.3