From 4b7a22bafff6d7718c63e9648ceab880e27cabd5 Mon Sep 17 00:00:00 2001 From: cellos51 Date: Thu, 28 Aug 2025 19:03:48 -0400 Subject: [PATCH] made all palettes have their length set in grit --- graphics/affine_background_gfx.grit | 2 +- graphics/affine_main_menu_background_gfx.grit | 2 +- graphics/background_blind_select_gfx.grit | 2 +- graphics/background_gfx.grit | 2 +- graphics/background_main_menu_gfx.grit | 2 +- graphics/background_shop_gfx.grit | 2 +- source/game.c | 12 ++++++------ 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/graphics/affine_background_gfx.grit b/graphics/affine_background_gfx.grit index 3205289..1bc6094 100644 --- a/graphics/affine_background_gfx.grit +++ b/graphics/affine_background_gfx.grit @@ -1 +1 @@ --gt -gB8 -mLa -mRa \ No newline at end of file +-gt -gB8 -mLa -mRa -pe 16 \ No newline at end of file diff --git a/graphics/affine_main_menu_background_gfx.grit b/graphics/affine_main_menu_background_gfx.grit index 3205289..1bc6094 100644 --- a/graphics/affine_main_menu_background_gfx.grit +++ b/graphics/affine_main_menu_background_gfx.grit @@ -1 +1 @@ --gt -gB8 -mLa -mRa \ No newline at end of file +-gt -gB8 -mLa -mRa -pe 16 \ No newline at end of file diff --git a/graphics/background_blind_select_gfx.grit b/graphics/background_blind_select_gfx.grit index f57bef6..2d86f5c 100644 --- a/graphics/background_blind_select_gfx.grit +++ b/graphics/background_blind_select_gfx.grit @@ -1 +1 @@ --gB8 -mR8 -mLs -mRtf \ No newline at end of file +-gB8 -mR8 -mLs -mRtf -pe 160 \ No newline at end of file diff --git a/graphics/background_gfx.grit b/graphics/background_gfx.grit index f57bef6..2d86f5c 100644 --- a/graphics/background_gfx.grit +++ b/graphics/background_gfx.grit @@ -1 +1 @@ --gB8 -mR8 -mLs -mRtf \ No newline at end of file +-gB8 -mR8 -mLs -mRtf -pe 160 \ No newline at end of file diff --git a/graphics/background_main_menu_gfx.grit b/graphics/background_main_menu_gfx.grit index f57bef6..2d86f5c 100644 --- a/graphics/background_main_menu_gfx.grit +++ b/graphics/background_main_menu_gfx.grit @@ -1 +1 @@ --gB8 -mR8 -mLs -mRtf \ No newline at end of file +-gB8 -mR8 -mLs -mRtf -pe 160 \ No newline at end of file diff --git a/graphics/background_shop_gfx.grit b/graphics/background_shop_gfx.grit index f57bef6..2d86f5c 100644 --- a/graphics/background_shop_gfx.grit +++ b/graphics/background_shop_gfx.grit @@ -1 +1 @@ --gB8 -mR8 -mLs -mRtf \ No newline at end of file +-gB8 -mR8 -mLs -mRtf -pe 160 \ No newline at end of file diff --git a/source/game.c b/source/game.c index d0c938c..62f6bd5 100644 --- a/source/game.c +++ b/source/game.c @@ -445,8 +445,8 @@ void change_background(int id) // Load the tiles and palette // Background - memcpy16(pal_bg_mem, background_gfxPal, PAL_BG_MAX_SIZE); // This '64" isn't a specific number, I'm just using it to prevent the text colors from being overridden - GRIT_CPY(&tile8_mem[MAIN_BG_CBB], background_gfxTiles); // Deadass i have no clue how any of these memory things work but I just messed with them until stuff worked + GRIT_CPY(pal_bg_mem, background_gfxPal); + GRIT_CPY(&tile8_mem[MAIN_BG_CBB], background_gfxTiles); GRIT_CPY(&se_mem[MAIN_BG_SBB], background_gfxMap); if (current_blind == BIG_BLIND) // Change text and palette depending on blind type @@ -507,7 +507,7 @@ void change_background(int id) { toggle_windows(false, true); - memcpy16(pal_bg_mem, background_shop_gfxPal, PAL_BG_MAX_SIZE); + GRIT_CPY(pal_bg_mem, background_shop_gfxPal); GRIT_CPY(&tile_mem[MAIN_BG_CBB], background_shop_gfxTiles); GRIT_CPY(&se_mem[MAIN_BG_SBB], background_shop_gfxMap); @@ -536,7 +536,7 @@ void change_background(int id) toggle_windows(false, true); - memcpy16(pal_bg_mem, background_blind_select_gfxPal, PAL_BG_MAX_SIZE); + GRIT_CPY(pal_bg_mem, background_blind_select_gfxPal); GRIT_CPY(&tile_mem[MAIN_BG_CBB], background_blind_select_gfxTiles); GRIT_CPY(&se_mem[MAIN_BG_SBB], background_blind_select_gfxMap); @@ -548,7 +548,7 @@ void change_background(int id) // Select button PID is 15 and the outline is 18 memcpy16(&pal_bg_mem[18], &pal_bg_mem[15], 1); // Skip button PID is 10 and the outline is 5 - memcpy16(&pal_bg_mem[10 ], &pal_bg_mem[5], 1); + memcpy16(&pal_bg_mem[10], &pal_bg_mem[5], 1); for (int i = 0; i < MAX_BLINDS; i++) { @@ -638,7 +638,7 @@ void change_background(int id) toggle_windows(false, false); tte_erase_screen(); - memcpy16(pal_bg_mem, background_main_menu_gfxPal, PAL_BG_MAX_SIZE); + GRIT_CPY(pal_bg_mem, background_main_menu_gfxPal); GRIT_CPY(&tile_mem[MAIN_BG_CBB], background_main_menu_gfxTiles); GRIT_CPY(&se_mem[MAIN_BG_SBB], background_main_menu_gfxMap);