From d22ad0d913df79313c8bc36d32031d4d0ef5940c Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 16 Feb 2021 20:59:47 +0100 Subject: [PATCH] update strat now has name --- external/imgui/CMakeLists.txt | 2 ++ framework/engine/src/mm/engine.hpp | 4 ---- .../engine/src/mm/update_strategies/default_strategy.hpp | 2 ++ framework/engine/src/mm/update_strategies/update_strategy.hpp | 2 ++ framework/engine/test/update_strategy_test.cpp | 2 ++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/external/imgui/CMakeLists.txt b/external/imgui/CMakeLists.txt index e0bd6ec..0148794 100644 --- a/external/imgui/CMakeLists.txt +++ b/external/imgui/CMakeLists.txt @@ -51,6 +51,8 @@ target_include_directories(imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") #target_include_directories(imgui PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/imgui") target_include_directories(imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/imgui") # im sad +target_compile_definitions(imgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1) + if(EMSCRIPTEN) set_target_properties(imgui PROPERTIES COMPILE_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 -s FULL_ES2=1 -s FULL_ES3=1") set_target_properties(imgui PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 -s FULL_ES2=1 -s FULL_ES3=1") diff --git a/framework/engine/src/mm/engine.hpp b/framework/engine/src/mm/engine.hpp index f1b4752..b1082ef 100644 --- a/framework/engine/src/mm/engine.hpp +++ b/framework/engine/src/mm/engine.hpp @@ -58,10 +58,7 @@ class Engine { // called from destructor or explicitly void cleanup(void); - //[[nodiscard]] float getFixedDeltaTime(void) const { return _fixed_delta_time; }; - void update(void); - //void fixedUpdate(void); void run(void); // calls update() until stopped void stop(void); @@ -70,7 +67,6 @@ class Engine { std::vector _service_add_order; // ? std::vector _service_enable_order; // ? - //std::unordered_map>> _services; std::unordered_map< service_family::family_type, std::shared_ptr&& info_array) override; diff --git a/framework/engine/src/mm/update_strategies/update_strategy.hpp b/framework/engine/src/mm/update_strategies/update_strategy.hpp index 5e564a4..9d9a194 100644 --- a/framework/engine/src/mm/update_strategies/update_strategy.hpp +++ b/framework/engine/src/mm/update_strategies/update_strategy.hpp @@ -37,6 +37,8 @@ class UpdateStrategy { public: virtual ~UpdateStrategy(void) {} + virtual const char* name(void) = 0; + protected: // the engine facing interface friend ::MM::Engine; diff --git a/framework/engine/test/update_strategy_test.cpp b/framework/engine/test/update_strategy_test.cpp index 25c50f4..3b29ce2 100644 --- a/framework/engine/test/update_strategy_test.cpp +++ b/framework/engine/test/update_strategy_test.cpp @@ -15,6 +15,8 @@ using namespace entt::literals; class MockUpdateStrategy : public MM::UpdateStrategies::UpdateStrategy { public: + const char* name(void) override { return "MockUpdateStrategy"; } + MOCK_METHOD( bool, registerService,