Procházet zdrojové kódy

Convert game/systems methods and parameters to snake_case

Co-authored-by: djeada <[email protected]>
copilot-swe-agent[bot] před 5 dny
rodič
revize
2e3b5373c6
54 změnil soubory, kde provedl 220 přidání a 220 odebrání
  1. 3 3
      app/controllers/command_controller.cpp
  2. 3 3
      app/core/game_engine.cpp
  3. 1 1
      app/models/hover_tracker.cpp
  4. 2 2
      app/utils/engine_view_helpers.h
  5. 1 1
      game/core/system.h
  6. 2 2
      game/core/world.cpp
  7. 1 1
      game/core/world.h
  8. 1 1
      game/map/map_transformer.cpp
  9. 1 1
      game/map/map_transformer.h
  10. 4 4
      game/systems/ai_system.cpp
  11. 1 1
      game/systems/ai_system.h
  12. 1 1
      game/systems/ai_system/ai_behavior.h
  13. 2 2
      game/systems/ai_system/ai_executor.cpp
  14. 1 1
      game/systems/ai_system/ai_executor.h
  15. 3 3
      game/systems/ai_system/ai_reasoner.cpp
  16. 1 1
      game/systems/ai_system/ai_reasoner.h
  17. 1 1
      game/systems/ai_system/ai_types.h
  18. 2 2
      game/systems/ai_system/ai_worker.cpp
  19. 4 4
      game/systems/ai_system/behaviors/attack_behavior.cpp
  20. 1 1
      game/systems/ai_system/behaviors/attack_behavior.h
  21. 5 5
      game/systems/ai_system/behaviors/defend_behavior.cpp
  22. 1 1
      game/systems/ai_system/behaviors/defend_behavior.h
  23. 3 3
      game/systems/ai_system/behaviors/gather_behavior.cpp
  24. 1 1
      game/systems/ai_system/behaviors/gather_behavior.h
  25. 2 2
      game/systems/ai_system/behaviors/production_behavior.cpp
  26. 1 1
      game/systems/ai_system/behaviors/production_behavior.h
  27. 3 3
      game/systems/ai_system/behaviors/retreat_behavior.cpp
  28. 1 1
      game/systems/ai_system/behaviors/retreat_behavior.h
  29. 2 2
      game/systems/arrow_system.cpp
  30. 1 1
      game/systems/arrow_system.h
  31. 8 8
      game/systems/camera_service.cpp
  32. 2 2
      game/systems/camera_service.h
  33. 5 5
      game/systems/capture_system.cpp
  34. 2 2
      game/systems/capture_system.h
  35. 1 1
      game/systems/cleanup_system.h
  36. 15 15
      game/systems/combat_system.cpp
  37. 4 4
      game/systems/combat_system.h
  38. 13 13
      game/systems/game_state_serializer.cpp
  39. 2 2
      game/systems/game_state_serializer.h
  40. 4 4
      game/systems/healing_system.cpp
  41. 2 2
      game/systems/healing_system.h
  42. 22 22
      game/systems/movement_system.cpp
  43. 4 4
      game/systems/movement_system.h
  44. 1 1
      game/systems/patrol_system.h
  45. 37 37
      game/systems/picking_service.cpp
  46. 25 25
      game/systems/picking_service.h
  47. 2 2
      game/systems/production_system.cpp
  48. 1 1
      game/systems/production_system.h
  49. 4 4
      game/systems/save_storage.cpp
  50. 1 1
      game/systems/terrain_alignment_system.h
  51. 5 5
      game/systems/victory_service.cpp
  52. 2 2
      game/systems/victory_service.h
  53. 1 1
      game/units/unit.cpp
  54. 1 1
      game/units/unit.h

+ 3 - 3
app/controllers/command_controller.cpp

