Skip to content

Commit

Permalink
Fix next three ball render without textures
Browse files Browse the repository at this point in the history
Signed-off-by: Wojciech Madry <[email protected]>
  • Loading branch information
wojciechmadry committed Aug 18, 2023
1 parent 67dc528 commit 5c41993
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/function/drawer/drawer_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ void draw_window(sf::RenderWindow &window, map &Map,
WhiteBox.setPosition(pos);
// Draw whitebox around ball.
window.draw(WhiteBox);
auto ballID =
static_cast<ResourceType>(static_cast<decltype(NextEnum.first())>(
ResourceType::BALL_CIRCLE_START) +
NextEnum.first());
auto ballID = static_cast<ResourceType>(
static_cast<std::uint32_t>(ResourceType::BALL_CIRCLE_START) +
static_cast<std::uint32_t>(NextEnum.second().enum_color()));
auto &Ball =
Resource.get_as<sf::CircleShape>(ballID); // No textured ball
auto radius = wb / 2.0f - Ball.getRadius();
Expand Down

0 comments on commit 5c41993

Please sign in to comment.