refactor(component): group the component files by the client's families

Physics/, Activity/ (activity, scripted activity, shooting gallery,
quickbuild, minigame control, racing control base, racing control, gate rush),
Vendor/, Character/ (what the client makes with a character, plus ghost,
minifig and mission), Sound/ and Property/; the rest stays where it was.
File moves only; DLU_COMPONENT_INCLUDE_DIRS gives every target the folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 15:37:45 -05:00
parent 8f09121ad4
commit 9a464ac35f
76 changed files with 37 additions and 34 deletions

View File

@@ -240,6 +240,9 @@ endif()
# Load all of our third party directories
add_subdirectory(thirdparty SYSTEM)
# The component folder and its family subfolders (as the client groups them), for every target that includes components
set(DLU_COMPONENT_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/dGame/dComponents" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Physics" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Activity" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Vendor" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Character" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Sound" "${PROJECT_SOURCE_DIR}/dGame/dComponents/Property")
# Create our list of include directories
include_directories(
"dPhysics"

View File

@@ -59,7 +59,7 @@ target_link_libraries(dBehaviors PUBLIC dDatabaseCDClient dPhysics)
target_include_directories(dBehaviors PUBLIC "."
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # via BehaviorContext.h
PRIVATE
"${PROJECT_SOURCE_DIR}/dGame/dComponents" # direct BuffComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} # direct BuffComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # Preconditions.h via QuickBuildComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager.h, Spawner.h
"${PROJECT_SOURCE_DIR}/dGame/dInventory" # via CharacterComponent.h

View File

@@ -1,57 +1,57 @@
set(DGAME_DCOMPONENTS_SOURCES
"AchievementVendorComponent.cpp"
"ActivityComponent.cpp"
"Vendor/AchievementVendorComponent.cpp"
"Activity/ActivityComponent.cpp"
"BaseCombatAIComponent.cpp"
"BouncerComponent.cpp"
"BuffComponent.cpp"
"BuildBorderComponent.cpp"
"CharacterComponent.cpp"
"Property/BuildBorderComponent.cpp"
"Character/CharacterComponent.cpp"
"CollectibleComponent.cpp"
"ControllablePhysicsComponent.cpp"
"Physics/ControllablePhysicsComponent.cpp"
"DestroyableComponent.cpp"
"DonationVendorComponent.cpp"
"GhostComponent.cpp"
"Vendor/DonationVendorComponent.cpp"
"Character/GhostComponent.cpp"
"InventoryComponent.cpp"
"ItemComponent.cpp"
"LevelProgressionComponent.cpp"
"Character/LevelProgressionComponent.cpp"
"LUPExhibitComponent.cpp"
"MissionComponent.cpp"
"Character/MissionComponent.cpp"
"MissionOfferComponent.cpp"
"ModelComponent.cpp"
"ModuleAssemblyComponent.cpp"
"MovementAIComponent.cpp"
"MovingPlatformComponent.cpp"
"PetComponent.cpp"
"PhantomPhysicsComponent.cpp"
"PhysicsComponent.cpp"
"PlayerForcedMovementComponent.cpp"
"Physics/PhantomPhysicsComponent.cpp"
"Physics/PhysicsComponent.cpp"
"Character/PlayerForcedMovementComponent.cpp"
"PossessableComponent.cpp"
"PossessorComponent.cpp"
"PropertyEntranceComponent.cpp"
"PropertyManagementComponent.cpp"
"PropertyVendorComponent.cpp"
"Character/PossessorComponent.cpp"
"Property/PropertyEntranceComponent.cpp"
"Property/PropertyManagementComponent.cpp"
"Property/PropertyVendorComponent.cpp"
"ProximityMonitorComponent.cpp"
"RacingControlComponent.cpp"
"Activity/RacingControlComponent.cpp"
"RailActivatorComponent.cpp"
"QuickBuildComponent.cpp"
"Activity/QuickBuildComponent.cpp"
"RenderComponent.cpp"
"RigidbodyPhantomPhysicsComponent.cpp"
"Physics/RigidbodyPhantomPhysicsComponent.cpp"
"MultiZoneEntranceComponent.cpp"
"RocketLaunchpadControlComponent.cpp"
"ShootingGalleryComponent.cpp"
"SimplePhysicsComponent.cpp"
"Activity/ShootingGalleryComponent.cpp"
"Physics/SimplePhysicsComponent.cpp"
"SkillComponent.cpp"
"SoundTriggerComponent.cpp"
"Sound/SoundTriggerComponent.cpp"
"SpawnerComponent.cpp"
"SwitchComponent.cpp"
"TriggerComponent.cpp"
"HavokVehiclePhysicsComponent.cpp"
"VendorComponent.cpp"
"Physics/HavokVehiclePhysicsComponent.cpp"
"Vendor/VendorComponent.cpp"
"ScriptComponent.cpp"
)
add_library(dComponents OBJECT ${DGAME_DCOMPONENTS_SOURCES})
target_include_directories(dComponents PUBLIC "."
target_include_directories(dComponents PUBLIC ${DLU_COMPONENT_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/dGame/dPropertyBehaviors" # via ModelComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dPropertyBehaviors/ControlBehaviorMessages"
"${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h

View File

@@ -27,7 +27,7 @@ target_link_libraries(dGameMessages
)
target_include_directories(dGameMessages PUBLIC "."
PRIVATE
"${PROJECT_SOURCE_DIR}/dGame/dComponents" # direct MissionComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} # direct MissionComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # direct SlashCommandHandler.h
"${PROJECT_SOURCE_DIR}/dGame/dPropertyBehaviors" # direct ControlBehaviors.h
"${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h

View File

@@ -20,7 +20,7 @@ target_include_directories(dInventory PUBLIC "."
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/ITables" # via EconomyLedger.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # direct
"${PROJECT_SOURCE_DIR}/dGame/dComponents" # direct InventoryComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} # direct InventoryComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # via InventoryComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager/Spawner.h
"${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h

View File

@@ -7,7 +7,7 @@ add_library(dMission OBJECT ${DGAME_DMISSION_SOURCES})
target_link_libraries(dMission PUBLIC dDatabase)
target_include_directories(dMission PUBLIC "."
PRIVATE
"${PROJECT_SOURCE_DIR}/dGame/dComponents"
${DLU_COMPONENT_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/dGame/dInventory" # via CharacterComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # via CharacterComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # via LevelProgressionComponent.h

View File

@@ -19,7 +19,7 @@ target_include_directories(dPropertyBehaviors PUBLIC "." "ControlBehaviorMessage
"${PROJECT_SOURCE_DIR}/dCommon/dClient" # ControlBehaviors.cpp uses AssetManager
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # ObjectIdManager.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # GameMessages.h
"${PROJECT_SOURCE_DIR}/dGame/dComponents" # ModelComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} # ModelComponent.h
"${PROJECT_SOURCE_DIR}/dChatFilter" # dChatFilter.h
)
target_precompile_headers(dPropertyBehaviors REUSE_FROM dGameBase)

View File

@@ -35,7 +35,7 @@ add_library(dUtilities OBJECT ${DGAME_DUTILITIES_SOURCES})
target_precompile_headers(dUtilities REUSE_FROM dGameBase)
target_include_directories(dUtilities PUBLIC "." "SlashCommands"
PRIVATE
"${PROJECT_SOURCE_DIR}/dGame/dComponents"
${DLU_COMPONENT_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/dGame/dInventory" # transitive via PossessableComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages"
"${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # transitive via InventoryComponent.h

View File

@@ -28,7 +28,7 @@ target_include_directories(dNet PRIVATE
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/ITables"
"${PROJECT_SOURCE_DIR}/dGame" # UserManager.h
"${PROJECT_SOURCE_DIR}/dGame/dComponents"
${DLU_COMPONENT_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # GameMessages.h
"${PROJECT_SOURCE_DIR}/dGame/dInventory" # via PossessableComponent.h

View File

@@ -23,7 +23,7 @@ target_precompile_headers(dScriptsBase PRIVATE ${HEADERS_DGAME})
include_directories(
"${PROJECT_SOURCE_DIR}/dScripts"
"${PROJECT_SOURCE_DIR}/dGame"
"${PROJECT_SOURCE_DIR}/dGame/dComponents" # e.g. ScriptedActivityComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} # e.g. ScriptedActivityComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # e.g. direct ActivityManager
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # e.g. direct ActivityManager
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager.h

View File

@@ -14,7 +14,7 @@ target_include_directories(dZoneManager PUBLIC "."
"${PROJECT_SOURCE_DIR}/dGame" # Entity.h
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # EntityInfo.h
PRIVATE
"${PROJECT_SOURCE_DIR}/dGame/dComponents" #InventoryComponent.h
${DLU_COMPONENT_INCLUDE_DIRS} #InventoryComponent.h
"${PROJECT_SOURCE_DIR}/dGame/dInventory" #InventoryComponent.h (transitive)
"${PROJECT_SOURCE_DIR}/dGame/dBehaviors" #BehaviorSlot.h
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages" #GameMessages.h