@@ -42,7 +42,7 @@ auto CommandController::onAttackClick(qreal sx, qreal sy, int viewportWidth,
 
   auto *cam = static_cast<Render::GL::Camera *>(camera);
   Engine::Core::EntityID const target_id =
-      Game::Systems::PickingService::pickUnitFirst(
+      Game::Systems::PickingService::pick_unit_first(
           float(sx), float(sy), *m_world, *cam, viewportWidth, viewportHeight,
           0);
 
@@ -198,7 +198,7 @@ auto CommandController::onPatrolClick(qreal sx, qreal sy, int viewportWidth,
 
   auto *cam = static_cast<Render::GL::Camera *>(camera);
   QVector3D hit;
-  if (!Game::Systems::PickingService::screenToGround(
+  if (!Game::Systems::PickingService::screen_to_ground(
           QPointF(sx, sy), *cam, viewportWidth, viewportHeight, hit)) {
     if (m_hasPatrolFirstWaypoint) {
       clearPatrolFirstWaypoint();
@@ -262,7 +262,7 @@ auto CommandController::setRallyAtScreen(qreal sx, qreal sy, int viewportWidth,
 
   auto *cam = static_cast<Render::GL::Camera *>(camera);
   QVector3D hit;
-  if (!Game::Systems::PickingService::screenToGround(
+  if (!Game::Systems::PickingService::screen_to_ground(
           QPointF(sx, sy), *cam, viewportWidth, viewportHeight, hit)) {
     return result;
   }

+ 3 - 3
app/core/game_engine.cpp

@@ -252,7 +252,7 @@ GameEngine::GameEngine(QObject *parent)
                 auto *picking = m_pickingService.get();
                 if ((cam != nullptr) && (picking != nullptr)) {
                   Engine::Core::EntityID const target_id =
-                      Game::Systems::PickingService::pickUnitFirst(
+                      Game::Systems::PickingService::pick_unit_first(
                           0.0F, 0.0F, *m_world, *cam, m_viewport.width,
                           m_viewport.height, 0);
                   if (target_id != 0) {
@@ -574,7 +574,7 @@ void GameEngine::set_hover_at_screen(qreal sx, qreal sy) {
 
   m_cursorManager->updateCursorShape(m_window);
 
-  m_hoverTracker->updateHover(float(sx), float(sy), *m_world, *m_camera,
+  m_hoverTracker->update_hover(float(sx), float(sy), *m_world, *m_camera,
                               m_viewport.width, m_viewport.height);
 }
 
@@ -1221,7 +1221,7 @@ void GameEngine::start_skirmish(const QString &map_path,
     m_runtime.loading = true;
 
     if (m_hoverTracker) {
-      m_hoverTracker->updateHover(-1, -1, *m_world, *m_camera, 0, 0);
+      m_hoverTracker->update_hover(-1, -1, *m_world, *m_camera, 0, 0);
     }
 
     m_entityCache.reset();

+ 1 - 1
app/models/hover_tracker.cpp

@@ -19,7 +19,7 @@ auto HoverTracker::updateHover(float sx, float sy, Engine::Core::World &world,
     return 0;
   }
 
-  m_hoveredEntityId = m_pickingService->updateHover(
+  m_hoveredEntityId = m_pickingService->update_hover(
       sx, sy, world, camera, viewportWidth, viewportHeight);
 
   return m_hoveredEntityId;

+ 2 - 2
app/utils/engine_view_helpers.h

@@ -19,7 +19,7 @@ inline auto screen_to_ground(const Game::Systems::PickingService *pickingService
   }
   int const w = (viewportWidth > 0 ? viewportWidth : window->width());
   int const h = (viewportHeight > 0 ? viewportHeight : window->height());
-  return Game::Systems::PickingService::screenToGround(*camera, w, h, screenPt,
+  return Game::Systems::PickingService::screen_to_ground(*camera, w, h, screenPt,
                                                        outWorld);
 }
 
@@ -34,7 +34,7 @@ inline auto world_to_screen(const Game::Systems::PickingService *pickingService,
   }
   int const w = (viewportWidth > 0 ? viewportWidth : window->width());
   int const h = (viewportHeight > 0 ? viewportHeight : window->height());
-  return Game::Systems::PickingService::worldToScreen(*camera, w, h, world,
+  return Game::Systems::PickingService::world_to_screen(*camera, w, h, world,
                                                       outScreen);
 }
 

+ 1 - 1
game/core/system.h

@@ -14,7 +14,7 @@ public:
   auto operator=(const System &) -> System & = default;
   auto operator=(System &&) noexcept -> System & = default;
   virtual ~System() = default;
-  virtual void update(World *world, float deltaTime) = 0;
+  virtual void update(World *world, float delta_time) = 0;
 };
 
 } // namespace Engine::Core

+ 2 - 2
game/core/world.cpp

@@ -62,9 +62,9 @@ void World::addSystem(std::unique_ptr<System> system) {
   m_systems.push_back(std::move(system));
 }
 
-void World::update(float deltaTime) {
+void World::update(float delta_time) {
   for (auto &system : m_systems) {
-    system->update(this, deltaTime);
+    system->update(this, delta_time);
   }
 }
 

+ 1 - 1
game/core/world.h

@@ -26,7 +26,7 @@ public:
   void clear();
 
   void addSystem(std::unique_ptr<System> system);
-  void update(float deltaTime);
+  void update(float delta_time);
 
   auto systems() -> std::vector<std::unique_ptr<System>> & { return m_systems; }
 

+ 1 - 1
game/map/map_transformer.cpp

@@ -44,7 +44,7 @@ void MapTransformer::setLocalOwnerId(int owner_id) {
   owners.setLocalPlayerId(owner_id);
 }
 
-auto MapTransformer::localOwnerId() -> int {
+auto MapTransformer::local_owner_id() -> int {
   auto &owners = Game::Systems::OwnerRegistry::instance();
   return owners.getLocalPlayerId();
 }

+ 1 - 1
game/map/map_transformer.h

@@ -31,7 +31,7 @@ public:
   getFactoryRegistry() -> std::shared_ptr<Game::Units::UnitFactoryRegistry>;
 
   static void setLocalOwnerId(int owner_id);
-  static auto localOwnerId() -> int;
+  static auto local_owner_id() -> int;
 
   static void
   setPlayerTeamOverrides(const std::unordered_map<int, int> &overrides);

+ 4 - 4
game/systems/ai_system.cpp

@@ -68,12 +68,12 @@ void AISystem::initializeAIPlayers() {
 
 AISystem::~AISystem() = default;
 
-void AISystem::update(Engine::Core::World *world, float deltaTime) {
+void AISystem::update(Engine::Core::World *world, float delta_time) {
   if (world == nullptr) {
     return;
   }
 
-  m_totalGameTime += deltaTime;
+  m_totalGameTime += delta_time;
 
   m_commandFilter.update(m_totalGameTime);
 
@@ -81,7 +81,7 @@ void AISystem::update(Engine::Core::World *world, float deltaTime) {
 
   for (auto &ai : m_aiInstances) {
 
-    ai.updateTimer += deltaTime;
+    ai.updateTimer += delta_time;
 
     if (ai.updateTimer < 0.3F) {
       continue;
@@ -98,7 +98,7 @@ void AISystem::update(Engine::Core::World *world, float deltaTime) {
     AI::AIJob job;
     job.snapshot = std::move(snapshot);
     job.context = ai.context;
-    job.deltaTime = ai.updateTimer;
+    job.delta_time = ai.updateTimer;
 
     if (ai.worker->trySubmit(std::move(job))) {
       ai.updateTimer = 0.0F;

+ 1 - 1
game/systems/ai_system.h

@@ -25,7 +25,7 @@ public:
   AISystem();
   ~AISystem() override;
 
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
   void reinitialize();
 

+ 1 - 1
game/systems/ai_system/ai_behavior.h

@@ -11,7 +11,7 @@ public:
   virtual ~AIBehavior() = default;
 
   virtual void execute(const AISnapshot &snapshot, AIContext &context,
-                       float deltaTime,
+                       float delta_time,
                        std::vector<AICommand> &outCommands) = 0;
 
   [[nodiscard]] virtual auto

+ 2 - 2
game/systems/ai_system/ai_executor.cpp

@@ -7,7 +7,7 @@
 namespace Game::Systems::AI {
 
 void AIExecutor::run(const AISnapshot &snapshot, AIContext &context,
-                     float deltaTime, AIBehaviorRegistry &registry,
+                     float delta_time, AIBehaviorRegistry &registry,
                      std::vector<AICommand> &outCommands) {
 
   bool exclusive_behavior_executed = false;
@@ -20,7 +20,7 @@ void AIExecutor::run(const AISnapshot &snapshot, AIContext &context,
     bool const should_exec = behavior.should_execute(snapshot, context);
 
     if (should_exec) {
-      behavior.execute(snapshot, context, deltaTime, outCommands);
+      behavior.execute(snapshot, context, delta_time, outCommands);
 
       if (!behavior.canRunConcurrently()) {
         exclusive_behavior_executed = true;

+ 1 - 1
game/systems/ai_system/ai_executor.h

@@ -15,7 +15,7 @@ public:
   auto operator=(const AIExecutor &) -> AIExecutor & = delete;
 
   static void run(const AISnapshot &snapshot, AIContext &context,
-                  float deltaTime, AIBehaviorRegistry &registry,
+                  float delta_time, AIBehaviorRegistry &registry,
                   std::vector<AICommand> &outCommands);
 };
 

+ 3 - 3
game/systems/ai_system/ai_reasoner.cpp

@@ -165,9 +165,9 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
   }
 }
 
-void AIReasoner::updateStateMachine(AIContext &ctx, float deltaTime) {
-  ctx.stateTimer += deltaTime;
-  ctx.decisionTimer += deltaTime;
+void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
+  ctx.stateTimer += delta_time;
+  ctx.decisionTimer += delta_time;
 
   constexpr float min_state_duration = 3.0F;
 

+ 1 - 1
game/systems/ai_system/ai_reasoner.h

@@ -14,7 +14,7 @@ public:
 
   static void updateContext(const AISnapshot &snapshot, AIContext &ctx);
 
-  static void updateStateMachine(AIContext &ctx, float deltaTime);
+  static void updateStateMachine(AIContext &ctx, float delta_time);
 };
 
 } // namespace Game::Systems::AI

+ 1 - 1
game/systems/ai_system/ai_types.h

@@ -161,7 +161,7 @@ struct AIResult {
 struct AIJob {
   AISnapshot snapshot;
   AIContext context;
-  float deltaTime = 0.0F;
+  float delta_time = 0.0F;
 };
 
 } // namespace Game::Systems::AI

+ 2 - 2
game/systems/ai_system/ai_worker.cpp

@@ -82,9 +82,9 @@ void AIWorker::workerLoop() {
       Game::Systems::AI::AIReasoner::updateContext(job.snapshot,
                                                    result.context);
       Game::Systems::AI::AIReasoner::updateStateMachine(result.context,
-                                                        job.deltaTime);
+                                                        job.delta_time);
       Game::Systems::AI::AIExecutor::run(job.snapshot, result.context,
-                                         job.deltaTime, m_registry,
+                                         job.delta_time, m_registry,
                                          result.commands);
 
       {

+ 4 - 4
game/systems/ai_system/behaviors/attack_behavior.cpp

@@ -11,10 +11,10 @@
 namespace Game::Systems::AI {
 
 void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
-                             float deltaTime,
+                             float delta_time,
                              std::vector<AICommand> &outCommands) {
-  m_attackTimer += deltaTime;
-  m_targetLockDuration += deltaTime;
+  m_attackTimer += delta_time;
+  m_targetLockDuration += delta_time;
 
   if (m_attackTimer < 1.5F) {
     return;
@@ -233,7 +233,7 @@ void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
 
   auto claimed_units = claimUnits(unit_ids, getPriority(), "attacking", context,
-                                  m_attackTimer + deltaTime, 2.5F);
+                                  m_attackTimer + delta_time, 2.5F);
 
   if (claimed_units.empty()) {
     return;

+ 1 - 1
game/systems/ai_system/behaviors/attack_behavior.h

@@ -6,7 +6,7 @@ namespace Game::Systems::AI {
 
 class AttackBehavior : public AIBehavior {
 public:
-  void execute(const AISnapshot &snapshot, AIContext &context, float deltaTime,
+  void execute(const AISnapshot &snapshot, AIContext &context, float delta_time,
                std::vector<AICommand> &outCommands) override;
 
   [[nodiscard]] auto

+ 5 - 5
game/systems/ai_system/behaviors/defend_behavior.cpp

@@ -17,9 +17,9 @@
 namespace Game::Systems::AI {
 
 void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
-                             float deltaTime,
+                             float delta_time,
                              std::vector<AICommand> &outCommands) {
-  m_defendTimer += deltaTime;
+  m_defendTimer += delta_time;
 
   float const update_interval = context.barracksUnderThreat ? 0.5F : 1.5F;
 
@@ -142,7 +142,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
 
         auto claimed_units =
             claimUnits(defender_ids, getPriority(), "defending", context,
-                       m_defendTimer + deltaTime, 3.0F);
+                       m_defendTimer + delta_time, 3.0F);
 
         if (!claimed_units.empty()) {
           AICommand attack;
@@ -186,7 +186,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
 
         auto claimed_units =
             claimUnits(defender_ids, getPriority(), "intercepting", context,
-                       m_defendTimer + deltaTime, 2.0F);
+                       m_defendTimer + delta_time, 2.0F);
 
         if (!claimed_units.empty()) {
 
@@ -272,7 +272,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
 
   auto claimed_for_move =
       claimUnits(units_to_move, BehaviorPriority::Low, "positioning", context,
-                 m_defendTimer + deltaTime, 1.5F);
+                 m_defendTimer + delta_time, 1.5F);
 
   if (claimed_for_move.empty()) {
     return;

+ 1 - 1
game/systems/ai_system/behaviors/defend_behavior.h

@@ -6,7 +6,7 @@ namespace Game::Systems::AI {
 
 class DefendBehavior : public AIBehavior {
 public:
-  void execute(const AISnapshot &snapshot, AIContext &context, float deltaTime,
+  void execute(const AISnapshot &snapshot, AIContext &context, float delta_time,
                std::vector<AICommand> &outCommands) override;
 
   [[nodiscard]] auto

+ 3 - 3
game/systems/ai_system/behaviors/gather_behavior.cpp

@@ -14,9 +14,9 @@
 namespace Game::Systems::AI {
 
 void GatherBehavior::execute(const AISnapshot &snapshot, AIContext &context,
-                             float deltaTime,
+                             float delta_time,
                              std::vector<AICommand> &outCommands) {
-  m_gatherTimer += deltaTime;
+  m_gatherTimer += delta_time;
 
   if (m_gatherTimer < 1.0F) {
     return;
@@ -89,7 +89,7 @@ void GatherBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
 
   auto claimed_units = claimUnits(units_to_move, getPriority(), "gathering",
-                                  context, m_gatherTimer + deltaTime, 2.0F);
+                                  context, m_gatherTimer + delta_time, 2.0F);
 
   if (claimed_units.empty()) {
     return;

+ 1 - 1
game/systems/ai_system/behaviors/gather_behavior.h

@@ -6,7 +6,7 @@ namespace Game::Systems::AI {
 
 class GatherBehavior : public AIBehavior {
 public:
-  void execute(const AISnapshot &snapshot, AIContext &context, float deltaTime,
+  void execute(const AISnapshot &snapshot, AIContext &context, float delta_time,
                std::vector<AICommand> &outCommands) override;
 
   [[nodiscard]] auto

+ 2 - 2
game/systems/ai_system/behaviors/production_behavior.cpp

@@ -9,9 +9,9 @@
 namespace Game::Systems::AI {
 
 void ProductionBehavior::execute(const AISnapshot &snapshot, AIContext &context,
-                                 float deltaTime,
+                                 float delta_time,
                                  std::vector<AICommand> &outCommands) {
-  m_productionTimer += deltaTime;
+  m_productionTimer += delta_time;
   if (m_productionTimer < 1.5F) {
     return;
   }

+ 1 - 1
game/systems/ai_system/behaviors/production_behavior.h

@@ -6,7 +6,7 @@ namespace Game::Systems::AI {
 
 class ProductionBehavior : public AIBehavior {
 public:
-  void execute(const AISnapshot &snapshot, AIContext &context, float deltaTime,
+  void execute(const AISnapshot &snapshot, AIContext &context, float delta_time,
                std::vector<AICommand> &outCommands) override;
 
   [[nodiscard]] auto

+ 3 - 3
game/systems/ai_system/behaviors/retreat_behavior.cpp

@@ -13,9 +13,9 @@
 namespace Game::Systems::AI {
 
 void RetreatBehavior::execute(const AISnapshot &snapshot, AIContext &context,
-                              float deltaTime,
+                              float delta_time,
                               std::vector<AICommand> &outCommands) {
-  m_retreatTimer += deltaTime;
+  m_retreatTimer += delta_time;
   if (m_retreatTimer < 1.0F) {
     return;
   }
@@ -81,7 +81,7 @@ void RetreatBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
 
   auto claimed_units = claimUnits(unit_ids, getPriority(), "retreating",
-                                  context, m_retreatTimer + deltaTime, 1.0F);
+                                  context, m_retreatTimer + delta_time, 1.0F);
 
   if (claimed_units.empty()) {
     return;

+ 1 - 1
game/systems/ai_system/behaviors/retreat_behavior.h

@@ -6,7 +6,7 @@ namespace Game::Systems::AI {
 
 class RetreatBehavior : public AIBehavior {
 public:
-  void execute(const AISnapshot &snapshot, AIContext &context, float deltaTime,
+  void execute(const AISnapshot &snapshot, AIContext &context, float delta_time,
                std::vector<AICommand> &outCommands) override;
 
   [[nodiscard]] auto

+ 2 - 2
game/systems/arrow_system.cpp

@@ -26,13 +26,13 @@ void ArrowSystem::spawnArrow(const QVector3D &start, const QVector3D &end,
   m_arrows.push_back(a);
 }
 
-void ArrowSystem::update(Engine::Core::World *, float deltaTime) {
+void ArrowSystem::update(Engine::Core::World *, float delta_time) {
   for (auto &arrow : m_arrows) {
     if (!arrow.active) {
       continue;
     }
 
-    arrow.t += deltaTime * arrow.speed * arrow.invDist;
+    arrow.t += delta_time * arrow.speed * arrow.invDist;
     if (arrow.t >= 1.0F) {
       arrow.t = 1.0F;
       arrow.active = false;

+ 1 - 1
game/systems/arrow_system.h

@@ -21,7 +21,7 @@ struct ArrowInstance {
 class ArrowSystem : public Engine::Core::System {
 public:
   ArrowSystem();
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
   void spawnArrow(const QVector3D &start, const QVector3D &end,
                   const QVector3D &color, float speed = 8.0F);
   [[nodiscard]] auto arrows() const -> const std::vector<ArrowInstance> & {

+ 8 - 8
game/systems/camera_service.cpp

@@ -22,13 +22,13 @@ CameraService::CameraService()
 CameraService::~CameraService() = default;
 
 void CameraService::move(Render::GL::Camera &camera, float dx, float dz) {
-  float const dist = camera.getDistance();
+  float const dist = camera.get_distance();
   float const scale = std::max(0.12F, dist * 0.05F);
   m_controller->move(camera, dx * scale, dz * scale);
 }
 
 void CameraService::elevate(Render::GL::Camera &camera, float dy) {
-  float const distance = camera.getDistance();
+  float const distance = camera.get_distance();
   float const scale = std::clamp(distance * 0.05F, 0.1F, 5.0F);
   m_controller->moveUp(camera, dy * scale);
 }
@@ -37,8 +37,8 @@ void CameraService::zoom(Render::GL::Camera &camera, float delta) {
   m_controller->zoomDistance(camera, delta);
 }
 
-auto CameraService::getDistance(const Render::GL::Camera &camera) -> float {
-  return camera.getDistance();
+auto CameraService::get_distance(const Render::GL::Camera &camera) -> float {
+  return camera.get_distance();
 }
 
 void CameraService::yaw(Render::GL::Camera &camera, float degrees) {
@@ -71,8 +71,8 @@ void CameraService::followSelection(Render::GL::Camera &camera,
       m_followSystem->snapToSelection(world, *selection_system, camera);
     }
   } else {
-    auto pos = camera.getPosition();
-    auto tgt = camera.getTarget();
+    auto pos = camera.get_position();
+    auto tgt = camera.get_target();
     camera.lookAt(pos, tgt, QVector3D(0, 1, 0));
   }
 }
@@ -83,7 +83,7 @@ void CameraService::setFollowLerp(Render::GL::Camera &camera, float alpha) {
 }
 
 void CameraService::resetCamera(Render::GL::Camera &camera,
-                                Engine::Core::World &world, int localOwnerId,
+                                Engine::Core::World &world, int local_owner_id,
                                 unsigned int playerUnitId) {
   Engine::Core::Entity *focus_entity = nullptr;
   for (auto *e : world.getEntitiesWith<Engine::Core::UnitComponent>()) {
@@ -95,7 +95,7 @@ void CameraService::resetCamera(Render::GL::Camera &camera,
       continue;
     }
     if (u->spawn_type == Game::Units::SpawnType::Barracks &&
-        u->owner_id == localOwnerId && u->health > 0) {
+        u->owner_id == local_owner_id && u->health > 0) {
       focus_entity = e;
       break;
     }

+ 2 - 2
game/systems/camera_service.h

@@ -32,9 +32,9 @@ public:
                        bool enable);
   void setFollowLerp(Render::GL::Camera &camera, float alpha);
   [[nodiscard]] static auto
-  getDistance(const Render::GL::Camera &camera) -> float;
+  get_distance(const Render::GL::Camera &camera) -> float;
   static void resetCamera(Render::GL::Camera &camera,
-                          Engine::Core::World &world, int localOwnerId,
+                          Engine::Core::World &world, int local_owner_id,
                           unsigned int playerUnitId);
   static void snapToEntity(Render::GL::Camera &camera,
                            Engine::Core::Entity &entity);

+ 5 - 5
game/systems/capture_system.cpp

@@ -17,8 +17,8 @@
 
 namespace Game::Systems {
 
-void CaptureSystem::update(Engine::Core::World *world, float deltaTime) {
-  processBarrackCapture(world, deltaTime);
+void CaptureSystem::update(Engine::Core::World *world, float delta_time) {
+  processBarrackCapture(world, delta_time);
 }
 
 auto CaptureSystem::countNearbyTroops(Engine::Core::World *world,
@@ -123,7 +123,7 @@ void CaptureSystem::transferBarrackOwnership(Engine::Core::World *,
 }
 
 void CaptureSystem::processBarrackCapture(Engine::Core::World *world,
-                                          float deltaTime) {
+                                          float delta_time) {
   constexpr float capture_radius = 8.0F;
   constexpr int troop_advantage_multiplier = 3;
 
@@ -191,7 +191,7 @@ void CaptureSystem::processBarrackCapture(Engine::Core::World *world,
       }
 
       capture->is_being_captured = true;
-      capture->capture_progress += deltaTime;
+      capture->capture_progress += delta_time;
 
       if (capture->capture_progress >= capture->required_time) {
         transferBarrackOwnership(world, barrack, capturing_player_id);
@@ -201,7 +201,7 @@ void CaptureSystem::processBarrackCapture(Engine::Core::World *world,
       }
     } else {
       if (capture->is_being_captured) {
-        capture->capture_progress -= deltaTime * 2.0F;
+        capture->capture_progress -= delta_time * 2.0F;
         if (capture->capture_progress <= 0.0F) {
           capture->capture_progress = 0.0F;
           capture->is_being_captured = false;

+ 2 - 2
game/systems/capture_system.h

@@ -11,11 +11,11 @@ namespace Game::Systems {
 
 class CaptureSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
   static void processBarrackCapture(Engine::Core::World *world,
-                                    float deltaTime);
+                                    float delta_time);
   static auto countNearbyTroops(Engine::Core::World *world, float barrack_x,
                                 float barrack_z, int owner_id,
                                 float radius) -> int;

+ 1 - 1
game/systems/cleanup_system.h

@@ -7,7 +7,7 @@ namespace Game::Systems {
 
 class CleanupSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
   static void removeDeadEntities(Engine::Core::World *world);

+ 15 - 15
game/systems/combat_system.cpp

@@ -19,12 +19,12 @@
 
 namespace Game::Systems {
 
-void CombatSystem::update(Engine::Core::World *world, float deltaTime) {
-  processAttacks(world, deltaTime);
-  processAutoEngagement(world, deltaTime);
+void CombatSystem::update(Engine::Core::World *world, float delta_time) {
+  processAttacks(world, delta_time);
+  processAutoEngagement(world, delta_time);
 }
 
-void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
+void CombatSystem::processAttacks(Engine::Core::World *world, float delta_time) {
   auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
 
   auto *arrow_sys = world->getSystem<ArrowSystem>();
@@ -78,7 +78,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
 
             if (dist > max_melee_separation) {
               float const pull_amount =
-                  (dist - ideal_melee_distance) * 0.3F * deltaTime * 5.0F;
+                  (dist - ideal_melee_distance) * 0.3F * delta_time * 5.0F;
 
               if (dist > 0.001F) {
                 QVector3D const direction(dx / dist, 0.0F, dz / dist);
@@ -139,10 +139,10 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
         }
       }
 
-      attacker_atk->time_since_last += deltaTime;
+      attacker_atk->time_since_last += delta_time;
       t_accum = &attacker_atk->time_since_last;
     } else {
-      tmp_accum += deltaTime;
+      tmp_accum += delta_time;
       t_accum = &tmp_accum;
     }
 
@@ -168,7 +168,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
         if ((target_unit != nullptr) && target_unit->health > 0 &&
             target_unit->owner_id != attacker_unit->owner_id && !is_ally) {
 
-          if (isInRange(attacker, target, range)) {
+          if (is_in_range(attacker, target, range)) {
             best_target = target;
 
             bool is_ranged_unit = false;
@@ -214,7 +214,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
             auto *hold_mode =
                 attacker->getComponent<Engine::Core::HoldModeComponent>();
             if ((hold_mode != nullptr) && hold_mode->active) {
-              if (!isInRange(attacker, target, range)) {
+              if (!is_in_range(attacker, target, range)) {
                 attacker
                     ->removeComponent<Engine::Core::AttackTargetComponent>();
               }
@@ -228,7 +228,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
               is_ranged_unit = true;
             }
 
-            bool const currently_in_range = isInRange(attacker, target, range);
+            bool const currently_in_range = is_in_range(attacker, target, range);
 
             if (is_ranged_unit && currently_in_range) {
               auto *movement =
@@ -352,7 +352,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
                 }
               }
 
-              if (isInRange(attacker, target, range)) {
+              if (is_in_range(attacker, target, range)) {
                 best_target = target;
               }
             }
@@ -397,7 +397,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
           continue;
         }
 
-        if (isInRange(attacker, target, range)) {
+        if (is_in_range(attacker, target, range)) {
           best_target = target;
           break;
         }
@@ -572,7 +572,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float deltaTime) {
   }
 }
 
-auto CombatSystem::isInRange(Engine::Core::Entity *attacker,
+auto CombatSystem::is_in_range(Engine::Core::Entity *attacker,
                              Engine::Core::Entity *target,
                              float range) -> bool {
   auto *attacker_transform =
@@ -799,12 +799,12 @@ void CombatSystem::updateCombatMode(
 }
 
 void CombatSystem::processAutoEngagement(Engine::Core::World *world,
-                                         float deltaTime) {
+                                         float delta_time) {
   auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
 
   for (auto it = m_engagementCooldowns.begin();
        it != m_engagementCooldowns.end();) {
-    it->second -= deltaTime;
+    it->second -= delta_time;
     if (it->second <= 0.0F) {
       it = m_engagementCooldowns.erase(it);
     } else {

+ 4 - 4
game/systems/combat_system.h

@@ -12,19 +12,19 @@ namespace Game::Systems {
 
 class CombatSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
-  static void processAttacks(Engine::Core::World *world, float deltaTime);
+  static void processAttacks(Engine::Core::World *world, float delta_time);
   static void updateCombatMode(Engine::Core::Entity *attacker,
                                Engine::Core::World *world,
                                Engine::Core::AttackComponent *attack_comp);
-  static auto isInRange(Engine::Core::Entity *attacker,
+  static auto is_in_range(Engine::Core::Entity *attacker,
                         Engine::Core::Entity *target, float range) -> bool;
   static void dealDamage(Engine::Core::World *world,
                          Engine::Core::Entity *target, int damage,
                          Engine::Core::EntityID attackerId = 0);
-  void processAutoEngagement(Engine::Core::World *world, float deltaTime);
+  void processAutoEngagement(Engine::Core::World *world, float delta_time);
   static auto isUnitIdle(Engine::Core::Entity *unit) -> bool;
   static auto findNearestEnemy(Engine::Core::Entity *unit,
                                Engine::Core::World *world,

+ 13 - 13
game/systems/game_state_serializer.cpp

@@ -19,7 +19,7 @@ auto GameStateSerializer::buildMetadata(
   metadata["map_path"] = level.map_path;
   metadata["map_name"] = level.map_name;
   metadata["max_troops_per_player"] = level.max_troops_per_player;
-  metadata["localOwnerId"] = runtime.localOwnerId;
+  metadata["local_owner_id"] = runtime.local_owner_id;
   metadata["playerUnitId"] = static_cast<qint64>(level.playerUnitId);
 
   metadata["gameMaxTroopsPerPlayer"] =
@@ -35,9 +35,9 @@ auto GameStateSerializer::buildMetadata(
   if (camera != nullptr) {
     QJsonObject camera_obj;
     camera_obj["position"] =
-        App::JsonUtils::vec3ToJsonArray(camera->getPosition());
-    camera_obj["target"] = App::JsonUtils::vec3ToJsonArray(camera->getTarget());
-    camera_obj["distance"] = camera->getDistance();
+        App::JsonUtils::vec3ToJsonArray(camera->get_position());
+    camera_obj["target"] = App::JsonUtils::vec3ToJsonArray(camera->get_target());
+    camera_obj["distance"] = camera->get_distance();
     camera_obj["pitch_deg"] = camera->getPitchDeg();
     camera_obj["fov"] = camera->getFOV();
     camera_obj["near"] = camera->getNear();
@@ -59,17 +59,17 @@ auto GameStateSerializer::buildMetadata(
 
 void GameStateSerializer::restoreCameraFromMetadata(const QJsonObject &metadata,
                                                     Render::GL::Camera *camera,
-                                                    int viewportWidth,
-                                                    int viewportHeight) {
+                                                    int viewport_width,
+                                                    int viewport_height) {
   if (!metadata.contains("camera") || (camera == nullptr)) {
     return;
   }
 
   const auto camera_obj = metadata.value("camera").toObject();
   const QVector3D position = App::JsonUtils::jsonArrayToVec3(
-      camera_obj.value("position"), camera->getPosition());
+      camera_obj.value("position"), camera->get_position());
   const QVector3D target = App::JsonUtils::jsonArrayToVec3(
-      camera_obj.value("target"), camera->getTarget());
+      camera_obj.value("target"), camera->get_target());
   camera->lookAt(position, target, QVector3D(0.0F, 1.0F, 0.0F));
 
   const float near_plane =
@@ -80,8 +80,8 @@ void GameStateSerializer::restoreCameraFromMetadata(const QJsonObject &metadata,
       static_cast<float>(camera_obj.value("fov").toDouble(camera->getFOV()));
 
   float aspect = camera->getAspect();
-  if (viewportHeight > 0) {
-    aspect = float(viewportWidth) / float(std::max(1, viewportHeight));
+  if (viewport_height > 0) {
+    aspect = float(viewport_width) / float(std::max(1, viewport_height));
   }
   camera->setPerspective(fov, aspect, near_plane, far_plane);
 }
@@ -113,9 +113,9 @@ void GameStateSerializer::restoreRuntimeFromMetadata(
     }
   }
 
-  if (metadata.contains("localOwnerId")) {
-    runtime.localOwnerId =
-        metadata.value("localOwnerId").toInt(runtime.localOwnerId);
+  if (metadata.contains("local_owner_id")) {
+    runtime.local_owner_id =
+        metadata.value("local_owner_id").toInt(runtime.local_owner_id);
   }
 
   runtime.selectedPlayerId =

+ 2 - 2
game/systems/game_state_serializer.h

@@ -29,7 +29,7 @@ struct LevelSnapshot {
 struct RuntimeSnapshot {
   bool paused = false;
   float timeScale = 1.0F;
-  int localOwnerId = 1;
+  int local_owner_id = 1;
   QString victoryState = "";
   int cursorMode = 0;
   int selectedPlayerId = 1;
@@ -45,7 +45,7 @@ public:
 
   static void restoreCameraFromMetadata(const QJsonObject &metadata,
                                         Render::GL::Camera *camera,
-                                        int viewportWidth, int viewportHeight);
+                                        int viewport_width, int viewport_height);
 
   static void restoreRuntimeFromMetadata(const QJsonObject &metadata,
                                          RuntimeSnapshot &runtime);

+ 4 - 4
game/systems/healing_system.cpp

@@ -8,12 +8,12 @@
 
 namespace Game::Systems {
 
-void HealingSystem::update(Engine::Core::World *world, float deltaTime) {
-  processHealing(world, deltaTime);
+void HealingSystem::update(Engine::Core::World *world, float delta_time) {
+  processHealing(world, delta_time);
 }
 
 void HealingSystem::processHealing(Engine::Core::World *world,
-                                   float deltaTime) {
+                                   float delta_time) {
   auto healers = world->getEntitiesWith<Engine::Core::HealerComponent>();
   auto *arrow_system = world->getSystem<ArrowSystem>();
 
@@ -36,7 +36,7 @@ void HealingSystem::processHealing(Engine::Core::World *world,
       continue;
     }
 
-    healer_comp->timeSinceLastHeal += deltaTime;
+    healer_comp->timeSinceLastHeal += delta_time;
 
     if (healer_comp->timeSinceLastHeal < healer_comp->healing_cooldown) {
       continue;

+ 2 - 2
game/systems/healing_system.h

@@ -10,10 +10,10 @@ namespace Game::Systems {
 
 class HealingSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
-  void processHealing(Engine::Core::World *world, float deltaTime);
+  void processHealing(Engine::Core::World *world, float delta_time);
 };
 
 } // namespace Game::Systems

+ 22 - 22
game/systems/movement_system.cpp

@@ -86,17 +86,17 @@ auto isSegmentWalkable(const QVector3D &from, const QVector3D &to,
 
 } // namespace
 
-void MovementSystem::update(Engine::Core::World *world, float deltaTime) {
+void MovementSystem::update(Engine::Core::World *world, float delta_time) {
   CommandService::processPathResults(*world);
   auto entities = world->getEntitiesWith<Engine::Core::MovementComponent>();
 
   for (auto *entity : entities) {
-    moveUnit(entity, world, deltaTime);
+    move_unit(entity, world, delta_time);
   }
 }
 
-void MovementSystem::moveUnit(Engine::Core::Entity *entity,
-                              Engine::Core::World *world, float deltaTime) {
+void MovementSystem::move_unit(Engine::Core::Entity *entity,
+                              Engine::Core::World *world, float delta_time) {
   auto *transform = entity->getComponent<Engine::Core::TransformComponent>();
   auto *movement = entity->getComponent<Engine::Core::MovementComponent>();
   auto *unit = entity->getComponent<Engine::Core::UnitComponent>();
@@ -115,7 +115,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
   if (hold_mode != nullptr) {
     if (hold_mode->exitCooldown > 0.0F) {
       hold_mode->exitCooldown =
-          std::max(0.0F, hold_mode->exitCooldown - deltaTime);
+          std::max(0.0F, hold_mode->exitCooldown - delta_time);
     }
 
     if (hold_mode->active) {
@@ -144,7 +144,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
             std::fmod((target_yaw - current + 540.0F), 360.0F) - 180.0F;
         float const turn_speed = 180.0F;
         float const step =
-            std::clamp(diff, -turn_speed * deltaTime, turn_speed * deltaTime);
+            std::clamp(diff, -turn_speed * delta_time, turn_speed * delta_time);
         transform->rotation.y = current + step;
 
         if (std::fabs(diff) < 0.5F) {
@@ -181,11 +181,11 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
 
   if (movement->repath_cooldown > 0.0F) {
     movement->repath_cooldown =
-        std::max(0.0F, movement->repath_cooldown - deltaTime);
+        std::max(0.0F, movement->repath_cooldown - delta_time);
   }
 
   if (movement->time_since_last_path_request < 10.0F) {
-    movement->time_since_last_path_request += deltaTime;
+    movement->time_since_last_path_request += delta_time;
   }
 
   const float max_speed = std::max(0.1F, unit->speed);
@@ -213,8 +213,8 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
     }
 
     if (!requested_recovery_move) {
-      movement->vx *= std::max(0.0F, 1.0F - damping * deltaTime);
-      movement->vz *= std::max(0.0F, 1.0F - damping * deltaTime);
+      movement->vx *= std::max(0.0F, 1.0F - damping * delta_time);
+      movement->vz *= std::max(0.0F, 1.0F - damping * delta_time);
     }
   } else {
     QVector3D current_pos(transform->position.x, 0.0F, transform->position.z);
@@ -291,7 +291,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
     }
 
     float const arrive_radius =
-        std::clamp(max_speed * deltaTime * 2.0F, 0.05F, 0.25F);
+        std::clamp(max_speed * delta_time * 2.0F, 0.05F, 0.25F);
     float const arrive_radius_sq = arrive_radius * arrive_radius;
 
     float dx = movement->target_x - transform->position.x;
@@ -321,8 +321,8 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
     }
 
     if (!movement->has_target) {
-      movement->vx *= std::max(0.0F, 1.0F - damping * deltaTime);
-      movement->vz *= std::max(0.0F, 1.0F - damping * deltaTime);
+      movement->vx *= std::max(0.0F, 1.0F - damping * delta_time);
+      movement->vz *= std::max(0.0F, 1.0F - damping * delta_time);
     } else {
       float const distance = std::sqrt(std::max(dist2, 0.0F));
       float const nx = dx / std::max(0.0001F, distance);
@@ -337,16 +337,16 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
 
       float const ax = (desired_vx - movement->vx) * accel;
       float const az = (desired_vz - movement->vz) * accel;
-      movement->vx += ax * deltaTime;
-      movement->vz += az * deltaTime;
+      movement->vx += ax * delta_time;
+      movement->vz += az * delta_time;
 
-      movement->vx *= std::max(0.0F, 1.0F - 0.5F * damping * deltaTime);
-      movement->vz *= std::max(0.0F, 1.0F - 0.5F * damping * deltaTime);
+      movement->vx *= std::max(0.0F, 1.0F - 0.5F * damping * delta_time);
+      movement->vz *= std::max(0.0F, 1.0F - 0.5F * damping * delta_time);
     }
   }
 
-  transform->position.x += movement->vx * deltaTime;
-  transform->position.z += movement->vz * deltaTime;
+  transform->position.x += movement->vx * delta_time;
+  transform->position.z += movement->vz * delta_time;
 
   auto &terrain = Game::Map::TerrainService::instance();
   if (terrain.isInitialized()) {
@@ -381,7 +381,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
           std::fmod((target_yaw - current + 540.0F), 360.0F) - 180.0F;
       float const turn_speed = 720.0F;
       float const step =
-          std::clamp(diff, -turn_speed * deltaTime, turn_speed * deltaTime);
+          std::clamp(diff, -turn_speed * delta_time, turn_speed * delta_time);
       transform->rotation.y = current + step;
     } else if (transform->has_desired_yaw) {
 
@@ -391,7 +391,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
           std::fmod((target_yaw - current + 540.0F), 360.0F) - 180.0F;
       float const turn_speed = 180.0F;
       float const step =
-          std::clamp(diff, -turn_speed * deltaTime, turn_speed * deltaTime);
+          std::clamp(diff, -turn_speed * delta_time, turn_speed * delta_time);
       transform->rotation.y = current + step;
 
       if (std::fabs(diff) < 0.5F) {
@@ -401,7 +401,7 @@ void MovementSystem::moveUnit(Engine::Core::Entity *entity,
   }
 }
 
-auto MovementSystem::hasReachedTarget(
+auto MovementSystem::has_reached_target(
     const Engine::Core::TransformComponent *transform,
     const Engine::Core::MovementComponent *movement) -> bool {
   float const dx = movement->target_x - transform->position.x;

+ 4 - 4
game/systems/movement_system.h

@@ -12,13 +12,13 @@ namespace Game::Systems {
 
 class MovementSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
-  static void moveUnit(Engine::Core::Entity *entity, Engine::Core::World *world,
-                       float deltaTime);
+  static void move_unit(Engine::Core::Entity *entity, Engine::Core::World *world,
+                       float delta_time);
   static auto
-  hasReachedTarget(const Engine::Core::TransformComponent *transform,
+  has_reached_target(const Engine::Core::TransformComponent *transform,
                    const Engine::Core::MovementComponent *movement) -> bool;
 };
 

+ 1 - 1
game/systems/patrol_system.h

@@ -9,7 +9,7 @@ public:
   PatrolSystem() = default;
   ~PatrolSystem() override = default;
 
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 };
 
 } // namespace Game::Systems

+ 37 - 37
game/systems/picking_service.cpp

@@ -11,25 +11,25 @@
 
 namespace Game::Systems {
 
-auto PickingService::worldToScreen(const Render::GL::Camera &cam, int viewW,
-                                   int viewH, const QVector3D &world,
+auto PickingService::world_to_screen(const Render::GL::Camera &cam, int view_w,
+                                   int view_h, const QVector3D &world,
                                    QPointF &out) -> bool {
-  return cam.worldToScreen(world, qreal(viewW), qreal(viewH), out);
+  return cam.world_to_screen(world, qreal(view_w), qreal(view_h), out);
 }
 
-auto PickingService::screenToGround(const Render::GL::Camera &cam, int viewW,
-                                    int viewH, const QPointF &screenPt,
-                                    QVector3D &outWorld) -> bool {
-  if (viewW <= 0 || viewH <= 0) {
+auto PickingService::screen_to_ground(const Render::GL::Camera &cam, int view_w,
+                                    int view_h, const QPointF &screen_pt,
+                                    QVector3D &out_world) -> bool {
+  if (view_w <= 0 || view_h <= 0) {
     return false;
   }
-  return cam.screenToGround(screenPt.x(), screenPt.y(), qreal(viewW),
-                            qreal(viewH), outWorld);
+  return cam.screen_to_ground(screen_pt.x(), screen_pt.y(), qreal(view_w),
+                            qreal(view_h), out_world);
 }
 
 auto PickingService::projectBounds(const Render::GL::Camera &cam,
                                    const QVector3D &center, float hx, float hz,
-                                   int viewW, int viewH, QRectF &out) -> bool {
+                                   int view_w, int view_h, QRectF &out) -> bool {
   QVector3D const corners[4] = {
       QVector3D(center.x() - hx, center.y(), center.z() - hz),
       QVector3D(center.x() + hx, center.y(), center.z() - hz),
@@ -37,7 +37,7 @@ auto PickingService::projectBounds(const Render::GL::Camera &cam,
       QVector3D(center.x() - hx, center.y(), center.z() + hz)};
   QPointF screen_pts[4];
   for (int i = 0; i < 4; ++i) {
-    if (!worldToScreen(cam, viewW, viewH, corners[i], screen_pts[i])) {
+    if (!world_to_screen(cam, view_w, view_h, corners[i], screen_pts[i])) {
       return false;
     }
   }
@@ -55,17 +55,17 @@ auto PickingService::projectBounds(const Render::GL::Camera &cam,
   return true;
 }
 
-auto PickingService::updateHover(float sx, float sy, Engine::Core::World &world,
-                                 const Render::GL::Camera &camera, int viewW,
-                                 int viewH) -> Engine::Core::EntityID {
-  if (sx < 0 || sy < 0 || sx >= viewW || sy >= viewH) {
+auto PickingService::update_hover(float sx, float sy, Engine::Core::World &world,
+                                 const Render::GL::Camera &camera, int view_w,
+                                 int view_h) -> Engine::Core::EntityID {
+  if (sx < 0 || sy < 0 || sx >= view_w || sy >= view_h) {
     m_prev_hoverId = 0;
     return 0;
   }
   auto prev_hover = m_prev_hoverId;
 
   Engine::Core::EntityID const picked =
-      pickSingle(sx, sy, world, camera, viewW, viewH, 0, false);
+      pick_single(sx, sy, world, camera, view_w, view_h, 0, false);
 
   if (picked != 0 && picked != prev_hover) {
     m_hoverGraceTicks = 6;
@@ -84,10 +84,10 @@ auto PickingService::updateHover(float sx, float sy, Engine::Core::World &world,
   return current_hover;
 }
 
-auto PickingService::pickSingle(
+auto PickingService::pick_single(
     float sx, float sy, Engine::Core::World &world,
-    const Render::GL::Camera &camera, int viewW, int viewH, int ownerFilter,
-    bool preferBuildingsFirst) -> Engine::Core::EntityID {
+    const Render::GL::Camera &camera, int view_w, int view_h, int owner_filter,
+    bool prefer_buildings_first) -> Engine::Core::EntityID {
 
   const float base_unit_pick_radius = 30.0F;
   const float base_building_pick_radius = 30.0F;
@@ -103,14 +103,14 @@ auto PickingService::pickSingle(
     auto *t = e->getComponent<Engine::Core::TransformComponent>();
     auto *u = e->getComponent<Engine::Core::UnitComponent>();
 
-    if (ownerFilter != 0 && u->owner_id != ownerFilter) {
+    if (owner_filter != 0 && u->owner_id != owner_filter) {
       continue;
     }
 
     QPointF sp;
-    if (!camera.worldToScreen(
-            QVector3D(t->position.x, t->position.y, t->position.z), viewW,
-            viewH, sp)) {
+    if (!camera.world_to_screen(
+            QVector3D(t->position.x, t->position.y, t->position.z), view_w,
+            view_h, sp)) {
       continue;
     }
     auto const dx = float(sx - sp.x());
@@ -127,7 +127,7 @@ auto PickingService::pickSingle(
       QPointF pts[8];
       int ok_count = 0;
       auto project = [&](const QVector3D &w, QPointF &out) {
-        return camera.worldToScreen(w, viewW, viewH, out);
+        return camera.world_to_screen(w, view_w, view_h, out);
       };
       ok_count += static_cast<int>(
           project(QVector3D(t->position.x - hx, t->position.y + 0.0F,
@@ -194,7 +194,7 @@ auto PickingService::pickSingle(
       }
     }
   }
-  if (preferBuildingsFirst) {
+  if (prefer_buildings_first) {
     if ((best_building_id != 0U) &&
         ((best_unit_id == 0U) || best_building_dist2 <= best_unit_dist2)) {
       return best_building_id;
@@ -213,24 +213,24 @@ auto PickingService::pickSingle(
   return 0;
 }
 
-auto PickingService::pickUnitFirst(float sx, float sy,
+auto PickingService::pick_unit_first(float sx, float sy,
                                    Engine::Core::World &world,
-                                   const Render::GL::Camera &camera, int viewW,
-                                   int viewH,
-                                   int ownerFilter) -> Engine::Core::EntityID {
+                                   const Render::GL::Camera &camera, int view_w,
+                                   int view_h,
+                                   int owner_filter) -> Engine::Core::EntityID {
 
-  auto id = pickSingle(sx, sy, world, camera, viewW, viewH, ownerFilter, false);
+  auto id = pick_single(sx, sy, world, camera, view_w, view_h, owner_filter, false);
   if (id != 0) {
     return id;
   }
 
-  return pickSingle(sx, sy, world, camera, viewW, viewH, ownerFilter, true);
+  return pick_single(sx, sy, world, camera, view_w, view_h, owner_filter, true);
 }
 
 auto PickingService::pickInRect(
     float x1, float y1, float x2, float y2, Engine::Core::World &world,
-    const Render::GL::Camera &camera, int viewW, int viewH,
-    int ownerFilter) -> std::vector<Engine::Core::EntityID> {
+    const Render::GL::Camera &camera, int view_w, int view_h,
+    int owner_filter) -> std::vector<Engine::Core::EntityID> {
   float const min_x = std::min(x1, x2);
   float const max_x = std::max(x1, x2);
   float const min_y = std::min(y1, y2);
@@ -245,14 +245,14 @@ auto PickingService::pickInRect(
       continue;
     }
     auto *u = e->getComponent<Engine::Core::UnitComponent>();
-    if ((u == nullptr) || u->owner_id != ownerFilter) {
+    if ((u == nullptr) || u->owner_id != owner_filter) {
       continue;
     }
     auto *t = e->getComponent<Engine::Core::TransformComponent>();
     QPointF sp;
-    if (!camera.worldToScreen(
-            QVector3D(t->position.x, t->position.y, t->position.z), viewW,
-            viewH, sp)) {
+    if (!camera.world_to_screen(
+            QVector3D(t->position.x, t->position.y, t->position.z), view_w,
+            view_h, sp)) {
       continue;
     }
     if (sp.x() >= min_x && sp.x() <= max_x && sp.y() >= min_y &&

+ 25 - 25
game/systems/picking_service.h

@@ -21,43 +21,43 @@ class PickingService {
 public:
   PickingService() = default;
 
-  auto updateHover(float sx, float sy, Engine::Core::World &world,
-                   const Render::GL::Camera &camera, int viewW,
-                   int viewH) -> Engine::Core::EntityID;
-
-  static auto screenToGround(const Render::GL::Camera &camera, int viewW,
-                             int viewH, const QPointF &screenPt,
-                             QVector3D &outWorld) -> bool;
-  static auto screenToGround(const QPointF &screenPt,
-                             const Render::GL::Camera &camera, int viewW,
-                             int viewH, QVector3D &outWorld) -> bool {
-    return screenToGround(camera, viewW, viewH, screenPt, outWorld);
+  auto update_hover(float sx, float sy, Engine::Core::World &world,
+                   const Render::GL::Camera &camera, int view_w,
+                   int view_h) -> Engine::Core::EntityID;
+
+  static auto screen_to_ground(const Render::GL::Camera &camera, int view_w,
+                             int view_h, const QPointF &screen_pt,
+                             QVector3D &out_world) -> bool;
+  static auto screen_to_ground(const QPointF &screen_pt,
+                             const Render::GL::Camera &camera, int view_w,
+                             int view_h, QVector3D &out_world) -> bool {
+    return screen_to_ground(camera, view_w, view_h, screen_pt, out_world);
   }
-  static auto worldToScreen(const Render::GL::Camera &camera, int viewW,
-                            int viewH, const QVector3D &world,
-                            QPointF &outScreen) -> bool;
+  static auto world_to_screen(const Render::GL::Camera &camera, int view_w,
+                            int view_h, const QVector3D &world,
+                            QPointF &out_screen) -> bool;
 
-  static auto pickSingle(float sx, float sy, Engine::Core::World &world,
-                         const Render::GL::Camera &camera, int viewW, int viewH,
-                         int ownerFilter,
-                         bool preferBuildingsFirst) -> Engine::Core::EntityID;
+  static auto pick_single(float sx, float sy, Engine::Core::World &world,
+                         const Render::GL::Camera &camera, int view_w, int view_h,
+                         int owner_filter,
+                         bool prefer_buildings_first) -> Engine::Core::EntityID;
 
-  static auto pickUnitFirst(float sx, float sy, Engine::Core::World &world,
-                            const Render::GL::Camera &camera, int viewW,
-                            int viewH,
-                            int ownerFilter) -> Engine::Core::EntityID;
+  static auto pick_unit_first(float sx, float sy, Engine::Core::World &world,
+                            const Render::GL::Camera &camera, int view_w,
+                            int view_h,
+                            int owner_filter) -> Engine::Core::EntityID;
 
   static auto
   pickInRect(float x1, float y1, float x2, float y2, Engine::Core::World &world,
-             const Render::GL::Camera &camera, int viewW, int viewH,
-             int ownerFilter) -> std::vector<Engine::Core::EntityID>;
+             const Render::GL::Camera &camera, int view_w, int view_h,
+             int owner_filter) -> std::vector<Engine::Core::EntityID>;
 
 private:
   Engine::Core::EntityID m_prev_hoverId = 0;
   int m_hoverGraceTicks = 0;
   static auto projectBounds(const Render::GL::Camera &cam,
                             const QVector3D &center, float hx, float hz,
-                            int viewW, int viewH, QRectF &out) -> bool;
+                            int view_w, int view_h, QRectF &out) -> bool;
 };
 
 } // namespace Game::Systems

+ 2 - 2
game/systems/production_system.cpp

@@ -40,7 +40,7 @@ auto resolve_nation_id(const Engine::Core::UnitComponent *unit,
 
 } // namespace
 
-void ProductionSystem::update(Engine::Core::World *world, float deltaTime) {
+void ProductionSystem::update(Engine::Core::World *world, float delta_time) {
   if (world == nullptr) {
     return;
   }
@@ -71,7 +71,7 @@ void ProductionSystem::update(Engine::Core::World *world, float deltaTime) {
       prod->in_progress = false;
       continue;
     }
-    prod->time_remaining -= deltaTime;
+    prod->time_remaining -= delta_time;
     if (prod->time_remaining <= 0.0F) {
 
       auto *t = e->getComponent<Engine::Core::TransformComponent>();

+ 1 - 1
game/systems/production_system.h

@@ -6,7 +6,7 @@ namespace Game::Systems {
 
 class ProductionSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 };
 
 } // namespace Game::Systems

+ 4 - 4
game/systems/save_storage.cpp

@@ -91,7 +91,7 @@ SaveStorage::SaveStorage(QString database_path)
       m_connection_name(buildConnectionName(this)) {}
 
 SaveStorage::~SaveStorage() {
-  if (m_database.isValid()) {
+  if (m_database.is_valid()) {
     if (m_database.isOpen()) {
       m_database.close();
     }
@@ -102,7 +102,7 @@ SaveStorage::~SaveStorage() {
 }
 
 auto SaveStorage::initialize(QString *out_error) -> bool {
-  if (m_initialized && m_database.isValid() && m_database.isOpen()) {
+  if (m_initialized && m_database.is_valid() && m_database.isOpen()) {
     return true;
   }
   if (!open(out_error)) {
@@ -427,11 +427,11 @@ auto SaveStorage::deleteSlot(const QString &slotName,
 }
 
 auto SaveStorage::open(QString *out_error) const -> bool {
-  if (m_database.isValid() && m_database.isOpen()) {
+  if (m_database.is_valid() && m_database.isOpen()) {
     return true;
   }
 
-  if (!m_database.isValid()) {
+  if (!m_database.is_valid()) {
     m_database = QSqlDatabase::addDatabase(k_driver_name, m_connection_name);
     m_database.setDatabaseName(m_database_path);
     m_database.setConnectOptions(QStringLiteral("QSQLITE_BUSY_TIMEOUT=5000"));

+ 1 - 1
game/systems/terrain_alignment_system.h

@@ -10,7 +10,7 @@ namespace Game::Systems {
 
 class TerrainAlignmentSystem : public Engine::Core::System {
 public:
-  void update(Engine::Core::World *world, float deltaTime) override;
+  void update(Engine::Core::World *world, float delta_time) override;
 
 private:
   static void alignEntityToTerrain(Engine::Core::Entity *entity);

+ 5 - 5
game/systems/victory_service.cpp

@@ -40,10 +40,10 @@ void VictoryService::reset() {
 }
 
 void VictoryService::configure(const Game::Map::VictoryConfig &config,
-                               int localOwnerId) {
+                               int local_owner_id) {
   reset();
 
-  m_localOwnerId = localOwnerId;
+  m_localOwnerId = local_owner_id;
 
   if (config.victoryType == "elimination") {
     m_victoryType = VictoryType::Elimination;
@@ -72,7 +72,7 @@ void VictoryService::configure(const Game::Map::VictoryConfig &config,
   m_startupDelay = k_startup_delay_seconds;
 }
 
-void VictoryService::update(Engine::Core::World &world, float deltaTime) {
+void VictoryService::update(Engine::Core::World &world, float delta_time) {
   if (!m_victoryState.isEmpty()) {
     return;
   }
@@ -80,12 +80,12 @@ void VictoryService::update(Engine::Core::World &world, float deltaTime) {
   m_worldPtr = &world;
 
   if (m_startupDelay > 0.0F) {
-    m_startupDelay = std::max(0.0F, m_startupDelay - deltaTime);
+    m_startupDelay = std::max(0.0F, m_startupDelay - delta_time);
     return;
   }
 
   if (m_victoryType == VictoryType::SurviveTime) {
-    m_elapsedTime += deltaTime;
+    m_elapsedTime += delta_time;
   }
 
   checkVictoryConditions(world);

+ 2 - 2
game/systems/victory_service.h

@@ -29,11 +29,11 @@ public:
   VictoryService();
   ~VictoryService();
 
-  void configure(const Game::Map::VictoryConfig &config, int localOwnerId);
+  void configure(const Game::Map::VictoryConfig &config, int local_owner_id);
 
   void reset();
 
-  void update(Engine::Core::World &world, float deltaTime);
+  void update(Engine::Core::World &world, float delta_time);
 
   [[nodiscard]] auto getVictoryState() const -> QString {
     return m_victoryState;

+ 1 - 1
game/units/unit.cpp

@@ -76,7 +76,7 @@ void Unit::moveTo(float x, float z) {
   }
 }
 
-auto Unit::isAlive() const -> bool {
+auto Unit::is_alive() const -> bool {
   if (auto *e = entity()) {
     if (auto *u = e->getComponent<Engine::Core::UnitComponent>()) {
       return u->health > 0;

+ 1 - 1
game/units/unit.h

@@ -41,7 +41,7 @@ public:
   }
 
   void moveTo(float x, float z);
-  [[nodiscard]] auto isAlive() const -> bool;
+  [[nodiscard]] auto is_alive() const -> bool;
   [[nodiscard]] auto position() const -> QVector3D;
 
   void setHoldMode(bool enabled);