244 lines
8.3 KiB
C#
244 lines
8.3 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
using UnityEngine.Rendering.PostProcessing;
|
|
|
|
namespace RecRoom.Core.ImageEffects
|
|
{
|
|
// Token: 0x0200306F RID: 12399
|
|
[Token(Token = "0x200306F")]
|
|
public class PostProcessVolumeSettings : MonoBehaviour
|
|
{
|
|
// Token: 0x06014FE8 RID: 85992 RVA: 0x004E4F28 File Offset: 0x004E3128
|
|
[Token(Token = "0x6014FE8")]
|
|
[Address(RVA = "0x1A42630", Offset = "0x1A41630", VA = "0x181A42630")]
|
|
private void Start()
|
|
{
|
|
LocalPlayerController instance;
|
|
Delegate @delegate;
|
|
for (;;)
|
|
{
|
|
this.KLJJEEOCIIG();
|
|
instance = SingletonMonoBehaviour.ONCPNMDGGKG;
|
|
Action displayModeChange = instance.DisplayModeChange;
|
|
Action action = new Action(this.KLJJEEOCIIG);
|
|
@delegate = Delegate.Combine(displayModeChange, action);
|
|
if (@delegate == 0)
|
|
{
|
|
break;
|
|
}
|
|
if (@delegate != 0)
|
|
{
|
|
goto Block_1;
|
|
}
|
|
}
|
|
instance.DisplayModeChange = @delegate;
|
|
return;
|
|
Block_1:
|
|
instance.DisplayModeChange = @delegate;
|
|
}
|
|
|
|
// Token: 0x06014FE9 RID: 85993 RVA: 0x004E4F7C File Offset: 0x004E317C
|
|
[Token(Token = "0x6014FE9")]
|
|
[Address(RVA = "0x1A424F0", Offset = "0x1A414F0", VA = "0x181A424F0")]
|
|
private void OnDestroy()
|
|
{
|
|
LocalPlayerController instance2;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
LocalPlayerController instance = SingletonMonoBehaviour.ONCPNMDGGKG;
|
|
int num = 0;
|
|
if (!(instance != num))
|
|
{
|
|
return;
|
|
}
|
|
instance2 = SingletonMonoBehaviour.ONCPNMDGGKG;
|
|
Action displayModeChange = instance2.DisplayModeChange;
|
|
Action action = new Action(this.KLJJEEOCIIG);
|
|
@delegate = Delegate.Remove(displayModeChange, action);
|
|
}
|
|
while (@delegate != 0 && @delegate == 0);
|
|
instance2.DisplayModeChange = @delegate;
|
|
}
|
|
|
|
// Token: 0x06014FEA RID: 85994 RVA: 0x004E4FD8 File Offset: 0x004E31D8
|
|
[Token(Token = "0x6014FEA")]
|
|
[Address(RVA = "0x1A422B0", Offset = "0x1A412B0", VA = "0x181A422B0")]
|
|
private void KLJJEEOCIIG()
|
|
{
|
|
int num = 0;
|
|
PostProcessVolume component = base.GetComponent<PostProcessVolume>();
|
|
bool flag = SingletonMonoBehaviour.ONCPNMDGGKG.AKPGDDBMBMK == LocalPlayerController.MIGPLDFLMHA.SCREEN;
|
|
PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP context = (flag ? PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP.VR : PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP.Any);
|
|
Func<PostProcessVolumeSettings.PlatformSettings, bool> func = delegate(PostProcessVolumeSettings.PlatformSettings s)
|
|
{
|
|
RuntimePlatform[] platforms = s.Platforms;
|
|
Func<RuntimePlatform, bool> <>9__4_ = PostProcessVolumeSettings.<>c.<>9__4_1;
|
|
if (<>9__4_ == 0)
|
|
{
|
|
PostProcessVolumeSettings.<>c.<>9__4_1 = delegate(RuntimePlatform p)
|
|
{
|
|
RuntimePlatform platform = Application.platform;
|
|
return p == platform;
|
|
};
|
|
}
|
|
bool flag2 = Enumerable.Any<RuntimePlatform>(platforms, <>9__4_);
|
|
if (!flag2)
|
|
{
|
|
return flag2;
|
|
}
|
|
PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP playerContext = s.PlayerContext;
|
|
return true;
|
|
};
|
|
PostProcessVolumeSettings.PlatformSettings platformSettings;
|
|
if (platformSettings != 0)
|
|
{
|
|
PostProcessProfile sharedProfile = component.sharedProfile;
|
|
int num2 = 0;
|
|
if (sharedProfile == num2)
|
|
{
|
|
object[] array = new object[1];
|
|
throw new NullReferenceException();
|
|
}
|
|
if (component.sharedProfile.TryGetSettings<Bloom>(num))
|
|
{
|
|
bool bloomEnabled = platformSettings.bloomEnabled;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06014FEB RID: 85995 RVA: 0x004E505C File Offset: 0x004E325C
|
|
[Token(Token = "0x6014FEB")]
|
|
[Address(RVA = "0x428AD0", Offset = "0x427AD0", VA = "0x180428AD0")]
|
|
public PostProcessVolumeSettings()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06014FEC RID: 85996 RVA: 0x004E5070 File Offset: 0x004E3270
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6014FEC")]
|
|
[Address(RVA = "0x1A42730", Offset = "0x1A41730", VA = "0x181A42730")]
|
|
static PostProcessVolumeSettings()
|
|
{
|
|
PostProcessVolumeSettings.PlatformSettings[] array = new PostProcessVolumeSettings.PlatformSettings[3];
|
|
PostProcessVolumeSettings.PlatformSettings platformSettings = new PostProcessVolumeSettings.PlatformSettings();
|
|
platformSettings.bloomEnabled = true;
|
|
RuntimePlatform[] array2 = new RuntimePlatform[3];
|
|
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.CA2D293E70C2E02334E1CE22BB12127AF5E3A059).FieldHandle);
|
|
platformSettings.Platforms = array2;
|
|
platformSettings.PlayerContext = (PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP)((ulong)1L);
|
|
platformSettings.bloomEnabled = true;
|
|
array[0] = platformSettings;
|
|
PostProcessVolumeSettings.PlatformSettings platformSettings2 = new PostProcessVolumeSettings.PlatformSettings();
|
|
platformSettings2.bloomEnabled = true;
|
|
RuntimePlatform[] array3 = new RuntimePlatform[3];
|
|
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.CA2D293E70C2E02334E1CE22BB12127AF5E3A059).FieldHandle);
|
|
platformSettings2.Platforms = array3;
|
|
platformSettings2.PlayerContext = (PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP)((ulong)2L);
|
|
platformSettings2.bloomEnabled = true;
|
|
array[1] = platformSettings2;
|
|
PostProcessVolumeSettings.PlatformSettings platformSettings3 = new PostProcessVolumeSettings.PlatformSettings();
|
|
platformSettings3.bloomEnabled = true;
|
|
RuntimePlatform[] array4 = new RuntimePlatform[2];
|
|
array4[0] = (RuntimePlatform)((ulong)11L);
|
|
array4[0] = (RuntimePlatform)((ulong)8L);
|
|
platformSettings3.Platforms = array4;
|
|
platformSettings3.PlayerContext = (PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP)((ulong)0L);
|
|
platformSettings3.bloomEnabled = false;
|
|
array[2] = platformSettings3;
|
|
}
|
|
|
|
// Token: 0x0400DD87 RID: 56711
|
|
[Token(Token = "0x400DD87")]
|
|
private static readonly PostProcessVolumeSettings.PlatformSettings[] GKCAGGKHKFB;
|
|
|
|
// Token: 0x02003070 RID: 12400
|
|
[Token(Token = "0x2003070")]
|
|
[Serializable]
|
|
public class PlatformSettings
|
|
{
|
|
// Token: 0x06014FED RID: 85997 RVA: 0x004E515C File Offset: 0x004E335C
|
|
[Token(Token = "0x6014FED")]
|
|
[Address(RVA = "0x1A10AA0", Offset = "0x1A0FAA0", VA = "0x181A10AA0")]
|
|
public PlatformSettings()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400DD88 RID: 56712
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400DD88")]
|
|
public PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP PlayerContext;
|
|
|
|
// Token: 0x0400DD89 RID: 56713
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400DD89")]
|
|
public RuntimePlatform[] Platforms;
|
|
|
|
// Token: 0x0400DD8A RID: 56714
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400DD8A")]
|
|
public bool bloomEnabled = true;
|
|
|
|
// Token: 0x02003071 RID: 12401
|
|
[Token(Token = "0x2003071")]
|
|
public enum FKIKNKNDEAP
|
|
{
|
|
// Token: 0x0400DD8C RID: 56716
|
|
[Token(Token = "0x400DD8C")]
|
|
Any,
|
|
// Token: 0x0400DD8D RID: 56717
|
|
[Token(Token = "0x400DD8D")]
|
|
VR,
|
|
// Token: 0x0400DD8E RID: 56718
|
|
[Token(Token = "0x400DD8E")]
|
|
Screens
|
|
}
|
|
}
|
|
|
|
// Token: 0x02003072 RID: 12402
|
|
[Token(Token = "0x2003072")]
|
|
[CompilerGenerated]
|
|
private sealed class AOBDIBPAEDM
|
|
{
|
|
// Token: 0x06014FEE RID: 85998 RVA: 0x004E5178 File Offset: 0x004E3378
|
|
[Token(Token = "0x6014FEE")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
public AOBDIBPAEDM()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06014FEF RID: 85999 RVA: 0x004E518C File Offset: 0x004E338C
|
|
[Token(Token = "0x6014FEF")]
|
|
[Address(RVA = "0x1A27FA0", Offset = "0x1A26FA0", VA = "0x181A27FA0")]
|
|
internal bool <ApplySettings>b__0(PostProcessVolumeSettings.PlatformSettings s)
|
|
{
|
|
RuntimePlatform[] platforms = s.Platforms;
|
|
Func<RuntimePlatform, bool> <>9__4_ = PostProcessVolumeSettings.<>c.<>9__4_1;
|
|
if (<>9__4_ == 0)
|
|
{
|
|
PostProcessVolumeSettings.<>c.<>9__4_1 = delegate(RuntimePlatform p)
|
|
{
|
|
RuntimePlatform platform = Application.platform;
|
|
return p == platform;
|
|
};
|
|
}
|
|
bool flag = Enumerable.Any<RuntimePlatform>(platforms, <>9__4_);
|
|
if (!flag)
|
|
{
|
|
return flag;
|
|
}
|
|
PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP playerContext = s.PlayerContext;
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0400DD8F RID: 56719
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400DD8F")]
|
|
public PostProcessVolumeSettings.PlatformSettings.FKIKNKNDEAP context;
|
|
}
|
|
}
|
|
}
|