mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:58:12 +00:00
Spider: Redraw completely when drawing cards
Spider was only updating the new bounding box area after drawing cards from the deck - leaving behind a sliver of the old deck. This was a regression, as the game previously used the old bounding box, introduced by GH-11153.
This commit is contained in:
parent
2251733744
commit
1d7d7d39b7
2 changed files with 3 additions and 1 deletions
|
@ -110,6 +110,7 @@ void Game::draw_cards()
|
|||
update_score(-1);
|
||||
|
||||
m_draw_animation = true;
|
||||
m_original_stock_rect = stock_pile.bounding_box();
|
||||
start_timer(s_timer_interval_ms);
|
||||
}
|
||||
|
||||
|
@ -394,7 +395,7 @@ void Game::timer_event(Core::TimerEvent&)
|
|||
++m_draw_animation_pile;
|
||||
|
||||
if (m_draw_animation_pile == piles.size()) {
|
||||
update(stock_pile.bounding_box());
|
||||
update(m_original_stock_rect);
|
||||
detect_full_stacks();
|
||||
|
||||
m_draw_animation = false;
|
||||
|
|
|
@ -102,6 +102,7 @@ private:
|
|||
bool m_draw_animation { false };
|
||||
uint8_t m_draw_animation_delay { 0 };
|
||||
uint8_t m_draw_animation_pile { 0 };
|
||||
Gfx::IntRect m_original_stock_rect;
|
||||
|
||||
uint32_t m_score { 500 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue