From 55a77604bef76dcd3eafe527cc20d5ecb413d906 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Thu, 14 Mar 2019 23:47:30 +0700 Subject: [PATCH 1/2] update modules --- BUILD_INSTRUCTIONS.md | 13 +++---------- modules/enduro2d | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/BUILD_INSTRUCTIONS.md b/BUILD_INSTRUCTIONS.md index b083d76..a7bf693 100644 --- a/BUILD_INSTRUCTIONS.md +++ b/BUILD_INSTRUCTIONS.md @@ -1,4 +1,4 @@ -# Build Instructions +# Build Instructions ## * Requirements @@ -12,14 +12,8 @@ ```bash $ git clone --recursive git://github.com/enduro2d/enduro2d-bootstrap.git $ cd enduro2d-bootstrap -``` - -> or - -```bash -$ git clone git://github.com/enduro2d/enduro2d-bootstrap.git -$ cd enduro2d-bootstrap -$ git submodule update --init --recursive +$ git lfs install +$ git lfs pull ``` ## * Building @@ -55,4 +49,3 @@ $ ./enduro2d-bootstrap - CMake: https://cmake.org/ - CMake documentation: https://cmake.org/documentation/ - CMake FAQ: https://gitlab.kitware.com/cmake/community/wikis/FAQ - diff --git a/modules/enduro2d b/modules/enduro2d index 978ca86..259ece9 160000 --- a/modules/enduro2d +++ b/modules/enduro2d @@ -1 +1 @@ -Subproject commit 978ca86268d1fc975c07731602239fcfc3be43e2 +Subproject commit 259ece970a8a3d5a3ed3ae34278b2e1a2b48804b From 94b448f3950b13ff96c20455f056eb538c236f6d Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 15 Mar 2019 00:13:58 +0700 Subject: [PATCH 2/2] code fixing after engine update --- sources/main.cpp | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/sources/main.cpp b/sources/main.cpp index 8a86548..e0a5a9e 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -9,17 +9,31 @@ using namespace e2d; namespace { - class game final : public application { + class game_system final : public ecs::system { public: - bool frame_tick() final { + void process(ecs::registry& owner) override { + E2D_UNUSED(owner); const keyboard& k = the().keyboard(); - while ( the().should_close() || k.is_key_just_released(keyboard_key::escape) ) { - return false; + if ( k.is_key_just_released(keyboard_key::f12) ) { + the().toggle_visible(!the().visible()); } - the().execute(render::command_block<64>() - .add_command(render::clear_command() - .color_value({1.f, 0.4f, 0.f, 1.f})) - .add_command(render::swap_command(true))); + if ( k.is_key_just_released(keyboard_key::escape) ) { + the().set_should_close(true); + } + } + }; + + class game final : public high_application { + public: + bool initialize() final{ + ecs::registry_filler(the().registry()) + .system(world::priority_update); + + ecs::entity camera_e = the().registry().create_entity(); + ecs::entity_filler(camera_e) + .component(camera() + .background({1.f, 0.4f, 0.f, 1.f})) + .component(node::create(camera_e)); return true; } }; @@ -31,5 +45,6 @@ int e2d_main(int argc, char *argv[]) { .timer_params(engine::timer_parameters() .maximal_framerate(100))); modules::initialize(argc, argv, params).start(); + modules::shutdown(); return 0; }