diff --git a/Source/DungeonGenerator/Private/DungeonBlueprint.cpp b/Source/DungeonGenerator/Private/DungeonBlueprint.cpp index 82e4175..5bd3b1d 100644 --- a/Source/DungeonGenerator/Private/DungeonBlueprint.cpp +++ b/Source/DungeonGenerator/Private/DungeonBlueprint.cpp @@ -1,6 +1,4 @@ /** -BluePrint 計算関数ライブラリクラス - \author Shun Moriya \copyright 2023- Shun Moriya All Rights Reserved. diff --git a/Source/DungeonGenerator/Private/DungeonGeneratorCore.cpp b/Source/DungeonGenerator/Private/DungeonGeneratorCore.cpp index 2570cdf..fea8b5f 100644 --- a/Source/DungeonGenerator/Private/DungeonGeneratorCore.cpp +++ b/Source/DungeonGenerator/Private/DungeonGeneratorCore.cpp @@ -16,9 +16,11 @@ All Rights Reserved. #include "Core/Generator.h" #include "Core/Voxel.h" #include "Core/Math/Math.h" +#include #include #include #include +#include #include #include #include diff --git a/Source/DungeonGenerator/Private/DungeonMiniMapTexture.cpp b/Source/DungeonGenerator/Private/DungeonMiniMapTexture.cpp index a33e97d..41f6670 100644 --- a/Source/DungeonGenerator/Private/DungeonMiniMapTexture.cpp +++ b/Source/DungeonGenerator/Private/DungeonMiniMapTexture.cpp @@ -1,6 +1,4 @@ /* -Minimap Texture - \author Shun Moriya \copyright 2023- Shun Moriya All Rights Reserved. diff --git a/Source/DungeonGenerator/Private/DungeonMiniMapTextureLayer.cpp b/Source/DungeonGenerator/Private/DungeonMiniMapTextureLayer.cpp index 9270981..100a758 100644 --- a/Source/DungeonGenerator/Private/DungeonMiniMapTextureLayer.cpp +++ b/Source/DungeonGenerator/Private/DungeonMiniMapTextureLayer.cpp @@ -1,6 +1,4 @@ /* -Minimap texture classes generated per layer - \author Shun Moriya \copyright 2023- Shun Moriya All Rights Reserved. diff --git a/Source/DungeonGenerator/Public/DungeonDoor.h b/Source/DungeonGenerator/Public/DungeonDoor.h index 7a8e200..8db8274 100644 --- a/Source/DungeonGenerator/Public/DungeonDoor.h +++ b/Source/DungeonGenerator/Public/DungeonDoor.h @@ -9,6 +9,9 @@ All Rights Reserved. #include #include "DungeonDoor.generated.h" +/* +Dungeon door actor class +*/ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API ADungeonDoor : public AActor { diff --git a/Source/DungeonGenerator/Public/DungeonGenerateActor.h b/Source/DungeonGenerator/Public/DungeonGenerateActor.h index c5e6fee..65500b8 100644 --- a/Source/DungeonGenerator/Public/DungeonGenerateActor.h +++ b/Source/DungeonGenerator/Public/DungeonGenerateActor.h @@ -10,7 +10,6 @@ All Rights Reserved. #include #include "DungeonGenerateActor.generated.h" -// 前方宣言 class CDungeonGeneratorCore; class UDungeonGenerateParameter; class UDungeonMiniMapTextureLayer; @@ -21,14 +20,13 @@ namespace dungeon class Room; } -// イベント宣言 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDungeonGeneratorActorSignature, const FTransform&, transform); DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDungeonGeneratorDoorSignature, AActor*, doorActor, EDungeonRoomProps, props); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDungeonGeneratorPlayerStartSignature, const FVector&, location); DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FDungeonGeneratorDelegete, bool, StreamingLevel, EDungeonRoomParts, DungeonRoomParts, const FBox&, RoomRect); /** -dungeon generation actor +Dungeon generation actor class */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API ADungeonGenerateActor : public AActor diff --git a/Source/DungeonGenerator/Public/DungeonGenerateParameter.h b/Source/DungeonGenerator/Public/DungeonGenerateParameter.h index 013ff41..5d5fa02 100644 --- a/Source/DungeonGenerator/Public/DungeonGenerateParameter.h +++ b/Source/DungeonGenerator/Public/DungeonGenerateParameter.h @@ -159,7 +159,7 @@ struct DUNGEONGENERATOR_API FDungeonRandomActorParts : public FDungeonActorParts }; /** -Dungeon generation parameters +Dungeon generation parameter class */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API UDungeonGenerateParameter : public UObject diff --git a/Source/DungeonGenerator/Public/DungeonGeneratorModule.h b/Source/DungeonGenerator/Public/DungeonGeneratorModule.h index c3e6c9b..43e78f1 100644 --- a/Source/DungeonGenerator/Public/DungeonGeneratorModule.h +++ b/Source/DungeonGenerator/Public/DungeonGeneratorModule.h @@ -8,6 +8,9 @@ All Rights Reserved. #include #include +/* +Dungeon generator module class +*/ class FDungeonGeneratorModule : public IModuleInterface { public: diff --git a/Source/DungeonGenerator/Public/DungeonLevelStreamingActor.h b/Source/DungeonGenerator/Public/DungeonLevelStreamingActor.h index 9b0135f..8dc6293 100644 --- a/Source/DungeonGenerator/Public/DungeonLevelStreamingActor.h +++ b/Source/DungeonGenerator/Public/DungeonLevelStreamingActor.h @@ -12,8 +12,7 @@ All Rights Reserved. class UBoxComponent; /* -vC[OverlapVolumeɓɎw背x[hwp[NX - +Helper class that loads the level when the player enters the OverlapVolume */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API ADungeonLevelStreamingActor : public AActor diff --git a/Source/DungeonGenerator/Public/DungeonLevelStreamingDynamic.h b/Source/DungeonGenerator/Public/DungeonLevelStreamingDynamic.h index f879e72..8d32de3 100644 --- a/Source/DungeonGenerator/Public/DungeonLevelStreamingDynamic.h +++ b/Source/DungeonGenerator/Public/DungeonLevelStreamingDynamic.h @@ -12,6 +12,10 @@ All Rights Reserved. class ULevelStreamingDynamic; +/* +Class that wraps ULevelStreamingDynamic +No extended functionality +*/ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API UDungeonLevelStreamingDynamic : public ULevelStreamingDynamic { @@ -27,6 +31,4 @@ class DUNGEONGENERATOR_API UDungeonLevelStreamingDynamic : public ULevelStreamin destructor */ virtual ~UDungeonLevelStreamingDynamic() = default; - - //virtual bool ShouldBeAlwaysLoaded() const override { return true; } }; diff --git a/Source/DungeonGenerator/Public/DungeonMiniMapTexture.h b/Source/DungeonGenerator/Public/DungeonMiniMapTexture.h index d628b3c..808cebf 100644 --- a/Source/DungeonGenerator/Public/DungeonMiniMapTexture.h +++ b/Source/DungeonGenerator/Public/DungeonMiniMapTexture.h @@ -14,7 +14,7 @@ class CDungeonGeneratorCore; class UTexture2D; /** -Minimap Textures +Minimap Textures class */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API UDungeonMiniMapTexture : public UObject diff --git a/Source/DungeonGenerator/Public/DungeonMiniMapTextureLayer.h b/Source/DungeonGenerator/Public/DungeonMiniMapTextureLayer.h index 99ed1da..757d66a 100644 --- a/Source/DungeonGenerator/Public/DungeonMiniMapTextureLayer.h +++ b/Source/DungeonGenerator/Public/DungeonMiniMapTextureLayer.h @@ -21,7 +21,7 @@ namespace dungeon } /** -Minimap Texture Layer +Minimap texture layer class */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API UDungeonMiniMapTextureLayer : public UObject diff --git a/Source/DungeonGenerator/Public/DungeonRoomAsset.h b/Source/DungeonGenerator/Public/DungeonRoomAsset.h index c868601..90bc824 100644 --- a/Source/DungeonGenerator/Public/DungeonRoomAsset.h +++ b/Source/DungeonGenerator/Public/DungeonRoomAsset.h @@ -9,7 +9,7 @@ All Rights Reserved. #include "DungeonRoomAsset.generated.h" /** -Sub-level information to replace dungeon rooms +Sub-level information to replace dungeon rooms class */ UCLASS(Blueprintable, BlueprintType) class DUNGEONGENERATOR_API UDungeonRoomAsset : public UObject @@ -17,10 +17,21 @@ class DUNGEONGENERATOR_API UDungeonRoomAsset : public UObject GENERATED_BODY() public: + /* + constructor + */ explicit UDungeonRoomAsset(const FObjectInitializer& ObjectInitializer); + + /* + destructor + */ virtual ~UDungeonRoomAsset() = default; - const TArray& GetDungeonRoomLocator() const; + /* + Get the dungeon room information array + \return Array of FDungeonRoomLocator + */ + const TArray& GetDungeonRoomLocator() const noexcept; protected: UPROPERTY(EditAnywhere, Category = "DungeonGenerator") @@ -32,7 +43,7 @@ inline UDungeonRoomAsset::UDungeonRoomAsset(const FObjectInitializer& ObjectInit { } -inline const TArray& UDungeonRoomAsset::GetDungeonRoomLocator() const +inline const TArray& UDungeonRoomAsset::GetDungeonRoomLocator() const noexcept { return reinterpret_cast&>(DungeonRoomLocator); } diff --git a/Source/DungeonGenerator/Public/DungeonRoomLocator.h b/Source/DungeonGenerator/Public/DungeonRoomLocator.h index 81c36db..288ab1d 100644 --- a/Source/DungeonGenerator/Public/DungeonRoomLocator.h +++ b/Source/DungeonGenerator/Public/DungeonRoomLocator.h @@ -17,7 +17,7 @@ enum class EDungeonRoomSizeCondition : uint8 }; /** -Sub-level information to replace dungeon rooms +Sub-level information to replace dungeon rooms class */ USTRUCT(Blueprintable, BlueprintType) struct DUNGEONGENERATOR_API FDungeonRoomLocator @@ -25,16 +25,59 @@ struct DUNGEONGENERATOR_API FDungeonRoomLocator GENERATED_BODY() public: + /* + Get sublevel paths + */ const FSoftObjectPath& GetLevelPath() const noexcept; + + /* + Gets the sub-level grid size + */ FIntVector GetSize() const noexcept; + + /* + Gets the grid width of the sublevel + */ int32 GetWidth() const noexcept; + + /* + Gets the grid depth of the sublevel + */ int32 GetDepth() const noexcept; + + /* + Gets the grid height of the sublevel + */ int32 GetHeight() const noexcept; + + /* + Gets the width condition for placing sublevels + */ EDungeonRoomSizeCondition GetWidthCondition() const noexcept; + + /* + Gets the depth condition for placing sublevels + */ EDungeonRoomSizeCondition GetDepthCondition() const noexcept; + + /* + Gets the height condition for placing sublevels + */ EDungeonRoomSizeCondition GetHeightCondition() const noexcept; + + /* + Get the parts of the dungeon (room roles) where the sublevels will be placed + */ EDungeonRoomParts GetDungeonParts() const noexcept; + + /* + Generates or retrieves the ceiling mesh of the grid for sublevel placement + */ bool IsGenerateRoofMesh() const noexcept; + + /* + Generates or retrieves the floor mesh of the grid for sublevel placement + */ bool IsGenerateFloorMesh() const noexcept; protected: diff --git a/Source/DungeonGenerator/Public/DungeonTransactionalHierarchicalInstancedStaticMeshComponent.h b/Source/DungeonGenerator/Public/DungeonTransactionalHierarchicalInstancedStaticMeshComponent.h index 4192216..563bd8b 100644 --- a/Source/DungeonGenerator/Public/DungeonTransactionalHierarchicalInstancedStaticMeshComponent.h +++ b/Source/DungeonGenerator/Public/DungeonTransactionalHierarchicalInstancedStaticMeshComponent.h @@ -10,9 +10,9 @@ All Rights Reserved. #include "DungeonTransactionalHierarchicalInstancedStaticMeshComponent.generated.h" /* -連続してAddInstanceやRemoveInstanceを行う時に、開始と終了処理をまとめるためのクラス +Class for summarizing the start and end processing when performing consecutive AddInstance and RemoveInstance. -UHierarchicalInstancedStaticMeshComponentを継承しています +Inherits from UHierarchicalInstancedStaticMeshComponent */ UCLASS(Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) class DUNGEONGENERATOR_API UDungeonTransactionalHierarchicalInstancedStaticMeshComponent : public UHierarchicalInstancedStaticMeshComponent @@ -21,28 +21,29 @@ class DUNGEONGENERATOR_API UDungeonTransactionalHierarchicalInstancedStaticMeshC public: /* - 大量のインスタンスを変更する場合に呼び出して下さい。 - グラフィックに関する処理をEndTransactionでまとめて処理します。 - \param[in] collisionEnableControl 物理コリジョンが有効の場合のみ、コリジョンの有効性を制御します + Call this when changing a large number of instances. + EndTransaction handles all processing related to graphics together. + \param[in] collisionEnableControl collision enable only if physical collision is enabled */ void BeginTransaction(const bool collisionEnableControl); /* - 大量のインスタンスを変更する場合に呼び出して下さい。 - グラフィックに関する処理をEndTransactionでまとめて処理します。 + Call this when changing a large number of instances. + Processes related to graphics are grouped together in an EndTransaction. */ void EndTransaction(const bool asyncBuildTree); /* - トランザクション中? + During transaction? */ bool InTransaction() const; /* - トランザクション中ではない? + Not in transaction? */ bool IsImmediate() const; + // overrides #if UE_VERSION_OLDER_THAN(5, 0, 0) virtual int32 AddInstance(const FTransform& instanceTransforms) override; virtual TArray AddInstances(const TArray& instanceTransforms, bool bShouldReturnIndices) override; @@ -57,10 +58,10 @@ class DUNGEONGENERATOR_API UDungeonTransactionalHierarchicalInstancedStaticMeshC virtual void ClearInstances() override; private: - // コリジョンを無効化して物理エンジンへの通知を抑制 + // Disable collision to suppress notifications to the physical engine void CheckAndDisableCollision(); - // 抑制した設定を復元 + // Restore suppressed settings void CheckAndRevertCollision(); protected: diff --git a/Source/DungeonGeneratorEditor/Public/DungeonGenerateParameterFactory.h b/Source/DungeonGeneratorEditor/Public/DungeonGenerateParameterFactory.h index cadccf5..5ff55f5 100644 --- a/Source/DungeonGeneratorEditor/Public/DungeonGenerateParameterFactory.h +++ b/Source/DungeonGeneratorEditor/Public/DungeonGenerateParameterFactory.h @@ -15,7 +15,14 @@ class DUNGEONGENERATOREDITOR_API UDungeonGenerateParameterFactory : public UFact GENERATED_BODY() public: + /* + constructor + */ UDungeonGenerateParameterFactory(); + + /* + destructor + */ virtual ~UDungeonGenerateParameterFactory() = default; // UFactory overrides