Browse Source

Merge pull request #511 from djeada/copilot/convert-methods-to-snake-case

Convert methods and variables to snake_case in game module
Adam Djellouli 3 days ago
parent
commit
09fe5dae4a
100 changed files with 823 additions and 805 deletions
  1. 1 1
      README.md
  2. 1 1
      app/controllers/action_vfx.cpp
  3. 64 64
      app/core/game_engine.cpp
  4. 4 4
      app/core/game_engine.h
  5. 7 7
      game/core/serialization.cpp
  6. 4 3
      game/core/world.cpp
  7. 59 59
      game/game_config.h
  8. 2 2
      game/map/environment.cpp
  9. 10 9
      game/map/level_loader.cpp
  10. 14 14
      game/map/map_catalog.cpp
  11. 5 5
      game/map/map_catalog.h
  12. 13 12
      game/map/map_transformer.cpp
  13. 1 1
      game/map/map_transformer.h
  14. 1 1
      game/map/minimap/minimap_generator.cpp
  15. 67 66
      game/map/skirmish_loader.cpp
  16. 19 19
      game/map/skirmish_loader.h
  17. 17 17
      game/map/terrain_service.cpp
  18. 23 23
      game/map/terrain_service.h
  19. 1 1
      game/map/visibility_service.cpp
  20. 1 1
      game/map/visibility_service.h
  21. 12 12
      game/systems/ai_system.cpp
  22. 3 3
      game/systems/ai_system.h
  23. 1 1
      game/systems/ai_system/ai_command_applier.cpp
  24. 53 50
      game/systems/ai_system/ai_reasoner.cpp
  25. 2 2
      game/systems/ai_system/ai_snapshot_builder.cpp
  26. 23 23
      game/systems/ai_system/ai_tactical.cpp
  27. 12 12
      game/systems/ai_system/ai_tactical.h
  28. 17 17
      game/systems/ai_system/ai_types.h
  29. 4 4
      game/systems/ai_system/ai_utils.h
  30. 7 7
      game/systems/ai_system/behaviors/attack_behavior.cpp
  31. 10 10
      game/systems/ai_system/behaviors/defend_behavior.cpp
  32. 4 4
      game/systems/ai_system/behaviors/gather_behavior.cpp
  33. 4 4
      game/systems/ai_system/behaviors/production_behavior.cpp
  34. 4 3
      game/systems/ai_system/behaviors/retreat_behavior.cpp
  35. 2 2
      game/systems/arrow_system.cpp
  36. 8 8
      game/systems/building_collision_registry.cpp
  37. 7 6
      game/systems/building_collision_registry.h
  38. 5 4
      game/systems/camera_controller.cpp
  39. 2 2
      game/systems/camera_controller.h
  40. 6 6
      game/systems/camera_service.cpp
  41. 1 1
      game/systems/camera_service.h
  42. 3 2
      game/systems/capture_system.cpp
  43. 16 16
      game/systems/combat_system.cpp
  44. 4 4
      game/systems/combat_system.h
  45. 2 2
      game/systems/formation_system.cpp
  46. 4 4
      game/systems/formation_system.h
  47. 4 4
      game/systems/game_state_serializer.cpp
  48. 1 1
      game/systems/global_stats_registry.cpp
  49. 3 3
      game/systems/healing_system.cpp
  50. 1 1
      game/systems/healing_system.h
  51. 4 4
      game/systems/movement_system.cpp
  52. 8 7
      game/systems/nation_registry.cpp
  53. 6 6
      game/systems/nation_registry.h
  54. 64 61
      game/systems/owner_registry.cpp
  55. 25 25
      game/systems/owner_registry.h
  56. 3 3
      game/systems/pathfinding.cpp
  57. 4 4
      game/systems/picking_service.cpp
  58. 1 1
      game/systems/picking_service.h
  59. 3 2
      game/systems/production_service.cpp
  60. 3 3
      game/systems/production_system.cpp
  61. 6 6
      game/systems/projectile_system.cpp
  62. 7 7
      game/systems/save_load_service.cpp
  63. 7 7
      game/systems/save_load_service.h
  64. 6 6
      game/systems/save_storage.cpp
  65. 4 4
      game/systems/save_storage.h
  66. 2 2
      game/systems/terrain_alignment_system.cpp
  67. 1 1
      game/systems/troop_count_registry.cpp
  68. 1 1
      game/systems/troop_count_registry.h
  69. 1 1
      game/systems/troop_profile_service.cpp
  70. 25 24
      game/systems/victory_service.cpp
  71. 8 8
      game/systems/victory_service.h
  72. 1 1
      game/units/barracks.cpp
  73. 1 1
      game/units/spawn_type.h
  74. 3 3
      game/units/unit.cpp
  75. 3 3
      game/units/unit.h
  76. 1 1
      game/visuals/team_colors.h
  77. 2 2
      game/visuals/visual_catalog.cpp
  78. 2 2
      game/visuals/visual_catalog.h
  79. 1 1
      render/gl/backend.cpp
  80. 1 1
      render/gl/backend/README.md
  81. 2 2
      render/gl/backend/character_pipeline.cpp
  82. 1 1
      render/gl/backend/character_pipeline.h
  83. 1 1
      render/gl/backend/cylinder_pipeline.h
  84. 2 2
      render/gl/backend/effects_pipeline.cpp
  85. 1 1
      render/gl/backend/effects_pipeline.h
  86. 1 1
      render/gl/backend/pipeline_interface.h
  87. 1 1
      render/gl/backend/primitive_batch_pipeline.h
  88. 2 2
      render/gl/backend/terrain_pipeline.cpp
  89. 1 1
      render/gl/backend/terrain_pipeline.h
  90. 1 1
      render/gl/backend/vegetation_pipeline.h
  91. 2 2
      render/gl/backend/water_pipeline.cpp
  92. 1 1
      render/gl/backend/water_pipeline.h
  93. 1 1
      render/gl/camera.cpp
  94. 1 1
      render/gl/camera.h
  95. 21 20
      render/ground/biome_renderer.cpp
  96. 2 2
      render/ground/biome_renderer.h
  97. 1 1
      render/ground/bridge_renderer.cpp
  98. 5 5
      render/ground/firecamp_renderer.cpp
  99. 2 2
      render/ground/firecamp_renderer.h
  100. 31 31
      render/ground/ground_renderer.cpp

+ 1 - 1
README.md

@@ -437,7 +437,7 @@ This roadmap replaces the single nation template with a scalable civilization la
 ### Phase 3 — Multi-Nation Support
 ### Phase 3 — Multi-Nation Support
 - Author Roman and Carthaginian JSON definitions with differentiated stats, formations, and renderer ids; set the default nation in `NationRegistry` to one of them.
 - Author Roman and Carthaginian JSON definitions with differentiated stats, formations, and renderer ids; set the default nation in `NationRegistry` to one of them.
 - Rename the shared melee infantry profile to `Swordsman` so nations can share core assets while still tuning stats in their override files.
 - Rename the shared melee infantry profile to `Swordsman` so nations can share core assets while still tuning stats in their override files.
-- Audit gameplay systems (AI build orders, UI panels, tutorials) to resolve troop data via `NationRegistry::getNationForPlayer` instead of assuming Kingdom of Iron.
+- Audit gameplay systems (AI build orders, UI panels, tutorials) to resolve troop data via `NationRegistry::get_nation_for_player` instead of assuming Kingdom of Iron.
 - Register renderer variants (e.g., `render/entity/roman_archer_renderer.cpp`) keyed by the profile’s renderer id, with graceful fallbacks to baseline assets.
 - Register renderer variants (e.g., `render/entity/roman_archer_renderer.cpp`) keyed by the profile’s renderer id, with graceful fallbacks to baseline assets.
 - Add hooks for balance levers (passive modifiers, tech prerequisites) inside `NationTroopVariant` so future expansions require data changes rather than engine rewrites.
 - Add hooks for balance levers (passive modifiers, tech prerequisites) inside `NationTroopVariant` so future expansions require data changes rather than engine rewrites.
 
 

+ 1 - 1
app/controllers/action_vfx.cpp

@@ -37,7 +37,7 @@ void ActionVFX::spawnAttackArrow(Engine::Core::World *world,
 
 
   arrow_system->spawnArrow(above_target, target_pos,
   arrow_system->spawnArrow(above_target, target_pos,
                            QVector3D(1.0F, 0.2F, 0.2F),
                            QVector3D(1.0F, 0.2F, 0.2F),
-                           Game::GameConfig::instance().arrow().speedAttack);
+                           Game::GameConfig::instance().arrow().speed_attack);
 }
 }
 
 
 } // namespace App::Controllers
 } // namespace App::Controllers

+ 64 - 64
app/core/game_engine.cpp

@@ -125,7 +125,7 @@ GameEngine::GameEngine(QObject *parent)
     : QObject(parent),
     : QObject(parent),
       m_selectedUnitsModel(new SelectedUnitsModel(this, this)) {
       m_selectedUnitsModel(new SelectedUnitsModel(this, this)) {
 
 
-  Game::Systems::NationRegistry::instance().initializeDefaults();
+  Game::Systems::NationRegistry::instance().initialize_defaults();
   Game::Systems::TroopCountRegistry::instance().initialize();
   Game::Systems::TroopCountRegistry::instance().initialize();
   Game::Systems::GlobalStatsRegistry::instance().initialize();
   Game::Systems::GlobalStatsRegistry::instance().initialize();
 
 
@@ -195,17 +195,17 @@ GameEngine::GameEngine(QObject *parent)
   m_hoverTracker = std::make_unique<HoverTracker>(m_pickingService.get());
   m_hoverTracker = std::make_unique<HoverTracker>(m_pickingService.get());
 
 
   m_mapCatalog = std::make_unique<Game::Map::MapCatalog>(this);
   m_mapCatalog = std::make_unique<Game::Map::MapCatalog>(this);
-  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::mapLoaded, this,
+  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::map_loaded, this,
           [this](const QVariantMap &mapData) {
           [this](const QVariantMap &mapData) {
             m_available_maps.append(mapData);
             m_available_maps.append(mapData);
             emit available_maps_changed();
             emit available_maps_changed();
           });
           });
-  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::loadingChanged, this,
+  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::loading_changed, this,
           [this](bool loading) {
           [this](bool loading) {
             m_maps_loading = loading;
             m_maps_loading = loading;
             emit maps_loading_changed();
             emit maps_loading_changed();
           });
           });
