Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick S. Kanmeugne committed Nov 11, 2020
1 parent aaf6fe6 commit d36d656
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions sfml2dgrid/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,43 @@
int main()
{
#ifdef __linux__
XInitThreads();
XInitThreads();
#endif

// -- sfml windows
// -- sfml windows
sf::ContextSettings settings;
settings.antialiasingLevel = 10;
sf::RenderWindow window(
sf::VideoMode(
(App::DEFAULT_WIDTH*App::DEFAULT_RESX),
(App::DEFAULT_HEIGHT*App::DEFAULT_RESY)
),
(App::DEFAULT_WIDTH * App::DEFAULT_RESX),
(App::DEFAULT_HEIGHT * App::DEFAULT_RESY)),
"SFML 2D Grid",
sf::Style::Titlebar | sf::Style::Close,
settings
);
window.clear(sf::Color::White);
sf::Style::Titlebar | sf::Style::Close,
settings);
window.clear(sf::Color::White);
window.setFramerateLimit(120);
window.setActive(false);
window.setActive(false);

// -- application
// -- application
App app;
app.setWindow(&window);

//-- grid 2D
env::Grid g;
env::Grid g;
g.setSizeX(App::DEFAULT_WIDTH);
g.setSizeY(App::DEFAULT_HEIGHT);
g.setResolutionX(App::DEFAULT_RESX);
g.setResolutionY(App::DEFAULT_RESY);
g.iInitialize();
app.setGrid(&g);
g.iInitialize();
app.setGrid(&g);

//-- viewer
viewers::GridViewer gviewer;
gviewer.iActivate();
gviewer.iActivate();

// grid obstacles
viewers::ObstacleViewer oviewer;
oviewer.iActivate();
oviewer.iActivate();

// aggregator
viewers::ViewerMgr mgr;
Expand All @@ -62,10 +60,10 @@ int main()
// initialize gviewer (only after having attached it to the App object)
gviewer.initialize();

//-- launch application
//-- launch application
std::thread rendering_thread(&App::display, &app);
app.run();
rendering_thread.join();

return 0;
return 0;
}

0 comments on commit d36d656

Please sign in to comment.