diff --git a/include/affine_background.h b/include/affine_background.h index 12865d8..bb98067 100644 --- a/include/affine_background.h +++ b/include/affine_background.h @@ -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 \ No newline at end of file diff --git a/source/affine_background.c b/source/affine_background.c index fd4a718..66ddb3f 100644 --- a/source/affine_background.c +++ b/source/affine_background.c @@ -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() @@ -40,4 +38,9 @@ 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); } \ No newline at end of file diff --git a/source/game.c b/source/game.c index f14c4ae..05f7a94 100644 --- a/source/game.c +++ b/source/game.c @@ -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; }