Skip to content

Commit

Permalink
fixed flickering background
Browse files Browse the repository at this point in the history
  • Loading branch information
Laguna1989 committed Jul 7, 2024
1 parent 092880f commit de588fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified assets/background.aseprite
Binary file not shown.
5 changes: 3 additions & 2 deletions impl/gamelib/state_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ void StateMenu::createVignette()
void StateMenu::createShapes()
{
m_background = std::make_shared<jt::Animation>();
m_background->loadFromAseprite("assets/background.aseprite", textureManager());

m_background->loadFromAseprite("assets/background.aseprite", textureManager());
m_background->play("idle");
m_background->update(0.1f);

m_overlay = jt::dh::createShapeRect(GP::GetScreenSize(), jt::colors::Black, textureManager());
}

Expand Down Expand Up @@ -244,7 +246,6 @@ void StateMenu::onUpdate(float const elapsed)

void StateMenu::updateDrawables(float const& elapsed)
{
m_background->update(elapsed);
m_titleAnimation->update(elapsed);
m_textStart->update(elapsed);
m_textExplanation->update(elapsed);
Expand Down

0 comments on commit de588fa

Please sign in to comment.