diff --git a/headers/enduro2d/high/_all.hpp b/headers/enduro2d/high/_all.hpp index 7b5edfd9..b1ab9a13 100644 --- a/headers/enduro2d/high/_all.hpp +++ b/headers/enduro2d/high/_all.hpp @@ -46,7 +46,6 @@ #include "components/sprite_renderer.hpp" #include "components/touchable.hpp" -#include "systems/editor_system.hpp" #include "systems/flipbook_system.hpp" #include "systems/frame_system.hpp" #include "systems/gizmos_system.hpp" diff --git a/headers/enduro2d/high/_high.hpp b/headers/enduro2d/high/_high.hpp index 9001e047..93074648 100644 --- a/headers/enduro2d/high/_high.hpp +++ b/headers/enduro2d/high/_high.hpp @@ -66,7 +66,6 @@ namespace e2d class sprite_renderer; class touchable; - class editor_system; class flipbook_system; class frame_system; class gizmos_system; diff --git a/headers/enduro2d/high/systems/editor_system.hpp b/headers/enduro2d/high/systems/editor_system.hpp deleted file mode 100644 index 8e42b853..00000000 --- a/headers/enduro2d/high/systems/editor_system.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * This file is part of the "Enduro2D" - * For conditions of distribution and use, see copyright notice in LICENSE.md - * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) - ******************************************************************************/ - -#pragma once - -#include "_systems.hpp" - -namespace e2d -{ - class editor_system final - : public ecs::system> { - public: - editor_system(); - ~editor_system() noexcept final; - - void process( - ecs::registry& owner, - const ecs::after& trigger) override; - private: - class internal_state; - std::unique_ptr state_; - }; -} diff --git a/samples/sources/sample_08/sample_08.cpp b/samples/sources/sample_08/sample_08.cpp index c8c135c1..d5253895 100644 --- a/samples/sources/sample_08/sample_08.cpp +++ b/samples/sources/sample_08/sample_08.cpp @@ -32,11 +32,11 @@ namespace } }; - class camera_system final : public systems::render_system { + class camera_system final : public systems::post_update_system { public: void process( ecs::registry& owner, - const systems::render_event& event) override + const systems::post_update_event& event) override { E2D_UNUSED(event); owner.for_joined_components( @@ -79,6 +79,8 @@ namespace int e2d_main(int argc, char *argv[]) { const auto starter_params = starter::parameters( engine::parameters("sample_08", "enduro2d") + .window_params(engine::window_parameters() + .size({1024, 768})) .timer_params(engine::timer_parameters() .maximal_framerate(100))); modules::initialize(argc, argv, starter_params).start(); diff --git a/sources/enduro2d/high/starter.cpp b/sources/enduro2d/high/starter.cpp index 80412906..6da3af4f 100644 --- a/sources/enduro2d/high/starter.cpp +++ b/sources/enduro2d/high/starter.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -62,8 +61,6 @@ namespace bool initialize() final { ecs::registry_filler(the().registry()) - .feature(ecs::feature() - .add_system()) .feature(ecs::feature() .add_system()) .feature(ecs::feature() diff --git a/sources/enduro2d/high/systems/editor_system.cpp b/sources/enduro2d/high/systems/editor_system.cpp deleted file mode 100644 index cacc23a0..00000000 --- a/sources/enduro2d/high/systems/editor_system.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * This file is part of the "Enduro2D" - * For conditions of distribution and use, see copyright notice in LICENSE.md - * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) - ******************************************************************************/ - -#include - -namespace e2d -{ - // - // editor_system::internal_state - // - - class editor_system::internal_state final : private noncopyable { - public: - internal_state() = default; - ~internal_state() noexcept = default; - - void process(ecs::registry& owner) { - E2D_UNUSED(owner); - } - }; - - // - // editor_system - // - - editor_system::editor_system() - : state_(new internal_state()) {} - editor_system::~editor_system() noexcept = default; - - void editor_system::process( - ecs::registry& owner, - const ecs::after& trigger) - { - E2D_UNUSED(trigger); - E2D_PROFILER_SCOPE("editor_system.process"); - state_->process(owner); - } -} diff --git a/sources/enduro2d/high/systems/frame_system.cpp b/sources/enduro2d/high/systems/frame_system.cpp index 9efb36bf..b0a8810a 100644 --- a/sources/enduro2d/high/systems/frame_system.cpp +++ b/sources/enduro2d/high/systems/frame_system.cpp @@ -99,7 +99,7 @@ namespace e2d const ecs::after& trigger) { E2D_UNUSED(trigger); - E2D_PROFILER_SCOPE("frame_system.frame_update"); + E2D_PROFILER_SCOPE("frame_system.process_frame_update"); state_->process_frame_update(owner); } diff --git a/sources/enduro2d/high/systems/input_system.cpp b/sources/enduro2d/high/systems/input_system.cpp index bdd001b9..f1e6e649 100644 --- a/sources/enduro2d/high/systems/input_system.cpp +++ b/sources/enduro2d/high/systems/input_system.cpp @@ -22,7 +22,7 @@ namespace e2d internal_state() = default; ~internal_state() noexcept = default; - void process(ecs::registry& owner) { + void process_update(ecs::registry& owner) { E2D_UNUSED(owner); } }; @@ -40,6 +40,7 @@ namespace e2d const ecs::before& trigger) { E2D_UNUSED(trigger); - state_->process(owner); + E2D_PROFILER_SCOPE("input_system.process_update"); + state_->process_update(owner); } } diff --git a/sources/enduro2d/high/systems/physics_system.cpp b/sources/enduro2d/high/systems/physics_system.cpp index 096278a0..9b0851db 100644 --- a/sources/enduro2d/high/systems/physics_system.cpp +++ b/sources/enduro2d/high/systems/physics_system.cpp @@ -22,7 +22,7 @@ namespace e2d internal_state() = default; ~internal_state() noexcept = default; - void process(ecs::registry& owner) { + void process_update(ecs::registry& owner) { E2D_UNUSED(owner); } }; @@ -40,6 +40,7 @@ namespace e2d const ecs::after& trigger) { E2D_UNUSED(trigger); - state_->process(owner); + E2D_PROFILER_SCOPE("physics_system.process_update"); + state_->process_update(owner); } }