Skip to content

Commit

Permalink
Update to new SFML API
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed May 19, 2024
1 parent 7e2be7d commit 42b6a20
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ int main(int argc, char* argv[])
auto perception_angle = 135_deg;

auto clock = sf::Clock();
auto font = sf::Font();
if (!font.loadFromFile(FONT_PATH / std::filesystem::path("font.ttf")))
throw std::runtime_error("Failed to load font");
const auto font = sf::Font::loadFromFile(FONT_PATH / std::filesystem::path("font.ttf")).value();

auto text = sf::Text(font, "", 24);
text.setFillColor(sf::Color::White);
Expand Down

0 comments on commit 42b6a20

Please sign in to comment.