//////////////////////////////////////////////////////////////////////////////// // (c) Copyright, Ubisoft Entertainment Inc. || Created by Harbour // //////////////////////////////////////////////////////////////////////////////// #pragma once #if !defined(US_UNITY3D) #include #include #endif /// @cond PRIVATE_API namespace US_NS {; namespace Ubiservices_BF { void initLockChecker(); }; #if defined(US_DLL) /// Initializes the eal interface when using a share library. /// @note Internal usage only. void US_DLL_API initializeEal(const eal_log_dll_interface* logInterface, const eal_mem_dll_interface* memInterface); #endif /// Verifies macros mismatch (eg.: _ITERATOR_DEBUG_LEVEL). /// @note Internal usage only. void US_DLL_API verifyDefineMismatch(uint32 debugIteratorLevel); void initializeSdk(const eal_log_dll_interface* logInterface, const eal_mem_dll_interface* memInterface) { #if !defined(US_UNITY3D) #if defined(US_DLL) eal_log_dll_interface logInterfaceDefault; eal_mem_dll_interface memInterfaceDefault; #if !defined(EAL_IMPORT_DLL) if (logInterface == nullptr) { EalLogDllPopulateInterface(logInterfaceDefault); } if (memInterface == nullptr) { EalMemDllPopulateInterface(memInterfaceDefault); } #endif initializeEal( logInterface == nullptr ? &logInterfaceDefault : logInterface, memInterface == nullptr ? &memInterfaceDefault : memInterface); #else US_UNUSED(logInterface); US_UNUSED(memInterface); EalLogLibInit(); EalMemLibInit(); #endif #else US_UNUSED(logInterface); US_UNUSED(memInterface); #endif #if defined(US_LOCK_RESTRICTIONS_ENABLED) && !defined(US_DLL) Ubiservices_BF::initLockChecker(); #endif #if defined(US_DEBUG) && ((defined(US_TARGET_WINDOWS) && defined(US_DLL))) verifyDefineMismatch(static_cast(_ITERATOR_DEBUG_LEVEL)); #endif } }; /// @endcond