123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #pragma once
- #include "Containers/Map.h"
- #include "HAL/UnrealMemory.h"
- #include "Serialization/MemoryLayout.h"
- namespace WwiseUnrealHelper
- {
- WWISEUTILS_API void SetHelperFunctions(
- FString(*GetWwisePluginDirectoryImpl)(),
- FString(*GetWwiseProjectPathImpl)(),
- FString(*GetSoundBankDirectoryImpl)(),
- FString(*GetStagePathImpl)()
- );
- WWISEUTILS_API FString GetWwisePluginDirectory();
- WWISEUTILS_API FString GetWwiseProjectPath();
- WWISEUTILS_API FString GetSoundBankDirectory();
- WWISEUTILS_API void TrimPath(FString& Path);
- WWISEUTILS_API FString GetProjectDirectory();
- WWISEUTILS_API FString GetThirdPartyDirectory();
- WWISEUTILS_API FString GetContentDirectory();
- WWISEUTILS_API FString GetExternalSourceDirectory();
- WWISEUTILS_API FString GetWwiseProjectDirectoryPath();
- WWISEUTILS_API FString GetWwiseSoundBankInfoCachePath();
- WWISEUTILS_API FString FormatFolderPath(FString folderPath);
- WWISEUTILS_API bool MakePathRelativeToWwiseProject(FString& AbsolutePath);
- extern WWISEUTILS_API const TCHAR* MediaFolderName;
- extern WWISEUTILS_API const FGuid InitBankID;
- #if WITH_EDITOR
- WWISEUTILS_API FString GuidToBankName(const FGuid& Guid);
- WWISEUTILS_API FGuid BankNameToGuid(const FString& BankName);
- #endif
- template <typename T>
- struct TMallocDelete
- {
- DECLARE_INLINE_TYPE_LAYOUT(TMallocDelete, NonVirtual);
- TMallocDelete() = default;
- TMallocDelete(const TMallocDelete&) = default;
- TMallocDelete& operator=(const TMallocDelete&) = default;
- ~TMallocDelete() = default;
- template <
- typename U,
- typename = decltype(ImplicitConv<T*>((U*)nullptr))
- >
- TMallocDelete(const TMallocDelete<U>&)
- {
- }
- template <
- typename U,
- typename = decltype(ImplicitConv<T*>((U*)nullptr))
- >
- TMallocDelete& operator=(const TMallocDelete<U>&)
- {
- return *this;
- }
- void operator()(T* Ptr) const
- {
- FMemory::Free(Ptr);
- }
- };
- }
|