Updated to joker sprite to use the new one by @GreenNinja2525 and changed the way switching backgrounds works to prevent flicker

This commit is contained in:
cellos51
2025-07-21 20:09:35 -04:00
parent 86cf8896e2
commit 1b53a1b077
2 changed files with 35 additions and 26 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 731 B

+15 -6
View File
@@ -150,7 +150,7 @@ static const Rect POP_MENU_ANIM_RECT = {9, 7, 24, 31 };
static const Rect SINGLE_BLIND_SELECT_RECT = { 9, 7, 13, 32 };
static const Rect HAND_BG_RECT_SELECTING = {9, 11, 24, 15 };
static const Rect HAND_BG_RECT_SELECTING = {9, 11, 24, 18 };
// TODO: Currently unused, remove?
//static const Rect HAND_BG_RECT_PLAYING = {9, 14, 24, 18 };
@@ -418,6 +418,17 @@ void change_background(int id)
return;
}
else if (id == BG_ID_CARD_SELECTING)
{
if (background == BG_ID_CARD_PLAYING)
{
for (int i = 0; i <= 2; i++)
{
main_bg_se_move_rect_1_tile_vert(HAND_BG_RECT_SELECTING, SE_UP);
}
tte_erase_rect_wrapper(HAND_SIZE_RECT_PLAYING);
}
else
{
REG_DISPCNT |= DCNT_WIN0; // Enable window 0 to make hand background transparent
// Load the tiles and palette
@@ -444,6 +455,7 @@ void change_background(int id)
memset16(&pal_bg_mem[16], blind_get_color(current_blind, BLIND_BACKGROUND_SECONDARY_COLOR_INDEX), 1);
memset16(&pal_bg_mem[5], blind_get_color(current_blind, BLIND_BACKGROUND_SHADOW_COLOR_INDEX), 1);
}
}
else if (id == BG_ID_CARD_PLAYING)
{
if (background != BG_ID_CARD_SELECTING)
@@ -452,19 +464,16 @@ void change_background(int id)
background = BG_ID_CARD_PLAYING;
}
Rect curr_hand_bg_rect = HAND_BG_RECT_SELECTING;
for (int i = 0; i <= 2; i++)
{
main_bg_se_move_rect_1_tile_vert(curr_hand_bg_rect, SE_DOWN);
curr_hand_bg_rect.top++;
curr_hand_bg_rect.bottom++;
main_bg_se_move_rect_1_tile_vert(HAND_BG_RECT_SELECTING, SE_DOWN);
}
tte_erase_rect_wrapper(HAND_SIZE_RECT_SELECT);
}
else if (id == BG_ID_ROUND_END)
{
if (background != BG_ID_CARD_SELECTING)
if (background != BG_ID_CARD_SELECTING || background != BG_ID_CARD_PLAYING)
{
change_background(BG_ID_CARD_SELECTING);
background = BG_ID_ROUND_END;