Просмотр исходного кода

testbed: prepare movement system

skypjack 6 дней назад
Родитель
Сommit
126d51de5d

+ 1 - 0
testbed/CMakeLists.txt

@@ -50,6 +50,7 @@ target_sources(
         system/hud_system.cpp
         system/imgui_system.cpp
         system/input_system.cpp
+        system/movement_system.cpp
         system/rendering_system.cpp
         testbed.cpp
         ${imgui_SOURCE_DIR}/backends/imgui_impl_sdl3.cpp

+ 2 - 2
testbed/application/application.cpp

@@ -14,6 +14,7 @@
 #include <system/hud_system.h>
 #include <system/imgui_system.h>
 #include <system/input_system.h>
+#include <system/movement_system.h>
 #include <system/rendering_system.h>
 
 namespace testbed {
@@ -23,8 +24,7 @@ void application::update(entt::registry &registry) {
     ImGui_ImplSDL3_NewFrame();
     ImGui::NewFrame();
 
-    // update...
-    static_cast<void>(registry);
+    movement_system(registry);
 }
 
 void application::draw(entt::registry &registry, const context &context) const {

+ 10 - 0
testbed/system/movement_system.cpp

@@ -0,0 +1,10 @@
+#include <entt/entity/registry.hpp>
+#include <system/movement_system.h>
+
+namespace testbed {
+
+void movement_system(entt::registry &) {
+    // TODO
+}
+
+} // namespace testbed

+ 9 - 0
testbed/system/movement_system.h

@@ -0,0 +1,9 @@
+#pragma once
+
+#include <entt/entity/fwd.hpp>
+
+namespace testbed {
+
+void movement_system(entt::registry &);
+
+}