cleanup includes, primarily artifacts of the updatestrat refactor

This commit is contained in:
Green Sky 2021-05-17 01:35:35 +02:00
parent efad254193
commit 1248957a18
29 changed files with 28 additions and 71 deletions

View File

@ -1,10 +1,5 @@
#pragma once
#include "mm/services/service.hpp"
#include "mm/update_strategies/update_strategy.hpp"
#include <cstdint>
#include <functional>
//#include <physfs.h>
//fwd
typedef struct PHYSFS_File PHYSFS_File;
@ -14,6 +9,8 @@ typedef struct PHYSFS_Stat PHYSFS_Stat;
#include <mm/engine.hpp>
#include <cstdint>
namespace MM::Services {
class FilesystemService : public Service {

View File

@ -1,5 +1,4 @@
#include "./transform2d.hpp"
#include "mm/components/transform2d.hpp"
#include <imgui/imgui.h>

View File

@ -184,6 +184,7 @@ bool ImGuiEngineTools::enable(Engine& engine, std::vector<UpdateStrategies::Task
task_array.push_back(
UpdateStrategies::TaskInfo{"ImGuiEngineTools::render"}
.fn([this](Engine& e){ renderImGui(e); })
.phase(UpdateStrategies::update_phase_t::PRE)
.succeed("ImGuiMenuBar::render")
);

View File

@ -1,8 +1,6 @@
#include "./imgui_menu_bar.hpp"
#include "mm/services/service.hpp"
#include <mm/engine.hpp>
#include <entt/core/hashed_string.hpp>
#include <imgui/imgui.h>
@ -37,6 +35,8 @@ namespace MM::Services {
task_array.push_back(
UpdateStrategies::TaskInfo{"ImGuiMenuBar::render"}
.fn([this](Engine& e){ renderImGui(e); })
.phase(UpdateStrategies::update_phase_t::PRE)
.succeed("ImGuiService::new_frame")
);
return true;

View File

@ -1,12 +1,8 @@
#include "./imgui_s.hpp"
#include "mm/services/service.hpp"
#include "mm/update_strategies/update_strategy.hpp"
#include <imgui/imgui.h>
#include <imgui/backends/imgui_impl_sdl.h>
#include <entt/core/hashed_string.hpp>
#ifdef MM_OPENGL_3
#include <imgui/backends/imgui_impl_opengl3.h>
#endif

View File

@ -5,15 +5,15 @@
//#include <mm/resource_manager.hpp>
#include <mm/engine.hpp>
#include "./imgui_menu_bar.hpp"
#include "mm/components/time_delta.hpp"
#include "mm/services/service.hpp"
#include <mm/services/imgui_menu_bar.hpp>
#include <imgui/imgui.h>
#include <mm/components/name.hpp>
#include <mm/components/transform2d.hpp>
#include <mm/components/velocity2d.hpp>
#include <mm/components/time_delta.hpp>
//#include <mm/imgui/widgets/texture_resource_manager.hpp>
#include <mm/imgui/widgets/entity.hpp>
@ -87,6 +87,7 @@ namespace MM::Services {
task_array.push_back(
UpdateStrategies::TaskInfo{"ImGuiSceneToolsService::render"}
.fn([this](Engine& e){ renderImGui(e); })
.phase(UpdateStrategies::update_phase_t::PRE)
.succeed("ImGuiMenuBar::render")
);

View File

@ -1,6 +1,7 @@
#pragma once
#include "mm/services/service.hpp"
#include <mm/services/service.hpp>
#define MM_IEEE_ENTITY_WIDGET ::MM::ImGuiWidgets::Entity // evil
#define MM_IEEE_ASSERT(x)
#include <mm/imgui/widgets/entity.hpp>

View File

@ -1,13 +1,11 @@
#include "./sound_tools.hpp"
#include <mm/imgui/sound_info.hpp>
#include <mm/engine.hpp>
#include <entt/core/hashed_string.hpp>
#include <mm/services/sound_service.hpp>
#include <mm/imgui/sound_info.hpp>
#include <imgui/imgui.h>
#include <mm/services/sound_service.hpp>
#include <mm/logger.hpp>
#define LOGIGS(x) LOG("ImGuiSceneToolsService", x)
@ -39,6 +37,7 @@ namespace MM::Services {
task_array.push_back(
UpdateStrategies::TaskInfo{"ImGuiSoundTools::render"}
.fn([this](Engine& e){ renderImGui(e); })
.phase(UpdateStrategies::update_phase_t::PRE)
.succeed("ImGuiMenuBar::render")
);

View File

@ -1,7 +1,6 @@
#pragma once
#include "./imgui_menu_bar.hpp"
#include "mm/services/service.hpp"
namespace MM::Services {

View File

@ -1,4 +1,3 @@
#include "mm/services/imgui_menu_bar.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
@ -6,12 +5,12 @@
#include <mm/services/sdl_service.hpp>
#include <mm/services/filesystem.hpp>
#include <mm/services/imgui_s.hpp>
#include <mm/services/imgui_menu_bar.hpp>
#include <mm/services/engine_tools.hpp>
#include <mm/services/opengl_renderer.hpp>
#include <mm/opengl/render_tasks/imgui.hpp>
#include <mm/services/engine_tools.hpp>
static char* argv0;
TEST(imgui_scene_tools, it) {

View File

@ -1,10 +1,7 @@
#include "mm/services/service.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
#include <entt/core/hashed_string.hpp>
// services
#include <mm/services/sdl_service.hpp>
#include <mm/services/filesystem.hpp>

View File

@ -1,4 +1,3 @@
#include "mm/services/service.hpp"
#include <functional>
#include <gtest/gtest.h>

View File

@ -1,10 +1,7 @@
#include "mm/services/service.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
#include <entt/core/hashed_string.hpp>
// services
#include <mm/services/sdl_service.hpp>
#include <mm/services/filesystem.hpp>

View File

@ -1,7 +1,5 @@
#include "./input_service.hpp"
#include <entt/core/hashed_string.hpp>
#include <glm/common.hpp>
#include <glm/geometric.hpp>
#include <glm/trigonometric.hpp>

View File

@ -1,6 +1,5 @@
#pragma once
#include "mm/services/service.hpp"
#include <glm/vec2.hpp>
#include <mm/services/sdl_service.hpp>

View File

@ -1,4 +1,3 @@
#include "mm/services/service.hpp"
#include <gtest/gtest.h>
#include <mm/services/input_service.hpp>
@ -9,8 +8,6 @@
#include <mm/opengl/render_tasks/imgui.hpp>
#include <entt/core/hashed_string.hpp>
#include <imgui/imgui.h>
class InputVisualizer : public MM::Services::Service {

View File

@ -10,7 +10,6 @@
#include <mm/opengl/texture_loader.hpp>
#include "../opengl/res/default_texture.h" // data
#include "../opengl/res/errig_texture.h" // data
#include "mm/update_strategies/update_strategy.hpp"
#include <tracy/Tracy.hpp>
#ifndef MM_OPENGL_3_GLES

View File

@ -11,20 +11,21 @@
namespace MM::Services {
bool ImGuiOpenGLRendererTools::enable(Engine& engine, std::vector<UpdateStrategies::TaskInfo>& task_array) {
auto& menu_bar = engine.getService<MM::Services::ImGuiMenuBar>();
auto& menu_bar = engine.getService<MM::Services::ImGuiMenuBar>();
menu_bar.menu_tree["OpenGL"]["RenderTasks"] = [this](Engine&) {
ImGui::MenuItem("Render Tasks", NULL, &_show_render_tasks);
};
ImGui::MenuItem("Render Tasks", NULL, &_show_render_tasks);
};
menu_bar.menu_tree["OpenGL"]["TextureCacheLegacy"] = [this](Engine&) {
ImGui::MenuItem("Texture Cache (legacy)", NULL, &_show_texture_cache_legacy);
};
ImGui::MenuItem("Texture Cache (legacy)", NULL, &_show_texture_cache_legacy);
};
// add task
task_array.push_back(
UpdateStrategies::TaskInfo{"ImGuiOpenGLRendererTools::render"}
.fn([this](Engine& e) { renderImGui(e); })
.phase(UpdateStrategies::update_phase_t::PRE)
.succeed("ImGuiMenuBar::render")
);
@ -34,8 +35,8 @@ bool ImGuiOpenGLRendererTools::enable(Engine& engine, std::vector<UpdateStrategi
void ImGuiOpenGLRendererTools::disable(Engine& engine) {
auto& menu_bar = engine.getService<MM::Services::ImGuiMenuBar>();
menu_bar.menu_tree["OpenGL"].erase("RenderTasks");
menu_bar.menu_tree["OpenGL"].erase("TextureCacheLegacy");
menu_bar.menu_tree["OpenGL"].erase("RenderTasks");
menu_bar.menu_tree["OpenGL"].erase("TextureCacheLegacy");
}
void ImGuiOpenGLRendererTools::renderImGui(Engine& engine) {

View File

@ -1,5 +1,3 @@
#include "mm/opengl/render_tasks/clear.hpp"
#include "mm/opengl/render_tasks/copy_to_fb.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
@ -12,6 +10,8 @@
#include <entt/entity/registry.hpp>
#include <mm/opengl/render_tasks/clear.hpp>
#include <mm/opengl/render_tasks/copy_to_fb.hpp>
#include <mm/opengl/render_tasks/simple_rect.hpp>
#include <mm/opengl/render_tasks/blur.hpp>
#include <mm/opengl/render_tasks/imgui.hpp>

View File

@ -1,4 +1,3 @@
#include "mm/opengl/camera_3d.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
@ -13,6 +12,8 @@
#include <mm/opengl/render_tasks/fast_sky_render_task.hpp>
#include <mm/systems/fast_sky_sun_system.hpp>
#include <mm/opengl/camera_3d.hpp>
const char* argv0;
TEST(fast_sky_render_task, it) {

View File

@ -1,4 +1,3 @@
#include "mm/services/service.hpp"
#include <gtest/gtest.h>
#include <mm/engine.hpp>
@ -8,8 +7,6 @@
#include <mm/services/imgui_s.hpp>
#include <mm/opengl/render_tasks/imgui.hpp>
#include <entt/core/hashed_string.hpp>
#include <imgui/imgui.h>
using namespace entt::literals;

View File

@ -1,8 +1,6 @@
#pragma once
#include "mm/services/service.hpp"
#include <mm/services/scene_service_interface.hpp>
#include <entt/fwd.hpp>
#include <chrono>

View File

@ -14,9 +14,6 @@ target_link_libraries(screen_director
entt
)
message("screen_director_simple ALIAS TODO: remove!!")
add_library(screen_director_simple ALIAS screen_director)
if (BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -1,8 +1,4 @@
#include "./screen_director.hpp"
#include "mm/services/service.hpp"
#include "mm/update_strategies/update_strategy.hpp"
#include <entt/core/hashed_string.hpp>
#include <tracy/Tracy.hpp>

View File

@ -1,8 +1,4 @@
#include "./sdl_service.hpp"
#include "mm/services/service.hpp"
#include "mm/update_strategies/update_strategy.hpp"
#include <entt/core/hashed_string.hpp>
#include <tracy/Tracy.hpp>

View File

@ -1,11 +1,9 @@
#include "./simple_scene.hpp"
#include "mm/services/service.hpp"
#include <mm/components/time_delta.hpp>
#include <entt/entity/registry.hpp>
#include <tracy/Tracy.hpp>
#include <mm/logger.hpp>

View File

@ -1,6 +1,5 @@
#pragma once
#include "mm/services/service.hpp"
#include <mm/services/scene_service_interface.hpp>
#include <chrono>

View File

@ -1,7 +1,4 @@
#include "simple_sdl_renderer.hpp"
#include "mm/update_strategies/update_strategy.hpp"
#include <entt/core/hashed_string.hpp>
#include <mm/logger.hpp>
#define LOG_CRIT(...) __LOG_CRIT( "SimpleSDLRenderer", __VA_ARGS__)

View File

@ -1,6 +1,5 @@
#pragma once
#include "mm/services/service.hpp"
#include <SDL.h>
#include <mm/engine.hpp>