mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
remove dummy editor system
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -66,7 +66,6 @@ namespace e2d
|
||||
class sprite_renderer;
|
||||
class touchable;
|
||||
|
||||
class editor_system;
|
||||
class flipbook_system;
|
||||
class frame_system;
|
||||
class gizmos_system;
|
||||
|
||||
@@ -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<ecs::after<systems::post_render_event>> {
|
||||
public:
|
||||
editor_system();
|
||||
~editor_system() noexcept final;
|
||||
|
||||
void process(
|
||||
ecs::registry& owner,
|
||||
const ecs::after<systems::post_render_event>& trigger) override;
|
||||
private:
|
||||
class internal_state;
|
||||
std::unique_ptr<internal_state> state_;
|
||||
};
|
||||
}
|
||||
@@ -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<camera>(
|
||||
@@ -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<starter>(argc, argv, starter_params).start<game>();
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <enduro2d/high/components/sprite_renderer.hpp>
|
||||
#include <enduro2d/high/components/touchable.hpp>
|
||||
|
||||
#include <enduro2d/high/systems/editor_system.hpp>
|
||||
#include <enduro2d/high/systems/flipbook_system.hpp>
|
||||
#include <enduro2d/high/systems/frame_system.hpp>
|
||||
#include <enduro2d/high/systems/gizmos_system.hpp>
|
||||
@@ -62,8 +61,6 @@ namespace
|
||||
|
||||
bool initialize() final {
|
||||
ecs::registry_filler(the<world>().registry())
|
||||
.feature<struct editor_feature>(ecs::feature()
|
||||
.add_system<editor_system>())
|
||||
.feature<struct flipbook_feature>(ecs::feature()
|
||||
.add_system<flipbook_system>())
|
||||
.feature<struct frame_feature>(ecs::feature()
|
||||
|
||||
@@ -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 <enduro2d/high/systems/editor_system.hpp>
|
||||
|
||||
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<systems::post_render_event>& trigger)
|
||||
{
|
||||
E2D_UNUSED(trigger);
|
||||
E2D_PROFILER_SCOPE("editor_system.process");
|
||||
state_->process(owner);
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ namespace e2d
|
||||
const ecs::after<systems::frame_update_event>& trigger)
|
||||
{
|
||||
E2D_UNUSED(trigger);
|
||||
E2D_PROFILER_SCOPE("frame_system.frame_update");
|
||||
E2D_PROFILER_SCOPE("frame_system.process_frame_update");
|
||||
state_->process_frame_update(owner);
|
||||
}
|
||||
|
||||
|
||||
@@ -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<systems::update_event>& trigger)
|
||||
{
|
||||
E2D_UNUSED(trigger);
|
||||
state_->process(owner);
|
||||
E2D_PROFILER_SCOPE("input_system.process_update");
|
||||
state_->process_update(owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<systems::update_event>& trigger)
|
||||
{
|
||||
E2D_UNUSED(trigger);
|
||||
state_->process(owner);
|
||||
E2D_PROFILER_SCOPE("physics_system.process_update");
|
||||
state_->process_update(owner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user