Mercurial > malikania
diff tests/libclient/animation/main.cpp @ 43:fabbe1759cec
Misc: switch to mlk namespace, closes #589
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 29 Nov 2016 22:25:17 +0100 |
parents | a47a4477f347 |
children | f30c84b4b9ed |
line wrap: on
line diff
--- a/tests/libclient/animation/main.cpp Tue Nov 29 21:21:36 2016 +0100 +++ b/tests/libclient/animation/main.cpp Tue Nov 29 22:25:17 2016 +0100 @@ -28,18 +28,19 @@ #include <malikania/resources_locator.hpp> #include <malikania/window.hpp> +using namespace mlk; using namespace std::chrono_literals; namespace { -malikania::window window(400, 400); +window win(400, 400); } // !namespace class TestAnimation : public testing::Test { protected: - malikania::directory_resources_locator m_locator; - malikania::client_resources_loader m_loader; + directory_resources_locator m_locator; + client_resources_loader m_loader; public: TestAnimation() @@ -77,17 +78,17 @@ boost::timer::cpu_timer timer; try { - malikania::animation animation = m_loader.load_animation("animations/margins.json"); - malikania::animator animator(animation); + animation animation = m_loader.load_animation("animations/margins.json"); + animator animator(animation); auto x = (400 / 2) - (animation.sprite().cell().width() / 2); auto y = (400 / 2) - (animation.sprite().cell().height() / 2); while (timer.elapsed().wall / 1000000LL < 8000) { - window.clear(); - animator.draw(window, malikania::point(x, y)); + win.clear(); + animator.draw(win, point(x, y)); animator.update(); - window.present(); + win.present(); } } catch (const std::exception &ex) { FAIL() << ex.what();