-  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::allMapsLoaded, this,
+  connect(m_mapCatalog.get(), &Game::Map::MapCatalog::all_maps_loaded, this,
           [this]() { emit available_maps_changed(); });
           [this]() { emit available_maps_changed(); });
 
 
   if (AudioSystem::getInstance().initialize()) {
   if (AudioSystem::getInstance().initialize()) {
@@ -432,7 +432,7 @@ void GameEngine::on_right_click(qreal sx, qreal sy) {
                                            hit)) {
                                            hit)) {
       auto targets = Game::Systems::FormationPlanner::spreadFormation(
       auto targets = Game::Systems::FormationPlanner::spreadFormation(
           int(sel.size()), hit,
           int(sel.size()), hit,
-          Game::GameConfig::instance().gameplay().formationSpacingDefault);
+          Game::GameConfig::instance().gameplay().formation_spacing_default);
       Game::Systems::CommandService::MoveOptions opts;
       Game::Systems::CommandService::MoveOptions opts;
       opts.group_move = sel.size() > 1;
       opts.group_move = sel.size() > 1;
       Game::Systems::CommandService::moveUnits(*m_world, sel, targets, opts);
       Game::Systems::CommandService::moveUnits(*m_world, sel, targets, opts);
@@ -703,7 +703,7 @@ void GameEngine::update(float dt) {
     m_world->update(dt);
     m_world->update(dt);
 
 
     auto &visibility_service = Game::Map::VisibilityService::instance();
     auto &visibility_service = Game::Map::VisibilityService::instance();
-    if (visibility_service.isInitialized()) {
+    if (visibility_service.is_initialized()) {
 
 
       m_runtime.visibilityUpdateAccumulator += dt;
       m_runtime.visibilityUpdateAccumulator += dt;
       const float visibility_update_interval =
       const float visibility_update_interval =
@@ -936,7 +936,7 @@ void GameEngine::camera_set_follow_lerp(float alpha) {
     return;
     return;
   }
   }
 
 
-  m_cameraService->setFollowLerp(*m_camera, alpha);
+  m_cameraService->set_follow_lerp(*m_camera, alpha);
 }
 }
 
 
 auto GameEngine::selected_units_model() -> QAbstractItemModel * {
 auto GameEngine::selected_units_model() -> QAbstractItemModel * {
@@ -1102,7 +1102,7 @@ void GameEngine::set_rally_at_screen(qreal sx, qreal sy) {
 void GameEngine::start_loading_maps() {
 void GameEngine::start_loading_maps() {
   m_available_maps.clear();
   m_available_maps.clear();
   if (m_mapCatalog) {
   if (m_mapCatalog) {
-    m_mapCatalog->loadMapsAsync();
+    m_mapCatalog->load_maps_async();
   }
   }
   load_campaigns();
   load_campaigns();
 }
 }
@@ -1114,7 +1114,7 @@ auto GameEngine::available_maps() const -> QVariantList {
 auto GameEngine::available_nations() const -> QVariantList {
 auto GameEngine::available_nations() const -> QVariantList {
   QVariantList nations;
   QVariantList nations;
   const auto &registry = Game::Systems::NationRegistry::instance();
   const auto &registry = Game::Systems::NationRegistry::instance();
-  const auto &all = registry.getAllNations();
+  const auto &all = registry.get_all_nations();
   QList<QVariantMap> ordered;
   QList<QVariantMap> ordered;
   ordered.reserve(static_cast<int>(all.size()));
   ordered.reserve(static_cast<int>(all.size()));
   for (const auto &nation : all) {
   for (const auto &nation : all) {
@@ -1271,34 +1271,34 @@ void GameEngine::start_skirmish(const QString &map_path,
     m_entityCache.reset();
     m_entityCache.reset();
 
 
     Game::Map::SkirmishLoader loader(*m_world, *m_renderer, *m_camera);
     Game::Map::SkirmishLoader loader(*m_world, *m_renderer, *m_camera);
-    loader.setGroundRenderer(m_ground.get());
-    loader.setTerrainRenderer(m_terrain.get());
-    loader.setBiomeRenderer(m_biome.get());
-    loader.setRiverRenderer(m_river.get());
-    loader.setRoadRenderer(m_road.get());
-    loader.setRiverbankRenderer(m_riverbank.get());
-    loader.setBridgeRenderer(m_bridge.get());
-    loader.setFogRenderer(m_fog.get());
-    loader.setStoneRenderer(m_stone.get());
-    loader.setPlantRenderer(m_plant.get());
-    loader.setPineRenderer(m_pine.get());
-    loader.setOliveRenderer(m_olive.get());
-    loader.setFireCampRenderer(m_firecamp.get());
-
-    loader.setOnOwnersUpdated([this]() { emit owner_info_changed(); });
-
-    loader.setOnVisibilityMaskReady([this]() {
+    loader.set_ground_renderer(m_ground.get());
+    loader.set_terrain_renderer(m_terrain.get());
+    loader.set_biome_renderer(m_biome.get());
+    loader.set_river_renderer(m_river.get());
+    loader.set_road_renderer(m_road.get());
+    loader.set_riverbank_renderer(m_riverbank.get());
+    loader.set_bridge_renderer(m_bridge.get());
+    loader.set_fog_renderer(m_fog.get());
+    loader.set_stone_renderer(m_stone.get());
+    loader.set_plant_renderer(m_plant.get());
+    loader.set_pine_renderer(m_pine.get());
+    loader.set_olive_renderer(m_olive.get());
+    loader.set_fire_camp_renderer(m_firecamp.get());
+
+    loader.set_on_owners_updated([this]() { emit owner_info_changed(); });
+
+    loader.set_on_visibility_mask_ready([this]() {
       m_runtime.visibilityVersion =
       m_runtime.visibilityVersion =
           Game::Map::VisibilityService::instance().version();
           Game::Map::VisibilityService::instance().version();
       m_runtime.visibilityUpdateAccumulator = 0.0F;
       m_runtime.visibilityUpdateAccumulator = 0.0F;
     });
     });
 
 
-    int updated_player_id = m_selectedPlayerId;
-    auto result = loader.start(map_path, playerConfigs, m_selectedPlayerId,
+    int updated_player_id = m_selected_player_id;
+    auto result = loader.start(map_path, playerConfigs, m_selected_player_id,
                                updated_player_id);
                                updated_player_id);
 
 
-    if (updated_player_id != m_selectedPlayerId) {
-      m_selectedPlayerId = updated_player_id;
+    if (updated_player_id != m_selected_player_id) {
+      m_selected_player_id = updated_player_id;
       emit selected_player_id_changed();
       emit selected_player_id_changed();
     }
     }
 
 
@@ -1314,7 +1314,7 @@ void GameEngine::start_skirmish(const QString &map_path,
     m_level.cam_far = result.cam_far;
     m_level.cam_far = result.cam_far;
     m_level.max_troops_per_player = result.max_troops_per_player;
     m_level.max_troops_per_player = result.max_troops_per_player;
 
 
-    Game::GameConfig::instance().setMaxTroopsPerPlayer(
+    Game::GameConfig::instance().set_max_troops_per_player(
         result.max_troops_per_player);
         result.max_troops_per_player);
 
 
     if (m_victoryService) {
     if (m_victoryService) {
@@ -1332,10 +1332,10 @@ void GameEngine::start_skirmish(const QString &map_path,
       });
       });
     }
     }
 
 
-    if (result.hasFocusPosition && m_camera) {
+    if (result.has_focus_position && m_camera) {
       const auto &cam_config = Game::GameConfig::instance().camera();
       const auto &cam_config = Game::GameConfig::instance().camera();
-      m_camera->setRTSView(result.focusPosition, cam_config.defaultDistance,
-                           cam_config.defaultPitch, cam_config.defaultYaw);
+      m_camera->setRTSView(result.focusPosition, cam_config.default_distance,
+                           cam_config.default_pitch, cam_config.default_yaw);
     }
     }
 
 
     Game::Map::MapDefinition map_def;
     Game::Map::MapDefinition map_def;
@@ -1361,7 +1361,7 @@ void GameEngine::start_skirmish(const QString &map_path,
     stats_registry.rebuild_from_world(*m_world);
     stats_registry.rebuild_from_world(*m_world);
 
 
     auto &owner_registry = Game::Systems::OwnerRegistry::instance();
     auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-    const auto &all_owners = owner_registry.getAllOwners();
+    const auto &all_owners = owner_registry.get_all_owners();
     for (const auto &owner : all_owners) {
     for (const auto &owner : all_owners) {
       if (owner.type == Game::Systems::OwnerType::Player ||
       if (owner.type == Game::Systems::OwnerType::Player ||
           owner.type == Game::Systems::OwnerType::AI) {
           owner.type == Game::Systems::OwnerType::AI) {
@@ -1409,7 +1409,7 @@ auto GameEngine::load_from_slot(const QString &slot) -> bool {
 
 
   m_runtime.loading = true;
   m_runtime.loading = true;
 
 
-  if (!m_saveLoadService->loadGameFromSlot(*m_world, slot)) {
+  if (!m_saveLoadService->load_game_from_slot(*m_world, slot)) {
     set_error(m_saveLoadService->getLastError());
     set_error(m_saveLoadService->getLastError());
     m_runtime.loading = false;
     m_runtime.loading = false;
     return false;
     return false;
@@ -1480,7 +1480,7 @@ auto GameEngine::get_save_slots() const -> QVariantList {
     return {};
     return {};
   }
   }
 
 
-  return m_saveLoadService->getSaveSlots();
+  return m_saveLoadService->get_save_slots();
 }
 }
 
 
 void GameEngine::refresh_save_slots() { emit save_slots_changed(); }
 void GameEngine::refresh_save_slots() { emit save_slots_changed(); }
@@ -1513,7 +1513,7 @@ void GameEngine::exit_game() {
 auto GameEngine::get_owner_info() const -> QVariantList {
 auto GameEngine::get_owner_info() const -> QVariantList {
   QVariantList result;
   QVariantList result;
   const auto &owner_registry = Game::Systems::OwnerRegistry::instance();
   const auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-  const auto &owners = owner_registry.getAllOwners();
+  const auto &owners = owner_registry.get_all_owners();
 
 
   for (const auto &owner : owners) {
   for (const auto &owner : owners) {
     QVariantMap owner_map;
     QVariantMap owner_map;
@@ -1590,7 +1590,7 @@ void GameEngine::on_unit_spawned(const Engine::Core::UnitSpawnedEvent &event) {
               event.spawn_type);
               event.spawn_type);
       m_entityCache.playerTroopCount += production_cost;
       m_entityCache.playerTroopCount += production_cost;
     }
     }
-  } else if (owners.isAI(event.owner_id)) {
+  } else if (owners.is_ai(event.owner_id)) {
     if (event.spawn_type == Game::Units::SpawnType::Barracks) {
     if (event.spawn_type == Game::Units::SpawnType::Barracks) {
       m_entityCache.enemyBarracksCount++;
       m_entityCache.enemyBarracksCount++;
       m_entityCache.enemyBarracksAlive = true;
       m_entityCache.enemyBarracksAlive = true;
@@ -1620,7 +1620,7 @@ void GameEngine::on_unit_died(const Engine::Core::UnitDiedEvent &event) {
       m_entityCache.playerTroopCount =
       m_entityCache.playerTroopCount =
           std::max(0, m_entityCache.playerTroopCount);
           std::max(0, m_entityCache.playerTroopCount);
     }
     }
-  } else if (owners.isAI(event.owner_id)) {
+  } else if (owners.is_ai(event.owner_id)) {
     if (event.spawn_type == Game::Units::SpawnType::Barracks) {
     if (event.spawn_type == Game::Units::SpawnType::Barracks) {
       m_entityCache.enemyBarracksCount--;
       m_entityCache.enemyBarracksCount--;
       m_entityCache.enemyBarracksCount =
       m_entityCache.enemyBarracksCount =
@@ -1665,7 +1665,7 @@ void GameEngine::rebuild_entity_cache() {
                 unit->spawn_type);
                 unit->spawn_type);
         m_entityCache.playerTroopCount += production_cost;
         m_entityCache.playerTroopCount += production_cost;
       }
       }
-    } else if (owners.isAI(unit->owner_id)) {
+    } else if (owners.is_ai(unit->owner_id)) {
       if (unit->spawn_type == Game::Units::SpawnType::Barracks) {
       if (unit->spawn_type == Game::Units::SpawnType::Barracks) {
         m_entityCache.enemyBarracksCount++;
         m_entityCache.enemyBarracksCount++;
         m_entityCache.enemyBarracksAlive = true;
         m_entityCache.enemyBarracksAlive = true;
@@ -1688,7 +1688,7 @@ void GameEngine::rebuild_registries_after_load() {
   }
   }
 
 
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-  m_runtime.local_owner_id = owner_registry.getLocalPlayerId();
+  m_runtime.local_owner_id = owner_registry.get_local_player_id();
 
 
   auto &troops = Game::Systems::TroopCountRegistry::instance();
   auto &troops = Game::Systems::TroopCountRegistry::instance();
   troops.rebuild_from_world(*m_world);
   troops.rebuild_from_world(*m_world);
@@ -1696,7 +1696,7 @@ void GameEngine::rebuild_registries_after_load() {
   auto &stats_registry = Game::Systems::GlobalStatsRegistry::instance();
   auto &stats_registry = Game::Systems::GlobalStatsRegistry::instance();
   stats_registry.rebuild_from_world(*m_world);
   stats_registry.rebuild_from_world(*m_world);
 
 
-  const auto &all_owners = owner_registry.getAllOwners();
+  const auto &all_owners = owner_registry.get_all_owners();
   for (const auto &owner : all_owners) {
   for (const auto &owner : all_owners) {
     if (owner.type == Game::Systems::OwnerType::Player ||
     if (owner.type == Game::Systems::OwnerType::Player ||
         owner.type == Game::Systems::OwnerType::AI) {
         owner.type == Game::Systems::OwnerType::AI) {
@@ -1719,8 +1719,8 @@ void GameEngine::rebuild_registries_after_load() {
     }
     }
   }
   }
 
 
-  if (m_selectedPlayerId != m_runtime.local_owner_id) {
-    m_selectedPlayerId = m_runtime.local_owner_id;
+  if (m_selected_player_id != m_runtime.local_owner_id) {
+    m_selected_player_id = m_runtime.local_owner_id;
     emit selected_player_id_changed();
     emit selected_player_id_changed();
   }
   }
 }
 }
@@ -1741,7 +1741,7 @@ void GameEngine::rebuild_building_collisions() {
       continue;
       continue;
     }
     }
 
 
-    registry.registerBuilding(
+    registry.register_building(
         entity->get_id(), Game::Units::spawn_typeToString(unit->spawn_type),
         entity->get_id(), Game::Units::spawn_typeToString(unit->spawn_type),
         transform->position.x, transform->position.z, unit->owner_id);
         transform->position.x, transform->position.z, unit->owner_id);
   }
   }
@@ -1754,7 +1754,7 @@ auto GameEngine::to_runtime_snapshot() const -> Game::Systems::RuntimeSnapshot {
   snap.local_owner_id = m_runtime.local_owner_id;
   snap.local_owner_id = m_runtime.local_owner_id;
   snap.victory_state = m_runtime.victory_state;
   snap.victory_state = m_runtime.victory_state;
   snap.cursor_mode = CursorModeUtils::toInt(m_runtime.cursor_mode);
   snap.cursor_mode = CursorModeUtils::toInt(m_runtime.cursor_mode);
-  snap.selected_player_id = m_selectedPlayerId;
+  snap.selected_player_id = m_selected_player_id;
   snap.follow_selection = m_followSelectionEnabled;
   snap.follow_selection = m_followSelectionEnabled;
   return snap;
   return snap;
 }
 }
@@ -1772,8 +1772,8 @@ void GameEngine::apply_runtime_snapshot(
 
 
   set_cursor_mode(CursorModeUtils::fromInt(snapshot.cursor_mode));
   set_cursor_mode(CursorModeUtils::fromInt(snapshot.cursor_mode));
 
 
-  if (snapshot.selected_player_id != m_selectedPlayerId) {
-    m_selectedPlayerId = snapshot.selected_player_id;
+  if (snapshot.selected_player_id != m_selected_player_id) {
+    m_selected_player_id = snapshot.selected_player_id;
     emit selected_player_id_changed();
     emit selected_player_id_changed();
   }
   }
 
 
@@ -1826,7 +1826,7 @@ void GameEngine::restore_environment_from_metadata(
 
 
   auto &terrain_service = Game::Map::TerrainService::instance();
   auto &terrain_service = Game::Map::TerrainService::instance();
 
 
-  bool const terrain_already_restored = terrain_service.isInitialized();
+  bool const terrain_already_restored = terrain_service.is_initialized();
 
 
   Game::Map::MapDefinition def;
   Game::Map::MapDefinition def;
   QString map_error;
   QString map_error;
@@ -1864,8 +1864,8 @@ void GameEngine::restore_environment_from_metadata(
     }
     }
   }
   }
 
 
-  if (terrain_service.isInitialized()) {
-    const auto *height_map = terrain_service.getHeightMap();
+  if (terrain_service.is_initialized()) {
+    const auto *height_map = terrain_service.get_height_map();
     const int grid_width =
     const int grid_width =
         (height_map != nullptr) ? height_map->getWidth() : fallback_grid_width;
         (height_map != nullptr) ? height_map->getWidth() : fallback_grid_width;
     const int grid_height = (height_map != nullptr) ? height_map->getHeight()
     const int grid_height = (height_map != nullptr) ? height_map->getHeight()
@@ -1875,12 +1875,12 @@ void GameEngine::restore_environment_from_metadata(
 
 
     if (m_ground) {
     if (m_ground) {
       m_ground->configure(tile_size, grid_width, grid_height);
       m_ground->configure(tile_size, grid_width, grid_height);
-      m_ground->setBiome(terrain_service.biomeSettings());
+      m_ground->setBiome(terrain_service.biome_settings());
     }
     }
 
 
     if (height_map != nullptr) {
     if (height_map != nullptr) {
       if (m_terrain) {
       if (m_terrain) {
-        m_terrain->configure(*height_map, terrain_service.biomeSettings());
+        m_terrain->configure(*height_map, terrain_service.biome_settings());
       }
       }
       if (m_river) {
       if (m_river) {
         m_river->configure(height_map->getRiverSegments(),
         m_river->configure(height_map->getRiverSegments(),
@@ -1898,23 +1898,23 @@ void GameEngine::restore_environment_from_metadata(
                             height_map->getTileSize());
                             height_map->getTileSize());
       }
       }
       if (m_biome) {
       if (m_biome) {
-        m_biome->configure(*height_map, terrain_service.biomeSettings());
+        m_biome->configure(*height_map, terrain_service.biome_settings());
         m_biome->refreshGrass();
         m_biome->refreshGrass();
       }
       }
       if (m_stone) {
       if (m_stone) {
-        m_stone->configure(*height_map, terrain_service.biomeSettings());
+        m_stone->configure(*height_map, terrain_service.biome_settings());
       }
       }
       if (m_plant) {
       if (m_plant) {
-        m_plant->configure(*height_map, terrain_service.biomeSettings());
+        m_plant->configure(*height_map, terrain_service.biome_settings());
       }
       }
       if (m_pine) {
       if (m_pine) {
-        m_pine->configure(*height_map, terrain_service.biomeSettings());
+        m_pine->configure(*height_map, terrain_service.biome_settings());
       }
       }
       if (m_olive) {
       if (m_olive) {
-        m_olive->configure(*height_map, terrain_service.biomeSettings());
+        m_olive->configure(*height_map, terrain_service.biome_settings());
       }
       }
       if (m_firecamp) {
       if (m_firecamp) {
-        m_firecamp->configure(*height_map, terrain_service.biomeSettings());
+        m_firecamp->configure(*height_map, terrain_service.biome_settings());
       }
       }
     }
     }
 
 
@@ -1924,7 +1924,7 @@ void GameEngine::restore_environment_from_metadata(
     visibility_service.initialize(grid_width, grid_height, tile_size);
     visibility_service.initialize(grid_width, grid_height, tile_size);
     visibility_service.computeImmediate(*m_world, m_runtime.local_owner_id);
     visibility_service.computeImmediate(*m_world, m_runtime.local_owner_id);
 
 
-    if (m_fog && visibility_service.isInitialized()) {
+    if (m_fog && visibility_service.is_initialized()) {
       m_fog->updateMask(
       m_fog->updateMask(
           visibility_service.getWidth(), visibility_service.getHeight(),
           visibility_service.getWidth(), visibility_service.getHeight(),
           visibility_service.getTileSize(), visibility_service.snapshotCells());
           visibility_service.getTileSize(), visibility_service.snapshotCells());
@@ -1956,7 +1956,7 @@ void GameEngine::restore_environment_from_metadata(
     visibility_service.initialize(fallback_grid_width, fallback_grid_height,
     visibility_service.initialize(fallback_grid_width, fallback_grid_height,
                                   fallback_tile_size);
                                   fallback_tile_size);
     visibility_service.computeImmediate(*m_world, m_runtime.local_owner_id);
     visibility_service.computeImmediate(*m_world, m_runtime.local_owner_id);
-    if (m_fog && visibility_service.isInitialized()) {
+    if (m_fog && visibility_service.is_initialized()) {
       m_fog->updateMask(
       m_fog->updateMask(
           visibility_service.getWidth(), visibility_service.getHeight(),
           visibility_service.getWidth(), visibility_service.getHeight(),
           visibility_service.getTileSize(), visibility_service.snapshotCells());
           visibility_service.getTileSize(), visibility_service.snapshotCells());
@@ -2197,7 +2197,7 @@ void GameEngine::update_minimap_fog(float dt) {
   m_minimap_update_timer = 0.0F;
   m_minimap_update_timer = 0.0F;
 
 
   auto &visibility_service = Game::Map::VisibilityService::instance();
   auto &visibility_service = Game::Map::VisibilityService::instance();
-  if (!visibility_service.isInitialized()) {
+  if (!visibility_service.is_initialized()) {
 
 
     if (m_minimap_image != m_minimap_base_image) {
     if (m_minimap_image != m_minimap_base_image) {
       m_minimap_image = m_minimap_base_image;
       m_minimap_image = m_minimap_base_image;
@@ -2358,7 +2358,7 @@ void GameEngine::update_minimap_units() {
       marker.world_z = transform->position.z;
       marker.world_z = transform->position.z;
       marker.owner_id = unit->owner_id;
       marker.owner_id = unit->owner_id;
       marker.is_selected = selected_ids.count(entity_id) > 0;
       marker.is_selected = selected_ids.count(entity_id) > 0;
-      marker.is_building = Game::Units::isBuildingSpawn(unit->spawn_type);
+      marker.is_building = Game::Units::is_building_spawn(unit->spawn_type);
 
 
       markers.push_back(marker);
       markers.push_back(marker);
     }
     }

+ 4 - 4
app/core/game_engine.h

@@ -173,10 +173,10 @@ public:
 
 
   Q_INVOKABLE [[nodiscard]] static QVariantMap get_player_stats(int owner_id);
   Q_INVOKABLE [[nodiscard]] static QVariantMap get_player_stats(int owner_id);
 
 
-  [[nodiscard]] int selected_player_id() const { return m_selectedPlayerId; }
+  [[nodiscard]] int selected_player_id() const { return m_selected_player_id; }
   void set_selected_player_id(int id) {
   void set_selected_player_id(int id) {
-    if (m_selectedPlayerId != id) {
-      m_selectedPlayerId = id;
+    if (m_selected_player_id != id) {
+      m_selected_player_id = id;
       emit selected_player_id_changed();
       emit selected_player_id_changed();
     }
     }
   }
   }
@@ -332,7 +332,7 @@ private:
   Game::Systems::LevelSnapshot m_level;
   Game::Systems::LevelSnapshot m_level;
   SelectedUnitsModel *m_selectedUnitsModel = nullptr;
   SelectedUnitsModel *m_selectedUnitsModel = nullptr;
   int m_enemyTroopsDefeated = 0;
   int m_enemyTroopsDefeated = 0;
-  int m_selectedPlayerId = 1;
+  int m_selected_player_id = 1;
   QVariantList m_available_maps;
   QVariantList m_available_maps;
   QVariantList m_available_campaigns;
   QVariantList m_available_campaigns;
   bool m_maps_loading = false;
   bool m_maps_loading = false;

+ 7 - 7
game/core/serialization.cpp

@@ -789,13 +789,13 @@ auto Serialization::serializeWorld(const World *world) -> QJsonDocument {
   world_obj["nextEntityId"] = static_cast<qint64>(world->get_next_entity_id());
   world_obj["nextEntityId"] = static_cast<qint64>(world->get_next_entity_id());
   world_obj["schemaVersion"] = 1;
   world_obj["schemaVersion"] = 1;
   world_obj["owner_registry"] =
   world_obj["owner_registry"] =
-      Game::Systems::OwnerRegistry::instance().toJson();
+      Game::Systems::OwnerRegistry::instance().to_json();
 
 
   const auto &terrain_service = Game::Map::TerrainService::instance();
   const auto &terrain_service = Game::Map::TerrainService::instance();
-  if (terrain_service.isInitialized() &&
-      (terrain_service.getHeightMap() != nullptr)) {
-    world_obj["terrain"] = serializeTerrain(terrain_service.getHeightMap(),
-                                            terrain_service.biomeSettings(),
+  if (terrain_service.is_initialized() &&
+      (terrain_service.get_height_map() != nullptr)) {
+    world_obj["terrain"] = serializeTerrain(terrain_service.get_height_map(),
+                                            terrain_service.biome_settings(),
                                             terrain_service.road_segments());
                                             terrain_service.road_segments());
   }
   }
 
 
@@ -824,7 +824,7 @@ void Serialization::deserializeWorld(World *world, const QJsonDocument &doc) {
   }
   }
 
 
   if (world_obj.contains("owner_registry")) {
   if (world_obj.contains("owner_registry")) {
-    Game::Systems::OwnerRegistry::instance().fromJson(
+    Game::Systems::OwnerRegistry::instance().from_json(
         world_obj["owner_registry"].toObject());
         world_obj["owner_registry"].toObject());
   }
   }
 
 
@@ -847,7 +847,7 @@ void Serialization::deserializeWorld(World *world, const QJsonDocument &doc) {
     deserializeTerrain(temp_height_map.get(), biome, roads, terrain_obj);
     deserializeTerrain(temp_height_map.get(), biome, roads, terrain_obj);
 
 
     auto &terrain_service = Game::Map::TerrainService::instance();
     auto &terrain_service = Game::Map::TerrainService::instance();
-    terrain_service.restoreFromSerialized(
+    terrain_service.restore_from_serialized(
         width, height, tile_size, temp_height_map->getHeightData(),
         width, height, tile_size, temp_height_map->getHeightData(),
         temp_height_map->getTerrainTypes(), temp_height_map->getRiverSegments(),
         temp_height_map->getTerrainTypes(), temp_height_map->getRiverSegments(),
         roads, temp_height_map->getBridges(), biome);
         roads, temp_height_map->getBridges(), biome);

+ 4 - 3
game/core/world.cpp

@@ -114,7 +114,7 @@ auto World::get_allied_units(int owner_id) const -> std::vector<Entity *> {
     }
     }
 
 
     if (unit->owner_id == owner_id ||
     if (unit->owner_id == owner_id ||
-        owner_registry.areAllies(owner_id, unit->owner_id)) {
+        owner_registry.are_allies(owner_id, unit->owner_id)) {
       result.push_back(entity.get());
       result.push_back(entity.get());
     }
     }
   }
   }
@@ -133,7 +133,7 @@ auto World::get_enemy_units(int owner_id) const -> std::vector<Entity *> {
       continue;
       continue;
     }
     }
 
 
-    if (owner_registry.areEnemies(owner_id, unit->owner_id)) {
+    if (owner_registry.are_enemies(owner_id, unit->owner_id)) {
       result.push_back(entity.get());
       result.push_back(entity.get());
     }
     }
   }
   }
@@ -141,7 +141,8 @@ auto World::get_enemy_units(int owner_id) const -> std::vector<Entity *> {
 }
 }
 
 
 auto World::count_troops_for_player(int owner_id) -> int {
 auto World::count_troops_for_player(int owner_id) -> int {
-  return Game::Systems::TroopCountRegistry::instance().getTroopCount(owner_id);
+  return Game::Systems::TroopCountRegistry::instance().get_troop_count(
+      owner_id);
 }
 }
 
 
 auto World::get_next_entity_id() const -> EntityID {
 auto World::get_next_entity_id() const -> EntityID {

+ 59 - 59
game/game_config.h

@@ -3,24 +3,24 @@
 namespace Game {
 namespace Game {
 
 
 struct CameraConfig {
 struct CameraConfig {
-  float defaultDistance = 12.0F;
-  float defaultPitch = 45.0F;
-  float defaultYaw = 225.0F;
-  float orbitStepNormal = 4.0F;
-  float orbitStepShift = 8.0F;
+  float default_distance = 12.0F;
+  float default_pitch = 45.0F;
+  float default_yaw = 225.0F;
+  float orbit_step_normal = 4.0F;
+  float orbit_step_shift = 8.0F;
 };
 };
 
 
 struct ArrowConfig {
 struct ArrowConfig {
-  float arcHeightMultiplier = 0.15F;
-  float arcHeightMin = 0.2F;
-  float arcHeightMax = 1.2F;
-  float speedDefault = 8.0F;
-  float speedAttack = 6.0F;
+  float arc_height_multiplier = 0.15F;
+  float arc_height_min = 0.2F;
+  float arc_height_max = 1.2F;
+  float speed_default = 8.0F;
+  float speed_attack = 6.0F;
 };
 };
 
 
 struct GameplayConfig {
 struct GameplayConfig {
   float visibility_update_interval = 0.075F;
   float visibility_update_interval = 0.075F;
-  float formationSpacingDefault = 1.0F;
+  float formation_spacing_default = 1.0F;
   int max_troops_per_player = 500;
   int max_troops_per_player = 500;
 };
 };
 
 
@@ -41,95 +41,95 @@ public:
     return m_gameplay;
     return m_gameplay;
   }
   }
 
 
-  [[nodiscard]] auto getCameraDefaultDistance() const noexcept -> float {
-    return m_camera.defaultDistance;
+  [[nodiscard]] auto get_camera_default_distance() const noexcept -> float {
+    return m_camera.default_distance;
   }
   }
-  [[nodiscard]] auto getCameraDefaultPitch() const noexcept -> float {
-    return m_camera.defaultPitch;
+  [[nodiscard]] auto get_camera_default_pitch() const noexcept -> float {
+    return m_camera.default_pitch;
   }
   }
-  [[nodiscard]] auto getCameraDefaultYaw() const noexcept -> float {
-    return m_camera.defaultYaw;
+  [[nodiscard]] auto get_camera_default_yaw() const noexcept -> float {
+    return m_camera.default_yaw;
   }
   }
 
 
-  [[nodiscard]] auto getArrowArcHeightMultiplier() const noexcept -> float {
-    return m_arrow.arcHeightMultiplier;
+  [[nodiscard]] auto get_arrow_arc_height_multiplier() const noexcept -> float {
+    return m_arrow.arc_height_multiplier;
   }
   }
-  [[nodiscard]] auto getArrowArcHeightMin() const noexcept -> float {
-    return m_arrow.arcHeightMin;
+  [[nodiscard]] auto get_arrow_arc_height_min() const noexcept -> float {
+    return m_arrow.arc_height_min;
   }
   }
-  [[nodiscard]] auto getArrowArcHeightMax() const noexcept -> float {
-    return m_arrow.arcHeightMax;
+  [[nodiscard]] auto get_arrow_arc_height_max() const noexcept -> float {
+    return m_arrow.arc_height_max;
   }
   }
 
 
-  [[nodiscard]] auto getArrowSpeedDefault() const noexcept -> float {
-    return m_arrow.speedDefault;
+  [[nodiscard]] auto get_arrow_speed_default() const noexcept -> float {
+    return m_arrow.speed_default;
   }
   }
-  [[nodiscard]] auto getArrowSpeedAttack() const noexcept -> float {
-    return m_arrow.speedAttack;
+  [[nodiscard]] auto get_arrow_speed_attack() const noexcept -> float {
+    return m_arrow.speed_attack;
   }
   }
 
 
-  [[nodiscard]] auto getVisibilityUpdateInterval() const noexcept -> float {
+  [[nodiscard]] auto get_visibility_update_interval() const noexcept -> float {
     return m_gameplay.visibility_update_interval;
     return m_gameplay.visibility_update_interval;
   }
   }
 
 
-  [[nodiscard]] auto getFormationSpacingDefault() const noexcept -> float {
-    return m_gameplay.formationSpacingDefault;
+  [[nodiscard]] auto get_formation_spacing_default() const noexcept -> float {
+    return m_gameplay.formation_spacing_default;
   }
   }
 
 
-  [[nodiscard]] auto getCameraOrbitStepNormal() const noexcept -> float {
-    return m_camera.orbitStepNormal;
+  [[nodiscard]] auto get_camera_orbit_step_normal() const noexcept -> float {
+    return m_camera.orbit_step_normal;
   }
   }
-  [[nodiscard]] auto getCameraOrbitStepShift() const noexcept -> float {
-    return m_camera.orbitStepShift;
+  [[nodiscard]] auto get_camera_orbit_step_shift() const noexcept -> float {
+    return m_camera.orbit_step_shift;
   }
   }
 
 
-  void setCameraDefaultDistance(float value) noexcept {
-    m_camera.defaultDistance = value;
+  void set_camera_default_distance(float value) noexcept {
+    m_camera.default_distance = value;
   }
   }
-  void setCameraDefaultPitch(float value) noexcept {
-    m_camera.defaultPitch = value;
+  void set_camera_default_pitch(float value) noexcept {
+    m_camera.default_pitch = value;
   }
   }
-  void setCameraDefaultYaw(float value) noexcept {
-    m_camera.defaultYaw = value;
+  void set_camera_default_yaw(float value) noexcept {
+    m_camera.default_yaw = value;
   }
   }
 
 
-  void setArrowArcHeightMultiplier(float value) noexcept {
-    m_arrow.arcHeightMultiplier = value;
+  void set_arrow_arc_height_multiplier(float value) noexcept {
+    m_arrow.arc_height_multiplier = value;
   }
   }
-  void setArrowArcHeightMin(float value) noexcept {
-    m_arrow.arcHeightMin = value;
+  void set_arrow_arc_height_min(float value) noexcept {
+    m_arrow.arc_height_min = value;
   }
   }
-  void setArrowArcHeightMax(float value) noexcept {
-    m_arrow.arcHeightMax = value;
+  void set_arrow_arc_height_max(float value) noexcept {
+    m_arrow.arc_height_max = value;
   }
   }
 
 
-  void setArrowSpeedDefault(float value) noexcept {
-    m_arrow.speedDefault = value;
+  void set_arrow_speed_default(float value) noexcept {
+    m_arrow.speed_default = value;
   }
   }
-  void setArrowSpeedAttack(float value) noexcept {
-    m_arrow.speedAttack = value;
+  void set_arrow_speed_attack(float value) noexcept {
+    m_arrow.speed_attack = value;
   }
   }
 
 
-  void setVisibilityUpdateInterval(float value) noexcept {
+  void set_visibility_update_interval(float value) noexcept {
     m_gameplay.visibility_update_interval = value;
     m_gameplay.visibility_update_interval = value;
   }
   }
 
 
-  void setFormationSpacingDefault(float value) noexcept {
-    m_gameplay.formationSpacingDefault = value;
+  void set_formation_spacing_default(float value) noexcept {
+    m_gameplay.formation_spacing_default = value;
   }
   }
 
 
-  void setCameraOrbitStepNormal(float value) noexcept {
-    m_camera.orbitStepNormal = value;
+  void set_camera_orbit_step_normal(float value) noexcept {
+    m_camera.orbit_step_normal = value;
   }
   }
-  void setCameraOrbitStepShift(float value) noexcept {
-    m_camera.orbitStepShift = value;
+  void set_camera_orbit_step_shift(float value) noexcept {
+    m_camera.orbit_step_shift = value;
   }
   }
 
 
-  [[nodiscard]] auto getMaxTroopsPerPlayer() const noexcept -> int {
+  [[nodiscard]] auto get_max_troops_per_player() const noexcept -> int {
     return m_gameplay.max_troops_per_player;
     return m_gameplay.max_troops_per_player;
   }
   }
 
 
-  void setMaxTroopsPerPlayer(int value) noexcept {
+  void set_max_troops_per_player(int value) noexcept {
     m_gameplay.max_troops_per_player = value;
     m_gameplay.max_troops_per_player = value;
   }
   }
 
 

+ 2 - 2
game/map/environment.cpp

@@ -25,8 +25,8 @@ void Environment::apply(const MapDefinition &def,
 void Environment::applyDefault(Render::GL::Renderer &renderer,
 void Environment::applyDefault(Render::GL::Renderer &renderer,
                                Render::GL::Camera &camera) {
                                Render::GL::Camera &camera) {
   const auto &camera_config = Game::GameConfig::instance().camera();
   const auto &camera_config = Game::GameConfig::instance().camera();
-  camera.setRTSView(QVector3D(0, 0, 0), 15.0F, camera_config.defaultPitch,
-                    camera_config.defaultYaw);
+  camera.setRTSView(QVector3D(0, 0, 0), 15.0F, camera_config.default_pitch,
+                    camera_config.default_yaw);
 
 
   camera.setPerspective(45.0F, 16.0F / 9.0F, 1.0F, 200.0F);
   camera.setPerspective(45.0F, 16.0F / 9.0F, 1.0F, 200.0F);
   Render::GL::Renderer::GridParams gp;
   Render::GL::Renderer::GridParams gp;

+ 10 - 9
game/map/level_loader.cpp

@@ -75,7 +75,8 @@ auto LevelLoader::loadFromAssets(
 
 
     const Game::Visuals::VisualCatalog *catalog_ptr =
     const Game::Visuals::VisualCatalog *catalog_ptr =
         visuals_loaded ? &visual_catalog : nullptr;
         visuals_loaded ? &visual_catalog : nullptr;
-    auto rt = Game::Map::MapTransformer::applyToWorld(def, world, catalog_ptr);
+    auto rt =
+        Game::Map::MapTransformer::apply_to_world(def, world, catalog_ptr);
     if (!rt.unit_ids.empty()) {
     if (!rt.unit_ids.empty()) {
       res.player_unit_id = rt.unit_ids.front();
       res.player_unit_id = rt.unit_ids.front();
     } else {
     } else {
@@ -87,9 +88,9 @@ auto LevelLoader::loadFromAssets(
         sp.position = QVector3D(0.0F, 0.0F, 0.0F);
         sp.position = QVector3D(0.0F, 0.0F, 0.0F);
         sp.player_id = 0;
         sp.player_id = 0;
         sp.spawn_type = Game::Units::SpawnType::Archer;
         sp.spawn_type = Game::Units::SpawnType::Archer;
-        sp.ai_controlled = !owners.isPlayer(sp.player_id);
+        sp.ai_controlled = !owners.is_player(sp.player_id);
         if (const auto *nation =
         if (const auto *nation =
-                nationRegistry.getNationForPlayer(sp.player_id)) {
+                nationRegistry.get_nation_for_player(sp.player_id)) {
           sp.nation_id = nation->id;
           sp.nation_id = nation->id;
         } else {
         } else {
           sp.nation_id = nationRegistry.default_nation_id();
           sp.nation_id = nationRegistry.default_nation_id();
@@ -107,7 +108,7 @@ auto LevelLoader::loadFromAssets(
     for (auto *e : world.get_entities_with<Engine::Core::UnitComponent>()) {
     for (auto *e : world.get_entities_with<Engine::Core::UnitComponent>()) {
       if (auto *u = e->get_component<Engine::Core::UnitComponent>()) {
       if (auto *u = e->get_component<Engine::Core::UnitComponent>()) {
         if (u->spawn_type == Game::Units::SpawnType::Barracks &&
         if (u->spawn_type == Game::Units::SpawnType::Barracks &&
-            owners.isPlayer(u->owner_id)) {
+            owners.is_player(u->owner_id)) {
           has_barracks = true;
           has_barracks = true;
           break;
           break;
         }
         }
@@ -119,11 +120,11 @@ auto LevelLoader::loadFromAssets(
       if (reg2) {
       if (reg2) {
         Game::Units::SpawnParams sp;
         Game::Units::SpawnParams sp;
         sp.position = QVector3D(-4.0F, 0.0F, -3.0F);
         sp.position = QVector3D(-4.0F, 0.0F, -3.0F);
-        sp.player_id = owners.getLocalPlayerId();
+        sp.player_id = owners.get_local_player_id();
         sp.spawn_type = Game::Units::SpawnType::Barracks;
         sp.spawn_type = Game::Units::SpawnType::Barracks;
-        sp.ai_controlled = !owners.isPlayer(sp.player_id);
+        sp.ai_controlled = !owners.is_player(sp.player_id);
         if (const auto *nation =
         if (const auto *nation =
-                nationRegistry.getNationForPlayer(sp.player_id)) {
+                nationRegistry.get_nation_for_player(sp.player_id)) {
           sp.nation_id = nation->id;
           sp.nation_id = nation->id;
         } else {
         } else {
           sp.nation_id = nationRegistry.default_nation_id();
           sp.nation_id = nationRegistry.default_nation_id();
@@ -153,9 +154,9 @@ auto LevelLoader::loadFromAssets(
       sp.position = QVector3D(0.0F, 0.0F, 0.0F);
       sp.position = QVector3D(0.0F, 0.0F, 0.0F);
       sp.player_id = 0;
       sp.player_id = 0;
       sp.spawn_type = Game::Units::SpawnType::Archer;
       sp.spawn_type = Game::Units::SpawnType::Archer;
-      sp.ai_controlled = !owners.isPlayer(sp.player_id);
+      sp.ai_controlled = !owners.is_player(sp.player_id);
       if (const auto *nation =
       if (const auto *nation =
-              nationRegistry.getNationForPlayer(sp.player_id)) {
+              nationRegistry.get_nation_for_player(sp.player_id)) {
         sp.nation_id = nation->id;
         sp.nation_id = nation->id;
       } else {
       } else {
         sp.nation_id = nationRegistry.default_nation_id();
         sp.nation_id = nationRegistry.default_nation_id();

+ 14 - 14
game/map/map_catalog.cpp

@@ -127,7 +127,7 @@ auto MapCatalog::availableMaps() -> QVariantList {
   return list;
   return list;
 }
 }
 
 
-void MapCatalog::loadMapsAsync() {
+void MapCatalog::load_maps_async() {
   if (m_loading) {
   if (m_loading) {
     return;
     return;
   }
   }
@@ -135,15 +135,15 @@ void MapCatalog::loadMapsAsync() {
   m_maps.clear();
   m_maps.clear();
   m_pendingFiles.clear();
   m_pendingFiles.clear();
   m_loading = true;
   m_loading = true;
-  emit loadingChanged(true);
+  emit loading_changed(true);
 
 
   const QString maps_root =
   const QString maps_root =
       Utils::Resources::resolveResourcePath(QStringLiteral(":/assets/maps"));
       Utils::Resources::resolveResourcePath(QStringLiteral(":/assets/maps"));
   QDir const maps_dir(maps_root);
   QDir const maps_dir(maps_root);
   if (!maps_dir.exists()) {
   if (!maps_dir.exists()) {
     m_loading = false;
     m_loading = false;
-    emit loadingChanged(false);
-    emit allMapsLoaded();
+    emit loading_changed(false);
+    emit all_maps_loaded();
     return;
     return;
   }
   }
 
 
@@ -152,19 +152,19 @@ void MapCatalog::loadMapsAsync() {
 
 
   if (m_pendingFiles.isEmpty()) {
   if (m_pendingFiles.isEmpty()) {
     m_loading = false;
     m_loading = false;
-    emit loadingChanged(false);
-    emit allMapsLoaded();
+    emit loading_changed(false);
+    emit all_maps_loaded();
     return;
     return;
   }
   }
 
 
-  QTimer::singleShot(0, this, &MapCatalog::loadNextMap);
+  QTimer::singleShot(0, this, &MapCatalog::load_next_map);
 }
 }
 
 
-void MapCatalog::loadNextMap() {
+void MapCatalog::load_next_map() {
   if (m_pendingFiles.isEmpty()) {
   if (m_pendingFiles.isEmpty()) {
     m_loading = false;
     m_loading = false;
-    emit loadingChanged(false);
-    emit allMapsLoaded();
+    emit loading_changed(false);
+    emit all_maps_loaded();
     return;
     return;
   }
   }
 
 
@@ -178,15 +178,15 @@ void MapCatalog::loadNextMap() {
   QVariantMap const entry = loadSingleMap(path);
   QVariantMap const entry = loadSingleMap(path);
   if (!entry.isEmpty()) {
   if (!entry.isEmpty()) {
     m_maps.append(entry);
     m_maps.append(entry);
-    emit mapLoaded(entry);
+    emit map_loaded(entry);
   }
   }
 
 
   if (!m_pendingFiles.isEmpty()) {
   if (!m_pendingFiles.isEmpty()) {
-    QTimer::singleShot(10, this, &MapCatalog::loadNextMap);
+    QTimer::singleShot(10, this, &MapCatalog::load_next_map);
   } else {
   } else {
     m_loading = false;
     m_loading = false;
-    emit loadingChanged(false);
-    emit allMapsLoaded();
+    emit loading_changed(false);
+    emit all_maps_loaded();
   }
   }
 }
 }
 
 

+ 5 - 5
game/map/map_catalog.h

@@ -13,18 +13,18 @@ public:
 
 
   static auto availableMaps() -> QVariantList;
   static auto availableMaps() -> QVariantList;
 
 
-  Q_INVOKABLE void loadMapsAsync();
+  Q_INVOKABLE void load_maps_async();
 
 
   [[nodiscard]] auto isLoading() const -> bool { return m_loading; }
   [[nodiscard]] auto isLoading() const -> bool { return m_loading; }
   [[nodiscard]] auto maps() const -> const QVariantList & { return m_maps; }
   [[nodiscard]] auto maps() const -> const QVariantList & { return m_maps; }
 
 
 signals:
 signals:
-  void mapLoaded(QVariantMap mapData);
-  void allMapsLoaded();
-  void loadingChanged(bool loading);
+  void map_loaded(QVariantMap mapData);
+  void all_maps_loaded();
+  void loading_changed(bool loading);
 
 
 private:
 private:
-  void loadNextMap();
+  void load_next_map();
   static auto loadSingleMap(const QString &filePath) -> QVariantMap;
   static auto loadSingleMap(const QString &filePath) -> QVariantMap;
 
 
   QStringList m_pendingFiles;
   QStringList m_pendingFiles;

+ 13 - 12
game/map/map_transformer.cpp

@@ -41,12 +41,12 @@ auto MapTransformer::getFactoryRegistry()
 
 
 void MapTransformer::set_local_owner_id(int owner_id) {
 void MapTransformer::set_local_owner_id(int owner_id) {
   auto &owners = Game::Systems::OwnerRegistry::instance();
   auto &owners = Game::Systems::OwnerRegistry::instance();
-  owners.setLocalPlayerId(owner_id);
+  owners.set_local_player_id(owner_id);
 }
 }
 
 
 auto MapTransformer::local_owner_id() -> int {
 auto MapTransformer::local_owner_id() -> int {
   auto &owners = Game::Systems::OwnerRegistry::instance();
   auto &owners = Game::Systems::OwnerRegistry::instance();
-  return owners.getLocalPlayerId();
+  return owners.get_local_player_id();
 }
 }
 
 
 void MapTransformer::setPlayerTeamOverrides(
 void MapTransformer::setPlayerTeamOverrides(
@@ -58,7 +58,7 @@ void MapTransformer::clearPlayerTeamOverrides() {
   s_player_team_overrides.clear();
   s_player_team_overrides.clear();
 }
 }
 
 
-auto MapTransformer::applyToWorld(
+auto MapTransformer::apply_to_world(
     const MapDefinition &def, Engine::Core::World &world,
     const MapDefinition &def, Engine::Core::World &world,
     const Game::Visuals::VisualCatalog *visuals) -> MapRuntime {
     const Game::Visuals::VisualCatalog *visuals) -> MapRuntime {
   MapRuntime rt;
   MapRuntime rt;
@@ -87,11 +87,11 @@ auto MapTransformer::applyToWorld(
       continue;
       continue;
     }
     }
 
 
-    if (owner_registry.getOwnerType(player_id) ==
+    if (owner_registry.get_owner_type(player_id) ==
         Game::Systems::OwnerType::Neutral) {
         Game::Systems::OwnerType::Neutral) {
 
 
       bool const is_local_player =
       bool const is_local_player =
-          (player_id == owner_registry.getLocalPlayerId());
+          (player_id == owner_registry.get_local_player_id());
       Game::Systems::OwnerType const owner_type =
       Game::Systems::OwnerType const owner_type =
           is_local_player ? Game::Systems::OwnerType::Player
           is_local_player ? Game::Systems::OwnerType::Player
                           : Game::Systems::OwnerType::AI;
                           : Game::Systems::OwnerType::AI;
@@ -100,7 +100,7 @@ auto MapTransformer::applyToWorld(
           is_local_player ? "Player " + std::to_string(player_id)
           is_local_player ? "Player " + std::to_string(player_id)
                           : "AI Player " + std::to_string(player_id);
                           : "AI Player " + std::to_string(player_id);
 
 
-      owner_registry.registerOwnerWithId(player_id, owner_type, owner_name);
+      owner_registry.register_owner_with_id(player_id, owner_type, owner_name);
     }
     }
 
 
     int final_team_id = 0;
     int final_team_id = 0;
@@ -116,7 +116,7 @@ auto MapTransformer::applyToWorld(
       } else {
       } else {
       }
       }
     }
     }
-    owner_registry.setOwnerTeam(player_id, final_team_id);
+    owner_registry.set_owner_team(player_id, final_team_id);
   }
   }
 
 
   for (const auto &s : def.spawns) {
   for (const auto &s : def.spawns) {
@@ -141,7 +141,8 @@ auto MapTransformer::applyToWorld(
     }
     }
 
 
     auto &terrain = Game::Map::TerrainService::instance();
     auto &terrain = Game::Map::TerrainService::instance();
-    if (terrain.isInitialized() && terrain.isForbiddenWorld(world_x, world_z)) {
+    if (terrain.is_initialized() &&
+        terrain.is_forbidden_world(world_x, world_z)) {
       const float tile = std::max(0.0001F, def.grid.tile_size);
       const float tile = std::max(0.0001F, def.grid.tile_size);
       bool found = false;
       bool found = false;
       const int max_radius = 12;
       const int max_radius = 12;
@@ -154,7 +155,7 @@ auto MapTransformer::applyToWorld(
             }
             }
             float const cand_x = world_x + float(ox) * tile;
             float const cand_x = world_x + float(ox) * tile;
             float const cand_z = world_z + float(oz) * tile;
             float const cand_z = world_z + float(oz) * tile;
-            if (!terrain.isForbiddenWorld(cand_x, cand_z)) {
+            if (!terrain.is_forbidden_world(cand_x, cand_z)) {
               world_x = cand_x;
               world_x = cand_x;
               world_z = cand_z;
               world_z = cand_z;
               found = true;
               found = true;
@@ -175,14 +176,14 @@ auto MapTransformer::applyToWorld(
       sp.position = QVector3D(world_x, 0.0F, world_z);
       sp.position = QVector3D(world_x, 0.0F, world_z);
       sp.player_id = effective_player_id;
       sp.player_id = effective_player_id;
       sp.spawn_type = s.type;
       sp.spawn_type = s.type;
-      sp.ai_controlled = !owner_registry.isPlayer(effective_player_id);
+      sp.ai_controlled = !owner_registry.is_player(effective_player_id);
       sp.max_population = s.max_population;
       sp.max_population = s.max_population;
 
 
       if (s.nation.has_value()) {
       if (s.nation.has_value()) {
         sp.nation_id = s.nation.value();
         sp.nation_id = s.nation.value();
       } else if (const auto *nation =
       } else if (const auto *nation =
                      Game::Systems::NationRegistry::instance()
                      Game::Systems::NationRegistry::instance()
-                         .getNationForPlayer(effective_player_id)) {
+                         .get_nation_for_player(effective_player_id)) {
         sp.nation_id = nation->id;
         sp.nation_id = nation->id;
       } else {
       } else {
         sp.nation_id =
         sp.nation_id =
@@ -211,7 +212,7 @@ auto MapTransformer::applyToWorld(
       if (visuals != nullptr) {
       if (visuals != nullptr) {
         Game::Visuals::VisualDef defv;
         Game::Visuals::VisualDef defv;
         if (visuals->lookup(Game::Units::spawn_typeToString(s.type), defv)) {
         if (visuals->lookup(Game::Units::spawn_typeToString(s.type), defv)) {
-          Game::Visuals::applyToRenderable(defv, *r);
+          Game::Visuals::apply_to_renderable(defv, *r);
         }
         }
       }
       }
       if (r->color[0] == 0.0F && r->color[1] == 0.0F && r->color[2] == 0.0F) {
       if (r->color[0] == 0.0F && r->color[1] == 0.0F && r->color[2] == 0.0F) {

+ 1 - 1
game/map/map_transformer.h

@@ -21,7 +21,7 @@ struct MapRuntime {
 
 
 class MapTransformer {
 class MapTransformer {
 public:
 public:
-  static auto applyToWorld(
+  static auto apply_to_world(
       const MapDefinition &def, Engine::Core::World &world,
       const MapDefinition &def, Engine::Core::World &world,
       const Game::Visuals::VisualCatalog *visuals = nullptr) -> MapRuntime;
       const Game::Visuals::VisualCatalog *visuals = nullptr) -> MapRuntime;
 
 

+ 1 - 1
game/map/minimap/minimap_generator.cpp

@@ -455,7 +455,7 @@ void MinimapGenerator::render_structures(QImage &image,
   painter.setRenderHint(QPainter::Antialiasing, true);
   painter.setRenderHint(QPainter::Antialiasing, true);
 
 
   for (const auto &spawn : map_def.spawns) {
   for (const auto &spawn : map_def.spawns) {
-    if (!Game::Units::isBuildingSpawn(spawn.type)) {
+    if (!Game::Units::is_building_spawn(spawn.type)) {
       continue;
       continue;
     }
     }
 
 

+ 67 - 66
game/map/skirmish_loader.cpp

@@ -63,7 +63,7 @@ SkirmishLoader::SkirmishLoader(Engine::Core::World &world,
                                Render::GL::Camera &camera)
                                Render::GL::Camera &camera)
     : m_world(world), m_renderer(renderer), m_camera(camera) {}
     : m_world(world), m_renderer(renderer), m_camera(camera) {}
 
 
-void SkirmishLoader::resetGameState() {
+void SkirmishLoader::reset_game_state() {
   if (auto *selection_system =
   if (auto *selection_system =
           m_world.get_system<Game::Systems::SelectionSystem>()) {
           m_world.get_system<Game::Systems::SelectionSystem>()) {
     selection_system->clear_selection();
     selection_system->clear_selection();
@@ -95,7 +95,7 @@ void SkirmishLoader::resetGameState() {
   auto &troop_registry = Game::Systems::TroopCountRegistry::instance();
   auto &troop_registry = Game::Systems::TroopCountRegistry::instance();
   troop_registry.clear();
   troop_registry.clear();
 
 
-  Game::Systems::NationRegistry::instance().clearPlayerAssignments();
+  Game::Systems::NationRegistry::instance().clear_player_assignments();
 
 
   if (m_fog != nullptr) {
   if (m_fog != nullptr) {
     m_fog->updateMask(0, 0, 1.0F, {});
     m_fog->updateMask(0, 0, 1.0F, {});
@@ -104,11 +104,11 @@ void SkirmishLoader::resetGameState() {
 
 
 auto SkirmishLoader::start(const QString &map_path,
 auto SkirmishLoader::start(const QString &map_path,
                            const QVariantList &playerConfigs,
                            const QVariantList &playerConfigs,
-                           int selectedPlayerId,
-                           int &outSelectedPlayerId) -> SkirmishLoadResult {
+                           int selected_player_id,
+                           int &out_selected_player_id) -> SkirmishLoadResult {
   SkirmishLoadResult result;
   SkirmishLoadResult result;
 
 
-  resetGameState();
+  reset_game_state();
 
 
   QSet<int> map_player_ids;
   QSet<int> map_player_ids;
   QFile map_file(map_path);
   QFile map_file(map_path);
@@ -140,17 +140,17 @@ auto SkirmishLoader::start(const QString &map_path,
 
 
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
 
 
-  int player_owner_id = selectedPlayerId;
+  int player_owner_id = selected_player_id;
 
 
   if (!map_player_ids.contains(player_owner_id)) {
   if (!map_player_ids.contains(player_owner_id)) {
     if (!map_player_ids.isEmpty()) {
     if (!map_player_ids.isEmpty()) {
       QList<int> sorted_ids = map_player_ids.values();
       QList<int> sorted_ids = map_player_ids.values();
       std::sort(sorted_ids.begin(), sorted_ids.end());
       std::sort(sorted_ids.begin(), sorted_ids.end());
       player_owner_id = sorted_ids.first();
       player_owner_id = sorted_ids.first();
-      qWarning() << "Selected player ID" << selectedPlayerId
+      qWarning() << "Selected player ID" << selected_player_id
                  << "not found in map spawns. Using" << player_owner_id
                  << "not found in map spawns. Using" << player_owner_id
                  << "instead.";
                  << "instead.";
-      outSelectedPlayerId = player_owner_id;
+      out_selected_player_id = player_owner_id;
     } else {
     } else {
       qWarning() << "No valid player spawns found in map. Using default "
       qWarning() << "No valid player spawns found in map. Using default "
                     "player ID"
                     "player ID"
@@ -158,7 +158,7 @@ auto SkirmishLoader::start(const QString &map_path,
     }
     }
   }
   }
 
 
-  owner_registry.setLocalPlayerId(player_owner_id);
+  owner_registry.set_local_player_id(player_owner_id);
 
 
   std::unordered_map<int, int> team_overrides;
   std::unordered_map<int, int> team_overrides;
   std::unordered_map<int, Game::Systems::NationID> nation_overrides;
   std::unordered_map<int, Game::Systems::NationID> nation_overrides;
@@ -229,20 +229,20 @@ auto SkirmishLoader::start(const QString &map_path,
     int player_id = *it;
     int player_id = *it;
     auto nat_it = nation_overrides.find(player_id);
     auto nat_it = nation_overrides.find(player_id);
     if (nat_it != nation_overrides.end()) {
     if (nat_it != nation_overrides.end()) {
-      nation_registry.setPlayerNation(player_id, nat_it->second);
+      nation_registry.set_player_nation(player_id, nat_it->second);
     } else {
     } else {
-      nation_registry.setPlayerNation(player_id,
-                                      nation_registry.default_nation_id());
+      nation_registry.set_player_nation(player_id,
+                                        nation_registry.default_nation_id());
     }
     }
   }
   }
 
 
   if (map_player_ids.isEmpty()) {
   if (map_player_ids.isEmpty()) {
     auto nat_it = nation_overrides.find(player_owner_id);
     auto nat_it = nation_overrides.find(player_owner_id);
     if (nat_it != nation_overrides.end()) {
     if (nat_it != nation_overrides.end()) {
-      nation_registry.setPlayerNation(player_owner_id, nat_it->second);
+      nation_registry.set_player_nation(player_owner_id, nat_it->second);
     } else {
     } else {
-      nation_registry.setPlayerNation(player_owner_id,
-                                      nation_registry.default_nation_id());
+      nation_registry.set_player_nation(player_owner_id,
+                                        nation_registry.default_nation_id());
     }
     }
   }
   }
 
 
@@ -272,8 +272,8 @@ auto SkirmishLoader::start(const QString &map_path,
         const int red = color_hex.mid(1, 2).toInt(&conversion_ok, hex_base);
         const int red = color_hex.mid(1, 2).toInt(&conversion_ok, hex_base);
         const int green = color_hex.mid(3, 2).toInt(&conversion_ok, hex_base);
         const int green = color_hex.mid(3, 2).toInt(&conversion_ok, hex_base);
         const int blue = color_hex.mid(5, 2).toInt(&conversion_ok, hex_base);
         const int blue = color_hex.mid(5, 2).toInt(&conversion_ok, hex_base);
-        owner_registry.setOwnerColor(player_id, red / color_scale,
-                                     green / color_scale, blue / color_scale);
+        owner_registry.set_owner_color(player_id, red / color_scale,
+                                       green / color_scale, blue / color_scale);
       }
       }
     }
     }
 
 
@@ -307,96 +307,97 @@ auto SkirmishLoader::start(const QString &map_path,
     } else {
     } else {
       m_ground->configureExtent(50.0F);
       m_ground->configureExtent(50.0F);
     }
     }
-    if (terrain_service.isInitialized()) {
-      m_ground->setBiome(terrain_service.biomeSettings());
+    if (terrain_service.is_initialized()) {
+      m_ground->setBiome(terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_terrain != nullptr) {
   if (m_terrain != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_terrain->configure(*terrain_service.getHeightMap(),
-                           terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_terrain->configure(*terrain_service.get_height_map(),
+                           terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_biome != nullptr) {
   if (m_biome != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_biome->configure(*terrain_service.getHeightMap(),
-                         terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_biome->configure(*terrain_service.get_height_map(),
+                         terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_river != nullptr) {
   if (m_river != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_river->configure(terrain_service.getHeightMap()->getRiverSegments(),
-                         terrain_service.getHeightMap()->getTileSize());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_river->configure(terrain_service.get_height_map()->getRiverSegments(),
+                         terrain_service.get_height_map()->getTileSize());
     }
     }
   }
   }
 
 
   if (m_road != nullptr) {
   if (m_road != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
       m_road->configure(terrain_service.road_segments(),
       m_road->configure(terrain_service.road_segments(),
-                        terrain_service.getHeightMap()->getTileSize());
+                        terrain_service.get_height_map()->getTileSize());
     }
     }
   }
   }
 
 
   if (m_riverbank != nullptr) {
   if (m_riverbank != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_riverbank->configure(terrain_service.getHeightMap()->getRiverSegments(),
-                             *terrain_service.getHeightMap());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_riverbank->configure(
+          terrain_service.get_height_map()->getRiverSegments(),
+          *terrain_service.get_height_map());
     }
     }
   }
   }
 
 
   if (m_bridge != nullptr) {
   if (m_bridge != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_bridge->configure(terrain_service.getHeightMap()->getBridges(),
-                          terrain_service.getHeightMap()->getTileSize());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_bridge->configure(terrain_service.get_height_map()->getBridges(),
+                          terrain_service.get_height_map()->getTileSize());
     }
     }
   }
   }
 
 
   if (m_stone != nullptr) {
   if (m_stone != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_stone->configure(*terrain_service.getHeightMap(),
-                         terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_stone->configure(*terrain_service.get_height_map(),
+                         terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_plant != nullptr) {
   if (m_plant != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_plant->configure(*terrain_service.getHeightMap(),
-                         terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_plant->configure(*terrain_service.get_height_map(),
+                         terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_pine != nullptr) {
   if (m_pine != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_pine->configure(*terrain_service.getHeightMap(),
-                        terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_pine->configure(*terrain_service.get_height_map(),
+                        terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_olive != nullptr) {
   if (m_olive != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_olive->configure(*terrain_service.getHeightMap(),
-                         terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_olive->configure(*terrain_service.get_height_map(),
+                         terrain_service.biome_settings());
     }
     }
   }
   }
 
 
   if (m_firecamp != nullptr) {
   if (m_firecamp != nullptr) {
-    if (terrain_service.isInitialized() &&
-        (terrain_service.getHeightMap() != nullptr)) {
-      m_firecamp->configure(*terrain_service.getHeightMap(),
-                            terrain_service.biomeSettings());
+    if (terrain_service.is_initialized() &&
+        (terrain_service.get_height_map() != nullptr)) {
+      m_firecamp->configure(*terrain_service.get_height_map(),
+                            terrain_service.biome_settings());
 
 
       const auto &fire_camps = terrain_service.fire_camps();
       const auto &fire_camps = terrain_service.fire_camps();
       if (!fire_camps.empty()) {
       if (!fire_camps.empty()) {
@@ -404,7 +405,7 @@ auto SkirmishLoader::start(const QString &map_path,
         std::vector<float> intensities;
         std::vector<float> intensities;
         std::vector<float> radii;
         std::vector<float> radii;
 
 
-        const auto *height_map = terrain_service.getHeightMap();
+        const auto *height_map = terrain_service.get_height_map();
         const float tile_size = height_map->getTileSize();
         const float tile_size = height_map->getTileSize();
         const int width = height_map->getWidth();
         const int width = height_map->getWidth();
         const int height = height_map->getHeight();
         const int height = height_map->getHeight();
@@ -416,7 +417,7 @@ auto SkirmishLoader::start(const QString &map_path,
           float const world_x = (fc.x - half_width) * tile_size;
           float const world_x = (fc.x - half_width) * tile_size;
           float const world_z = (fc.z - half_height) * tile_size;
           float const world_z = (fc.z - half_height) * tile_size;
           float const world_y =
           float const world_y =
-              terrain_service.getTerrainHeight(world_x, world_z);
+              terrain_service.get_terrain_height(world_x, world_z);
 
 
           positions.emplace_back(world_x, world_y, world_z);
           positions.emplace_back(world_x, world_y, world_z);
           intensities.push_back(fc.intensity);
           intensities.push_back(fc.intensity);
@@ -439,7 +440,7 @@ auto SkirmishLoader::start(const QString &map_path,
   visibility_service.initialize(map_width, map_height, level_result.tile_size);
   visibility_service.initialize(map_width, map_height, level_result.tile_size);
   visibility_service.computeImmediate(m_world, player_owner_id);
   visibility_service.computeImmediate(m_world, player_owner_id);
 
 
-  if ((m_fog != nullptr) && visibility_service.isInitialized()) {
+  if ((m_fog != nullptr) && visibility_service.is_initialized()) {
     m_fog->updateMask(
     m_fog->updateMask(
         visibility_service.getWidth(), visibility_service.getHeight(),
         visibility_service.getWidth(), visibility_service.getHeight(),
         visibility_service.getTileSize(), visibility_service.snapshotCells());
         visibility_service.getTileSize(), visibility_service.snapshotCells());
@@ -483,7 +484,7 @@ auto SkirmishLoader::start(const QString &map_path,
             focus_entity->get_component<Engine::Core::TransformComponent>()) {
             focus_entity->get_component<Engine::Core::TransformComponent>()) {
       result.focusPosition = QVector3D(
       result.focusPosition = QVector3D(
           transform->position.x, transform->position.y, transform->position.z);
           transform->position.x, transform->position.y, transform->position.z);
-      result.hasFocusPosition = true;
+      result.has_focus_position = true;
     }
     }
   }
   }
 
 

+ 19 - 19
game/map/skirmish_loader.h

@@ -47,7 +47,7 @@ struct SkirmishLoadResult {
   int max_troops_per_player = 500;
   int max_troops_per_player = 500;
   VictoryConfig victoryConfig;
   VictoryConfig victoryConfig;
   QVector3D focusPosition;
   QVector3D focusPosition;
-  bool hasFocusPosition = false;
+  bool has_focus_position = false;
 };
 };
 
 
 class SkirmishLoader {
 class SkirmishLoader {
@@ -58,44 +58,44 @@ public:
   SkirmishLoader(Engine::Core::World &world, Render::GL::Renderer &renderer,
   SkirmishLoader(Engine::Core::World &world, Render::GL::Renderer &renderer,
                  Render::GL::Camera &camera);
                  Render::GL::Camera &camera);
 
 
-  void setGroundRenderer(Render::GL::GroundRenderer *ground) {
+  void set_ground_renderer(Render::GL::GroundRenderer *ground) {
     m_ground = ground;
     m_ground = ground;
   }
   }
-  void setTerrainRenderer(Render::GL::TerrainRenderer *terrain) {
+  void set_terrain_renderer(Render::GL::TerrainRenderer *terrain) {
     m_terrain = terrain;
     m_terrain = terrain;
   }
   }
-  void setBiomeRenderer(Render::GL::BiomeRenderer *biome) { m_biome = biome; }
-  void setRiverRenderer(Render::GL::RiverRenderer *river) { m_river = river; }
-  void setRoadRenderer(Render::GL::RoadRenderer *road) { m_road = road; }
-  void setRiverbankRenderer(Render::GL::RiverbankRenderer *riverbank) {
+  void set_biome_renderer(Render::GL::BiomeRenderer *biome) { m_biome = biome; }
+  void set_river_renderer(Render::GL::RiverRenderer *river) { m_river = river; }
+  void set_road_renderer(Render::GL::RoadRenderer *road) { m_road = road; }
+  void set_riverbank_renderer(Render::GL::RiverbankRenderer *riverbank) {
     m_riverbank = riverbank;
     m_riverbank = riverbank;
   }
   }
-  void setBridgeRenderer(Render::GL::BridgeRenderer *bridge) {
+  void set_bridge_renderer(Render::GL::BridgeRenderer *bridge) {
     m_bridge = bridge;
     m_bridge = bridge;
   }
   }
-  void setFogRenderer(Render::GL::FogRenderer *fog) { m_fog = fog; }
-  void setStoneRenderer(Render::GL::StoneRenderer *stone) { m_stone = stone; }
-  void setPlantRenderer(Render::GL::PlantRenderer *plant) { m_plant = plant; }
-  void setPineRenderer(Render::GL::PineRenderer *pine) { m_pine = pine; }
-  void setOliveRenderer(Render::GL::OliveRenderer *olive) { m_olive = olive; }
-  void setFireCampRenderer(Render::GL::FireCampRenderer *firecamp) {
+  void set_fog_renderer(Render::GL::FogRenderer *fog) { m_fog = fog; }
+  void set_stone_renderer(Render::GL::StoneRenderer *stone) { m_stone = stone; }
+  void set_plant_renderer(Render::GL::PlantRenderer *plant) { m_plant = plant; }
+  void set_pine_renderer(Render::GL::PineRenderer *pine) { m_pine = pine; }
+  void set_olive_renderer(Render::GL::OliveRenderer *olive) { m_olive = olive; }
+  void set_fire_camp_renderer(Render::GL::FireCampRenderer *firecamp) {
     m_firecamp = firecamp;
     m_firecamp = firecamp;
   }
   }
 
 
-  void setOnOwnersUpdated(OwnersUpdatedCallback callback) {
+  void set_on_owners_updated(OwnersUpdatedCallback callback) {
     m_onOwnersUpdated = std::move(callback);
     m_onOwnersUpdated = std::move(callback);
   }
   }
 
 
-  void setOnVisibilityMaskReady(VisibilityMaskReadyCallback callback) {
+  void set_on_visibility_mask_ready(VisibilityMaskReadyCallback callback) {
     m_onVisibilityMaskReady = std::move(callback);
     m_onVisibilityMaskReady = std::move(callback);
   }
   }
 
 
   auto start(const QString &map_path, const QVariantList &playerConfigs,
   auto start(const QString &map_path, const QVariantList &playerConfigs,
-             int selectedPlayerId,
-             int &outSelectedPlayerId) -> SkirmishLoadResult;
+             int selected_player_id,
+             int &out_selected_player_id) -> SkirmishLoadResult;
 
 
 private:
 private:
-  void resetGameState();
+  void reset_game_state();
   Engine::Core::World &m_world;
   Engine::Core::World &m_world;
   Render::GL::Renderer &m_renderer;
   Render::GL::Renderer &m_renderer;
   Render::GL::Camera &m_camera;
   Render::GL::Camera &m_camera;

+ 17 - 17
game/map/terrain_service.cpp

@@ -23,43 +23,43 @@ void TerrainService::initialize(const MapDefinition &mapDef) {
   m_height_map->buildFromFeatures(mapDef.terrain);
   m_height_map->buildFromFeatures(mapDef.terrain);
   m_height_map->addRiverSegments(mapDef.rivers);
   m_height_map->addRiverSegments(mapDef.rivers);
   m_height_map->addBridges(mapDef.bridges);
   m_height_map->addBridges(mapDef.bridges);
-  m_biomeSettings = mapDef.biome;
-  m_height_map->applyBiomeVariation(m_biomeSettings);
+  m_biome_settings = mapDef.biome;
+  m_height_map->applyBiomeVariation(m_biome_settings);
   m_fire_camps = mapDef.firecamps;
   m_fire_camps = mapDef.firecamps;
   m_road_segments = mapDef.roads;
   m_road_segments = mapDef.roads;
 }
 }
 
 
 void TerrainService::clear() {
 void TerrainService::clear() {
   m_height_map.reset();
   m_height_map.reset();
-  m_biomeSettings = BiomeSettings();
+  m_biome_settings = BiomeSettings();
   m_fire_camps.clear();
   m_fire_camps.clear();
   m_road_segments.clear();
   m_road_segments.clear();
 }
 }
 
 
-auto TerrainService::getTerrainHeight(float world_x,
-                                      float world_z) const -> float {
+auto TerrainService::get_terrain_height(float world_x,
+                                        float world_z) const -> float {
   if (!m_height_map) {
   if (!m_height_map) {
     return 0.0F;
     return 0.0F;
   }
   }
   return m_height_map->getHeightAt(world_x, world_z);
   return m_height_map->getHeightAt(world_x, world_z);
 }
 }
 
 
-auto TerrainService::getTerrainHeightGrid(int grid_x,
-                                          int grid_z) const -> float {
+auto TerrainService::get_terrain_height_grid(int grid_x,
+                                             int grid_z) const -> float {
   if (!m_height_map) {
   if (!m_height_map) {
     return 0.0F;
     return 0.0F;
   }
   }
   return m_height_map->getHeightAtGrid(grid_x, grid_z);
   return m_height_map->getHeightAtGrid(grid_x, grid_z);
 }
 }
 
 
-auto TerrainService::isWalkable(int grid_x, int grid_z) const -> bool {
+auto TerrainService::is_walkable(int grid_x, int grid_z) const -> bool {
   if (!m_height_map) {
   if (!m_height_map) {
     return true;
     return true;
   }
   }
   return m_height_map->isWalkable(grid_x, grid_z);
   return m_height_map->isWalkable(grid_x, grid_z);
 }
 }
 
 
-auto TerrainService::isForbidden(int grid_x, int grid_z) const -> bool {
+auto TerrainService::is_forbidden(int grid_x, int grid_z) const -> bool {
   if (!m_height_map) {
   if (!m_height_map) {
     return false;
     return false;
   }
   }
@@ -85,8 +85,8 @@ auto TerrainService::isForbidden(int grid_x, int grid_z) const -> bool {
   return registry.isPointInBuilding(world_x, world_z);
   return registry.isPointInBuilding(world_x, world_z);
 }
 }
 
 
-auto TerrainService::isForbiddenWorld(float world_x,
-                                      float world_z) const -> bool {
+auto TerrainService::is_forbidden_world(float world_x,
+                                        float world_z) const -> bool {
   if (!m_height_map) {
   if (!m_height_map) {
     return false;
     return false;
   }
   }
@@ -106,25 +106,25 @@ auto TerrainService::isForbiddenWorld(float world_x,
   const int grid_x_int = static_cast<int>(std::round(grid_x));
   const int grid_x_int = static_cast<int>(std::round(grid_x));
   const int grid_z_int = static_cast<int>(std::round(grid_z));
   const int grid_z_int = static_cast<int>(std::round(grid_z));
 
 
-  return isForbidden(grid_x_int, grid_z_int);
+  return is_forbidden(grid_x_int, grid_z_int);
 }
 }
 
 
-auto TerrainService::isHillEntrance(int grid_x, int grid_z) const -> bool {
+auto TerrainService::is_hill_entrance(int grid_x, int grid_z) const -> bool {
   if (!m_height_map) {
   if (!m_height_map) {
     return false;
     return false;
   }
   }
   return m_height_map->isHillEntrance(grid_x, grid_z);
   return m_height_map->isHillEntrance(grid_x, grid_z);
 }
 }
 
 
-auto TerrainService::getTerrainType(int grid_x,
-                                    int grid_z) const -> TerrainType {
+auto TerrainService::get_terrain_type(int grid_x,
+                                      int grid_z) const -> TerrainType {
   if (!m_height_map) {
   if (!m_height_map) {
     return TerrainType::Flat;
     return TerrainType::Flat;
   }
   }
   return m_height_map->getTerrainType(grid_x, grid_z);
   return m_height_map->getTerrainType(grid_x, grid_z);
 }
 }
 
 
-void TerrainService::restoreFromSerialized(
+void TerrainService::restore_from_serialized(
     int width, int height, float tile_size, const std::vector<float> &heights,
     int width, int height, float tile_size, const std::vector<float> &heights,
     const std::vector<TerrainType> &terrain_types,
     const std::vector<TerrainType> &terrain_types,
     const std::vector<RiverSegment> &rivers,
     const std::vector<RiverSegment> &rivers,
@@ -132,7 +132,7 @@ void TerrainService::restoreFromSerialized(
     const BiomeSettings &biome) {
     const BiomeSettings &biome) {
   m_height_map = std::make_unique<TerrainHeightMap>(width, height, tile_size);
   m_height_map = std::make_unique<TerrainHeightMap>(width, height, tile_size);
   m_height_map->restoreFromData(heights, terrain_types, rivers, bridges);
   m_height_map->restoreFromData(heights, terrain_types, rivers, bridges);
-  m_biomeSettings = biome;
+  m_biome_settings = biome;
   m_road_segments = roads;
   m_road_segments = roads;
 }
 }
 
 

+ 23 - 23
game/map/terrain_service.h

@@ -17,30 +17,30 @@ public:
 
 
   void clear();
   void clear();
 
 
-  [[nodiscard]] auto getTerrainHeight(float world_x,
-                                      float world_z) const -> float;
+  [[nodiscard]] auto get_terrain_height(float world_x,
+                                        float world_z) const -> float;
 
 
-  [[nodiscard]] auto getTerrainHeightGrid(int grid_x,
-                                          int grid_z) const -> float;
+  [[nodiscard]] auto get_terrain_height_grid(int grid_x,
+                                             int grid_z) const -> float;
 
 
-  [[nodiscard]] auto isWalkable(int grid_x, int grid_z) const -> bool;
+  [[nodiscard]] auto is_walkable(int grid_x, int grid_z) const -> bool;
 
 
-  [[nodiscard]] auto isHillEntrance(int grid_x, int grid_z) const -> bool;
+  [[nodiscard]] auto is_hill_entrance(int grid_x, int grid_z) const -> bool;
 
 
-  [[nodiscard]] auto isForbidden(int grid_x, int grid_z) const -> bool;
+  [[nodiscard]] auto is_forbidden(int grid_x, int grid_z) const -> bool;
 
 
-  [[nodiscard]] auto isForbiddenWorld(float world_x,
-                                      float world_z) const -> bool;
+  [[nodiscard]] auto is_forbidden_world(float world_x,
+                                        float world_z) const -> bool;
 
 
-  [[nodiscard]] auto getTerrainType(int grid_x,
-                                    int grid_z) const -> TerrainType;
+  [[nodiscard]] auto get_terrain_type(int grid_x,
+                                      int grid_z) const -> TerrainType;
 
 
-  [[nodiscard]] auto getHeightMap() const -> const TerrainHeightMap * {
+  [[nodiscard]] auto get_height_map() const -> const TerrainHeightMap * {
     return m_height_map.get();
     return m_height_map.get();
   }
   }
 
 
-  [[nodiscard]] auto biomeSettings() const -> const BiomeSettings & {
-    return m_biomeSettings;
+  [[nodiscard]] auto biome_settings() const -> const BiomeSettings & {
+    return m_biome_settings;
   }
   }
 
 
   [[nodiscard]] auto fire_camps() const -> const std::vector<FireCamp> & {
   [[nodiscard]] auto fire_camps() const -> const std::vector<FireCamp> & {
@@ -54,17 +54,17 @@ public:
   [[nodiscard]] auto is_point_on_road(float world_x,
   [[nodiscard]] auto is_point_on_road(float world_x,
                                       float world_z) const -> bool;
                                       float world_z) const -> bool;
 
 
-  [[nodiscard]] auto isInitialized() const -> bool {
+  [[nodiscard]] auto is_initialized() const -> bool {
     return m_height_map != nullptr;
     return m_height_map != nullptr;
   }
   }
 
 
-  void restoreFromSerialized(int width, int height, float tile_size,
-                             const std::vector<float> &heights,
-                             const std::vector<TerrainType> &terrain_types,
-                             const std::vector<RiverSegment> &rivers,
-                             const std::vector<RoadSegment> &roads,
-                             const std::vector<Bridge> &bridges,
-                             const BiomeSettings &biome);
+  void restore_from_serialized(int width, int height, float tile_size,
+                               const std::vector<float> &heights,
+                               const std::vector<TerrainType> &terrain_types,
+                               const std::vector<RiverSegment> &rivers,
+                               const std::vector<RoadSegment> &roads,
+                               const std::vector<Bridge> &bridges,
+                               const BiomeSettings &biome);
 
 
 private:
 private:
   TerrainService() = default;
   TerrainService() = default;
@@ -74,7 +74,7 @@ private:
   auto operator=(const TerrainService &) -> TerrainService & = delete;
   auto operator=(const TerrainService &) -> TerrainService & = delete;
 
 
   std::unique_ptr<TerrainHeightMap> m_height_map;
   std::unique_ptr<TerrainHeightMap> m_height_map;
-  BiomeSettings m_biomeSettings;
+  BiomeSettings m_biome_settings;
   std::vector<FireCamp> m_fire_camps;
   std::vector<FireCamp> m_fire_camps;
   std::vector<RoadSegment> m_road_segments;
   std::vector<RoadSegment> m_road_segments;
 };
 };

+ 1 - 1
game/map/visibility_service.cpp

@@ -127,7 +127,7 @@ auto VisibilityService::gatherVisionSources(Engine::Core::World &world,
     }
     }
 
 
     if (unit->owner_id != player_id &&
     if (unit->owner_id != player_id &&
-        !owner_registry.areAllies(player_id, unit->owner_id)) {
+        !owner_registry.are_allies(player_id, unit->owner_id)) {
       continue;
       continue;
     }
     }
 
 

+ 1 - 1
game/map/visibility_service.h

@@ -28,7 +28,7 @@ public:
   auto update(Engine::Core::World &world, int player_id) -> bool;
   auto update(Engine::Core::World &world, int player_id) -> bool;
   void computeImmediate(Engine::Core::World &world, int player_id);
   void computeImmediate(Engine::Core::World &world, int player_id);
 
 
-  auto isInitialized() const -> bool { return m_initialized; }
+  auto is_initialized() const -> bool { return m_initialized; }
 
 
   auto getWidth() const -> int { return m_width; }
   auto getWidth() const -> int { return m_width; }
   auto getHeight() const -> int { return m_height; }
   auto getHeight() const -> int { return m_height; }

+ 12 - 12
game/systems/ai_system.cpp

@@ -34,7 +34,7 @@ AISystem::AISystem() {
   m_buildingAttackedSubscription = Engine::Core::ScopedEventSubscription<
   m_buildingAttackedSubscription = Engine::Core::ScopedEventSubscription<
       Engine::Core::BuildingAttackedEvent>(
       Engine::Core::BuildingAttackedEvent>(
       [this](const Engine::Core::BuildingAttackedEvent &event) {
       [this](const Engine::Core::BuildingAttackedEvent &event) {
-        this->onBuildingAttacked(event);
+        this->on_building_attacked(event);
       });
       });
 
 
   initializeAIPlayers();
   initializeAIPlayers();
@@ -48,14 +48,14 @@ void AISystem::reinitialize() {
 
 
 void AISystem::initializeAIPlayers() {
 void AISystem::initializeAIPlayers() {
   auto &registry = OwnerRegistry::instance();
   auto &registry = OwnerRegistry::instance();
-  const auto &ai_owner_ids = registry.getAIOwnerIds();
+  const auto &ai_owner_ids = registry.get_ai_owner_ids();
 
 
   if (ai_owner_ids.empty()) {
   if (ai_owner_ids.empty()) {
     return;
     return;
   }
   }
 
 
   for (uint32_t const player_id : ai_owner_ids) {
   for (uint32_t const player_id : ai_owner_ids) {
-    int const team_id = registry.getOwnerTeam(player_id);
+    int const team_id = registry.get_owner_team(player_id);
     AIInstance instance;
     AIInstance instance;
     instance.context.player_id = player_id;
     instance.context.player_id = player_id;
     instance.context.state = AI::AIState::Idle;
     instance.context.state = AI::AIState::Idle;
@@ -73,11 +73,11 @@ void AISystem::update(Engine::Core::World *world, float delta_time) {
     return;
     return;
   }
   }
 
 
-  m_totalGameTime += delta_time;
+  m_total_game_time += delta_time;
 
 
-  m_commandFilter.update(m_totalGameTime);
+  m_commandFilter.update(m_total_game_time);
 
 
-  processResults(*world);
+  process_results(*world);
 
 
   for (auto &ai : m_aiInstances) {
   for (auto &ai : m_aiInstances) {
 
 
@@ -93,7 +93,7 @@ void AISystem::update(Engine::Core::World *world, float delta_time) {
 
 
     AI::AISnapshot snapshot = Game::Systems::AI::AISnapshotBuilder::build(
     AI::AISnapshot snapshot = Game::Systems::AI::AISnapshotBuilder::build(
         *world, ai.context.player_id);
         *world, ai.context.player_id);
-    snapshot.gameTime = m_totalGameTime;
+    snapshot.game_time = m_total_game_time;
 
 
     AI::AIJob job;
     AI::AIJob job;
     job.snapshot = std::move(snapshot);
     job.snapshot = std::move(snapshot);
@@ -106,7 +106,7 @@ void AISystem::update(Engine::Core::World *world, float delta_time) {
   }
   }
 }
 }
 
 
-void AISystem::processResults(Engine::Core::World &world) {
+void AISystem::process_results(Engine::Core::World &world) {
 
 
   for (auto &ai : m_aiInstances) {
   for (auto &ai : m_aiInstances) {
 
 
@@ -119,7 +119,7 @@ void AISystem::processResults(Engine::Core::World &world) {
       ai.context = result.context;
       ai.context = result.context;
 
 
       auto filtered_commands =
       auto filtered_commands =
-          m_commandFilter.filter(result.commands, m_totalGameTime);
+          m_commandFilter.filter(result.commands, m_total_game_time);
 
 
       Game::Systems::AI::AICommandApplier::apply(world, ai.context.player_id,
       Game::Systems::AI::AICommandApplier::apply(world, ai.context.player_id,
                                                  filtered_commands);
                                                  filtered_commands);
@@ -129,14 +129,14 @@ void AISystem::processResults(Engine::Core::World &world) {
   }
   }
 }
 }
 
 
-void AISystem::onBuildingAttacked(
+void AISystem::on_building_attacked(
     const Engine::Core::BuildingAttackedEvent &event) {
     const Engine::Core::BuildingAttackedEvent &event) {
   for (auto &ai : m_aiInstances) {
   for (auto &ai : m_aiInstances) {
     if (ai.context.player_id == event.owner_id) {
     if (ai.context.player_id == event.owner_id) {
-      ai.context.buildingsUnderAttack[event.buildingId] = m_totalGameTime;
+      ai.context.buildingsUnderAttack[event.buildingId] = m_total_game_time;
 
 
       if (event.buildingId == ai.context.primaryBarracks) {
       if (event.buildingId == ai.context.primaryBarracks) {
-        ai.context.barracksUnderThreat = true;
+        ai.context.barracks_under_threat = true;
       }
       }
       break;
       break;
     }
     }

+ 3 - 3
game/systems/ai_system.h

@@ -45,16 +45,16 @@ private:
   AI::AICommandApplier m_applier;
   AI::AICommandApplier m_applier;
   AI::AICommandFilter m_commandFilter;
   AI::AICommandFilter m_commandFilter;
 
 
-  float m_totalGameTime = 0.0F;
+  float m_total_game_time = 0.0F;
 
 
   Engine::Core::ScopedEventSubscription<Engine::Core::BuildingAttackedEvent>
   Engine::Core::ScopedEventSubscription<Engine::Core::BuildingAttackedEvent>
       m_buildingAttackedSubscription;
       m_buildingAttackedSubscription;
 
 
   void initializeAIPlayers();
   void initializeAIPlayers();
 
 
-  void processResults(Engine::Core::World &world);
+  void process_results(Engine::Core::World &world);
 
 
-  void onBuildingAttacked(const Engine::Core::BuildingAttackedEvent &event);
+  void on_building_attacked(const Engine::Core::BuildingAttackedEvent &event);
 };
 };
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 1 - 1
game/systems/ai_system/ai_command_applier.cpp

@@ -133,7 +133,7 @@ void AICommandApplier::apply(Engine::Core::World &world, int aiOwnerId,
       int const current_troops =
       int const current_troops =
           Engine::Core::World::count_troops_for_player(aiOwnerId);
           Engine::Core::World::count_troops_for_player(aiOwnerId);
       int const max_troops =
       int const max_troops =
-          Game::GameConfig::instance().getMaxTroopsPerPlayer();
+          Game::GameConfig::instance().get_max_troops_per_player();
       Game::Units::TroopType const product_type = production->product_type;
       Game::Units::TroopType const product_type = production->product_type;
       int const individuals_per_unit =
       int const individuals_per_unit =
           Game::Units::TroopConfig::instance().getIndividualsPerUnit(
           Game::Units::TroopConfig::instance().getIndividualsPerUnit(

+ 53 - 50
game/systems/ai_system/ai_reasoner.cpp

@@ -13,8 +13,9 @@ namespace Game::Systems::AI {
 void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
 void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
 
 
   if (ctx.nation == nullptr) {
   if (ctx.nation == nullptr) {
-    ctx.nation = Game::Systems::NationRegistry::instance().getNationForPlayer(
-        ctx.player_id);
+    ctx.nation =
+        Game::Systems::NationRegistry::instance().get_nation_for_player(
+            ctx.player_id);
   }
   }
 
 
   cleanupDeadUnits(snapshot, ctx);
   cleanupDeadUnits(snapshot, ctx);
@@ -23,39 +24,39 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
   ctx.buildings.clear();
   ctx.buildings.clear();
   ctx.primaryBarracks = 0;
   ctx.primaryBarracks = 0;
   ctx.total_units = 0;
   ctx.total_units = 0;
-  ctx.idleUnits = 0;
-  ctx.combatUnits = 0;
-  ctx.meleeCount = 0;
+  ctx.idle_units = 0;
+  ctx.combat_units = 0;
+  ctx.melee_count = 0;
   ctx.rangedCount = 0;
   ctx.rangedCount = 0;
   ctx.damagedUnitsCount = 0;
   ctx.damagedUnitsCount = 0;
-  ctx.averageHealth = 1.0F;
+  ctx.average_health = 1.0F;
   ctx.rally_x = 0.0F;
   ctx.rally_x = 0.0F;
   ctx.rally_z = 0.0F;
   ctx.rally_z = 0.0F;
-  ctx.barracksUnderThreat = false;
-  ctx.nearbyThreatCount = 0;
-  ctx.closest_threatDistance = std::numeric_limits<float>::infinity();
-  ctx.basePosX = 0.0F;
-  ctx.basePosY = 0.0F;
-  ctx.basePosZ = 0.0F;
+  ctx.barracks_under_threat = false;
+  ctx.nearby_threat_count = 0;
+  ctx.closest_threat_distance = std::numeric_limits<float>::infinity();
+  ctx.base_pos_x = 0.0F;
+  ctx.base_pos_y = 0.0F;
+  ctx.base_pos_z = 0.0F;
   ctx.visibleEnemyCount = 0;
   ctx.visibleEnemyCount = 0;
   ctx.enemyBuildingsCount = 0;
   ctx.enemyBuildingsCount = 0;
   ctx.averageEnemyDistance = 0.0F;
   ctx.averageEnemyDistance = 0.0F;
   ctx.max_troops_per_player =
   ctx.max_troops_per_player =
-      Game::GameConfig::instance().getMaxTroopsPerPlayer();
+      Game::GameConfig::instance().get_max_troops_per_player();
 
 
   constexpr float attack_record_timeout = 10.0F;
   constexpr float attack_record_timeout = 10.0F;
   auto it = ctx.buildingsUnderAttack.begin();
   auto it = ctx.buildingsUnderAttack.begin();
   while (it != ctx.buildingsUnderAttack.end()) {
   while (it != ctx.buildingsUnderAttack.end()) {
     bool still_exists = false;
     bool still_exists = false;
     for (const auto &entity : snapshot.friendlies) {
     for (const auto &entity : snapshot.friendlies) {
-      if (entity.id == it->first && entity.isBuilding) {
+      if (entity.id == it->first && entity.is_building) {
         still_exists = true;
         still_exists = true;
         break;
         break;
       }
       }
     }
     }
 
 
     if (!still_exists ||
     if (!still_exists ||
-        (snapshot.gameTime - it->second) > attack_record_timeout) {
+        (snapshot.game_time - it->second) > attack_record_timeout) {
       it = ctx.buildingsUnderAttack.erase(it);
       it = ctx.buildingsUnderAttack.erase(it);
     } else {
     } else {
       ++it;
       ++it;
@@ -65,7 +66,7 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
   float total_health_ratio = 0.0F;
   float total_health_ratio = 0.0F;
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       ctx.buildings.push_back(entity.id);
       ctx.buildings.push_back(entity.id);
 
 
       if (entity.spawn_type == Game::Units::SpawnType::Barracks &&
       if (entity.spawn_type == Game::Units::SpawnType::Barracks &&
@@ -73,9 +74,9 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
         ctx.primaryBarracks = entity.id;
         ctx.primaryBarracks = entity.id;
         ctx.rally_x = entity.posX - 5.0F;
         ctx.rally_x = entity.posX - 5.0F;
         ctx.rally_z = entity.posZ;
         ctx.rally_z = entity.posZ;
-        ctx.basePosX = entity.posX;
-        ctx.basePosY = entity.posY;
-        ctx.basePosZ = entity.posZ;
+        ctx.base_pos_x = entity.posX;
+        ctx.base_pos_y = entity.posY;
+        ctx.base_pos_z = entity.posZ;
       }
       }
       continue;
       continue;
     }
     }
@@ -91,15 +92,15 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
         if (ctx.nation->is_ranged_unit(troop_type)) {
         if (ctx.nation->is_ranged_unit(troop_type)) {
           ctx.rangedCount++;
           ctx.rangedCount++;
         } else if (ctx.nation->isMeleeUnit(troop_type)) {
         } else if (ctx.nation->isMeleeUnit(troop_type)) {
-          ctx.meleeCount++;
+          ctx.melee_count++;
         }
         }
       }
       }
     }
     }
 
 
     if (!entity.movement.has_component || !entity.movement.has_target) {
     if (!entity.movement.has_component || !entity.movement.has_target) {
-      ctx.idleUnits++;
+      ctx.idle_units++;
     } else {
     } else {
-      ctx.combatUnits++;
+      ctx.combat_units++;
     }
     }
 
 
     if (entity.max_health > 0) {
     if (entity.max_health > 0) {
@@ -113,7 +114,7 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
     }
     }
   }
   }
 
 
-  ctx.averageHealth =
+  ctx.average_health =
       (ctx.total_units > 0)
       (ctx.total_units > 0)
           ? (total_health_ratio / static_cast<float>(ctx.total_units))
           ? (total_health_ratio / static_cast<float>(ctx.total_units))
           : 1.0F;
           : 1.0F;
@@ -122,13 +123,14 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
   float total_enemy_dist = 0.0F;
   float total_enemy_dist = 0.0F;
 
 
   for (const auto &enemy : snapshot.visibleEnemies) {
   for (const auto &enemy : snapshot.visibleEnemies) {
-    if (enemy.isBuilding) {
+    if (enemy.is_building) {
       ctx.enemyBuildingsCount++;
       ctx.enemyBuildingsCount++;
     }
     }
 
 
     if (ctx.primaryBarracks != 0) {
     if (ctx.primaryBarracks != 0) {
-      float const dist = distance(enemy.posX, enemy.posY, enemy.posZ,
-                                  ctx.basePosX, ctx.basePosY, ctx.basePosZ);
+      float const dist =
+          distance(enemy.posX, enemy.posY, enemy.posZ, ctx.base_pos_x,
+                   ctx.base_pos_y, ctx.base_pos_z);
       total_enemy_dist += dist;
       total_enemy_dist += dist;
     }
     }
   }
   }
@@ -147,32 +149,33 @@ void AIReasoner::updateContext(const AISnapshot &snapshot, AIContext &ctx) {
 
 
     for (const auto &enemy : snapshot.visibleEnemies) {
     for (const auto &enemy : snapshot.visibleEnemies) {
       float const dist_sq =
       float const dist_sq =
-          distance_squared(enemy.posX, enemy.posY, enemy.posZ, ctx.basePosX,
-                           ctx.basePosY, ctx.basePosZ);
+          distance_squared(enemy.posX, enemy.posY, enemy.posZ, ctx.base_pos_x,
+                           ctx.base_pos_y, ctx.base_pos_z);
 
 
       if (dist_sq <= defend_radius_sq) {
       if (dist_sq <= defend_radius_sq) {
-        ctx.barracksUnderThreat = true;
-        ctx.nearbyThreatCount++;
+        ctx.barracks_under_threat = true;
+        ctx.nearby_threat_count++;
 
 
         float const dist = std::sqrt(std::max(dist_sq, 0.0F));
         float const dist = std::sqrt(std::max(dist_sq, 0.0F));
-        ctx.closest_threatDistance = std::min(ctx.closest_threatDistance, dist);
+        ctx.closest_threat_distance =
+            std::min(ctx.closest_threat_distance, dist);
       }
       }
     }
     }
 
 
-    if (!ctx.barracksUnderThreat) {
-      ctx.closest_threatDistance = std::numeric_limits<float>::infinity();
+    if (!ctx.barracks_under_threat) {
+      ctx.closest_threat_distance = std::numeric_limits<float>::infinity();
     }
     }
   }
   }
 }
 }
 
 
 void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
 void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
-  ctx.stateTimer += delta_time;
-  ctx.decisionTimer += delta_time;
+  ctx.state_timer += delta_time;
+  ctx.decision_timer += delta_time;
 
 
   constexpr float min_state_duration = 3.0F;
   constexpr float min_state_duration = 3.0F;
 
 
   AIState previous_state = ctx.state;
   AIState previous_state = ctx.state;
-  if ((ctx.barracksUnderThreat || !ctx.buildingsUnderAttack.empty()) &&
+  if ((ctx.barracks_under_threat || !ctx.buildingsUnderAttack.empty()) &&
       ctx.state != AIState::Defending) {
       ctx.state != AIState::Defending) {
 
 
     ctx.state = AIState::Defending;
     ctx.state = AIState::Defending;
@@ -183,27 +186,27 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
     ctx.state = AIState::Defending;
     ctx.state = AIState::Defending;
   }
   }
 
 
-  if (ctx.decisionTimer < 2.0F) {
+  if (ctx.decision_timer < 2.0F) {
     if (ctx.state != previous_state) {
     if (ctx.state != previous_state) {
-      ctx.stateTimer = 0.0F;
+      ctx.state_timer = 0.0F;
     }
     }
     return;
     return;
   }
   }
 
 
-  ctx.decisionTimer = 0.0F;
+  ctx.decision_timer = 0.0F;
   previous_state = ctx.state;
   previous_state = ctx.state;
 
 
-  if (ctx.stateTimer < min_state_duration &&
-      ((!ctx.barracksUnderThreat && ctx.buildingsUnderAttack.empty()) ||
+  if (ctx.state_timer < min_state_duration &&
+      ((!ctx.barracks_under_threat && ctx.buildingsUnderAttack.empty()) ||
        ctx.state == AIState::Defending)) {
        ctx.state == AIState::Defending)) {
     return;
     return;
   }
   }
 
 
   switch (ctx.state) {
   switch (ctx.state) {
   case AIState::Idle:
   case AIState::Idle:
-    if (ctx.idleUnits >= 2) {
+    if (ctx.idle_units >= 2) {
       ctx.state = AIState::Gathering;
       ctx.state = AIState::Gathering;
-    } else if (ctx.averageHealth < 0.40F && ctx.total_units > 0) {
+    } else if (ctx.average_health < 0.40F && ctx.total_units > 0) {
 
 
       ctx.state = AIState::Defending;
       ctx.state = AIState::Defending;
     } else if (ctx.total_units >= 1 && ctx.visibleEnemyCount > 0) {
     } else if (ctx.total_units >= 1 && ctx.visibleEnemyCount > 0) {
@@ -218,7 +221,7 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
       ctx.state = AIState::Attacking;
       ctx.state = AIState::Attacking;
     } else if (ctx.total_units < 2) {
     } else if (ctx.total_units < 2) {
       ctx.state = AIState::Idle;
       ctx.state = AIState::Idle;
-    } else if (ctx.averageHealth < 0.40F) {
+    } else if (ctx.average_health < 0.40F) {
 
 
       ctx.state = AIState::Defending;
       ctx.state = AIState::Defending;
     } else if (ctx.visibleEnemyCount > 0 && ctx.total_units >= 2) {
     } else if (ctx.visibleEnemyCount > 0 && ctx.total_units >= 2) {
@@ -228,7 +231,7 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
     break;
     break;
 
 
   case AIState::Attacking:
   case AIState::Attacking:
-    if (ctx.averageHealth < 0.25F) {
+    if (ctx.average_health < 0.25F) {
 
 
       ctx.state = AIState::Retreating;
       ctx.state = AIState::Retreating;
     } else if (ctx.total_units == 0) {
     } else if (ctx.total_units == 0) {
@@ -240,12 +243,12 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
 
 
   case AIState::Defending:
   case AIState::Defending:
 
 
-    if (ctx.barracksUnderThreat || !ctx.buildingsUnderAttack.empty()) {
+    if (ctx.barracks_under_threat || !ctx.buildingsUnderAttack.empty()) {
 
 
-    } else if (ctx.total_units >= 4 && ctx.averageHealth > 0.65F) {
+    } else if (ctx.total_units >= 4 && ctx.average_health > 0.65F) {
 
 
       ctx.state = AIState::Attacking;
       ctx.state = AIState::Attacking;
-    } else if (ctx.averageHealth > 0.80F) {
+    } else if (ctx.average_health > 0.80F) {
 
 
       ctx.state = AIState::Idle;
       ctx.state = AIState::Idle;
     }
     }
@@ -253,7 +256,7 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
 
 
   case AIState::Retreating:
   case AIState::Retreating:
 
 
-    if (ctx.stateTimer > 6.0F && ctx.averageHealth > 0.55F) {
+    if (ctx.state_timer > 6.0F && ctx.average_health > 0.55F) {
 
 
       ctx.state = AIState::Defending;
       ctx.state = AIState::Defending;
     }
     }
@@ -266,7 +269,7 @@ void AIReasoner::updateStateMachine(AIContext &ctx, float delta_time) {
   }
   }
 
 
   if (ctx.state != previous_state) {
   if (ctx.state != previous_state) {
-    ctx.stateTimer = 0.0F;
+    ctx.state_timer = 0.0F;
   }
   }
 }
 }
 
 

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

@@ -42,7 +42,7 @@ auto AISnapshotBuilder::build(const Engine::Core::World &world,
     data.owner_id = unit->owner_id;
     data.owner_id = unit->owner_id;
     data.health = unit->health;
     data.health = unit->health;
     data.max_health = unit->max_health;
     data.max_health = unit->max_health;
-    data.isBuilding = entity->has_component<Engine::Core::BuildingComponent>();
+    data.is_building = entity->has_component<Engine::Core::BuildingComponent>();
 
 
     if (auto *transform =
     if (auto *transform =
             entity->get_component<Engine::Core::TransformComponent>()) {
             entity->get_component<Engine::Core::TransformComponent>()) {
@@ -93,7 +93,7 @@ auto AISnapshotBuilder::build(const Engine::Core::World &world,
 
 
     ContactSnapshot contact;
     ContactSnapshot contact;
     contact.id = entity->get_id();
     contact.id = entity->get_id();
-    contact.isBuilding =
+    contact.is_building =
         entity->has_component<Engine::Core::BuildingComponent>();
         entity->has_component<Engine::Core::BuildingComponent>();
     contact.posX = transform->position.x;
     contact.posX = transform->position.x;
     contact.posY = 0.0F;
     contact.posY = 0.0F;

+ 23 - 23
game/systems/ai_system/ai_tactical.cpp

@@ -15,17 +15,17 @@ namespace Game::Systems::AI {
 auto TacticalUtils::assessEngagement(
 auto TacticalUtils::assessEngagement(
     const std::vector<const EntitySnapshot *> &friendlies,
     const std::vector<const EntitySnapshot *> &friendlies,
     const std::vector<const ContactSnapshot *> &enemies,
     const std::vector<const ContactSnapshot *> &enemies,
-    float minForceRatio) -> TacticalUtils::EngagementAssessment {
+    float min_force_ratio) -> TacticalUtils::EngagementAssessment {
 
 
   EngagementAssessment result;
   EngagementAssessment result;
 
 
   if (friendlies.empty() || enemies.empty()) {
   if (friendlies.empty() || enemies.empty()) {
-    result.shouldEngage = false;
+    result.should_engage = false;
     return result;
     return result;
   }
   }
 
 
-  result.friendlyCount = static_cast<int>(friendlies.size());
-  result.enemyCount = static_cast<int>(enemies.size());
+  result.friendly_count = static_cast<int>(friendlies.size());
+  result.enemy_count = static_cast<int>(enemies.size());
 
 
   float total_friendly_health = 0.0F;
   float total_friendly_health = 0.0F;
   float total_enemy_health = 0.0F;
   float total_enemy_health = 0.0F;
@@ -48,26 +48,26 @@ auto TacticalUtils::assessEngagement(
     }
     }
   }
   }
 
 
-  result.avgFriendlyHealth =
+  result.avg_friendly_health =
       valid_friendlies > 0 ? (total_friendly_health / valid_friendlies) : 1.0F;
       valid_friendlies > 0 ? (total_friendly_health / valid_friendlies) : 1.0F;
-  result.avgEnemyHealth =
+  result.avg_enemy_health =
       valid_enemies > 0 ? (total_enemy_health / valid_enemies) : 1.0F;
       valid_enemies > 0 ? (total_enemy_health / valid_enemies) : 1.0F;
 
 
   float const friendly_strength =
   float const friendly_strength =
-      static_cast<float>(result.friendlyCount) * result.avgFriendlyHealth;
+      static_cast<float>(result.friendly_count) * result.avg_friendly_health;
   float const enemy_strength =
   float const enemy_strength =
-      static_cast<float>(result.enemyCount) * result.avgEnemyHealth;
+      static_cast<float>(result.enemy_count) * result.avg_enemy_health;
 
 
   if (enemy_strength < 0.01F) {
   if (enemy_strength < 0.01F) {
-    result.forceRatio = 10.0F;
+    result.force_ratio = 10.0F;
   } else {
   } else {
-    result.forceRatio = friendly_strength / enemy_strength;
+    result.force_ratio = friendly_strength / enemy_strength;
   }
   }
 
 
-  result.confidenceLevel =
-      std::clamp((result.forceRatio - 0.5F) / 1.5F, 0.0F, 1.0F);
+  result.confidence_level =
+      std::clamp((result.force_ratio - 0.5F) / 1.5F, 0.0F, 1.0F);
 
 
-  result.shouldEngage = (result.forceRatio >= minForceRatio);
+  result.should_engage = (result.force_ratio >= min_force_ratio);
 
 
   return result;
   return result;
 }
 }
@@ -109,7 +109,7 @@ auto TacticalUtils::selectFocusFireTarget(
         Game::Units::spawn_typeToString(enemy->spawn_type), context.nation);
         Game::Units::spawn_typeToString(enemy->spawn_type), context.nation);
     score += type_priority * 3.0F;
     score += type_priority * 3.0F;
 
 
-    if (!enemy->isBuilding) {
+    if (!enemy->is_building) {
       score += 5.0F;
       score += 5.0F;
     }
     }
 
 
@@ -124,25 +124,25 @@ auto TacticalUtils::selectFocusFireTarget(
 
 
     if (context.primaryBarracks != 0) {
     if (context.primaryBarracks != 0) {
       float const dist_to_base =
       float const dist_to_base =
-          distance(enemy->posX, enemy->posY, enemy->posZ, context.basePosX,
-                   context.basePosY, context.basePosZ);
+          distance(enemy->posX, enemy->posY, enemy->posZ, context.base_pos_x,
+                   context.base_pos_y, context.base_pos_z);
 
 
       if (dist_to_base < 16.0F) {
       if (dist_to_base < 16.0F) {
         score += (16.0F - dist_to_base) * 0.8F;
         score += (16.0F - dist_to_base) * 0.8F;
       }
       }
     }
     }
 
 
-    if (context.state == AIState::Attacking && !enemy->isBuilding) {
+    if (context.state == AIState::Attacking && !enemy->is_building) {
       score += 3.0F;
       score += 3.0F;
     }
     }
 
 
     if (score > best_target.score) {
     if (score > best_target.score) {
       best_target.target_id = enemy->id;
       best_target.target_id = enemy->id;
       best_target.score = score;
       best_target.score = score;
-      best_target.distanceToGroup = dist;
-      best_target.isLowHealth =
+      best_target.distance_to_group = dist;
+      best_target.is_low_health =
           (enemy->max_health > 0 && enemy->health < enemy->max_health / 2);
           (enemy->max_health > 0 && enemy->health < enemy->max_health / 2);
-      best_target.isIsolated = isolated;
+      best_target.is_isolated = isolated;
     }
     }
   }
   }
 
 
@@ -184,9 +184,9 @@ auto TacticalUtils::calculateForceStrength(
 auto TacticalUtils::isTargetIsolated(
 auto TacticalUtils::isTargetIsolated(
     const ContactSnapshot &target,
     const ContactSnapshot &target,
     const std::vector<const ContactSnapshot *> &allEnemies,
     const std::vector<const ContactSnapshot *> &allEnemies,
-    float isolationRadius) -> bool {
+    float isolation_radius) -> bool {
 
 
-  const float isolation_radius_sq = isolationRadius * isolationRadius;
+  const float isolation_radius_sq = isolation_radius * isolation_radius;
   int nearby_allies = 0;
   int nearby_allies = 0;
 
 
   for (const auto *enemy : allEnemies) {
   for (const auto *enemy : allEnemies) {
@@ -226,7 +226,7 @@ auto TacticalUtils::getUnitTypePriority(const std::string &unit_type,
   }
   }
 
 
   auto spawn_type = Game::Units::spawn_typeFromString(unit_type);
   auto spawn_type = Game::Units::spawn_typeFromString(unit_type);
-  if (spawn_type && Game::Units::isBuildingSpawn(*spawn_type)) {
+  if (spawn_type && Game::Units::is_building_spawn(*spawn_type)) {
     return 0.5F;
     return 0.5F;
   }
   }
 
 

+ 12 - 12
game/systems/ai_system/ai_tactical.h

@@ -8,27 +8,27 @@ namespace Game::Systems::AI {
 class TacticalUtils {
 class TacticalUtils {
 public:
 public:
   struct EngagementAssessment {
   struct EngagementAssessment {
-    bool shouldEngage = false;
-    float forceRatio = 0.0F;
-    float confidenceLevel = 0.0F;
-    int friendlyCount = 0;
-    int enemyCount = 0;
-    float avgFriendlyHealth = 1.0F;
-    float avgEnemyHealth = 1.0F;
+    bool should_engage = false;
+    float force_ratio = 0.0F;
+    float confidence_level = 0.0F;
+    int friendly_count = 0;
+    int enemy_count = 0;
+    float avg_friendly_health = 1.0F;
+    float avg_enemy_health = 1.0F;
   };
   };
 
 
   struct TargetScore {
   struct TargetScore {
     Engine::Core::EntityID target_id = 0;
     Engine::Core::EntityID target_id = 0;
     float score = 0.0F;
     float score = 0.0F;
-    float distanceToGroup = 0.0F;
-    bool isLowHealth = false;
-    bool isIsolated = false;
+    float distance_to_group = 0.0F;
+    bool is_low_health = false;
+    bool is_isolated = false;
   };
   };
 
 
   static auto
   static auto
   assessEngagement(const std::vector<const EntitySnapshot *> &friendlies,
   assessEngagement(const std::vector<const EntitySnapshot *> &friendlies,
                    const std::vector<const ContactSnapshot *> &enemies,
                    const std::vector<const ContactSnapshot *> &enemies,
-                   float minForceRatio = 0.8F) -> EngagementAssessment;
+                   float min_force_ratio = 0.8F) -> EngagementAssessment;
 
 
   static auto selectFocusFireTarget(
   static auto selectFocusFireTarget(
       const std::vector<const EntitySnapshot *> &attackers,
       const std::vector<const EntitySnapshot *> &attackers,
@@ -45,7 +45,7 @@ public:
   static auto
   static auto
   isTargetIsolated(const ContactSnapshot &target,
   isTargetIsolated(const ContactSnapshot &target,
                    const std::vector<const ContactSnapshot *> &allEnemies,
                    const std::vector<const ContactSnapshot *> &allEnemies,
-                   float isolationRadius = 8.0F) -> bool;
+                   float isolation_radius = 8.0F) -> bool;
 
 
   static auto
   static auto
   getUnitTypePriority(const std::string &unit_type,
   getUnitTypePriority(const std::string &unit_type,

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

@@ -60,7 +60,7 @@ struct EntitySnapshot {
   int owner_id = 0;
   int owner_id = 0;
   int health = 0;
   int health = 0;
   int max_health = 0;
   int max_health = 0;
-  bool isBuilding = false;
+  bool is_building = false;
 
 
   float posX = 0.0F;
   float posX = 0.0F;
   float posY = 0.0F;
   float posY = 0.0F;
@@ -72,7 +72,7 @@ struct EntitySnapshot {
 
 
 struct ContactSnapshot {
 struct ContactSnapshot {
   Engine::Core::EntityID id = 0;
   Engine::Core::EntityID id = 0;
-  bool isBuilding = false;
+  bool is_building = false;
 
 
   float posX = 0.0F;
   float posX = 0.0F;
   float posY = 0.0F;
   float posY = 0.0F;
@@ -88,14 +88,14 @@ struct AISnapshot {
   std::vector<EntitySnapshot> friendlies;
   std::vector<EntitySnapshot> friendlies;
   std::vector<ContactSnapshot> visibleEnemies;
   std::vector<ContactSnapshot> visibleEnemies;
 
 
-  float gameTime = 0.0F;
+  float game_time = 0.0F;
 };
 };
 
 
 struct AIContext {
 struct AIContext {
   int player_id = 0;
   int player_id = 0;
   AIState state = AIState::Idle;
   AIState state = AIState::Idle;
-  float stateTimer = 0.0F;
-  float decisionTimer = 0.0F;
+  float state_timer = 0.0F;
+  float decision_timer = 0.0F;
 
 
   const Game::Systems::Nation *nation = nullptr;
   const Game::Systems::Nation *nation = nullptr;
 
 
@@ -105,28 +105,28 @@ struct AIContext {
 
 
   float rally_x = 0.0F;
   float rally_x = 0.0F;
   float rally_z = 0.0F;
   float rally_z = 0.0F;
-  int targetPriority = 0;
+  int target_priority = 0;
 
 
   int total_units = 0;
   int total_units = 0;
-  int idleUnits = 0;
-  int combatUnits = 0;
-  float averageHealth = 1.0F;
-  bool barracksUnderThreat = false;
-  int nearbyThreatCount = 0;
-  float closest_threatDistance = 0.0F;
+  int idle_units = 0;
+  int combat_units = 0;
+  float average_health = 1.0F;
+  bool barracks_under_threat = false;
+  int nearby_threat_count = 0;
+  float closest_threat_distance = 0.0F;
 
 
-  float basePosX = 0.0F;
-  float basePosY = 0.0F;
-  float basePosZ = 0.0F;
+  float base_pos_x = 0.0F;
+  float base_pos_y = 0.0F;
+  float base_pos_z = 0.0F;
 
 
   struct UnitAssignment {
   struct UnitAssignment {
     BehaviorPriority ownerPriority = BehaviorPriority::Normal;
     BehaviorPriority ownerPriority = BehaviorPriority::Normal;
-    float assignmentTime = 0.0F;
+    float assignment_time = 0.0F;
     std::string assignedTask;
     std::string assignedTask;
   };
   };
   std::unordered_map<Engine::Core::EntityID, UnitAssignment> assignedUnits;
   std::unordered_map<Engine::Core::EntityID, UnitAssignment> assignedUnits;
 
 
-  int meleeCount = 0;
+  int melee_count = 0;
   int rangedCount = 0;
   int rangedCount = 0;
   int damagedUnitsCount = 0;
   int damagedUnitsCount = 0;
 
 

+ 4 - 4
game/systems/ai_system/ai_utils.h

@@ -92,7 +92,7 @@ inline auto claimUnits(
 
 
       AIContext::UnitAssignment assignment;
       AIContext::UnitAssignment assignment;
       assignment.ownerPriority = priority;
       assignment.ownerPriority = priority;
-      assignment.assignmentTime = currentTime;
+      assignment.assignment_time = currentTime;
       assignment.assignedTask = taskName;
       assignment.assignedTask = taskName;
       context.assignedUnits[unit_id] = assignment;
       context.assignedUnits[unit_id] = assignment;
       claimed.push_back(unit_id);
       claimed.push_back(unit_id);
@@ -100,7 +100,7 @@ inline auto claimUnits(
     } else {
     } else {
 
 
       const auto &existing = it->second;
       const auto &existing = it->second;
-      float const assignmentAge = currentTime - existing.assignmentTime;
+      float const assignmentAge = currentTime - existing.assignment_time;
 
 
       bool const canSteal = (priority > existing.ownerPriority) &&
       bool const canSteal = (priority > existing.ownerPriority) &&
                             (assignmentAge > minLockDuration);
                             (assignmentAge > minLockDuration);
@@ -109,7 +109,7 @@ inline auto claimUnits(
 
 
         AIContext::UnitAssignment assignment;
         AIContext::UnitAssignment assignment;
         assignment.ownerPriority = priority;
         assignment.ownerPriority = priority;
-        assignment.assignmentTime = currentTime;
+        assignment.assignment_time = currentTime;
         assignment.assignedTask = taskName;
         assignment.assignedTask = taskName;
         context.assignedUnits[unit_id] = assignment;
         context.assignedUnits[unit_id] = assignment;
         claimed.push_back(unit_id);
         claimed.push_back(unit_id);
@@ -131,7 +131,7 @@ inline void cleanupDeadUnits(const AISnapshot &snapshot, AIContext &context) {
 
 
   std::unordered_set<Engine::Core::EntityID> aliveUnits;
   std::unordered_set<Engine::Core::EntityID> aliveUnits;
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (!entity.isBuilding) {
+    if (!entity.is_building) {
       aliveUnits.insert(entity.id);
       aliveUnits.insert(entity.id);
     }
     }
   }
   }

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

@@ -35,7 +35,7 @@ void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   float group_center_z = 0.0F;
   float group_center_z = 0.0F;
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 
@@ -90,7 +90,7 @@ void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
       float closest_barracks_dist_sq = std::numeric_limits<float>::max();
       float closest_barracks_dist_sq = std::numeric_limits<float>::max();
 
 
       for (const auto &enemy : snapshot.visibleEnemies) {
       for (const auto &enemy : snapshot.visibleEnemies) {
-        if (enemy.isBuilding) {
+        if (enemy.is_building) {
           float const dist_sq =
           float const dist_sq =
               distance_squared(enemy.posX, enemy.posY, enemy.posZ,
               distance_squared(enemy.posX, enemy.posY, enemy.posZ,
                                group_center_x, group_center_y, group_center_z);
                                group_center_x, group_center_y, group_center_z);
@@ -190,7 +190,7 @@ void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
 
 
   bool const being_attacked = context.damagedUnitsCount > 0;
   bool const being_attacked = context.damagedUnitsCount > 0;
 
 
-  if (!assessment.shouldEngage && !context.barracksUnderThreat &&
+  if (!assessment.should_engage && !context.barracks_under_threat &&
       !being_attacked) {
       !being_attacked) {
 
 
     m_lastTarget = 0;
     m_lastTarget = 0;
@@ -245,8 +245,8 @@ void AttackBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   command.target_id = target_info.target_id;
   command.target_id = target_info.target_id;
 
 
   bool const should_chase_aggressive =
   bool const should_chase_aggressive =
-      (context.state == AIState::Attacking || context.barracksUnderThreat) &&
-      assessment.forceRatio >= 0.8F;
+      (context.state == AIState::Attacking || context.barracks_under_threat) &&
+      assessment.force_ratio >= 0.8F;
 
 
   command.should_chase = should_chase_aggressive;
   command.should_chase = should_chase_aggressive;
 
 
@@ -261,7 +261,7 @@ auto AttackBehavior::should_execute(const AISnapshot &snapshot,
 
 
   int ready_units = 0;
   int ready_units = 0;
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 
@@ -285,7 +285,7 @@ auto AttackBehavior::should_execute(const AISnapshot &snapshot,
   }
   }
 
 
   if (context.state == AIState::Defending) {
   if (context.state == AIState::Defending) {
-    return context.barracksUnderThreat && ready_units >= 2;
+    return context.barracks_under_threat && ready_units >= 2;
   }
   }
 
 
   return ready_units >= 1;
   return ready_units >= 1;

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

@@ -21,7 +21,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
                              std::vector<AICommand> &outCommands) {
                              std::vector<AICommand> &outCommands) {
   m_defendTimer += delta_time;
   m_defendTimer += delta_time;
 
 
-  float const update_interval = context.barracksUnderThreat ? 0.5F : 1.5F;
+  float const update_interval = context.barracks_under_threat ? 0.5F : 1.5F;
 
 
   if (m_defendTimer < update_interval) {
   if (m_defendTimer < update_interval) {
     return;
     return;
@@ -57,7 +57,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   engaged_defenders.reserve(snapshot.friendlies.size());
   engaged_defenders.reserve(snapshot.friendlies.size());
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 
@@ -92,7 +92,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
       ready_defenders.size() + engaged_defenders.size();
       ready_defenders.size() + engaged_defenders.size();
   std::size_t desired_count = total_available;
   std::size_t desired_count = total_available;
 
 
-  if (context.barracksUnderThreat || !context.buildingsUnderAttack.empty()) {
+  if (context.barracks_under_threat || !context.buildingsUnderAttack.empty()) {
 
 
     desired_count = total_available;
     desired_count = total_available;
   } else {
   } else {
@@ -109,7 +109,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
     return;
     return;
   }
   }
 
 
-  if (context.barracksUnderThreat || !context.buildingsUnderAttack.empty()) {
+  if (context.barracks_under_threat || !context.buildingsUnderAttack.empty()) {
 
 
     std::vector<const ContactSnapshot *> nearby_threats;
     std::vector<const ContactSnapshot *> nearby_threats;
     nearby_threats.reserve(snapshot.visibleEnemies.size());
     nearby_threats.reserve(snapshot.visibleEnemies.size());
@@ -154,7 +154,7 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
           return;
           return;
         }
         }
       }
       }
-    } else if (context.barracksUnderThreat ||
+    } else if (context.barracks_under_threat ||
                !context.buildingsUnderAttack.empty()) {
                !context.buildingsUnderAttack.empty()) {
 
 
       const ContactSnapshot *closest_threat = nullptr;
       const ContactSnapshot *closest_threat = nullptr;
@@ -228,14 +228,14 @@ void DefendBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
   }
 
 
   const Nation *nation =
   const Nation *nation =
-      NationRegistry::instance().getNationForPlayer(context.player_id);
+      NationRegistry::instance().get_nation_for_player(context.player_id);
   FormationType formation_type = FormationType::Roman;
   FormationType formation_type = FormationType::Roman;
   if (nation != nullptr) {
   if (nation != nullptr) {
     formation_type = nation->formation_type;
     formation_type = nation->formation_type;
   }
   }
 
 
   QVector3D const defend_pos(defend_pos_x, defend_pos_y, defend_pos_z);
   QVector3D const defend_pos(defend_pos_x, defend_pos_y, defend_pos_z);
-  auto targets = FormationSystem::instance().getFormationPositions(
+  auto targets = FormationSystem::instance().get_formation_positions(
       formation_type, static_cast<int>(unclaimed_defenders.size()), defend_pos,
       formation_type, static_cast<int>(unclaimed_defenders.size()), defend_pos,
       3.0F);
       3.0F);
 
 
@@ -307,15 +307,15 @@ auto DefendBehavior::should_execute(const AISnapshot &snapshot,
     return false;
     return false;
   }
   }
 
 
-  if (context.barracksUnderThreat || !context.buildingsUnderAttack.empty()) {
+  if (context.barracks_under_threat || !context.buildingsUnderAttack.empty()) {
     return true;
     return true;
   }
   }
 
 
-  if (context.state == AIState::Defending && context.idleUnits > 0) {
+  if (context.state == AIState::Defending && context.idle_units > 0) {
     return true;
     return true;
   }
   }
 
 
-  if (context.averageHealth < 0.6F && context.total_units > 0) {
+  if (context.average_health < 0.6F && context.total_units > 0) {
     return true;
     return true;
   }
   }
 
 

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

@@ -33,7 +33,7 @@ void GatherBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   units_to_gather.reserve(snapshot.friendlies.size());
   units_to_gather.reserve(snapshot.friendlies.size());
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 
@@ -55,13 +55,13 @@ void GatherBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
   }
 
 
   const Nation *nation =
   const Nation *nation =
-      NationRegistry::instance().getNationForPlayer(context.player_id);
+      NationRegistry::instance().get_nation_for_player(context.player_id);
   FormationType formation_type = FormationType::Roman;
   FormationType formation_type = FormationType::Roman;
   if (nation != nullptr) {
   if (nation != nullptr) {
     formation_type = nation->formation_type;
     formation_type = nation->formation_type;
   }
   }
 
 
-  auto formation_targets = FormationSystem::instance().getFormationPositions(
+  auto formation_targets = FormationSystem::instance().get_formation_positions(
       formation_type, static_cast<int>(units_to_gather.size()), rally_point,
       formation_type, static_cast<int>(units_to_gather.size()), rally_point,
       1.4F);
       1.4F);
 
 
@@ -135,7 +135,7 @@ auto GatherBehavior::should_execute(const AISnapshot &snapshot,
 
 
     QVector3D const rally_point(context.rally_x, 0.0F, context.rally_z);
     QVector3D const rally_point(context.rally_x, 0.0F, context.rally_z);
     for (const auto &entity : snapshot.friendlies) {
     for (const auto &entity : snapshot.friendlies) {
-      if (entity.isBuilding) {
+      if (entity.is_building) {
         continue;
         continue;
       }
       }
 
 

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

@@ -20,7 +20,7 @@ void ProductionBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   static int const exec_counter = 0;
   static int const exec_counter = 0;
 
 
   auto &nation_registry = Game::Systems::NationRegistry::instance();
   auto &nation_registry = Game::Systems::NationRegistry::instance();
-  const auto *nation = nation_registry.getNationForPlayer(context.player_id);
+  const auto *nation = nation_registry.get_nation_for_player(context.player_id);
 
 
   if (nation == nullptr) {
   if (nation == nullptr) {
 
 
@@ -30,8 +30,8 @@ void ProductionBehavior::execute(const AISnapshot &snapshot, AIContext &context,
 
 
   bool produce_ranged = true;
   bool produce_ranged = true;
 
 
-  if (context.barracksUnderThreat || context.state == AIState::Defending) {
-    produce_ranged = (context.meleeCount > context.rangedCount);
+  if (context.barracks_under_threat || context.state == AIState::Defending) {
+    produce_ranged = (context.melee_count > context.rangedCount);
   } else {
   } else {
 
 
     float const ranged_ratio =
     float const ranged_ratio =
@@ -56,7 +56,7 @@ void ProductionBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   }
   }
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (!entity.isBuilding ||
+    if (!entity.is_building ||
         entity.spawn_type != Game::Units::SpawnType::Barracks) {
         entity.spawn_type != Game::Units::SpawnType::Barracks) {
       continue;
       continue;
     }
     }

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

@@ -32,7 +32,7 @@ void RetreatBehavior::execute(const AISnapshot &snapshot, AIContext &context,
   constexpr float low_health = 0.50F;
   constexpr float low_health = 0.50F;
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 
@@ -57,7 +57,8 @@ void RetreatBehavior::execute(const AISnapshot &snapshot, AIContext &context,
     return;
     return;
   }
   }
 
 
-  QVector3D retreat_pos(context.basePosX, context.basePosY, context.basePosZ);
+  QVector3D retreat_pos(context.base_pos_x, context.base_pos_y,
+                        context.base_pos_z);
 
 
   retreat_pos.setX(retreat_pos.x() - 8.0F);
   retreat_pos.setX(retreat_pos.x() - 8.0F);
 
 
@@ -121,7 +122,7 @@ auto RetreatBehavior::should_execute(const AISnapshot &snapshot,
   constexpr float critical_health = 0.35F;
   constexpr float critical_health = 0.35F;
 
 
   for (const auto &entity : snapshot.friendlies) {
   for (const auto &entity : snapshot.friendlies) {
-    if (entity.isBuilding) {
+    if (entity.is_building) {
       continue;
       continue;
     }
     }
 
 

+ 2 - 2
game/systems/arrow_system.cpp

@@ -19,8 +19,8 @@ void ArrowSystem::spawnArrow(const QVector3D &start, const QVector3D &end,
   a.active = true;
   a.active = true;
   QVector3D const delta = end - start;
   QVector3D const delta = end - start;
   float const dist = delta.length();
   float const dist = delta.length();
-  a.arc_height = std::clamp(m_config.arcHeightMultiplier * dist,
-                            m_config.arcHeightMin, m_config.arcHeightMax);
+  a.arc_height = std::clamp(m_config.arc_height_multiplier * dist,
+                            m_config.arc_height_min, m_config.arc_height_max);
 
 
   a.inv_dist = (dist > 0.001F) ? (1.0F / dist) : 1.0F;
   a.inv_dist = (dist > 0.001F) ? (1.0F / dist) : 1.0F;
   m_arrows.push_back(a);
   m_arrows.push_back(a);

+ 8 - 8
game/systems/building_collision_registry.cpp

@@ -35,13 +35,13 @@ auto BuildingCollisionRegistry::getBuildingSize(const std::string &buildingType)
   return {2.0F, 2.0F};
   return {2.0F, 2.0F};
 }
 }
 
 
-void BuildingCollisionRegistry::registerBuilding(
+void BuildingCollisionRegistry::register_building(
     unsigned int entity_id, const std::string &buildingType, float center_x,
     unsigned int entity_id, const std::string &buildingType, float center_x,
     float center_z, int owner_id) {
     float center_z, int owner_id) {
 
 
   if (m_entityToIndex.find(entity_id) != m_entityToIndex.end()) {
   if (m_entityToIndex.find(entity_id) != m_entityToIndex.end()) {
 
 
-    updateBuildingPosition(entity_id, center_x, center_z);
+    update_building_position(entity_id, center_x, center_z);
     return;
     return;
   }
   }
 
 
@@ -57,7 +57,7 @@ void BuildingCollisionRegistry::registerBuilding(
   }
   }
 }
 }
 
 
-void BuildingCollisionRegistry::unregisterBuilding(unsigned int entity_id) {
+void BuildingCollisionRegistry::unregister_building(unsigned int entity_id) {
   auto it = m_entityToIndex.find(entity_id);
   auto it = m_entityToIndex.find(entity_id);
   if (it == m_entityToIndex.end()) {
   if (it == m_entityToIndex.end()) {
     return;
     return;
@@ -79,9 +79,9 @@ void BuildingCollisionRegistry::unregisterBuilding(unsigned int entity_id) {
   }
   }
 }
 }
 
 
-void BuildingCollisionRegistry::updateBuildingPosition(unsigned int entity_id,
-                                                       float center_x,
-                                                       float center_z) {
+void BuildingCollisionRegistry::update_building_position(unsigned int entity_id,
+                                                         float center_x,
+                                                         float center_z) {
   auto it = m_entityToIndex.find(entity_id);
   auto it = m_entityToIndex.find(entity_id);
   if (it == m_entityToIndex.end()) {
   if (it == m_entityToIndex.end()) {
     return;
     return;
@@ -96,8 +96,8 @@ void BuildingCollisionRegistry::updateBuildingPosition(unsigned int entity_id,
   }
   }
 }
 }
 
 
-void BuildingCollisionRegistry::updateBuildingOwner(unsigned int entity_id,
-                                                    int owner_id) {
+void BuildingCollisionRegistry::update_building_owner(unsigned int entity_id,
+                                                      int owner_id) {
   auto it = m_entityToIndex.find(entity_id);
   auto it = m_entityToIndex.find(entity_id);
   if (it == m_entityToIndex.end()) {
   if (it == m_entityToIndex.end()) {
     return;
     return;

+ 7 - 6
game/systems/building_collision_registry.h

@@ -32,15 +32,16 @@ public:
 
 
   static auto getBuildingSize(const std::string &buildingType) -> BuildingSize;
   static auto getBuildingSize(const std::string &buildingType) -> BuildingSize;
 
 
-  void registerBuilding(unsigned int entity_id, const std::string &buildingType,
-                        float center_x, float center_z, int owner_id);
+  void register_building(unsigned int entity_id,
+                         const std::string &buildingType, float center_x,
+                         float center_z, int owner_id);
 
 
-  void unregisterBuilding(unsigned int entity_id);
+  void unregister_building(unsigned int entity_id);
 
 
-  void updateBuildingPosition(unsigned int entity_id, float center_x,
-                              float center_z);
+  void update_building_position(unsigned int entity_id, float center_x,
+                                float center_z);
 
 
-  void updateBuildingOwner(unsigned int entity_id, int owner_id);
+  void update_building_owner(unsigned int entity_id, int owner_id);
 
 
   [[nodiscard]] auto
   [[nodiscard]] auto
   getAllBuildings() const -> const std::vector<BuildingFootprint> & {
   getAllBuildings() const -> const std::vector<BuildingFootprint> & {

+ 5 - 4
game/systems/camera_controller.cpp

@@ -46,12 +46,13 @@ void CameraController::zoomDistance(Render::GL::Camera &camera, float delta) {
   }
   }
 }
 }
 
 
-void CameraController::setFollowEnabled(Render::GL::Camera &camera,
-                                        bool enable) {
-  camera.setFollowEnabled(enable);
+void CameraController::set_follow_enabled(Render::GL::Camera &camera,
+                                          bool enable) {
+  camera.set_follow_enabled(enable);
 }
 }
 
 
-void CameraController::setFollowLerp(Render::GL::Camera &camera, float alpha) {
+void CameraController::set_follow_lerp(Render::GL::Camera &camera,
+                                       float alpha) {
   camera.setFollowLerp(alpha);
   camera.setFollowLerp(alpha);
 }
 }
 
 

+ 2 - 2
game/systems/camera_controller.h

@@ -14,8 +14,8 @@ public:
   static void yaw(Render::GL::Camera &camera, float degrees);
   static void yaw(Render::GL::Camera &camera, float degrees);
   static void orbit(Render::GL::Camera &camera, float yaw_deg, float pitch_deg);
   static void orbit(Render::GL::Camera &camera, float yaw_deg, float pitch_deg);
   static void zoomDistance(Render::GL::Camera &camera, float delta);
   static void zoomDistance(Render::GL::Camera &camera, float delta);
-  static void setFollowEnabled(Render::GL::Camera &camera, bool enable);
-  static void setFollowLerp(Render::GL::Camera &camera, float alpha);
+  static void set_follow_enabled(Render::GL::Camera &camera, bool enable);
+  static void set_follow_lerp(Render::GL::Camera &camera, float alpha);
 };
 };
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 6 - 6
game/systems/camera_service.cpp

@@ -57,14 +57,14 @@ void CameraService::orbit_direction(Render::GL::Camera &camera, int direction,
                                     bool shift) {
                                     bool shift) {
   const auto &cam_config = Game::GameConfig::instance().camera();
   const auto &cam_config = Game::GameConfig::instance().camera();
   float const step =
   float const step =
-      shift ? cam_config.orbitStepShift : cam_config.orbitStepNormal;
+      shift ? cam_config.orbit_step_shift : cam_config.orbit_step_normal;
   float const pitch = step * float(direction);
   float const pitch = step * float(direction);
   orbit(camera, 0.0F, pitch);
   orbit(camera, 0.0F, pitch);
 }
 }
 
 
 void CameraService::follow_selection(Render::GL::Camera &camera,
 void CameraService::follow_selection(Render::GL::Camera &camera,
                                      Engine::Core::World &world, bool enable) {
                                      Engine::Core::World &world, bool enable) {
-  m_controller->setFollowEnabled(camera, enable);
+  m_controller->set_follow_enabled(camera, enable);
 
 
   if (enable) {
   if (enable) {
     if (auto *selection_system = world.get_system<SelectionSystem>()) {
     if (auto *selection_system = world.get_system<SelectionSystem>()) {
@@ -77,9 +77,9 @@ void CameraService::follow_selection(Render::GL::Camera &camera,
   }
   }
 }
 }
 
 
-void CameraService::setFollowLerp(Render::GL::Camera &camera, float alpha) {
+void CameraService::set_follow_lerp(Render::GL::Camera &camera, float alpha) {
   float const a = std::clamp(alpha, 0.0F, 1.0F);
   float const a = std::clamp(alpha, 0.0F, 1.0F);
-  m_controller->setFollowLerp(camera, a);
+  m_controller->set_follow_lerp(camera, a);
 }
 }
 
 
 void CameraService::resetCamera(Render::GL::Camera &camera,
 void CameraService::resetCamera(Render::GL::Camera &camera,
@@ -114,8 +114,8 @@ void CameraService::snapToEntity(Render::GL::Camera &camera,
   if (auto *t = entity.get_component<Engine::Core::TransformComponent>()) {
   if (auto *t = entity.get_component<Engine::Core::TransformComponent>()) {
     QVector3D const center(t->position.x, t->position.y, t->position.z);
     QVector3D const center(t->position.x, t->position.y, t->position.z);
     const auto &cam_config = Game::GameConfig::instance().camera();
     const auto &cam_config = Game::GameConfig::instance().camera();
-    camera.setRTSView(center, cam_config.defaultDistance,
-                      cam_config.defaultPitch, cam_config.defaultYaw);
+    camera.setRTSView(center, cam_config.default_distance,
+                      cam_config.default_pitch, cam_config.default_yaw);
   }
   }
 }
 }
 
 

+ 1 - 1
game/systems/camera_service.h

@@ -30,7 +30,7 @@ public:
   void orbit_direction(Render::GL::Camera &camera, int direction, bool shift);
   void orbit_direction(Render::GL::Camera &camera, int direction, bool shift);
   void follow_selection(Render::GL::Camera &camera, Engine::Core::World &world,
   void follow_selection(Render::GL::Camera &camera, Engine::Core::World &world,
                         bool enable);
                         bool enable);
-  void setFollowLerp(Render::GL::Camera &camera, float alpha);
+  void set_follow_lerp(Render::GL::Camera &camera, float alpha);
   [[nodiscard]] static auto
   [[nodiscard]] static auto
   get_distance(const Render::GL::Camera &camera) -> float;
   get_distance(const Render::GL::Camera &camera) -> float;
   static void resetCamera(Render::GL::Camera &camera,
   static void resetCamera(Render::GL::Camera &camera,

+ 3 - 2
game/systems/capture_system.cpp

@@ -76,7 +76,8 @@ void CaptureSystem::transferBarrackOwnership(Engine::Core::World *,
 
 
   auto &nation_registry = NationRegistry::instance();
   auto &nation_registry = NationRegistry::instance();
   if (!Game::Core::isNeutralOwner(new_owner_id)) {
   if (!Game::Core::isNeutralOwner(new_owner_id)) {
-    if (const auto *nation = nation_registry.getNationForPlayer(new_owner_id)) {
+    if (const auto *nation =
+            nation_registry.get_nation_for_player(new_owner_id)) {
       unit->nation_id = nation->id;
       unit->nation_id = nation->id;
     } else {
     } else {
       unit->nation_id = nation_registry.default_nation_id();
       unit->nation_id = nation_registry.default_nation_id();
@@ -90,7 +91,7 @@ void CaptureSystem::transferBarrackOwnership(Engine::Core::World *,
   renderable->color[1] = tc.y();
   renderable->color[1] = tc.y();
   renderable->color[2] = tc.z();
   renderable->color[2] = tc.z();
 
 
-  Game::Systems::BuildingCollisionRegistry::instance().updateBuildingOwner(
+  Game::Systems::BuildingCollisionRegistry::instance().update_building_owner(
       barrack->get_id(), new_owner_id);
       barrack->get_id(), new_owner_id);
 
 
   if (!Game::Core::isNeutralOwner(new_owner_id) && (prod == nullptr)) {
   if (!Game::Core::isNeutralOwner(new_owner_id) && (prod == nullptr)) {

+ 16 - 16
game/systems/combat_system.cpp

@@ -20,12 +20,12 @@
 namespace Game::Systems {
 namespace Game::Systems {
 
 
 void CombatSystem::update(Engine::Core::World *world, float delta_time) {
 void CombatSystem::update(Engine::Core::World *world, float delta_time) {
-  processAttacks(world, delta_time);
-  processAutoEngagement(world, delta_time);
+  process_attacks(world, delta_time);
+  process_auto_engagement(world, delta_time);
 }
 }
 
 
-void CombatSystem::processAttacks(Engine::Core::World *world,
-                                  float delta_time) {
+void CombatSystem::process_attacks(Engine::Core::World *world,
+                                   float delta_time) {
   auto units = world->get_entities_with<Engine::Core::UnitComponent>();
   auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
 
   auto *arrow_sys = world->get_system<ArrowSystem>();
   auto *arrow_sys = world->get_system<ArrowSystem>();
@@ -166,8 +166,8 @@ void CombatSystem::processAttacks(Engine::Core::World *world,
             target->get_component<Engine::Core::UnitComponent>();
             target->get_component<Engine::Core::UnitComponent>();
 
 
         auto &owner_registry = Game::Systems::OwnerRegistry::instance();
         auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-        bool const is_ally = owner_registry.areAllies(attacker_unit->owner_id,
-                                                      target_unit->owner_id);
+        bool const is_ally = owner_registry.are_allies(attacker_unit->owner_id,
+                                                       target_unit->owner_id);
 
 
         if ((target_unit != nullptr) && target_unit->health > 0 &&
         if ((target_unit != nullptr) && target_unit->health > 0 &&
             target_unit->owner_id != attacker_unit->owner_id && !is_ally) {
             target_unit->owner_id != attacker_unit->owner_id && !is_ally) {
@@ -395,8 +395,8 @@ void CombatSystem::processAttacks(Engine::Core::World *world,
           continue;
           continue;
         }
         }
 
 
-        if (owner_registry.areAllies(attacker_unit->owner_id,
-                                     target_unit->owner_id)) {
+        if (owner_registry.are_allies(attacker_unit->owner_id,
+                                      target_unit->owner_id)) {
           continue;
           continue;
         }
         }
 
 
@@ -696,7 +696,7 @@ void CombatSystem::dealDamage(Engine::Core::World *world,
       }
       }
 
 
       if (target->has_component<Engine::Core::BuildingComponent>()) {
       if (target->has_component<Engine::Core::BuildingComponent>()) {
-        BuildingCollisionRegistry::instance().unregisterBuilding(
+        BuildingCollisionRegistry::instance().unregister_building(
             target->get_id());
             target->get_id());
       }
       }
 
 
@@ -759,8 +759,8 @@ void CombatSystem::updateCombatMode(
       continue;
       continue;
     }
     }
 
 
-    if (owner_registry.areAllies(attacker_unit->owner_id,
-                                 target_unit->owner_id)) {
+    if (owner_registry.are_allies(attacker_unit->owner_id,
+                                  target_unit->owner_id)) {
       continue;
       continue;
     }
     }
 
 
@@ -816,8 +816,8 @@ void CombatSystem::updateCombatMode(
   }
   }
 }
 }
 
 
-void CombatSystem::processAutoEngagement(Engine::Core::World *world,
-                                         float delta_time) {
+void CombatSystem::process_auto_engagement(Engine::Core::World *world,
+                                           float delta_time) {
   auto units = world->get_entities_with<Engine::Core::UnitComponent>();
   auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
 
   for (auto it = m_engagementCooldowns.begin();
   for (auto it = m_engagementCooldowns.begin();
@@ -861,7 +861,7 @@ void CombatSystem::processAutoEngagement(Engine::Core::World *world,
       continue;
       continue;
     }
     }
 
 
-    if (!isUnitIdle(unit)) {
+    if (!is_unit_idle(unit)) {
       continue;
       continue;
     }
     }
 
 
@@ -886,7 +886,7 @@ void CombatSystem::processAutoEngagement(Engine::Core::World *world,
   }
   }
 }
 }
 
 
-auto CombatSystem::isUnitIdle(Engine::Core::Entity *unit) -> bool {
+auto CombatSystem::is_unit_idle(Engine::Core::Entity *unit) -> bool {
 
 
   auto *hold_mode = unit->get_component<Engine::Core::HoldModeComponent>();
   auto *hold_mode = unit->get_component<Engine::Core::HoldModeComponent>();
   if ((hold_mode != nullptr) && hold_mode->active) {
   if ((hold_mode != nullptr) && hold_mode->active) {
@@ -946,7 +946,7 @@ auto CombatSystem::findNearestEnemy(Engine::Core::Entity *unit,
     if (target_unit->owner_id == unit_comp->owner_id) {
     if (target_unit->owner_id == unit_comp->owner_id) {
       continue;
       continue;
     }
     }
-    if (owner_registry.areAllies(unit_comp->owner_id, target_unit->owner_id)) {
+    if (owner_registry.are_allies(unit_comp->owner_id, target_unit->owner_id)) {
       continue;
       continue;
     }
     }
 
 

+ 4 - 4
game/systems/combat_system.h

@@ -15,7 +15,7 @@ public:
   void update(Engine::Core::World *world, float delta_time) override;
   void update(Engine::Core::World *world, float delta_time) override;
 
 
 private:
 private:
-  static void processAttacks(Engine::Core::World *world, float delta_time);
+  static void process_attacks(Engine::Core::World *world, float delta_time);
   static void updateCombatMode(Engine::Core::Entity *attacker,
   static void updateCombatMode(Engine::Core::Entity *attacker,
                                Engine::Core::World *world,
                                Engine::Core::World *world,
                                Engine::Core::AttackComponent *attack_comp);
                                Engine::Core::AttackComponent *attack_comp);
@@ -24,8 +24,8 @@ private:
   static void dealDamage(Engine::Core::World *world,
   static void dealDamage(Engine::Core::World *world,
                          Engine::Core::Entity *target, int damage,
                          Engine::Core::Entity *target, int damage,
                          Engine::Core::EntityID attackerId = 0);
                          Engine::Core::EntityID attackerId = 0);
-  void processAutoEngagement(Engine::Core::World *world, float delta_time);
-  static auto isUnitIdle(Engine::Core::Entity *unit) -> bool;
+  void process_auto_engagement(Engine::Core::World *world, float delta_time);
+  static auto is_unit_idle(Engine::Core::Entity *unit) -> bool;
   static auto findNearestEnemy(Engine::Core::Entity *unit,
   static auto findNearestEnemy(Engine::Core::Entity *unit,
                                Engine::Core::World *world,
                                Engine::Core::World *world,
                                float max_range) -> Engine::Core::Entity *;
                                float max_range) -> Engine::Core::Entity *;
@@ -34,4 +34,4 @@ private:
   static constexpr float ENGAGEMENT_COOLDOWN = 0.5F;
   static constexpr float ENGAGEMENT_COOLDOWN = 0.5F;
 };
 };
 
 
-} // namespace Game::Systems
+} // namespace Game::Systems

+ 2 - 2
game/systems/formation_system.cpp

@@ -99,7 +99,7 @@ void FormationSystem::initializeDefaults() {
                     std::make_unique<BarbarianFormation>());
                     std::make_unique<BarbarianFormation>());
 }
 }
 
 
-auto FormationSystem::getFormationPositions(
+auto FormationSystem::get_formation_positions(
     FormationType type, int unit_count, const QVector3D &center,
     FormationType type, int unit_count, const QVector3D &center,
     float base_spacing) -> std::vector<QVector3D> {
     float base_spacing) -> std::vector<QVector3D> {
   auto it = m_formations.find(type);
   auto it = m_formations.find(type);
@@ -117,7 +117,7 @@ void FormationSystem::registerFormation(FormationType type,
   m_formations[type] = std::move(formation);
   m_formations[type] = std::move(formation);
 }
 }
 
 
-auto FormationSystem::getFormation(FormationType type) const
+auto FormationSystem::get_formation(FormationType type) const
     -> const IFormation * {
     -> const IFormation * {
   auto it = m_formations.find(type);
   auto it = m_formations.find(type);
   if (it == m_formations.end()) {
   if (it == m_formations.end()) {

+ 4 - 4
game/systems/formation_system.h

@@ -60,14 +60,14 @@ public:
   static auto instance() -> FormationSystem &;
   static auto instance() -> FormationSystem &;
 
 
   auto
   auto
-  getFormationPositions(FormationType type, int unit_count,
-                        const QVector3D &center,
-                        float base_spacing = 1.0F) -> std::vector<QVector3D>;
+  get_formation_positions(FormationType type, int unit_count,
+                          const QVector3D &center,
+                          float base_spacing = 1.0F) -> std::vector<QVector3D>;
 
 
   void registerFormation(FormationType type,
   void registerFormation(FormationType type,
                          std::unique_ptr<IFormation> formation);
                          std::unique_ptr<IFormation> formation);
 
 
-  auto getFormation(FormationType type) const -> const IFormation *;
+  auto get_formation(FormationType type) const -> const IFormation *;
 
 
 private:
 private:
   FormationSystem();
   FormationSystem();

+ 4 - 4
game/systems/game_state_serializer.cpp

@@ -23,10 +23,10 @@ auto GameStateSerializer::buildMetadata(
   metadata["player_unit_id"] = static_cast<qint64>(level.player_unit_id);
   metadata["player_unit_id"] = static_cast<qint64>(level.player_unit_id);
 
 
   metadata["gameMaxTroopsPerPlayer"] =
   metadata["gameMaxTroopsPerPlayer"] =
-      Game::GameConfig::instance().getMaxTroopsPerPlayer();
+      Game::GameConfig::instance().get_max_troops_per_player();
 
 
   const auto &terrain_service = Game::Map::TerrainService::instance();
   const auto &terrain_service = Game::Map::TerrainService::instance();
-  if (const auto *height_map = terrain_service.getHeightMap()) {
+  if (const auto *height_map = terrain_service.get_height_map()) {
     metadata["grid_width"] = height_map->getWidth();
     metadata["grid_width"] = height_map->getWidth();
     metadata["grid_height"] = height_map->getHeight();
     metadata["grid_height"] = height_map->getHeight();
     metadata["tile_size"] = height_map->getTileSize();
     metadata["tile_size"] = height_map->getTileSize();
@@ -145,10 +145,10 @@ void GameStateSerializer::restoreLevelFromMetadata(const QJsonObject &metadata,
   int max_troops = metadata.value("max_troops_per_player")
   int max_troops = metadata.value("max_troops_per_player")
                        .toInt(level.max_troops_per_player);
                        .toInt(level.max_troops_per_player);
   if (max_troops <= 0) {
   if (max_troops <= 0) {
-    max_troops = Game::GameConfig::instance().getMaxTroopsPerPlayer();
+    max_troops = Game::GameConfig::instance().get_max_troops_per_player();
   }
   }
   level.max_troops_per_player = max_troops;
   level.max_troops_per_player = max_troops;
-  Game::GameConfig::instance().setMaxTroopsPerPlayer(max_troops);
+  Game::GameConfig::instance().set_max_troops_per_player(max_troops);
 }
 }
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 1 - 1
game/systems/global_stats_registry.cpp

@@ -102,7 +102,7 @@ void GlobalStatsRegistry::on_unit_died(
 
 
     auto &owner_registry = OwnerRegistry::instance();
     auto &owner_registry = OwnerRegistry::instance();
 
 
-    if (owner_registry.areEnemies(event.killer_owner_id, event.owner_id)) {
+    if (owner_registry.are_enemies(event.killer_owner_id, event.owner_id)) {
       auto &stats = m_player_stats[event.killer_owner_id];
       auto &stats = m_player_stats[event.killer_owner_id];
 
 
       if (event.spawn_type != Game::Units::SpawnType::Barracks) {
       if (event.spawn_type != Game::Units::SpawnType::Barracks) {

+ 3 - 3
game/systems/healing_system.cpp

@@ -9,11 +9,11 @@
 namespace Game::Systems {
 namespace Game::Systems {
 
 
 void HealingSystem::update(Engine::Core::World *world, float delta_time) {
 void HealingSystem::update(Engine::Core::World *world, float delta_time) {
-  processHealing(world, delta_time);
+  process_healing(world, delta_time);
 }
 }
 
 
-void HealingSystem::processHealing(Engine::Core::World *world,
-                                   float delta_time) {
+void HealingSystem::process_healing(Engine::Core::World *world,
+                                    float delta_time) {
   auto healers = world->get_entities_with<Engine::Core::HealerComponent>();
   auto healers = world->get_entities_with<Engine::Core::HealerComponent>();
   auto *arrow_system = world->get_system<ArrowSystem>();
   auto *arrow_system = world->get_system<ArrowSystem>();
 
 

+ 1 - 1
game/systems/healing_system.h

@@ -13,7 +13,7 @@ public:
   void update(Engine::Core::World *world, float delta_time) override;
   void update(Engine::Core::World *world, float delta_time) override;
 
 
 private:
 private:
-  void processHealing(Engine::Core::World *world, float delta_time);
+  void process_healing(Engine::Core::World *world, float delta_time);
 };
 };
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 4 - 4
game/systems/movement_system.cpp

@@ -37,10 +37,10 @@ auto isPointAllowed(const QVector3D &pos,
     if (!pathfinder->isWalkable(grid_x, grid_z)) {
     if (!pathfinder->isWalkable(grid_x, grid_z)) {
       return false;
       return false;
     }
     }
-  } else if (terrain_service.isInitialized()) {
+  } else if (terrain_service.is_initialized()) {
     int const grid_x = static_cast<int>(std::round(pos.x()));
     int const grid_x = static_cast<int>(std::round(pos.x()));
     int const grid_z = static_cast<int>(std::round(pos.z()));
     int const grid_z = static_cast<int>(std::round(pos.z()));
-    if (!terrain_service.isWalkable(grid_x, grid_z)) {
+    if (!terrain_service.is_walkable(grid_x, grid_z)) {
       return false;
       return false;
     }
     }
   }
   }
@@ -349,8 +349,8 @@ void MovementSystem::move_unit(Engine::Core::Entity *entity,
   transform->position.z += movement->vz * delta_time;
   transform->position.z += movement->vz * delta_time;
 
 
   auto &terrain = Game::Map::TerrainService::instance();
   auto &terrain = Game::Map::TerrainService::instance();
-  if (terrain.isInitialized()) {
-    const Game::Map::TerrainHeightMap *hm = terrain.getHeightMap();
+  if (terrain.is_initialized()) {
+    const Game::Map::TerrainHeightMap *hm = terrain.get_height_map();
     if (hm != nullptr) {
     if (hm != nullptr) {
       const float tile = hm->getTileSize();
       const float tile = hm->getTileSize();
       const int w = hm->getWidth();
       const int w = hm->getWidth();

+ 8 - 7
game/systems/nation_registry.cpp

@@ -87,7 +87,7 @@ auto NationRegistry::instance() -> NationRegistry & {
   return inst;
   return inst;
 }
 }
 
 
-void NationRegistry::registerNation(Nation nation) {
+void NationRegistry::register_nation(Nation nation) {
 
 
   auto it = m_nationIndex.find(nation.id);
   auto it = m_nationIndex.find(nation.id);
   if (it != m_nationIndex.end()) {
   if (it != m_nationIndex.end()) {
@@ -109,7 +109,8 @@ auto NationRegistry::getNation(NationID nationId) const -> const Nation * {
   return &m_nations[it->second];
   return &m_nations[it->second];
 }
 }
 
 
-auto NationRegistry::getNationForPlayer(int player_id) const -> const Nation * {
+auto NationRegistry::get_nation_for_player(int player_id) const
+    -> const Nation * {
 
 
   auto it = m_playerNations.find(player_id);
   auto it = m_playerNations.find(player_id);
   if (it != m_playerNations.end()) {
   if (it != m_playerNations.end()) {
@@ -123,11 +124,11 @@ auto NationRegistry::getNationForPlayer(int player_id) const -> const Nation * {
   return nation;
   return nation;
 }
 }
 
 
-void NationRegistry::setPlayerNation(int player_id, NationID nationId) {
+void NationRegistry::set_player_nation(int player_id, NationID nationId) {
   m_playerNations[player_id] = nationId;
   m_playerNations[player_id] = nationId;
 }
 }
 
 
-void NationRegistry::initializeDefaults() {
+void NationRegistry::initialize_defaults() {
   if (m_initialized) {
   if (m_initialized) {
     return;
     return;
   }
   }
@@ -163,12 +164,12 @@ void NationRegistry::initializeDefaults() {
     appendTroop(Game::Units::TroopType::Spearman);
     appendTroop(Game::Units::TroopType::Spearman);
     appendTroop(Game::Units::TroopType::MountedKnight);
     appendTroop(Game::Units::TroopType::MountedKnight);
 
 
-    registerNation(std::move(roman));
+    register_nation(std::move(roman));
     m_defaultNation = NationID::RomanRepublic;
     m_defaultNation = NationID::RomanRepublic;
   } else {
   } else {
     NationID fallback_default = nations.front().id;
     NationID fallback_default = nations.front().id;
     for (auto &nation : nations) {
     for (auto &nation : nations) {
-      registerNation(std::move(nation));
+      register_nation(std::move(nation));
     }
     }
     m_defaultNation = fallback_default;
     m_defaultNation = fallback_default;
   }
   }
@@ -184,6 +185,6 @@ void NationRegistry::clear() {
   m_initialized = false;
   m_initialized = false;
 }
 }
 
 
-void NationRegistry::clearPlayerAssignments() { m_playerNations.clear(); }
+void NationRegistry::clear_player_assignments() { m_playerNations.clear(); }
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 6 - 6
game/systems/nation_registry.h

@@ -75,23 +75,23 @@ class NationRegistry {
 public:
 public:
   static auto instance() -> NationRegistry &;
   static auto instance() -> NationRegistry &;
 
 
-  void registerNation(Nation nation);
+  void register_nation(Nation nation);
 
 
   auto getNation(NationID nationId) const -> const Nation *;
   auto getNation(NationID nationId) const -> const Nation *;
 
 
-  auto getNationForPlayer(int player_id) const -> const Nation *;
+  auto get_nation_for_player(int player_id) const -> const Nation *;
 
 
-  void setPlayerNation(int player_id, NationID nationId);
+  void set_player_nation(int player_id, NationID nationId);
 
 
-  auto getAllNations() const -> const std::vector<Nation> & {
+  auto get_all_nations() const -> const std::vector<Nation> & {
     return m_nations;
     return m_nations;
   }
   }
 
 
-  void initializeDefaults();
+  void initialize_defaults();
 
 
   void clear();
   void clear();
 
 
-  void clearPlayerAssignments();
+  void clear_player_assignments();
 
 
   auto default_nation_id() const -> NationID { return m_defaultNation; }
   auto default_nation_id() const -> NationID { return m_defaultNation; }
 
 

+ 64 - 61
game/systems/owner_registry.cpp

@@ -65,14 +65,14 @@ auto OwnerRegistry::instance() -> OwnerRegistry & {
 
 
 void OwnerRegistry::clear() {
 void OwnerRegistry::clear() {
   m_owners.clear();
   m_owners.clear();
-  m_owner_idToIndex.clear();
-  m_nextOwnerId = 1;
-  m_localPlayerId = 1;
+  m_owner_id_to_index.clear();
+  m_next_owner_id = 1;
+  m_local_player_id = 1;
 }
 }
 
 
-auto OwnerRegistry::registerOwner(OwnerType type,
-                                  const std::string &name) -> int {
-  int const owner_id = m_nextOwnerId++;
+auto OwnerRegistry::register_owner(OwnerType type,
+                                   const std::string &name) -> int {
+  int const owner_id = m_next_owner_id++;
   OwnerInfo info;
   OwnerInfo info;
   info.owner_id = owner_id;
   info.owner_id = owner_id;
   info.type = type;
   info.type = type;
@@ -98,14 +98,14 @@ auto OwnerRegistry::registerOwner(OwnerType type,
 
 
   size_t const index = m_owners.size();
   size_t const index = m_owners.size();
   m_owners.push_back(info);
   m_owners.push_back(info);
-  m_owner_idToIndex[owner_id] = index;
+  m_owner_id_to_index[owner_id] = index;
 
 
   return owner_id;
   return owner_id;
 }
 }
 
 
-void OwnerRegistry::registerOwnerWithId(int owner_id, OwnerType type,
-                                        const std::string &name) {
-  if (m_owner_idToIndex.find(owner_id) != m_owner_idToIndex.end()) {
+void OwnerRegistry::register_owner_with_id(int owner_id, OwnerType type,
+                                           const std::string &name) {
+  if (m_owner_id_to_index.find(owner_id) != m_owner_id_to_index.end()) {
     return;
     return;
   }
   }
 
 
@@ -134,56 +134,58 @@ void OwnerRegistry::registerOwnerWithId(int owner_id, OwnerType type,
 
 
   size_t const index = m_owners.size();
   size_t const index = m_owners.size();
   m_owners.push_back(info);
   m_owners.push_back(info);
-  m_owner_idToIndex[owner_id] = index;
+  m_owner_id_to_index[owner_id] = index;
 
 
-  if (owner_id >= m_nextOwnerId) {
-    m_nextOwnerId = owner_id + 1;
+  if (owner_id >= m_next_owner_id) {
+    m_next_owner_id = owner_id + 1;
   }
   }
 }
 }
 
 
-void OwnerRegistry::setLocalPlayerId(int player_id) {
-  m_localPlayerId = player_id;
+void OwnerRegistry::set_local_player_id(int player_id) {
+  m_local_player_id = player_id;
 }
 }
 
 
-auto OwnerRegistry::getLocalPlayerId() const -> int { return m_localPlayerId; }
+auto OwnerRegistry::get_local_player_id() const -> int {
+  return m_local_player_id;
+}
 
 
-auto OwnerRegistry::isPlayer(int owner_id) const -> bool {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it == m_owner_idToIndex.end()) {
+auto OwnerRegistry::is_player(int owner_id) const -> bool {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it == m_owner_id_to_index.end()) {
     return false;
     return false;
   }
   }
   return m_owners[it->second].type == OwnerType::Player;
   return m_owners[it->second].type == OwnerType::Player;
 }
 }
 
 
-auto OwnerRegistry::isAI(int owner_id) const -> bool {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it == m_owner_idToIndex.end()) {
+auto OwnerRegistry::is_ai(int owner_id) const -> bool {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it == m_owner_id_to_index.end()) {
     return false;
     return false;
   }
   }
   return m_owners[it->second].type == OwnerType::AI;
   return m_owners[it->second].type == OwnerType::AI;
 }
 }
 
 
-auto OwnerRegistry::getOwnerType(int owner_id) const -> OwnerType {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it == m_owner_idToIndex.end()) {
+auto OwnerRegistry::get_owner_type(int owner_id) const -> OwnerType {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it == m_owner_id_to_index.end()) {
     return OwnerType::Neutral;
     return OwnerType::Neutral;
   }
   }
   return m_owners[it->second].type;
   return m_owners[it->second].type;
 }
 }
 
 
-auto OwnerRegistry::getOwnerName(int owner_id) const -> std::string {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it == m_owner_idToIndex.end()) {
+auto OwnerRegistry::get_owner_name(int owner_id) const -> std::string {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it == m_owner_id_to_index.end()) {
     return "Unknown";
     return "Unknown";
   }
   }
   return m_owners[it->second].name;
   return m_owners[it->second].name;
 }
 }
 
 
-auto OwnerRegistry::getAllOwners() const -> const std::vector<OwnerInfo> & {
+auto OwnerRegistry::get_all_owners() const -> const std::vector<OwnerInfo> & {
   return m_owners;
   return m_owners;
 }
 }
 
 
-auto OwnerRegistry::getPlayerOwnerIds() const -> std::vector<int> {
+auto OwnerRegistry::get_player_owner_ids() const -> std::vector<int> {
   std::vector<int> result;
   std::vector<int> result;
   for (const auto &owner : m_owners) {
   for (const auto &owner : m_owners) {
     if (owner.type == OwnerType::Player) {
     if (owner.type == OwnerType::Player) {
@@ -193,7 +195,7 @@ auto OwnerRegistry::getPlayerOwnerIds() const -> std::vector<int> {
   return result;
   return result;
 }
 }
 
 
-auto OwnerRegistry::getAIOwnerIds() const -> std::vector<int> {
+auto OwnerRegistry::get_ai_owner_ids() const -> std::vector<int> {
   std::vector<int> result;
   std::vector<int> result;
   for (const auto &owner : m_owners) {
   for (const auto &owner : m_owners) {
     if (owner.type == OwnerType::AI) {
     if (owner.type == OwnerType::AI) {
@@ -203,51 +205,51 @@ auto OwnerRegistry::getAIOwnerIds() const -> std::vector<int> {
   return result;
   return result;
 }
 }
 
 
-void OwnerRegistry::setOwnerTeam(int owner_id, int team_id) {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it != m_owner_idToIndex.end()) {
+void OwnerRegistry::set_owner_team(int owner_id, int team_id) {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it != m_owner_id_to_index.end()) {
     m_owners[it->second].team_id = team_id;
     m_owners[it->second].team_id = team_id;
   }
   }
 }
 }
 
 
-auto OwnerRegistry::getOwnerTeam(int owner_id) const -> int {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it == m_owner_idToIndex.end()) {
+auto OwnerRegistry::get_owner_team(int owner_id) const -> int {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it == m_owner_id_to_index.end()) {
     return 0;
     return 0;
   }
   }
   return m_owners[it->second].team_id;
   return m_owners[it->second].team_id;
 }
 }
 
 
-auto OwnerRegistry::areAllies(int owner_id1, int owner_id2) const -> bool {
+auto OwnerRegistry::are_allies(int owner_id1, int owner_id2) const -> bool {
 
 
   if (owner_id1 == owner_id2) {
   if (owner_id1 == owner_id2) {
     return true;
     return true;
   }
   }
 
 
-  int const team1 = getOwnerTeam(owner_id1);
-  int const team2 = getOwnerTeam(owner_id2);
+  int const team1 = get_owner_team(owner_id1);
+  int const team2 = get_owner_team(owner_id2);
 
 
   bool const result = (team1 == team2);
   bool const result = (team1 == team2);
 
 
   return result;
   return result;
 }
 }
 
 
-auto OwnerRegistry::areEnemies(int owner_id1, int owner_id2) const -> bool {
+auto OwnerRegistry::are_enemies(int owner_id1, int owner_id2) const -> bool {
 
 
   if (owner_id1 == owner_id2) {
   if (owner_id1 == owner_id2) {
     return false;
     return false;
   }
   }
 
 
-  if (areAllies(owner_id1, owner_id2)) {
+  if (are_allies(owner_id1, owner_id2)) {
     return false;
     return false;
   }
   }
 
 
   return true;
   return true;
 }
 }
 
 
-auto OwnerRegistry::getAlliesOf(int owner_id) const -> std::vector<int> {
+auto OwnerRegistry::get_allies_of(int owner_id) const -> std::vector<int> {
   std::vector<int> result;
   std::vector<int> result;
-  int const my_team = getOwnerTeam(owner_id);
+  int const my_team = get_owner_team(owner_id);
 
 
   if (my_team == 0) {
   if (my_team == 0) {
     return result;
     return result;
@@ -261,37 +263,38 @@ auto OwnerRegistry::getAlliesOf(int owner_id) const -> std::vector<int> {
   return result;
   return result;
 }
 }
 
 
-auto OwnerRegistry::getEnemiesOf(int owner_id) const -> std::vector<int> {
+auto OwnerRegistry::get_enemies_of(int owner_id) const -> std::vector<int> {
   std::vector<int> result;
   std::vector<int> result;
 
 
   for (const auto &owner : m_owners) {
   for (const auto &owner : m_owners) {
-    if (areEnemies(owner_id, owner.owner_id)) {
+    if (are_enemies(owner_id, owner.owner_id)) {
       result.push_back(owner.owner_id);
       result.push_back(owner.owner_id);
     }
     }
   }
   }
   return result;
   return result;
 }
 }
 
 
-void OwnerRegistry::setOwnerColor(int owner_id, float r, float g, float b) {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it != m_owner_idToIndex.end()) {
+void OwnerRegistry::set_owner_color(int owner_id, float r, float g, float b) {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it != m_owner_id_to_index.end()) {
     m_owners[it->second].color = {r, g, b};
     m_owners[it->second].color = {r, g, b};
   }
   }
 }
 }
 
 
-auto OwnerRegistry::getOwnerColor(int owner_id) const -> std::array<float, 3> {
-  auto it = m_owner_idToIndex.find(owner_id);
-  if (it != m_owner_idToIndex.end()) {
+auto OwnerRegistry::get_owner_color(int owner_id) const
+    -> std::array<float, 3> {
+  auto it = m_owner_id_to_index.find(owner_id);
+  if (it != m_owner_id_to_index.end()) {
     return m_owners[it->second].color;
     return m_owners[it->second].color;
   }
   }
 
 
   return {0.8F, 0.9F, 1.0F};
   return {0.8F, 0.9F, 1.0F};
 }
 }
 
 
-auto OwnerRegistry::toJson() const -> QJsonObject {
+auto OwnerRegistry::to_json() const -> QJsonObject {
   QJsonObject root;
   QJsonObject root;
-  root["nextOwnerId"] = m_nextOwnerId;
-  root["localPlayerId"] = m_localPlayerId;
+  root["nextOwnerId"] = m_next_owner_id;
+  root["localPlayerId"] = m_local_player_id;
 
 
   QJsonArray owners_array;
   QJsonArray owners_array;
   for (const auto &owner : m_owners) {
   for (const auto &owner : m_owners) {
@@ -308,11 +311,11 @@ auto OwnerRegistry::toJson() const -> QJsonObject {
   return root;
   return root;
 }
 }
 
 
-void OwnerRegistry::fromJson(const QJsonObject &json) {
+void OwnerRegistry::from_json(const QJsonObject &json) {
   clear();
   clear();
 
 
-  m_nextOwnerId = json["nextOwnerId"].toInt(1);
-  m_localPlayerId = json["localPlayerId"].toInt(1);
+  m_next_owner_id = json["nextOwnerId"].toInt(1);
+  m_local_player_id = json["localPlayerId"].toInt(1);
 
 
   const auto owners_array = json["owners"].toArray();
   const auto owners_array = json["owners"].toArray();
   m_owners.reserve(owners_array.size());
   m_owners.reserve(owners_array.size());
@@ -329,12 +332,12 @@ void OwnerRegistry::fromJson(const QJsonObject &json) {
 
 
     const size_t index = m_owners.size();
     const size_t index = m_owners.size();
     m_owners.push_back(info);
     m_owners.push_back(info);
-    m_owner_idToIndex[info.owner_id] = index;
+    m_owner_id_to_index[info.owner_id] = index;
   }
   }
 
 
   for (const auto &owner : m_owners) {
   for (const auto &owner : m_owners) {
-    if (owner.owner_id >= m_nextOwnerId) {
-      m_nextOwnerId = owner.owner_id + 1;
+    if (owner.owner_id >= m_next_owner_id) {
+      m_next_owner_id = owner.owner_id + 1;
     }
     }
   }
   }
 }
 }

+ 25 - 25
game/systems/owner_registry.h

@@ -29,41 +29,41 @@ public:
 
 
   void clear();
   void clear();
 
 
-  auto registerOwner(OwnerType type, const std::string &name = "") -> int;
+  auto register_owner(OwnerType type, const std::string &name = "") -> int;
 
 
-  void registerOwnerWithId(int owner_id, OwnerType type,
-                           const std::string &name = "");
+  void register_owner_with_id(int owner_id, OwnerType type,
+                              const std::string &name = "");
 
 
-  void setLocalPlayerId(int player_id);
+  void set_local_player_id(int player_id);
 
 
-  auto getLocalPlayerId() const -> int;
+  auto get_local_player_id() const -> int;
 
 
-  auto isPlayer(int owner_id) const -> bool;
+  auto is_player(int owner_id) const -> bool;
 
 
-  auto isAI(int owner_id) const -> bool;
+  auto is_ai(int owner_id) const -> bool;
 
 
-  auto getOwnerType(int owner_id) const -> OwnerType;
+  auto get_owner_type(int owner_id) const -> OwnerType;
 
 
-  auto getOwnerName(int owner_id) const -> std::string;
+  auto get_owner_name(int owner_id) const -> std::string;
 
 
-  auto getAllOwners() const -> const std::vector<OwnerInfo> &;
+  auto get_all_owners() const -> const std::vector<OwnerInfo> &;
 
 
-  auto getPlayerOwnerIds() const -> std::vector<int>;
+  auto get_player_owner_ids() const -> std::vector<int>;
 
 
-  auto getAIOwnerIds() const -> std::vector<int>;
+  auto get_ai_owner_ids() const -> std::vector<int>;
 
 
-  void setOwnerTeam(int owner_id, int team_id);
-  auto getOwnerTeam(int owner_id) const -> int;
-  auto areAllies(int owner_id1, int owner_id2) const -> bool;
-  auto areEnemies(int owner_id1, int owner_id2) const -> bool;
-  auto getAlliesOf(int owner_id) const -> std::vector<int>;
-  auto getEnemiesOf(int owner_id) const -> std::vector<int>;
+  void set_owner_team(int owner_id, int team_id);
+  auto get_owner_team(int owner_id) const -> int;
+  auto are_allies(int owner_id1, int owner_id2) const -> bool;
+  auto are_enemies(int owner_id1, int owner_id2) const -> bool;
+  auto get_allies_of(int owner_id) const -> std::vector<int>;
+  auto get_enemies_of(int owner_id) const -> std::vector<int>;
 
 
-  void setOwnerColor(int owner_id, float r, float g, float b);
-  auto getOwnerColor(int owner_id) const -> std::array<float, 3>;
+  void set_owner_color(int owner_id, float r, float g, float b);
+  auto get_owner_color(int owner_id) const -> std::array<float, 3>;
 
 
-  auto toJson() const -> QJsonObject;
-  void fromJson(const QJsonObject &json);
+  auto to_json() const -> QJsonObject;
+  void from_json(const QJsonObject &json);
 
 
 private:
 private:
   OwnerRegistry() = default;
   OwnerRegistry() = default;
@@ -71,10 +71,10 @@ private:
   OwnerRegistry(const OwnerRegistry &) = delete;
   OwnerRegistry(const OwnerRegistry &) = delete;
   auto operator=(const OwnerRegistry &) -> OwnerRegistry & = delete;
   auto operator=(const OwnerRegistry &) -> OwnerRegistry & = delete;
 
 
-  int m_nextOwnerId = 1;
-  int m_localPlayerId = 1;
+  int m_next_owner_id = 1;
+  int m_local_player_id = 1;
   std::vector<OwnerInfo> m_owners;
   std::vector<OwnerInfo> m_owners;
-  std::unordered_map<int, size_t> m_owner_idToIndex;
+  std::unordered_map<int, size_t> m_owner_id_to_index;
 };
 };
 
 
 } // namespace Game::Systems
 } // namespace Game::Systems

+ 3 - 3
game/systems/pathfinding.cpp

@@ -71,9 +71,9 @@ void Pathfinding::updateBuildingObstacles() {
   }
   }
 
 
   auto &terrain_service = Game::Map::TerrainService::instance();
   auto &terrain_service = Game::Map::TerrainService::instance();
-  if (terrain_service.isInitialized()) {
+  if (terrain_service.is_initialized()) {
     const Game::Map::TerrainHeightMap *height_map =
     const Game::Map::TerrainHeightMap *height_map =
-        terrain_service.getHeightMap();
+        terrain_service.get_height_map();
     const int terrain_width =
     const int terrain_width =
         (height_map != nullptr) ? height_map->getWidth() : 0;
         (height_map != nullptr) ? height_map->getWidth() : 0;
     const int terrain_height =
     const int terrain_height =
@@ -83,7 +83,7 @@ void Pathfinding::updateBuildingObstacles() {
       for (int x = 0; x < m_width; ++x) {
       for (int x = 0; x < m_width; ++x) {
         bool blocked = false;
         bool blocked = false;
         if (x < terrain_width && z < terrain_height) {
         if (x < terrain_width && z < terrain_height) {
-          blocked = !terrain_service.isWalkable(x, z);
+          blocked = !terrain_service.is_walkable(x, z);
         } else {
         } else {
           blocked = true;
           blocked = true;
         }
         }

+ 4 - 4
game/systems/picking_service.cpp

@@ -70,17 +70,17 @@ auto PickingService::update_hover(float sx, float sy,
       pick_single(sx, sy, world, camera, view_w, view_h, 0, false);
       pick_single(sx, sy, world, camera, view_w, view_h, 0, false);
 
 
   if (picked != 0 && picked != prev_hover) {
   if (picked != 0 && picked != prev_hover) {
-    m_hoverGraceTicks = 6;
+    m_hover_grace_ticks = 6;
   }
   }
 
 
   Engine::Core::EntityID current_hover = picked;
   Engine::Core::EntityID current_hover = picked;
-  if (current_hover == 0 && prev_hover != 0 && m_hoverGraceTicks > 0) {
+  if (current_hover == 0 && prev_hover != 0 && m_hover_grace_ticks > 0) {
 
 
     current_hover = prev_hover;
     current_hover = prev_hover;
   }
   }
 
 
-  if (m_hoverGraceTicks > 0) {
-    --m_hoverGraceTicks;
+  if (m_hover_grace_ticks > 0) {
+    --m_hover_grace_ticks;
   }
   }
   m_prev_hoverId = current_hover;
   m_prev_hoverId = current_hover;
   return current_hover;
   return current_hover;

+ 1 - 1
game/systems/picking_service.h

@@ -56,7 +56,7 @@ public:
 
 
 private:
 private:
   Engine::Core::EntityID m_prev_hoverId = 0;
   Engine::Core::EntityID m_prev_hoverId = 0;
-  int m_hoverGraceTicks = 0;
+  int m_hover_grace_ticks = 0;
   static auto project_bounds(const Render::GL::Camera &cam,
   static auto project_bounds(const Render::GL::Camera &cam,
                              const QVector3D &center, float hx, float hz,
                              const QVector3D &center, float hx, float hz,
                              int view_w, int view_h, QRectF &out) -> bool;
                              int view_w, int view_h, QRectF &out) -> bool;

+ 3 - 2
game/systems/production_service.cpp

@@ -35,7 +35,7 @@ namespace {
 auto resolve_nation_id(const Engine::Core::UnitComponent *unit,
 auto resolve_nation_id(const Engine::Core::UnitComponent *unit,
                        int owner_id) -> Game::Systems::NationID {
                        int owner_id) -> Game::Systems::NationID {
   auto &registry = NationRegistry::instance();
   auto &registry = NationRegistry::instance();
-  if (const auto *nation = registry.getNationForPlayer(owner_id)) {
+  if (const auto *nation = registry.get_nation_for_player(owner_id)) {
     return nation->id;
     return nation->id;
   }
   }
   return registry.default_nation_id();
   return registry.default_nation_id();
@@ -85,7 +85,8 @@ auto ProductionService::startProductionForFirstSelectedBarracks(
 
 
   int const current_troops =
   int const current_troops =
       Engine::Core::World::count_troops_for_player(owner_id);
       Engine::Core::World::count_troops_for_player(owner_id);
-  int const max_troops = Game::GameConfig::instance().getMaxTroopsPerPlayer();
+  int const max_troops =
+      Game::GameConfig::instance().get_max_troops_per_player();
   if (current_troops + production_cost > max_troops) {
   if (current_troops + production_cost > max_troops) {
     return ProductionResult::GlobalTroopLimitReached;
     return ProductionResult::GlobalTroopLimitReached;
   }
   }

+ 3 - 3
game/systems/production_system.cpp

@@ -32,7 +32,7 @@ void apply_production_profile(Engine::Core::ProductionComponent *prod,
 auto resolve_nation_id(const Engine::Core::UnitComponent *unit,
 auto resolve_nation_id(const Engine::Core::UnitComponent *unit,
                        int owner_id) -> Game::Systems::NationID {
                        int owner_id) -> Game::Systems::NationID {
   auto &registry = NationRegistry::instance();
   auto &registry = NationRegistry::instance();
-  if (const auto *nation = registry.getNationForPlayer(owner_id)) {
+  if (const auto *nation = registry.get_nation_for_player(owner_id)) {
     return nation->id;
     return nation->id;
   }
   }
   return registry.default_nation_id();
   return registry.default_nation_id();
@@ -82,7 +82,7 @@ void ProductionSystem::update(Engine::Core::World *world, float delta_time) {
         int const current_troops =
         int const current_troops =
             Engine::Core::World::count_troops_for_player(u->owner_id);
             Engine::Core::World::count_troops_for_player(u->owner_id);
         int const max_troops =
         int const max_troops =
-            Game::GameConfig::instance().getMaxTroopsPerPlayer();
+            Game::GameConfig::instance().get_max_troops_per_player();
         if (current_troops + production_cost > max_troops) {
         if (current_troops + production_cost > max_troops) {
           prod->in_progress = false;
           prod->in_progress = false;
           prod->time_remaining = 0.0F;
           prod->time_remaining = 0.0F;
@@ -108,7 +108,7 @@ void ProductionSystem::update(Engine::Core::World *world, float delta_time) {
           auto unit = reg->create(sp.spawn_type, *world, sp);
           auto unit = reg->create(sp.spawn_type, *world, sp);
 
 
           if (unit && prod->rally_set) {
           if (unit && prod->rally_set) {
-            unit->moveTo(prod->rally_x, prod->rally_z);
+            unit->move_to(prod->rally_x, prod->rally_z);
           }
           }
         }
         }
 
 

+ 6 - 6
game/systems/projectile_system.cpp

@@ -22,14 +22,14 @@ void ProjectileSystem::spawn_arrow(const QVector3D &start, const QVector3D &end,
   float arc_height;
   float arc_height;
   if (is_ballista_bolt) {
   if (is_ballista_bolt) {
 
 
-    arc_height = std::clamp(m_arrow_config.arcHeightMultiplier * dist * 0.4F,
-                            m_arrow_config.arcHeightMin * 0.5F,
-                            m_arrow_config.arcHeightMax * 0.6F);
+    arc_height = std::clamp(m_arrow_config.arc_height_multiplier * dist * 0.4F,
+                            m_arrow_config.arc_height_min * 0.5F,
+                            m_arrow_config.arc_height_max * 0.6F);
   } else {
   } else {
 
 
-    arc_height =
-        std::clamp(m_arrow_config.arcHeightMultiplier * dist,
-                   m_arrow_config.arcHeightMin, m_arrow_config.arcHeightMax);
+    arc_height = std::clamp(m_arrow_config.arc_height_multiplier * dist,
+                            m_arrow_config.arc_height_min,
+                            m_arrow_config.arc_height_max);
   }
   }
   float inv_dist = (dist > 0.001F) ? (1.0F / dist) : 1.0F;
   float inv_dist = (dist > 0.001F) ? (1.0F / dist) : 1.0F;
 
 

+ 7 - 7
game/systems/save_load_service.cpp

@@ -95,9 +95,9 @@ auto SaveLoadService::saveGameToSlot(Engine::Core::World &world,
       return false;
       return false;
     }
     }
 
 
-    m_lastMetadata = combined_metadata;
+    m_last_metadata = combined_metadata;
     m_lastTitle = title;
     m_lastTitle = title;
-    m_lastScreenshot = screenshot;
+    m_last_screenshot = screenshot;
     m_last_error.clear();
     m_last_error.clear();
     return true;
     return true;
   } catch (const std::exception &e) {
   } catch (const std::exception &e) {
@@ -108,8 +108,8 @@ auto SaveLoadService::saveGameToSlot(Engine::Core::World &world,
   }
   }
 }
 }
 
 
-auto SaveLoadService::loadGameFromSlot(Engine::Core::World &world,
-                                       const QString &slotName) -> bool {
+auto SaveLoadService::load_game_from_slot(Engine::Core::World &world,
+                                          const QString &slotName) -> bool {
   qInfo() << "Loading game from slot:" << slotName;
   qInfo() << "Loading game from slot:" << slotName;
 
 
   try {
   try {
@@ -145,9 +145,9 @@ auto SaveLoadService::loadGameFromSlot(Engine::Core::World &world,
     world.clear();
     world.clear();
     Engine::Core::Serialization::deserializeWorld(&world, doc);
     Engine::Core::Serialization::deserializeWorld(&world, doc);
 
 
-    m_lastMetadata = metadata;
+    m_last_metadata = metadata;
     m_lastTitle = title;
     m_lastTitle = title;
-    m_lastScreenshot = screenshot;
+    m_last_screenshot = screenshot;
     m_last_error.clear();
     m_last_error.clear();
     return true;
     return true;
   } catch (const std::exception &e) {
   } catch (const std::exception &e) {
@@ -158,7 +158,7 @@ auto SaveLoadService::loadGameFromSlot(Engine::Core::World &world,
   }
   }
 }
 }
 
 
-auto SaveLoadService::getSaveSlots() const -> QVariantList {
+auto SaveLoadService::get_save_slots() const -> QVariantList {
   if (!m_storage) {
   if (!m_storage) {
     return {};
     return {};
   }
   }

+ 7 - 7
game/systems/save_load_service.h

@@ -25,10 +25,10 @@ public:
                       const QJsonObject &metadata = {},
                       const QJsonObject &metadata = {},
                       const QByteArray &screenshot = QByteArray()) -> bool;
                       const QByteArray &screenshot = QByteArray()) -> bool;
 
 
-  auto loadGameFromSlot(Engine::Core::World &world,
-                        const QString &slotName) -> bool;
+  auto load_game_from_slot(Engine::Core::World &world,
+                           const QString &slotName) -> bool;
 
 
-  auto getSaveSlots() const -> QVariantList;
+  auto get_save_slots() const -> QVariantList;
 
 
   auto deleteSaveSlot(const QString &slotName) -> bool;
   auto deleteSaveSlot(const QString &slotName) -> bool;
 
 
@@ -36,9 +36,9 @@ public:
 
 
   void clearError() { m_last_error.clear(); }
   void clearError() { m_last_error.clear(); }
 
 
-  auto getLastMetadata() const -> QJsonObject { return m_lastMetadata; }
+  auto getLastMetadata() const -> QJsonObject { return m_last_metadata; }
   auto getLastTitle() const -> QString { return m_lastTitle; }
   auto getLastTitle() const -> QString { return m_lastTitle; }
-  auto getLastScreenshot() const -> QByteArray { return m_lastScreenshot; }
+  auto getLastScreenshot() const -> QByteArray { return m_last_screenshot; }
 
 
   auto list_campaigns(QString *out_error = nullptr) const -> QVariantList;
   auto list_campaigns(QString *out_error = nullptr) const -> QVariantList;
   auto get_campaign_progress(const QString &campaign_id,
   auto get_campaign_progress(const QString &campaign_id,
@@ -56,9 +56,9 @@ private:
   static void ensureSavesDirectoryExists();
   static void ensureSavesDirectoryExists();
 
 
   mutable QString m_last_error;
   mutable QString m_last_error;
-  QJsonObject m_lastMetadata;
+  QJsonObject m_last_metadata;
   QString m_lastTitle;
   QString m_lastTitle;
-  QByteArray m_lastScreenshot;
+  QByteArray m_last_screenshot;
   std::unique_ptr<SaveStorage> m_storage;
   std::unique_ptr<SaveStorage> m_storage;
 };
 };
 
 

+ 6 - 6
game/systems/save_storage.cpp

@@ -480,12 +480,12 @@ auto SaveStorage::ensureSchema(QString *out_error) const -> bool {
     return false;
     return false;
   }
   }
 
 
-  if (!migrateSchema(current_version, out_error)) {
+  if (!migrate_schema(current_version, out_error)) {
     transaction.rollback();
     transaction.rollback();
     return false;
     return false;
   }
   }
 
 
-  if (!setSchemaVersion(k_current_schema_version, out_error)) {
+  if (!set_schema_version(k_current_schema_version, out_error)) {
     transaction.rollback();
     transaction.rollback();
     return false;
     return false;
   }
   }
@@ -514,8 +514,8 @@ auto SaveStorage::schemaVersion(QString *out_error) const -> int {
   return 0;
   return 0;
 }
 }
 
 
-auto SaveStorage::setSchemaVersion(int version,
-                                   QString *out_error) const -> bool {
+auto SaveStorage::set_schema_version(int version,
+                                     QString *out_error) const -> bool {
   QSqlQuery pragma_query(m_database);
   QSqlQuery pragma_query(m_database);
   if (!pragma_query.exec(
   if (!pragma_query.exec(
           QStringLiteral("PRAGMA user_version = %1").arg(version))) {
           QStringLiteral("PRAGMA user_version = %1").arg(version))) {
@@ -566,8 +566,8 @@ auto SaveStorage::createBaseSchema(QString *out_error) const -> bool {
   return true;
   return true;
 }
 }
 
 
-auto SaveStorage::migrateSchema(int fromVersion,
-                                QString *out_error) const -> bool {
+auto SaveStorage::migrate_schema(int fromVersion,
+                                 QString *out_error) const -> bool {
   int version = fromVersion;
   int version = fromVersion;
 
 
   while (version < k_current_schema_version) {
   while (version < k_current_schema_version) {

+ 4 - 4
game/systems/save_storage.h

@@ -41,11 +41,11 @@ private:
   auto open(QString *out_error = nullptr) const -> bool;
   auto open(QString *out_error = nullptr) const -> bool;
   auto ensureSchema(QString *out_error = nullptr) const -> bool;
   auto ensureSchema(QString *out_error = nullptr) const -> bool;
   auto createBaseSchema(QString *out_error = nullptr) const -> bool;
   auto createBaseSchema(QString *out_error = nullptr) const -> bool;
-  auto migrateSchema(int fromVersion,
-                     QString *out_error = nullptr) const -> bool;
+  auto migrate_schema(int fromVersion,
+                      QString *out_error = nullptr) const -> bool;
   auto schemaVersion(QString *out_error = nullptr) const -> int;
   auto schemaVersion(QString *out_error = nullptr) const -> int;
-  auto setSchemaVersion(int version,
-                        QString *out_error = nullptr) const -> bool;
+  auto set_schema_version(int version,
+                          QString *out_error = nullptr) const -> bool;
   auto migrate_to_2(QString *out_error = nullptr) const -> bool;
   auto migrate_to_2(QString *out_error = nullptr) const -> bool;
 
 
   QString m_database_path;
   QString m_database_path;

+ 2 - 2
game/systems/terrain_alignment_system.cpp

@@ -10,7 +10,7 @@ namespace Game::Systems {
 void TerrainAlignmentSystem::update(Engine::Core::World *world, float) {
 void TerrainAlignmentSystem::update(Engine::Core::World *world, float) {
   auto &terrain_service = Game::Map::TerrainService::instance();
   auto &terrain_service = Game::Map::TerrainService::instance();
 
 
-  if (!terrain_service.isInitialized()) {
+  if (!terrain_service.is_initialized()) {
     return;
     return;
   }
   }
 
 
@@ -29,7 +29,7 @@ void TerrainAlignmentSystem::alignEntityToTerrain(
 
 
   auto &terrain_service = Game::Map::TerrainService::instance();
   auto &terrain_service = Game::Map::TerrainService::instance();
 
 
-  float const terrain_height = terrain_service.getTerrainHeight(
+  float const terrain_height = terrain_service.get_terrain_height(
       transform->position.x, transform->position.z);
       transform->position.x, transform->position.z);
 
 
   float entity_base_offset = 0.0F;
   float entity_base_offset = 0.0F;

+ 1 - 1
game/systems/troop_count_registry.cpp

@@ -26,7 +26,7 @@ void TroopCountRegistry::initialize() {
 
 
 void TroopCountRegistry::clear() { m_troop_counts.clear(); }
 void TroopCountRegistry::clear() { m_troop_counts.clear(); }
 
 
-auto TroopCountRegistry::getTroopCount(int owner_id) const -> int {
+auto TroopCountRegistry::get_troop_count(int owner_id) const -> int {
   auto it = m_troop_counts.find(owner_id);
   auto it = m_troop_counts.find(owner_id);
   if (it != m_troop_counts.end()) {
   if (it != m_troop_counts.end()) {
     return it->second;
     return it->second;

+ 1 - 1
game/systems/troop_count_registry.h

@@ -16,7 +16,7 @@ public:
   void initialize();
   void initialize();
   void clear();
   void clear();
 
 
-  auto getTroopCount(int owner_id) const -> int;
+  auto get_troop_count(int owner_id) const -> int;
 
 
   void on_unit_spawned(const Engine::Core::UnitSpawnedEvent &event);
   void on_unit_spawned(const Engine::Core::UnitSpawnedEvent &event);
   void on_unit_died(const Engine::Core::UnitDiedEvent &event);
   void on_unit_died(const Engine::Core::UnitDiedEvent &event);

+ 1 - 1
game/systems/troop_profile_service.cpp

@@ -25,7 +25,7 @@ auto TroopProfileService::get_profile(
     const auto fallback_id = NationRegistry::instance().default_nation_id();
     const auto fallback_id = NationRegistry::instance().default_nation_id();
     nation = NationRegistry::instance().getNation(fallback_id);
     nation = NationRegistry::instance().getNation(fallback_id);
     if (nation == nullptr) {
     if (nation == nullptr) {
-      const auto &all = NationRegistry::instance().getAllNations();
+      const auto &all = NationRegistry::instance().get_all_nations();
       if (all.empty()) {
       if (all.empty()) {
         const auto &catalog_class =
         const auto &catalog_class =
             Game::Units::TroopCatalog::instance().get_class_or_fallback(type);
             Game::Units::TroopCatalog::instance().get_class_or_fallback(type);

+ 25 - 24
game/systems/victory_service.cpp

@@ -31,8 +31,8 @@ VictoryService::~VictoryService() = default;
 
 
 void VictoryService::reset() {
 void VictoryService::reset() {
   m_victoryState = "";
   m_victoryState = "";
-  m_elapsedTime = 0.0F;
-  m_startupDelay = 0.0F;
+  m_elapsed_time = 0.0F;
+  m_startup_delay = 0.0F;
   m_worldPtr = nullptr;
   m_worldPtr = nullptr;
   m_victoryCallback = nullptr;
   m_victoryCallback = nullptr;
   m_keyStructures.clear();
   m_keyStructures.clear();
@@ -50,7 +50,7 @@ void VictoryService::configure(const Game::Map::VictoryConfig &config,
     m_keyStructures = config.keyStructures;
     m_keyStructures = config.keyStructures;
   } else if (config.victoryType == "survive_time") {
   } else if (config.victoryType == "survive_time") {
     m_victoryType = VictoryType::SurviveTime;
     m_victoryType = VictoryType::SurviveTime;
-    m_surviveTimeDuration = config.surviveTimeDuration;
+    m_survive_time_duration = config.surviveTimeDuration;
   } else {
   } else {
     m_victoryType = VictoryType::Elimination;
     m_victoryType = VictoryType::Elimination;
     m_keyStructures = {"barracks"};
     m_keyStructures = {"barracks"};
@@ -69,7 +69,7 @@ void VictoryService::configure(const Game::Map::VictoryConfig &config,
     m_defeatConditions.push_back(DefeatCondition::NoKeyStructures);
     m_defeatConditions.push_back(DefeatCondition::NoKeyStructures);
   }
   }
 
 
-  m_startupDelay = k_startup_delay_seconds;
+  m_startup_delay = k_startup_delay_seconds;
 }
 }
 
 
 void VictoryService::update(Engine::Core::World &world, float delta_time) {
 void VictoryService::update(Engine::Core::World &world, float delta_time) {
@@ -79,21 +79,21 @@ void VictoryService::update(Engine::Core::World &world, float delta_time) {
 
 
   m_worldPtr = &world;
   m_worldPtr = &world;
 
 
-  if (m_startupDelay > 0.0F) {
-    m_startupDelay = std::max(0.0F, m_startupDelay - delta_time);
+  if (m_startup_delay > 0.0F) {
+    m_startup_delay = std::max(0.0F, m_startup_delay - delta_time);
     return;
     return;
   }
   }
 
 
   if (m_victoryType == VictoryType::SurviveTime) {
   if (m_victoryType == VictoryType::SurviveTime) {
-    m_elapsedTime += delta_time;
+    m_elapsed_time += delta_time;
   }
   }
 
 
-  checkVictoryConditions(world);
+  check_victory_conditions(world);
   if (!m_victoryState.isEmpty()) {
   if (!m_victoryState.isEmpty()) {
     return;
     return;
   }
   }
 
 
-  checkDefeatConditions(world);
+  check_defeat_conditions(world);
 }
 }
 
 
 void VictoryService::on_unit_died(const Engine::Core::UnitDiedEvent &event) {}
 void VictoryService::on_unit_died(const Engine::Core::UnitDiedEvent &event) {}
@@ -105,20 +105,20 @@ void VictoryService::on_barrack_captured(
     return;
     return;
   }
   }
 
 
-  checkVictoryConditions(*m_worldPtr);
+  check_victory_conditions(*m_worldPtr);
   if (!m_victoryState.isEmpty()) {
   if (!m_victoryState.isEmpty()) {
     return;
     return;
   }
   }
 
 
-  checkDefeatConditions(*m_worldPtr);
+  check_defeat_conditions(*m_worldPtr);
 }
 }
 
 
-void VictoryService::checkVictoryConditions(Engine::Core::World &world) {
+void VictoryService::check_victory_conditions(Engine::Core::World &world) {
   bool victory = false;
   bool victory = false;
 
 
   switch (m_victoryType) {
   switch (m_victoryType) {
   case VictoryType::Elimination:
   case VictoryType::Elimination:
-    victory = checkElimination(world);
+    victory = check_elimination(world);
     break;
     break;
   case VictoryType::SurviveTime:
   case VictoryType::SurviveTime:
     victory = checkSurviveTime();
     victory = checkSurviveTime();
@@ -132,7 +132,7 @@ void VictoryService::checkVictoryConditions(Engine::Core::World &world) {
     m_victoryState = "victory";
     m_victoryState = "victory";
     qInfo() << "VICTORY! Conditions met.";
     qInfo() << "VICTORY! Conditions met.";
 
 
-    const auto &all_owners = m_owner_registry.getAllOwners();
+    const auto &all_owners = m_owner_registry.get_all_owners();
     for (const auto &owner : all_owners) {
     for (const auto &owner : all_owners) {
       if (owner.type == Game::Systems::OwnerType::Player ||
       if (owner.type == Game::Systems::OwnerType::Player ||
           owner.type == Game::Systems::OwnerType::AI) {
           owner.type == Game::Systems::OwnerType::AI) {
@@ -154,16 +154,16 @@ void VictoryService::checkVictoryConditions(Engine::Core::World &world) {
   }
   }
 }
 }
 
 
-void VictoryService::checkDefeatConditions(Engine::Core::World &world) {
+void VictoryService::check_defeat_conditions(Engine::Core::World &world) {
   for (const auto &condition : m_defeatConditions) {
   for (const auto &condition : m_defeatConditions) {
     bool defeat = false;
     bool defeat = false;
 
 
     switch (condition) {
     switch (condition) {
     case DefeatCondition::NoUnits:
     case DefeatCondition::NoUnits:
-      defeat = checkNoUnits(world);
+      defeat = check_no_units(world);
       break;
       break;
     case DefeatCondition::NoKeyStructures:
     case DefeatCondition::NoKeyStructures:
-      defeat = checkNoKeyStructures(world);
+      defeat = check_no_key_structures(world);
       break;
       break;
     case DefeatCondition::TimeExpired:
     case DefeatCondition::TimeExpired:
 
 
@@ -174,7 +174,7 @@ void VictoryService::checkDefeatConditions(Engine::Core::World &world) {
       m_victoryState = "defeat";
       m_victoryState = "defeat";
       qInfo() << "DEFEAT! Condition met.";
       qInfo() << "DEFEAT! Condition met.";
 
 
-      const auto &all_owners = m_owner_registry.getAllOwners();
+      const auto &all_owners = m_owner_registry.get_all_owners();
       for (const auto &owner : all_owners) {
       for (const auto &owner : all_owners) {
         if (owner.type == Game::Systems::OwnerType::Player ||
         if (owner.type == Game::Systems::OwnerType::Player ||
             owner.type == Game::Systems::OwnerType::AI) {
             owner.type == Game::Systems::OwnerType::AI) {
@@ -198,11 +198,11 @@ void VictoryService::checkDefeatConditions(Engine::Core::World &world) {
   }
   }
 }
 }
 
 
-auto VictoryService::checkElimination(Engine::Core::World &world) -> bool {
+auto VictoryService::check_elimination(Engine::Core::World &world) -> bool {
 
 
   bool enemy_key_structures_alive = false;
   bool enemy_key_structures_alive = false;
 
 
-  int const local_team = m_owner_registry.getOwnerTeam(m_local_owner_id);
+  int const local_team = m_owner_registry.get_owner_team(m_local_owner_id);
 
 
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
   for (auto *e : entities) {
@@ -215,7 +215,7 @@ auto VictoryService::checkElimination(Engine::Core::World &world) -> bool {
       continue;
       continue;
     }
     }
 
 
-    if (m_owner_registry.areAllies(m_local_owner_id, unit->owner_id)) {
+    if (m_owner_registry.are_allies(m_local_owner_id, unit->owner_id)) {
       continue;
       continue;
     }
     }
 
 
@@ -232,10 +232,10 @@ auto VictoryService::checkElimination(Engine::Core::World &world) -> bool {
 }
 }
 
 
 auto VictoryService::checkSurviveTime() const -> bool {
 auto VictoryService::checkSurviveTime() const -> bool {
-  return m_elapsedTime >= m_surviveTimeDuration;
+  return m_elapsed_time >= m_survive_time_duration;
 }
 }
 
 
-auto VictoryService::checkNoUnits(Engine::Core::World &world) const -> bool {
+auto VictoryService::check_no_units(Engine::Core::World &world) const -> bool {
 
 
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
   for (auto *e : entities) {
@@ -252,7 +252,8 @@ auto VictoryService::checkNoUnits(Engine::Core::World &world) const -> bool {
   return true;
   return true;
 }
 }
 
 
-auto VictoryService::checkNoKeyStructures(Engine::Core::World &world) -> bool {
+auto VictoryService::check_no_key_structures(Engine::Core::World &world)
+    -> bool {
 
 
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
   for (auto *e : entities) {

+ 8 - 8
game/systems/victory_service.h

@@ -51,21 +51,21 @@ public:
 private:
 private:
   void on_unit_died(const Engine::Core::UnitDiedEvent &event);
   void on_unit_died(const Engine::Core::UnitDiedEvent &event);
   void on_barrack_captured(const Engine::Core::BarrackCapturedEvent &event);
   void on_barrack_captured(const Engine::Core::BarrackCapturedEvent &event);
-  void checkVictoryConditions(Engine::Core::World &world);
-  void checkDefeatConditions(Engine::Core::World &world);
+  void check_victory_conditions(Engine::Core::World &world);
+  void check_defeat_conditions(Engine::Core::World &world);
 
 
-  auto checkElimination(Engine::Core::World &world) -> bool;
+  auto check_elimination(Engine::Core::World &world) -> bool;
   [[nodiscard]] auto checkSurviveTime() const -> bool;
   [[nodiscard]] auto checkSurviveTime() const -> bool;
-  auto checkNoUnits(Engine::Core::World &world) const -> bool;
-  auto checkNoKeyStructures(Engine::Core::World &world) -> bool;
+  auto check_no_units(Engine::Core::World &world) const -> bool;
+  auto check_no_key_structures(Engine::Core::World &world) -> bool;
 
 
   VictoryType m_victoryType = VictoryType::Elimination;
   VictoryType m_victoryType = VictoryType::Elimination;
   std::vector<QString> m_keyStructures;
   std::vector<QString> m_keyStructures;
   std::vector<DefeatCondition> m_defeatConditions;
   std::vector<DefeatCondition> m_defeatConditions;
 
 
-  float m_surviveTimeDuration = 0.0F;
-  float m_elapsedTime = 0.0F;
-  float m_startupDelay = 0.0F;
+  float m_survive_time_duration = 0.0F;
+  float m_elapsed_time = 0.0F;
+  float m_startup_delay = 0.0F;
 
 
   int m_local_owner_id = 1;
   int m_local_owner_id = 1;
   QString m_victoryState;
   QString m_victoryState;

+ 1 - 1
game/units/barracks.cpp

@@ -58,7 +58,7 @@ void Barracks::init(const SpawnParams &params) {
 
 
   e->add_component<Engine::Core::BuildingComponent>();
   e->add_component<Engine::Core::BuildingComponent>();
 
 
-  Game::Systems::BuildingCollisionRegistry::instance().registerBuilding(
+  Game::Systems::BuildingCollisionRegistry::instance().register_building(
       m_id, m_type_string, m_t->position.x, m_t->position.z, m_u->owner_id);
       m_id, m_type_string, m_t->position.x, m_t->position.z, m_u->owner_id);
 
 
   if (!Game::Core::isNeutralOwner(m_u->owner_id)) {
   if (!Game::Core::isNeutralOwner(m_u->owner_id)) {

+ 1 - 1
game/units/spawn_type.h

@@ -137,7 +137,7 @@ inline auto isTroopSpawn(SpawnType type) -> bool {
   return type != SpawnType::Barracks;
   return type != SpawnType::Barracks;
 }
 }
 
 
-inline auto isBuildingSpawn(SpawnType type) -> bool {
+inline auto is_building_spawn(SpawnType type) -> bool {
   return type == SpawnType::Barracks;
   return type == SpawnType::Barracks;
 }
 }
 
 

+ 3 - 3
game/units/unit.cpp

@@ -50,7 +50,7 @@ void Unit::ensureCoreComponents() {
   }
   }
 }
 }
 
 
-void Unit::moveTo(float x, float z) {
+void Unit::move_to(float x, float z) {
   ensureCoreComponents();
   ensureCoreComponents();
   if (m_mv == nullptr) {
   if (m_mv == nullptr) {
     if (auto *e = entity()) {
     if (auto *e = entity()) {
@@ -94,7 +94,7 @@ auto Unit::position() const -> QVector3D {
   return {};
   return {};
 }
 }
 
 
-void Unit::setHoldMode(bool enabled) {
+void Unit::set_hold_mode(bool enabled) {
   auto *e = entity();
   auto *e = entity();
   if (e == nullptr) {
   if (e == nullptr) {
     return;
     return;
@@ -123,7 +123,7 @@ void Unit::setHoldMode(bool enabled) {
   }
   }
 }
 }
 
 
-auto Unit::isInHoldMode() const -> bool {
+auto Unit::is_in_hold_mode() const -> bool {
   auto *e = entity();
   auto *e = entity();
   if (e == nullptr) {
   if (e == nullptr) {
     return false;
     return false;

+ 3 - 3
game/units/unit.h

@@ -40,12 +40,12 @@ public:
     return m_type_string;
     return m_type_string;
   }
   }
 
 
-  void moveTo(float x, float z);
+  void move_to(float x, float z);
   [[nodiscard]] auto is_alive() const -> bool;
   [[nodiscard]] auto is_alive() const -> bool;
   [[nodiscard]] auto position() const -> QVector3D;
   [[nodiscard]] auto position() const -> QVector3D;
 
 
-  void setHoldMode(bool enabled);
-  [[nodiscard]] auto isInHoldMode() const -> bool;
+  void set_hold_mode(bool enabled);
+  [[nodiscard]] auto is_in_hold_mode() const -> bool;
 
 
 protected:
 protected:
   Unit(Engine::Core::World &world, TroopType type);
   Unit(Engine::Core::World &world, TroopType type);

+ 1 - 1
game/visuals/team_colors.h

@@ -11,7 +11,7 @@ inline auto team_colorForOwner(int owner_id) -> QVector3D {
   }
   }
 
 
   auto &registry = Game::Systems::OwnerRegistry::instance();
   auto &registry = Game::Systems::OwnerRegistry::instance();
-  auto color = registry.getOwnerColor(owner_id);
+  auto color = registry.get_owner_color(owner_id);
   return {color[0], color[1], color[2]};
   return {color[0], color[1], color[2]};
 }
 }
 } // namespace Game::Visuals
 } // namespace Game::Visuals

+ 2 - 2
game/visuals/visual_catalog.cpp

@@ -102,8 +102,8 @@ auto VisualCatalog::lookup(const std::string &unitType,
   return true;
   return true;
 }
 }
 
 
-void applyToRenderable(const VisualDef &def,
-                       Engine::Core::RenderableComponent &r) {
+void apply_to_renderable(const VisualDef &def,
+                         Engine::Core::RenderableComponent &r) {
   r.mesh = toRenderableMesh(def.mesh);
   r.mesh = toRenderableMesh(def.mesh);
   r.color[0] = def.color.x();
   r.color[0] = def.color.x();
   r.color[1] = def.color.y();
   r.color[1] = def.color.y();

+ 2 - 2
game/visuals/visual_catalog.h

@@ -31,7 +31,7 @@ private:
 
 
 auto meshKindFromString(const QString &s) -> VisualDef::MeshKind;
 auto meshKindFromString(const QString &s) -> VisualDef::MeshKind;
 
 
-void applyToRenderable(const VisualDef &def,
-                       Engine::Core::RenderableComponent &r);
+void apply_to_renderable(const VisualDef &def,
+                         Engine::Core::RenderableComponent &r);
 
 
 } // namespace Game::Visuals
 } // namespace Game::Visuals

+ 1 - 1
render/gl/backend.cpp

@@ -1414,7 +1414,7 @@ void Backend::execute(const DrawQueue &queue, const Camera &cam) {
     case PrimitiveBatchCmdIndex: {
     case PrimitiveBatchCmdIndex: {
       const auto &batch = std::get<PrimitiveBatchCmdIndex>(cmd);
       const auto &batch = std::get<PrimitiveBatchCmdIndex>(cmd);
       if (batch.instance_count() == 0 || m_primitiveBatchPipeline == nullptr ||
       if (batch.instance_count() == 0 || m_primitiveBatchPipeline == nullptr ||
-          !m_primitiveBatchPipeline->isInitialized()) {
+          !m_primitiveBatchPipeline->is_initialized()) {
         break;
         break;
       }
       }
 
 

+ 1 - 1
render/gl/backend/README.md

@@ -61,7 +61,7 @@ python3 scripts/validate_shader_uniforms.py
 When creating a new rendering pipeline:
 When creating a new rendering pipeline:
 
 
 1. Inherit from `IPipeline` interface
 1. Inherit from `IPipeline` interface
-2. Implement `initialize()`, `shutdown()`, `cacheUniforms()`, `isInitialized()`
+2. Implement `initialize()`, `shutdown()`, `cacheUniforms()`, `is_initialized()`
 3. Add validation to ensure uniform names match shader files
 3. Add validation to ensure uniform names match shader files
 4. Document any shader dependencies
 4. Document any shader dependencies
 5. Update this README with the new pipeline
 5. Update this README with the new pipeline

+ 2 - 2
render/gl/backend/character_pipeline.cpp

@@ -34,7 +34,7 @@ auto CharacterPipeline::initialize() -> bool {
 
 
   cacheUniforms();
   cacheUniforms();
 
 
-  return isInitialized();
+  return is_initialized();
 }
 }
 
 
 void CharacterPipeline::shutdown() {
 void CharacterPipeline::shutdown() {
@@ -52,7 +52,7 @@ void CharacterPipeline::cacheUniforms() {
   cacheSpearmanUniforms();
   cacheSpearmanUniforms();
 }
 }
 
 
-auto CharacterPipeline::isInitialized() const -> bool {
+auto CharacterPipeline::is_initialized() const -> bool {
   return m_basicShader != nullptr && m_archerShader != nullptr &&
   return m_basicShader != nullptr && m_archerShader != nullptr &&
          m_swordsmanShader != nullptr && m_spearmanShader != nullptr;
          m_swordsmanShader != nullptr && m_spearmanShader != nullptr;
 }
 }

+ 1 - 1
render/gl/backend/character_pipeline.h

@@ -19,7 +19,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override;
+  [[nodiscard]] auto is_initialized() const -> bool override;
 
 
   struct BasicUniforms {
   struct BasicUniforms {
     GL::Shader::UniformHandle mvp{GL::Shader::InvalidUniform};
     GL::Shader::UniformHandle mvp{GL::Shader::InvalidUniform};

+ 1 - 1
render/gl/backend/cylinder_pipeline.h

@@ -17,7 +17,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override {
+  [[nodiscard]] auto is_initialized() const -> bool override {
     return m_initialized;
     return m_initialized;
   }
   }
 
 

+ 2 - 2
render/gl/backend/effects_pipeline.cpp

@@ -24,7 +24,7 @@ auto EffectsPipeline::initialize() -> bool {
 
 
   cacheUniforms();
   cacheUniforms();
 
 
-  return isInitialized();
+  return is_initialized();
 }
 }
 
 
 void EffectsPipeline::shutdown() {
 void EffectsPipeline::shutdown() {
@@ -37,7 +37,7 @@ void EffectsPipeline::cacheUniforms() {
   cacheGridUniforms();
   cacheGridUniforms();
 }
 }
 
 
-auto EffectsPipeline::isInitialized() const -> bool {
+auto EffectsPipeline::is_initialized() const -> bool {
   return m_basicShader != nullptr && m_gridShader != nullptr;
   return m_basicShader != nullptr && m_gridShader != nullptr;
 }
 }
 
 

+ 1 - 1
render/gl/backend/effects_pipeline.h

@@ -18,7 +18,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override;
+  [[nodiscard]] auto is_initialized() const -> bool override;
 
 
   struct GridUniforms {
   struct GridUniforms {
     GL::Shader::UniformHandle mvp{GL::Shader::InvalidUniform};
     GL::Shader::UniformHandle mvp{GL::Shader::InvalidUniform};

+ 1 - 1
render/gl/backend/pipeline_interface.h

@@ -15,7 +15,7 @@ public:
 
 
   virtual void cacheUniforms() = 0;
   virtual void cacheUniforms() = 0;
 
 
-  [[nodiscard]] virtual auto isInitialized() const -> bool = 0;
+  [[nodiscard]] virtual auto is_initialized() const -> bool = 0;
 };
 };
 
 
 } // namespace Render::GL::BackendPipelines
 } // namespace Render::GL::BackendPipelines

+ 1 - 1
render/gl/backend/primitive_batch_pipeline.h

@@ -19,7 +19,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override {
+  [[nodiscard]] auto is_initialized() const -> bool override {
     return m_initialized;
     return m_initialized;
   }
   }
 
 

+ 2 - 2
render/gl/backend/terrain_pipeline.cpp

@@ -42,7 +42,7 @@ auto TerrainPipeline::initialize() -> bool {
 
 
   cacheUniforms();
   cacheUniforms();
 
 
-  return isInitialized();
+  return is_initialized();
 }
 }
 
 
 void TerrainPipeline::shutdown() {
 void TerrainPipeline::shutdown() {
@@ -58,7 +58,7 @@ void TerrainPipeline::cacheUniforms() {
   cacheTerrainUniforms();
   cacheTerrainUniforms();
 }
 }
 
 
-auto TerrainPipeline::isInitialized() const -> bool {
+auto TerrainPipeline::is_initialized() const -> bool {
   return m_grassShader != nullptr && m_groundShader != nullptr &&
   return m_grassShader != nullptr && m_groundShader != nullptr &&
          m_terrainShader != nullptr && m_grassVao != 0;
          m_terrainShader != nullptr && m_grassVao != 0;
 }
 }

+ 1 - 1
render/gl/backend/terrain_pipeline.h

@@ -21,7 +21,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override;
+  [[nodiscard]] auto is_initialized() const -> bool override;
 
 
   struct GrassUniforms {
   struct GrassUniforms {
     GL::Shader::UniformHandle view_proj{GL::Shader::InvalidUniform};
     GL::Shader::UniformHandle view_proj{GL::Shader::InvalidUniform};

+ 1 - 1
render/gl/backend/vegetation_pipeline.h

@@ -16,7 +16,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override {
+  [[nodiscard]] auto is_initialized() const -> bool override {
     return m_initialized;
     return m_initialized;
   }
   }
 
 

+ 2 - 2
render/gl/backend/water_pipeline.cpp

@@ -32,7 +32,7 @@ auto WaterPipeline::initialize() -> bool {
 
 
   cacheUniforms();
   cacheUniforms();
 
 
-  return isInitialized();
+  return is_initialized();
 }
 }
 
 
 void WaterPipeline::shutdown() {
 void WaterPipeline::shutdown() {
@@ -49,7 +49,7 @@ void WaterPipeline::cacheUniforms() {
   cache_road_uniforms();
   cache_road_uniforms();
 }
 }
 
 
-auto WaterPipeline::isInitialized() const -> bool {
+auto WaterPipeline::is_initialized() const -> bool {
   return m_riverShader != nullptr && m_riverbankShader != nullptr &&
   return m_riverShader != nullptr && m_riverbankShader != nullptr &&
          m_bridgeShader != nullptr && m_road_shader != nullptr;
          m_bridgeShader != nullptr && m_road_shader != nullptr;
 }
 }

+ 1 - 1
render/gl/backend/water_pipeline.h

@@ -18,7 +18,7 @@ public:
   auto initialize() -> bool override;
   auto initialize() -> bool override;
   void shutdown() override;
   void shutdown() override;
   void cacheUniforms() override;
   void cacheUniforms() override;
-  [[nodiscard]] auto isInitialized() const -> bool override;
+  [[nodiscard]] auto is_initialized() const -> bool override;
 
 
   struct RiverUniforms {
   struct RiverUniforms {
     GL::Shader::UniformHandle model{GL::Shader::InvalidUniform};
     GL::Shader::UniformHandle model{GL::Shader::InvalidUniform};

+ 1 - 1
render/gl/camera.cpp

@@ -603,7 +603,7 @@ void Camera::applySoftBoundaries(bool isPanning) {
   }
   }
 
 
   auto &vis = Game::Map::VisibilityService::instance();
   auto &vis = Game::Map::VisibilityService::instance();
-  if (!vis.isInitialized()) {
+  if (!vis.is_initialized()) {
     return;
     return;
   }
   }
 
 

+ 1 - 1
render/gl/camera.h

@@ -54,7 +54,7 @@ public:
   auto world_to_screen(const QVector3D &world, qreal screenW, qreal screenH,
   auto world_to_screen(const QVector3D &world, qreal screenW, qreal screenH,
                        QPointF &outScreen) const -> bool;
                        QPointF &outScreen) const -> bool;
 
 
-  void setFollowEnabled(bool enable) { m_followEnabled = enable; }
+  void set_follow_enabled(bool enable) { m_followEnabled = enable; }
   [[nodiscard]] auto isFollowEnabled() const -> bool { return m_followEnabled; }
   [[nodiscard]] auto isFollowEnabled() const -> bool { return m_followEnabled; }
   void setFollowLerp(float alpha) { m_followLerp = alpha; }
   void setFollowLerp(float alpha) { m_followLerp = alpha; }
   void setFollowOffset(const QVector3D &off) { m_followOffset = off; }
   void setFollowOffset(const QVector3D &off) { m_followOffset = off; }

+ 21 - 20
render/ground/biome_renderer.cpp

@@ -64,23 +64,23 @@ BiomeRenderer::BiomeRenderer() = default;
 BiomeRenderer::~BiomeRenderer() = default;
 BiomeRenderer::~BiomeRenderer() = default;
 
 
 void BiomeRenderer::configure(const Game::Map::TerrainHeightMap &height_map,
 void BiomeRenderer::configure(const Game::Map::TerrainHeightMap &height_map,
-                              const Game::Map::BiomeSettings &biomeSettings) {
+                              const Game::Map::BiomeSettings &biome_settings) {
   m_width = height_map.getWidth();
   m_width = height_map.getWidth();
   m_height = height_map.getHeight();
   m_height = height_map.getHeight();
   m_tile_size = height_map.getTileSize();
   m_tile_size = height_map.getTileSize();
   m_heightData = height_map.getHeightData();
   m_heightData = height_map.getHeightData();
   m_terrain_types = height_map.getTerrainTypes();
   m_terrain_types = height_map.getTerrainTypes();
-  m_biomeSettings = biomeSettings;
-  m_noiseSeed = biomeSettings.seed;
+  m_biome_settings = biome_settings;
+  m_noiseSeed = biome_settings.seed;
 
 
   m_grassInstances.clear();
   m_grassInstances.clear();
   m_grassInstanceBuffer.reset();
   m_grassInstanceBuffer.reset();
   m_grassInstanceCount = 0;
   m_grassInstanceCount = 0;
   m_grassInstancesDirty = false;
   m_grassInstancesDirty = false;
 
 
-  m_grassParams.soil_color = m_biomeSettings.soil_color;
-  m_grassParams.wind_strength = m_biomeSettings.sway_strength;
-  m_grassParams.wind_speed = m_biomeSettings.sway_speed;
+  m_grassParams.soil_color = m_biome_settings.soil_color;
+  m_grassParams.wind_strength = m_biome_settings.sway_strength;
+  m_grassParams.wind_speed = m_biome_settings.sway_speed;
   m_grassParams.light_direction = QVector3D(0.35F, 0.8F, 0.45F);
   m_grassParams.light_direction = QVector3D(0.35F, 0.8F, 0.45F);
   m_grassParams.time = 0.0F;
   m_grassParams.time = 0.0F;
 
 
@@ -131,7 +131,7 @@ void BiomeRenderer::generateGrassInstances() {
     return;
     return;
   }
   }
 
 
-  if (m_biomeSettings.patch_density < 0.01F) {
+  if (m_biome_settings.patch_density < 0.01F) {
     m_grassInstanceCount = 0;
     m_grassInstanceCount = 0;
     m_grassInstancesDirty = false;
     m_grassInstancesDirty = false;
     return;
     return;
@@ -142,7 +142,7 @@ void BiomeRenderer::generateGrassInstances() {
   const float tile_safe = std::max(0.001F, m_tile_size);
   const float tile_safe = std::max(0.001F, m_tile_size);
 
 
   const float edge_padding =
   const float edge_padding =
-      std::clamp(m_biomeSettings.spawn_edge_padding, 0.0F, 0.5F);
+      std::clamp(m_biome_settings.spawn_edge_padding, 0.0F, 0.5F);
   const float edge_margin_x = static_cast<float>(m_width) * edge_padding;
   const float edge_margin_x = static_cast<float>(m_width) * edge_padding;
   const float edge_margin_z = static_cast<float>(m_height) * edge_padding;
   const float edge_margin_z = static_cast<float>(m_height) * edge_padding;
 
 
@@ -268,16 +268,17 @@ void BiomeRenderer::generateGrassInstances() {
     float const dryness =
     float const dryness =
         std::clamp(dryness_noise * 0.6F + slope * 0.4F, 0.0F, 1.0F);
         std::clamp(dryness_noise * 0.6F + slope * 0.4F, 0.0F, 1.0F);
     QVector3D const lush_mix =
     QVector3D const lush_mix =
-        m_biomeSettings.grass_primary * (1.0F - lush_noise) +
-        m_biomeSettings.grass_secondary * lush_noise;
+        m_biome_settings.grass_primary * (1.0F - lush_noise) +
+        m_biome_settings.grass_secondary * lush_noise;
     QVector3D const color =
     QVector3D const color =
-        lush_mix * (1.0F - dryness) + m_biomeSettings.grass_dry * dryness;
-
-    float const height = remap(rand_01(state), m_biomeSettings.blade_height_min,
-                               m_biomeSettings.blade_height_max) *
-                         tile_safe * 0.5F;
-    float const width = remap(rand_01(state), m_biomeSettings.blade_width_min,
-                              m_biomeSettings.blade_width_max) *
+        lush_mix * (1.0F - dryness) + m_biome_settings.grass_dry * dryness;
+
+    float const height =
+        remap(rand_01(state), m_biome_settings.blade_height_min,
+              m_biome_settings.blade_height_max) *
+        tile_safe * 0.5F;
+    float const width = remap(rand_01(state), m_biome_settings.blade_width_min,
+                              m_biome_settings.blade_width_max) *
                         tile_safe;
                         tile_safe;
 
 
     float const sway_strength = remap(rand_01(state), 0.75F, 1.25F);
     float const sway_strength = remap(rand_01(state), 0.75F, 1.25F);
@@ -382,7 +383,7 @@ void BiomeRenderer::generateGrassInstances() {
       float const type_bias = 1.0F;
       float const type_bias = 1.0F;
       constexpr float k_cluster_boost = 1.35F;
       constexpr float k_cluster_boost = 1.35F;
       float const expected_clusters =
       float const expected_clusters =
-          std::max(0.0F, m_biomeSettings.patch_density * k_cluster_boost *
+          std::max(0.0F, m_biome_settings.patch_density * k_cluster_boost *
                              slope_penalty * type_bias * usable_coverage);
                              slope_penalty * type_bias * usable_coverage);
       int cluster_count = static_cast<int>(std::floor(expected_clusters));
       int cluster_count = static_cast<int>(std::floor(expected_clusters));
       float const frac = expected_clusters - float(cluster_count);
       float const frac = expected_clusters - float(cluster_count);
@@ -394,7 +395,7 @@ void BiomeRenderer::generateGrassInstances() {
         auto chunk_span_x = float(chunk_max_x - chunk_x + 1);
         auto chunk_span_x = float(chunk_max_x - chunk_x + 1);
         auto chunk_span_z = float(chunk_max_z - chunk_z + 1);
         auto chunk_span_z = float(chunk_max_z - chunk_z + 1);
         float const scatter_base =
         float const scatter_base =
-            std::max(0.25F, m_biomeSettings.patch_jitter);
+            std::max(0.25F, m_biome_settings.patch_jitter);
 
 
         auto pick_cluster_center =
         auto pick_cluster_center =
             [&](uint32_t &rng) -> std::optional<QVector2D> {
             [&](uint32_t &rng) -> std::optional<QVector2D> {
@@ -456,7 +457,7 @@ void BiomeRenderer::generateGrassInstances() {
   }
   }
 
 
   const float background_density =
   const float background_density =
-      std::max(0.0F, m_biomeSettings.background_blade_density);
+      std::max(0.0F, m_biome_settings.background_blade_density);
   if (background_density > 0.0F) {
   if (background_density > 0.0F) {
     for (int z = 0; z < m_height; ++z) {
     for (int z = 0; z < m_height; ++z) {
       for (int x = 0; x < m_width; ++x) {
       for (int x = 0; x < m_width; ++x) {

+ 2 - 2
render/ground/biome_renderer.h

@@ -18,7 +18,7 @@ public:
   ~BiomeRenderer() override;
   ~BiomeRenderer() override;
 
 
   void configure(const Game::Map::TerrainHeightMap &height_map,
   void configure(const Game::Map::TerrainHeightMap &height_map,
-                 const Game::Map::BiomeSettings &biomeSettings);
+                 const Game::Map::BiomeSettings &biome_settings);
 
 
   void submit(Renderer &renderer, ResourceManager *resources) override;
   void submit(Renderer &renderer, ResourceManager *resources) override;
 
 
@@ -35,7 +35,7 @@ private:
 
 
   std::vector<float> m_heightData;
   std::vector<float> m_heightData;
   std::vector<Game::Map::TerrainType> m_terrain_types;
   std::vector<Game::Map::TerrainType> m_terrain_types;
-  Game::Map::BiomeSettings m_biomeSettings;
+  Game::Map::BiomeSettings m_biome_settings;
   std::uint32_t m_noiseSeed = 0U;
   std::uint32_t m_noiseSeed = 0U;
 
 
   std::vector<GrassInstanceGpu> m_grassInstances;
   std::vector<GrassInstanceGpu> m_grassInstances;

+ 1 - 1
render/ground/bridge_renderer.cpp

@@ -220,7 +220,7 @@ void BridgeRenderer::submit(Renderer &renderer, ResourceManager *resources) {
   Q_UNUSED(resources);
   Q_UNUSED(resources);
 
 
   auto &visibility = Game::Map::VisibilityService::instance();
   auto &visibility = Game::Map::VisibilityService::instance();
-  const bool use_visibility = visibility.isInitialized();
+  const bool use_visibility = visibility.is_initialized();
 
 
   auto *shader = renderer.get_shader("bridge");
   auto *shader = renderer.get_shader("bridge");
   if (shader == nullptr) {
   if (shader == nullptr) {

+ 5 - 5
render/ground/firecamp_renderer.cpp

@@ -58,14 +58,14 @@ FireCampRenderer::~FireCampRenderer() = default;
 
 
 void FireCampRenderer::configure(
 void FireCampRenderer::configure(
     const Game::Map::TerrainHeightMap &height_map,
     const Game::Map::TerrainHeightMap &height_map,
-    const Game::Map::BiomeSettings &biomeSettings) {
+    const Game::Map::BiomeSettings &biome_settings) {
   m_width = height_map.getWidth();
   m_width = height_map.getWidth();
   m_height = height_map.getHeight();
   m_height = height_map.getHeight();
   m_tile_size = height_map.getTileSize();
   m_tile_size = height_map.getTileSize();
   m_heightData = height_map.getHeightData();
   m_heightData = height_map.getHeightData();
   m_terrain_types = height_map.getTerrainTypes();
   m_terrain_types = height_map.getTerrainTypes();
-  m_biomeSettings = biomeSettings;
-  m_noiseSeed = biomeSettings.seed;
+  m_biome_settings = biome_settings;
+  m_noiseSeed = biome_settings.seed;
 
 
   m_fireCampInstances.clear();
   m_fireCampInstances.clear();
   m_fireCampInstanceBuffer.reset();
   m_fireCampInstanceBuffer.reset();
@@ -92,7 +92,7 @@ void FireCampRenderer::submit(Renderer &renderer, ResourceManager *resources) {
   }
   }
 
 
   auto &visibility = Game::Map::VisibilityService::instance();
   auto &visibility = Game::Map::VisibilityService::instance();
-  const bool use_visibility = visibility.isInitialized();
+  const bool use_visibility = visibility.is_initialized();
   const std::uint64_t current_version =
   const std::uint64_t current_version =
       use_visibility ? visibility.version() : 0;
       use_visibility ? visibility.version() : 0;
 
 
@@ -261,7 +261,7 @@ void FireCampRenderer::generateFireCampInstances() {
   const float tile_safe = std::max(0.1F, m_tile_size);
   const float tile_safe = std::max(0.1F, m_tile_size);
 
 
   const float edge_padding =
   const float edge_padding =
-      std::clamp(m_biomeSettings.spawn_edge_padding, 0.0F, 0.5F);
+      std::clamp(m_biome_settings.spawn_edge_padding, 0.0F, 0.5F);
   const float edge_margin_x = static_cast<float>(m_width) * edge_padding;
   const float edge_margin_x = static_cast<float>(m_width) * edge_padding;
   const float edge_margin_z = static_cast<float>(m_height) * edge_padding;
   const float edge_margin_z = static_cast<float>(m_height) * edge_padding;
 
 

+ 2 - 2
render/ground/firecamp_renderer.h

@@ -18,7 +18,7 @@ public:
   ~FireCampRenderer() override;
   ~FireCampRenderer() override;
 
 
   void configure(const Game::Map::TerrainHeightMap &height_map,
   void configure(const Game::Map::TerrainHeightMap &height_map,
-                 const Game::Map::BiomeSettings &biomeSettings);
+                 const Game::Map::BiomeSettings &biome_settings);
 
 
   void setExplicitFireCamps(const std::vector<QVector3D> &positions,
   void setExplicitFireCamps(const std::vector<QVector3D> &positions,
                             const std::vector<float> &intensities = {},
                             const std::vector<float> &intensities = {},
@@ -38,7 +38,7 @@ private:
 
 
   std::vector<float> m_heightData;
   std::vector<float> m_heightData;
   std::vector<Game::Map::TerrainType> m_terrain_types;
   std::vector<Game::Map::TerrainType> m_terrain_types;
-  Game::Map::BiomeSettings m_biomeSettings;
+  Game::Map::BiomeSettings m_biome_settings;
   std::uint32_t m_noiseSeed = 0U;
   std::uint32_t m_noiseSeed = 0U;
 
 
   std::vector<FireCampInstanceGpu> m_fireCampInstances;
   std::vector<FireCampInstanceGpu> m_fireCampInstances;

+ 31 - 31
render/ground/ground_renderer.cpp

@@ -43,7 +43,7 @@ void GroundRenderer::updateNoiseOffset() {
   const float span_x = (m_width > 0 ? float(m_width) * m_tile_size : m_extent);
   const float span_x = (m_width > 0 ? float(m_width) * m_tile_size : m_extent);
   const float span_z =
   const float span_z =
       (m_height > 0 ? float(m_height) * m_tile_size : m_extent);
       (m_height > 0 ? float(m_height) * m_tile_size : m_extent);
-  const auto seed = static_cast<float>(m_biomeSettings.seed % 1024U);
+  const auto seed = static_cast<float>(m_biome_settings.seed % 1024U);
 
 
   QVector2D new_offset;
   QVector2D new_offset;
   new_offset.setX(span_x * 0.37F + seed * 0.21F);
   new_offset.setX(span_x * 0.37F + seed * 0.21F);
@@ -64,52 +64,52 @@ auto GroundRenderer::buildParams() const -> TerrainChunkParams {
 
 
   TerrainChunkParams params;
   TerrainChunkParams params;
 
 
-  const QVector3D primary = m_biomeSettings.grass_primary * 0.97F;
-  const QVector3D secondary = m_biomeSettings.grass_secondary * 0.93F;
-  const QVector3D dry = m_biomeSettings.grass_dry * 0.90F;
-  const QVector3D soil = m_biomeSettings.soil_color * 0.68F;
+  const QVector3D primary = m_biome_settings.grass_primary * 0.97F;
+  const QVector3D secondary = m_biome_settings.grass_secondary * 0.93F;
+  const QVector3D dry = m_biome_settings.grass_dry * 0.90F;
+  const QVector3D soil = m_biome_settings.soil_color * 0.68F;
 
 
   params.grass_primary = saturate(primary);
   params.grass_primary = saturate(primary);
   params.grass_secondary = saturate(secondary);
   params.grass_secondary = saturate(secondary);
   params.grass_dry = saturate(dry);
   params.grass_dry = saturate(dry);
   params.soil_color = saturate(soil);
   params.soil_color = saturate(soil);
-  params.rock_low = saturate(m_biomeSettings.rock_low);
-  params.rock_high = saturate(m_biomeSettings.rock_high);
+  params.rock_low = saturate(m_biome_settings.rock_low);
+  params.rock_high = saturate(m_biome_settings.rock_high);
 
 
   params.tint = QVector3D(0.96F, 0.98F, 0.96F);
   params.tint = QVector3D(0.96F, 0.98F, 0.96F);
 
 
   params.tile_size = std::max(0.25F, m_tile_size);
   params.tile_size = std::max(0.25F, m_tile_size);
 
 
   params.macro_noise_scale =
   params.macro_noise_scale =
-      std::max(0.012F, m_biomeSettings.terrain_macro_noise_scale * 0.60F);
+      std::max(0.012F, m_biome_settings.terrain_macro_noise_scale * 0.60F);
   params.detail_noise_scale =
   params.detail_noise_scale =
-      std::max(0.045F, m_biomeSettings.terrain_detail_noise_scale * 0.75F);
+      std::max(0.045F, m_biome_settings.terrain_detail_noise_scale * 0.75F);
 
 
   params.slope_rock_threshold =
   params.slope_rock_threshold =
-      std::clamp(m_biomeSettings.terrain_rock_threshold + 0.30F, 0.40F, 0.90F);
+      std::clamp(m_biome_settings.terrain_rock_threshold + 0.30F, 0.40F, 0.90F);
   params.slope_rock_sharpness =
   params.slope_rock_sharpness =
-      std::clamp(m_biomeSettings.terrain_rock_sharpness + 1.5F, 2.0F, 6.0F);
+      std::clamp(m_biome_settings.terrain_rock_sharpness + 1.5F, 2.0F, 6.0F);
 
 
-  params.soil_blend_height = m_biomeSettings.terrain_soil_height - 1.25F;
+  params.soil_blend_height = m_biome_settings.terrain_soil_height - 1.25F;
   params.soil_blend_sharpness =
   params.soil_blend_sharpness =
-      std::clamp(m_biomeSettings.terrain_soil_sharpness * 0.75F, 1.5F, 5.0F);
+      std::clamp(m_biome_settings.terrain_soil_sharpness * 0.75F, 1.5F, 5.0F);
 
 
   params.noise_offset = m_noiseOffset;
   params.noise_offset = m_noiseOffset;
   params.noise_angle = m_noiseAngle;
   params.noise_angle = m_noiseAngle;
 
 
   float target_amp;
   float target_amp;
   float target_freq;
   float target_freq;
-  if (m_biomeSettings.ground_irregularity_enabled) {
+  if (m_biome_settings.ground_irregularity_enabled) {
 
 
-    target_amp = std::clamp(m_biomeSettings.irregularity_amplitude * 0.85F,
+    target_amp = std::clamp(m_biome_settings.irregularity_amplitude * 0.85F,
                             0.15F, 0.70F);
                             0.15F, 0.70F);
-    target_freq = std::max(0.45F, m_biomeSettings.irregularity_scale * 2.5F);
+    target_freq = std::max(0.45F, m_biome_settings.irregularity_scale * 2.5F);
   } else {
   } else {
 
 
-    target_amp = std::clamp(m_biomeSettings.height_noise_amplitude * 0.22F,
+    target_amp = std::clamp(m_biome_settings.height_noise_amplitude * 0.22F,
                             0.10F, 0.20F);
                             0.10F, 0.20F);
     target_freq =
     target_freq =
-        std::max(0.6F, m_biomeSettings.height_noise_frequency * 1.05F);
+        std::max(0.6F, m_biome_settings.height_noise_frequency * 1.05F);
   }
   }
   params.height_noise_strength = target_amp;
   params.height_noise_strength = target_amp;
   params.height_noise_frequency = target_freq;
   params.height_noise_frequency = target_freq;
@@ -120,27 +120,27 @@ auto GroundRenderer::buildParams() const -> TerrainChunkParams {
 
 
   params.albedo_jitter = 0.05F;
   params.albedo_jitter = 0.05F;
 
 
-  params.ambient_boost = m_biomeSettings.terrain_ambient_boost * 0.85F;
+  params.ambient_boost = m_biome_settings.terrain_ambient_boost * 0.85F;
 
 
   params.rock_detail_strength =
   params.rock_detail_strength =
-      m_biomeSettings.terrain_rock_detail_strength * 0.18F;
+      m_biome_settings.terrain_rock_detail_strength * 0.18F;
 
 
   QVector3D const l(0.35F, 0.85F, 0.42F);
   QVector3D const l(0.35F, 0.85F, 0.42F);
   params.light_direction = l.normalized();
   params.light_direction = l.normalized();
 
 
   params.is_ground_plane = true;
   params.is_ground_plane = true;
 
 
-  params.snow_coverage = std::clamp(m_biomeSettings.snow_coverage, 0.0F, 1.0F);
+  params.snow_coverage = std::clamp(m_biome_settings.snow_coverage, 0.0F, 1.0F);
   params.moisture_level =
   params.moisture_level =
-      std::clamp(m_biomeSettings.moisture_level, 0.0F, 1.0F);
+      std::clamp(m_biome_settings.moisture_level, 0.0F, 1.0F);
   params.crack_intensity =
   params.crack_intensity =
-      std::clamp(m_biomeSettings.crack_intensity, 0.0F, 1.0F);
-  params.rock_exposure = std::clamp(m_biomeSettings.rock_exposure, 0.0F, 1.0F);
+      std::clamp(m_biome_settings.crack_intensity, 0.0F, 1.0F);
+  params.rock_exposure = std::clamp(m_biome_settings.rock_exposure, 0.0F, 1.0F);
   params.grass_saturation =
   params.grass_saturation =
-      std::clamp(m_biomeSettings.grass_saturation, 0.0F, 1.5F);
+      std::clamp(m_biome_settings.grass_saturation, 0.0F, 1.5F);
   params.soil_roughness =
   params.soil_roughness =
-      std::clamp(m_biomeSettings.soil_roughness, 0.0F, 1.0F);
-  params.snow_color = saturate(m_biomeSettings.snow_color);
+      std::clamp(m_biome_settings.soil_roughness, 0.0F, 1.0F);
+  params.snow_color = saturate(m_biome_settings.snow_color);
 
 
   m_cachedParams = params;
   m_cachedParams = params;
   m_cachedParamsValid = true;
   m_cachedParamsValid = true;
@@ -184,12 +184,12 @@ void GroundRenderer::submit(Renderer &renderer, ResourceManager *resources) {
 
 
 void GroundRenderer::syncBiomeFromService() {
 void GroundRenderer::syncBiomeFromService() {
   auto &service = Game::Map::TerrainService::instance();
   auto &service = Game::Map::TerrainService::instance();
-  if (!service.isInitialized()) {
+  if (!service.is_initialized()) {
     return;
     return;
   }
   }
-  const auto &current = service.biomeSettings();
-  if (!m_hasBiome || !biomeEquals(current, m_biomeSettings)) {
-    m_biomeSettings = current;
+  const auto &current = service.biome_settings();
+  if (!m_hasBiome || !biomeEquals(current, m_biome_settings)) {
+    m_biome_settings = current;
     m_hasBiome = true;
     m_hasBiome = true;
     updateNoiseOffset();
     updateNoiseOffset();
     invalidateParamsCache();
     invalidateParamsCache();

Some files were not shown because too many files changed in this diff