diff --git a/CMakeLists.txt b/CMakeLists.txt index facab5a7..6cf311d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,35 @@ ${PROJECT_SOURCE_DIR}/dDatabase/*.cpp ${PROJECT_SOURCE_DIR}/dDatabase/Tables/*.cpp ) +file( + GLOB HEADERS_DDATABASE + LIST_DIRECTORIES false + ${PROJECT_SOURCE_DIR}/dDatabase/*.h + ${PROJECT_SOURCE_DIR}/dDatabase/Tables/*.h + ${PROJECT_SOURCE_DIR}/thirdparty/SQLite/*.h +) + +file( + GLOB HEADERS_DZONEMANAGER + LIST_DIRECTORIES false + ${PROJECT_SOURCE_DIR}/dZoneManager/*.h +) + +file( + GLOB HEADERS_DCOMMON + LIST_DIRECTORIES false + ${PROJECT_SOURCE_DIR}/dCommon/*.h +) + +file( + GLOB HEADERS_DGAME + LIST_DIRECTORIES false + ${PROJECT_SOURCE_DIR}/dGame/Entity.h + ${PROJECT_SOURCE_DIR}/dGame/dGameMessages/GameMessages.h + ${PROJECT_SOURCE_DIR}/dGame/EntityManager.h + ${PROJECT_SOURCE_DIR}/dScripts/CppScripts.h +) + # Source Code for dNet file( GLOB SOURCES_DNET @@ -312,6 +341,33 @@ add_executable(AuthServer ${SOURCES_AUTH}) add_executable(MasterServer ${SOURCES_MASTER}) add_executable(ChatServer ${SOURCES_CHAT}) +# Add out precompiled headers +target_precompile_headers( + dGame PRIVATE + ${HEADERS_DGAME} +) + +target_precompile_headers( + dZoneManager PRIVATE + ${HEADERS_DZONEMANAGER} +) + +# Need to specify to use the CXX compiler language here or else we get errors including . +target_precompile_headers( + dDatabase PRIVATE + "$<$:${HEADERS_DDATABASE}>" +) + +target_precompile_headers( + dCommon PRIVATE + ${HEADERS_DCOMMON} +) + +target_precompile_headers( + tinyxml2 PRIVATE + "$<$:${PROJECT_SOURCE_DIR}/thirdparty/tinyxml2/tinyxml2.h>" +) + # Target libraries to link to: target_link_libraries(WorldServer dCommon) target_link_libraries(WorldServer dChatFilter) diff --git a/dGame/dBehaviors/BehaviorSlot.h b/dGame/dBehaviors/BehaviorSlot.h index 54ba5708..af0d4e03 100644 --- a/dGame/dBehaviors/BehaviorSlot.h +++ b/dGame/dBehaviors/BehaviorSlot.h @@ -1,5 +1,8 @@ #pragma once +#ifndef BEHAVIORSLOT_H +#define BEHAVIORSLOT_H + enum class BehaviorSlot { Invalid = -1, @@ -9,3 +12,5 @@ enum class BehaviorSlot Head, Consumable }; + +#endif diff --git a/dGame/dComponents/InventoryComponent.h b/dGame/dComponents/InventoryComponent.h index bf18d132..1fda5942 100644 --- a/dGame/dComponents/InventoryComponent.h +++ b/dGame/dComponents/InventoryComponent.h @@ -1,5 +1,8 @@ #pragma once +#ifndef INVENTORYCOMPONENT_H +#define INVENTORYCOMPONENT_H + #include #include @@ -445,3 +448,5 @@ private: */ void UpdatePetXml(tinyxml2::XMLDocument* document); }; + +#endif diff --git a/dGame/dGameMessages/PropertySelectQueryProperty.h b/dGame/dGameMessages/PropertySelectQueryProperty.h index 61fa7b86..e633f41b 100644 --- a/dGame/dGameMessages/PropertySelectQueryProperty.h +++ b/dGame/dGameMessages/PropertySelectQueryProperty.h @@ -1,5 +1,8 @@ #pragma once +#ifndef PROPERTYSELECTQUERY_H +#define PROPERTYSELECTQUERY_H + #include "Entity.h" class PropertySelectQueryProperty final @@ -24,3 +27,5 @@ public: float PerformanceCost = 0; // The performance cost of the property uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0? }; + +#endif diff --git a/dGame/dInventory/Inventory.h b/dGame/dInventory/Inventory.h index 0d3d9e69..b65a2040 100644 --- a/dGame/dInventory/Inventory.h +++ b/dGame/dInventory/Inventory.h @@ -1,5 +1,8 @@ #pragma once +#ifndef INVENTORY_H +#define INVENTORY_H + #include #include @@ -182,3 +185,5 @@ private: */ static std::vector m_GameMasterRestrictedItems; }; + +#endif diff --git a/dGame/dMission/Mission.h b/dGame/dMission/Mission.h index cca72daf..4fb6c60f 100644 --- a/dGame/dMission/Mission.h +++ b/dGame/dMission/Mission.h @@ -1,5 +1,8 @@ #pragma once +#ifndef MISSION_H +#define MISSION_H + #include #include @@ -259,3 +262,5 @@ private: */ std::vector m_Tasks; }; + +#endif diff --git a/dGame/dMission/MissionLockState.h b/dGame/dMission/MissionLockState.h index 417c066a..e2dcedd7 100644 --- a/dGame/dMission/MissionLockState.h +++ b/dGame/dMission/MissionLockState.h @@ -1,8 +1,13 @@ #pragma once +#ifndef MISSIONLOCKSTATE_H +#define MISSIONLOCKSTATE_H + enum class MissionLockState : int { MISSION_LOCK_LOCKED, MISSION_LOCK_NEW, MISSION_LOCK_UNLOCKED, }; + +#endif diff --git a/dGame/dMission/MissionTask.h b/dGame/dMission/MissionTask.h index b77b9c59..3fcbbe3d 100644 --- a/dGame/dMission/MissionTask.h +++ b/dGame/dMission/MissionTask.h @@ -1,5 +1,8 @@ #pragma once +#ifndef MISSIONTASK_H +#define MISSIONTASK_H + #include "CDMissionTasksTable.h" #include "MissionTaskType.h" #include "dCommonVars.h" @@ -180,3 +183,5 @@ private: */ void CheckCompletion() const; }; + +#endif diff --git a/dGame/dMission/MissionTaskType.h b/dGame/dMission/MissionTaskType.h index 263bf470..345f8fff 100644 --- a/dGame/dMission/MissionTaskType.h +++ b/dGame/dMission/MissionTaskType.h @@ -1,5 +1,8 @@ #pragma once +#ifndef MISSIONTASKTYPE_H +#define MISSIONTASKTYPE_H + //! An enum for mission task types enum class MissionTaskType : int { MISSION_TASK_TYPE_UNKNOWN = -1, //!< The task type is unknown @@ -24,3 +27,5 @@ enum class MissionTaskType : int { MISSION_TASK_TYPE_PLACE_MODEL = 25, //!< A task for picking up a model MISSION_TASK_TYPE_VISIT_PROPERTY = 30 //!< A task for visiting a property }; + +#endif diff --git a/dPhysics/dpCollisionGroups.h b/dPhysics/dpCollisionGroups.h index 7a6830eb..5853070f 100644 --- a/dPhysics/dpCollisionGroups.h +++ b/dPhysics/dpCollisionGroups.h @@ -1,5 +1,7 @@ #pragma once +#include + /* * Collision Groups */