Merge pull request #27 from MeirGavish/refactors
Fixed issue where pop menu panels overrode joker and consumable panels
This commit is contained in:
+13
-12
@@ -115,14 +115,15 @@ static inline Card *discard_pop()
|
|||||||
// Screenblock rects
|
// Screenblock rects
|
||||||
static const Rect ROUND_END_MENU_RECT = {9, 7, 24, 21 };
|
static const Rect ROUND_END_MENU_RECT = {9, 7, 24, 21 };
|
||||||
|
|
||||||
static const Rect POP_MENU_ANIM_RECT = {9, 6, 24, 32 };
|
static const Rect POP_MENU_ANIM_RECT_DOWN = {9, 6, 24, 32 };
|
||||||
// The rect for popping menu animations (round end, shop, blinds) - includes both the
|
static const Rect POP_MENU_ANIM_RECT_UP = {9, 7, 24, 32 };
|
||||||
// target and source position rects.
|
// The rects for popping menu animations (round end, shop, blinds)
|
||||||
// Extends beyond the visible screen to the end of the screenblock
|
// - extends beyond the visible screen to the end of the screenblock
|
||||||
// This is because when popping, the target position is blank so we just animate the whole thing
|
// It includes both the target and source position rects.
|
||||||
// so we don't have to track its position
|
// This is because when popping, the target position is blank so we just animate
|
||||||
//
|
// the whole rect so we don't have to track its position
|
||||||
// When unpopping we include another row above the menu assuming it's blank so it's copied into it
|
//
|
||||||
|
// In the down version we include another row above the menu assuming it's blank so it's copied into it
|
||||||
|
|
||||||
static const Rect SINGLE_BLIND_SELECT_RECT = { 9, 7, 13, 32 };
|
static const Rect SINGLE_BLIND_SELECT_RECT = { 9, 7, 13, 32 };
|
||||||
|
|
||||||
@@ -1808,7 +1809,7 @@ void game_round_end() // Writing this kind a made me want to kms. If somewone wa
|
|||||||
case 8: // Shift the round end panel back out of view and go to the next state
|
case 8: // Shift the round end panel back out of view and go to the next state
|
||||||
{
|
{
|
||||||
sequence_step++;
|
sequence_step++;
|
||||||
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT, SE_DOWN);
|
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT_DOWN, SE_DOWN);
|
||||||
|
|
||||||
if (sequence_step >= 20)
|
if (sequence_step >= 20)
|
||||||
{
|
{
|
||||||
@@ -1872,7 +1873,7 @@ void game_shop()
|
|||||||
{
|
{
|
||||||
case 0: // Intro sequence (menu and shop icon coming into frame)
|
case 0: // Intro sequence (menu and shop icon coming into frame)
|
||||||
{
|
{
|
||||||
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT, SE_UP);
|
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT_UP, SE_UP);
|
||||||
|
|
||||||
if (timer >= 7) // Shift the shop icon
|
if (timer >= 7) // Shift the shop icon
|
||||||
{
|
{
|
||||||
@@ -1971,7 +1972,7 @@ void game_shop()
|
|||||||
case 2: // Outro sequence (menu and shop icon going out of frame)
|
case 2: // Outro sequence (menu and shop icon going out of frame)
|
||||||
{
|
{
|
||||||
// Shift the shop panel
|
// Shift the shop panel
|
||||||
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT, SE_DOWN);
|
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT_DOWN, SE_DOWN);
|
||||||
|
|
||||||
main_bg_se_copy_rect_1_tile_vert(SHOP_ICON_RECT, SE_UP);
|
main_bg_se_copy_rect_1_tile_vert(SHOP_ICON_RECT, SE_UP);
|
||||||
|
|
||||||
@@ -2027,7 +2028,7 @@ void game_blind_select()
|
|||||||
{
|
{
|
||||||
case 0: // Intro sequence (menu coming into frame)
|
case 0: // Intro sequence (menu coming into frame)
|
||||||
{
|
{
|
||||||
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT, SE_UP);
|
main_bg_se_copy_rect_1_tile_vert(POP_MENU_ANIM_RECT_UP, SE_UP);
|
||||||
|
|
||||||
if (timer == 12)
|
if (timer == 12)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user