Removed default color for affine background and changed to load palette from image instead

This commit is contained in:
cellos51
2025-08-08 00:32:30 -04:00
parent 3c79a35b92
commit 12ca27e27b
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -7,10 +7,10 @@
#define AFFINE_BG_PAL_LEN 5
#define AFFINE_BG_PB (PAL_ROW_LEN * 15) // This isn't really a palette bank, just the starting index of the palette
#define AFFINE_BG_DEFAULT_COLOR RGB15(11, 18, 15) // 0x3E4B
void affine_background_init();
void affine_background_update();
void affine_background_set_color(COLOR color);
void affine_background_load_palette(const void *src);
#endif // AFFINE_BACKGROUND_H
+6 -3
View File
@@ -10,11 +10,9 @@ void affine_background_init()
{
memcpy16_tile8_with_palette_offset(&tile8_mem[AFFINE_BG_CBB], affine_background_gfxTiles, affine_background_gfxTilesLen/2, AFFINE_BG_PB);
GRIT_CPY(&se_mem[AFFINE_BG_SBB], affine_background_gfxMap);
memcpy16(&pal_bg_mem[AFFINE_BG_PB], affine_background_gfxPal, AFFINE_BG_PAL_LEN);
affine_background_load_palette(affine_background_gfxPal);
bgaff = bg_aff_default;
affine_background_set_color(AFFINE_BG_DEFAULT_COLOR);
}
void affine_background_update()
@@ -41,3 +39,8 @@ void affine_background_set_color(COLOR color)
clr_rgbscale(&pal_bg_mem[AFFINE_BG_PB] + i, &pal_bg_mem[AFFINE_BG_PB] + i, 1, color);
}
}
void affine_background_load_palette(const void *src)
{
memcpy16(&pal_bg_mem[AFFINE_BG_PB], src, AFFINE_BG_PAL_LEN);
}
+1 -1
View File
@@ -1994,7 +1994,7 @@ void game_round_end()
tte_erase_rect_wrapper(BLIND_REWARD_RECT);
tte_erase_rect_wrapper(BLIND_REQ_TEXT_RECT);
obj_hide(playing_blind_token->obj);
affine_background_set_color(AFFINE_BG_DEFAULT_COLOR);
affine_background_load_palette(affine_background_gfxPal);
state = 5;
timer = 0;
}