├── .gitignore ├── AsaApi.sln ├── AsaApi ├── AsaApi.def ├── AsaApi.vcxproj ├── AsaApi.vcxproj.filters ├── Core │ ├── Private │ │ ├── Ark │ │ │ ├── ApiUtils.cpp │ │ │ ├── ApiUtils.h │ │ │ ├── ArkBaseApi.cpp │ │ │ ├── ArkBaseApi.h │ │ │ ├── Globals.h │ │ │ ├── HooksImpl.cpp │ │ │ └── HooksImpl.h │ │ ├── Base.cpp │ │ ├── Cache.cpp │ │ ├── Cache.h │ │ ├── Commands.cpp │ │ ├── Commands.h │ │ ├── Helpers.h │ │ ├── Hooks.cpp │ │ ├── Hooks.h │ │ ├── IBaseApi.h │ │ ├── Logger.cpp │ │ ├── Offsets.cpp │ │ ├── Offsets.h │ │ ├── PDBReader │ │ │ ├── PDBReader.cpp │ │ │ ├── PDBReader.h │ │ │ └── pdbignores.txt │ │ ├── PluginManager │ │ │ ├── PluginManager.cpp │ │ │ └── PluginManager.h │ │ ├── Tools │ │ │ ├── Requests.cpp │ │ │ ├── Timer.cpp │ │ │ └── Tools.cpp │ │ └── UE │ │ │ └── UE.cpp │ └── Public │ │ ├── API │ │ ├── ARK │ │ │ ├── Actor.h │ │ │ ├── Ark.h │ │ │ ├── Buff.h │ │ │ ├── ExtensionsDeclaration.h │ │ │ ├── ExtensionsDefinition.h │ │ │ ├── GameMode.h │ │ │ ├── Inventory.h │ │ │ ├── ModParamStructs.h │ │ │ ├── Other.h │ │ │ ├── PrimalStructure.h │ │ │ └── UE.h │ │ ├── Base.h │ │ ├── Enums.h │ │ ├── Fields.h │ │ ├── Helpers │ │ │ └── Helpers.h │ │ └── UE │ │ │ ├── Algo │ │ │ ├── Accumulate.h │ │ │ ├── AllOf.h │ │ │ ├── AnyOf.h │ │ │ ├── BinarySearch.h │ │ │ ├── Common.h │ │ │ ├── Compare.h │ │ │ ├── Copy.h │ │ │ ├── Count.h │ │ │ ├── Find.h │ │ │ ├── FindLast.h │ │ │ ├── FindSequence.h │ │ │ ├── FindSortedStringCaseInsensitive.h │ │ │ ├── ForEach.h │ │ │ ├── HeapSort.h │ │ │ ├── Heapify.h │ │ │ ├── Impl │ │ │ │ ├── BinaryHeap.h │ │ │ │ └── RangePointerType.h │ │ │ ├── IndexOf.h │ │ │ ├── IntroSort.h │ │ │ ├── IsHeap.h │ │ │ ├── IsSorted.h │ │ │ ├── KahnTopologicalSort.h │ │ │ ├── LegacySort.h │ │ │ ├── LevenshteinDistance.h │ │ │ ├── LevenshteinDistanceAlgorithm.tps │ │ │ ├── MaxElement.h │ │ │ ├── MinElement.h │ │ │ ├── NoneOf.h │ │ │ ├── Partition.h │ │ │ ├── RandomShuffle.h │ │ │ ├── RemoveIf.h │ │ │ ├── Replace.h │ │ │ ├── Reverse.h │ │ │ ├── Rotate.h │ │ │ ├── SelectRandomWeighted.h │ │ │ ├── Sort.h │ │ │ ├── StableSort.h │ │ │ ├── TiedTupleOutput.h │ │ │ ├── TopologicalSort.h │ │ │ ├── Transform.h │ │ │ └── Unique.h │ │ │ ├── Concepts │ │ │ ├── EqualityComparable.h │ │ │ ├── GetTypeHashable.h │ │ │ ├── Insertable.h │ │ │ ├── StaticClassProvider.h │ │ │ └── StaticStructProvider.h │ │ │ ├── Containers │ │ │ ├── Array.h │ │ │ ├── ArrayView.h │ │ │ ├── BasicArray.h │ │ │ ├── BitArray.h │ │ │ ├── ContainerAllocationPolicies.h │ │ │ ├── ContainerElementTypeCompatibility.h │ │ │ ├── ContainersFwd.h │ │ │ ├── EnumAsByte.h │ │ │ ├── GenericPlatformString.cpp │ │ │ ├── HashTable.h │ │ │ ├── List.h │ │ │ ├── Map.h │ │ │ ├── ScriptArray.h │ │ │ ├── Set.h │ │ │ ├── SortedMap.h │ │ │ ├── SparseArray.h │ │ │ ├── String.cpp │ │ │ ├── StringConv.h │ │ │ ├── StringFwd.h │ │ │ ├── StringView.h │ │ │ └── UnrealString.h │ │ │ ├── Core.h │ │ │ ├── CoreFwd.h │ │ │ ├── CoreGlobals.h │ │ │ ├── CoreMinimal.h │ │ │ ├── CoreSharedPCH.h │ │ │ ├── CoreTypes.h │ │ │ ├── Delegates │ │ │ ├── Delegate.h │ │ │ ├── DelegateBase.h │ │ │ ├── DelegateCombinations.h │ │ │ ├── DelegateInstanceInterface.h │ │ │ ├── DelegateInstancesImpl.h │ │ │ ├── DelegateMacros.h │ │ │ ├── DelegateSettings.h │ │ │ ├── DelegateSignatureImpl.inl │ │ │ ├── IDelegateInstance.h │ │ │ ├── IntegerSequence.h │ │ │ ├── MulticastDelegateBase.h │ │ │ └── TSMulticastDelegateBase.h │ │ │ ├── GenericPlatform │ │ │ ├── Float-to-Half-Conversion.tps │ │ │ ├── GenericPlatform.h │ │ │ ├── GenericPlatformAffinity.h │ │ │ ├── GenericPlatformAtomics.h │ │ │ ├── GenericPlatformChunkInstall.h │ │ │ ├── GenericPlatformCompilerPreSetup.h │ │ │ ├── GenericPlatformCrashContext.h │ │ │ ├── GenericPlatformCriticalSection.h │ │ │ ├── GenericPlatformDriver.h │ │ │ ├── GenericPlatformFile.h │ │ │ ├── GenericPlatformHostCommunication.h │ │ │ ├── GenericPlatformHostSocket.h │ │ │ ├── GenericPlatformMallocCrash.h │ │ │ ├── GenericPlatformMath.h │ │ │ ├── GenericPlatformMemory.h │ │ │ ├── GenericPlatformMemoryPoolStats.h │ │ │ ├── GenericPlatformMisc.h │ │ │ ├── GenericPlatformNamedPipe.h │ │ │ ├── GenericPlatformOutputDevices.h │ │ │ ├── GenericPlatformProcess.h │ │ │ ├── GenericPlatformProperties.h │ │ │ ├── GenericPlatformStackWalk.h │ │ │ ├── GenericPlatformStricmp.h │ │ │ ├── GenericPlatformString.h │ │ │ ├── GenericPlatformSymbolication.h │ │ │ ├── GenericPlatformTLS.h │ │ │ ├── GenericPlatformTime.h │ │ │ ├── GenericWidePlatformString.h │ │ │ ├── MicrosoftPlatformString.h │ │ │ ├── OSAllocationPool.h │ │ │ └── StandardPlatformString.h │ │ │ ├── HAL │ │ │ ├── Allocators │ │ │ │ ├── CachedOSPageAllocator.h │ │ │ │ ├── CachedOSVeryLargePageAllocator.h │ │ │ │ └── PooledVirtualMemoryAllocator.h │ │ │ ├── AllowTCHAR.h │ │ │ ├── ConsoleManager.h │ │ │ ├── CriticalSection.h │ │ │ ├── DiskUtilizationTracker.h │ │ │ ├── Event.h │ │ │ ├── ExceptionHandling.h │ │ │ ├── FeedbackContextAnsi.h │ │ │ ├── FileManager.h │ │ │ ├── FileManagerGeneric.h │ │ │ ├── HideTCHAR.h │ │ │ ├── IConsoleManager.h │ │ │ ├── IPlatformFileCachedWrapper.h │ │ │ ├── IPlatformFileLogWrapper.h │ │ │ ├── IPlatformFileManagedStorageWrapper.h │ │ │ ├── IPlatformFileModule.h │ │ │ ├── IPlatformFileOpenLogWrapper.h │ │ │ ├── LowLevelMemStats.h │ │ │ ├── LowLevelMemTracker.h │ │ │ ├── LowLevelMemTrackerDefines.h │ │ │ ├── MallocAnsi.h │ │ │ ├── MallocBinned.h │ │ │ ├── MallocBinned2.h │ │ │ ├── MallocBinned3.h │ │ │ ├── MallocBinnedArena.h │ │ │ ├── MallocBinnedCommon.h │ │ │ ├── MallocBinnedGPU.h │ │ │ ├── MallocCallstackHandler.h │ │ │ ├── MallocDebug.h │ │ │ ├── MallocDoubleFreeFinder.h │ │ │ ├── MallocFrameProfiler.h │ │ │ ├── MallocJemalloc.h │ │ │ ├── MallocLeakDetection.h │ │ │ ├── MallocMimalloc.h │ │ │ ├── MallocPoisonProxy.h │ │ │ ├── MallocReplayProxy.h │ │ │ ├── MallocStomp.h │ │ │ ├── MallocStomp2.h │ │ │ ├── MallocTBB.h │ │ │ ├── MallocThreadSafeProxy.h │ │ │ ├── MallocTimer.h │ │ │ ├── MemoryBase.h │ │ │ ├── MemoryMisc.h │ │ │ ├── OutputDevices.h │ │ │ ├── PThreadCriticalSection.h │ │ │ ├── PThreadEvent.h │ │ │ ├── PThreadRWLock.h │ │ │ ├── PThreadSemaphore.h │ │ │ ├── PageCache.h │ │ │ ├── Platform.h │ │ │ ├── PlatformAffinity.h │ │ │ ├── PlatformAtomics.h │ │ │ ├── PlatformCrashContext.h │ │ │ ├── PlatformCrt.h │ │ │ ├── PlatformFile.h │ │ │ ├── PlatformFileCommon.h │ │ │ ├── PlatformFileManager.h │ │ │ ├── PlatformIncludes.h │ │ │ ├── PlatformMallocCrash.h │ │ │ ├── PlatformMath.h │ │ │ ├── PlatformMemory.h │ │ │ ├── PlatformMemoryHelpers.h │ │ │ ├── PlatformMisc.h │ │ │ ├── PlatformNamedPipe.h │ │ │ ├── PlatformOutputDevices.h │ │ │ ├── PlatformProcess.h │ │ │ ├── PlatformProperties.h │ │ │ ├── PlatformStackWalk.h │ │ │ ├── PlatformString.h │ │ │ ├── PlatformTLS.h │ │ │ ├── PlatformTime.h │ │ │ ├── PreprocessorHelpers.h │ │ │ ├── Runnable.h │ │ │ ├── RunnableThread.h │ │ │ ├── Thread.h │ │ │ ├── ThreadHeartBeat.h │ │ │ ├── ThreadManager.h │ │ │ ├── ThreadSafeBool.h │ │ │ ├── ThreadSafeCounter.h │ │ │ ├── ThreadSafeCounter64.h │ │ │ ├── ThreadSingleton.h │ │ │ ├── ThreadingBase.h │ │ │ ├── TlsAutoCleanup.h │ │ │ ├── UESemaphore.h │ │ │ ├── UnrealMemory.h │ │ │ └── VirtualAllocator.h │ │ │ ├── Hash │ │ │ ├── Blake3.h │ │ │ ├── CityHash.h │ │ │ ├── CityHash.tps │ │ │ ├── CityHashHelpers.h │ │ │ └── xxhash.h │ │ │ ├── Internationalization │ │ │ ├── CulturePointer.h │ │ │ ├── ITextData.h │ │ │ ├── Internationalization.h │ │ │ ├── LocKeyFuncs.h │ │ │ ├── LocTesting.h │ │ │ ├── LocalizedTextSourceTypes.h │ │ │ ├── Regex.h │ │ │ ├── StringTableCoreFwd.h │ │ │ ├── Text.h │ │ │ ├── TextComparison.h │ │ │ ├── TextKey.h │ │ │ ├── TextLocalizationManager.h │ │ │ └── TextNamespaceFwd.h │ │ │ ├── Logging │ │ │ └── LogVerbosity.h │ │ │ ├── MSVC │ │ │ └── MSVCPlatform.h │ │ │ ├── Math │ │ │ ├── Aossoa.isph │ │ │ ├── ApproximatingSine()CurvesSnippets.tps │ │ │ ├── Axis.h │ │ │ ├── BasicMathExpressionEvaluator.h │ │ │ ├── BigInt.h │ │ │ ├── Bounds.h │ │ │ ├── Box.h │ │ │ ├── Box2D.h │ │ │ ├── BoxSphereBounds.h │ │ │ ├── CapsuleShape.h │ │ │ ├── ClipProjectionMatrix.h │ │ │ ├── Color.h │ │ │ ├── ColorList.h │ │ │ ├── ConvexHull2d.h │ │ │ ├── CurveEdInterface.h │ │ │ ├── DualQuat.h │ │ │ ├── Edge.h │ │ │ ├── Float16.h │ │ │ ├── Float16.tps │ │ │ ├── Float16Color.h │ │ │ ├── Float32.h │ │ │ ├── FloatPacker.h │ │ │ ├── GenericOctree.h │ │ │ ├── GenericOctree.inl │ │ │ ├── GenericOctreePublic.h │ │ │ ├── Halton.h │ │ │ ├── Int128.h │ │ │ ├── IntPoint.h │ │ │ ├── IntRect.h │ │ │ ├── IntVector.h │ │ │ ├── InterpCurve.h │ │ │ ├── InterpCurvePoint.h │ │ │ ├── Interval.h │ │ │ ├── InverseRotationMatrix.h │ │ │ ├── MathFwd.h │ │ │ ├── Matrix.h │ │ │ ├── Matrix.inl │ │ │ ├── Matrix.isph │ │ │ ├── MirrorMatrix.h │ │ │ ├── MovingWindowAverageFast.h │ │ │ ├── NumericLimits.h │ │ │ ├── OrientedBox.h │ │ │ ├── OrthoMatrix.h │ │ │ ├── PackedVector.h │ │ │ ├── PerspectiveMatrix.h │ │ │ ├── Plane.h │ │ │ ├── Quat.h │ │ │ ├── Quat.isph │ │ │ ├── QuatRotationTranslationMatrix.h │ │ │ ├── RandomStream.h │ │ │ ├── Range.h │ │ │ ├── RangeBound.h │ │ │ ├── RangeSet.h │ │ │ ├── Ray.h │ │ │ ├── RotationAboutPointMatrix.h │ │ │ ├── RotationMatrix.h │ │ │ ├── RotationTranslationMatrix.h │ │ │ ├── Rotator.h │ │ │ ├── SHMath.h │ │ │ ├── Scalar.isph │ │ │ ├── ScalarRegister.h │ │ │ ├── ScaleMatrix.h │ │ │ ├── ScaleRotationTranslationMatrix.h │ │ │ ├── Soaaos.isph │ │ │ ├── Sobol.h │ │ │ ├── Sphere.h │ │ │ ├── StatisticalFloat.h │ │ │ ├── Transform.h │ │ │ ├── Transform.isph │ │ │ ├── TransformCalculus.h │ │ │ ├── TransformCalculus2D.h │ │ │ ├── TransformCalculus3D.h │ │ │ ├── TransformNonVectorized.h │ │ │ ├── TransformVectorized.h │ │ │ ├── TranslationMatrix.h │ │ │ ├── TwoVectors.h │ │ │ ├── UnitConversion.h │ │ │ ├── UnitConversion.inl │ │ │ ├── UnrealMath.h │ │ │ ├── UnrealMath.tps │ │ │ ├── UnrealMathDirectX.h │ │ │ ├── UnrealMathFPU.h │ │ │ ├── UnrealMathNeon.h │ │ │ ├── UnrealMathSSE.h │ │ │ ├── UnrealMathUtility.h │ │ │ ├── UnrealMathVectorCommon.h │ │ │ ├── UnrealMathVectorConstants.h │ │ │ ├── UnrealPlatformMathSSE.h │ │ │ ├── UnrealPlatformMathSSE4.h │ │ │ ├── Vector.h │ │ │ ├── Vector.isph │ │ │ ├── Vector2D.h │ │ │ ├── Vector2DHalf.h │ │ │ ├── Vector4.h │ │ │ ├── VectorRegister.h │ │ │ └── WideVector.isph │ │ │ ├── Microsoft │ │ │ ├── AllowMicrosoftPlatformAtomics.h │ │ │ ├── AllowMicrosoftPlatformTypes.h │ │ │ ├── COMPointer.h │ │ │ ├── HideMicrosoftPlatformAtomics.h │ │ │ ├── HideMicrosoftPlatformTypes.h │ │ │ ├── MicrosoftPlatformCrashContext.h │ │ │ ├── MicrosoftPlatformMath.h │ │ │ ├── MicrosoftPlatformStackWalk.h │ │ │ ├── MinWindows.h │ │ │ ├── MinimalWindowsApi.h │ │ │ ├── PostWindowsApi.h │ │ │ ├── PreWindowsApi.h │ │ │ └── WindowsHWrapper.h │ │ │ ├── Misc │ │ │ ├── AES.h │ │ │ ├── AccessDetection.h │ │ │ ├── App.h │ │ │ ├── ArchiveMD5.h │ │ │ ├── AsciiSet.h │ │ │ ├── AssertionMacros.h │ │ │ ├── AsyncTaskNotification.h │ │ │ ├── Attribute.h │ │ │ ├── AutomationEvent.h │ │ │ ├── AutomationTest.h │ │ │ ├── Base64.h │ │ │ ├── BufferedOutputDevice.h │ │ │ ├── Build.h │ │ │ ├── ByteSwap.h │ │ │ ├── CString.cpp │ │ │ ├── CString.h │ │ │ ├── CallbackDevice.h │ │ │ ├── Change.h │ │ │ ├── Char.h │ │ │ ├── CommandLine.h │ │ │ ├── ComparisonUtility.h │ │ │ ├── CompilationResult.h │ │ │ ├── CompressedGrowableBuffer.h │ │ │ ├── Compression.h │ │ │ ├── CompressionFlags.h │ │ │ ├── ConfigCacheIni.h │ │ │ ├── ConfigContext.h │ │ │ ├── ConfigHierarchy.h │ │ │ ├── ConfigTypes.h │ │ │ ├── ConfigUtilities.h │ │ │ ├── CoreAsyncTaskNotificationImpl.h │ │ │ ├── CoreDefines.h │ │ │ ├── CoreDelegates.h │ │ │ ├── CoreMisc.h │ │ │ ├── CoreMiscDefines.h │ │ │ ├── CoreStats.h │ │ │ ├── Crc.h │ │ │ ├── DataDrivenPlatformInfoRegistry.h │ │ │ ├── DateTime.h │ │ │ ├── DefaultValueHelper.h │ │ │ ├── DelayedAutoRegister.h │ │ │ ├── DelegateFilter.h │ │ │ ├── DisableOldUETypes.h │ │ │ ├── EmbeddedCommunication.h │ │ │ ├── EngineBuildSettings.h │ │ │ ├── EngineNetworkCustomVersion.h │ │ │ ├── EngineVersion.h │ │ │ ├── EngineVersionBase.h │ │ │ ├── EngineVersionComparison.h │ │ │ ├── EnumClassFlags.h │ │ │ ├── EnumRange.h │ │ │ ├── EnumerateRange.h │ │ │ ├── Exec.h │ │ │ ├── ExpressionParser.h │ │ │ ├── ExpressionParserTypes.h │ │ │ ├── ExpressionParserTypes.inl │ │ │ ├── FallbackStruct.h │ │ │ ├── FbxErrors.h │ │ │ ├── FeedbackContext.h │ │ │ ├── FeedbackContextMarkup.h │ │ │ ├── FieldAccessor.h │ │ │ ├── FileHelper.h │ │ │ ├── FilterCollection.h │ │ │ ├── Fnv.h │ │ │ ├── Fork.h │ │ │ ├── FrameNumber.h │ │ │ ├── FrameRate.h │ │ │ ├── FrameTime.h │ │ │ ├── FrameValue.h │ │ │ ├── GeneratedTypeName.h │ │ │ ├── GenericGrowableAllocator.h │ │ │ ├── Guid.h │ │ │ ├── HashBuilder.h │ │ │ ├── HierarchicalLogArchive.h │ │ │ ├── ICompressionFormat.h │ │ │ ├── IEngineCrypto.h │ │ │ ├── IFilter.h │ │ │ ├── ILifeCycle.h │ │ │ ├── IQueuedWork.h │ │ │ ├── ITransaction.h │ │ │ ├── InlineValue.h │ │ │ ├── InteractiveProcess.h │ │ │ ├── KeyChainUtilities.h │ │ │ ├── LargeWorldCoordinates.h │ │ │ ├── LargeWorldCoordinatesSerializer.h │ │ │ ├── LargeWorldRenderPosition.h │ │ │ ├── Launder.h │ │ │ ├── LazySingleton.h │ │ │ ├── LocalTimestampDirectoryVisitor.h │ │ │ ├── LowLevelTestAdapter.h │ │ │ ├── MTAccessDetector.h │ │ │ ├── MapErrors.h │ │ │ ├── MemStack.h │ │ │ ├── MemStackUtility.h │ │ │ ├── MemoryReadStream.h │ │ │ ├── MessageDialog.h │ │ │ ├── MonitoredProcess.h │ │ │ ├── MonolithicHeaderBoilerplate.h │ │ │ ├── NamePermissionList.h │ │ │ ├── NetworkGuid.h │ │ │ ├── NetworkVersion.h │ │ │ ├── NoopCounter.h │ │ │ ├── ObjectThumbnail.h │ │ │ ├── Optional.h │ │ │ ├── OptionalFwd.h │ │ │ ├── OutputDevice.h │ │ │ ├── OutputDeviceAnsiError.h │ │ │ ├── OutputDeviceArchiveWrapper.h │ │ │ ├── OutputDeviceConsole.h │ │ │ ├── OutputDeviceDebug.h │ │ │ ├── OutputDeviceError.h │ │ │ ├── OutputDeviceFile.h │ │ │ ├── OutputDeviceHelper.h │ │ │ ├── OutputDeviceMemory.h │ │ │ ├── OutputDeviceNull.h │ │ │ ├── OutputDeviceRedirector.h │ │ │ ├── Parse.h │ │ │ ├── PathViews.h │ │ │ ├── Paths.h │ │ │ ├── PreLoadFile.h │ │ │ ├── PreloadableFile.h │ │ │ ├── QualifiedFrameTime.h │ │ │ ├── QueuedThreadPool.h │ │ │ ├── QueuedThreadPoolWrapper.h │ │ │ ├── RemoteConfigIni.h │ │ │ ├── RuntimeErrors.h │ │ │ ├── ScopeExit.h │ │ │ ├── ScopeLock.h │ │ │ ├── ScopeRWLock.h │ │ │ ├── ScopeTryLock.h │ │ │ ├── ScopedEvent.h │ │ │ ├── ScopedSlowTask.h │ │ │ ├── SecureHash.h │ │ │ ├── SingleThreadEvent.h │ │ │ ├── SingleThreadRunnable.h │ │ │ ├── SlowTask.h │ │ │ ├── SlowTaskStack.h │ │ │ ├── SpinLock.h │ │ │ ├── StaticAssertCompleteType.h │ │ │ ├── StringBuilder.h │ │ │ ├── StringFormatArg.h │ │ │ ├── StringFormatter.h │ │ │ ├── StringUtility.h │ │ │ ├── StructBuilder.h │ │ │ ├── TVariant.h │ │ │ ├── TVariantMeta.h │ │ │ ├── TextFilter.h │ │ │ ├── TextFilterExpressionEvaluator.h │ │ │ ├── TextFilterUtils.h │ │ │ ├── TimeGuard.h │ │ │ ├── Timecode.h │ │ │ ├── Timeout.h │ │ │ ├── Timespan.h │ │ │ ├── TrackedActivity.h │ │ │ ├── TypeContainer.h │ │ │ ├── UProjectInfo.h │ │ │ ├── URLRequestFilter.h │ │ │ ├── VarArgs.h │ │ │ ├── Variant.h │ │ │ └── WildcardString.h │ │ │ ├── ProfilingDebugging │ │ │ └── UMemoryDefines.h │ │ │ ├── Serialization │ │ │ ├── Archive.cpp │ │ │ ├── Archive.h │ │ │ ├── ArchiveCookData.h │ │ │ ├── ArchiveLoadCompressedProxy.h │ │ │ ├── ArchiveProxy.h │ │ │ ├── ArchiveSaveCompressedProxy.h │ │ │ ├── ArchiveSerializedPropertyChain.h │ │ │ ├── ArrayReader.h │ │ │ ├── ArrayWriter.h │ │ │ ├── BitArchive.h │ │ │ ├── BitReader.h │ │ │ ├── BitWriter.h │ │ │ ├── BufferArchive.h │ │ │ ├── BufferReader.h │ │ │ ├── BufferWriter.h │ │ │ ├── CompactBinary.h │ │ │ ├── CompactBinaryContainerSerialization.h │ │ │ ├── CompactBinaryPackage.h │ │ │ ├── CompactBinarySerialization.h │ │ │ ├── CompactBinaryValidation.h │ │ │ ├── CompactBinaryValue.h │ │ │ ├── CompactBinaryWriter.h │ │ │ ├── CompressedChunkInfo.h │ │ │ ├── Csv │ │ │ │ └── CsvParser.h │ │ │ ├── CustomVersion.h │ │ │ ├── FileRegions.h │ │ │ ├── Formatters │ │ │ │ └── BinaryArchiveFormatter.h │ │ │ ├── LargeMemoryData.h │ │ │ ├── LargeMemoryReader.h │ │ │ ├── LargeMemoryWriter.h │ │ │ ├── LoadTimeTrace.h │ │ │ ├── MappedName.h │ │ │ ├── MemoryArchive.h │ │ │ ├── MemoryHasher.h │ │ │ ├── MemoryImage.h │ │ │ ├── MemoryImageWriter.h │ │ │ ├── MemoryLayout.h │ │ │ ├── MemoryReader.h │ │ │ ├── MemoryWriter.h │ │ │ ├── NameAsStringIndexProxyArchive.h │ │ │ ├── NameAsStringProxyArchive.h │ │ │ ├── PackageWriter.h │ │ │ ├── StaticMemoryReader.h │ │ │ ├── StructuredArchive.h │ │ │ ├── StructuredArchiveAdapters.h │ │ │ ├── StructuredArchiveChildReader.h │ │ │ ├── StructuredArchiveDefines.h │ │ │ ├── StructuredArchiveFormatter.h │ │ │ ├── StructuredArchiveFwd.h │ │ │ ├── StructuredArchiveNameHelpers.h │ │ │ ├── StructuredArchiveSlotBase.h │ │ │ ├── StructuredArchiveSlots.h │ │ │ └── VarInt.h │ │ │ ├── String │ │ │ ├── BytesToHex.h │ │ │ ├── Escape.h │ │ │ ├── Find.h │ │ │ ├── HexToBytes.h │ │ │ ├── Join.h │ │ │ ├── LexFromString.h │ │ │ ├── LineEndings.h │ │ │ ├── ParseLines.h │ │ │ ├── ParseTokens.h │ │ │ └── RemoveFrom.h │ │ │ ├── Templates │ │ │ ├── AlignmentTemplates.h │ │ │ ├── AndOrNot.h │ │ │ ├── AreTypesEqual.h │ │ │ ├── Atomic.h │ │ │ ├── ChooseClass.h │ │ │ ├── CopyQualifiersAndRefsFromTo.h │ │ │ ├── CopyQualifiersFromTo.h │ │ │ ├── Decay.h │ │ │ ├── DontCopy.h │ │ │ ├── EnableIf.h │ │ │ ├── EqualTo.h │ │ │ ├── Function.h │ │ │ ├── Greater.h │ │ │ ├── Identity.h │ │ │ ├── IdentityFunctor.h │ │ │ ├── IntegralConstant.h │ │ │ ├── Invoke.h │ │ │ ├── IsAbstract.h │ │ │ ├── IsArithmetic.h │ │ │ ├── IsArray.h │ │ │ ├── IsArrayOrRefOfType.h │ │ │ ├── IsArrayOrRefOfTypeByPredicate.h │ │ │ ├── IsClass.h │ │ │ ├── IsConst.h │ │ │ ├── IsConstructible.h │ │ │ ├── IsEnum.h │ │ │ ├── IsEnumClass.h │ │ │ ├── IsFloatingPoint.h │ │ │ ├── IsInitializerList.h │ │ │ ├── IsIntegral.h │ │ │ ├── IsInvocable.h │ │ │ ├── IsMemberPointer.h │ │ │ ├── IsPODType.h │ │ │ ├── IsPointer.h │ │ │ ├── IsPolymorphic.h │ │ │ ├── IsSigned.h │ │ │ ├── IsTrivial.h │ │ │ ├── IsTriviallyCopyAssignable.h │ │ │ ├── IsTriviallyCopyConstructible.h │ │ │ ├── IsTriviallyDestructible.h │ │ │ ├── IsUECoreType.h │ │ │ ├── IsValidVariadicFunctionArg.h │ │ │ ├── Less.h │ │ │ ├── LosesQualifiersFromTo.h │ │ │ ├── MakeSigned.h │ │ │ ├── MakeUnsigned.h │ │ │ ├── MaxSizeof.h │ │ │ ├── MemoryOps.h │ │ │ ├── Models.h │ │ │ ├── NonNullPointer.h │ │ │ ├── PimplPtr.h │ │ │ ├── PointerIsConvertibleFromTo.h │ │ │ ├── RefCounting.h │ │ │ ├── RemoveCV.h │ │ │ ├── RemoveExtent.h │ │ │ ├── RemoveReference.h │ │ │ ├── ResolveTypeAmbiguity.h │ │ │ ├── RetainedRef.h │ │ │ ├── ReversePredicate.h │ │ │ ├── ScopedCallback.h │ │ │ ├── SharedPointer.h │ │ │ ├── SharedPointerFwd.h │ │ │ ├── SharedPointerInternals.h │ │ │ ├── SharedPointerTesting.inl │ │ │ ├── Sorting.h │ │ │ ├── Tuple.h │ │ │ ├── TypeCompatibleBytes.h │ │ │ ├── TypeHash.h │ │ │ ├── UniqueObj.h │ │ │ ├── UniquePtr.h │ │ │ ├── UnrealTemplate.h │ │ │ ├── UnrealTypeTraits.h │ │ │ └── ValueOrError.h │ │ │ ├── Traits │ │ │ ├── ElementType.h │ │ │ ├── IntType.h │ │ │ ├── IsCharEncodingCompatibleWith.h │ │ │ ├── IsCharEncodingSimplyConvertibleTo.h │ │ │ ├── IsCharType.h │ │ │ ├── IsContiguousContainer.h │ │ │ ├── IsFixedWidthCharEncoding.h │ │ │ ├── IsVoidType.h │ │ │ └── MemberFunctionPtrOuter.h │ │ │ ├── UObject │ │ │ ├── AnimObjectVersion.h │ │ │ ├── AnimPhysObjectVersion.h │ │ │ ├── AutomationObjectVersion.h │ │ │ ├── BlueprintsObjectVersion.h │ │ │ ├── BuildObjectVersion.h │ │ │ ├── CineCameraObjectVersion.h │ │ │ ├── CoreObjectVersion.h │ │ │ ├── DebugSerializationFlags.h │ │ │ ├── DestructionObjectVersion.h │ │ │ ├── DevObjectVersion.h │ │ │ ├── EditorObjectVersion.h │ │ │ ├── EnterpriseObjectVersion.h │ │ │ ├── ExternalPhysicsCustomObjectVersion.h │ │ │ ├── ExternalPhysicsMaterialCustomObjectVersion.h │ │ │ ├── FortniteMainBranchObjectVersion.h │ │ │ ├── FortniteNCBranchObjectVersion.h │ │ │ ├── FortniteReleaseBranchCustomObjectVersion.h │ │ │ ├── FortniteShaderworkObjectVersion.h │ │ │ ├── FrameworkObjectVersion.h │ │ │ ├── GeometryObjectVersion.h │ │ │ ├── LoadTimesObjectVersion.h │ │ │ ├── MediaFrameWorkObjectVersion.h │ │ │ ├── MobileObjectVersion.h │ │ │ ├── NameBatchSerialization.h │ │ │ ├── NameTypes.h │ │ │ ├── NetworkingObjectVersion.h │ │ │ ├── NiagaraObjectVersion.h │ │ │ ├── ObjectPtr.h │ │ │ ├── ObjectVersion.h │ │ │ ├── OnlineObjectVersion.h │ │ │ ├── PhysicsObjectVersion.h │ │ │ ├── PlatformObjectVersion.h │ │ │ ├── PropertyPortFlags.h │ │ │ ├── ReflectionCaptureObjectVersion.h │ │ │ ├── ReleaseObjectVersion.h │ │ │ ├── RenderingObjectVersion.h │ │ │ ├── ScriptDelegates.h │ │ │ ├── SequencerObjectVersion.h │ │ │ ├── UE5CookerObjectVersion.h │ │ │ ├── UE5LWCRenderingStreamObjectVersion.h │ │ │ ├── UE5MainStreamObjectVersion.h │ │ │ ├── UE5PrivateFrostyStreamObjectVersion.h │ │ │ ├── UE5ReleaseStreamObjectVersion.h │ │ │ ├── UObjectHierarchyFwd.h │ │ │ ├── UnrealNames.h │ │ │ ├── UnrealNames.inl │ │ │ ├── VRObjectVersion.h │ │ │ ├── VirtualProductionObjectVersion.h │ │ │ └── WeakObjectPtrTemplates.h │ │ │ └── Windows │ │ │ ├── AllowWindowsPlatformAtomics.h │ │ │ ├── AllowWindowsPlatformTypes.h │ │ │ ├── COMPointer.h │ │ │ ├── HideWindowsPlatformAtomics.h │ │ │ ├── HideWindowsPlatformTypes.h │ │ │ ├── MinWindows.h │ │ │ ├── MinimalWindowsApi.h │ │ │ ├── PostWindowsApi.h │ │ │ ├── PreWindowsApi.h │ │ │ ├── WindowsCriticalSection.h │ │ │ ├── WindowsErrorOutputDevice.h │ │ │ ├── WindowsEventLogOutputDevice.h │ │ │ ├── WindowsHWrapper.h │ │ │ ├── WindowsPlatform.h │ │ │ ├── WindowsPlatformAffinity.h │ │ │ ├── WindowsPlatformAtomics.h │ │ │ ├── WindowsPlatformCodeAnalysis.h │ │ │ ├── WindowsPlatformCompilerPreSetup.h │ │ │ ├── WindowsPlatformCompilerSetup.h │ │ │ ├── WindowsPlatformCrashContext.h │ │ │ ├── WindowsPlatformFile.h │ │ │ ├── WindowsPlatformMath.h │ │ │ ├── WindowsPlatformMemory.h │ │ │ ├── WindowsPlatformMisc.h │ │ │ ├── WindowsPlatformNamedPipe.h │ │ │ ├── WindowsPlatformOutputDevices.h │ │ │ ├── WindowsPlatformProcess.h │ │ │ ├── WindowsPlatformProperties.h │ │ │ ├── WindowsPlatformStackWalk.h │ │ │ ├── WindowsPlatformString.h │ │ │ ├── WindowsPlatformTLS.h │ │ │ ├── WindowsPlatformTime.h │ │ │ ├── WindowsSemaphore.h │ │ │ └── WindowsSystemIncludes.h │ │ ├── Ark │ │ ├── ArkApiUtils.h │ │ ├── AsaApiUtilsMessagingManager.h │ │ └── MessagingManager.h │ │ ├── AsaApiModUtils.hpp │ │ ├── IApiUtils.h │ │ ├── ICommands.h │ │ ├── IHooks.h │ │ ├── Logger │ │ ├── Logger.h │ │ └── spdlog │ │ │ ├── async_logger.h │ │ │ ├── common.h │ │ │ ├── details │ │ │ ├── async_log_helper.h │ │ │ ├── async_logger_impl.h │ │ │ ├── file_helper.h │ │ │ ├── log_msg.h │ │ │ ├── logger_impl.h │ │ │ ├── mpmc_bounded_q.h │ │ │ ├── null_mutex.h │ │ │ ├── os.h │ │ │ ├── pattern_formatter_impl.h │ │ │ ├── registry.h │ │ │ └── spdlog_impl.h │ │ │ ├── fmt │ │ │ ├── bundled │ │ │ │ ├── container.h │ │ │ │ ├── format.cc │ │ │ │ ├── format.h │ │ │ │ ├── ostream.cc │ │ │ │ ├── ostream.h │ │ │ │ ├── posix.cc │ │ │ │ ├── posix.h │ │ │ │ ├── printf.cc │ │ │ │ ├── printf.h │ │ │ │ ├── string.h │ │ │ │ └── time.h │ │ │ ├── fmt.h │ │ │ └── ostr.h │ │ │ ├── formatter.h │ │ │ ├── logger.h │ │ │ ├── sinks │ │ │ ├── android_sink.h │ │ │ ├── ansicolor_sink.h │ │ │ ├── base_sink.h │ │ │ ├── dist_sink.h │ │ │ ├── file_sinks.h │ │ │ ├── msvc_sink.h │ │ │ ├── null_sink.h │ │ │ ├── ostream_sink.h │ │ │ ├── sink.h │ │ │ ├── stdout_sinks.h │ │ │ ├── syslog_sink.h │ │ │ ├── wincolor_sink.h │ │ │ └── windebug_sink.h │ │ │ ├── spdlog.h │ │ │ └── tweakme.h │ │ ├── Requests.h │ │ ├── Timer.h │ │ ├── Tools.h │ │ └── json.hpp ├── main.cpp └── vcpkg.json ├── Configs └── config.json ├── LICENSE └── README.md /AsaApi/AsaApi.def: -------------------------------------------------------------------------------- 1 | LIBRARY AsaApi.dll 2 | EXPORTS 3 | InitApi @1 4 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Ark/Globals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | inline bool HideCommand = false; -------------------------------------------------------------------------------- /AsaApi/Core/Private/Ark/HooksImpl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace AsaApi 4 | { 5 | void InitHooks(); 6 | } // namespace AsaApi 7 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Base.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "Offsets.h" 4 | 5 | DWORD64 GetAddress(const void* base, const std::string& name) 6 | { 7 | return API::Offsets::Get().GetAddress(base, name); 8 | } 9 | 10 | LPVOID GetAddress(const std::string& name) 11 | { 12 | return API::Offsets::Get().GetAddress(name); 13 | } 14 | 15 | LPVOID GetDataAddress(const std::string& name) 16 | { 17 | return API::Offsets::Get().GetDataAddress(name); 18 | } 19 | 20 | BitField GetBitField(const void* base, const std::string& name) 21 | { 22 | return API::Offsets::Get().GetBitField(base, name); 23 | } 24 | 25 | BitField GetBitField(LPVOID base, const std::string& name) 26 | { 27 | return API::Offsets::Get().GetBitField(base, name); 28 | } 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Helpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace API 6 | { 7 | __forceinline std::string ReplaceString(std::string subject, const std::string& search, const std::string& replace) 8 | { 9 | size_t pos = 0; 10 | while ((pos = subject.find(search, pos)) != std::string::npos) 11 | { 12 | subject.replace(pos, search.length(), replace); 13 | pos += replace.length(); 14 | } 15 | 16 | return subject; 17 | } 18 | } // namespace API 19 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Hooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace API 9 | { 10 | class Hooks : public AsaApi::IHooks 11 | { 12 | public: 13 | Hooks(); 14 | 15 | Hooks(const Hooks&) = delete; 16 | Hooks(Hooks&&) = delete; 17 | Hooks& operator=(const Hooks&) = delete; 18 | Hooks& operator=(Hooks&&) = delete; 19 | 20 | ~Hooks() override = default; 21 | 22 | bool SetHookInternal(const std::string& func_name, LPVOID detour, LPVOID* original) override; 23 | 24 | bool DisableHook(const std::string& func_name, LPVOID detour) override; 25 | 26 | private: 27 | struct Hook 28 | { 29 | Hook(LPVOID target, LPVOID detour, LPVOID* original) 30 | : target(target), 31 | detour(detour), 32 | original(original) 33 | { 34 | } 35 | 36 | LPVOID target; 37 | LPVOID detour; 38 | LPVOID* original; 39 | }; 40 | 41 | std::unordered_map>> all_hooks_; 42 | }; 43 | } // namespace API 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/IBaseApi.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "ICommands.h" 7 | 8 | namespace API 9 | { 10 | class IBaseApi 11 | { 12 | public: 13 | virtual ~IBaseApi() = default; 14 | 15 | virtual bool Init() = 0; 16 | virtual float GetVersion() = 0; 17 | virtual std::string GetApiName() = 0; 18 | virtual void RegisterCommands() = 0; 19 | 20 | virtual std::unique_ptr& GetCommands() = 0; 21 | virtual std::unique_ptr& GetHooks() = 0; 22 | virtual std::unique_ptr& GetApiUtils() = 0; 23 | }; 24 | 25 | inline std::unique_ptr game_api; 26 | } // namespace API 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Logger.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | std::string GetLogName() 9 | { 10 | static std::string log_name("-1"); 11 | if (log_name == "-1") 12 | { 13 | const std::string config_path = AsaApi::Tools::GetCurrentDir() + "/config.json"; 14 | std::ifstream file{config_path}; 15 | if (!file.is_open()) 16 | { 17 | log_name = ""; 18 | return ""; 19 | } 20 | 21 | nlohmann::json config; 22 | file >> config; 23 | file.close(); 24 | 25 | log_name = config["settings"].value("StaticLogPath", ""); 26 | } 27 | 28 | return log_name; 29 | } 30 | 31 | std::vector& GetLogSinks() 32 | { 33 | static std::vector sinks{ 34 | std::make_shared(), 35 | std::make_shared( 36 | !GetLogName().empty() 37 | ? GetLogName() 38 | : spdlog::sinks::default_daily_file_name_calculator:: 39 | calc_filename( 40 | API::Tools::GetCurrentDir() + "/logs/ArkApi_" + std::to_string(GetCurrentProcessId()) + ".log"), 41 | 1024 * 1024, 5) 42 | }; 43 | 44 | return sinks; 45 | } 46 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/Offsets.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace API 8 | { 9 | class Offsets 10 | { 11 | public: 12 | static Offsets& Get(); 13 | 14 | Offsets(const Offsets&) = delete; 15 | Offsets(Offsets&&) = delete; 16 | Offsets& operator=(const Offsets&) = delete; 17 | Offsets& operator=(Offsets&&) = delete; 18 | 19 | void Init(std::unordered_map&& offsets_dump, 20 | std::unordered_map&& bitfields_dump); 21 | 22 | DWORD64 GetAddress(const void* base, const std::string& name); 23 | LPVOID GetAddress(const std::string& name); 24 | 25 | LPVOID GetDataAddress(const std::string& name); 26 | 27 | BitField GetBitField(const void* base, const std::string& name); 28 | BitField GetBitField(LPVOID base, const std::string& name); 29 | 30 | private: 31 | Offsets(); 32 | ~Offsets() = default; 33 | 34 | BitField GetBitFieldInternal(const void* base, const std::string& name); 35 | 36 | DWORD64 module_base_; 37 | DWORD64 data_base_; 38 | 39 | std::unordered_map offsets_dump_; 40 | std::unordered_map bitfields_dump_; 41 | }; 42 | } // namespace API 43 | -------------------------------------------------------------------------------- /AsaApi/Core/Private/PDBReader/pdbignores.txt: -------------------------------------------------------------------------------- 1 | $ 2 | < 3 | Z_ 4 | z_ 5 | zlib 6 | xatlas 7 | _ 8 | TSet 9 | TSQ 10 | TReve 11 | TReso 12 | TResi 13 | TRender 14 | TRemove 15 | TRHI 16 | TRDG 17 | TQ 18 | TProp 19 | TPriv 20 | TPai 21 | TOb 22 | TMap 23 | TBase 24 | TAr 25 | Shared 26 | TSh 27 | TSi 28 | TSpar 29 | TType 30 | TUn 31 | TWeak 32 | UE. 33 | UScr 34 | oo2 35 | std:: 36 | ogg 37 | oidn 38 | ngx 39 | curl 40 | dt 41 | cpp 42 | Vulkan 43 | USynth 44 | UUI 45 | UE: 46 | TkDOP 47 | TStatic 48 | TSlateBaseNamedArgs 49 | TSharedFromThis 50 | TShaderRefBase 51 | TMeshProcessorShaders 52 | TMaterialCHS 53 | TGraphTask 54 | TDelegate 55 | TCommon 56 | STableRow 57 | SNotification 58 | Nanite 59 | Metasound 60 | IPCGAttributeAccessorT 61 | ITyped 62 | FWide 63 | FView 64 | FSource 65 | FShader 66 | FRig 67 | FRender 68 | FRecast 69 | FRDG 70 | FPixel 71 | FOpen 72 | FOnlineFriendsSpec 73 | FNiagara 74 | FNDI 75 | FMovie 76 | FLumen 77 | FD3D 78 | FComputeShaderUtils 79 | FCombine 80 | Eigen 81 | D3D 82 | Chaos 83 | Build 84 | BINK 85 | Aws 86 | Audio 87 | Add 88 | Algo 89 | PCG 90 | TInd 91 | TSha 92 | TSlate 93 | UWi 94 | TIndTSha 95 | UWin 96 | tbb 97 | vraudio 98 | openvdb 99 | ispc 100 | gte 101 | cfcore 102 | boost 103 | aws 104 | asn1 105 | Vk 106 | Vdb 107 | UserW 108 | UUV 109 | UUMG 110 | UTyped 111 | UTool 112 | UStatsP 113 | UPCG 114 | UNi 115 | Nia 116 | UMovi 117 | UMot 118 | UMeta 119 | ULight 120 | TOct 121 | TBPV 122 | Strata 123 | Slate 124 | Shader 125 | SWrap 126 | SAudio 127 | RectLi 128 | NV 129 | FDefe 130 | Expe -------------------------------------------------------------------------------- /AsaApi/Core/Private/UE/UE.cpp: -------------------------------------------------------------------------------- 1 | #include "API/ARK/Ark.h" 2 | #include "API/ARK/UE.h" 3 | 4 | ARK_API FProperty* UObject::FindProperty(FName name) 5 | { 6 | for (FProperty* Property = this->ClassPrivateField()->PropertyLinkField(); Property != nullptr; Property = Property->PropertyLinkNextField()) 7 | { 8 | if (Property->NamePrivateField().ToString().Equals(name.ToString())) 9 | return Property; 10 | } 11 | return nullptr; 12 | } -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/ARK/Ark.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | 5 | #ifndef _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 6 | #define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 7 | #endif 8 | 9 | #ifndef ARK_GAME 10 | #define ARK_GAME 11 | #endif 12 | 13 | #ifdef ARK_EXPORTS 14 | #define ARK_API __declspec(dllexport) 15 | #else 16 | #define ARK_API __declspec(dllimport) 17 | #endif 18 | 19 | #include "../Base.h" 20 | #include "../Enums.h" 21 | #include "../UE/GenericPlatform/GenericPlatformStricmp.h" 22 | #include "../UE/Math/Vector.h" 23 | #include "../UE/Math/Rotator.h" 24 | //#include "../UE/NetSerialization.h" 25 | #include "../UE/Math/ColorList.h" 26 | #include "UE.h" 27 | 28 | #include "ExtensionsDeclaration.h" 29 | //#include "Tribe.h" 30 | #include "Actor.h" 31 | #include "Other.h" 32 | #include "Inventory.h" 33 | #include "GameMode.h" 34 | //#include "GameState.h" 35 | #include "PrimalStructure.h" 36 | #include "Buff.h" 37 | #include "ModParamStructs.h" 38 | 39 | #include "../../IApiUtils.h" 40 | #include "../../ICommands.h" 41 | #include "IHooks.h" 42 | #include "Tools.h" 43 | #include "ExtensionsDefinition.h" 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/ARK/ExtensionsDeclaration.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UE.h" 4 | #include 5 | #include 6 | 7 | struct ActorExtensions 8 | { 9 | /** 10 | * \brief Returns the forward direction vector (length 1.0) from the actor's point of view. 11 | * \return The forward direction vector (length 1.0) from the actor's point of view. 12 | */ 13 | FVector GetActorForwardVector(); 14 | 15 | /** 16 | * \brief Returns if the actor is from SomeBase or a subclass of SomeBase. 17 | * \param SomeBase The base class to check against. 18 | * \return true if the actor is from SomeBase or a subclass of SomeBase. 19 | */ 20 | bool IsA(UClass* SomeBase); 21 | 22 | /** 23 | * \brief Returns the actor's location in world space. 24 | * \return The actor's location in world space. 25 | */ 26 | FVector GetLocation(); 27 | }; 28 | 29 | struct PlayerControllerExtensions 30 | { 31 | /** 32 | * \brief Returns the player's EOS id (platform unique identifier) 33 | * \return The player's EOS id (platform unique identifier) 34 | */ 35 | FString GetEOSId(); 36 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/ARK/ExtensionsDefinition.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../IApiUtils.h" 4 | 5 | // Actor extensions 6 | 7 | FORCEINLINE FVector ActorExtensions::GetActorForwardVector() 8 | { 9 | AActor* _this = static_cast(this); 10 | USceneComponent* RootComponent = _this->RootComponentField().Get(); 11 | if (RootComponent) 12 | { 13 | return RootComponent->ComponentToWorldField().GetUnitAxis(EAxis::X); 14 | } 15 | 16 | return FVector::ZeroVector; 17 | } 18 | 19 | FORCEINLINE bool ActorExtensions::IsA(UClass* SomeBase) 20 | { 21 | return static_cast(this)->ClassPrivateField()->IsChildOf(SomeBase); 22 | } 23 | 24 | FORCEINLINE FVector ActorExtensions::GetLocation() 25 | { 26 | AActor* _this = static_cast(this); 27 | auto* root = _this->RootComponentField().Get(); 28 | if (root) 29 | { 30 | UE::Math::TTransform transform = root->ComponentToWorldField(); 31 | return transform.GetLocation(); 32 | } 33 | return FVector(); 34 | } 35 | 36 | // Player Controller Extensions 37 | 38 | FORCEINLINE FString PlayerControllerExtensions::GetEOSId() 39 | { 40 | AShooterPlayerController* _this = static_cast(this); 41 | FString eos_id = ""; 42 | _this->GetUniqueNetIdAsString(&eos_id); 43 | return eos_id; 44 | } -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/Helpers/Helpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "API/UE/Containers/UnrealString.h" 3 | #include "API/ARK/Ark.h" 4 | 5 | FORCEINLINE FString GetDllName() 6 | { 7 | HMODULE hModule = NULL; 8 | GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, 9 | (LPCSTR)&AActor::StaticClass, 10 | &hModule); 11 | wchar_t moduleName[MAX_PATH]; 12 | GetModuleFileNameW(hModule, moduleName, MAX_PATH); 13 | return moduleName; 14 | } -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/AllOf.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/Invoke.h" 7 | 8 | 9 | namespace Algo 10 | { 11 | /** 12 | * Checks if every element in the range is truthy. 13 | * 14 | * @param Range The range to check. 15 | * 16 | * @return true if all the elements are truthy, false otherwise. 17 | */ 18 | template 19 | FORCEINLINE bool AllOf(const RangeType& Range) 20 | { 21 | for (const auto& Element : Range) 22 | { 23 | if (!Element) 24 | { 25 | return false; 26 | } 27 | } 28 | 29 | return true; 30 | } 31 | 32 | /** 33 | * Checks if every projection of the elements in the range is truthy. 34 | * 35 | * @param Range The range to check. 36 | * @param Projection The projection to apply to each element. 37 | * 38 | * @return true if all the projections are truthy, false otherwise. 39 | */ 40 | template 41 | FORCEINLINE bool AllOf(const RangeType& Range, ProjectionType Projection) 42 | { 43 | for (const auto& Element : Range) 44 | { 45 | if (!Invoke(Projection, Element)) 46 | { 47 | return false; 48 | } 49 | } 50 | 51 | return true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Common.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | namespace Algo 6 | { 7 | /** 8 | * A special enum indicating that reference should NOT be used when iterating a container. 9 | */ 10 | enum ENoRef { NoRef }; 11 | } 12 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/FindSortedStringCaseInsensitive.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | namespace Algo 8 | { 9 | /** 10 | * Finds a string in an array of sorted strings, by case-insensitive search, by using binary subdivision of the array. 11 | * 12 | * @param Str The string to look for. 13 | * @param SortedArray The array of strings to search. The strings must be sorted lexicographically, case-insensitively. 14 | * @param ArrayCount The number of strings in the array. 15 | * 16 | * @return The index of the found string in the array, or -1 if the string was not found. 17 | */ 18 | int32 FindSortedStringCaseInsensitive(const TCHAR* Str, const TCHAR* const* SortedArray, int32 ArrayCount); 19 | 20 | /** 21 | * Finds a string in an array of sorted strings, by case-insensitive search, by using binary subdivision of the array. 22 | * 23 | * @param Str The string to look for. 24 | * @param SortedArray The array of strings to search. The strings must be sorted lexicographically, case-insensitively. 25 | * 26 | * @return The index of the found string in the array, or -1 if the string was not found. 27 | */ 28 | template 29 | FORCEINLINE int32 FindSortedStringCaseInsensitive(const TCHAR* Str, const TCHAR* const (&SortedArray)[ArraySize]) 30 | { 31 | return FindSortedStringCaseInsensitive(Str, SortedArray, ArraySize); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/ForEach.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/Invoke.h" 7 | 8 | namespace Algo 9 | { 10 | /** 11 | * Conditionally invokes a callable to each element in a range 12 | * 13 | * @param Input Any iterable type 14 | * @param Predicate Condition which returns true for elements that should be called with and false for elements that should be skipped 15 | * @param Callable Callable object 16 | */ 17 | template 18 | FORCEINLINE void ForEachIf(InT& Input, PredicateT Predicate, CallableT Callable) 19 | { 20 | for (auto& Value : Input) 21 | { 22 | if (Invoke(Predicate, Value)) 23 | { 24 | Invoke(Callable, Value); 25 | } 26 | } 27 | } 28 | 29 | /** 30 | * Invokes a callable to each element in a range 31 | * 32 | * @param Input Any iterable type 33 | * @param Callable Callable object 34 | */ 35 | template 36 | FORCEINLINE void ForEach(InT& Input, CallableT Callable) 37 | { 38 | for (auto& Value : Input) 39 | { 40 | Invoke(Callable, Value); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Impl/RangePointerType.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/UnrealTemplate.h" // For DeclVal 6 | 7 | namespace AlgoImpl 8 | { 9 | /** 10 | * Traits class whose Type member is the pointer type to an element of the range. 11 | */ 12 | template 13 | struct TRangePointerType 14 | { 15 | using Type = decltype(&*DeclVal().begin()); 16 | }; 17 | 18 | template 19 | struct TRangePointerType 20 | { 21 | using Type = T*; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/LevenshteinDistanceAlgorithm.tps: -------------------------------------------------------------------------------- 1 | 2 | 3 | Levenshtein Distance algorithm 4 | /Engine/Source/Runtime/Core/Public/Algo/LevenshteinDistance.h 5 | This algorithm allows to compute a distance between two strings. 6 | N/A 7 | 8 | Licensees 9 | Git 10 | P4 11 | 12 | None 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Partition.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | namespace Algo 6 | { 7 | /** 8 | * Rearranges the elements so that all the elements for which Predicate returns true precede all those for which it returns false. (not stable) 9 | * 10 | * @param First pointer to the first element 11 | * @param Num the number of items 12 | * @param Predicate unary predicate class 13 | * @return index of the first element in the second group 14 | */ 15 | template 16 | IndexType Partition(T* Elements, const IndexType Num, const UnaryPredicate& Predicate) 17 | { 18 | T* First = Elements; 19 | T* Last = Elements + Num; 20 | 21 | while (First != Last) 22 | { 23 | while (Predicate(*First)) 24 | { 25 | ++First; 26 | if (First == Last) 27 | { 28 | return (IndexType)(First - Elements); 29 | } 30 | } 31 | 32 | do 33 | { 34 | --Last; 35 | if (First == Last) 36 | { 37 | return (IndexType)(First - Elements); 38 | } 39 | } while (!Predicate(*Last)); 40 | 41 | Exchange(*First, *Last); 42 | ++First; 43 | } 44 | 45 | return (IndexType)(First - Elements); 46 | } 47 | } //namespace Algo -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/RandomShuffle.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Math/UnrealMathUtility.h" 6 | #include "Templates/UnrealTemplate.h" 7 | 8 | namespace Algo 9 | { 10 | /** 11 | * Randomly shuffle a range of elements. 12 | * 13 | * @param Range Any contiguous container. 14 | */ 15 | template 16 | void RandomShuffle(RangeType& Range) 17 | { 18 | auto Data = GetData(Range); 19 | 20 | using SizeType = decltype(GetNum(Range)); 21 | const SizeType Num = GetNum(Range); 22 | 23 | for (SizeType Index = 0; Index < Num - 1; ++Index) 24 | { 25 | // Get a random integer in [Index, Num) 26 | const SizeType RandomIndex = Index + (SizeType)FMath::RandHelper64(Num - Index); 27 | if (RandomIndex != Index) 28 | { 29 | Swap(Data[Index], Data[RandomIndex]); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Replace.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/Invoke.h" 6 | #include "Templates/UnrealTemplate.h" 7 | 8 | namespace Algo 9 | { 10 | /** 11 | * Replaces all elements that compare equal to one value with a new value. 12 | * 13 | * @param Range The range to search and modify in-place. 14 | * @param InOld The value to search for. 15 | * @param InNew The value to copy in as a replacement. 16 | */ 17 | template 18 | FORCEINLINE void Replace(RangeType&& Range, const ValueType& InOld, const ValueType& InNew) 19 | { 20 | for (auto& Elem : Forward(Range)) 21 | { 22 | if (Elem == InOld) 23 | { 24 | Elem = InNew; 25 | } 26 | } 27 | } 28 | 29 | /** 30 | * Replaces all elements that satisfy the predicate with the given value. 31 | * 32 | * @param Range The range to search and modify in-place. 33 | * @param InPred The predicate to apply to each element. 34 | * @param InNew The value to copy in as a replacement for each element satisfying the predicate. 35 | */ 36 | template 37 | FORCEINLINE void ReplaceIf(RangeType&& Range, PredicateType InPred, const ValueType& InNew) 38 | { 39 | for (auto& Elem : Forward(Range)) 40 | { 41 | if (Invoke(InPred, Elem)) 42 | { 43 | Elem = InNew; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Reverse.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/UnrealTemplate.h" // for Swap 7 | 8 | namespace AlgoImpl 9 | { 10 | template 11 | FORCEINLINE void Reverse(T* Array, int32 ArraySize) 12 | { 13 | for (int32 i = 0, i2 = ArraySize - 1; i < ArraySize / 2 /*rounding down*/; ++i, --i2) 14 | { 15 | Swap(Array[i], Array[i2]); 16 | } 17 | } 18 | } 19 | 20 | namespace Algo 21 | { 22 | /** 23 | * Reverses a range 24 | * 25 | * @param Array The array to reverse. 26 | */ 27 | template 28 | FORCEINLINE void Reverse(T (&Array)[ArraySize]) 29 | { 30 | return AlgoImpl::Reverse((T*)Array, ArraySize); 31 | } 32 | 33 | /** 34 | * Reverses a range 35 | * 36 | * @param Array A pointer to the array to reverse 37 | * @param ArraySize The number of elements in the array. 38 | */ 39 | template 40 | FORCEINLINE void Reverse(T* Array, int32 ArraySize) 41 | { 42 | return AlgoImpl::Reverse(Array, ArraySize); 43 | } 44 | 45 | /** 46 | * Reverses a range 47 | * 48 | * @param Container The container to reverse 49 | */ 50 | template 51 | FORCEINLINE void Reverse(ContainerType& Container) 52 | { 53 | return AlgoImpl::Reverse(Container.GetData(), Container.Num()); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Algo/Rotate.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/UnrealTemplate.h" // For GetData, GetNum, Swap 6 | 7 | 8 | namespace AlgoImpl 9 | { 10 | template 11 | int32 RotateInternal(T* First, int32 Num, int32 Count) 12 | { 13 | if (Count == 0) 14 | { 15 | return Num; 16 | } 17 | 18 | if (Count >= Num) 19 | { 20 | return 0; 21 | } 22 | 23 | T* Iter = First; 24 | T* Mid = First + Count; 25 | T* End = First + Num; 26 | 27 | T* OldMid = Mid; 28 | for (;;) 29 | { 30 | Swap(*Iter++, *Mid++); 31 | if (Mid == End) 32 | { 33 | if (Iter == OldMid) 34 | { 35 | return Num - Count; 36 | } 37 | 38 | Mid = OldMid; 39 | } 40 | else if (Iter == OldMid) 41 | { 42 | OldMid = Mid; 43 | } 44 | } 45 | } 46 | } 47 | 48 | namespace Algo 49 | { 50 | /** 51 | * Rotates a given amount of elements from the front of the range to the end of the range. 52 | * 53 | * @param Range The range to rotate. 54 | * @param Num The number of elements to rotate from the front of the range. 55 | * 56 | * @return The new index of the element that was previously at the start of the range. 57 | */ 58 | template 59 | FORCEINLINE int32 Rotate(RangeType& Range, int32 Count) 60 | { 61 | return AlgoImpl::RotateInternal(GetData(Range), GetNum(Range), Count); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Concepts/EqualityComparable.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/Models.h" 6 | 7 | /** 8 | * Describes a type comparable with another type. 9 | */ 10 | struct CEqualityComparableWith { 11 | template 12 | auto Requires(bool& Result, const T& A, const U& B) -> decltype( 13 | Result = A == B, 14 | Result = B == A, 15 | Result = A != B, 16 | Result = B != A 17 | ); 18 | }; 19 | 20 | /** 21 | * Describes a type comparable with itself. 22 | */ 23 | struct CEqualityComparable { 24 | template 25 | auto Requires() -> decltype( 26 | Refines() 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Concepts/GetTypeHashable.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/TypeHash.h" 7 | 8 | /** 9 | * Describes a type with a GetTypeHash overload. 10 | */ 11 | struct CGetTypeHashable { 12 | template 13 | auto Requires(uint32& Result, const T& Val) -> decltype( 14 | Result = GetTypeHash(Val) 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Concepts/Insertable.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Describes an insertion operation for a destination type where an instance of another type can be inserted via operator<<. 7 | */ 8 | template 9 | struct CInsertable { 10 | template 11 | auto Requires(DestType Dest, T& Val) -> decltype( 12 | Dest << Val 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Concepts/StaticClassProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | struct UClass; 6 | 7 | /** 8 | * Describes a type with a StaticClass (static) member. 9 | */ 10 | struct CStaticClassProvider 11 | { 12 | template 13 | auto Requires(UClass*& ClassRef) -> decltype( 14 | ClassRef = T::StaticClass() 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Concepts/StaticStructProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | struct UScriptStruct; 6 | 7 | /** 8 | * Describes a type with a StaticStruct (static) member. 9 | */ 10 | struct CStaticStructProvider 11 | { 12 | template 13 | auto Requires(UScriptStruct*& StructRef) -> decltype( 14 | StructRef = T::StaticStruct() 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/CoreFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/ContainersFwd.h" 7 | #include "Math/MathFwd.h" 8 | #include "UObject/UObjectHierarchyFwd.h" 9 | 10 | // Basic types 11 | class FName; 12 | class FExec; 13 | class FArchive; 14 | class FOutputDevice; 15 | class FFeedbackContext; 16 | struct FDateTime; 17 | struct FGuid; 18 | 19 | // Math - See Math/MathFwd.h 20 | 21 | // Misc 22 | struct FResourceSizeEx; 23 | class IConsoleVariable; 24 | class FRunnableThread; 25 | class FEvent; 26 | class IPlatformFile; 27 | class FMalloc; 28 | class IFileHandle; 29 | class FAutomationTestBase; 30 | struct FGenericMemoryStats; 31 | class FSHAHash; 32 | class FScriptArray; 33 | class FThreadSafeCounter; 34 | enum class EModuleChangeReason; 35 | struct FManifestContext; 36 | class IConsoleObject; 37 | class FConfigFile; 38 | class FConfigSection; 39 | 40 | // Text 41 | class FText; 42 | class FTextFilterString; 43 | enum class ETextFilterTextComparisonMode : uint8; 44 | enum class ETextFilterComparisonOperation : uint8; 45 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/CoreTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #ifndef WITH_SERVER_CODE 5 | #define WITH_SERVER_CODE 0 6 | #endif 7 | /*---------------------------------------------------------------------------- 8 | Low level includes. 9 | ----------------------------------------------------------------------------*/ 10 | 11 | #ifdef ARK_EXPORTS 12 | #define ARK_API __declspec(dllexport) 13 | #else 14 | #define ARK_API __declspec(dllimport) 15 | #endif 16 | 17 | // IWYU pragma: begin_exports 18 | #include "API/UE/HAL/Platform.h" 19 | #include "API/UE/ProfilingDebugging/UMemoryDefines.h" 20 | #include "API/UE/Misc/CoreMiscDefines.h" 21 | #include "API/UE/Misc/CoreDefines.h" 22 | // IWYU pragma: end_exports 23 | 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Delegates/DelegateMacros.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | //#define UE_DETECT_DELEGATES_RACE_CONDITIONS 1 6 | 7 | #if !defined(UE_DETECT_DELEGATES_RACE_CONDITIONS) 8 | #define UE_DETECT_DELEGATES_RACE_CONDITIONS 0 9 | #endif 10 | 11 | #if UE_DETECT_DELEGATES_RACE_CONDITIONS 12 | #include "Misc/MTAccessDetector.h" 13 | #define UE_DELEGATES_MT_ACCESS_DETECTOR UE_MT_DECLARE_RW_FULLY_RECURSIVE_ACCESS_DETECTOR 14 | #define UE_DELEGATES_MT_SCOPED_WRITE_ACCESS UE_MT_SCOPED_WRITE_ACCESS 15 | #define UE_DELEGATES_MT_SCOPED_READ_ACCESS UE_MT_SCOPED_READ_ACCESS 16 | #else 17 | #define UE_DELEGATES_MT_ACCESS_DETECTOR(...) 18 | #define UE_DELEGATES_MT_SCOPED_WRITE_ACCESS(...) 19 | #define UE_DELEGATES_MT_SCOPED_READ_ACCESS(...) 20 | #endif 21 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Delegates/DelegateSettings.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) 8 | #define USE_DELEGATE_TRYGETBOUNDFUNCTIONNAME 1 9 | #else 10 | #define USE_DELEGATE_TRYGETBOUNDFUNCTIONNAME 0 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/GenericPlatform/Float-to-Half-Conversion.tps: -------------------------------------------------------------------------------- 1 | 2 | 3 | Float to Half Conversion 4 | Engine\Source\Runtime\Core\Public\GenericPlatform 5 | Fast functions to convert between FP32(float) and FP16(half) 6 | https://creativecommons.org/publicdomain/zero/1.0/ 7 | 8 | Licensees 9 | Git 10 | P4 11 | 12 | None 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/GenericPlatform/GenericPlatformCompilerPreSetup.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | 6 | #ifndef PRAGMA_DISABLE_DEPRECATION_WARNINGS 7 | #define PRAGMA_DISABLE_DEPRECATION_WARNINGS 8 | #endif 9 | 10 | #ifndef PRAGMA_ENABLE_DEPRECATION_WARNINGS 11 | #define PRAGMA_ENABLE_DEPRECATION_WARNINGS 12 | #endif 13 | 14 | #ifndef EMIT_CUSTOM_WARNING_AT_LINE 15 | #define EMIT_CUSTOM_WARNING_AT_LINE(Line, Warning) 16 | #endif // EMIT_CUSTOM_WARNING_AT_LINE 17 | 18 | #ifndef EMIT_CUSTOM_WARNING 19 | #define EMIT_CUSTOM_WARNING(Warning) \ 20 | EMIT_CUSTOM_WARNING_AT_LINE(__LINE__, Warning) 21 | #endif // EMIT_CUSTOM_WARNING 22 | 23 | #ifndef UE_DEPRECATED_MACRO 24 | #define UE_DEPRECATED_MACRO(Version, Message) EMIT_CUSTOM_WARNING(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.") 25 | #endif 26 | 27 | #ifndef DEPRECATED_MACRO 28 | #define DEPRECATED_MACRO(Version, Message) UE_DEPRECATED_MACRO(5.1, "The DEPRECATED_MACRO macro has been deprecated in favor of UE_DEPRECATED_MACRO.") UE_DEPRECATED_MACRO(Version, Message) 29 | #endif 30 | 31 | #ifndef PRAGMA_DEFAULT_VISIBILITY_START 32 | #define PRAGMA_DEFAULT_VISIBILITY_START 33 | #endif 34 | 35 | #ifndef PRAGMA_DEFAULT_VISIBILITY_END 36 | #define PRAGMA_DEFAULT_VISIBILITY_END 37 | #endif 38 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/AllowTCHAR.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // This header is expected to be included after HAL/HideTCHAR.h - see the comments in that header 4 | // for more details. 5 | 6 | // HEADER_UNIT_SKIP - Not included directly 7 | 8 | #ifdef UE_HIDETCHAR_INCLUDED 9 | #undef UE_HIDETCHAR_INCLUDED 10 | #else 11 | #error "HAL/AllowTCHAR.h included without a corresponding include of HAL/AllowTCHAR.h - check your includes." 12 | #endif 13 | 14 | #if !defined(UE_HIDETCHAR_INCLUDED_FIRST) 15 | #define UE_HIDETCHAR_INCLUDED_FIRST 16 | 17 | // We want UE_SYSTEM_TCHAR to exist after the first definition of TCHAR - even in 18 | // !PLATFORM_TCHAR_IS_UTF8CHAR mode. 19 | // 20 | // TCHAR is expected to be defined inside the first includes we see being wrapped by our 21 | // HideTCHAR/AllowTCHAR pair, so we will define our type in terms of it, before we undo our hack, 22 | // if it exists. 23 | using UE_SYSTEM_TCHAR = TCHAR; 24 | #endif 25 | 26 | #if PLATFORM_TCHAR_IS_UTF8CHAR 27 | #undef TCHAR 28 | #endif 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/CriticalSection.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(CriticalSection.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/FeedbackContextAnsi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/StringConv.h" 7 | #include "Containers/UnrealString.h" 8 | #include "CoreGlobals.h" 9 | #include "Misc/App.h" 10 | #include "Misc/OutputDeviceConsole.h" 11 | #include "Misc/OutputDeviceHelper.h" 12 | #include "Misc/OutputDeviceRedirector.h" 13 | #include "Misc/FeedbackContext.h" 14 | 15 | class FFeedbackContextAnsi : public FFeedbackContext 16 | { 17 | public: 18 | FContextSupplier* Context = nullptr; 19 | FOutputDevice* AuxOut = nullptr; 20 | 21 | static void LocalPrint(const TCHAR* Str); 22 | 23 | void Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const FName& Category) override; 24 | void Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const FName& Category, double Time) override; 25 | void SerializeRecord(const UE::FLogRecord& Record) override; 26 | 27 | bool YesNof(const FText& Question) override; 28 | 29 | FContextSupplier* GetContext() const override { return Context; } 30 | void SetContext(FContextSupplier* InContext) override { Context = InContext; } 31 | 32 | private: 33 | bool IsUsingLocalPrint() const; 34 | }; 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/HideTCHAR.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // When third parties includes define or reference the 'system' TCHAR, it will clash with our 4 | // typedef in Platform.h when we're compiling in PLATFORM_TCHAR_IS_UTF8CHAR mode. 5 | // 6 | // By including this header before any third party include that refers to TCHAR, we will force 7 | // those headers to refer to that symbol instead. After those includes, "HAL/AllowTCHAR.h" should 8 | // be included, e.g.: 9 | // 10 | // #include "HAL/HideTCHAR.h" 11 | // #include 12 | // #include 13 | // #include "HAL/AllowTCHAR.h" 14 | // 15 | // Linking shouldn't be affected by this 'override' because the UE_SYSTEM_TCHAR type will mangle 16 | // in the same way. 17 | // 18 | // Preprocessor pasting of the token will be affected but that is rare and will need a bespoke 19 | // solution. 20 | // 21 | // If we ever need to deliberately refer to the system TCHAR rather than our Platform.h TCHAR, we 22 | // can use the UE_SYSTEM_TCHAR type instead. 23 | 24 | // HEADER_UNIT_SKIP - Not included directly 25 | 26 | #ifndef UE_HIDETCHAR_INCLUDED 27 | #define UE_HIDETCHAR_INCLUDED 28 | #else 29 | #error "HAL/HideTCHAR.h is being multiply included - an include of HAL/AllowTCHAR.h is likely missing." 30 | #endif 31 | 32 | #if PLATFORM_TCHAR_IS_UTF8CHAR 33 | // Override the TCHAR name. 34 | #define TCHAR UE_SYSTEM_TCHAR 35 | #endif 36 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/IPlatformFileModule.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "CoreFwd.h" 7 | #include "Modules/ModuleInterface.h" 8 | 9 | /** 10 | * Platform File Module Interface 11 | */ 12 | class IPlatformFileModule 13 | : public IModuleInterface 14 | { 15 | public: 16 | 17 | /** 18 | * Creates a platform file instance. 19 | * 20 | * @return Platform file instance. 21 | */ 22 | virtual IPlatformFile* GetPlatformFile() = 0; 23 | }; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/LowLevelMemTrackerDefines.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // This header configures the compile-time settings used by LLM, based on defines from the compilation environment. 6 | // This header can be read from c code, so it should not include any c++ code, or any headers that include c++ code. 7 | 8 | #include "Misc/Build.h" 9 | 10 | #ifndef ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST 11 | #define ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST 0 12 | #endif 13 | 14 | // LLM_ENABLED_IN_CONFIG can be defined here or in the build environment only. 15 | // It cannot be defined in platform header files because it is included in c-language compilation units that 16 | // cannot include those headers. 17 | // When locally instrumenting, add your own definition of LLM_ENABLED_IN_CONFIG in build environment or this header. 18 | 19 | #ifndef LLM_ENABLED_IN_CONFIG 20 | #define LLM_ENABLED_IN_CONFIG ( \ 21 | !UE_BUILD_SHIPPING && (!UE_BUILD_TEST || ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST) && \ 22 | WITH_ENGINE \ 23 | ) 24 | #endif 25 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/MallocAnsi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/MemoryBase.h" 7 | #include "HAL/UnrealMemory.h" 8 | 9 | void* AnsiMalloc(SIZE_T Size, uint32 Alignment); 10 | void* AnsiRealloc(void* Ptr, SIZE_T NewSize, uint32 Alignment); 11 | void AnsiFree(void* Ptr); 12 | 13 | // 14 | // ANSI C memory allocator. 15 | // 16 | class FMallocAnsi final 17 | : public FMalloc 18 | { 19 | 20 | public: 21 | /** 22 | * Constructor enabling low fragmentation heap on platforms supporting it. 23 | */ 24 | FMallocAnsi(); 25 | 26 | // FMalloc interface. 27 | virtual void* Malloc( SIZE_T Size, uint32 Alignment ) override; 28 | 29 | virtual void* TryMalloc(SIZE_T Size, uint32 Alignment) override; 30 | 31 | virtual void* Realloc( void* Ptr, SIZE_T NewSize, uint32 Alignment ) override; 32 | 33 | virtual void* TryRealloc(void* Ptr, SIZE_T NewSize, uint32 Alignment) override; 34 | 35 | virtual void Free( void* Ptr ) override; 36 | 37 | virtual bool GetAllocationSize(void *Original, SIZE_T &SizeOut) override; 38 | 39 | /** 40 | * Returns if the allocator is guaranteed to be thread-safe and therefore 41 | * doesn't need a unnecessary thread-safety wrapper around it. 42 | * 43 | * @return true as we're using system allocator 44 | */ 45 | virtual bool IsInternallyThreadSafe() const override; 46 | 47 | /** 48 | * Validates the allocator's heap 49 | */ 50 | virtual bool ValidateHeap() override; 51 | 52 | virtual const TCHAR* GetDescriptiveName() override { return TEXT("ANSI"); } 53 | }; 54 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/MallocTBB.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/MemoryBase.h" 7 | #include "HAL/PlatformMemory.h" 8 | 9 | #define TBBMALLOC_ENABLED PLATFORM_SUPPORTS_TBB && TBB_ALLOCATOR_ALLOWED 10 | 11 | #if TBBMALLOC_ENABLED 12 | 13 | /** 14 | * TBB 64-bit scalable memory allocator. 15 | */ 16 | class FMallocTBB final 17 | : public FMalloc 18 | { 19 | public: 20 | // FMalloc interface. 21 | 22 | virtual void* Malloc(SIZE_T Size, uint32 Alignment) override; 23 | virtual void* TryMalloc(SIZE_T Size, uint32 Alignment) override; 24 | virtual void* Realloc(void* Ptr, SIZE_T NewSize, uint32 Alignment) override; 25 | virtual void* TryRealloc(void* Ptr, SIZE_T NewSize, uint32 Alignment) override; 26 | virtual void Free( void* Ptr ) override; 27 | virtual bool GetAllocationSize( void *Original, SIZE_T &SizeOut ) override; 28 | virtual void Trim(bool bTrimThreadCaches) override; 29 | 30 | virtual bool IsInternallyThreadSafe( ) const override 31 | { 32 | return true; 33 | } 34 | 35 | virtual const TCHAR* GetDescriptiveName( ) override 36 | { 37 | return TEXT("TBB"); 38 | } 39 | 40 | protected: 41 | 42 | void OutOfMemory( uint64 Size, uint32 Alignment ) 43 | { 44 | // this is expected not to return 45 | FPlatformMemory::OnOutOfMemory(Size, Alignment); 46 | } 47 | }; 48 | 49 | #endif // TBBMALLOC_ENABLED -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/OutputDevices.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/PlatformMath.h" 6 | #include "HAL/MemoryBase.h" 7 | #include "HAL/PlatformMisc.h" 8 | #include "HAL/UnrealMemory.h" 9 | #include "HAL/PlatformString.h" 10 | #include "HAL/PlatformProperties.h" 11 | #include "HAL/PlatformProcess.h" 12 | #include "Logging/LogCategory.h" 13 | #include "Logging/LogSuppressionInterface.h" 14 | #include "CoreGlobals.h" 15 | #include "Logging/LogScopedVerbosityOverride.h" 16 | #include "Logging/LogScopedCategoryAndVerbosityOverride.h" 17 | 18 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformAffinity.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformAffinity.h) 8 | 9 | struct FThreadAffinity 10 | { 11 | uint64 ThreadAffinityMask = FPlatformAffinity::GetNoAffinityMask(); 12 | uint16 ProcessorGroup = 0; 13 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformAtomics.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "GenericPlatform/GenericPlatformAtomics.h" 7 | 8 | #include COMPILED_PLATFORM_HEADER(PlatformAtomics.h) 9 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformCrashContext.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include COMPILED_PLATFORM_HEADER(PlatformCrashContext.h) 7 | 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformCrt.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // IWYU pragma: begin_exports 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | // IWYU pragma: end_exports 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformFile.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "GenericPlatform/GenericPlatformFile.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformFile.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformIncludes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Misc/MonolithicHeaderBoilerplate.h" 6 | MONOLITHIC_HEADER_BOILERPLATE() 7 | 8 | // All the different platform-specific includes 9 | #include "HAL/PlatformCrt.h" 10 | #include "HAL/PlatformMemory.h" 11 | #include "HAL/PlatformString.h" 12 | #include "HAL/PlatformMisc.h" 13 | #include "HAL/PlatformStackWalk.h" 14 | #include "HAL/PlatformMath.h" 15 | #include "HAL/PlatformNamedPipe.h" 16 | #include "HAL/PlatformTime.h" 17 | #include "HAL/PlatformProcess.h" 18 | #include "HAL/CriticalSection.h" 19 | #include "HAL/PlatformAtomics.h" 20 | #include "HAL/PlatformTLS.h" 21 | #include "HAL/PlatformFile.h" 22 | #include "HAL/PlatformAffinity.h" 23 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformMallocCrash.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include "GenericPlatform/GenericPlatformMallocCrash.h" 7 | 8 | #if PLATFORM_USES_STACKBASED_MALLOC_CRASH 9 | typedef FGenericStackBasedMallocCrash FPlatformMallocCrash; 10 | #else 11 | typedef FGenericPlatformMallocCrash FPlatformMallocCrash; 12 | #endif 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformMath.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "GenericPlatform/GenericPlatformMath.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformMath.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformMemory.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "GenericPlatform/GenericPlatformMemory.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformMemory.h) 8 | 9 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformMemoryHelpers.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "HAL/PlatformMemory.h" 5 | 6 | namespace PlatformMemoryHelpers 7 | { 8 | 9 | //@return platform specific current memory statistics - caches value for same frame to avoid repeated costly platform calls. 10 | FPlatformMemoryStats GetFrameMemoryStats(); 11 | } -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformNamedPipe.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #if PLATFORM_WINDOWS 7 | #include "Windows/WindowsPlatformNamedPipe.h" 8 | #else 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformOutputDevices.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include COMPILED_PLATFORM_HEADER(PlatformOutputDevices.h) 7 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformProcess.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformProcess.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformProperties.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "GenericPlatform/GenericPlatformProperties.h" 6 | 7 | // note that this is not defined to 1 like normal, because we don't want to have to define it to 0 whenever 8 | // the Properties.h files are included in all other places, so just use #ifdef not #if in this special case 9 | #define PROPERTY_HEADER_SHOULD_DEFINE_TYPE 10 | 11 | #include COMPILED_PLATFORM_HEADER(PlatformProperties.h) 12 | 13 | #undef PROPERTY_HEADER_SHOULD_DEFINE_TYPE 14 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformStackWalk.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include COMPILED_PLATFORM_HEADER(PlatformStackWalk.h) 7 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformString.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include COMPILED_PLATFORM_HEADER(PlatformString.h) 7 | 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformTLS.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "GenericPlatform/GenericPlatformTLS.h" 7 | 8 | #include COMPILED_PLATFORM_HEADER(PlatformTLS.h) 9 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/PlatformTime.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(PlatformTime.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/ThreadSafeBool.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/ThreadSafeCounter.h" 7 | 8 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // DEPRECATED. Please use `std::atomic` 10 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | 12 | /** 13 | * Thread safe bool, wraps FThreadSafeCounter 14 | */ 15 | class FThreadSafeBool 16 | : private FThreadSafeCounter 17 | { 18 | public: 19 | /** 20 | * Constructor optionally takes value to initialize with, otherwise initializes false 21 | * @param bValue Value to initialize with 22 | */ 23 | FThreadSafeBool(bool bValue = false) 24 | : FThreadSafeCounter(bValue ? 1 : 0) 25 | {} 26 | 27 | /** 28 | * Operator to use this struct as a bool with thread safety 29 | */ 30 | FORCEINLINE operator bool() const 31 | { 32 | return GetValue() != 0; 33 | } 34 | 35 | /** 36 | * Operator to set the bool value with thread safety 37 | */ 38 | FORCEINLINE bool operator=(bool bNewValue) 39 | { 40 | Set(bNewValue ? 1 : 0); 41 | return bNewValue; 42 | } 43 | 44 | /** 45 | * Sets a new value atomically, and returns the old value. 46 | * 47 | * @param bNewValue Value to set 48 | * @return The old value 49 | */ 50 | FORCEINLINE bool AtomicSet(bool bNewValue) 51 | { 52 | return Set(bNewValue ? 1 : 0) != 0; 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/ThreadingBase.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/CriticalSection.h" 6 | #include "HAL/Event.h" 7 | #include "HAL/MemoryBase.h" 8 | #include "HAL/PlatformAffinity.h" 9 | #include "HAL/PlatformAtomics.h" 10 | #include "HAL/PlatformCrt.h" 11 | #include "HAL/PlatformMath.h" 12 | #include "HAL/PlatformMemory.h" 13 | #include "HAL/PlatformMisc.h" 14 | #include "HAL/PlatformProperties.h" 15 | #include "HAL/PlatformString.h" 16 | #include "HAL/PlatformTLS.h" 17 | #include "HAL/Runnable.h" 18 | #include "HAL/RunnableThread.h" 19 | #include "HAL/ThreadManager.h" 20 | #include "HAL/ThreadSafeBool.h" 21 | #include "HAL/ThreadSafeCounter.h" 22 | #include "HAL/ThreadSafeCounter64.h" 23 | #include "HAL/ThreadSingleton.h" 24 | #include "HAL/TlsAutoCleanup.h" 25 | #include "HAL/UnrealMemory.h" 26 | #include "Misc/IQueuedWork.h" 27 | #include "Misc/NoopCounter.h" 28 | #include "Misc/QueuedThreadPool.h" 29 | #include "Misc/ScopeLock.h" 30 | #include "Misc/ScopedEvent.h" 31 | #include "Misc/SingleThreadEvent.h" 32 | #include "Misc/SingleThreadRunnable.h" 33 | #include "Templates/Function.h" 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/TlsAutoCleanup.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | Base class for objects in TLS that support auto-cleanup. 9 | Polymorphically deletes registered instances on thread exit. 10 | */ 11 | class FTlsAutoCleanup 12 | { 13 | public: 14 | /** Virtual destructor. */ 15 | virtual ~FTlsAutoCleanup() 16 | {} 17 | 18 | /** Register this instance to be auto-cleanup. */ 19 | void Register(); 20 | }; 21 | 22 | /** Wrapper for values to be stored in TLS that support auto-cleanup. */ 23 | template< class T > 24 | class TTlsAutoCleanupValue 25 | : public FTlsAutoCleanup 26 | { 27 | public: 28 | 29 | /** Constructor. */ 30 | TTlsAutoCleanupValue(const T& InValue) 31 | : Value(InValue) 32 | { } 33 | 34 | /** Gets the value. */ 35 | T Get() const 36 | { 37 | return Value; 38 | } 39 | 40 | /* Sets the value. */ 41 | void Set(const T& InValue) 42 | { 43 | Value = InValue; 44 | } 45 | 46 | /* Sets the value. */ 47 | void Set(T&& InValue) 48 | { 49 | Value = MoveTemp(InValue); 50 | } 51 | 52 | private: 53 | 54 | /** The value. */ 55 | T Value; 56 | }; 57 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/HAL/UESemaphore.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | #include COMPILED_PLATFORM_HEADER(Semaphore.h) 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Hash/CityHash.tps: -------------------------------------------------------------------------------- 1 | 2 | 3 | CityHash 4 | /Engine/Source/Runtime/Core/ 5 | Is a high quality and fast Hashfunction that performs reasonably well across all platforms. Used as input for hash-tables to improve performance by decreasing collision rate. 6 | https://github.com/google/cityhash/blob/master/COPYING 7 | 8 | Licensees 9 | P4 10 | Github 11 | 12 | /Engine/Source/ThirdParty/Licenses/CityHash_License.txt 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Hash/CityHashHelpers.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CityHash.h" 6 | 7 | template 8 | uint64 AppendCityHash(const T& Value, uint64 Seed) 9 | { 10 | return CityHash64WithSeed((const char*)&Value, sizeof(Value), Seed); 11 | } 12 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Internationalization/CulturePointer.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Templates/SharedPointer.h" 6 | 7 | class FCulture; 8 | 9 | typedef TSharedPtr FCulturePtr; 10 | typedef TSharedRef FCultureRef; 11 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Internationalization/ITextData.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Internationalization/TextLocalizationManager.h" 7 | 8 | class FTextHistory; 9 | 10 | /** 11 | * Interface to the internal data for an FText. 12 | */ 13 | class ITextData 14 | { 15 | public: 16 | virtual ~ITextData() = default; 17 | 18 | /** 19 | * Get the source string for this text. 20 | */ 21 | virtual const FString& GetSourceString() const = 0; 22 | 23 | /** 24 | * Get the string to use for display purposes. 25 | * This may be a shared display string from the localization manager, or may been generated at runtime. 26 | */ 27 | virtual const FString& GetDisplayString() const = 0; 28 | 29 | /** 30 | * Get the shared display string (if any). 31 | */ 32 | virtual FTextConstDisplayStringPtr GetLocalizedString() const = 0; 33 | 34 | /** 35 | * Get the global history revision associated with this text instance. 36 | */ 37 | virtual uint16 GetGlobalHistoryRevision() const = 0; 38 | 39 | /** 40 | * Get the local history revision associated with this text instance. 41 | */ 42 | virtual uint16 GetLocalHistoryRevision() const = 0; 43 | 44 | /** 45 | * Get the history associated with this text instance. 46 | */ 47 | virtual const FTextHistory& GetTextHistory() const = 0; 48 | 49 | /** 50 | * Get a mutable reference to the history associated with this text instance (used when loading/saving text). 51 | */ 52 | virtual FTextHistory& GetMutableTextHistory() = 0; 53 | }; 54 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Internationalization/LocTesting.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Misc/Build.h" 6 | 7 | #ifndef ENABLE_LOC_TESTING 8 | #define ENABLE_LOC_TESTING (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT || UE_BUILD_TEST) 9 | #endif 10 | 11 | static_assert(!ENABLE_LOC_TESTING || !UE_BUILD_SHIPPING, "ENABLE_LOC_TESTING can never be enabled in shipping builds"); 12 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Internationalization/TextComparison.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/UnrealString.h" 7 | 8 | namespace ETextComparisonLevel 9 | { 10 | enum Type 11 | { 12 | Default, // Locale-specific Default 13 | Primary, // Base 14 | Secondary, // Accent 15 | Tertiary, // Case 16 | Quaternary, // Punctuation 17 | Quinary // Identical 18 | }; 19 | } 20 | 21 | /** 22 | * Utility for performing low-level text comparison. 23 | * The implementation can be found in LegacyText.cpp and ICUText.cpp. 24 | */ 25 | class FTextComparison 26 | { 27 | public: 28 | static int32 CompareTo(const FString& A, const FString& B, const ETextComparisonLevel::Type ComparisonLevel = ETextComparisonLevel::Default); 29 | static int32 CompareToCaseIgnored(const FString& A, const FString& B); 30 | 31 | static bool EqualTo(const FString& A, const FString& B, const ETextComparisonLevel::Type ComparisonLevel = ETextComparisonLevel::Default); 32 | static bool EqualToCaseIgnored(const FString& A, const FString& B); 33 | }; 34 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Internationalization/TextNamespaceFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | // USE_STABLE_LOCALIZATION_KEYS controls whether we attempt to keep localization keys stable when editing text properties. 8 | // This requires WITH_EDITORONLY_DATA, but can also be optionally disabled in editor builds by changing its value to 0. 9 | #if WITH_EDITORONLY_DATA 10 | #define USE_STABLE_LOCALIZATION_KEYS (1) 11 | #else // WITH_EDITORONLY_DATA 12 | #define USE_STABLE_LOCALIZATION_KEYS (0) 13 | #endif // WITH_EDITORONLY_DATA 14 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/MSVC/MSVCPlatform.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | /*================================================================================ 4 | MSVCPlatform.h: Setup for any MSVC-using platform 5 | ==================================================================================*/ 6 | 7 | #pragma once 8 | 9 | // HEADER_UNIT_SKIP - Not included directly 10 | 11 | #if _MSC_VER < 1920 12 | #error "Compiler is expected to support if constexpr" 13 | #endif 14 | 15 | #if defined(__cpp_fold_expressions) 16 | #define PLATFORM_COMPILER_HAS_FOLD_EXPRESSIONS 1 17 | #else 18 | #error "Compiler is expected to support fold expressions" 19 | #endif 20 | 21 | #define PLATFORM_RETURN_ADDRESS() _ReturnAddress() 22 | #define PLATFORM_RETURN_ADDRESS_POINTER() _AddressOfReturnAddress() 23 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/ApproximatingSine()CurvesSnippets.tps: -------------------------------------------------------------------------------- 1 |  2 | 3 | approximating sine() curves snippets 4 | /Engine/Source/Runtime/Core/Public/Math/ 5 | 2016-06-07T15:56:53.2256443-04:00 6 | Just a series of forum posts discussing an approach to approximating sine() curves 7 | Some including code snippets that formed the basis of my implementation. Nothing used verbatim. 8 | http://forum.devmaster.net/tos 9 | 10 | Licensees 11 | Git 12 | P4 13 | 14 | None 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/Axis.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | // Generic axis enum (mirrored for property use in Object.h) 8 | namespace EAxis 9 | { 10 | enum Type 11 | { 12 | None, 13 | X, 14 | Y, 15 | Z, 16 | }; 17 | } 18 | 19 | 20 | // Extended axis enum for more specialized usage 21 | namespace EAxisList 22 | { 23 | enum Type 24 | { 25 | None = 0, 26 | X = 1, 27 | Y = 2, 28 | Z = 4, 29 | 30 | Screen = 8, 31 | XY = X | Y, 32 | XZ = X | Z, 33 | YZ = Y | Z, 34 | XYZ = X | Y | Z, 35 | All = XYZ | Screen, 36 | 37 | //alias over Axis YZ since it isn't used when the z-rotation widget is being used 38 | ZRotation = YZ, 39 | 40 | // alias over Screen since it isn't used when the 2d translate rotate widget is being used 41 | Rotate2D = Screen, 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/Edge.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Math/Vector.h" 7 | 8 | /** 9 | * Implements an edge consisting of two vertices. 10 | */ 11 | struct FEdge 12 | { 13 | /** Holds the edge vertices. */ 14 | FVector Vertex[2]; 15 | 16 | /** Holds a temporary variable used when creating arrays of unique edges. */ 17 | int32 Count; 18 | 19 | public: 20 | 21 | /** Default constructor (no initialization). */ 22 | FEdge () { } 23 | 24 | /** 25 | * Creates and initializes a new edge from two vertices. 26 | * 27 | * @param V1 The first vertex. 28 | * @param V2 The second vertex. 29 | */ 30 | FEdge (FVector V1, FVector V2) 31 | { 32 | Vertex[0] = V1; 33 | Vertex[1] = V2; 34 | Count = 0; 35 | } 36 | 37 | public: 38 | 39 | /** 40 | * Compares this edge with another. 41 | * 42 | * @param E The other edge. 43 | * @return true if the two edges are identical, false otherwise. 44 | */ 45 | bool operator== (const FEdge& E) const 46 | { 47 | return (((E.Vertex[0] == Vertex[0]) && (E.Vertex[1] == Vertex[1])) || ((E.Vertex[0] == Vertex[1]) && (E.Vertex[1] == Vertex[0]))); 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/Float16.tps: -------------------------------------------------------------------------------- 1 | 2 | 3 | float to half variants 4 | /Engine/Source/Runtime/Core/Public/Math/Float16.h 5 | Handles denormalized values (the smallest values the format can express) whenever converting a 32 bit floating point to a 16 bit floating point. 6 | https://gist.github.com/rygorous/2156668#file-gistfile1-cpp-L215-L221 7 | 8 | Licensees 9 | Git 10 | P4 11 | 12 | None 13 | 14 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/Float32.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * 32 bit float components 9 | */ 10 | class FFloat32 11 | { 12 | public: 13 | 14 | union 15 | { 16 | struct 17 | { 18 | #if PLATFORM_LITTLE_ENDIAN 19 | uint32 Mantissa : 23; 20 | uint32 Exponent : 8; 21 | uint32 Sign : 1; 22 | #else 23 | uint32 Sign : 1; 24 | uint32 Exponent : 8; 25 | uint32 Mantissa : 23; 26 | #endif 27 | } Components; 28 | 29 | float FloatValue; 30 | }; 31 | 32 | /** 33 | * Constructor 34 | * 35 | * @param InValue value of the float. 36 | */ 37 | FFloat32(float InValue = 0.0f); 38 | }; 39 | 40 | 41 | FORCEINLINE FFloat32::FFloat32(float InValue) 42 | : FloatValue(InValue) 43 | { } 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/Halton.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | 8 | /** [ Halton 1964, "Radical-inverse quasi-random point sequence" ] */ 9 | inline float Halton(int32 Index, int32 Base) 10 | { 11 | float Result = 0.0f; 12 | float InvBase = 1.0f / float(Base); 13 | float Fraction = InvBase; 14 | while (Index > 0) 15 | { 16 | Result += float(Index % Base) * Fraction; 17 | Index /= Base; 18 | Fraction *= InvBase; 19 | } 20 | return Result; 21 | } 22 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/StatisticalFloat.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/AssertionMacros.h" 7 | #include "Math/UnrealMathUtility.h" 8 | 9 | // Used to measure a distribution 10 | template 11 | struct FStatisticalValue 12 | { 13 | public: 14 | FStatisticalValue() 15 | : MinValue() 16 | , MaxValue() 17 | , Accumulator() 18 | , NumSamples() 19 | { 20 | } 21 | 22 | void AddSample(T Value) 23 | { 24 | if (NumSamples == 0) 25 | { 26 | MinValue = MaxValue = Value; 27 | } 28 | else 29 | { 30 | MinValue = FMath::Min(MinValue, Value); 31 | MaxValue = FMath::Max(MaxValue, Value); 32 | } 33 | Accumulator += Value; 34 | ++NumSamples; 35 | } 36 | 37 | T GetMinValue() const 38 | { 39 | return MinValue; 40 | } 41 | 42 | T GetMaxValue() const 43 | { 44 | return MaxValue; 45 | } 46 | 47 | T GetAvgValue() const 48 | { 49 | return (NumSamples > 0) ? (Accumulator / (double)NumSamples) : T(); 50 | } 51 | 52 | int32 GetCount() const 53 | { 54 | return NumSamples; 55 | } 56 | 57 | private: 58 | T MinValue; 59 | T MaxValue; 60 | T Accumulator; 61 | int32 NumSamples; 62 | }; 63 | 64 | typedef FStatisticalValue FStatisticalFloat; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/TranslationMatrix.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Math/Vector.h" 7 | #include "Math/Plane.h" 8 | #include "Math/Matrix.h" 9 | 10 | namespace UE { 11 | namespace Math { 12 | 13 | template 14 | struct TTranslationMatrix 15 | : public TMatrix 16 | { 17 | public: 18 | 19 | /** Constructor translation matrix based on given vector */ 20 | TTranslationMatrix(const TVector& Delta); 21 | 22 | // Conversion to other type. 23 | template)> 24 | explicit TTranslationMatrix(const TTranslationMatrix& From) : TMatrix(From) {} 25 | 26 | /** Matrix factory. Return an FMatrix so we don't have type conversion issues in expressions. */ 27 | static TMatrix Make(TVector const& Delta) 28 | { 29 | return TTranslationMatrix(Delta); 30 | } 31 | }; 32 | 33 | template 34 | FORCEINLINE TTranslationMatrix::TTranslationMatrix(const TVector& Delta) 35 | : TMatrix( 36 | TPlane(1.0f, 0.0f, 0.0f, 0.0f), 37 | TPlane(0.0f, 1.0f, 0.0f, 0.0f), 38 | TPlane(0.0f, 0.0f, 1.0f, 0.0f), 39 | TPlane(Delta.X, Delta.Y,Delta.Z,1.0f) 40 | ) 41 | { } 42 | 43 | } // namespace Math 44 | } // namespace UE 45 | 46 | UE_DECLARE_LWC_TYPE(TranslationMatrix, 44); 47 | 48 | template<> struct TIsUECoreVariant { enum { Value = true }; }; 49 | template<> struct TIsUECoreVariant { enum { Value = true }; }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Math/UnrealMath.tps: -------------------------------------------------------------------------------- 1 |  2 | 3 | Code Snippet - Arvo's Algorithm 4 | /Engine/Source/Runtime/Core/Public/Math/UnrealMath.h 5 | 2016-06-07T18:45:10.598967-04:00 6 | Used for quick AABB vs. sphere collision 7 | Used for quick AABB vs. sphere collision 8 | http://www.gamasutra.com/features/19991018/Gomez_4.htm 9 | 10 | Licensees 11 | Git 12 | P4 13 | 14 | None 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/AllowMicrosoftPlatformAtomics.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #if PLATFORM_WINDOWS 4 | #include "Windows/AllowWindowsPlatformAtomics.h" 5 | #else 6 | #include "Microsoft/AllowMicrosoftPlatformAtomicsPrivate.h" 7 | #endif 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/AllowMicrosoftPlatformTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "HAL/Platform.h" 4 | 5 | #if PLATFORM_WINDOWS 6 | #include "Windows/AllowWindowsPlatformTypes.h" 7 | #else 8 | #include "Microsoft/AllowMicrosoftPlatformTypesPrivate.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/HideMicrosoftPlatformAtomics.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // HEADER_UNIT_SKIP - Not included directly 4 | 5 | #if PLATFORM_WINDOWS 6 | #include "Windows/HideWindowsPlatformAtomics.h" 7 | #else 8 | #include "Microsoft/HideMicrosoftPlatformAtomicsPrivate.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/HideMicrosoftPlatformTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // HEADER_UNIT_SKIP - Not included directly 4 | 5 | #if PLATFORM_WINDOWS 6 | #include "Windows/HideWindowsPlatformTypes.h" 7 | #else 8 | #include "Microsoft/HideMicrosoftPlatformTypesPrivate.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/MicrosoftPlatformCrashContext.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "GenericPlatform/GenericPlatformCrashContext.h" 7 | 8 | struct FMicrosoftPlatformCrashContext : public FGenericCrashContext 9 | { 10 | FMicrosoftPlatformCrashContext(ECrashContextType InType, const TCHAR* InErrorMessage) 11 | : FGenericCrashContext(InType, InErrorMessage) 12 | { 13 | } 14 | 15 | void CaptureAllThreadContexts(); 16 | 17 | virtual void SetPortableCallStack(const uint64* StackTrace, int32 StackTraceDepth) override; 18 | virtual void AddPortableThreadCallStack(uint32 ThreadId, const TCHAR* ThreadName, const uint64* StackFrames, int32 NumStackFrames) override; 19 | 20 | protected: 21 | // Helpers 22 | typedef TArray> FModuleHandleArray; 23 | 24 | static void GetProcModuleHandles(const FProcHandle& Process, FModuleHandleArray& OutHandles); 25 | 26 | static void ConvertProgramCountersToStackFrames( 27 | const FProcHandle& Process, 28 | const FModuleHandleArray& SortedModuleHandles, 29 | const uint64* ProgramCounters, 30 | int32 NumPCs, 31 | TArray& OutStackFrames); 32 | 33 | virtual bool GetPlatformAllThreadContextsString(FString& OutStr) const override; 34 | 35 | static void AddThreadContextString( 36 | uint32 CrashedThreadId, 37 | uint32 ThreadId, 38 | const FString& ThreadName, 39 | const TArray& StackFrames, 40 | FString& OutStr); 41 | 42 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/MicrosoftPlatformStackWalk.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "GenericPlatform/GenericPlatformStackWalk.h" 7 | 8 | /** 9 | * Microsoft-shared implementation of the stack walking. 10 | **/ 11 | struct FMicrosoftPlatformStackWalk 12 | : public FGenericPlatformStackWalk 13 | { 14 | 15 | protected: 16 | // Extract debug info for a module from the module header in memory. 17 | // Can directly read the information even when the current target can't load the symbols itself or use certain DbgHelp APIs. 18 | static bool ExtractInfoFromModule(void* ProcessHandle, void* ModuleHandle, FStackWalkModuleInfo& OutInfo); 19 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/MinWindows.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #if PLATFORM_WINDOWS 5 | #include "Windows/MinWindows.h" 6 | #else 7 | #include "Microsoft/MinWindowsPrivate.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/PostWindowsApi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // HEADER_UNIT_SKIP - Not included directly 4 | 5 | #if PLATFORM_WINDOWS 6 | #include "Windows/PostWindowsApi.h" 7 | #else 8 | #include "Microsoft/PostWindowsApiPrivate.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/PreWindowsApi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "HAL/Platform.h" 4 | 5 | #if PLATFORM_WINDOWS 6 | #include "Windows/PreWindowsApi.h" 7 | #else 8 | #include "Microsoft/PreWindowsApiPrivate.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Microsoft/WindowsHWrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "HAL/Platform.h" 5 | 6 | #if PLATFORM_WINDOWS 7 | #include "Windows/WindowsHWrapper.h" 8 | #else 9 | #include "Microsoft/WindowsHWrapperPrivate.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/AccessDetection.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/EnumClassFlags.h" 7 | 8 | namespace UE { namespace AccessDetection { 9 | 10 | enum class EType : uint32 11 | { 12 | None = 0, 13 | File = 1 << 0, 14 | Ini = 1 << 1, 15 | CVar = 1 << 2, 16 | }; 17 | ENUM_CLASS_FLAGS(EType); 18 | 19 | #if WITH_EDITOR 20 | 21 | class FScope; 22 | 23 | namespace Private 24 | { 25 | extern volatile int32 GNumLiveScopes; 26 | 27 | void ReportCurrentThreadAccess(EType Type); 28 | void SetCurrentThreadScope(FScope* Scope); 29 | } 30 | 31 | FORCEINLINE void ReportAccess(EType Type) 32 | { 33 | // Note unsynchronized access is fine - we only need to see writes by current thread 34 | if (Private::GNumLiveScopes > 0) 35 | { 36 | Private::ReportCurrentThreadAccess(Type); 37 | } 38 | } 39 | 40 | /** Detects access to global core systems while running deterministic code that should be isolated from the local environment */ 41 | class FScope 42 | { 43 | public: 44 | FScope() { Private::SetCurrentThreadScope(this); } 45 | ~FScope() { Private::SetCurrentThreadScope(nullptr); } 46 | 47 | void AddAccess(EType Type) { AccessedTypes |= Type; } 48 | EType GetAccesses() const { return AccessedTypes; } 49 | 50 | private: 51 | EType AccessedTypes = EType::None; 52 | }; 53 | 54 | #else 55 | 56 | FORCEINLINE void ReportAccess(EType Type) {} 57 | 58 | #endif 59 | 60 | }} -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/ArchiveMD5.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/UnrealString.h" 6 | #include "CoreMinimal.h" 7 | #include "HAL/Platform.h" 8 | #include "Misc/AssertionMacros.h" 9 | #include "Misc/SecureHash.h" 10 | #include "Serialization/Archive.h" 11 | #include "UObject/NameTypes.h" 12 | 13 | /** 14 | * FArchive adapter for FMD5 15 | */ 16 | class FArchiveMD5 : public FArchive 17 | { 18 | public: 19 | inline FArchiveMD5() 20 | { 21 | SetIsLoading(false); 22 | SetIsSaving(true); 23 | SetIsPersistent(false); 24 | } 25 | 26 | virtual FString GetArchiveName() const; 27 | 28 | void Serialize(void* Data, int64 Num) override 29 | { 30 | MD5.Update((uint8*)Data, Num); 31 | } 32 | 33 | using FArchive::operator<<; 34 | 35 | virtual FArchive& operator<<(class FName& Value) override 36 | { 37 | FString NameAsString = Value.ToString(); 38 | *this << NameAsString; 39 | return *this; 40 | } 41 | 42 | virtual FArchive& operator<<(struct UObject*& Value) override 43 | { 44 | check(0); 45 | return *this; 46 | } 47 | 48 | void GetHash(FMD5Hash& Hash) 49 | { 50 | Hash.Set(MD5); 51 | } 52 | 53 | protected: 54 | FMD5 MD5; 55 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/AutomationEvent.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/DateTime.h" 7 | #include "Misc/Guid.h" 8 | 9 | enum class EAutomationEventType : uint8 10 | { 11 | Info, 12 | Warning, 13 | Error 14 | }; 15 | 16 | struct FAutomationEvent 17 | { 18 | public: 19 | FAutomationEvent(EAutomationEventType InType, const FString& InMessage) 20 | : Type(InType) 21 | , Message(InMessage) 22 | , Context() 23 | { 24 | } 25 | 26 | FAutomationEvent(EAutomationEventType InType, const FString& InMessage, const FString& InContext) 27 | : Type(InType) 28 | , Message(InMessage) 29 | , Context(InContext) 30 | { 31 | } 32 | 33 | public: 34 | 35 | EAutomationEventType Type; 36 | FString Message; 37 | FString Context; 38 | FGuid Artifact; 39 | }; 40 | 41 | struct FAutomationExecutionEntry 42 | { 43 | FAutomationEvent Event; 44 | FString Filename; 45 | int32 LineNumber; 46 | FDateTime Timestamp; 47 | 48 | FAutomationExecutionEntry(FAutomationEvent InEvent) 49 | : Event(InEvent) 50 | , Filename() 51 | , LineNumber(-1) 52 | , Timestamp(FDateTime::UtcNow()) 53 | { 54 | } 55 | 56 | FAutomationExecutionEntry(FAutomationEvent InEvent, FString InFilename, int32 InLineNumber) 57 | : Event(InEvent) 58 | , Filename(InFilename) 59 | , LineNumber(InLineNumber) 60 | , Timestamp(FDateTime::UtcNow()) 61 | { 62 | } 63 | 64 | FString ToString() const; 65 | }; 66 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/BufferedOutputDevice.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/Array.h" 6 | #include "CoreTypes.h" 7 | #include "HAL/CriticalSection.h" 8 | #include "Logging/LogVerbosity.h" 9 | #include "Misc/OutputDevice.h" 10 | #include "Misc/OutputDeviceRedirector.h" 11 | 12 | /** Buffered output device. */ 13 | class FBufferedOutputDevice : public FOutputDevice 14 | { 15 | protected: 16 | TArray BufferedLines; 17 | FCriticalSection SynchronizationObject; 18 | ELogVerbosity::Type FilterLevel = ELogVerbosity::All; 19 | 20 | public: 21 | void SetVerbosity(ELogVerbosity::Type Verbosity) { FilterLevel = Verbosity; } 22 | void Serialize(const TCHAR* InData, ELogVerbosity::Type Verbosity, const FName& Category) override; 23 | void GetContents(TArray& DestBuffer); 24 | 25 | /** Pushes buffered lines into the specified output device. */ 26 | void RedirectTo(FOutputDevice& Ar); 27 | }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/CallbackDevice.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/ScopedCallback.h" 6 | #include "Misc/CoreDelegates.h" 7 | 8 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/ComparisonUtility.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/StringFwd.h" 6 | #include "Containers/StringView.h" 7 | #include "HAL/Platform.h" 8 | #include "UObject/NameTypes.h" 9 | 10 | namespace UE { namespace ComparisonUtility { 11 | 12 | /** Compare the two names, correctly ordering any numeric suffixes they may have */ 13 | int32 CompareWithNumericSuffix(FName A, FName B); 14 | 15 | /** Compare the two strings, correctly ordering any numeric suffixes they may have */ 16 | int32 CompareWithNumericSuffix(FStringView A, FStringView B); 17 | 18 | } } // namespace UE::ComparisonUtility 19 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/DelayedAutoRegister.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" 6 | #include "Templates/Function.h" 7 | 8 | enum class EDelayedRegisterRunPhase : uint8 9 | { 10 | StartOfEnginePreInit, 11 | FileSystemReady, 12 | TaskGraphSystemReady, 13 | StatSystemReady, 14 | IniSystemReady, 15 | EarliestPossiblePluginsLoaded, 16 | ShaderTypesReady, 17 | PreObjectSystemReady, 18 | ObjectSystemReady, 19 | DeviceProfileManagerReady, 20 | EndOfEngineInit, 21 | 22 | NumPhases, 23 | }; 24 | 25 | struct FDelayedAutoRegisterHelper 26 | { 27 | 28 | FDelayedAutoRegisterHelper(EDelayedRegisterRunPhase RunPhase, TFunction RegistrationFunction); 29 | 30 | static void RunAndClearDelayedAutoRegisterDelegates(EDelayedRegisterRunPhase RunPhase); 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/DisableOldUETypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/EngineBuildSettings.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/ContainersFwd.h" 6 | #include "Containers/UnrealString.h" 7 | #include "CoreTypes.h" 8 | 9 | class FEngineBuildSettings 10 | { 11 | public: 12 | /** 13 | * @return True if the build was gotten from perforce 14 | */ 15 | static bool IsPerforceBuild(); 16 | 17 | /** 18 | * @return True if the build is for internal projects only 19 | */ 20 | static bool IsInternalBuild(); 21 | 22 | /** 23 | * @return True if the current installation is a source distribution. 24 | */ 25 | static bool IsSourceDistribution(); 26 | 27 | /** 28 | * @return True if a given engine distribution contains source (as opposed to, say, Launcher builds) 29 | */ 30 | static bool IsSourceDistribution(const FString& RootDir); 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/EngineVersionComparison.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Runtime/Launch/Resources/Version.h" 6 | 7 | // Helper for UE_VERSION_NEWER_THAN and UE_VERSION_OLDER_THAN 8 | #define UE_GREATER_SORT(Value, ValueToBeGreaterThan, TieBreaker) \ 9 | (((Value) > (ValueToBeGreaterThan)) || (((Value) == (ValueToBeGreaterThan)) && (TieBreaker))) 10 | 11 | // Version comparison macro that is defined to true if the UE version is newer than MajorVer.MinorVer.PatchVer and false otherwise 12 | // (a typical use is to alert integrators to revisit this code when upgrading to a new engine version) 13 | #define UE_VERSION_NEWER_THAN(MajorVersion, MinorVersion, PatchVersion) \ 14 | UE_GREATER_SORT(ENGINE_MAJOR_VERSION, MajorVersion, UE_GREATER_SORT(ENGINE_MINOR_VERSION, MinorVersion, UE_GREATER_SORT(ENGINE_PATCH_VERSION, PatchVersion, false))) 15 | 16 | // Version comparison macro that is defined to true if the UE version is older than MajorVer.MinorVer.PatchVer and false otherwise 17 | // (use when making code that needs to be compatible with older engine versions) 18 | #define UE_VERSION_OLDER_THAN(MajorVersion, MinorVersion, PatchVersion) \ 19 | UE_GREATER_SORT(MajorVersion, ENGINE_MAJOR_VERSION, UE_GREATER_SORT(MinorVersion, ENGINE_MINOR_VERSION, UE_GREATER_SORT(PatchVersion, ENGINE_PATCH_VERSION, false))) 20 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/FallbackStruct.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // A struct used as stub for deleted ones. 6 | struct FFallbackStruct 7 | { 8 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/Fnv.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/AssertionMacros.h" 7 | #include "Misc/CString.h" 8 | #include "Misc/Char.h" 9 | 10 | 11 | /** 12 | * FNV hash generation for different types of input data 13 | **/ 14 | struct FFnv 15 | { 16 | /** generates FNV hash of the memory area */ 17 | static uint32 MemFnv32( const void* Data, int32 Length, uint32 FNV=0 ); 18 | static uint64 MemFnv64( const void* Data, int32 Length, uint64 FNV=0 ); 19 | }; 20 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/ICompressionFormat.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Features/IModularFeatures.h" 7 | #include "Modules/ModuleInterface.h" 8 | #include "Modules/ModuleManager.h" 9 | #include "Misc/CompressionFlags.h" 10 | 11 | 12 | #define COMPRESSION_FORMAT_FEATURE_NAME "CompressionFormat" 13 | 14 | struct ICompressionFormat : public IModularFeature, public IModuleInterface 15 | { 16 | virtual FName GetCompressionFormatName() = 0; 17 | virtual bool Compress(void* CompressedBuffer, int32& CompressedSize, const void* UncompressedBuffer, int32 UncompressedSize, int32 CompressionData, ECompressionFlags Flags) = 0; 18 | virtual bool Uncompress(void* UncompressedBuffer, int32& UncompressedSize, const void* CompressedBuffer, int32 CompressedSize, int32 CompressionData) = 0; 19 | virtual int32 GetCompressedBufferSize(int32 UncompressedSize, int32 CompressionData) = 0; 20 | virtual uint32 GetVersion() = 0; 21 | virtual FString GetDDCKeySuffix() = 0; 22 | virtual bool DoesOwnWorthDecompressingCheck() = 0; 23 | }; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/IFilter.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Delegates/Delegate.h" 7 | 8 | /** 9 | * A generic interface that represents a Filter of ItemType. 10 | */ 11 | template< typename TItemType > 12 | class IFilter 13 | { 14 | public: 15 | typedef TItemType ItemType; 16 | 17 | virtual ~IFilter(){ } 18 | 19 | /** Returns whether the specified Item passes the Filter's restrictions */ 20 | virtual bool PassesFilter( TItemType InItem ) const = 0; 21 | 22 | /** Broadcasts anytime the restrictions of the Filter changes */ 23 | DECLARE_EVENT( IFilter, FChangedEvent ); 24 | virtual FChangedEvent& OnChanged() = 0; 25 | }; 26 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/ILifeCycle.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | 6 | /** 7 | * Interface for controlling an object's start/stop life cycle. 8 | */ 9 | class ILifeCycle 10 | { 11 | public: 12 | 13 | /** 14 | * Checks whether the object has been started. 15 | * 16 | * @return true if started, false otherwise. 17 | * @see Start, Stop 18 | */ 19 | virtual bool IsStarted() const = 0; 20 | 21 | /** 22 | * Starts the object. 23 | * 24 | * @return true if it was started, false otherwise. 25 | * @see IsStarted, Stop 26 | */ 27 | virtual bool Start() = 0; 28 | 29 | /** 30 | * Stops the object. 31 | * 32 | * @return true if it was stopped, false otherwise. 33 | * @see IsStarted, Start 34 | */ 35 | virtual bool Stop() = 0; 36 | }; 37 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/Launder.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #if __cplusplus >= 201703L 5 | #include // IWYU pragma: export 6 | #define UE_LAUNDER(x) std::launder(x) 7 | #else 8 | #define UE_LAUNDER(x) (x) 9 | #endif 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/MemoryReadStream.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "HAL/Platform.h" 7 | #include "HAL/ThreadSafeCounter.h" 8 | #include "Templates/RefCounting.h" 9 | 10 | /** 11 | * Represents a block of memory, but abstracts away the underlying layout 12 | */ 13 | class IMemoryReadStream 14 | { 15 | public: 16 | static TRefCountPtr CreateFromCopy(const void* InMemory, int64 InSize); 17 | static TRefCountPtr CreateFromCopy(IMemoryReadStream* InStream); 18 | static TRefCountPtr CreateFromBuffer(void* InMemory, int64 InSize, bool bOwnPointer); 19 | 20 | virtual const void* Read(int64& OutSize, int64 InOffset, int64 InSize) = 0; 21 | virtual int64 GetSize() = 0; 22 | virtual void CopyTo(void* Buffer, int64 InOffset, int64 InSize); 23 | virtual void EnsureReadNonBlocking() {}; // Incur any potential wait such that future Read() or CopyTo() calls are wait and thread switch free. 24 | 25 | FORCEINLINE uint32 AddRef() const { return uint32(NumRefs.Increment()); } 26 | 27 | FORCEINLINE uint32 Release() const 28 | { 29 | const int32 Refs = NumRefs.Decrement(); 30 | if (Refs == 0) 31 | { 32 | delete this; 33 | } 34 | return uint32(Refs); 35 | } 36 | 37 | FORCEINLINE uint32 GetRefCount() const 38 | { 39 | return uint32(NumRefs.GetValue()); 40 | } 41 | 42 | protected: 43 | virtual ~IMemoryReadStream() {} 44 | 45 | private: 46 | mutable FThreadSafeCounter NumRefs; 47 | }; 48 | typedef TRefCountPtr IMemoryReadStreamRef; 49 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/MonolithicHeaderBoilerplate.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "CoreTypes.h" 4 | 5 | #if UE_IS_ENGINE_MODULE && !defined(SUPPRESS_MONOLITHIC_HEADER_WARNINGS) 6 | #define MONOLITHIC_HEADER_BOILERPLATE() COMPILE_WARNING("Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs.") 7 | #define SUPPRESS_MONOLITHIC_HEADER_WARNINGS 1 8 | #else 9 | #undef MONOLITHIC_HEADER_BOILERPLATE 10 | #define MONOLITHIC_HEADER_BOILERPLATE() 11 | #endif -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/NoopCounter.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** Fake Thread safe counter, used to avoid cluttering code with ifdefs when counters are only used for debugging. */ 8 | class FNoopCounter 9 | { 10 | public: 11 | 12 | FNoopCounter() { } 13 | FNoopCounter( const FNoopCounter& Other ) { } 14 | FNoopCounter( int32 Value ) { } 15 | 16 | int32 Increment() 17 | { 18 | return 0; 19 | } 20 | 21 | int32 Add( int32 Amount ) 22 | { 23 | return 0; 24 | } 25 | 26 | int32 Decrement() 27 | { 28 | return 0; 29 | } 30 | 31 | int32 Subtract( int32 Amount ) 32 | { 33 | return 0; 34 | } 35 | 36 | int32 Set( int32 Value ) 37 | { 38 | return 0; 39 | } 40 | 41 | int32 Reset() 42 | { 43 | return 0; 44 | } 45 | 46 | int32 GetValue() const 47 | { 48 | return 0; 49 | } 50 | }; 51 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OptionalFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * When we have an optional value IsSet() returns true, and GetValue() is meaningful. 7 | * Otherwise GetValue() is not meaningful. 8 | */ 9 | template 10 | struct TOptional; 11 | 12 | struct FNullOpt 13 | { 14 | explicit constexpr FNullOpt(int) {} 15 | }; 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceAnsiError.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Logging/LogVerbosity.h" 7 | #include "Misc/OutputDeviceError.h" 8 | #include "UObject/NameTypes.h" 9 | 10 | class FOutputDeviceAnsiError : public FOutputDeviceError 11 | { 12 | public: 13 | /** Constructor, initializing member variables */ 14 | FOutputDeviceAnsiError(); 15 | 16 | /** 17 | * Serializes the passed in data unless the current event is suppressed. 18 | * 19 | * @param Data Text to log 20 | * @param Event Event name used for suppression purposes 21 | */ 22 | virtual void Serialize(const TCHAR* Msg, ELogVerbosity::Type Verbosity, const class FName& Category) override; 23 | 24 | virtual bool CanBeUsedOnAnyThread() const override 25 | { 26 | return true; 27 | } 28 | 29 | /** 30 | * Error handling function that is being called from within the system wide global 31 | * error handler, e.g. using structured exception handling on the PC. 32 | */ 33 | void HandleError() override; 34 | 35 | private: 36 | 37 | int32 ErrorPos; 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceArchiveWrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Logging/LogVerbosity.h" 7 | #include "Misc/AssertionMacros.h" 8 | #include "Misc/OutputDevice.h" 9 | 10 | class FArchive; 11 | 12 | /** 13 | * Output device wrapping any kind of FArchive. Note: Works in any build configuration. 14 | */ 15 | class FOutputDeviceArchiveWrapper : public FOutputDevice 16 | { 17 | public: 18 | /** 19 | * Constructor, initializing member variables. 20 | * 21 | * @param InArchive Archive to use, must not be nullptr. Does not take ownership of the archive, clean up or delete the archive independently! 22 | */ 23 | FOutputDeviceArchiveWrapper(FArchive* InArchive) 24 | : LogAr(InArchive) 25 | { 26 | check(InArchive); 27 | } 28 | 29 | // FOutputDevice interface 30 | virtual void Flush() override; 31 | virtual void Serialize(const TCHAR* Data, ELogVerbosity::Type Verbosity, const class FName& Category) override; 32 | // End of FOutputDevice interface 33 | 34 | private: 35 | FArchive* LogAr; 36 | }; 37 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceConsole.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/OutputDevice.h" 7 | #include "Containers/UnrealString.h" 8 | 9 | /** 10 | * This class servers as the base class for console window output. 11 | */ 12 | class FOutputDeviceConsole 13 | : public FOutputDevice 14 | { 15 | public: 16 | 17 | /** 18 | * Shows or hides the console window. 19 | * 20 | * @param ShowWindow Whether to show (true) or hide (false) the console window. 21 | */ 22 | virtual void Show( bool ShowWindow )=0; 23 | 24 | /** 25 | * Returns whether console is currently shown or not. 26 | * 27 | * @return true if console is shown, false otherwise. 28 | */ 29 | virtual bool IsShown()=0; 30 | 31 | /** 32 | * Returns whether the application is already attached to a console window. 33 | * 34 | * @return true if console is attached, false otherwise. 35 | */ 36 | virtual bool IsAttached() 37 | { 38 | return false; 39 | } 40 | 41 | /** 42 | * Sets the INI file name to write console settings to. 43 | * 44 | * @param InFilename The INI file name to set. 45 | */ 46 | void SetIniFilename(const TCHAR* InFilename) 47 | { 48 | IniFilename = InFilename; 49 | } 50 | 51 | protected: 52 | 53 | /** Ini file name to write console settings to. */ 54 | FString IniFilename; 55 | }; 56 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceDebug.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Logging/LogVerbosity.h" 7 | #include "Misc/OutputDevice.h" 8 | #include "UObject/NameTypes.h" 9 | 10 | #include 11 | 12 | class FOutputDeviceDebug : public FOutputDevice 13 | { 14 | public: 15 | /** 16 | * Serializes the passed in data unless the current event is suppressed. 17 | * 18 | * @param Data Text to log 19 | * @param Event Event name used for suppression purposes 20 | */ 21 | virtual void Serialize(const TCHAR* Data, ELogVerbosity::Type Verbosity, const FName& Category, double Time) override; 22 | 23 | virtual void Serialize(const TCHAR* Data, ELogVerbosity::Type Verbosity, const FName& Category) override; 24 | 25 | virtual void SerializeRecord(const UE::FLogRecord& Record) override; 26 | 27 | virtual bool CanBeUsedOnAnyThread() const override 28 | { 29 | return true; 30 | } 31 | 32 | virtual bool CanBeUsedOnMultipleThreads() const override; 33 | 34 | virtual bool CanBeUsedOnPanicThread() const override 35 | { 36 | return true; 37 | } 38 | 39 | private: 40 | void ConditionalTickAsync(double Time); 41 | void TickAsync(); 42 | 43 | std::atomic LastTickTime = 0.0; 44 | std::atomic bSerializeAsJson = false; 45 | }; 46 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceError.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/OutputDevice.h" 7 | 8 | // Error device. 9 | class FOutputDeviceError : public FOutputDevice 10 | { 11 | public: 12 | virtual bool CanBeUsedOnPanicThread() const override 13 | { 14 | return true; 15 | } 16 | 17 | virtual void HandleError()=0; 18 | 19 | /** Sets the location of the instruction that raise the next error */ 20 | void SetErrorProgramCounter(void* InProgramCounter) 21 | { 22 | ProgramCounter = InProgramCounter; 23 | } 24 | 25 | /* Returns the instruction location of where an error occurred */ 26 | void* GetErrorProgramCounter() const 27 | { 28 | return ProgramCounter; 29 | } 30 | 31 | private: 32 | void* ProgramCounter = nullptr; 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/OutputDeviceNull.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Logging/LogVerbosity.h" 7 | #include "Misc/OutputDevice.h" 8 | 9 | // Null output device. 10 | class FOutputDeviceNull : public FOutputDevice 11 | { 12 | public: 13 | /** 14 | * NULL implementation of Serialize. 15 | * 16 | * @param Data unused 17 | * @param Event unused 18 | */ 19 | virtual void Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category) override; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/PreLoadFile.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/UnrealString.h" 6 | #include "CoreMinimal.h" 7 | #include "HAL/Platform.h" 8 | #include "Misc/DelayedAutoRegister.h" 9 | 10 | class FEvent; 11 | 12 | struct FPreLoadFile : public FDelayedAutoRegisterHelper 13 | { 14 | FPreLoadFile(const TCHAR* InPath); 15 | 16 | void* TakeOwnershipOfLoadedData(int64* OutFileSize=nullptr); 17 | static void* TakeOwnershipOfLoadedDataByPath(const TCHAR* Filename, int64* OutFileSize); 18 | 19 | protected: 20 | void KickOffRead(); 21 | 22 | bool bIsComplete; 23 | bool bFailedToOpenInKickOff; 24 | static bool bSystemNoLongerTakingRequests; 25 | void* Data; 26 | int64 FileSize; 27 | FString Path; 28 | FEvent* CompletionEvent; 29 | class IAsyncReadFileHandle* AsyncReadHandle = nullptr; 30 | class IAsyncReadRequest* SizeRequestHandle = nullptr; 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/ScopedEvent.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/Event.h" 7 | 8 | /** 9 | * This class is allows a simple one-shot scoped event. 10 | * 11 | * Usage: 12 | * { 13 | * FScopedEvent MyEvent; 14 | * SendReferenceOrPointerToSomeOtherThread(&MyEvent); // Other thread calls MyEvent->Trigger(); 15 | * // MyEvent destructor is here, we wait here. 16 | * } 17 | */ 18 | class FScopedEvent 19 | { 20 | public: 21 | 22 | /** Default constructor. */ 23 | FScopedEvent(); 24 | 25 | /** Destructor. */ 26 | ~FScopedEvent(); 27 | 28 | /** Triggers the event. */ 29 | void Trigger() 30 | { 31 | Event->Trigger(); 32 | } 33 | 34 | /** 35 | * Checks if the event has been triggered (used for special early out cases of scope event) 36 | * if this returns true once it will return true forever 37 | * 38 | * @return returns true if the scoped event has been triggered once 39 | */ 40 | bool IsReady(); 41 | 42 | /** 43 | * Retrieve the event, usually for passing around. 44 | * 45 | * @return The event. 46 | */ 47 | FEvent* Get() 48 | { 49 | return Event; 50 | } 51 | 52 | private: 53 | 54 | /** Holds the event. */ 55 | FEvent* Event; 56 | }; 57 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/SingleThreadEvent.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/AssertionMacros.h" 7 | #include "HAL/Event.h" 8 | 9 | /** 10 | * Fake event object used when running with only one thread. 11 | */ 12 | class FSingleThreadEvent 13 | : public FEvent 14 | { 15 | /** Flag to know whether this event has been triggered. */ 16 | bool bTriggered; 17 | 18 | /** Should this event reset automatically or not. */ 19 | bool bManualReset; 20 | 21 | public: 22 | 23 | /** Default constructor. */ 24 | FSingleThreadEvent() 25 | : bTriggered(false) 26 | , bManualReset(false) 27 | { } 28 | 29 | public: 30 | 31 | // FEvent Interface 32 | 33 | virtual bool Create( bool bIsManualReset = false ) override 34 | { 35 | bManualReset = bIsManualReset; 36 | return true; 37 | } 38 | 39 | virtual bool IsManualReset() override 40 | { 41 | return bManualReset; 42 | } 43 | 44 | virtual void Trigger() override 45 | { 46 | bTriggered = true; 47 | } 48 | 49 | virtual void Reset() override 50 | { 51 | bTriggered = false; 52 | } 53 | 54 | virtual bool Wait( uint32 WaitTime, const bool bIgnoreThreadIdleStats = false ) override 55 | { 56 | // With only one thread it's assumed the event has been triggered 57 | // before Wait is called, otherwise it would end up waiting forever or always fail. 58 | check(bTriggered); 59 | bTriggered = bManualReset; 60 | return true; 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/SingleThreadRunnable.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Interface for ticking runnables when there's only one thread available and 9 | * multithreading is disabled. 10 | */ 11 | class FSingleThreadRunnable 12 | { 13 | public: 14 | 15 | virtual ~FSingleThreadRunnable() { } 16 | 17 | /* Tick function. */ 18 | virtual void Tick() = 0; 19 | }; 20 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/SlowTaskStack.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/Array.h" 7 | 8 | struct FSlowTask; 9 | 10 | /** A stack of feedback scopes */ 11 | struct FSlowTaskStack : TArray 12 | { 13 | /** Get the fraction of work that has been completed for the specified index in the stack (0=total progress) */ 14 | float GetProgressFraction(int32 Index) const; 15 | }; 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/SpinLock.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/PlatformProcess.h" 7 | #include 8 | 9 | namespace UE 10 | { 11 | // A mutex that doesn't put the thread into a WAIT state but instead repeatedly tries to aquire the lock. 12 | // WARNING: Should be used only for very short locks 13 | // Use with `TScopeLock` 14 | class FSpinLock 15 | { 16 | public: 17 | UE_NONCOPYABLE(FSpinLock); 18 | 19 | FSpinLock() = default; 20 | 21 | void Lock() 22 | { 23 | while (true) 24 | { 25 | if (!bFlag.exchange(true, std::memory_order_acquire)) 26 | { 27 | break; 28 | } 29 | 30 | while (bFlag.load(std::memory_order_relaxed)) 31 | { 32 | FPlatformProcess::Yield(); 33 | } 34 | } 35 | } 36 | 37 | bool TryLock() 38 | { 39 | return !bFlag.exchange(true, std::memory_order_acquire); 40 | } 41 | 42 | void Unlock() 43 | { 44 | bFlag.store(false, std::memory_order_release); 45 | } 46 | 47 | private: 48 | std::atomic bFlag{ false }; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/StringUtility.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/UnrealString.h" 6 | #include "CoreTypes.h" 7 | 8 | namespace StringUtility 9 | { 10 | /** 11 | * Unescapes a URI 12 | * 13 | * @param URLString an escaped string (e.g. File%20Name) 14 | * 15 | * @return un-escaped string (e.g. "File Name") 16 | */ 17 | FString UnescapeURI(const FString& URLString); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/Timeout.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Misc/Timespan.h" 6 | #include "HAL/PlatformTime.h" 7 | #include "CoreTypes.h" 8 | 9 | namespace UE 10 | { 11 | // utility class to handle timeouts 12 | // usage: 13 | // ------------------------------------ 14 | // FTimeout Timeout(FTimespan::FromMilliseconds(2)); 15 | // while (!Timeout) { ... } 16 | // ------------------------------------ 17 | class FTimeout 18 | { 19 | public: 20 | explicit FTimeout(FTimespan Value) 21 | : Timeout(Value) 22 | { 23 | } 24 | 25 | explicit operator bool() const 26 | { 27 | return GetElapsedTime() >= Timeout; 28 | } 29 | 30 | FTimespan GetElapsedTime() const 31 | { 32 | return FTimespan::FromSeconds(FPlatformTime::Seconds()) - Start; 33 | } 34 | 35 | FTimespan GetRemainingTime() const 36 | { 37 | return Timeout - GetElapsedTime(); 38 | } 39 | 40 | private: 41 | FTimespan Start{ FTimespan::FromSeconds(FPlatformTime::Seconds()) }; 42 | FTimespan Timeout; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Misc/UProjectInfo.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/Array.h" 7 | #include "Containers/UnrealString.h" 8 | #include "Containers/Map.h" 9 | 10 | /** 11 | * Dictionary of all the non-foreign projects for an engine installation, found by parsing .uprojectdirs files for source directories. 12 | */ 13 | class FUProjectDictionary 14 | { 15 | public: 16 | /** Scans the engine root directory for all the known projects. */ 17 | FUProjectDictionary(const FString& InRootDir); 18 | 19 | /** Refreshes the list of known projects */ 20 | void Refresh(); 21 | 22 | /** Determines whether a project is a foreign project or not. */ 23 | bool IsForeignProject(const FString& ProjectFileName) const; 24 | 25 | /** Gets the project filename for the given game. Empty if not found. */ 26 | FString GetRelativeProjectPathForGame(const TCHAR* GameName, const FString& BaseDir) const; 27 | 28 | /** Gets a list of all the known projects. */ 29 | TArray GetProjectPaths() const; 30 | 31 | /** Gets the project dictionary for the active engine installation. */ 32 | static FUProjectDictionary& GetDefault(); 33 | 34 | private: 35 | /** The root directory for this engine installation */ 36 | FString RootDir; 37 | 38 | /** List of project root directories */ 39 | TArray ProjectRootDirs; 40 | 41 | /** Map of short game names to full project paths. */ 42 | TMap ShortProjectNameDictionary; 43 | }; 44 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/ProfilingDebugging/UMemoryDefines.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * true we want to force an ansi allocator 7 | */ 8 | #ifndef FORCE_ANSI_ALLOCATOR 9 | #define FORCE_ANSI_ALLOCATOR 0 10 | #endif 11 | 12 | /** 13 | * true if intelTBB (a.k.a MallocTBB) can be used (different to the platform actually supporting it) 14 | */ 15 | #ifndef TBB_ALLOCATOR_ALLOWED 16 | #define TBB_ALLOCATOR_ALLOWED 1 17 | #endif 18 | 19 | /** 20 | * true if mimalloc can be used (different to the platform actually supporting it) 21 | */ 22 | #ifndef MIMALLOC_ALLOCATOR_ALLOWED 23 | #define MIMALLOC_ALLOCATOR_ALLOWED 1 24 | #endif 25 | 26 | /** 27 | * IMPORTANT: The malloc proxy flags are mutually exclusive. 28 | * You can have either none of them set or only one of them. 29 | */ 30 | /** USE_MALLOC_PROFILER - Define this to use the FMallocProfiler allocator. */ 31 | /** Make sure to enable Stack Frame pointers: */ 32 | /** bOmitFramePointers = false, or /Oy- */ 33 | 34 | #ifndef USE_MALLOC_PROFILER 35 | #define USE_MALLOC_PROFILER 0 36 | #endif 37 | 38 | #if USE_MALLOC_PROFILER 39 | #define MALLOC_PROFILER(x) x 40 | #else 41 | #define MALLOC_PROFILER(...) 42 | #endif 43 | 44 | 45 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/Archive.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ServersHub/ServerAPI/fe50c51bb894787c8823f79b8ea52570b6bd56d9/AsaApi/Core/Public/API/UE/Serialization/Archive.cpp -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/ArchiveCookData.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" 6 | 7 | class ITargetPlatform; 8 | struct FArchiveCookContext; 9 | 10 | // Holds archive data only relevant for cooking archives. Fill this out 11 | // as part of FSavePackageArgs. 12 | struct FArchiveCookData 13 | { 14 | const ITargetPlatform& TargetPlatform; 15 | FArchiveCookContext& CookContext; 16 | FArchiveCookData(const ITargetPlatform& InTargetPlatform, FArchiveCookContext& InCookContext) : 17 | TargetPlatform(InTargetPlatform), 18 | CookContext(InCookContext) 19 | {} 20 | }; 21 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/ArrayReader.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/UnrealMemory.h" 7 | #include "Containers/Array.h" 8 | #include "Containers/UnrealString.h" 9 | #include "Serialization/MemoryArchive.h" 10 | 11 | class FArrayReader final : public FMemoryArchive, public TArray 12 | { 13 | public: 14 | FArrayReader( bool bIsPersistent=false ) 15 | { 16 | this->SetIsLoading(true); 17 | this->SetIsPersistent(bIsPersistent); 18 | } 19 | 20 | /** 21 | * Returns the name of the Archive. Useful for getting the name of the package a struct or object 22 | * is in when a loading error occurs. 23 | * 24 | * This is overridden for the specific Archive Types 25 | **/ 26 | virtual FString GetArchiveName() const { return TEXT("FArrayReader"); } 27 | 28 | int64 TotalSize() 29 | { 30 | return (int64)Num(); 31 | } 32 | 33 | void Serialize(void* Data, int64 Count) 34 | { 35 | if (Count && !IsError()) 36 | { 37 | // Only serialize if we have the requested amount of data 38 | if (Offset + Count <= Num()) 39 | { 40 | FMemory::Memcpy(Data, &((*this)[(int32)Offset]), Count); 41 | Offset += Count; 42 | } 43 | else 44 | { 45 | SetError(); 46 | } 47 | } 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/ArrayWriter.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Serialization/BufferArchive.h" 7 | 8 | /** 9 | * Archive objects that are also a TArray. Since FBufferArchive is already the 10 | * writer version, we just typedef to the old, outdated name 11 | */ 12 | typedef FBufferArchive FArrayWriter; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/BitArchive.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/AssertionMacros.h" 7 | #include "Serialization/Archive.h" 8 | 9 | /** 10 | * Base class for serializing bitstreams. 11 | */ 12 | class FBitArchive : public FArchive 13 | { 14 | public: 15 | /** 16 | * Default Constructor 17 | */ 18 | FBitArchive(); 19 | 20 | virtual void SerializeBitsWithOffset( void* Src, int32 SourceBit, int64 LengthBits ) PURE_VIRTUAL(FBitArchive::SerializeBitsWithOffset,); 21 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/CompactBinaryContainerSerialization.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Serialization/CompactBinary.h" 6 | #include "Serialization/CompactBinaryWriter.h" 7 | #include "Templates/Tuple.h" 8 | 9 | template 10 | inline FCbWriter& operator<<(FCbWriter& Writer, const TTuple& Tuple) 11 | { 12 | Writer.BeginArray(); 13 | VisitTupleElements([&Writer](auto&& ElementValue) { Writer << ElementValue; }, Tuple); 14 | Writer.EndArray(); 15 | return Writer; 16 | } 17 | 18 | template 19 | inline bool LoadFromCompactBinary(FCbFieldView Field, TTuple& Tuple) 20 | { 21 | bool bOk = Field.AsArrayView().Num() == sizeof...(Types); 22 | FCbFieldViewIterator ElementIterator = Field.CreateViewIterator(); 23 | 24 | VisitTupleElements([&ElementIterator, &bOk](auto&& ElementValue) 25 | { 26 | bOk = LoadFromCompactBinary(ElementIterator++, ElementValue) & bOk; 27 | }, 28 | Tuple 29 | ); 30 | return bOk; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/CompressedChunkInfo.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreFwd.h" 6 | #include "CoreTypes.h" 7 | 8 | class FArchive; 9 | 10 | /** 11 | * Implements a helper structure for compression support 12 | * 13 | * This structure contains information on the compressed and uncompressed size of a chunk of data. 14 | */ 15 | struct FCompressedChunkInfo 16 | { 17 | /** Holds the data's compressed size. */ 18 | int64 CompressedSize = 0; 19 | 20 | /** Holds the data's uncompresses size. */ 21 | int64 UncompressedSize = 0; 22 | 23 | /** 24 | * Serializes an FCompressedChunkInfo value from or into an archive. 25 | * 26 | * @param Ar The archive to serialize from or to. 27 | * @param Value The value to serialize. 28 | */ 29 | friend FArchive& operator<<(FArchive& Ar, FCompressedChunkInfo& Value); 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/LoadTimeTrace.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/Build.h" 7 | #include "ProfilingDebugging/FormatArgsTrace.h" 8 | #include "Trace/Config.h" 9 | #include "Trace/Trace.h" 10 | 11 | namespace UE { namespace Trace { class FChannel; } } 12 | 13 | #if !defined(LOADTIMEPROFILERTRACE_ENABLED) 14 | #if UE_TRACE_ENABLED && !UE_BUILD_SHIPPING 15 | #define LOADTIMEPROFILERTRACE_ENABLED 1 16 | #else 17 | #define LOADTIMEPROFILERTRACE_ENABLED 0 18 | #endif 19 | #endif 20 | 21 | #if LOADTIMEPROFILERTRACE_ENABLED 22 | 23 | UE_TRACE_CHANNEL_EXTERN(LoadTimeChannel, ); 24 | UE_TRACE_CHANNEL_EXTERN(AssetLoadTimeChannel, ); 25 | 26 | struct FLoadTimeProfilerTrace 27 | { 28 | struct FRequestGroupScope 29 | { 30 | template 31 | FRequestGroupScope(const TCHAR* InFormatString, Types... FormatArgs) 32 | { 33 | FormatString = InFormatString; 34 | FormatArgsSize = FFormatArgsTrace::EncodeArguments(FormatArgsBuffer, FormatArgs...); 35 | OutputBegin(); 36 | } 37 | 38 | ~FRequestGroupScope(); 39 | 40 | private: 41 | void OutputBegin(); 42 | 43 | const TCHAR* FormatString = nullptr; 44 | uint16 FormatArgsSize = 0; 45 | uint8 FormatArgsBuffer[1024]; 46 | }; 47 | }; 48 | 49 | #define TRACE_LOADTIME_REQUEST_GROUP_SCOPE(Format, ...) \ 50 | FLoadTimeProfilerTrace::FRequestGroupScope __LoadTimeTraceRequestGroupScope(Format, ##__VA_ARGS__); 51 | 52 | #else 53 | #define TRACE_LOADTIME_REQUEST_GROUP_SCOPE(...) 54 | #endif 55 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/NameAsStringIndexProxyArchive.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/Array.h" 6 | #include "Containers/Set.h" 7 | #include "CoreTypes.h" 8 | #include "Serialization/ArchiveProxy.h" 9 | #include "UObject/NameTypes.h" 10 | 11 | class FArchive; 12 | 13 | /** 14 | * Implements a proxy archive that serializes FNames as string data or an index (if the same name is repeated). 15 | */ 16 | struct FNameAsStringIndexProxyArchive : public FArchiveProxy 17 | { 18 | /** When FName is first encountered, it is added to the table and saved as a string, otherwise, its index is written. Indices can be looked up from this TSet since it is not compacted. */ 19 | TSet NamesSeenOnSave; 20 | 21 | /** Table of names that is populated as the archive is being loaded. */ 22 | TArray NamesLoaded; 23 | 24 | /** 25 | * Creates and initializes a new instance. 26 | * 27 | * @param InInnerArchive The inner archive to proxy. 28 | */ 29 | FNameAsStringIndexProxyArchive(FArchive& InInnerArchive) 30 | : FArchiveProxy(InInnerArchive) 31 | { } 32 | 33 | /** 34 | * Serialize the given FName as an FString or an index (if we encountered it again) 35 | */ 36 | virtual FArchive& operator<<(FName& N); 37 | }; 38 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/NameAsStringProxyArchive.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Serialization/ArchiveProxy.h" 7 | 8 | /** 9 | * Implements a proxy archive that serializes FNames as string data. 10 | */ 11 | struct FNameAsStringProxyArchive : public FArchiveProxy 12 | { 13 | /** 14 | * Creates and initializes a new instance. 15 | * 16 | * @param InInnerArchive The inner archive to proxy. 17 | */ 18 | FNameAsStringProxyArchive(FArchive& InInnerArchive) 19 | : FArchiveProxy(InInnerArchive) 20 | { } 21 | 22 | virtual FArchive& operator<<(class FName& N); 23 | }; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/StaticMemoryReader.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "HAL/UnrealMemory.h" 7 | #include "Math/UnrealMathUtility.h" 8 | #include "Containers/UnrealString.h" 9 | #include "Serialization/MemoryArchive.h" 10 | 11 | /** 12 | * Archive for reading arbitrary data from the specified memory location 13 | */ 14 | class FStaticMemoryReader final : public FMemoryArchive 15 | { 16 | public: 17 | /** 18 | * Returns the name of the Archive. Useful for getting the name of the package a struct or object 19 | * is in when a loading error occurs. 20 | * 21 | * This is overridden for the specific Archive Types 22 | **/ 23 | virtual FString GetArchiveName() const override 24 | { 25 | return TEXT("FStaticMemoryReader"); 26 | } 27 | 28 | virtual int64 TotalSize() override 29 | { 30 | return NumBytes; 31 | } 32 | 33 | void Serialize( void* Data, int64 Num ) 34 | { 35 | if (Num && !IsError()) 36 | { 37 | // Only serialize if we have the requested amount of data 38 | if (Offset + Num <= TotalSize()) 39 | { 40 | FMemory::Memcpy( Data, &Bytes[Offset], Num ); 41 | Offset += Num; 42 | } 43 | else 44 | { 45 | SetError(); 46 | } 47 | } 48 | } 49 | 50 | explicit FStaticMemoryReader(const uint8* InBytes, int64 InNumBytes) 51 | : Bytes (InBytes) 52 | , NumBytes(InNumBytes) 53 | { 54 | this->SetIsLoading(true); 55 | } 56 | 57 | private: 58 | const uint8* Bytes; 59 | int64 NumBytes; 60 | }; 61 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/StructuredArchiveDefines.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Misc/Build.h" 6 | 7 | /** 8 | * DO_STRUCTURED_ARCHIVE_CONTAINER_CHECKS - if set, checks that nested container types are serialized correctly. 9 | */ 10 | #ifndef DO_STRUCTURED_ARCHIVE_CONTAINER_CHECKS 11 | #if DO_GUARD_SLOW 12 | #define DO_STRUCTURED_ARCHIVE_CONTAINER_CHECKS 1 13 | #else 14 | #define DO_STRUCTURED_ARCHIVE_CONTAINER_CHECKS 0 15 | #endif 16 | #endif 17 | 18 | /** 19 | * DO_STRUCTURED_ARCHIVE_UNIQUE_FIELD_NAME_CHECKS - if set, checks that field names are unique within a container. Requires DO_STRUCTURED_ARCHIVE_CONTAINER_CHECKS. 20 | */ 21 | #ifndef DO_STRUCTURED_ARCHIVE_UNIQUE_FIELD_NAME_CHECKS 22 | #define DO_STRUCTURED_ARCHIVE_UNIQUE_FIELD_NAME_CHECKS 0 23 | #endif 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Serialization/StructuredArchiveFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/Build.h" 7 | #include 8 | 9 | // Formatters 10 | class FBinaryArchiveFormatter; 11 | class FStructuredArchiveFormatter; 12 | 13 | // Archives 14 | class FStructuredArchive; 15 | class FStructuredArchiveChildReader; 16 | 17 | // Slots 18 | class FStructuredArchiveSlot; 19 | class FStructuredArchiveRecord; 20 | class FStructuredArchiveArray; 21 | class FStructuredArchiveStream; 22 | class FStructuredArchiveMap; 23 | 24 | /** Typedef for which formatter type to support */ 25 | /** Written using std::conditional_t to work around IncludeTool complaints about #if blocks in Fwd.h files */ 26 | using FArchiveFormatterType = std::conditional_t; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/String/HexToBytes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/StringFwd.h" 7 | 8 | namespace UE::String 9 | { 10 | 11 | /** 12 | * Convert an array of hex digits into an array of bytes. 13 | * 14 | * @param Hex Array of hex digits to convert. 15 | * @param OutBytes [out] Array of at least (Hex.Len()+1)/2 output bytes. 16 | * 17 | * @return Number of bytes written to the output. 18 | */ 19 | int32 HexToBytes(FAnsiStringView Hex, uint8* OutBytes); 20 | int32 HexToBytes(FWideStringView Hex, uint8* OutBytes); 21 | int32 HexToBytes(FUtf8StringView Hex, uint8* OutBytes); 22 | 23 | } // UE::String 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/String/LexFromString.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/StringFwd.h" 7 | 8 | void LexFromString(int8& OutValue, const FStringView& InString); 9 | void LexFromString(int16& OutValue, const FStringView& InString); 10 | void LexFromString(int32& OutValue, const FStringView& InString); 11 | void LexFromString(int64& OutValue, const FStringView& InString); 12 | void LexFromString(uint8& OutValue, const FStringView& InString); 13 | void LexFromString(uint16& OutValue, const FStringView& InString); 14 | void LexFromString(uint32& OutValue, const FStringView& InString); 15 | void LexFromString(uint64& OutValue, const FStringView& InString); 16 | void LexFromString(float& OutValue, const FStringView& InString); 17 | void LexFromString(double& OutValue, const FStringView& InString); 18 | void LexFromString(bool& OutValue, const FStringView& InString); 19 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/String/LineEndings.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Containers/UnrealString.h" 6 | #include "CoreTypes.h" 7 | 8 | namespace UE::String 9 | { 10 | /** Replaces all Line Endings with "\n" line terminator */ 11 | FString FromHostLineEndings(const FString& InString); 12 | FString FromHostLineEndings(FString&& InString); 13 | void FromHostLineEndingsInline(FString& InString); 14 | 15 | /** Replaces all Line Endings with the host platform line terminator */ 16 | FString ToHostLineEndings(const FString& InString); 17 | FString ToHostLineEndings(FString&& InString); 18 | void ToHostLineEndingsInline(FString& InString); 19 | 20 | } // UE::String 21 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/String/RemoveFrom.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Containers/StringFwd.h" 7 | #include "Misc/CString.h" 8 | 9 | namespace UE::String 10 | { 11 | template 12 | [[nodiscard]] ARK_API inline TStringView RemoveFromStart(const TStringView View, const TStringView Prefix, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) 13 | { 14 | return View.StartsWith(Prefix, SearchCase) ? View.RightChop(Prefix.Len()) : View; 15 | } 16 | 17 | template 18 | [[nodiscard]] ARK_API inline TStringView RemoveFromEnd(const TStringView View, const TStringView Prefix, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) 19 | { 20 | return View.EndsWith(Prefix, SearchCase) ? View.LeftChop(Prefix.Len()) : View; 21 | } 22 | } // UE::String 23 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/AreTypesEqual.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // HEADER_UNIT_SKIP - Deprecated 6 | 7 | #include 8 | 9 | /** Tests whether two typenames refer to the same type. */ 10 | template 11 | struct UE_DEPRECATED(5.2, "TAreTypesEqual has been deprecated, please use std::is_same instead.") TAreTypesEqual 12 | { 13 | enum { Value = std::is_same_v }; 14 | }; 15 | 16 | #define ARE_TYPES_EQUAL(A,B) std::is_same_v 17 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/ChooseClass.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** Chooses between two different classes based on a boolean. */ 8 | template 9 | class TChooseClass; 10 | 11 | template 12 | class TChooseClass 13 | { 14 | public: 15 | typedef TrueClass Result; 16 | }; 17 | 18 | template 19 | class TChooseClass 20 | { 21 | public: 22 | typedef FalseClass Result; 23 | }; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/CopyQualifiersFromTo.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Copies the cv-qualifiers from one type to another, e.g.: 7 | * 8 | * TCopyQualifiersFromTo::Type == const T2 9 | * TCopyQualifiersFromTo::Type == const volatile T2 10 | */ 11 | template struct TCopyQualifiersFromTo { typedef To Type; }; 12 | template struct TCopyQualifiersFromTo { typedef const To Type; }; 13 | template struct TCopyQualifiersFromTo< volatile From, To> { typedef volatile To Type; }; 14 | template struct TCopyQualifiersFromTo { typedef const volatile To Type; }; 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/Decay.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/RemoveCV.h" 7 | #include "Templates/RemoveReference.h" 8 | 9 | namespace UE::Core::Private::Decay 10 | { 11 | template 12 | struct TDecayNonReference 13 | { 14 | typedef typename TRemoveCV::Type Type; 15 | }; 16 | 17 | template 18 | struct TDecayNonReference 19 | { 20 | typedef T* Type; 21 | }; 22 | 23 | template 24 | struct TDecayNonReference 25 | { 26 | typedef T* Type; 27 | }; 28 | 29 | template 30 | struct TDecayNonReference 31 | { 32 | typedef RetType (*Type)(Params...); 33 | }; 34 | } 35 | 36 | /** 37 | * Returns the decayed type of T, meaning it removes all references, qualifiers and 38 | * applies array-to-pointer and function-to-pointer conversions. 39 | * 40 | * http://en.cppreference.com/w/cpp/types/decay 41 | */ 42 | template 43 | struct TDecay 44 | { 45 | typedef typename UE::Core::Private::Decay::TDecayNonReference::Type>::Type Type; 46 | }; 47 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/DontCopy.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | // Can be used as a wrapper over non-copyable objects (i.e. FCriticalSection) if you still want the class containing your 8 | // object to keep its copyable property without compromising integrity of the object that doesn't support being copied. 9 | // It makes each TDontCopy member of a class an exclusive entity of that class. 10 | 11 | template 12 | struct TDontCopy 13 | { 14 | TDontCopy() = default; 15 | ~TDontCopy() = default; 16 | TDontCopy(TDontCopy&&) {} 17 | TDontCopy(const TDontCopy&) {} 18 | TDontCopy& operator=(TDontCopy&&) { return *this; } 19 | TDontCopy& operator=(const TDontCopy&) { return *this; } 20 | 21 | T& Get() { return Value; } 22 | const T& Get() const { return Value; } 23 | 24 | T* operator->() { return &Value; } 25 | const T* operator->() const { return &Value; } 26 | 27 | T& operator*() { return Value; } 28 | const T& operator*() const { return Value; } 29 | 30 | private: 31 | T Value; 32 | }; 33 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/EqualTo.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "UnrealTemplate.h" 6 | 7 | /** 8 | * Binary predicate class for performing equality comparisons. 9 | * 10 | * Uses operator== when available. 11 | * 12 | * See: https://en.cppreference.com/w/cpp/utility/functional/equal_to 13 | */ 14 | template 15 | struct TEqualTo 16 | { 17 | constexpr auto operator()(const T& Lhs, const T& Rhs) const -> decltype(Lhs == Rhs) 18 | { 19 | return Lhs == Rhs; 20 | } 21 | }; 22 | 23 | template <> 24 | struct TEqualTo 25 | { 26 | template 27 | constexpr auto operator()(T&& Lhs, U&& Rhs) const -> decltype(Forward(Lhs) == Forward(Rhs)) 28 | { 29 | return Forward(Lhs) == Forward(Rhs); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/Greater.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "UnrealTemplate.h" 7 | 8 | /** 9 | * Binary predicate class for sorting elements in reverse order. Assumes < operator is defined for the template type. 10 | * 11 | * See: http://en.cppreference.com/w/cpp/utility/functional/greater 12 | */ 13 | template 14 | struct TGreater 15 | { 16 | FORCEINLINE bool operator()(const T& A, const T& B) const 17 | { 18 | return B < A; 19 | } 20 | }; 21 | 22 | template <> 23 | struct TGreater 24 | { 25 | template 26 | FORCEINLINE bool operator()(T&& A, U&& B) const 27 | { 28 | return Forward(B) < Forward(A); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/Identity.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Returns the same type passed to it. This is useful in a few cases, but mainly for inhibiting template argument deduction in function arguments, e.g.: 7 | * 8 | * template 9 | * void Func1(T Val); // Can be called like Func(123) or Func(123); 10 | * 11 | * template 12 | * void Func2(typename TIdentity::Type Val); // Must be called like Func(123) 13 | * 14 | * Equivalent to C++20's std::type_identity. 15 | */ 16 | template 17 | struct TIdentity 18 | { 19 | typedef T Type; 20 | }; 21 | 22 | template 23 | using TIdentity_T = typename TIdentity::Type; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IdentityFunctor.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" 6 | 7 | /** 8 | * A functor which returns whatever is passed to it. Mainly used for generic composition. 9 | */ 10 | struct FIdentityFunctor 11 | { 12 | template 13 | FORCEINLINE T&& operator()(T&& Val) const 14 | { 15 | return (T&&)Val; 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IntegralConstant.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Defines a value metafunction of the given Value. 9 | */ 10 | template 11 | struct TIntegralConstant 12 | { 13 | static constexpr T Value = Val; 14 | }; 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsAbstract.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Traits class which tests if a type is abstract. 7 | */ 8 | template 9 | struct TIsAbstract 10 | { 11 | enum { Value = __is_abstract(T) }; 12 | }; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsArray.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which tests if a type is a C++ array. 9 | */ 10 | template struct TIsArray { enum { Value = false }; }; 11 | template struct TIsArray { enum { Value = true }; }; 12 | template struct TIsArray { enum { Value = true }; }; 13 | 14 | /** 15 | * Traits class which tests if a type is a bounded C++ array. 16 | */ 17 | template struct TIsBoundedArray { enum { Value = false }; }; 18 | template struct TIsBoundedArray { enum { Value = true }; }; 19 | 20 | /** 21 | * Traits class which tests if a type is an unbounded C++ array. 22 | */ 23 | template struct TIsUnboundedArray { enum { Value = false }; }; 24 | template struct TIsUnboundedArray { enum { Value = true }; }; 25 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsClass.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Determines if T is a struct/class type 9 | */ 10 | template 11 | struct TIsClass 12 | { 13 | private: 14 | template static uint16 Func(int U::*); 15 | template static uint8 Func(...); 16 | 17 | public: 18 | enum { Value = !__is_union(T) && sizeof(Func(0)) - 1 }; 19 | }; 20 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsConst.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Traits class which tests if a type is const. 7 | */ 8 | template 9 | struct TIsConst 10 | { 11 | static constexpr bool Value = false; 12 | }; 13 | 14 | template 15 | struct TIsConst 16 | { 17 | static constexpr bool Value = true; 18 | }; 19 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsConstructible.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Determines if T is constructible from a set of arguments. 7 | */ 8 | template 9 | struct TIsConstructible 10 | { 11 | enum { Value = __is_constructible(T, Args...) }; 12 | }; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsEnum.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | template 6 | struct TIsEnum 7 | { 8 | enum { Value = __is_enum(T) }; 9 | }; 10 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsEnumClass.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/AndOrNot.h" 7 | 8 | namespace UE::Core::Private::IsEnumClass 9 | { 10 | template 11 | struct TIsEnumConvertibleToInt 12 | { 13 | static char (&Resolve(int))[2]; 14 | static char Resolve(...); 15 | 16 | enum { Value = sizeof(Resolve(T())) - 1 }; 17 | }; 18 | } 19 | 20 | /** 21 | * Traits class which tests if a type is arithmetic. 22 | */ 23 | template 24 | struct TIsEnumClass 25 | { 26 | enum { Value = TAndValue<__is_enum(T), TNot>>::Value }; 27 | }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsFloatingPoint.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which tests if a type is floating point. 9 | */ 10 | template 11 | struct TIsFloatingPoint 12 | { 13 | enum { Value = false }; 14 | }; 15 | 16 | template <> struct TIsFloatingPoint { enum { Value = true }; }; 17 | template <> struct TIsFloatingPoint { enum { Value = true }; }; 18 | template <> struct TIsFloatingPoint { enum { Value = true }; }; 19 | 20 | template struct TIsFloatingPoint { enum { Value = TIsFloatingPoint::Value }; }; 21 | template struct TIsFloatingPoint< volatile T> { enum { Value = TIsFloatingPoint::Value }; }; 22 | template struct TIsFloatingPoint { enum { Value = TIsFloatingPoint::Value }; }; 23 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsInitializerList.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | /** 8 | * Traits class which tests if a type is an initializer list. 9 | */ 10 | template 11 | struct TIsInitializerList 12 | { 13 | static constexpr bool Value = false; 14 | }; 15 | 16 | template 17 | struct TIsInitializerList> 18 | { 19 | static constexpr bool Value = true; 20 | }; 21 | 22 | template struct TIsInitializerList { enum { Value = TIsInitializerList::Value }; }; 23 | template struct TIsInitializerList< volatile T> { enum { Value = TIsInitializerList::Value }; }; 24 | template struct TIsInitializerList { enum { Value = TIsInitializerList::Value }; }; 25 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsMemberPointer.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Templates/IsPointer.h" 7 | 8 | /** 9 | * Traits class which tests if a type is a pointer to member (data member or member function). 10 | */ 11 | template 12 | struct TIsMemberPointer 13 | { 14 | enum { Value = false }; 15 | }; 16 | 17 | template struct TIsMemberPointer { enum { Value = true }; }; 18 | 19 | template struct TIsMemberPointer { enum { Value = TIsPointer::Value }; }; 20 | template struct TIsMemberPointer< volatile T> { enum { Value = TIsPointer::Value }; }; 21 | template struct TIsMemberPointer { enum { Value = TIsPointer::Value }; }; 22 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsPODType.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which tests if a type is POD. 9 | */ 10 | template 11 | struct TIsPODType 12 | { 13 | enum { Value = __is_pod(T) }; 14 | }; 15 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsPointer.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which tests if a type is a pointer. 9 | */ 10 | template 11 | struct TIsPointer 12 | { 13 | enum { Value = false }; 14 | }; 15 | 16 | template struct TIsPointer { enum { Value = true }; }; 17 | 18 | template struct TIsPointer { enum { Value = TIsPointer::Value }; }; 19 | template struct TIsPointer< volatile T> { enum { Value = TIsPointer::Value }; }; 20 | template struct TIsPointer { enum { Value = TIsPointer::Value }; }; 21 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsPolymorphic.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | /** 6 | * Traits class which tests if a type is polymorphic (virtual). 7 | */ 8 | template 9 | struct TIsPolymorphic 10 | { 11 | enum { Value = __is_polymorphic(T) }; 12 | }; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsSigned.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which tests if a type is a signed integral type. 9 | */ 10 | template 11 | struct TIsSigned 12 | { 13 | enum { Value = false }; 14 | }; 15 | 16 | template <> struct TIsSigned { enum { Value = true }; }; 17 | template <> struct TIsSigned { enum { Value = true }; }; 18 | template <> struct TIsSigned { enum { Value = true }; }; 19 | template <> struct TIsSigned { enum { Value = true }; }; 20 | 21 | template struct TIsSigned { enum { Value = TIsSigned::Value }; }; 22 | template struct TIsSigned< volatile T> { enum { Value = TIsSigned::Value }; }; 23 | template struct TIsSigned { enum { Value = TIsSigned::Value }; }; 24 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsTrivial.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/AndOrNot.h" 6 | #include "Templates/IsTriviallyDestructible.h" 7 | #include "Templates/IsTriviallyCopyConstructible.h" 8 | #include "Templates/IsTriviallyCopyAssignable.h" 9 | 10 | /** 11 | * Traits class which tests if a type is trivial. 12 | */ 13 | template 14 | struct TIsTrivial 15 | { 16 | enum { Value = TAnd, TIsTriviallyCopyConstructible, TIsTriviallyCopyAssignable>::Value }; 17 | }; 18 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsTriviallyCopyAssignable.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include 7 | 8 | /** 9 | * Traits class which tests if a type has a trivial copy assignment operator. 10 | */ 11 | template 12 | struct TIsTriviallyCopyAssignable 13 | { 14 | enum { Value = std::is_trivially_copy_assignable_v }; 15 | }; 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsTriviallyCopyConstructible.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include 7 | 8 | /** 9 | * Traits class which tests if a type has a trivial copy constructor. 10 | */ 11 | template 12 | struct TIsTriviallyCopyConstructible 13 | { 14 | enum { Value = std::is_trivially_copy_constructible_v }; 15 | }; 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsTriviallyDestructible.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include 5 | 6 | /** 7 | * Traits class which tests if a type has a trivial destructor. 8 | */ 9 | template 10 | struct TIsTriviallyDestructible 11 | { 12 | enum { Value = std::is_trivially_destructible_v }; 13 | }; 14 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsUECoreType.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include 7 | 8 | /** 9 | * Traits class which tests if a type is a core variant type (e.g. FVector, which supports FVector3f/FVector3d float/double variants. 10 | * Can be used to determine if the provided type is a core variant type in general: 11 | * e.g. TIsUECoreVariant::Value == false 12 | * TIsUECoreVariant::Value == true 13 | * and also to determine if it is a variant type of a particular component type: 14 | * e.g TIsUECoreVariant::Value == false 15 | * TIsUECoreVariant::Value == true 16 | */ 17 | template 18 | struct TIsUECoreVariant 19 | { 20 | enum { Value = false }; 21 | }; 22 | 23 | template 24 | struct TIsUECoreVariant::Value && std::is_same::value, void>::type> 25 | { 26 | enum { Value = true }; 27 | }; 28 | 29 | template 30 | struct TIsUECoreVariant::Value && std::is_same::value, void>::type> 31 | { 32 | enum { Value = true }; 33 | }; 34 | 35 | /** 36 | * Traits class which tests if a type is part of the core types included in CoreMinimal.h. 37 | */ 38 | template 39 | struct TIsUECoreType 40 | { 41 | enum { Value = TIsUECoreVariant::Value }; // Variant types are automatically core types 42 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/IsValidVariadicFunctionArg.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "IsEnum.h" 7 | 8 | /** 9 | * Tests if a type is a valid argument to a variadic function, e.g. printf. 10 | */ 11 | template ::Value> 12 | struct TIsValidVariadicFunctionArg 13 | { 14 | private: 15 | static uint32 Tester(uint32); 16 | static uint32 Tester(uint8); 17 | static uint32 Tester(int32); 18 | static uint32 Tester(uint64); 19 | static uint32 Tester(int64); 20 | static uint32 Tester(double); 21 | static uint32 Tester(long); 22 | static uint32 Tester(unsigned long); 23 | static uint32 Tester(TCHAR); 24 | static uint32 Tester(bool); 25 | static uint32 Tester(const void*); 26 | static uint8 Tester(...); 27 | 28 | static T DeclValT(); 29 | 30 | public: 31 | enum { Value = sizeof(Tester(DeclValT())) == sizeof(uint32) }; 32 | }; 33 | 34 | template 35 | struct TIsValidVariadicFunctionArg 36 | { 37 | enum { Value = true }; 38 | }; 39 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/Less.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "UnrealTemplate.h" 7 | 8 | /** 9 | * Binary predicate class for sorting elements in order. Assumes < operator is defined for the template type. 10 | * Forward declaration exists in ContainersFwd.h 11 | * 12 | * See: http://en.cppreference.com/w/cpp/utility/functional/less 13 | */ 14 | template 15 | struct TLess 16 | { 17 | FORCEINLINE bool operator()(const T& A, const T& B) const 18 | { 19 | return A < B; 20 | } 21 | }; 22 | 23 | template <> 24 | struct TLess 25 | { 26 | template 27 | FORCEINLINE bool operator()(T&& A, U&& B) const 28 | { 29 | return Forward(A) < Forward(B); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/LosesQualifiersFromTo.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/CopyQualifiersFromTo.h" 6 | #include 7 | 8 | /** 9 | * Tests if qualifiers are lost between one type and another, e.g.: 10 | * 11 | * TLosesQualifiersFromTo::Value == true 12 | * TLosesQualifiersFromTo::Value == false 13 | */ 14 | template 15 | struct TLosesQualifiersFromTo 16 | { 17 | enum { Value = !std::is_same_v::Type, To> }; 18 | }; 19 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/MakeSigned.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which gets the signed version of an integer type. 9 | */ 10 | template 11 | struct TMakeSigned 12 | { 13 | static_assert(sizeof(T) == 0, "Unsupported type in TMakeSigned."); 14 | }; 15 | 16 | template struct TMakeSigned { using Type = const typename TMakeSigned::Type; }; 17 | template struct TMakeSigned< volatile T> { using Type = volatile typename TMakeSigned::Type; }; 18 | template struct TMakeSigned { using Type = const volatile typename TMakeSigned::Type; }; 19 | 20 | template <> struct TMakeSigned { using Type = int8; }; 21 | template <> struct TMakeSigned { using Type = int8; }; 22 | template <> struct TMakeSigned { using Type = int16; }; 23 | template <> struct TMakeSigned { using Type = int16; }; 24 | template <> struct TMakeSigned { using Type = int32; }; 25 | template <> struct TMakeSigned { using Type = int32; }; 26 | template <> struct TMakeSigned { using Type = int64; }; 27 | template <> struct TMakeSigned { using Type = int64; }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/MakeUnsigned.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Traits class which gets the unsigned version of an integer type. 9 | */ 10 | template 11 | struct TMakeUnsigned 12 | { 13 | static_assert(sizeof(T) == 0, "Unsupported type in TMakeUnsigned."); 14 | }; 15 | 16 | template struct TMakeUnsigned { using Type = const typename TMakeUnsigned::Type; }; 17 | template struct TMakeUnsigned< volatile T> { using Type = volatile typename TMakeUnsigned::Type; }; 18 | template struct TMakeUnsigned { using Type = const volatile typename TMakeUnsigned::Type; }; 19 | 20 | template <> struct TMakeUnsigned { using Type = uint8; }; 21 | template <> struct TMakeUnsigned { using Type = uint8; }; 22 | template <> struct TMakeUnsigned { using Type = uint16; }; 23 | template <> struct TMakeUnsigned { using Type = uint16; }; 24 | template <> struct TMakeUnsigned { using Type = uint32; }; 25 | template <> struct TMakeUnsigned { using Type = uint32; }; 26 | template <> struct TMakeUnsigned { using Type = uint64; }; 27 | template <> struct TMakeUnsigned { using Type = uint64; }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/MaxSizeof.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** Finds the maximum sizeof the supplied types */ 8 | template 9 | struct TMaxSizeof; 10 | 11 | template <> 12 | struct TMaxSizeof<> 13 | { 14 | static constexpr uint32 Value = 0; 15 | }; 16 | 17 | template 18 | struct TMaxSizeof 19 | { 20 | static const uint32 Value = sizeof(T) > TMaxSizeof::Value ? sizeof(T) : TMaxSizeof::Value; 21 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/RemoveCV.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * TRemoveCV will remove any const/volatile qualifiers from a type. 9 | * (based on std::remove_cv<> 10 | * note: won't remove the const from "const int*", as the pointer is not const 11 | */ 12 | template struct TRemoveCV { typedef T Type; }; 13 | template struct TRemoveCV { typedef T Type; }; 14 | template struct TRemoveCV { typedef T Type; }; 15 | template struct TRemoveCV { typedef T Type; }; 16 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/RemoveExtent.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Removes one dimension of extents from an array type. 9 | */ 10 | template struct TRemoveExtent { typedef T Type; }; 11 | template struct TRemoveExtent { typedef T Type; }; 12 | template struct TRemoveExtent { typedef T Type; }; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/RemoveReference.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * TRemoveReference will remove any references from a type. 9 | */ 10 | template struct TRemoveReference { typedef T Type; }; 11 | template struct TRemoveReference { typedef T Type; }; 12 | template struct TRemoveReference { typedef T Type; }; 13 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/ReversePredicate.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Templates/Invoke.h" 6 | #include "Templates/UnrealTemplate.h" 7 | 8 | /** 9 | * Helper class to reverse a predicate. 10 | * Performs Predicate(B, A) 11 | */ 12 | template 13 | class TReversePredicate 14 | { 15 | const PredicateType& Predicate; 16 | 17 | public: 18 | TReversePredicate( const PredicateType& InPredicate ) 19 | : Predicate( InPredicate ) 20 | { 21 | } 22 | 23 | template 24 | FORCEINLINE bool operator()( T&& A, T&& B ) const 25 | { 26 | return Invoke( Predicate, Forward(B), Forward(A) ); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/ScopedCallback.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | 8 | /** 9 | * Helper object for batching callback requests and firing on destruction of the FScopedCallback object. 10 | * CallbackType is a class implementing a static method called FireCallback, which does the work. 11 | */ 12 | template< class CallbackType > 13 | class TScopedCallback 14 | { 15 | public: 16 | 17 | TScopedCallback() 18 | : Counter(0) 19 | { } 20 | 21 | /** Fires a callback if outstanding requests exist. */ 22 | ~TScopedCallback() 23 | { 24 | if (HasRequests()) 25 | { 26 | CallbackType::FireCallback(); 27 | } 28 | } 29 | 30 | /** Request a callback. */ 31 | void Request() 32 | { 33 | ++Counter; 34 | } 35 | 36 | /** Unrequest a callback. */ 37 | void Unrequest() 38 | { 39 | --Counter; 40 | } 41 | 42 | /** 43 | * Checks whether this callback has outstanding requests. 44 | * 45 | * @return true if there are outstanding requests, false otherwise. 46 | */ 47 | bool HasRequests() const 48 | { 49 | return Counter > 0; 50 | } 51 | 52 | private: 53 | 54 | /** Counts callback requests. */ 55 | int32 Counter; 56 | }; 57 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Templates/SharedPointerFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" // For "uint8" 6 | 7 | /** 8 | * ESPMode is used select between either 'fast' or 'thread safe' shared pointer types. 9 | * This is only used by templates at compile time to generate one code path or another. 10 | */ 11 | enum class ESPMode : uint8 12 | { 13 | /** Forced to be not thread-safe. */ 14 | NotThreadSafe = 0, 15 | 16 | /** Thread-safe, never spin locks, but slower */ 17 | ThreadSafe = 1 18 | }; 19 | 20 | 21 | // Forward declarations. By default, thread safety features are turned on. (Mode = ESPMode::ThreadSafe). 22 | // If you need more concerned with performance of ref-counting, you should use ESPMode::NotThreadSafe. 23 | template< class ObjectType, ESPMode Mode = ESPMode::ThreadSafe > class TSharedRef; 24 | template< class ObjectType, ESPMode Mode = ESPMode::ThreadSafe > class TSharedPtr; 25 | template< class ObjectType, ESPMode Mode = ESPMode::ThreadSafe > class TWeakPtr; 26 | template< class ObjectType, ESPMode Mode = ESPMode::ThreadSafe > class TSharedFromThis; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Traits/IsCharType.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | 7 | /** 8 | * Type trait which tests if a type is a character encoding type. 9 | */ 10 | template struct TIsCharType { enum { Value = false }; }; 11 | template<> struct TIsCharType { enum { Value = true }; }; 12 | template<> struct TIsCharType { enum { Value = true }; }; 13 | #if !PLATFORM_UCS2CHAR_IS_UTF16CHAR 14 | template<> struct TIsCharType { enum { Value = true }; }; 15 | #endif 16 | template<> struct TIsCharType { enum { Value = true }; }; 17 | template<> struct TIsCharType { enum { Value = true }; }; 18 | template<> struct TIsCharType { enum { Value = true }; }; 19 | #if PLATFORM_TCHAR_IS_CHAR16 20 | template<> struct TIsCharType { enum { Value = true }; }; 21 | #endif 22 | 23 | template 24 | constexpr inline bool TIsCharType_V = TIsCharType::Value; 25 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Traits/IsFixedWidthCharEncoding.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include 6 | #include "Traits/IsCharType.h" 7 | 8 | #ifndef PLATFORM_TCHAR_IS_CHAR16 9 | #error "Traits/IsFixedWidthCharEncoding.h should be included after platform headers" 10 | #endif 11 | 12 | namespace UE::Core::Private 13 | { 14 | /** 15 | * Tests whether an encoding has fixed-width characters 16 | */ 17 | template 18 | constexpr bool IsFixedWidthEncodingImpl() 19 | { 20 | return 21 | std::is_same_v || 22 | std::is_same_v || // this may not be true when PLATFORM_UCS2CHAR_IS_UTF16CHAR == 1, but this is the legacy behavior 23 | std::is_same_v || // the UCS2CHAR comment also applies to WIDECHAR 24 | #if PLATFORM_TCHAR_IS_CHAR16 25 | std::is_same_v || // the UCS2CHAR comment also applies to wchar_t 26 | #endif 27 | std::is_same_v; 28 | } 29 | } 30 | 31 | template 32 | struct TIsFixedWidthCharEncoding 33 | { 34 | static_assert(TIsCharType_V, "Encoding is not a character encoding type"); 35 | 36 | static constexpr bool Value = UE::Core::Private::IsFixedWidthEncodingImpl>(); 37 | }; 38 | 39 | template 40 | constexpr inline bool TIsFixedWidthCharEncoding_V = TIsFixedWidthCharEncoding::Value; 41 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Traits/IsVoidType.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // HEADER_UNIT_SKIP - Deprecated 6 | 7 | template struct TIsVoidTypeBase { enum { Value = false }; }; 8 | template<> struct TIsVoidTypeBase { enum { Value = true }; }; 9 | template<> struct TIsVoidTypeBase { enum { Value = true }; }; 10 | template<> struct TIsVoidTypeBase { enum { Value = true }; }; 11 | template<> struct TIsVoidTypeBase { enum { Value = true }; }; 12 | 13 | /** 14 | * TIsVoidType 15 | */ 16 | template struct UE_DEPRECATED(5.2, "TIsVoidType has been deprecated, please use std::is_void instead.") TIsVoidType : TIsVoidTypeBase {}; 17 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/AutomationObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Automation stream 8 | struct FAutomationObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // New automated screenshot test defaults for more consistent results 16 | DefaultToScreenshotCameraCutAndFixedTonemapping, 17 | 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | private: 27 | FAutomationObjectVersion() {} 28 | }; 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/BlueprintsObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Blueprints stream 8 | struct FBlueprintsObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | OverridenEventReferenceFixup, 15 | CleanBlueprintFunctionFlags, 16 | ArrayGetByRefUpgrade, 17 | EdGraphPinOptimized, 18 | AllowDeletionConformed, 19 | AdvancedContainerSupport, 20 | SCSHasComponentTemplateClass, 21 | ComponentTemplateClassSupport, 22 | ArrayGetFuncsReplacedByCustomNode, 23 | DisallowObjectConfigVars, 24 | 25 | // ------------------------------------------------------ 26 | VersionPlusOne, 27 | LatestVersion = VersionPlusOne - 1 28 | }; 29 | 30 | // The GUID for this custom version number 31 | const static FGuid GUID; 32 | 33 | private: 34 | FBlueprintsObjectVersion() {} 35 | }; 36 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/BuildObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Build stream 8 | struct FBuildObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | 16 | // ------------------------------------------------------ 17 | VersionPlusOne, 18 | LatestVersion = VersionPlusOne - 1 19 | }; 20 | 21 | // The GUID for this custom version number 22 | const static FGuid GUID; 23 | 24 | private: 25 | FBuildObjectVersion() {} 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/CineCameraObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for cine camera 8 | struct FCineCameraObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded, 14 | 15 | // Changed default filmback to digital film 16 | ChangeDefaultFilmbackToDigitalFilm, 17 | 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | private: 27 | FCineCameraObjectVersion() {} 28 | }; 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/CoreObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Core stream 8 | struct FCoreObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | MaterialInputNativeSerialize, 15 | EnumProperties, 16 | SkeletalMaterialEditorDataStripping, 17 | FProperties, 18 | 19 | // ------------------------------------------------------ 20 | VersionPlusOne, 21 | LatestVersion = VersionPlusOne - 1 22 | }; 23 | 24 | // The GUID for this custom version number 25 | const static FGuid GUID; 26 | 27 | private: 28 | FCoreObjectVersion() {} 29 | }; 30 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/DebugSerializationFlags.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | /*============================================================================= 4 | DebugSerializationFlags.h: 5 | Set custom flags on the archive to help track issues while serializing 6 | =============================================================================*/ 7 | 8 | #pragma once 9 | 10 | #include "CoreTypes.h" 11 | 12 | // Debug serialization flags 13 | enum EDebugSerializationFlags 14 | { 15 | /** No special flags */ 16 | DSF_None = 0x00000000, 17 | 18 | /** 19 | * If FDiffSerializeArchive is being used, instruct it to NOT report diffs while this flag is set. 20 | * This is used e.g. when serializing offsets that are likely to change when there is any other change 21 | * in the serialization of the package. 22 | */ 23 | DSF_IgnoreDiff UE_DEPRECATED(5.0, "Diffing now compares the final value after serialization is complete; marking diffs is usually not required. Use FArchiveStackTraceIgnoreScope where it is still necessary.") 24 | = 0x00000001, 25 | DSF_EnableCookerWarnings = 0x00000002, 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/ExternalPhysicsMaterialCustomObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made to physics materials 8 | struct FExternalPhysicsMaterialCustomObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // Added material masks to Chaos 16 | AddedMaterialMasks, 17 | 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | private: 27 | FExternalPhysicsMaterialCustomObjectVersion() {} 28 | }; 29 | 30 | 31 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/FortniteShaderworkObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DevObjectVersion.h" 5 | #include "Containers/Map.h" 6 | 7 | // System Guids for changes made in the Fortnite Shaderwork stream 8 | struct FFortniteShaderworkObjectVersion 9 | { 10 | static TMap GetSystemGuids(); 11 | 12 | private: 13 | FFortniteShaderworkObjectVersion() {} 14 | }; -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/GeometryObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Private-Geometry stream 8 | struct FGeometryObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | // Compress Geometry Cache Flipbooks to save disk space 15 | CompressGeometryCache, 16 | // Fix for serializing in Mesh vertices for new DynamicMeshVertex layout 17 | DynamicMeshVertexLayoutChange, 18 | //Added support for explicit motion vectors 19 | ExplicitMotionVectors, 20 | // ------------------------------------------------------ 21 | VersionPlusOne, 22 | LatestVersion = VersionPlusOne - 1 23 | }; 24 | 25 | // The GUID for this custom version number 26 | const static FGuid GUID; 27 | 28 | private: 29 | FGeometryObjectVersion() {} 30 | }; 31 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/LoadTimesObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "HAL/Platform.h" 5 | 6 | struct FGuid; 7 | 8 | // Custom serialization version for changes made in LoadTimes stream 9 | struct FLoadTimesObjectVersion 10 | { 11 | enum Type 12 | { 13 | // Before any version changes were made 14 | BeforeCustomVersionWasAdded = 0, 15 | 16 | // Allows uncompressed reflection captures for cooked builds 17 | UncompressedReflectionCapturesForCookedBuilds, 18 | 19 | // ------------------------------------------------------ 20 | VersionPlusOne, 21 | LatestVersion = VersionPlusOne - 1 22 | }; 23 | 24 | // The GUID for this custom version number 25 | const static FGuid GUID; 26 | 27 | private: 28 | FLoadTimesObjectVersion() {} 29 | }; 30 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/MediaFrameWorkObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Editor stream 8 | struct FMediaFrameworkObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | // Serialize GUIDs instead of plain names for MediaSource platform/player map 15 | SerializeGUIDsInMediaSourceInsteadOfPlainNames, 16 | // Serialize GUIDs instead of plain names for PlatformMediaSource platform/mediasource map 17 | SerializeGUIDsInPlatformMediaSourceInsteadOfPlainNames, 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | private: 27 | FMediaFrameworkObjectVersion() {} 28 | }; 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/MobileObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Mobile stream 8 | struct FMobileObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // Removed LightmapUVBias, ShadowmapUVBias from per-instance data 16 | InstancedStaticMeshLightmapSerialization, 17 | 18 | // Added stationary point/spot light direct contribution to volumetric lightmaps. 19 | LQVolumetricLightmapLayers, 20 | 21 | // Store Reflection Capture in compressed format for mobile 22 | StoreReflectionCaptureCompressedMobile, 23 | 24 | // ------------------------------------------------------ 25 | VersionPlusOne, 26 | LatestVersion = VersionPlusOne - 1 27 | }; 28 | 29 | // The GUID for this custom version number 30 | const static FGuid GUID; 31 | 32 | private: 33 | FMobileObjectVersion() {} 34 | }; 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/NetworkingObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Networking stream 8 | struct FNetworkingObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | 16 | // ------------------------------------------------------ 17 | VersionPlusOne, 18 | LatestVersion = VersionPlusOne - 1 19 | }; 20 | 21 | // The GUID for this custom version number 22 | const static FGuid GUID; 23 | 24 | private: 25 | FNetworkingObjectVersion() {} 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/NiagaraObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Niagara stream 8 | struct FNiagaraObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | SkeletalMeshVertexSampling = 1, 16 | 17 | // ------------------------------------------------------ 18 | VersionPlusOne, 19 | LatestVersion = VersionPlusOne - 1 20 | }; 21 | 22 | // The GUID for this custom version number 23 | const static FGuid GUID; 24 | 25 | private: 26 | FNiagaraObjectVersion() {} 27 | }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/OnlineObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Online stream 8 | struct FOnlineObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | 16 | // ------------------------------------------------------ 17 | VersionPlusOne, 18 | LatestVersion = VersionPlusOne - 1 19 | }; 20 | 21 | // The GUID for this custom version number 22 | const static FGuid GUID; 23 | 24 | private: 25 | FOnlineObjectVersion() {} 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/PlatformObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-Platform stream 8 | struct FPlatformObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | 16 | // ------------------------------------------------------ 17 | VersionPlusOne, 18 | LatestVersion = VersionPlusOne - 1 19 | }; 20 | 21 | // The GUID for this custom version number 22 | const static FGuid GUID; 23 | 24 | private: 25 | FPlatformObjectVersion() {} 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/ReflectionCaptureObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "HAL/Platform.h" 5 | 6 | struct FGuid; 7 | 8 | // Custom serialization version for changes made for a private stream 9 | struct FReflectionCaptureObjectVersion 10 | { 11 | enum Type 12 | { 13 | // Before any version changes were made 14 | BeforeCustomVersionWasAdded = 0, 15 | 16 | // Allows uncompressed reflection captures for cooked builds 17 | MoveReflectionCaptureDataToMapBuildData, 18 | 19 | // ------------------------------------------------------ 20 | VersionPlusOne, 21 | LatestVersion = VersionPlusOne - 1 22 | }; 23 | 24 | // The GUID for this custom version number 25 | const static FGuid GUID; 26 | 27 | private: 28 | FReflectionCaptureObjectVersion() {} 29 | }; 30 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/UE5CookerObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in the UE5 Dev-Cooker stream 8 | struct FUE5CookerObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // ------------------------------------------------------ 16 | 17 | VersionPlusOne, 18 | LatestVersion = VersionPlusOne - 1 19 | }; 20 | 21 | // The GUID for this custom version number 22 | const static FGuid GUID; 23 | 24 | private: 25 | FUE5CookerObjectVersion() {} 26 | }; 27 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/UE5LWCRenderingStreamObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in //UE5/Main stream 8 | struct FUE5LWCRenderingStreamObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // Various global shader values converted to LWC types 16 | LWCTypesInShaders, 17 | 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | FUE5LWCRenderingStreamObjectVersion() = delete; 27 | }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/UObjectHierarchyFwd.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | struct UObjectBase; 6 | struct UObjectBaseUtility; 7 | struct UObject; 8 | struct UField; 9 | class UEnum; 10 | struct FProperty; 11 | class FObjectProperty; 12 | struct UStruct; 13 | struct UFunction; 14 | struct UClass; 15 | struct UScriptStruct; 16 | class FLinker; 17 | class FLinkerLoad; 18 | class FLinkerSave; 19 | class UPackage; 20 | class USystem; 21 | class UTextBuffer; 22 | class UPackageMap; 23 | class UObjectRedirector; 24 | struct FField; 25 | struct FProperty; 26 | class FByteProperty; 27 | class FUInt16Property; 28 | class FUInt32Property; 29 | class FUInt64Property; 30 | class FInt8Property; 31 | class FInt16Property; 32 | class FIntProperty; 33 | class FInt64Property; 34 | class FBoolProperty; 35 | class FFloatProperty; 36 | class FDoubleProperty; 37 | class FObjectPropertyBase; 38 | class FObjectProperty; 39 | class FClassProperty; 40 | class FInterfaceProperty; 41 | class FWeakObjectProperty; 42 | class FLazyObjectProperty; 43 | class FSoftObjectProperty; 44 | class FSoftClassProperty; 45 | class FNameProperty; 46 | class FStructProperty; 47 | class FStrProperty; 48 | class FTextProperty; 49 | class FArrayProperty; 50 | class FDelegateProperty; 51 | class FMulticastDelegateProperty; 52 | class FMapProperty; 53 | class FSetProperty; 54 | class FEnumProperty; 55 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/VRObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-VR stream 8 | struct FVRObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // Change UMotionControllerComponent from using EControllerHand to FName for motion source 16 | UseFNameInsteadOfEControllerHandForMotionSource, 17 | 18 | // Change how ARSessionConfig stores plane detection configuration from bitmask to bools 19 | UseBoolsForARSessionConfigPlaneDetectionConfiguration, 20 | 21 | // Change how UStereoLayerComponent stores additional properties for non-quad layer types 22 | UseSubobjectForStereoLayerShapeProperties, 23 | 24 | // ------------------------------------------------------ 25 | VersionPlusOne, 26 | LatestVersion = VersionPlusOne - 1 27 | }; 28 | 29 | // The GUID for this custom version number 30 | const static FGuid GUID; 31 | 32 | private: 33 | FVRObjectVersion() {} 34 | }; 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/UObject/VirtualProductionObjectVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | #include "Misc/Guid.h" 6 | 7 | // Custom serialization version for changes made in Dev-VirtualProduction stream 8 | struct FVirtualProductionObjectVersion 9 | { 10 | enum Type 11 | { 12 | // Before any version changes were made 13 | BeforeCustomVersionWasAdded = 0, 14 | 15 | // Aja LTC pin support 16 | SupportAjaLTCPin, 17 | 18 | // ------------------------------------------------------ 19 | VersionPlusOne, 20 | LatestVersion = VersionPlusOne - 1 21 | }; 22 | 23 | // The GUID for this custom version number 24 | const static FGuid GUID; 25 | 26 | FVirtualProductionObjectVersion() = delete; 27 | }; 28 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/AllowWindowsPlatformTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error 4 | #include "HAL/Platform.h" 5 | #if !PLATFORM_WINDOWS 6 | #include "Microsoft/AllowMicrosoftPlatformTypes.h" 7 | #else 8 | 9 | 10 | #include "Windows/WindowsHWrapper.h" 11 | 12 | #ifndef WINDOWS_PLATFORM_TYPES_GUARD 13 | #define WINDOWS_PLATFORM_TYPES_GUARD 14 | #else 15 | #error Nesting AllowWindowsPlatformTypes.h is not allowed! 16 | #endif 17 | 18 | #pragma warning( push ) 19 | #pragma warning( disable : 4459 ) 20 | 21 | #define INT ::INT 22 | #define UINT ::UINT 23 | #define DWORD ::DWORD 24 | #define FLOAT ::FLOAT 25 | 26 | #define TRUE 1 27 | #define FALSE 0 28 | 29 | #endif //PLATFORM_* 30 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/COMPointer.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | // Producing a warning that is not treated as an error here calls non-deterministic incremental build warnings 6 | //#pragma message(__FILE__"(5): warning : #include Microsoft/COMPointer.h instead of Windows/COMPointer.h") 7 | 8 | #include "Microsoft/COMPointer.h" 9 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/HideWindowsPlatformAtomics.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // HEADER_UNIT_SKIP - Not included directly 4 | 5 | // #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error 6 | #include "HAL/Platform.h" 7 | #if !PLATFORM_WINDOWS 8 | #include "Microsoft/HideMicrosoftPlatformAtomics.h" 9 | #else 10 | 11 | #ifdef WINDOWS_PLATFORM_ATOMICS_GUARD 12 | #undef WINDOWS_PLATFORM_ATOMICS_GUARD 13 | #else 14 | #error Mismatched HideWindowsPlatformAtomics.h detected. 15 | #endif 16 | 17 | #undef InterlockedIncrement 18 | #undef InterlockedDecrement 19 | #undef InterlockedAdd 20 | #undef InterlockedExchange 21 | #undef InterlockedExchangeAdd 22 | #undef InterlockedCompareExchange 23 | #undef InterlockedCompareExchangePointer 24 | #undef InterlockedExchange64 25 | #undef InterlockedExchangeAdd64 26 | #undef InterlockedCompareExchange64 27 | #undef InterlockedIncrement64 28 | #undef InterlockedDecrement64 29 | #undef InterlockedAnd 30 | #undef InterlockedOr 31 | #undef InterlockedXor 32 | 33 | 34 | #endif //PLATFORM_* 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/HideWindowsPlatformTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // HEADER_UNIT_SKIP - Not included directly 4 | 5 | // #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error 6 | #include "HAL/Platform.h" 7 | #if !PLATFORM_WINDOWS 8 | #include "Microsoft/HideMicrosoftPlatformTypes.h" 9 | #else 10 | 11 | #ifdef WINDOWS_PLATFORM_TYPES_GUARD 12 | #undef WINDOWS_PLATFORM_TYPES_GUARD 13 | #else 14 | #error Mismatched HideWindowsPlatformTypes.h detected. 15 | #endif 16 | 17 | #undef INT 18 | #undef UINT 19 | #undef DWORD 20 | #undef FLOAT 21 | 22 | #ifdef TRUE 23 | #undef TRUE 24 | #endif 25 | 26 | #ifdef FALSE 27 | #undef FALSE 28 | #endif 29 | 30 | #pragma warning( pop ) 31 | 32 | #endif //PLATFORM_* 33 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/MinimalWindowsApi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #if !PLATFORM_WINDOWS 6 | #error this file is for PLATFORM_WINDOWS only 7 | #endif 8 | 9 | // redirect to new file 10 | #include "Microsoft/MinimalWindowsApi.h" 11 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/PreWindowsApi.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | // #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error 4 | #include "HAL/Platform.h" 5 | #if !PLATFORM_WINDOWS 6 | #include "Microsoft/PreWindowsApi.h" 7 | #else 8 | 9 | // Disable the warning that the pack size is changed in this header. We do this globally for 10 | // clang, since the mechanism of using a sub-header to modify packing generates a -Wpragma-pack 11 | // warning about modifying packing alignemnt in a header. 12 | #if !defined(__clang__) 13 | #pragma warning(disable:4103) 14 | #endif // __clang__ 15 | 16 | 17 | // The 10.0.18362.0 SDK introduces an error if the packing isn't the default for the platform. 18 | PRAGMA_PUSH_PLATFORM_DEFAULT_PACKING 19 | 20 | // Save these macros for later; Windows redefines them 21 | #pragma push_macro("MAX_uint8") 22 | #pragma push_macro("MAX_uint16") 23 | #pragma push_macro("MAX_uint32") 24 | #pragma push_macro("MAX_int32") 25 | #pragma push_macro("TEXT") 26 | #pragma push_macro("TRUE") 27 | #pragma push_macro("FALSE") 28 | 29 | // Undefine the TEXT macro for winnt.h to redefine it, unless it's already been included 30 | #ifndef _WINNT_ 31 | #undef TEXT 32 | #endif 33 | 34 | // Disable all normal third party headers 35 | THIRD_PARTY_INCLUDES_START 36 | 37 | #endif //PLATFORM_* 38 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsErrorOutputDevice.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/OutputDeviceError.h" 7 | #include "Misc/OutputDeviceConsole.h" 8 | 9 | class FWindowsErrorOutputDevice : public FOutputDeviceError 10 | { 11 | public: 12 | /** Constructor, initializing member variables */ 13 | FWindowsErrorOutputDevice(); 14 | 15 | /** 16 | * Serializes the passed in data unless the current event is suppressed. 17 | * 18 | * @param Data Text to log 19 | * @param Event Event name used for suppression purposes 20 | */ 21 | virtual void Serialize( const TCHAR* Msg, ELogVerbosity::Type Verbosity, const class FName& Category ) override; 22 | 23 | /** 24 | * Error handling function that is being called from within the system wide global 25 | * error handler, e.g. using structured exception handling on the PC. 26 | */ 27 | virtual void HandleError() override; 28 | 29 | protected: 30 | /** 31 | * Callback to allow FWindowsApplicationErrorOutputDevice to restore the UI. 32 | */ 33 | virtual void HandleErrorRestoreUI(); 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsEventLogOutputDevice.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Misc/OutputDevice.h" 7 | #include "Windows/MinimalWindowsApi.h" 8 | 9 | class FName; 10 | 11 | /** 12 | * Output device that writes to Windows Event Log 13 | */ 14 | class FWindowsEventLogOutputDevice 15 | : public FOutputDevice 16 | { 17 | /** Handle to the event log object */ 18 | Windows::HANDLE EventLog; 19 | 20 | public: 21 | /** 22 | * Constructor, initializing member variables 23 | */ 24 | FWindowsEventLogOutputDevice(); 25 | 26 | /** Destructor that cleans up any remaining resources */ 27 | virtual ~FWindowsEventLogOutputDevice(); 28 | 29 | virtual void Serialize(const TCHAR* Buffer, ELogVerbosity::Type Verbosity, const class FName& Category) override; 30 | 31 | /** Does nothing */ 32 | virtual void Flush(void); 33 | 34 | /** 35 | * Closes any event log handles that are open 36 | */ 37 | virtual void TearDown(void); 38 | }; 39 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsHWrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | // #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error 5 | #include "HAL/Platform.h" 6 | #if !PLATFORM_WINDOWS 7 | #include "Microsoft/WindowsHWrapper.h" 8 | #else 9 | 10 | #include "CoreTypes.h" 11 | #include "HAL/PlatformMemory.h" 12 | #include "Windows/PreWindowsApi.h" 13 | #ifndef STRICT 14 | #define STRICT 15 | #endif 16 | #include "Windows/MinWindows.h" 17 | #include "Windows/PostWindowsApi.h" 18 | 19 | #endif //PLATFORM_* -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsPlatformAffinity.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "GenericPlatform/GenericPlatformAffinity.h" 6 | typedef FGenericPlatformAffinity FPlatformAffinity; 7 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsPlatformCrashContext.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "Microsoft/MicrosoftPlatformCrashContext.h" 7 | 8 | #if !defined(WINDOWS_CRASHCONTEXT_WITH_CUSTOM_HANDLERS) 9 | #define WINDOWS_CRASHCONTEXT_WITH_CUSTOM_HANDLERS 0 10 | #endif 11 | 12 | 13 | struct FWindowsPlatformCrashContext : public FMicrosoftPlatformCrashContext 14 | { 15 | static const TCHAR* const UEGPUAftermathMinidumpName; 16 | 17 | FWindowsPlatformCrashContext(ECrashContextType InType, const TCHAR* InErrorMessage) 18 | : FMicrosoftPlatformCrashContext(InType, InErrorMessage) 19 | { 20 | } 21 | 22 | 23 | virtual void AddPlatformSpecificProperties() const override; 24 | virtual void CopyPlatformSpecificFiles(const TCHAR* OutputDirectory, void* Context) override; 25 | }; 26 | 27 | typedef FWindowsPlatformCrashContext FPlatformCrashContext; 28 | 29 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsPlatformFile.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsPlatformMath.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #if !PLATFORM_WINDOWS 6 | #error this code should only be included on Windows 7 | #endif 8 | 9 | #if PLATFORM_CPU_X86_FAMILY 10 | #include 11 | #include 12 | #endif 13 | 14 | #include "Microsoft/MicrosoftPlatformMath.h" 15 | 16 | typedef FMicrosoftPlatformMathBase FWindowsPlatformMath; 17 | typedef FWindowsPlatformMath FPlatformMath; 18 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/API/UE/Windows/WindowsPlatformOutputDevices.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreTypes.h" 6 | #include "GenericPlatform/GenericPlatformOutputDevices.h" 7 | 8 | class FOutputDevice; 9 | class FOutputDeviceConsole; 10 | class FOutputDeviceError; 11 | class FFeedbackContext; 12 | 13 | struct FWindowsPlatformOutputDevices 14 | : public FGenericPlatformOutputDevices 15 | { 16 | static FOutputDevice* GetEventLog(); 17 | static FOutputDeviceError* GetError(); 18 | }; 19 | 20 | 21 | typedef FWindowsPlatformOutputDevices FPlatformOutputDevices; 22 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/IApiUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Ark/ArkApiUtils.h" 4 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/IHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "HAL/UnrealMemory.h" 5 | 6 | namespace AsaApi 7 | { 8 | class ARK_API IHooks 9 | { 10 | public: 11 | virtual ~IHooks() = default; 12 | 13 | /** 14 | * \brief Hooks a function. Hooks are called in the reverse order. 15 | * \param func_name Function full name 16 | * \param detour A pointer to the detour function, which will override the target function 17 | * \param original A pointer to the trampoline function, which will be used to call the original target function 18 | * \return true if success, false otherwise 19 | */ 20 | template 21 | bool SetHook(const std::string& func_name, LPVOID detour, T** original) 22 | { 23 | return SetHookInternal(func_name, detour, reinterpret_cast(original)); 24 | } 25 | 26 | /** 27 | * \brief Removes a hook from a function 28 | * \param func_name Function full name 29 | * \param detour A pointer to the detour function 30 | * \return true if success, false otherwise 31 | */ 32 | virtual bool DisableHook(const std::string& func_name, LPVOID detour) = 0; 33 | 34 | private: 35 | virtual bool SetHookInternal(const std::string& func_name, LPVOID detour, 36 | LPVOID* original) = 0; 37 | }; 38 | 39 | ARK_API IHooks& APIENTRY GetHooks(); 40 | } // namespace AsaApi 41 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../API/Base.h" 4 | #include "Logger/spdlog/spdlog.h" 5 | 6 | ARK_API std::vector& APIENTRY GetLogSinks(); 7 | 8 | class Log 9 | { 10 | public: 11 | Log(const Log&) = delete; 12 | Log(Log&&) = delete; 13 | Log& operator=(const Log&) = delete; 14 | Log& operator=(Log&&) = delete; 15 | 16 | static Log& Get() 17 | { 18 | static Log instance; 19 | return instance; 20 | } 21 | 22 | static std::shared_ptr& GetLog() 23 | { 24 | return Get().logger_; 25 | } 26 | 27 | void Init(const std::string& plugin_name) 28 | { 29 | auto& sinks = GetLogSinks(); 30 | 31 | logger_ = std::make_shared(plugin_name, begin(sinks), end(sinks)); 32 | 33 | logger_->set_pattern("%D %R [%n][%l] %v"); 34 | logger_->flush_on(spdlog::level::info); 35 | } 36 | 37 | private: 38 | Log() = default; 39 | ~Log() = default; 40 | 41 | std::shared_ptr logger_; 42 | }; 43 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "../common.h" 9 | #include "../details/os.h" 10 | 11 | 12 | #include 13 | #include 14 | 15 | namespace spdlog 16 | { 17 | namespace details 18 | { 19 | struct log_msg 20 | { 21 | log_msg() = default; 22 | log_msg(const std::string *loggers_name, level::level_enum lvl) : 23 | logger_name(loggers_name), 24 | level(lvl), 25 | msg_id(0) 26 | { 27 | #ifndef SPDLOG_NO_DATETIME 28 | time = os::now(); 29 | #endif 30 | 31 | #ifndef SPDLOG_NO_THREAD_ID 32 | thread_id = os::thread_id(); 33 | #endif 34 | } 35 | 36 | log_msg(const log_msg& other) = delete; 37 | log_msg& operator=(log_msg&& other) = delete; 38 | log_msg(log_msg&& other) = delete; 39 | 40 | 41 | const std::string *logger_name; 42 | level::level_enum level; 43 | log_clock::time_point time; 44 | size_t thread_id; 45 | fmt::MemoryWriter raw; 46 | fmt::MemoryWriter formatted; 47 | size_t msg_id; 48 | }; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include 9 | // null, no cost dummy "mutex" and dummy "atomic" int 10 | 11 | namespace spdlog 12 | { 13 | namespace details 14 | { 15 | struct null_mutex 16 | { 17 | void lock() {} 18 | void unlock() {} 19 | bool try_lock() 20 | { 21 | return true; 22 | } 23 | }; 24 | 25 | struct null_atomic_int 26 | { 27 | int value; 28 | null_atomic_int() = default; 29 | 30 | null_atomic_int(int val):value(val) 31 | {} 32 | 33 | int load(std::memory_order) const 34 | { 35 | return value; 36 | } 37 | 38 | void store(int val) 39 | { 40 | value = val; 41 | } 42 | }; 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/fmt/bundled/ostream.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Formatting library for C++ - std::ostream support 3 | 4 | Copyright (c) 2012 - 2016, Victor Zverovich 5 | All rights reserved. 6 | 7 | For the license information refer to format.h. 8 | */ 9 | 10 | #include "ostream.h" 11 | 12 | namespace fmt { 13 | 14 | namespace internal { 15 | FMT_FUNC void write(std::ostream &os, Writer &w) { 16 | const char *data = w.data(); 17 | typedef internal::MakeUnsigned::Type UnsignedStreamSize; 18 | UnsignedStreamSize size = w.size(); 19 | UnsignedStreamSize max_size = 20 | internal::to_unsigned((std::numeric_limits::max)()); 21 | do { 22 | UnsignedStreamSize n = size <= max_size ? size : max_size; 23 | os.write(data, static_cast(n)); 24 | data += n; 25 | size -= n; 26 | } while (size != 0); 27 | } 28 | } 29 | 30 | FMT_FUNC void print(std::ostream &os, CStringRef format_str, ArgList args) { 31 | MemoryWriter w; 32 | w.write(format_str, args); 33 | internal::write(os, w); 34 | } 35 | } // namespace fmt 36 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/fmt/bundled/printf.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Formatting library for C++ 3 | 4 | Copyright (c) 2012 - 2016, Victor Zverovich 5 | All rights reserved. 6 | 7 | For the license information refer to format.h. 8 | */ 9 | 10 | #include "format.h" 11 | #include "printf.h" 12 | 13 | namespace fmt { 14 | 15 | template 16 | void printf(BasicWriter &w, BasicCStringRef format, ArgList args); 17 | 18 | FMT_FUNC int fprintf(std::FILE *f, CStringRef format, ArgList args) { 19 | MemoryWriter w; 20 | printf(w, format, args); 21 | std::size_t size = w.size(); 22 | return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast(size); 23 | } 24 | 25 | #ifndef FMT_HEADER_ONLY 26 | 27 | template void PrintfFormatter::format(CStringRef format); 28 | template void PrintfFormatter::format(WCStringRef format); 29 | 30 | #endif // FMT_HEADER_ONLY 31 | 32 | } // namespace fmt 33 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #ifndef FMT_USE_WINDOWS_H 19 | #define FMT_USE_WINDOWS_H 0 20 | #endif 21 | #include "bundled/format.h" 22 | #if defined(SPDLOG_FMT_PRINTF) 23 | #include "bundled/printf.h" 24 | #endif 25 | 26 | #else //external fmtlib 27 | 28 | #include 29 | #if defined(SPDLOG_FMT_PRINTF) 30 | #include 31 | #endif 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // include external or bundled copy of fmtlib's ostream support 9 | // 10 | #if !defined(SPDLOG_FMT_EXTERNAL) 11 | #include "fmt.h" 12 | #include "bundled/ostream.h" 13 | #else 14 | #include 15 | #endif 16 | 17 | 18 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "details/log_msg.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace spdlog 15 | { 16 | namespace details 17 | { 18 | class flag_formatter; 19 | } 20 | 21 | class formatter 22 | { 23 | public: 24 | virtual ~formatter() {} 25 | virtual void format(details::log_msg& msg) = 0; 26 | }; 27 | 28 | class pattern_formatter SPDLOG_FINAL : public formatter 29 | { 30 | 31 | public: 32 | explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local); 33 | pattern_formatter(const pattern_formatter&) = delete; 34 | pattern_formatter& operator=(const pattern_formatter&) = delete; 35 | void format(details::log_msg& msg) override; 36 | private: 37 | const std::string _pattern; 38 | const pattern_time_type _pattern_time; 39 | std::vector> _formatters; 40 | std::tm get_time(details::log_msg& msg); 41 | void handle_flag(char flag); 42 | void compile_pattern(const std::string& pattern); 43 | }; 44 | } 45 | 46 | #include "details/pattern_formatter_impl.h" 47 | 48 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/base_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // base sink templated over a mutex (either dummy or real) 9 | // concrete implementation should only override the _sink_it method. 10 | // all locking is taken care of here so no locking needed by the implementers.. 11 | // 12 | 13 | #include "sink.h" 14 | #include "../formatter.h" 15 | #include "../common.h" 16 | #include "../details/log_msg.h" 17 | 18 | #include 19 | 20 | namespace spdlog 21 | { 22 | namespace sinks 23 | { 24 | template 25 | class base_sink:public sink 26 | { 27 | public: 28 | base_sink():_mutex() {} 29 | virtual ~base_sink() = default; 30 | 31 | base_sink(const base_sink&) = delete; 32 | base_sink& operator=(const base_sink&) = delete; 33 | 34 | void log(const details::log_msg& msg) SPDLOG_FINAL override 35 | { 36 | std::lock_guard lock(_mutex); 37 | _sink_it(msg); 38 | } 39 | void flush() SPDLOG_FINAL override 40 | { 41 | std::lock_guard lock(_mutex); 42 | _flush(); 43 | } 44 | 45 | protected: 46 | virtual void _sink_it(const details::log_msg& msg) = 0; 47 | virtual void _flush() = 0; 48 | Mutex _mutex; 49 | }; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Alexander Dalshov. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #if defined(_WIN32) 9 | 10 | #include "base_sink.h" 11 | #include "../details/null_mutex.h" 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | namespace spdlog 19 | { 20 | namespace sinks 21 | { 22 | /* 23 | * MSVC sink (logging using OutputDebugStringA) 24 | */ 25 | template 26 | class msvc_sink : public base_sink < Mutex > 27 | { 28 | public: 29 | explicit msvc_sink() 30 | { 31 | } 32 | 33 | 34 | 35 | protected: 36 | void _sink_it(const details::log_msg& msg) override 37 | { 38 | OutputDebugStringA(msg.formatted.c_str()); 39 | } 40 | 41 | void _flush() override 42 | {} 43 | }; 44 | 45 | typedef msvc_sink msvc_sink_mt; 46 | typedef msvc_sink msvc_sink_st; 47 | 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "base_sink.h" 9 | #include "../details/null_mutex.h" 10 | 11 | #include 12 | 13 | namespace spdlog 14 | { 15 | namespace sinks 16 | { 17 | 18 | template 19 | class null_sink : public base_sink < Mutex > 20 | { 21 | protected: 22 | void _sink_it(const details::log_msg&) override 23 | {} 24 | 25 | void _flush() override 26 | {} 27 | 28 | }; 29 | typedef null_sink null_sink_st; 30 | typedef null_sink null_sink_mt; 31 | 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "../details/null_mutex.h" 9 | #include "base_sink.h" 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog 15 | { 16 | namespace sinks 17 | { 18 | template 19 | class ostream_sink: public base_sink 20 | { 21 | public: 22 | explicit ostream_sink(std::ostream& os, bool force_flush=false) :_ostream(os), _force_flush(force_flush) {} 23 | ostream_sink(const ostream_sink&) = delete; 24 | ostream_sink& operator=(const ostream_sink&) = delete; 25 | virtual ~ostream_sink() = default; 26 | 27 | protected: 28 | void _sink_it(const details::log_msg& msg) override 29 | { 30 | _ostream.write(msg.formatted.data(), msg.formatted.size()); 31 | if (_force_flush) 32 | _ostream.flush(); 33 | } 34 | 35 | void _flush() override 36 | { 37 | _ostream.flush(); 38 | } 39 | 40 | std::ostream& _ostream; 41 | bool _force_flush; 42 | }; 43 | 44 | typedef ostream_sink ostream_sink_mt; 45 | typedef ostream_sink ostream_sink_st; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | 7 | #pragma once 8 | 9 | #include "../details/log_msg.h" 10 | 11 | namespace spdlog 12 | { 13 | namespace sinks 14 | { 15 | class sink 16 | { 17 | public: 18 | sink() 19 | { 20 | _level = level::trace; 21 | } 22 | 23 | virtual ~sink() {} 24 | virtual void log(const details::log_msg& msg) = 0; 25 | virtual void flush() = 0; 26 | 27 | bool should_log(level::level_enum msg_level) const; 28 | void set_level(level::level_enum log_level); 29 | level::level_enum level() const; 30 | 31 | private: 32 | level_t _level; 33 | 34 | }; 35 | 36 | inline bool sink::should_log(level::level_enum msg_level) const 37 | { 38 | return msg_level >= _level.load(std::memory_order_relaxed); 39 | } 40 | 41 | inline void sink::set_level(level::level_enum log_level) 42 | { 43 | _level.store(log_level); 44 | } 45 | 46 | inline level::level_enum sink::level() const 47 | { 48 | return static_cast(_level.load(std::memory_order_relaxed)); 49 | } 50 | 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Logger/spdlog/sinks/windebug_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2017 Alexander Dalshov. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #if defined(_WIN32) 9 | 10 | #include "msvc_sink.h" 11 | 12 | namespace spdlog 13 | { 14 | namespace sinks 15 | { 16 | 17 | /* 18 | * Windows debug sink (logging using OutputDebugStringA, synonym for msvc_sink) 19 | */ 20 | template 21 | using windebug_sink = msvc_sink; 22 | 23 | typedef msvc_sink_mt windebug_sink_mt; 24 | typedef msvc_sink_st windebug_sink_st; 25 | 26 | } 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /AsaApi/Core/Public/Tools.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace AsaApi::Tools 8 | { 9 | ARK_API std::string GetCurrentDir(); 10 | 11 | /** 12 | * \brief Converts a wide Unicode string to an UTF8 string 13 | */ 14 | ARK_API std::string Utf8Encode(const std::wstring& wstr); 15 | 16 | /** 17 | * \brief Converts an UTF8 string to a wide Unicode String 18 | */ 19 | ARK_API std::wstring Utf8Decode(const std::string& str); 20 | 21 | /** 22 | * \brief Returns true if plugin was loaded, false otherwise 23 | */ 24 | ARK_API bool IsPluginLoaded(const std::string& plugin_name); 25 | 26 | /** 27 | * \brief Returns Current Running Api Version 28 | */ 29 | ARK_API float GetApiVersion(); 30 | } // namespace Tools // namespace ArkApi 31 | 32 | // For back compatibility 33 | namespace API 34 | { 35 | namespace Tools = AsaApi::Tools; 36 | } 37 | -------------------------------------------------------------------------------- /AsaApi/vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asaapi", 3 | "version": "1.0.0", 4 | "dependencies": [ 5 | { 6 | "name": "fmt" 7 | }, 8 | { 9 | "name": "openssl" 10 | }, 11 | { 12 | "name": "poco", 13 | "features": [ "netssl" ] 14 | }, 15 | { 16 | "name": "detours" 17 | }, 18 | { 19 | "name": "zlib" 20 | }, 21 | { 22 | "name": "minizip" 23 | } 24 | ], 25 | "builtin-baseline": "06c79a9afa6f99f02f44d20df9e0848b2a56bf1b" 26 | } 27 | -------------------------------------------------------------------------------- /Configs/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "settings": { 3 | "AutomaticPluginReloading": true, 4 | "AutomaticPluginReloadSeconds": 5, 5 | "SaveWorldBeforePluginReload": true, 6 | "AttachToParent": true, 7 | "DefaultMessaging": "Default", 8 | "DeleteOldLogs": { 9 | "Enable": true, 10 | "MaxAge": 24 11 | }, 12 | "AutomaticCacheDownload": { 13 | "Enable": true, 14 | "DownloadCacheURL": "https://cdn.pelayori.com/cache/" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Game Servers Hub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------