diff --git a/Assets/Plugins/FMOD/fmod.cs b/Assets/Plugins/FMOD/fmod.cs index b21ea1d..4ac3197 100644 --- a/Assets/Plugins/FMOD/fmod.cs +++ b/Assets/Plugins/FMOD/fmod.cs @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - C# wrapper. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* For more detail visit: */ /* https://fmod.com/resources/documentation-api?version=2.0&page=core-api.html */ @@ -19,8 +19,8 @@ namespace FMOD */ public partial class VERSION { - public const int number = 0x00020111; -#if !UNITY_2017_4_OR_NEWER + public const int number = 0x00020206; +#if !UNITY_2019_4_OR_NEWER public const string dll = "fmod"; #endif } @@ -146,6 +146,15 @@ namespace FMOD public VECTOR up; } + [StructLayout(LayoutKind.Sequential)] + public partial struct GUID + { + public int Data1; + public int Data2; + public int Data3; + public int Data4; + } + [StructLayout(LayoutKind.Sequential)] public struct ASYNCREADINFO { @@ -183,10 +192,24 @@ namespace FMOD NNAUDIO, WINSONIC, AAUDIO, + AUDIOWORKLET, MAX, } + public enum PORT_TYPE : int + { + MUSIC, + COPYRIGHT_MUSIC, + VOICE, + CONTROLLER, + PERSONAL, + VIBRATION, + AUX, + + MAX + } + public enum DEBUG_MODE : int { TTY, @@ -480,6 +503,17 @@ namespace FMOD public StringWrapper functionparams; } + [StructLayout(LayoutKind.Sequential)] + public struct CPU_USAGE + { + public float dsp; /* DSP mixing CPU usage. */ + public float stream; /* Streaming engine CPU usage. */ + public float geometry; /* Geometry engine CPU usage. */ + public float update; /* System::update CPU usage. */ + public float convolution1; /* Convolution reverb processing thread #1 CPU usage */ + public float convolution2; /* Convolution reverb processing thread #2 CPU usage */ + } + [Flags] public enum SYSTEM_CALLBACK_TYPE : uint { @@ -617,20 +651,20 @@ namespace FMOD public int numsubsounds; public IntPtr inclusionlist; public int inclusionlistnum; - public SOUND_PCMREAD_CALLBACK pcmreadcallback; - public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback; - public SOUND_NONBLOCK_CALLBACK nonblockcallback; + public IntPtr pcmreadcallback_internal; + public IntPtr pcmsetposcallback_internal; + public IntPtr nonblockcallback_internal; public IntPtr dlsname; public IntPtr encryptionkey; public int maxpolyphony; public IntPtr userdata; public SOUND_TYPE suggestedsoundtype; - public FILE_OPEN_CALLBACK fileuseropen; - public FILE_CLOSE_CALLBACK fileuserclose; - public FILE_READ_CALLBACK fileuserread; - public FILE_SEEK_CALLBACK fileuserseek; - public FILE_ASYNCREAD_CALLBACK fileuserasyncread; - public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel; + public IntPtr fileuseropen_internal; + public IntPtr fileuserclose_internal; + public IntPtr fileuserread_internal; + public IntPtr fileuserseek_internal; + public IntPtr fileuserasyncread_internal; + public IntPtr fileuserasynccancel_internal; public IntPtr fileuserdata; public int filebuffersize; public CHANNELORDER channelorder; @@ -642,6 +676,53 @@ namespace FMOD public uint minmidigranularity; public int nonblockthreadid; public IntPtr fsbguid; + + public SOUND_PCMREAD_CALLBACK pcmreadcallback + { + set { pcmreadcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return pcmreadcallback_internal == IntPtr.Zero ? null : (SOUND_PCMREAD_CALLBACK)Marshal.GetDelegateForFunctionPointer(pcmreadcallback_internal, typeof(SOUND_PCMREAD_CALLBACK)); } + } + public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback + { + set { pcmsetposcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return pcmsetposcallback_internal == IntPtr.Zero ? null : (SOUND_PCMSETPOS_CALLBACK)Marshal.GetDelegateForFunctionPointer(pcmsetposcallback_internal, typeof(SOUND_PCMSETPOS_CALLBACK)); } + } + public SOUND_NONBLOCK_CALLBACK nonblockcallback + { + set { nonblockcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return nonblockcallback_internal == IntPtr.Zero ? null : (SOUND_NONBLOCK_CALLBACK)Marshal.GetDelegateForFunctionPointer(nonblockcallback_internal, typeof(SOUND_NONBLOCK_CALLBACK)); } + } + public FILE_OPEN_CALLBACK fileuseropen + { + set { fileuseropen_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuseropen_internal == IntPtr.Zero ? null : (FILE_OPEN_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuseropen_internal, typeof(FILE_OPEN_CALLBACK)); } + } + public FILE_CLOSE_CALLBACK fileuserclose + { + set { fileuserclose_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserclose_internal == IntPtr.Zero ? null : (FILE_CLOSE_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserclose_internal, typeof(FILE_CLOSE_CALLBACK)); } + } + public FILE_READ_CALLBACK fileuserread + { + set { fileuserread_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserread_internal == IntPtr.Zero ? null : (FILE_READ_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserread_internal, typeof(FILE_READ_CALLBACK)); } + } + public FILE_SEEK_CALLBACK fileuserseek + { + set { fileuserseek_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserseek_internal == IntPtr.Zero ? null : (FILE_SEEK_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserseek_internal, typeof(FILE_SEEK_CALLBACK)); } + } + public FILE_ASYNCREAD_CALLBACK fileuserasyncread + { + set { fileuserasyncread_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserasyncread_internal == IntPtr.Zero ? null : (FILE_ASYNCREAD_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserasyncread_internal, typeof(FILE_ASYNCREAD_CALLBACK)); } + } + public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel + { + set { fileuserasynccancel_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserasynccancel_internal == IntPtr.Zero ? null : (FILE_ASYNCCANCEL_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserasynccancel_internal, typeof(FILE_ASYNCCANCEL_CALLBACK)); } + } + } #pragma warning disable 414 @@ -685,7 +766,6 @@ namespace FMOD public class PRESET { - /* Instance Env Diffus Room RoomHF RmLF DecTm DecHF DecLF Refl RefDel Revb RevDel ModTm ModDp HFRef LFRef Diffus Densty FLAGS */ public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES( 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f );} public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f );} public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES( 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f );} @@ -736,6 +816,7 @@ namespace FMOD public DSP_RESAMPLER resamplerMethod; public uint randomSeed; public int maxConvolutionThreads; + public int maxOpusCodecs; } [Flags] @@ -796,7 +877,7 @@ namespace FMOD } [Flags] - public enum THREAD_AFFINITY : long // avoid ulong for Bolt compatibility + public enum THREAD_AFFINITY : long { /* Platform agnostic thread groupings */ GROUP_DEFAULT = 0x4000000000000000, @@ -865,12 +946,12 @@ namespace FMOD { public static RESULT System_Create(out System system) { - return FMOD5_System_Create(out system.handle); + return FMOD5_System_Create(out system.handle, VERSION.number); } #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Create(out IntPtr system); + private static extern RESULT FMOD5_System_Create(out IntPtr system, uint headerversion); #endregion } @@ -920,11 +1001,6 @@ namespace FMOD { public static RESULT SetAttributes(THREAD_TYPE type, THREAD_AFFINITY affinity = THREAD_AFFINITY.GROUP_DEFAULT, THREAD_PRIORITY priority = THREAD_PRIORITY.DEFAULT, THREAD_STACK_SIZE stacksize = THREAD_STACK_SIZE.DEFAULT) { - if ((affinity & THREAD_AFFINITY.GROUP_DEFAULT) != 0) - { - affinity &= ~THREAD_AFFINITY.GROUP_DEFAULT; - affinity = (THREAD_AFFINITY)(((ulong)affinity) | 0x8000000000000000); - } return FMOD5_Thread_SetAttributes(type, affinity, priority, stacksize); } @@ -1097,24 +1173,10 @@ namespace FMOD { return FMOD5_System_GetDSPInfoByPlugin(this.handle, handle, out description); } - /* - public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority) - public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority = 0) - public RESULT registerCodec(ref CODEC_DESCRIPTION description, out uint handle, uint priority) - { - return FMOD5_System_RegisterCodec(this.handle, ref description, out handle, priority); - } - */ public RESULT registerDSP(ref DSP_DESCRIPTION description, out uint handle) { return FMOD5_System_RegisterDSP(this.handle, ref description, out handle); } - /* - public RESULT registerOutput(ref OUTPUT_DESCRIPTION description, out uint handle) - { - return FMOD5_System_RegisterOutput(this.handle, ref description, out handle); - } - */ // Init/Close. public RESULT init(int maxchannels, INITFLAGS flags, IntPtr extradriverdata) @@ -1209,13 +1271,9 @@ namespace FMOD { return FMOD5_System_GetChannelsPlaying(this.handle, out channels, out realchannels); } - public RESULT getCPUUsage(out float dsp, out float stream, out float geometry, out float update, out float total) + public RESULT getCPUUsage(out CPU_USAGE usage) { - return FMOD5_System_GetCPUUsage(this.handle, out dsp, out stream, out geometry, out update, out total); - } - public RESULT getCPUUsageEx(out float convolutionThread1, out float convolutionThread2) - { - return FMOD5_System_GetCPUUsageEx(this.handle, out convolutionThread1, out convolutionThread2); + return FMOD5_System_GetCPUUsage(this.handle, out usage); } public RESULT getFileUsage(out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead) { @@ -1319,7 +1377,7 @@ namespace FMOD } // Routing to ports. - public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false) + public RESULT attachChannelGroupToPort(PORT_TYPE portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false) { return FMOD5_System_AttachChannelGroupToPort(this.handle, portType, portIndex, channelgroup.handle, passThru); } @@ -1511,12 +1569,8 @@ namespace FMOD private static extern RESULT FMOD5_System_CreateDSPByPlugin (IntPtr system, uint handle, out IntPtr dsp); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetDSPInfoByPlugin (IntPtr system, uint handle, out IntPtr description); - //[DllImport(VERSION.dll)] - //private static extern RESULT FMOD5_System_RegisterCodec (IntPtr system, out CODEC_DESCRIPTION description, out uint handle, uint priority); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_RegisterDSP (IntPtr system, ref DSP_DESCRIPTION description, out uint handle); - //[DllImport(VERSION.dll)] - //private static extern RESULT FMOD5_System_RegisterOutput (IntPtr system, ref OUTPUT_DESCRIPTION description, out uint handle); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_Init (IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata); [DllImport(VERSION.dll)] @@ -1562,9 +1616,7 @@ namespace FMOD [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, out int realchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out float dsp, out float stream, out float geometry, out float update, out float total); - [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetCPUUsageEx (IntPtr system, out float convolutionThread1, out float convolutionThread2); + private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out CPU_USAGE usage); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetFileUsage (IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead); [DllImport(VERSION.dll)] @@ -1598,7 +1650,7 @@ namespace FMOD [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetMasterSoundGroup (IntPtr system, out IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, uint portType, ulong portIndex, IntPtr channelgroup, bool passThru); + private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, PORT_TYPE portType, ulong portIndex, IntPtr channelgroup, bool passThru); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_DetachChannelGroupFromPort(IntPtr system, IntPtr channelgroup); [DllImport(VERSION.dll)] diff --git a/Assets/Plugins/FMOD/fmod_dsp.cs b/Assets/Plugins/FMOD/fmod_dsp.cs index 5df37d0..8c84a56 100644 --- a/Assets/Plugins/FMOD/fmod_dsp.cs +++ b/Assets/Plugins/FMOD/fmod_dsp.cs @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - DSP header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */ /* dsp system. With this header you can make your own DSP plugin that FMOD can */ @@ -231,7 +231,8 @@ namespace FMOD DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2, DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, DSP_PARAMETER_DATA_TYPE_FFT = -4, - DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5 + DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, + DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6 } [StructLayout(LayoutKind.Sequential)] @@ -327,6 +328,13 @@ namespace FMOD public float[] channelweight; } + [StructLayout(LayoutKind.Sequential)] + public struct DSP_PARAMETER_ATTENUATION_RANGE + { + public float min; + public float max; + } + [StructLayout(LayoutKind.Sequential)] public struct DSP_DESCRIPTION { @@ -515,7 +523,7 @@ namespace FMOD public enum DSP_NORMALIZE : int { FADETIME, - THRESHHOLD, + THRESHOLD, MAXAMP } @@ -702,6 +710,8 @@ namespace FMOD OVERALL_GAIN, SURROUND_SPEAKER_MODE, _2D_HEIGHT_BLEND, + ATTENUATION_RANGE, + OVERRIDE_RANGE } public enum DSP_THREE_EQ_CROSSOVERSLOPE_TYPE : int @@ -880,6 +890,8 @@ namespace FMOD _3D_SOUND_SIZE, _3D_MIN_EXTENT, OVERALL_GAIN, - OUTPUTGAIN + OUTPUTGAIN, + ATTENUATION_RANGE, + OVERRIDE_RANGE } } diff --git a/Assets/Plugins/FMOD/fmod_errors.cs b/Assets/Plugins/FMOD/fmod_errors.cs index e7b9cd2..738a347 100644 --- a/Assets/Plugins/FMOD/fmod_errors.cs +++ b/Assets/Plugins/FMOD/fmod_errors.cs @@ -1,6 +1,6 @@ /* ============================================================================================== */ /* FMOD Core / Studio API - Error string header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you want to store or display a string version / english explanation */ /* of the FMOD error codes. */ diff --git a/Assets/Plugins/windows/x86/fmod.dll b/Assets/Plugins/windows/x86/fmod.dll index 6627820..e7af0bf 100644 Binary files a/Assets/Plugins/windows/x86/fmod.dll and b/Assets/Plugins/windows/x86/fmod.dll differ diff --git a/Assets/Plugins/windows/x86/fmodL.dll b/Assets/Plugins/windows/x86/fmodL.dll index e32cd4e..d8911ee 100644 Binary files a/Assets/Plugins/windows/x86/fmodL.dll and b/Assets/Plugins/windows/x86/fmodL.dll differ diff --git a/Assets/Plugins/windows/x86_64/fmod.dll b/Assets/Plugins/windows/x86_64/fmod.dll index 8fd67ab..e1fe7a6 100644 Binary files a/Assets/Plugins/windows/x86_64/fmod.dll and b/Assets/Plugins/windows/x86_64/fmod.dll differ diff --git a/Assets/Plugins/windows/x86_64/fmodL.dll b/Assets/Plugins/windows/x86_64/fmodL.dll index 9f4586b..5f55a7b 100644 Binary files a/Assets/Plugins/windows/x86_64/fmodL.dll and b/Assets/Plugins/windows/x86_64/fmodL.dll differ diff --git a/Assets/Rendering/QuakeRenderPipeline.asset b/Assets/Rendering/QuakeRenderPipeline.asset index 4716735..3224e12 100644 --- a/Assets/Rendering/QuakeRenderPipeline.asset +++ b/Assets/Rendering/QuakeRenderPipeline.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: QuakeRenderPipeline m_EditorClassIdentifier: - k_AssetVersion: 6 - k_AssetPreviousVersion: 5 + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -23,9 +23,13 @@ MonoBehaviour: m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 m_SupportsTerrainHoles: 0 + m_StoreActionsOptimization: 0 m_SupportsHDR: 0 m_MSAA: 1 m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 0 m_MainLightShadowmapResolution: 2048 @@ -33,25 +37,38 @@ MonoBehaviour: m_AdditionalLightsPerObjectLimit: 4 m_AdditionalLightShadowsSupported: 0 m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 m_ShadowDistance: 50 m_ShadowCascadeCount: 1 m_Cascade2Split: 0.25 m_Cascade3Split: {x: 0.1, y: 0.3} m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 m_SoftShadowsSupported: 0 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 m_UseSRPBatcher: 0 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 0 + m_SupportsLightLayers: 0 m_DebugLevel: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 m_MaxPixelLights: 0 m_ShadowAtlasResolution: 256 m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 m_ShadowCascades: 0 diff --git a/Assets/Rendering/QuakeRenderPipeline_Renderer.asset b/Assets/Rendering/QuakeRenderPipeline_Renderer.asset index 01c6067..a2c2b1d 100644 --- a/Assets/Rendering/QuakeRenderPipeline_Renderer.asset +++ b/Assets/Rendering/QuakeRenderPipeline_Renderer.asset @@ -12,8 +12,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} m_Name: QuakeRenderPipeline_Renderer m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} m_RendererFeatures: [] m_RendererFeatureMap: + m_UseNativeRenderPass: 0 postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} shaders: @@ -22,11 +26,17 @@ MonoBehaviour: screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3} samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} - tileDepthInfoPS: {fileID: 0} - tileDeferredPS: {fileID: 0} stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + m_AssetVersion: 1 m_OpaqueLayerMask: serializedVersion: 2 m_Bits: 4294967295 @@ -42,4 +52,8 @@ MonoBehaviour: zFailOperation: 0 m_ShadowTransparentReceive: 0 m_RenderingMode: 0 + m_DepthPrimingMode: 0 m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 1 diff --git a/Assets/Scripts/Data/QModel.cs b/Assets/Scripts/Data/QModel.cs index d3f7310..a5c07c9 100644 --- a/Assets/Scripts/Data/QModel.cs +++ b/Assets/Scripts/Data/QModel.cs @@ -177,7 +177,9 @@ public struct QAliasFrameDesc public QTriVertex bboxMin; public QTriVertex bboxMax; public int frame; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string name; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] nameBytes; + + public string Name => QuakeTextMarshaler.GetString(nameBytes); } /// diff --git a/Assets/Scripts/QuakeTextMarshaler.cs b/Assets/Scripts/QuakeTextMarshaler.cs index c01f2a2..07598e6 100644 --- a/Assets/Scripts/QuakeTextMarshaler.cs +++ b/Assets/Scripts/QuakeTextMarshaler.cs @@ -61,6 +61,16 @@ return sb.ToString(); } + + public static string GetString(byte[] bytes) + { + var sb = new StringBuilder(bytes.Length); + for (int i = 0; i < bytes.Length; ++i) + { + sb.Append(CharacterTable[bytes[i]]); + } + return sb.ToString(); + } public void CleanUpManagedData(object managedObj) { diff --git a/Assets/Scripts/Support/AliasModel.cs b/Assets/Scripts/Support/AliasModel.cs index c35edac..46801bc 100644 --- a/Assets/Scripts/Support/AliasModel.cs +++ b/Assets/Scripts/Support/AliasModel.cs @@ -147,7 +147,7 @@ public class AliasModel for (int frameIdx = 0; frameIdx < header.numFrames; ++frameIdx) { // Individual sequences are identified by their prefix - string frameName = AnimationRegex.Match(header.frames[frameIdx].name ?? "").Value; + string frameName = AnimationRegex.Match(header.frames[frameIdx].Name ?? "").Value; if (animName == null) { animName = frameName; diff --git a/Assets/Shaders/QuakeForwardPass.hlsl b/Assets/Shaders/QuakeForwardPass.hlsl index 690b240..9031351 100644 --- a/Assets/Shaders/QuakeForwardPass.hlsl +++ b/Assets/Shaders/QuakeForwardPass.hlsl @@ -42,6 +42,8 @@ struct Varyings void InitializeInputData(Varyings input, out InputData inputData) { + inputData = (InputData)0; + inputData.positionWS = input.posWS; half3 viewDirWS = input.viewDir; diff --git a/Assets/Styles/Original/Materials/Quake_Liquid.mat b/Assets/Styles/Original/Materials/Quake_Liquid.mat index 144cbb8..6a271ef 100644 --- a/Assets/Styles/Original/Materials/Quake_Liquid.mat +++ b/Assets/Styles/Original/Materials/Quake_Liquid.mat @@ -12,17 +12,21 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 4 + version: 5 --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Quake_Liquid m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3} - m_ShaderKeywords: _EMISSION _RECEIVE_SHADOWS_OFF + m_ValidKeywords: + - _EMISSION + - _RECEIVE_SHADOWS_OFF + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: [] m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -31,6 +35,7 @@ Material: RenderType: Transparent disabledShaderPasses: - SHADOWCASTER + - DepthOnly m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -94,6 +99,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AlphaClip: 0 - _Blend: 0 diff --git a/Assets/Styles/Original/Particles/BlobExplosion.prefab b/Assets/Styles/Original/Particles/BlobExplosion.prefab index 4b423a0..cbf0eab 100644 --- a/Assets/Styles/Original/Particles/BlobExplosion.prefab +++ b/Assets/Styles/Original/Particles/BlobExplosion.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1603534294172693511} m_Father: {fileID: 0} @@ -40,19 +41,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -602,6 +603,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 512 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4890,6 +4892,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4920,6 +4923,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4943,6 +4947,10 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 --- !u!1 &1933885583298653902 GameObject: @@ -4972,6 +4980,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1303584678041698481} m_RootOrder: 0 @@ -4983,19 +4992,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1933885583298653902} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -5545,6 +5554,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 512 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -10076,6 +10086,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -10106,6 +10117,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -10129,4 +10141,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Assets/Styles/Original/Particles/LavaSplash.prefab b/Assets/Styles/Original/Particles/LavaSplash.prefab index 4084467..d5ad60a 100644 --- a/Assets/Styles/Original/Particles/LavaSplash.prefab +++ b/Assets/Styles/Original/Particles/LavaSplash.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -39,19 +40,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -601,6 +602,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 1024 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4808,6 +4810,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4838,6 +4841,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4861,4 +4865,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Assets/Styles/Original/Particles/ParticleEffect.prefab b/Assets/Styles/Original/Particles/ParticleEffect.prefab index 4ffb9d1..3ce09bd 100644 --- a/Assets/Styles/Original/Particles/ParticleEffect.prefab +++ b/Assets/Styles/Original/Particles/ParticleEffect.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -39,19 +40,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -601,6 +602,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 1024 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4808,6 +4810,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4838,6 +4841,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4861,4 +4865,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Assets/Styles/Original/Particles/ParticleExplosion.prefab b/Assets/Styles/Original/Particles/ParticleExplosion.prefab index 35386ed..8e582e5 100644 --- a/Assets/Styles/Original/Particles/ParticleExplosion.prefab +++ b/Assets/Styles/Original/Particles/ParticleExplosion.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1603534294172693511} m_Father: {fileID: 0} @@ -40,19 +41,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -602,6 +603,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 512 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4809,6 +4811,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4839,6 +4842,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4862,6 +4866,10 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 --- !u!1 &1933885583298653902 GameObject: @@ -4891,6 +4899,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1303584678041698481} m_RootOrder: 0 @@ -4902,19 +4911,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1933885583298653902} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -5464,6 +5473,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 512 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -9671,6 +9681,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -9701,6 +9712,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -9724,4 +9736,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Assets/Styles/Original/Particles/ParticleTrail.prefab b/Assets/Styles/Original/Particles/ParticleTrail.prefab index 9d98f19..851f899 100644 --- a/Assets/Styles/Original/Particles/ParticleTrail.prefab +++ b/Assets/Styles/Original/Particles/ParticleTrail.prefab @@ -29,6 +29,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -40,19 +41,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 1 looping: 1 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -602,6 +603,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 1024 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4751,6 +4753,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4781,6 +4784,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4804,6 +4808,10 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 --- !u!114 &626122152790998428 MonoBehaviour: diff --git a/Assets/Styles/Original/Particles/RogueExplosion.prefab b/Assets/Styles/Original/Particles/RogueExplosion.prefab index 894f2c3..8e0e58d 100644 --- a/Assets/Styles/Original/Particles/RogueExplosion.prefab +++ b/Assets/Styles/Original/Particles/RogueExplosion.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -39,19 +40,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -601,6 +602,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 512 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4808,6 +4810,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4838,6 +4841,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4861,4 +4865,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Assets/Styles/Original/Particles/RoundParticle.mat b/Assets/Styles/Original/Particles/RoundParticle.mat index eeb907e..422b755 100644 --- a/Assets/Styles/Original/Particles/RoundParticle.mat +++ b/Assets/Styles/Original/Particles/RoundParticle.mat @@ -12,17 +12,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 4 + version: 5 --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: RoundParticle m_Shader: {fileID: 4800000, guid: 0406db5a14f94604a8c57ccfbc9f3b46, type: 3} - m_ShaderKeywords: + m_ValidKeywords: + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: + - _FLIPBOOKBLENDING_OFF m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -31,6 +34,7 @@ Material: RenderType: Transparent disabledShaderPasses: - SHADOWCASTER + - DepthOnly m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -90,6 +94,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AlphaClip: 0 - _Blend: 0 diff --git a/Assets/Styles/Original/Particles/SquareParticle.mat b/Assets/Styles/Original/Particles/SquareParticle.mat index 4582f67..6f69c38 100644 --- a/Assets/Styles/Original/Particles/SquareParticle.mat +++ b/Assets/Styles/Original/Particles/SquareParticle.mat @@ -12,17 +12,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 4 + version: 5 --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: SquareParticle m_Shader: {fileID: 4800000, guid: 0406db5a14f94604a8c57ccfbc9f3b46, type: 3} - m_ShaderKeywords: + m_ValidKeywords: [] + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -89,6 +90,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AlphaClip: 0 - _Blend: 0 diff --git a/Assets/Styles/Original/Particles/TeleportSplash.prefab b/Assets/Styles/Original/Particles/TeleportSplash.prefab index db2ed28..82de369 100644 --- a/Assets/Styles/Original/Particles/TeleportSplash.prefab +++ b/Assets/Styles/Original/Particles/TeleportSplash.prefab @@ -28,6 +28,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -39,19 +40,19 @@ ParticleSystem: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1638822901649283535} - serializedVersion: 7 + serializedVersion: 8 lengthInSec: 0.05 simulationSpeed: 1 stopAction: 2 cullingMode: 0 ringBufferMode: 0 ringBufferLoopRange: {x: 0, y: 1} + emitterVelocityMode: 0 looping: 0 prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 - useRigidbodyForVelocity: 0 startDelay: serializedVersion: 2 minMaxState: 0 @@ -601,6 +602,7 @@ ParticleSystem: m_RotationOrder: 4 randomizeRotationDirection: 0 maxNumParticles: 896 + customEmitterVelocity: {x: 0, y: 0, z: 0} size3D: 0 rotation3D: 0 gravityModifier: @@ -4808,6 +4810,7 @@ ParticleSystemRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -4838,6 +4841,7 @@ ParticleSystemRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_RenderMode: 0 + m_MeshDistribution: 0 m_SortMode: 0 m_MinParticleSize: 0.0025 m_MaxParticleSize: 0.5 @@ -4861,4 +4865,8 @@ ParticleSystemRenderer: m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} + m_MeshWeighting: 1 + m_MeshWeighting1: 1 + m_MeshWeighting2: 1 + m_MeshWeighting3: 1 m_MaskInteraction: 0 diff --git a/Packages/manifest.json b/Packages/manifest.json index 098689d..2e5993b 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,18 +1,18 @@ { "dependencies": { - "com.unity.collab-proxy": "1.7.1", - "com.unity.ide.rider": "3.0.7", - "com.unity.ide.visualstudio": "2.0.11", - "com.unity.ide.vscode": "1.2.3", - "com.unity.inputsystem": "1.0.2", "com.unity.render-pipelines.gamecore": "file:gamecore/com.unity.render-pipelines.gamecore-1.2.0.tgz", "com.unity.render-pipelines.ps4": "file:ps4/com.unity.render-pipelines.ps4-1.4.0.tgz", "com.unity.render-pipelines.ps5": "file:ps5/com.unity.render-pipelines.ps5-1.4.0.tgz", - "com.unity.render-pipelines.universal": "10.5.1", - "com.unity.test-framework": "1.1.27", + "com.unity.collab-proxy": "1.15.16", + "com.unity.ide.rider": "3.0.13", + "com.unity.ide.visualstudio": "2.0.15", + "com.unity.ide.vscode": "1.2.5", + "com.unity.inputsystem": "1.3.0", + "com.unity.render-pipelines.universal": "12.1.6", + "com.unity.test-framework": "1.1.31", "com.unity.textmeshpro": "3.0.6", - "com.unity.timeline": "1.6.1", - "com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.21-preview", + "com.unity.timeline": "1.6.4", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.0", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index e546d14..f1dc6f1 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,11 +1,20 @@ { "dependencies": { + "com.unity.burst": { + "version": "1.6.5", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.mathematics": "1.2.1" + }, + "url": "https://packages.unity.com" + }, "com.unity.collab-proxy": { - "version": "1.7.1", + "version": "1.15.16", "depth": 0, "source": "registry", "dependencies": { - "com.unity.nuget.newtonsoft-json": "2.0.0" + "com.unity.services.core": "1.0.1" }, "url": "https://packages.unity.com" }, @@ -17,7 +26,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.7", + "version": "3.0.13", "depth": 0, "source": "registry", "dependencies": { @@ -26,7 +35,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.11", + "version": "2.0.15", "depth": 0, "source": "registry", "dependencies": { @@ -35,41 +44,37 @@ "url": "https://packages.unity.com" }, "com.unity.ide.vscode": { - "version": "1.2.3", + "version": "1.2.5", "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.inputsystem": { - "version": "1.0.2", + "version": "1.3.0", "depth": 0, "source": "registry", - "dependencies": {}, + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + }, "url": "https://packages.unity.com" }, "com.unity.mathematics": { - "version": "1.1.0", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.nuget.newtonsoft-json": { - "version": "2.0.0", + "version": "1.2.5", "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "10.5.1", + "version": "12.1.6", "depth": 1, - "source": "registry", + "source": "builtin", "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" + "com.unity.ugui": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } }, "com.unity.render-pipelines.gamecore": { "version": "file:gamecore/com.unity.render-pipelines.gamecore-1.2.0.tgz", @@ -90,51 +95,59 @@ "dependencies": {} }, "com.unity.render-pipelines.universal": { - "version": "10.5.1", + "version": "12.1.6", "depth": 0, - "source": "registry", + "source": "builtin", "dependencies": { - "com.unity.mathematics": "1.1.0", - "com.unity.render-pipelines.core": "10.5.1", - "com.unity.shadergraph": "10.5.1" - }, - "url": "https://packages.unity.com" + "com.unity.mathematics": "1.2.1", + "com.unity.burst": "1.5.0", + "com.unity.render-pipelines.core": "12.1.6", + "com.unity.shadergraph": "12.1.6" + } }, "com.unity.searcher": { - "version": "4.3.2", + "version": "4.9.1", "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.shadergraph": { - "version": "10.5.1", + "com.unity.services.core": { + "version": "1.0.1", "depth": 1, "source": "registry", "dependencies": { - "com.unity.render-pipelines.core": "10.5.1", - "com.unity.searcher": "4.3.2" + "com.unity.modules.unitywebrequest": "1.0.0" }, "url": "https://packages.unity.com" }, + "com.unity.shadergraph": { + "version": "12.1.6", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.render-pipelines.core": "12.1.6", + "com.unity.searcher": "4.9.1" + } + }, "com.unity.sysroot": { - "version": "0.1.19-preview", + "version": "2.0.0", "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.sysroot.linux-x86_64": { - "version": "0.1.14-preview", + "version": "2.0.0", "depth": 1, "source": "registry", "dependencies": { - "com.unity.sysroot": "0.1.18-preview" + "com.unity.sysroot": "2.0.0" }, "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.1.27", + "version": "1.1.31", "depth": 0, "source": "registry", "dependencies": { @@ -154,7 +167,7 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.6.1", + "version": "1.6.4", "depth": 0, "source": "registry", "dependencies": { @@ -166,12 +179,12 @@ "url": "https://packages.unity.com" }, "com.unity.toolchain.win-x86_64-linux-x86_64": { - "version": "0.1.21-preview", + "version": "2.0.0", "depth": 0, "source": "registry", "dependencies": { - "com.unity.sysroot": "0.1.19-preview", - "com.unity.sysroot.linux-x86_64": "0.1.14-preview" + "com.unity.sysroot": "2.0.0", + "com.unity.sysroot.linux-x86_64": "2.0.0" }, "url": "https://packages.unity.com" }, diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index c5d384e..edad1f7 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -3,7 +3,7 @@ --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 - serializedVersion: 13 + serializedVersion: 14 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: - {fileID: 20000000, guid: 0bce72ddc4b3a52428a360db52c20c96, type: 2} + m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_CustomRenderPipeline: {fileID: 11400000, guid: c24e2c2de0e0d4d4ba09c317ce83dea9, @@ -61,6 +62,9 @@ GraphicsSettings: m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 + m_LightsUseColorTemperature: 1 m_DefaultRenderingLayerMask: 1 m_LogWhenShaderIsCompiled: 0 + m_SRPDefaultSettings: + UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 54f39fd374ced2b45bd3a98872f637ba, + type: 2} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 2013bfc..77f578a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 22 + serializedVersion: 23 productGUID: 0e4b390fda9a46e48a2866abe81989a3 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -68,6 +68,12 @@ PlayerSettings: androidRenderOutsideSafeArea: 1 androidUseSwappy: 0 androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 @@ -121,6 +127,7 @@ PlayerSettings: vulkanEnableSetSRGBWrite: 0 vulkanEnablePreTransform: 0 vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: 4:3: 1 5:4: 1 @@ -160,7 +167,7 @@ PlayerSettings: tvOS: 0 overrideDefaultApplicationIdentifier: 1 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 19 + AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: @@ -216,6 +223,7 @@ PlayerSettings: iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] + macOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 metalEditorSupport: 1 @@ -243,6 +251,7 @@ PlayerSettings: useCustomGradlePropertiesTemplate: 0 useCustomProguardFile: 0 AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: @@ -259,6 +268,7 @@ PlayerSettings: height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 + chromeosInputEmulation: 1 AndroidMinifyWithR8: 0 AndroidMinifyRelease: 0 AndroidMinifyDebug: 0 @@ -324,7 +334,7 @@ PlayerSettings: m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer m_APIs: 150000000b000000 - m_Automatic: 0 + m_Automatic: 1 - m_BuildTarget: iOSSupport m_APIs: 10000000 m_Automatic: 1 @@ -357,6 +367,7 @@ PlayerSettings: m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -366,6 +377,7 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: + bluetoothUsageDescription: switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 @@ -374,6 +386,7 @@ PlayerSettings: switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchUseGOLDLinker: 0 + switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -504,7 +517,9 @@ PlayerSettings: switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -575,7 +590,6 @@ PlayerSettings: ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4CompatibilityPS5: 0 - ps4AllowPS5Detection: 0 ps4GPU800MHz: 1 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: @@ -622,7 +636,6 @@ PlayerSettings: suppressCommonWarnings: 1 allowUnsafeCode: 1 useDeterministicCompilation: 1 - useReferenceAssemblies: 1 enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 @@ -659,6 +672,7 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -709,4 +723,6 @@ PlayerSettings: organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 0 + playerDataPath: + forceSRGBBlit: 1 virtualTexturingSupportEnabled: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 5ac0724..3384268 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2020.3.15f2 -m_EditorVersionWithRevision: 2020.3.15f2 (6cf78cb77498) +m_EditorVersion: 2021.3.0f1 +m_EditorVersionWithRevision: 2021.3.0f1 (6eacc8284459) diff --git a/ProjectSettings/URPProjectSettings.asset b/ProjectSettings/URPProjectSettings.asset index 3077404..c1f118a 100644 --- a/ProjectSettings/URPProjectSettings.asset +++ b/ProjectSettings/URPProjectSettings.asset @@ -12,4 +12,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} m_Name: m_EditorClassIdentifier: - m_LastMaterialVersion: 4 + m_LastMaterialVersion: 5 diff --git a/engine/FMOD/inc/fmod.cs b/engine/FMOD/inc/fmod.cs index b21ea1d..4ac3197 100644 --- a/engine/FMOD/inc/fmod.cs +++ b/engine/FMOD/inc/fmod.cs @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - C# wrapper. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* For more detail visit: */ /* https://fmod.com/resources/documentation-api?version=2.0&page=core-api.html */ @@ -19,8 +19,8 @@ namespace FMOD */ public partial class VERSION { - public const int number = 0x00020111; -#if !UNITY_2017_4_OR_NEWER + public const int number = 0x00020206; +#if !UNITY_2019_4_OR_NEWER public const string dll = "fmod"; #endif } @@ -146,6 +146,15 @@ namespace FMOD public VECTOR up; } + [StructLayout(LayoutKind.Sequential)] + public partial struct GUID + { + public int Data1; + public int Data2; + public int Data3; + public int Data4; + } + [StructLayout(LayoutKind.Sequential)] public struct ASYNCREADINFO { @@ -183,10 +192,24 @@ namespace FMOD NNAUDIO, WINSONIC, AAUDIO, + AUDIOWORKLET, MAX, } + public enum PORT_TYPE : int + { + MUSIC, + COPYRIGHT_MUSIC, + VOICE, + CONTROLLER, + PERSONAL, + VIBRATION, + AUX, + + MAX + } + public enum DEBUG_MODE : int { TTY, @@ -480,6 +503,17 @@ namespace FMOD public StringWrapper functionparams; } + [StructLayout(LayoutKind.Sequential)] + public struct CPU_USAGE + { + public float dsp; /* DSP mixing CPU usage. */ + public float stream; /* Streaming engine CPU usage. */ + public float geometry; /* Geometry engine CPU usage. */ + public float update; /* System::update CPU usage. */ + public float convolution1; /* Convolution reverb processing thread #1 CPU usage */ + public float convolution2; /* Convolution reverb processing thread #2 CPU usage */ + } + [Flags] public enum SYSTEM_CALLBACK_TYPE : uint { @@ -617,20 +651,20 @@ namespace FMOD public int numsubsounds; public IntPtr inclusionlist; public int inclusionlistnum; - public SOUND_PCMREAD_CALLBACK pcmreadcallback; - public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback; - public SOUND_NONBLOCK_CALLBACK nonblockcallback; + public IntPtr pcmreadcallback_internal; + public IntPtr pcmsetposcallback_internal; + public IntPtr nonblockcallback_internal; public IntPtr dlsname; public IntPtr encryptionkey; public int maxpolyphony; public IntPtr userdata; public SOUND_TYPE suggestedsoundtype; - public FILE_OPEN_CALLBACK fileuseropen; - public FILE_CLOSE_CALLBACK fileuserclose; - public FILE_READ_CALLBACK fileuserread; - public FILE_SEEK_CALLBACK fileuserseek; - public FILE_ASYNCREAD_CALLBACK fileuserasyncread; - public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel; + public IntPtr fileuseropen_internal; + public IntPtr fileuserclose_internal; + public IntPtr fileuserread_internal; + public IntPtr fileuserseek_internal; + public IntPtr fileuserasyncread_internal; + public IntPtr fileuserasynccancel_internal; public IntPtr fileuserdata; public int filebuffersize; public CHANNELORDER channelorder; @@ -642,6 +676,53 @@ namespace FMOD public uint minmidigranularity; public int nonblockthreadid; public IntPtr fsbguid; + + public SOUND_PCMREAD_CALLBACK pcmreadcallback + { + set { pcmreadcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return pcmreadcallback_internal == IntPtr.Zero ? null : (SOUND_PCMREAD_CALLBACK)Marshal.GetDelegateForFunctionPointer(pcmreadcallback_internal, typeof(SOUND_PCMREAD_CALLBACK)); } + } + public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback + { + set { pcmsetposcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return pcmsetposcallback_internal == IntPtr.Zero ? null : (SOUND_PCMSETPOS_CALLBACK)Marshal.GetDelegateForFunctionPointer(pcmsetposcallback_internal, typeof(SOUND_PCMSETPOS_CALLBACK)); } + } + public SOUND_NONBLOCK_CALLBACK nonblockcallback + { + set { nonblockcallback_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return nonblockcallback_internal == IntPtr.Zero ? null : (SOUND_NONBLOCK_CALLBACK)Marshal.GetDelegateForFunctionPointer(nonblockcallback_internal, typeof(SOUND_NONBLOCK_CALLBACK)); } + } + public FILE_OPEN_CALLBACK fileuseropen + { + set { fileuseropen_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuseropen_internal == IntPtr.Zero ? null : (FILE_OPEN_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuseropen_internal, typeof(FILE_OPEN_CALLBACK)); } + } + public FILE_CLOSE_CALLBACK fileuserclose + { + set { fileuserclose_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserclose_internal == IntPtr.Zero ? null : (FILE_CLOSE_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserclose_internal, typeof(FILE_CLOSE_CALLBACK)); } + } + public FILE_READ_CALLBACK fileuserread + { + set { fileuserread_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserread_internal == IntPtr.Zero ? null : (FILE_READ_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserread_internal, typeof(FILE_READ_CALLBACK)); } + } + public FILE_SEEK_CALLBACK fileuserseek + { + set { fileuserseek_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserseek_internal == IntPtr.Zero ? null : (FILE_SEEK_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserseek_internal, typeof(FILE_SEEK_CALLBACK)); } + } + public FILE_ASYNCREAD_CALLBACK fileuserasyncread + { + set { fileuserasyncread_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserasyncread_internal == IntPtr.Zero ? null : (FILE_ASYNCREAD_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserasyncread_internal, typeof(FILE_ASYNCREAD_CALLBACK)); } + } + public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel + { + set { fileuserasynccancel_internal = (value == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(value)); } + get { return fileuserasynccancel_internal == IntPtr.Zero ? null : (FILE_ASYNCCANCEL_CALLBACK)Marshal.GetDelegateForFunctionPointer(fileuserasynccancel_internal, typeof(FILE_ASYNCCANCEL_CALLBACK)); } + } + } #pragma warning disable 414 @@ -685,7 +766,6 @@ namespace FMOD public class PRESET { - /* Instance Env Diffus Room RoomHF RmLF DecTm DecHF DecLF Refl RefDel Revb RevDel ModTm ModDp HFRef LFRef Diffus Densty FLAGS */ public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES( 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f );} public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f );} public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES( 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f );} @@ -736,6 +816,7 @@ namespace FMOD public DSP_RESAMPLER resamplerMethod; public uint randomSeed; public int maxConvolutionThreads; + public int maxOpusCodecs; } [Flags] @@ -796,7 +877,7 @@ namespace FMOD } [Flags] - public enum THREAD_AFFINITY : long // avoid ulong for Bolt compatibility + public enum THREAD_AFFINITY : long { /* Platform agnostic thread groupings */ GROUP_DEFAULT = 0x4000000000000000, @@ -865,12 +946,12 @@ namespace FMOD { public static RESULT System_Create(out System system) { - return FMOD5_System_Create(out system.handle); + return FMOD5_System_Create(out system.handle, VERSION.number); } #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Create(out IntPtr system); + private static extern RESULT FMOD5_System_Create(out IntPtr system, uint headerversion); #endregion } @@ -920,11 +1001,6 @@ namespace FMOD { public static RESULT SetAttributes(THREAD_TYPE type, THREAD_AFFINITY affinity = THREAD_AFFINITY.GROUP_DEFAULT, THREAD_PRIORITY priority = THREAD_PRIORITY.DEFAULT, THREAD_STACK_SIZE stacksize = THREAD_STACK_SIZE.DEFAULT) { - if ((affinity & THREAD_AFFINITY.GROUP_DEFAULT) != 0) - { - affinity &= ~THREAD_AFFINITY.GROUP_DEFAULT; - affinity = (THREAD_AFFINITY)(((ulong)affinity) | 0x8000000000000000); - } return FMOD5_Thread_SetAttributes(type, affinity, priority, stacksize); } @@ -1097,24 +1173,10 @@ namespace FMOD { return FMOD5_System_GetDSPInfoByPlugin(this.handle, handle, out description); } - /* - public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority) - public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority = 0) - public RESULT registerCodec(ref CODEC_DESCRIPTION description, out uint handle, uint priority) - { - return FMOD5_System_RegisterCodec(this.handle, ref description, out handle, priority); - } - */ public RESULT registerDSP(ref DSP_DESCRIPTION description, out uint handle) { return FMOD5_System_RegisterDSP(this.handle, ref description, out handle); } - /* - public RESULT registerOutput(ref OUTPUT_DESCRIPTION description, out uint handle) - { - return FMOD5_System_RegisterOutput(this.handle, ref description, out handle); - } - */ // Init/Close. public RESULT init(int maxchannels, INITFLAGS flags, IntPtr extradriverdata) @@ -1209,13 +1271,9 @@ namespace FMOD { return FMOD5_System_GetChannelsPlaying(this.handle, out channels, out realchannels); } - public RESULT getCPUUsage(out float dsp, out float stream, out float geometry, out float update, out float total) + public RESULT getCPUUsage(out CPU_USAGE usage) { - return FMOD5_System_GetCPUUsage(this.handle, out dsp, out stream, out geometry, out update, out total); - } - public RESULT getCPUUsageEx(out float convolutionThread1, out float convolutionThread2) - { - return FMOD5_System_GetCPUUsageEx(this.handle, out convolutionThread1, out convolutionThread2); + return FMOD5_System_GetCPUUsage(this.handle, out usage); } public RESULT getFileUsage(out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead) { @@ -1319,7 +1377,7 @@ namespace FMOD } // Routing to ports. - public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false) + public RESULT attachChannelGroupToPort(PORT_TYPE portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false) { return FMOD5_System_AttachChannelGroupToPort(this.handle, portType, portIndex, channelgroup.handle, passThru); } @@ -1511,12 +1569,8 @@ namespace FMOD private static extern RESULT FMOD5_System_CreateDSPByPlugin (IntPtr system, uint handle, out IntPtr dsp); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetDSPInfoByPlugin (IntPtr system, uint handle, out IntPtr description); - //[DllImport(VERSION.dll)] - //private static extern RESULT FMOD5_System_RegisterCodec (IntPtr system, out CODEC_DESCRIPTION description, out uint handle, uint priority); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_RegisterDSP (IntPtr system, ref DSP_DESCRIPTION description, out uint handle); - //[DllImport(VERSION.dll)] - //private static extern RESULT FMOD5_System_RegisterOutput (IntPtr system, ref OUTPUT_DESCRIPTION description, out uint handle); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_Init (IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata); [DllImport(VERSION.dll)] @@ -1562,9 +1616,7 @@ namespace FMOD [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, out int realchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out float dsp, out float stream, out float geometry, out float update, out float total); - [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetCPUUsageEx (IntPtr system, out float convolutionThread1, out float convolutionThread2); + private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out CPU_USAGE usage); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetFileUsage (IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead); [DllImport(VERSION.dll)] @@ -1598,7 +1650,7 @@ namespace FMOD [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_GetMasterSoundGroup (IntPtr system, out IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, uint portType, ulong portIndex, IntPtr channelgroup, bool passThru); + private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, PORT_TYPE portType, ulong portIndex, IntPtr channelgroup, bool passThru); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_DetachChannelGroupFromPort(IntPtr system, IntPtr channelgroup); [DllImport(VERSION.dll)] diff --git a/engine/FMOD/inc/fmod.h b/engine/FMOD/inc/fmod.h index 4fc15c2..1c7d8ff 100644 --- a/engine/FMOD/inc/fmod.h +++ b/engine/FMOD/inc/fmod.h @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - C header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header in conjunction with fmod_common.h (which contains all the constants / */ /* callbacks) to develop using the C interface */ @@ -32,7 +32,7 @@ FMOD_RESULT F_API FMOD_Thread_SetAttributes (FMOD_THREAD_TYPE type, FMOD_ /* FMOD System factory functions. Use this to create an FMOD System Instance. below you will see FMOD_System_Init/Close to get started. */ -FMOD_RESULT F_API FMOD_System_Create (FMOD_SYSTEM **system); +FMOD_RESULT F_API FMOD_System_Create (FMOD_SYSTEM **system, unsigned int headerversion); FMOD_RESULT F_API FMOD_System_Release (FMOD_SYSTEM *system); /* @@ -101,8 +101,7 @@ FMOD_RESULT F_API FMOD_System_GetSpeakerModeChannels (FMOD_SYSTEM *system, FM FMOD_RESULT F_API FMOD_System_GetVersion (FMOD_SYSTEM *system, unsigned int *version); FMOD_RESULT F_API FMOD_System_GetOutputHandle (FMOD_SYSTEM *system, void **handle); FMOD_RESULT F_API FMOD_System_GetChannelsPlaying (FMOD_SYSTEM *system, int *channels, int *realchannels); -FMOD_RESULT F_API FMOD_System_GetCPUUsage (FMOD_SYSTEM *system, float *dsp, float *stream, float *geometry, float *update, float *total); -FMOD_RESULT F_API FMOD_System_GetCPUUsageEx (FMOD_SYSTEM *system, float *convolutionThread1, float *convolutionThread2); +FMOD_RESULT F_API FMOD_System_GetCPUUsage (FMOD_SYSTEM *system, FMOD_CPU_USAGE *usage); FMOD_RESULT F_API FMOD_System_GetFileUsage (FMOD_SYSTEM *system, long long *sampleBytesRead, long long *streamBytesRead, long long *otherBytesRead); /* Sound/DSP/Channel/FX creation and retrieval. */ diff --git a/engine/FMOD/inc/fmod.hpp b/engine/FMOD/inc/fmod.hpp index a78ff31..7e83d85 100644 --- a/engine/FMOD/inc/fmod.hpp +++ b/engine/FMOD/inc/fmod.hpp @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - C++ header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header in conjunction with fmod_common.h (which contains all the constants / */ /* callbacks) to develop using the C++ language. */ @@ -43,7 +43,7 @@ namespace FMOD /* FMOD System factory functions. */ - inline FMOD_RESULT System_Create (System **system) { return FMOD_System_Create((FMOD_SYSTEM **)system); } + inline FMOD_RESULT System_Create (System **system, unsigned int headerversion = FMOD_VERSION) { return FMOD_System_Create((FMOD_SYSTEM **)system, headerversion); } /* 'System' API @@ -123,8 +123,7 @@ namespace FMOD FMOD_RESULT F_API getVersion (unsigned int *version); FMOD_RESULT F_API getOutputHandle (void **handle); FMOD_RESULT F_API getChannelsPlaying (int *channels, int *realchannels = 0); - FMOD_RESULT F_API getCPUUsage (float *dsp, float *stream, float *geometry, float *update, float *total); - FMOD_RESULT F_API getCPUUsageEx (float *convolutionThread1, float *convolutionThread2); + FMOD_RESULT F_API getCPUUsage (FMOD_CPU_USAGE *usage); FMOD_RESULT F_API getFileUsage (long long *sampleBytesRead, long long *streamBytesRead, long long *otherBytesRead); // Sound/DSP/Channel/FX creation and retrieval. diff --git a/engine/FMOD/inc/fmod_codec.h b/engine/FMOD/inc/fmod_codec.h index 252de40..325fdb2 100644 --- a/engine/FMOD/inc/fmod_codec.h +++ b/engine/FMOD/inc/fmod_codec.h @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - Codec development header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you are wanting to develop your own file format plugin to use with */ /* FMOD's codec system. With this header you can make your own fileformat plugin that FMOD */ @@ -22,7 +22,12 @@ typedef struct FMOD_CODEC_WAVEFORMAT FMOD_CODEC_WAVEFORMAT; /* Codec constants */ -#define FMOD_CODEC_WAVEFORMAT_VERSION 3 +#define FMOD_CODEC_PLUGIN_VERSION 1 + +typedef int FMOD_CODEC_SEEK_METHOD; +#define FMOD_CODEC_SEEK_METHOD_SET 0 +#define FMOD_CODEC_SEEK_METHOD_CURRENT 1 +#define FMOD_CODEC_SEEK_METHOD_END 2 /* Codec callbacks @@ -40,12 +45,21 @@ typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETWAVEFORMAT_CALLBACK)(FMOD_CODEC_S Codec functions */ typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_METADATA_FUNC) (FMOD_CODEC_STATE *codec_state, FMOD_TAGTYPE tagtype, char *name, void *data, unsigned int datalen, FMOD_TAGDATATYPE datatype, int unique); +typedef void * (F_CALLBACK *FMOD_CODEC_ALLOC_FUNC) (unsigned int size, unsigned int align, const char *file, int line); +typedef void (F_CALLBACK *FMOD_CODEC_FREE_FUNC) (void *ptr, const char *file, int line); +typedef void (F_CALLBACK *FMOD_CODEC_LOG_FUNC) (FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...); + +typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_READ_FUNC) (FMOD_CODEC_STATE *codec_state, void *buffer, unsigned int sizebytes, unsigned int *bytesread); +typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_SEEK_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int pos, FMOD_CODEC_SEEK_METHOD method); +typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_TELL_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int *pos); +typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_SIZE_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int *size); /* Codec structures */ typedef struct FMOD_CODEC_DESCRIPTION { + unsigned int apiversion; const char *name; unsigned int version; int defaultasstream; @@ -77,21 +91,46 @@ struct FMOD_CODEC_WAVEFORMAT float peakvolume; }; -struct FMOD_CODEC_STATE +typedef struct FMOD_CODEC_STATE_FUNCTIONS { - int numsubsounds; - FMOD_CODEC_WAVEFORMAT *waveformat; - void *plugindata; - - void *filehandle; - unsigned int filesize; - FMOD_FILE_READ_CALLBACK fileread; - FMOD_FILE_SEEK_CALLBACK fileseek; FMOD_CODEC_METADATA_FUNC metadata; + FMOD_CODEC_ALLOC_FUNC alloc; + FMOD_CODEC_FREE_FUNC free; + FMOD_CODEC_LOG_FUNC log; + FMOD_CODEC_FILE_READ_FUNC read; + FMOD_CODEC_FILE_SEEK_FUNC seek; + FMOD_CODEC_FILE_TELL_FUNC tell; + FMOD_CODEC_FILE_SIZE_FUNC size; +} FMOD_CODEC_STATE_FUNCTIONS; - int waveformatversion; +struct FMOD_CODEC_STATE +{ + void *plugindata; + FMOD_CODEC_WAVEFORMAT *waveformat; + FMOD_CODEC_STATE_FUNCTIONS *functions; + int numsubsounds; }; +/* + Codec macros +*/ +#define FMOD_CODEC_METADATA(_state, _tagtype, _name, _data, _datalen, _datatype, _unique) \ + (_state)->functions->metadata(_state, _tagtype, _name, _data, _datalen, _datatype, _unique) +#define FMOD_CODEC_ALLOC(_state, _size, _align) \ + (_state)->functions->alloc(_size, _align, __FILE__, __LINE__) +#define FMOD_CODEC_FREE(_state, _ptr) \ + (_state)->functions->free(_ptr, __FILE__, __LINE__) +#define FMOD_CODEC_LOG(_state, _level, _location, _format, ...) \ + (_state)->functions->log(_level, __FILE__, __LINE__, _location, _format, __VA_ARGS__) +#define FMOD_CODEC_FILE_READ(_state, _buffer, _sizebytes, _bytesread) \ + (_state)->functions->read(_state, _buffer, _sizebytes, _bytesread) +#define FMOD_CODEC_FILE_SEEK(_state, _pos, _method) \ + (_state)->functions->seek(_state, _pos, _method) +#define FMOD_CODEC_FILE_TELL(_state, _pos) \ + (_state)->functions->tell(_state, _pos) +#define FMOD_CODEC_FILE_SIZE(_state, _size) \ + (_state)->functions->size(_state, _size) + #endif diff --git a/engine/FMOD/inc/fmod_common.h b/engine/FMOD/inc/fmod_common.h index 7cb465e..41c2b71 100644 --- a/engine/FMOD/inc/fmod_common.h +++ b/engine/FMOD/inc/fmod_common.h @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - Common C/C++ header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* This header is included by fmod.hpp (C++ interface) and fmod.h (C interface) */ /* */ @@ -52,13 +52,12 @@ typedef struct FMOD_POLYGON FMOD_POLYGON; typedef struct FMOD_GEOMETRY FMOD_GEOMETRY; typedef struct FMOD_SYNCPOINT FMOD_SYNCPOINT; typedef struct FMOD_ASYNCREADINFO FMOD_ASYNCREADINFO; -typedef unsigned int FMOD_PORT_TYPE; typedef unsigned long long FMOD_PORT_INDEX; /* FMOD constants */ -#define FMOD_VERSION 0x00020111 /* 0xaaaabbcc -> aaaa = product version, bb = major version, cc = minor version.*/ +#define FMOD_VERSION 0x00020206 /* 0xaaaabbcc -> aaaa = product version, bb = major version, cc = minor version.*/ typedef unsigned int FMOD_DEBUG_FLAGS; #define FMOD_DEBUG_LEVEL_NONE 0x00000000 @@ -225,12 +224,12 @@ typedef unsigned int FMOD_THREAD_STACK_SIZE; #define FMOD_THREAD_STACK_SIZE_CONVOLUTION1 (16 * 1024) #define FMOD_THREAD_STACK_SIZE_CONVOLUTION2 (16 * 1024) -typedef unsigned long long FMOD_THREAD_AFFINITY; +typedef long long FMOD_THREAD_AFFINITY; /* Platform agnostic thread groupings */ -#define FMOD_THREAD_AFFINITY_GROUP_DEFAULT 0x8000000000000000 -#define FMOD_THREAD_AFFINITY_GROUP_A 0x8000000000000001 -#define FMOD_THREAD_AFFINITY_GROUP_B 0x8000000000000002 -#define FMOD_THREAD_AFFINITY_GROUP_C 0x8000000000000003 +#define FMOD_THREAD_AFFINITY_GROUP_DEFAULT 0x4000000000000000 +#define FMOD_THREAD_AFFINITY_GROUP_A 0x4000000000000001 +#define FMOD_THREAD_AFFINITY_GROUP_B 0x4000000000000002 +#define FMOD_THREAD_AFFINITY_GROUP_C 0x4000000000000003 /* Thread defaults */ #define FMOD_THREAD_AFFINITY_MIXER FMOD_THREAD_AFFINITY_GROUP_A #define FMOD_THREAD_AFFINITY_FEEDER FMOD_THREAD_AFFINITY_GROUP_C @@ -435,6 +434,7 @@ typedef enum FMOD_OUTPUTTYPE FMOD_OUTPUTTYPE_NNAUDIO, FMOD_OUTPUTTYPE_WINSONIC, FMOD_OUTPUTTYPE_AAUDIO, + FMOD_OUTPUTTYPE_AUDIOWORKLET, FMOD_OUTPUTTYPE_MAX, FMOD_OUTPUTTYPE_FORCEINT = 65536 @@ -679,6 +679,20 @@ typedef enum FMOD_TAGDATATYPE FMOD_TAGDATATYPE_FORCEINT = 65536 } FMOD_TAGDATATYPE; +typedef enum FMOD_PORT_TYPE +{ + FMOD_PORT_TYPE_MUSIC, + FMOD_PORT_TYPE_COPYRIGHT_MUSIC, + FMOD_PORT_TYPE_VOICE, + FMOD_PORT_TYPE_CONTROLLER, + FMOD_PORT_TYPE_PERSONAL, + FMOD_PORT_TYPE_VIBRATION, + FMOD_PORT_TYPE_AUX, + + FMOD_PORT_TYPE_MAX, + FMOD_PORT_TYPE_FORCEINT = 65536 +} FMOD_PORT_TYPE; + /* FMOD callbacks */ @@ -767,6 +781,7 @@ typedef struct FMOD_ADVANCEDSETTINGS FMOD_DSP_RESAMPLER resamplerMethod; unsigned int randomSeed; int maxConvolutionThreads; + int maxOpusCodecs; } FMOD_ADVANCEDSETTINGS; typedef struct FMOD_TAG @@ -844,6 +859,17 @@ typedef struct FMOD_ERRORCALLBACK_INFO const char *functionparams; } FMOD_ERRORCALLBACK_INFO; +typedef struct FMOD_CPU_USAGE +{ + float dsp; + float stream; + float geometry; + float update; + float convolution1; + float convolution2; +} FMOD_CPU_USAGE; + + /* FMOD optional headers for plugin development */ diff --git a/engine/FMOD/inc/fmod_dsp.cs b/engine/FMOD/inc/fmod_dsp.cs index 5df37d0..8c84a56 100644 --- a/engine/FMOD/inc/fmod_dsp.cs +++ b/engine/FMOD/inc/fmod_dsp.cs @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - DSP header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */ /* dsp system. With this header you can make your own DSP plugin that FMOD can */ @@ -231,7 +231,8 @@ namespace FMOD DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2, DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, DSP_PARAMETER_DATA_TYPE_FFT = -4, - DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5 + DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, + DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6 } [StructLayout(LayoutKind.Sequential)] @@ -327,6 +328,13 @@ namespace FMOD public float[] channelweight; } + [StructLayout(LayoutKind.Sequential)] + public struct DSP_PARAMETER_ATTENUATION_RANGE + { + public float min; + public float max; + } + [StructLayout(LayoutKind.Sequential)] public struct DSP_DESCRIPTION { @@ -515,7 +523,7 @@ namespace FMOD public enum DSP_NORMALIZE : int { FADETIME, - THRESHHOLD, + THRESHOLD, MAXAMP } @@ -702,6 +710,8 @@ namespace FMOD OVERALL_GAIN, SURROUND_SPEAKER_MODE, _2D_HEIGHT_BLEND, + ATTENUATION_RANGE, + OVERRIDE_RANGE } public enum DSP_THREE_EQ_CROSSOVERSLOPE_TYPE : int @@ -880,6 +890,8 @@ namespace FMOD _3D_SOUND_SIZE, _3D_MIN_EXTENT, OVERALL_GAIN, - OUTPUTGAIN + OUTPUTGAIN, + ATTENUATION_RANGE, + OVERRIDE_RANGE } } diff --git a/engine/FMOD/inc/fmod_dsp.h b/engine/FMOD/inc/fmod_dsp.h index c95d5ae..0185a53 100644 --- a/engine/FMOD/inc/fmod_dsp.h +++ b/engine/FMOD/inc/fmod_dsp.h @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - DSP header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */ /* dsp system. With this header you can make your own DSP plugin that FMOD can */ @@ -66,6 +66,7 @@ typedef enum FMOD_DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, FMOD_DSP_PARAMETER_DATA_TYPE_FFT = -4, FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, + FMOD_DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6, } FMOD_DSP_PARAMETER_DATA_TYPE; /* @@ -207,6 +208,12 @@ typedef struct FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI FMOD_3D_ATTRIBUTES absolute; } FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI; +typedef struct FMOD_DSP_PARAMETER_ATTENUATION_RANGE +{ + float min; + float max; +} FMOD_DSP_PARAMETER_ATTENUATION_RANGE; + typedef struct FMOD_DSP_PARAMETER_SIDECHAIN { FMOD_BOOL sidechainenable; diff --git a/engine/FMOD/inc/fmod_dsp_effects.h b/engine/FMOD/inc/fmod_dsp_effects.h index 34310e8..e00759d 100644 --- a/engine/FMOD/inc/fmod_dsp_effects.h +++ b/engine/FMOD/inc/fmod_dsp_effects.h @@ -1,6 +1,6 @@ /* ============================================================================================================= */ /* FMOD Core API - Built-in effects header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* In this header you can find parameter structures for FMOD system registered DSP effects */ /* and generators. */ @@ -126,7 +126,7 @@ typedef enum typedef enum { FMOD_DSP_NORMALIZE_FADETIME, - FMOD_DSP_NORMALIZE_THRESHHOLD, + FMOD_DSP_NORMALIZE_THRESHOLD, FMOD_DSP_NORMALIZE_MAXAMP } FMOD_DSP_NORMALIZE; @@ -363,6 +363,8 @@ typedef enum FMOD_DSP_PAN_OVERALL_GAIN, FMOD_DSP_PAN_SURROUND_SPEAKER_MODE, FMOD_DSP_PAN_2D_HEIGHT_BLEND, + FMOD_DSP_PAN_ATTENUATION_RANGE, + FMOD_DSP_PAN_OVERRIDE_RANGE } FMOD_DSP_PAN; @@ -566,7 +568,9 @@ typedef enum FMOD_DSP_OBJECTPAN_3D_SOUND_SIZE, FMOD_DSP_OBJECTPAN_3D_MIN_EXTENT, FMOD_DSP_OBJECTPAN_OVERALL_GAIN, - FMOD_DSP_OBJECTPAN_OUTPUTGAIN + FMOD_DSP_OBJECTPAN_OUTPUTGAIN, + FMOD_DSP_OBJECTPAN_ATTENUATION_RANGE, + FMOD_DSP_OBJECTPAN_OVERRIDE_RANGE } FMOD_DSP_OBJECTPAN; #endif diff --git a/engine/FMOD/inc/fmod_errors.cs b/engine/FMOD/inc/fmod_errors.cs index e7b9cd2..738a347 100644 --- a/engine/FMOD/inc/fmod_errors.cs +++ b/engine/FMOD/inc/fmod_errors.cs @@ -1,6 +1,6 @@ /* ============================================================================================== */ /* FMOD Core / Studio API - Error string header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you want to store or display a string version / english explanation */ /* of the FMOD error codes. */ diff --git a/engine/FMOD/inc/fmod_errors.h b/engine/FMOD/inc/fmod_errors.h index ea17340..ce839a9 100644 --- a/engine/FMOD/inc/fmod_errors.h +++ b/engine/FMOD/inc/fmod_errors.h @@ -1,6 +1,6 @@ /* ============================================================================================== */ /* FMOD Core / Studio API - Error string header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you want to store or display a string version / english explanation */ /* of the FMOD error codes. */ diff --git a/engine/FMOD/inc/fmod_output.h b/engine/FMOD/inc/fmod_output.h index 4074845..3a8aec4 100644 --- a/engine/FMOD/inc/fmod_output.h +++ b/engine/FMOD/inc/fmod_output.h @@ -1,6 +1,6 @@ /* ======================================================================================== */ /* FMOD Core API - output development header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ +/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */ /* */ /* Use this header if you are wanting to develop your own output plugin to use with */ /* FMOD's output system. With this header you can make your own output plugin that FMOD */ @@ -19,27 +19,23 @@ typedef struct FMOD_OUTPUT_OBJECT3DINFO FMOD_OUTPUT_OBJECT3DINFO; /* Output constants */ -#define FMOD_OUTPUT_PLUGIN_VERSION 4 +#define FMOD_OUTPUT_PLUGIN_VERSION 5 typedef unsigned int FMOD_OUTPUT_METHOD; #define FMOD_OUTPUT_METHOD_MIX_DIRECT 0 -#define FMOD_OUTPUT_METHOD_POLLING 1 -#define FMOD_OUTPUT_METHOD_MIX_BUFFERED 2 +#define FMOD_OUTPUT_METHOD_MIX_BUFFERED 1 /* Output callbacks */ typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *numdrivers); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETDRIVERINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels); -typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_INIT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int selecteddriver, FMOD_INITFLAGS flags, int *outputrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_SOUND_FORMAT *outputformat, int dspbufferlength, int dspnumbuffers, void *extradriverdata); +typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_INIT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int selecteddriver, FMOD_INITFLAGS flags, int *outputrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_SOUND_FORMAT *outputformat, int dspbufferlength, int *dspnumbuffers, int *dspnumadditionalbuffers, void *extradriverdata); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_START_CALLBACK) (FMOD_OUTPUT_STATE *output_state); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_STOP_CALLBACK) (FMOD_OUTPUT_STATE *output_state); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_CLOSE_CALLBACK) (FMOD_OUTPUT_STATE *output_state); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_UPDATE_CALLBACK) (FMOD_OUTPUT_STATE *output_state); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETHANDLE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **handle); -typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETPOSITION_CALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int *pcm); -typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_LOCK_CALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2); -typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_UNLOCK_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_MIXER_CALLBACK) (FMOD_OUTPUT_STATE *output_state); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *maxhardwareobjects); typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **object3d); @@ -76,9 +72,6 @@ typedef struct FMOD_OUTPUT_DESCRIPTION FMOD_OUTPUT_CLOSE_CALLBACK close; FMOD_OUTPUT_UPDATE_CALLBACK update; FMOD_OUTPUT_GETHANDLE_CALLBACK gethandle; - FMOD_OUTPUT_GETPOSITION_CALLBACK getposition; - FMOD_OUTPUT_LOCK_CALLBACK lock; - FMOD_OUTPUT_UNLOCK_CALLBACK unlock; FMOD_OUTPUT_MIXER_CALLBACK mixer; FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK object3dgetinfo; FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK object3dalloc; @@ -120,7 +113,7 @@ struct FMOD_OUTPUT_OBJECT3DINFO #define FMOD_OUTPUT_FREE(_state, _ptr) \ (_state)->free(_ptr, __FILE__, __LINE__) #define FMOD_OUTPUT_LOG(_state, _level, _location, _format, ...) \ - (_state)->log(_level, __FILE__, __LINE__, _location, _format, __VA_ARGS__) + (_state)->log(_level, __FILE__, __LINE__, _location, _format, ##__VA_ARGS__) #define FMOD_OUTPUT_COPYPORT(_state, _id, _buffer, _length) \ (_state)->copyport(_state, _id, _buffer, _length) #define FMOD_OUTPUT_REQUESTRESET(_state) \ diff --git a/engine/FMOD/lib/x64/fmod.dll b/engine/FMOD/lib/x64/fmod.dll index 8fd67ab..e1fe7a6 100644 Binary files a/engine/FMOD/lib/x64/fmod.dll and b/engine/FMOD/lib/x64/fmod.dll differ diff --git a/engine/FMOD/lib/x64/fmodL.dll b/engine/FMOD/lib/x64/fmodL.dll index 9f4586b..5f55a7b 100644 Binary files a/engine/FMOD/lib/x64/fmodL.dll and b/engine/FMOD/lib/x64/fmodL.dll differ diff --git a/engine/FMOD/lib/x64/fmodL_vc.lib b/engine/FMOD/lib/x64/fmodL_vc.lib index 2185102..8236f2f 100644 Binary files a/engine/FMOD/lib/x64/fmodL_vc.lib and b/engine/FMOD/lib/x64/fmodL_vc.lib differ diff --git a/engine/FMOD/lib/x64/fmod_vc.lib b/engine/FMOD/lib/x64/fmod_vc.lib index c2f2c6e..83f2316 100644 Binary files a/engine/FMOD/lib/x64/fmod_vc.lib and b/engine/FMOD/lib/x64/fmod_vc.lib differ diff --git a/engine/FMOD/lib/x86/fmod.dll b/engine/FMOD/lib/x86/fmod.dll index 6627820..e7af0bf 100644 Binary files a/engine/FMOD/lib/x86/fmod.dll and b/engine/FMOD/lib/x86/fmod.dll differ diff --git a/engine/FMOD/lib/x86/fmodL.dll b/engine/FMOD/lib/x86/fmodL.dll index e32cd4e..d8911ee 100644 Binary files a/engine/FMOD/lib/x86/fmodL.dll and b/engine/FMOD/lib/x86/fmodL.dll differ diff --git a/engine/FMOD/lib/x86/fmodL_vc.lib b/engine/FMOD/lib/x86/fmodL_vc.lib index 8dbf71c..8be8b6b 100644 Binary files a/engine/FMOD/lib/x86/fmodL_vc.lib and b/engine/FMOD/lib/x86/fmodL_vc.lib differ diff --git a/engine/FMOD/lib/x86/fmod_vc.lib b/engine/FMOD/lib/x86/fmod_vc.lib index 8df58dd..ad3b755 100644 Binary files a/engine/FMOD/lib/x86/fmod_vc.lib and b/engine/FMOD/lib/x86/fmod_vc.lib differ diff --git a/engine/FMOD/lib/x86/libfmod.a b/engine/FMOD/lib/x86/libfmod.a index 363790e..b9d14b3 100644 Binary files a/engine/FMOD/lib/x86/libfmod.a and b/engine/FMOD/lib/x86/libfmod.a differ diff --git a/engine/FMOD/lib/x86/libfmodL.a b/engine/FMOD/lib/x86/libfmodL.a index 437aa3c..6975e34 100644 Binary files a/engine/FMOD/lib/x86/libfmodL.a and b/engine/FMOD/lib/x86/libfmodL.a differ diff --git a/engine/Quake/snd_fmod.c b/engine/Quake/snd_fmod.c index b9775a5..ecd4a39 100644 --- a/engine/Quake/snd_fmod.c +++ b/engine/Quake/snd_fmod.c @@ -79,7 +79,7 @@ void S_Startup(void) // Create FMOD System if it doesn't exist already if (!fmod_system) { - result = FMOD_System_Create(&fmod_system); + result = FMOD_System_Create(&fmod_system, FMOD_VERSION); if (result != FMOD_OK) { Con_Printf("Failed to create FMOD System: %s\n", FMOD_ErrorString(result));