Decompiled source of GlobalVoiceM v1.3.0

GlobalVoiceM.dll

Decompiled 2 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using ExitGames.Client.Photon;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using Photon.Realtime;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace GlobalVoiceM
{
	public class VoiceBoost : MonoBehaviour
	{
		public volatile float gain = 1f;

		private void OnAudioFilterRead(float[] data, int channels)
		{
			float num = gain;
			if (!(num <= 1.001f))
			{
				for (int i = 0; i < data.Length; i++)
				{
					data[i] = (float)Math.Tanh(data[i] * num);
				}
			}
		}
	}
	[DefaultExecutionOrder(1000)]
	[BepInPlugin("com.you.globalvoicem", "GlobalVoiceM", "1.3.0")]
	public class Plugin : BaseUnityPlugin, IOnEventCallback
	{
		private class CamZ
		{
			public float applied;

			public float after;
		}

		private class Orig
		{
			public float blend;

			public float maxDist;

			public float minDist;

			public float vol;

			public float pitch;

			public float doppler;

			public bool lowPass;

			public bool applied;
		}

		private class Voice
		{
			public Component comp;

			public PhotonView view;

			public List<AudioSource> srcs = new List<AudioSource>();
		}

		private class Face
		{
			public float vis;

			public float target;

			public float phase;

			public string name;
		}

		private class Bubble
		{
			public string text;

			public float born;
		}

		private class Conf
		{
			public Vector2 p;

			public Vector2 v;

			public Color c;

			public float life;

			public float size;
		}

		private const string Prop = "GlobalVoiceM_On";

		private const string FxProp = "GlobalVoiceM_Fx";

		private const byte EvCode = 187;

		private ConfigEntry<KeyCode> kTalk;

		private ConfigEntry<KeyCode> kZoom;

		private ConfigEntry<KeyCode> kFlash;

		private ConfigEntry<KeyCode> kFx;

		private ConfigEntry<KeyCode> kAir;

		private ConfigEntry<KeyCode> kBoing;

		private ConfigEntry<KeyCode> kTrom;

		private ConfigEntry<KeyCode> kCoin;

		private ConfigEntry<KeyCode> kShout;

		private ConfigEntry<KeyCode> kRainbow;

		private ConfigEntry<KeyCode> kDrunk;

		private ConfigEntry<KeyCode> kNight;

		private ConfigEntry<KeyCode> kVhs;

		private ConfigEntry<KeyCode> kDump;

		private ConfigEntry<float> durCfg;

		private ConfigEntry<float> regenCfg;

		private ConfigEntry<float> pitchCfg;

		private ConfigEntry<float> gainCfg;

		private ConfigEntry<float> zoomTalkCfg;

		private ConfigEntry<float> zoomFactorCfg;

		private ConfigEntry<float> flIntensity;

		private ConfigEntry<float> flRange;

		private ConfigEntry<float> flAngle;

		private ConfigEntry<float> gameFlashBoost;

		private ConfigEntry<bool> facesCfg;

		private ConfigEntry<string> fontNameCfg;

		private ConfigEntry<string> frameSpriteCfg;

		private ConfigEntry<string> accentCfg;

		private float energy;

		private float startTime;

		private float lastErr;

		private float zoomT;

		private float zT;

		private float nextSend;

		private float punch;

		private float totalTalk;

		private float nextFontTry;

		private float dumpAt;

		private bool locked;

		private bool talking;

		private bool lastSent;

		private bool inputOK;

		private bool flashOn;

		private bool rainbow;

		private bool drunk;

		private bool night;

		private bool vhs;

		private bool dumped;

		private int fx;

		private int fontTries;

		private readonly HashSet<KeyCode> imHeld = new HashSet<KeyCode>();

		private readonly HashSet<KeyCode> prev = new HashSet<KeyCode>();

		private Color accent = new Color(1f, 0.62f, 0.05f);

		private static readonly string[] FxNames = new string[6] { "SQUEAKY", "NORMAL", "CHIPMUNK", "GIANT", "CAVE ECHO", "ALIEN" };

		private static readonly float[] FxPitch = new float[6] { 0f, 1f, 1.6f, 0.65f, 1f, 1.35f };

		private static readonly float[] FxEcho = new float[6] { 0f, 0f, 0f, 0f, 260f, 90f };

		private static readonly float[] FxDecay = new float[6] { 0f, 0f, 0f, 0f, 0.55f, 0.65f };

		private static readonly string[] SfxNames = new string[4] { "AIRHORN", "BOING", "SAD TROMBONE", "COIN" };

		private static readonly string[] Shouts = new string[10] { "I'M NOT SCARED!", "DON'T LOOK BEHIND YOU", "WHO TOUCHED MY HEAD?", "ROBOT DOWN!", "I LEFT THE STOVE ON", "THAT WAS MY LAST SNACK", "TELL MY MOM I LOVED HER", "NICE ONE, GENIUS", "BEHOLD, MY FLASHLIGHT!", "SOMEONE CALL A PLUMBER" };

		private AudioSource sfxSrc;

		private AudioClip[] clips;

		private readonly Dictionary<Camera, CamZ> camZ = new Dictionary<Camera, CamZ>();

		private GameObject flObj;

		private Light fl;

		private float flScan;

		private readonly HashSet<Light> boosted = new HashSet<Light>();

		private Type voiceType;

		private bool typeSearched;

		private bool loggedApply;

		private float scanTimer;

		private readonly Dictionary<AudioSource, Orig> origs = new Dictionary<AudioSource, Orig>();

		private readonly List<Voice> voices = new List<Voice>();

		private Font gameFont;

		private Texture2D frameTex;

		private Rect frameUv;

		private float nextSpriteTry;

		private Texture2D texRound;

		private Texture2D texRoundSm;

		private Texture2D texCircle;

		private Texture2D texGlow;

		private Texture2D texVig;

		private Texture2D texGrad;

		private Texture2D texScan;

		private Texture2D texNoise;

		private Texture2D texGrime;

		private GUIStyle stRound;

		private GUIStyle stRoundSm;

		private GUIStyle stText;

		private float panelAlpha;

		private float panelScale = 0.7f;

		private float flick = 1f;

		private float flickDip;

		private float fillPct = 1f;

		private readonly Dictionary<int, Face> faces = new Dictionary<int, Face>();

		private readonly List<int> faceOrder = new List<int>();

		private readonly List<Bubble> bubbles = new List<Bubble>();

		private readonly List<Conf> confetti = new List<Conf>();

		private Matrix4x4 baseM;

		private float vw;

		private float A = 1f;

		private void Awake()
		{
			//IL_041f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			startTime = Time.unscaledTime;
			kTalk = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "TalkKey", (KeyCode)109, "Hold: global voice");
			kZoom = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "ZoomKey", (KeyCode)122, "Hold: zoom");
			kFlash = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "FlashKey", (KeyCode)102, "Toggle extra flashlight");
			kFx = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "VoiceFxKey", (KeyCode)118, "Cycle voice effect");
			kAir = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "AirhornKey", (KeyCode)104, "Airhorn");
			kBoing = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "BoingKey", (KeyCode)106, "Boing");
			kTrom = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "TromboneKey", (KeyCode)107, "Sad trombone");
			kCoin = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "CoinKey", (KeyCode)108, "Coin");
			kShout = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "ShoutKey", (KeyCode)103, "Random funny shout bubble");
			kRainbow = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "RainbowKey", (KeyCode)114, "Rainbow flashlight");
			kDrunk = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "DrunkKey", (KeyCode)111, "Drunk vision");
			kNight = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "NightKey", (KeyCode)117, "Night vision");
			kVhs = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "VhsKey", (KeyCode)105, "VHS camera look");
			kDump = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keys", "DumpKey", (KeyCode)291, "Dump REPO fonts/sprites to a file");
			durCfg = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Seconds", 5f, "Max global talk time");
			regenCfg = ((BaseUnityPlugin)this).Config.Bind<float>("General", "RechargeSeconds", 20f, "Time to refill from empty");
			pitchCfg = ((BaseUnityPlugin)this).Config.Bind<float>("Voice", "SqueakyPitch", 1.18f, "Pitch of the default SQUEAKY voice");
			gainCfg = ((BaseUnityPlugin)this).Config.Bind<float>("Voice", "Loudness", 2.5f, "Loudness multiplier for global voice");
			zoomTalkCfg = ((BaseUnityPlugin)this).Config.Bind<float>("Visual", "TalkZoomFov", 10f, "FOV degrees removed while talking");
			zoomFactorCfg = ((BaseUnityPlugin)this).Config.Bind<float>("Visual", "ZoomKeyFactor", 2.5f, "Z zoom multiplier");
			facesCfg = ((BaseUnityPlugin)this).Config.Bind<bool>("Visual", "ShowFaces", true, "Show talking faces");
			accentCfg = ((BaseUnityPlugin)this).Config.Bind<string>("Visual", "AccentColor", "FF9E0D", "HUD accent color (hex)");
			fontNameCfg = ((BaseUnityPlugin)this).Config.Bind<string>("REPO", "FontName", "", "Part of a REPO font name to use (empty = auto). See dump file.");
			frameSpriteCfg = ((BaseUnityPlugin)this).Config.Bind<string>("REPO", "FrameSprite", "", "Part of a REPO sprite name to use as panel frame (empty = drawn frame)");
			flIntensity = ((BaseUnityPlugin)this).Config.Bind<float>("Flashlight", "Intensity", 3.5f, "Extra flashlight brightness");
			flRange = ((BaseUnityPlugin)this).Config.Bind<float>("Flashlight", "Range", 32f, "Extra flashlight range");
			flAngle = ((BaseUnityPlugin)this).Config.Bind<float>("Flashlight", "SpotAngle", 75f, "Extra flashlight cone angle");
			gameFlashBoost = ((BaseUnityPlugin)this).Config.Bind<float>("Flashlight", "GameFlashlightBoost", 1.6f, "Multiplier applied to REPO's own flashlight (1 = off)");
			Color val = default(Color);
			if (ColorUtility.TryParseHtmlString("#" + accentCfg.Value.TrimStart('#'), ref val))
			{
				accent = val;
			}
			energy = durCfg.Value;
			sfxSrc = ((Component)this).gameObject.AddComponent<AudioSource>();
			sfxSrc.spatialBlend = 0f;
			sfxSrc.playOnAwake = false;
			sfxSrc.volume = 1f;
			try
			{
				BuildAssets();
				BuildSfx();
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("Asset build failed: " + ex));
			}
			try
			{
				PhotonNetwork.AddCallbackTarget((object)this);
			}
			catch (Exception ex2)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)ex2.Message);
			}
			dumpAt = Time.unscaledTime + 40f;
			((BaseUnityPlugin)this).Logger.LogInfo((object)("GlobalVoiceM 1.3.0 loaded. Hold " + ((object)kTalk.Value/*cast due to .constrained prefix*/).ToString() + " to talk."));
		}

		private void OnDestroy()
		{
			try
			{
				PhotonNetwork.RemoveCallbackTarget((object)this);
			}
			catch
			{
			}
		}

		private unsafe bool Held(KeyCode k)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				Keyboard current = Keyboard.current;
				if (current != null && Enum.TryParse<Key>(((object)(*(KeyCode*)(&k))/*cast due to .constrained prefix*/).ToString(), out Key result))
				{
					inputOK = true;
					return ((ButtonControl)current[result]).isPressed;
				}
			}
			catch
			{
			}
			return imHeld.Contains(k);
		}

		private bool Edge(KeyCode k)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			bool num = Held(k);
			bool flag = prev.Contains(k);
			if (num)
			{
				prev.Add(k);
			}
			else
			{
				prev.Remove(k);
			}
			if (num)
			{
				return !flag;
			}
			return false;
		}

		private void Update()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_0344: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Unknown result type (might be due to invalid IL or missing references)
			UndoZoom();
			float deltaTime = Time.deltaTime;
			float value = durCfg.Value;
			float unscaledTime = Time.unscaledTime;
			bool flag = Held(kTalk.Value) && !locked && energy > 0f;
			if (flag != talking)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)(flag ? "Global talk START" : "Global talk STOP"));
			}
			talking = flag;
			if (talking)
			{
				energy -= deltaTime;
				totalTalk += deltaTime;
				if (energy <= 0f)
				{
					energy = 0f;
					locked = true;
				}
			}
			else
			{
				energy = Mathf.Min(value, energy + deltaTime * value / Mathf.Max(0.1f, regenCfg.Value));
				if (locked && energy >= 1f)
				{
					locked = false;
				}
			}
			if (talking != lastSent)
			{
				lastSent = talking;
				SendState();
			}
			if (Edge(kFlash.Value))
			{
				flashOn = !flashOn;
				PlayLocal(4);
				AddBubble("FLASHLIGHT " + (flashOn ? "ON" : "OFF"));
			}
			if (Edge(kRainbow.Value))
			{
				rainbow = !rainbow;
				AddBubble("RAINBOW LIGHT " + (rainbow ? "ON" : "OFF"));
			}
			if (Edge(kFx.Value))
			{
				fx = (fx + 1) % FxNames.Length;
				SendState();
				AddBubble("VOICE FX: " + FxNames[fx]);
			}
			if (Edge(kDrunk.Value))
			{
				drunk = !drunk;
				AddBubble("DRUNK VISION " + (drunk ? "ON" : "OFF"));
			}
			if (Edge(kNight.Value))
			{
				night = !night;
				AddBubble("NIGHT VISION " + (night ? "ON" : "OFF"));
			}
			if (Edge(kVhs.Value))
			{
				vhs = !vhs;
				AddBubble("VHS CAM " + (vhs ? "ON" : "OFF"));
			}
			if (Edge(kAir.Value))
			{
				Send(0, 0);
			}
			if (Edge(kBoing.Value))
			{
				Send(0, 1);
			}
			if (Edge(kTrom.Value))
			{
				Send(0, 2);
			}
			if (Edge(kCoin.Value))
			{
				Send(0, 3);
			}
			if (Edge(kShout.Value))
			{
				Send(1, Random.Range(0, Shouts.Length));
			}
			if (Edge(kDump.Value))
			{
				DumpAssets();
			}
			if (!dumped && unscaledTime > dumpAt)
			{
				dumped = true;
				DumpAssets();
			}
			if ((Object)(object)gameFont == (Object)null && fontTries < 12 && unscaledTime > nextFontTry)
			{
				nextFontTry = unscaledTime + 5f;
				fontTries++;
				TryFindFont();
			}
			if ((Object)(object)frameTex == (Object)null && frameSpriteCfg.Value.Length > 0 && unscaledTime > nextSpriteTry)
			{
				nextSpriteTry = unscaledTime + 6f;
				TryFindFrame();
			}
			zoomT = Mathf.Lerp(zoomT, talking ? 1f : 0f, 1f - Mathf.Exp((0f - deltaTime) * 3.5f));
			zT = Mathf.Lerp(zT, Held(kZoom.Value) ? 1f : 0f, 1f - Mathf.Exp((0f - deltaTime) * 6f));
			punch = Mathf.MoveTowards(punch, 0f, deltaTime * 2.2f);
			try
			{
				AnimateHud(deltaTime, value);
			}
			catch (Exception e)
			{
				Err(e);
			}
		}

		private void LateUpdate()
		{
			try
			{
				ApplyZoom();
			}
			catch (Exception e)
			{
				Err(e);
			}
			try
			{
				UpdateFlash();
			}
			catch (Exception e2)
			{
				Err(e2);
			}
			try
			{
				ApplyVoices();
			}
			catch (Exception e3)
			{
				Err(e3);
			}
		}

		private void Err(Exception e)
		{
			if (Time.unscaledTime - lastErr > 5f)
			{
				lastErr = Time.unscaledTime;
				((BaseUnityPlugin)this).Logger.LogError((object)e.ToString());
			}
		}

		private void SendState()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0046: Expected O, but got Unknown
			try
			{
				if (PhotonNetwork.InRoom)
				{
					Player localPlayer = PhotonNetwork.LocalPlayer;
					Hashtable val = new Hashtable();
					((Dictionary<object, object>)val).Add((object)"GlobalVoiceM_On", (object)talking);
					((Dictionary<object, object>)val).Add((object)"GlobalVoiceM_Fx", (object)fx);
					localPlayer.SetCustomProperties(val, (Hashtable)null, (WebFlags)null);
				}
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)ex.Message);
			}
		}

		private void Send(int kind, int arg)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			if (Time.unscaledTime < nextSend)
			{
				return;
			}
			nextSend = Time.unscaledTime + 2.5f;
			try
			{
				if (PhotonNetwork.InRoom)
				{
					PhotonNetwork.RaiseEvent((byte)187, (object)new object[2] { kind, arg }, new RaiseEventOptions
					{
						Receivers = (ReceiverGroup)1
					}, SendOptions.SendReliable);
				}
				else
				{
					Handle(kind, arg, "YOU");
				}
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)ex.Message);
			}
		}

		public void OnEvent(EventData e)
		{
			if (e.Code != 187)
			{
				return;
			}
			try
			{
				if (!(e.CustomData is object[] array) || array.Length < 2)
				{
					return;
				}
				string name = "SOMEONE";
				try
				{
					Player player = PhotonNetwork.CurrentRoom.GetPlayer(e.Sender, false);
					if (player != null)
					{
						name = player.NickName;
					}
				}
				catch
				{
				}
				Handle((int)array[0], (int)array[1], name);
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)ex.Message);
			}
		}

		private void Handle(int kind, int arg, string name)
		{
			if (kind == 0 && arg >= 0 && arg < SfxNames.Length)
			{
				PlayLocal(arg);
				punch = 1f;
				if (arg == 0 || arg == 3)
				{
					SpawnConfetti();
				}
				AddBubble(name + " played " + SfxNames[arg]);
			}
			else if (kind == 1 && arg >= 0 && arg < Shouts.Length)
			{
				AddBubble(name + ": " + Shouts[arg]);
			}
		}

		private static float Saw(float p)
		{
			float num = p / (MathF.PI * 2f);
			return 2f * (num - Mathf.Floor(num + 0.5f));
		}

		private static AudioClip MakeClip(string n, float secs, Func<float, float> f)
		{
			int num = 44100;
			int num2 = (int)(secs * (float)num);
			float[] array = new float[num2];
			for (int i = 0; i < num2; i++)
			{
				array[i] = Mathf.Clamp(f((float)i / (float)num), -1f, 1f);
			}
			AudioClip obj = AudioClip.Create(n, num2, 1, num, false);
			obj.SetData(array, 0);
			return obj;
		}

		private void BuildSfx()
		{
			float a1 = 0f;
			float a2 = 0f;
			float a3 = 0f;
			AudioClip val = MakeClip("air", 1f, delegate(float t)
			{
				float num = 1f - 0.06f * Mathf.Clamp01((t - 0.7f) / 0.3f);
				a1 += MathF.PI * 932f * num / 44100f;
				a2 += MathF.PI * 1108f * num / 44100f;
				a3 += MathF.PI * 1396f * num / 44100f;
				float num2 = Mathf.Min(1f, t / 0.02f) * Mathf.Clamp01((1f - t) / 0.12f);
				return (Saw(a1) + Saw(a2) * 0.8f + Saw(a3) * 0.6f) * 0.28f * num2 * (0.85f + 0.15f * Mathf.Sign(Mathf.Sin(t * 60f)));
			});
			float b = 0f;
			AudioClip val2 = MakeClip("boing", 0.8f, delegate(float t)
			{
				float num = 240f * (1f + 1.6f * Mathf.Exp((0f - t) * 4.5f)) * (1f + 0.12f * Mathf.Sin(t * 38f));
				b += MathF.PI * 2f * num / 44100f;
				return Mathf.Sin(b) * Mathf.Exp((0f - t) * 3.2f) * 0.8f;
			});
			float[] nf = new float[4] { 233f, 220f, 208f, 196f };
			float[] nd = new float[4] { 0.35f, 0.35f, 0.35f, 0.9f };
			float p = 0f;
			AudioClip val3 = MakeClip("trom", 2f, delegate(float t)
			{
				float num = 0f;
				int num2 = 0;
				float num3 = 0f;
				for (int i = 0; i < 4; i++)
				{
					if (t >= num + nd[i] && i < 3)
					{
						num += nd[i];
						num2 = i + 1;
					}
				}
				num3 = num;
				float num4 = t - num3;
				float num5 = nf[num2] * ((num2 == 3 && num4 > 0.25f) ? (1f + 0.025f * Mathf.Sin(t * 30f)) : 1f);
				p += MathF.PI * 2f * num5 / 44100f;
				float num6 = Mathf.Min(1f, num4 / 0.03f) * Mathf.Clamp01((nd[num2] - num4) / 0.06f);
				if (t > 1.99f)
				{
					num6 = 0f;
				}
				return (Mathf.Sin(p) + 0.5f * Mathf.Sin(2f * p) + 0.3f * Mathf.Sin(3f * p)) * 0.35f * num6;
			});
			float c1 = 0f;
			AudioClip val4 = MakeClip("coin", 0.45f, delegate(float t)
			{
				float num = ((t < 0.08f) ? 988f : 1319f);
				c1 += MathF.PI * 2f * num / 44100f;
				float num2 = ((t < 0.08f) ? t : (t - 0.08f));
				return Mathf.Sign(Mathf.Sin(c1)) * 0.22f * Mathf.Exp((0f - num2) * ((t < 0.08f) ? 2f : 9f));
			});
			AudioClip val5 = MakeClip("click", 0.05f, (float t) => (Random.value * 2f - 1f) * Mathf.Exp((0f - t) * 90f) * 0.5f);
			clips = (AudioClip[])(object)new AudioClip[5] { val, val2, val3, val4, val5 };
		}

		private void PlayLocal(int i)
		{
			if (clips != null && i >= 0 && i < clips.Length && (Object)(object)sfxSrc != (Object)null)
			{
				sfxSrc.PlayOneShot(clips[i], 1f);
			}
		}

		private void UndoZoom()
		{
			List<Camera> list = null;
			foreach (KeyValuePair<Camera, CamZ> item in camZ)
			{
				if ((Object)(object)item.Key == (Object)null)
				{
					(list ?? (list = new List<Camera>())).Add(item.Key);
					continue;
				}
				if (item.Value.applied != 0f && Mathf.Approximately(item.Key.fieldOfView, item.Value.after))
				{
					Camera key = item.Key;
					key.fieldOfView += item.Value.applied;
				}
				item.Value.applied = 0f;
			}
			if (list == null)
			{
				return;
			}
			foreach (Camera item2 in list)
			{
				camZ.Remove(item2);
			}
		}

		private void ApplyZoom()
		{
			float num = Mathf.SmoothStep(0f, 1f, zoomT);
			float num2 = Mathf.SmoothStep(0f, 1f, zT);
			float unscaledTime = Time.unscaledTime;
			float num3 = (drunk ? (6f * Mathf.Sin(unscaledTime * 1.7f) + 3f * Mathf.Sin(unscaledTime * 2.9f)) : 0f);
			float num4 = punch * punch * 9f;
			if (num < 0.002f && num2 < 0.002f && Mathf.Abs(num3) < 0.01f && num4 < 0.01f)
			{
				return;
			}
			Camera[] allCameras = Camera.allCameras;
			foreach (Camera val in allCameras)
			{
				if (!((Object)(object)val == (Object)null) && ((Behaviour)val).enabled && !val.orthographic)
				{
					float fieldOfView = val.fieldOfView;
					float num5 = fieldOfView - zoomTalkCfg.Value * num - num4 + num3;
					num5 /= Mathf.Lerp(1f, Mathf.Max(1f, zoomFactorCfg.Value), num2);
					num5 = Mathf.Clamp(num5, 5f, 150f);
					if (!camZ.TryGetValue(val, out var value))
					{
						value = new CamZ();
						camZ[val] = value;
					}
					val.fieldOfView = num5;
					value.applied = fieldOfView - num5;
					value.after = val.fieldOfView;
				}
			}
		}

		private void UpdateFlash()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			Camera main = Camera.main;
			if ((Object)(object)main != (Object)null)
			{
				if ((Object)(object)flObj == (Object)null)
				{
					flObj = new GameObject("GVM_Flash");
					((Object)flObj).hideFlags = (HideFlags)61;
					fl = flObj.AddComponent<Light>();
					fl.type = (LightType)0;
					fl.shadows = (LightShadows)0;
				}
				if ((Object)(object)flObj.transform.parent != (Object)(object)((Component)main).transform)
				{
					flObj.transform.SetParent(((Component)main).transform, false);
					flObj.transform.localPosition = Vector3.zero;
					flObj.transform.localRotation = Quaternion.identity;
				}
				fl.range = flRange.Value;
				fl.spotAngle = flAngle.Value;
				fl.intensity = flIntensity.Value;
				fl.color = (Color)(rainbow ? Color.HSVToRGB(Time.unscaledTime * 0.35f % 1f, 0.85f, 1f) : new Color(1f, 0.96f, 0.85f));
				((Behaviour)fl).enabled = flashOn;
			}
			flScan -= Time.deltaTime;
			if (!(flScan <= 0f) || !(gameFlashBoost.Value > 1.001f))
			{
				return;
			}
			flScan = 2f;
			Light[] array = Object.FindObjectsOfType<Light>();
			foreach (Light val in array)
			{
				if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)fl) && (int)val.type == 0 && !boosted.Contains(val))
				{
					bool flag = false;
					Transform val2 = ((Component)val).transform;
					int num = 0;
					while (num < 4 && (Object)(object)val2 != (Object)null && !flag)
					{
						flag = ((Object)val2).name.ToLowerInvariant().Contains("flashlight");
						num++;
						val2 = val2.parent;
					}
					if (flag)
					{
						boosted.Add(val);
						val.intensity *= gameFlashBoost.Value;
						val.range *= gameFlashBoost.Value;
						((BaseUnityPlugin)this).Logger.LogInfo((object)("Boosted game flashlight: " + ((Object)val).name));
					}
				}
			}
		}

		private PhotonView FindView(Component c)
		{
			PhotonView componentInParent = c.GetComponentInParent<PhotonView>();
			if ((Object)(object)componentInParent != (Object)null)
			{
				return componentInParent;
			}
			FieldInfo[] fields = ((object)c).GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (FieldInfo fieldInfo in fields)
			{
				try
				{
					object value = fieldInfo.GetValue(c);
					PhotonView val = (PhotonView)((value is PhotonView) ? value : null);
					if (val != null && (Object)(object)val != (Object)null)
					{
						return val;
					}
					Component val2 = (Component)((value is Component) ? value : null);
					if (val2 != null && (Object)(object)val2 != (Object)null)
					{
						PhotonView componentInParent2 = val2.GetComponentInParent<PhotonView>();
						if ((Object)(object)componentInParent2 != (Object)null)
						{
							return componentInParent2;
						}
					}
				}
				catch
				{
				}
			}
			return null;
		}

		private void ScanVoices()
		{
			voices.Clear();
			if (!typeSearched)
			{
				typeSearched = true;
				Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
				foreach (Assembly assembly in assemblies)
				{
					if (!assembly.GetName().Name.StartsWith("Assembly-CSharp"))
					{
						continue;
					}
					Type[] types = assembly.GetTypes();
					foreach (Type type in types)
					{
						if (type.Name == "PlayerVoiceChat")
						{
							voiceType = type;
							break;
						}
					}
					if (voiceType != null)
					{
						break;
					}
				}
				((BaseUnityPlugin)this).Logger.LogInfo((object)((voiceType != null) ? "Found PlayerVoiceChat type" : "PlayerVoiceChat type NOT found (global voice cannot work)"));
			}
			if (voiceType == null)
			{
				return;
			}
			Object[] array = Object.FindObjectsOfType(voiceType);
			foreach (Object obj in array)
			{
				Component val = (Component)(object)((obj is Component) ? obj : null);
				if ((Object)(object)val == (Object)null)
				{
					continue;
				}
				Voice voice = new Voice
				{
					comp = val,
					view = FindView(val)
				};
				voice.srcs.AddRange(val.GetComponentsInChildren<AudioSource>(true));
				FieldInfo[] fields = voiceType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				foreach (FieldInfo fieldInfo in fields)
				{
					try
					{
						object? value = fieldInfo.GetValue(val);
						AudioSource val2 = (AudioSource)((value is AudioSource) ? value : null);
						if ((Object)(object)val2 != (Object)null && !voice.srcs.Contains(val2))
						{
							voice.srcs.Add(val2);
						}
					}
					catch
					{
					}
				}
				voices.Add(voice);
			}
		}

		private void ApplyVoices()
		{
			if (!PhotonNetwork.InRoom)
			{
				return;
			}
			scanTimer -= Time.deltaTime;
			if (scanTimer <= 0f)
			{
				scanTimer = 1f;
				ScanVoices();
			}
			bool flag2 = default(bool);
			foreach (Voice voice in voices)
			{
				if ((Object)(object)voice.comp == (Object)null)
				{
					continue;
				}
				bool flag = false;
				int num = 0;
				if ((Object)(object)voice.view != (Object)null && voice.view.Owner != null && !voice.view.Owner.IsLocal)
				{
					Hashtable customProperties = voice.view.Owner.CustomProperties;
					int num2;
					if (((Dictionary<object, object>)(object)customProperties).TryGetValue((object)"GlobalVoiceM_On", out object value))
					{
						if (value is bool)
						{
							flag2 = (bool)value;
							num2 = 1;
						}
						else
						{
							num2 = 0;
						}
					}
					else
					{
						num2 = 0;
					}
					flag = (byte)((uint)num2 & (flag2 ? 1u : 0u)) != 0;
					if (((Dictionary<object, object>)(object)customProperties).TryGetValue((object)"GlobalVoiceM_Fx", out object value2) && value2 is int num3 && num3 >= 0 && num3 < FxNames.Length)
					{
						num = num3;
					}
				}
				foreach (AudioSource src in voice.srcs)
				{
					if ((Object)(object)src == (Object)null)
					{
						continue;
					}
					origs.TryGetValue(src, out var value3);
					if (flag)
					{
						if (value3 == null)
						{
							AudioLowPassFilter component = ((Component)src).GetComponent<AudioLowPassFilter>();
							value3 = new Orig
							{
								blend = src.spatialBlend,
								maxDist = src.maxDistance,
								minDist = src.minDistance,
								vol = src.volume,
								pitch = src.pitch,
								doppler = src.dopplerLevel,
								lowPass = ((Object)(object)component != (Object)null && ((Behaviour)component).enabled)
							};
							origs[src] = value3;
						}
						value3.applied = true;
						src.spatialBlend = 0f;
						src.minDistance = 1000f;
						src.maxDistance = 100000f;
						src.dopplerLevel = 0f;
						src.mute = false;
						src.volume = 1f;
						src.pitch = ((num == 0) ? pitchCfg.Value : FxPitch[num]);
						AudioLowPassFilter component2 = ((Component)src).GetComponent<AudioLowPassFilter>();
						if ((Object)(object)component2 != (Object)null)
						{
							((Behaviour)component2).enabled = false;
						}
						VoiceBoost voiceBoost = ((Component)src).GetComponent<VoiceBoost>();
						if ((Object)(object)voiceBoost == (Object)null)
						{
							voiceBoost = ((Component)src).gameObject.AddComponent<VoiceBoost>();
						}
						voiceBoost.gain = gainCfg.Value;
						AudioEchoFilter val = ((Component)src).GetComponent<AudioEchoFilter>();
						if (FxEcho[num] > 0f)
						{
							if ((Object)(object)val == (Object)null)
							{
								val = ((Component)src).gameObject.AddComponent<AudioEchoFilter>();
							}
							((Behaviour)val).enabled = true;
							val.delay = FxEcho[num];
							val.decayRatio = FxDecay[num];
							val.dryMix = 1f;
							val.wetMix = 1f;
						}
						else if ((Object)(object)val != (Object)null)
						{
							((Behaviour)val).enabled = false;
						}
						if (!loggedApply)
						{
							loggedApply = true;
							((BaseUnityPlugin)this).Logger.LogInfo((object)"Applied global voice to a speaker.");
						}
					}
					else if (value3 != null && value3.applied)
					{
						value3.applied = false;
						src.spatialBlend = value3.blend;
						src.maxDistance = value3.maxDist;
						src.minDistance = value3.minDist;
						src.volume = value3.vol;
						src.pitch = value3.pitch;
						src.dopplerLevel = value3.doppler;
						AudioLowPassFilter component3 = ((Component)src).GetComponent<AudioLowPassFilter>();
						if ((Object)(object)component3 != (Object)null)
						{
							((Behaviour)component3).enabled = value3.lowPass;
						}
						VoiceBoost component4 = ((Component)src).GetComponent<VoiceBoost>();
						if ((Object)(object)component4 != (Object)null)
						{
							component4.gain = 1f;
						}
						AudioEchoFilter component5 = ((Component)src).GetComponent<AudioEchoFilter>();
						if ((Object)(object)component5 != (Object)null)
						{
							((Behaviour)component5).enabled = false;
						}
					}
				}
			}
		}

		private void TryFindFont()
		{
			string text = fontNameCfg.Value.ToLowerInvariant();
			Font val = null;
			List<string> list = new List<string>();
			try
			{
				Type type = null;
				Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
				for (int i = 0; i < assemblies.Length; i++)
				{
					type = assemblies[i].GetType("TMPro.TMP_FontAsset");
					if (type != null)
					{
						break;
					}
				}
				if (type != null)
				{
					PropertyInfo property = type.GetProperty("sourceFontFile");
					Object[] array = Resources.FindObjectsOfTypeAll(type);
					foreach (Object val2 in array)
					{
						Font val3 = (Font)((property != null) ? /*isinst with value type is only supported in some contexts*/: null);
						if (!((Object)(object)val3 == (Object)null))
						{
							list.Add(val2.name + " -> " + ((Object)val3).name);
							if ((Object)(object)val == (Object)null && (text.Length == 0 || val2.name.ToLowerInvariant().Contains(text) || ((Object)val3).name.ToLowerInvariant().Contains(text)))
							{
								val = val3;
							}
						}
					}
				}
			}
			catch
			{
			}
			if ((Object)(object)val == (Object)null && text.Length > 0)
			{
				Font[] array2 = Resources.FindObjectsOfTypeAll<Font>();
				foreach (Font val4 in array2)
				{
					if (((Object)val4).name.ToLowerInvariant().Contains(text))
					{
						val = val4;
						break;
					}
				}
			}
			if ((Object)(object)val != (Object)null)
			{
				gameFont = val;
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Using REPO font: " + ((Object)val).name));
			}
			else if (fontTries == 1)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("No REPO font found yet (will retry). TMP fonts seen: " + list.Count));
			}
		}

		private void TryFindFrame()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			string value = frameSpriteCfg.Value.ToLowerInvariant();
			Sprite[] array = Resources.FindObjectsOfTypeAll<Sprite>();
			foreach (Sprite val in array)
			{
				if (!((Object)(object)val == (Object)null) && !((Object)(object)val.texture == (Object)null) && ((Object)val).name.ToLowerInvariant().Contains(value))
				{
					Rect textureRect = val.textureRect;
					Texture2D val2 = (frameTex = val.texture);
					frameUv = new Rect(((Rect)(ref textureRect)).x / (float)((Texture)val2).width, ((Rect)(ref textureRect)).y / (float)((Texture)val2).height, ((Rect)(ref textureRect)).width / (float)((Texture)val2).width, ((Rect)(ref textureRect)).height / (float)((Texture)val2).height);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Using REPO sprite as frame: " + ((Object)val).name));
					break;
				}
			}
		}

		private void DumpAssets()
		{
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("=== Fonts ===");
				SortedSet<string> sortedSet = new SortedSet<string>();
				Font[] array = Resources.FindObjectsOfTypeAll<Font>();
				foreach (Font val in array)
				{
					sortedSet.Add(((Object)val).name);
				}
				foreach (string item in sortedSet)
				{
					stringBuilder.AppendLine(item);
				}
				stringBuilder.AppendLine("=== TMP font assets ===");
				Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
				for (int i = 0; i < assemblies.Length; i++)
				{
					Type type = assemblies[i].GetType("TMPro.TMP_FontAsset");
					if (!(type == null))
					{
						Object[] array2 = Resources.FindObjectsOfTypeAll(type);
						foreach (Object val2 in array2)
						{
							stringBuilder.AppendLine(val2.name);
						}
						break;
					}
				}
				stringBuilder.AppendLine("=== Sprites (name | size) ===");
				SortedSet<string> sortedSet2 = new SortedSet<string>();
				Sprite[] array3 = Resources.FindObjectsOfTypeAll<Sprite>();
				foreach (Sprite val3 in array3)
				{
					if ((Object)(object)val3 != (Object)null)
					{
						string[] obj = new string[5]
						{
							((Object)val3).name,
							" | ",
							null,
							null,
							null
						};
						Rect rect = val3.rect;
						obj[2] = ((int)((Rect)(ref rect)).width).ToString();
						obj[3] = "x";
						rect = val3.rect;
						obj[4] = ((int)((Rect)(ref rect)).height).ToString();
						sortedSet2.Add(string.Concat(obj));
					}
				}
				foreach (string item2 in sortedSet2)
				{
					stringBuilder.AppendLine(item2);
				}
				string text = Path.Combine(Paths.BepInExRootPath, "GlobalVoiceM_dump.txt");
				File.WriteAllText(text, stringBuilder.ToString());
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Dumped REPO asset list to " + text));
				AddBubble("ASSET DUMP SAVED (BepInEx folder)");
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)("Dump failed: " + ex.Message));
			}
		}

		private static Texture2D MakeRounded(int size, int radius)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(size, size, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)1
			};
			Color32[] array = (Color32[])(object)new Color32[size * size];
			float num = (float)size / 2f;
			for (int i = 0; i < size; i++)
			{
				for (int j = 0; j < size; j++)
				{
					float num2 = Mathf.Max(Mathf.Abs((float)j + 0.5f - num) - (num - (float)radius), 0f);
					float num3 = Mathf.Max(Mathf.Abs((float)i + 0.5f - num) - (num - (float)radius), 0f);
					float num4 = Mathf.Sqrt(num2 * num2 + num3 * num3) - (float)radius;
					array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)(Mathf.Clamp01(0.5f - num4) * 255f));
				}
			}
			val.SetPixels32(array);
			val.Apply();
			return val;
		}

		private static Texture2D MakeGlow(int size, bool invert)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(size, size, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)1
			};
			Color32[] array = (Color32[])(object)new Color32[size * size];
			float num = (float)size / 2f;
			for (int i = 0; i < size; i++)
			{
				for (int j = 0; j < size; j++)
				{
					float num2 = Mathf.Sqrt(((float)j - num) * ((float)j - num) + ((float)i - num) * ((float)i - num)) / num;
					float num3 = (invert ? (Mathf.Pow(Mathf.Clamp01((num2 - 0.45f) * 1.3f), 1.6f) * 0.85f) : Mathf.Pow(Mathf.Clamp01(1f - num2), 2f));
					array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)(Mathf.Clamp01(num3) * 255f));
				}
			}
			val.SetPixels32(array);
			val.Apply();
			return val;
		}

		private static Texture2D MakeGrad()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(1, 64, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)1
			};
			for (int i = 0; i < 64; i++)
			{
				val.SetPixel(0, i, new Color(1f, 1f, 1f, Mathf.Pow((float)i / 63f, 1.5f)));
			}
			val.Apply();
			return val;
		}

		private static Texture2D MakeScan()
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(1, 4, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)0,
				filterMode = (FilterMode)0
			};
			val.SetPixels((Color[])(object)new Color[4]
			{
				new Color(0f, 0f, 0f, 0f),
				new Color(0f, 0f, 0f, 0.1f),
				new Color(0f, 0f, 0f, 0.5f),
				new Color(0f, 0f, 0f, 0.2f)
			});
			val.Apply();
			return val;
		}

		private static Texture2D MakeNoise()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(64, 64, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)0,
				filterMode = (FilterMode)0
			};
			Color32[] array = (Color32[])(object)new Color32[64 * 64];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)Random.Range(0, 256));
			}
			val.SetPixels32(array);
			val.Apply();
			return val;
		}

		private static Texture2D MakeGrime()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			int num = 128;
			Texture2D val = new Texture2D(num, num, (TextureFormat)4, false)
			{
				wrapMode = (TextureWrapMode)1
			};
			Color[] array = (Color[])(object)new Color[num * num];
			for (int i = 0; i < num; i++)
			{
				for (int j = 0; j < num; j++)
				{
					float num2 = Mathf.PerlinNoise((float)j * 0.06f + 7f, (float)i * 0.06f) * 0.6f + Mathf.PerlinNoise((float)j * 0.35f, (float)i * 0.35f + 20f) * 0.4f;
					float num3 = Mathf.Pow(Mathf.Max(Mathf.Abs((float)j - (float)num / 2f), Mathf.Abs((float)i - (float)num / 2f)) / ((float)num / 2f), 3f) * 0.5f;
					float num4 = Mathf.Clamp01(Mathf.Pow(num2, 2.4f) * 0.9f + num3);
					array[i * num + j] = new Color(0.16f, 0.1f, 0.04f, num4 * 0.7f);
				}
			}
			for (int k = 0; k < 14; k++)
			{
				float num5 = Random.Range(0, num);
				float num6 = Random.Range(0, num);
				float num7 = Random.Range(0f, 6.28f);
				float num8 = Random.Range(10, 45);
				for (float num9 = 0f; num9 < num8; num9 += 0.5f)
				{
					int num10 = (int)(num5 + Mathf.Cos(num7) * num9);
					int num11 = (int)(num6 + Mathf.Sin(num7) * num9);
					if (num10 >= 0 && num11 >= 0 && num10 < num && num11 < num)
					{
						array[num11 * num + num10] = new Color(0.75f, 0.7f, 0.6f, 0.35f);
					}
				}
			}
			val.SetPixels(array);
			val.Apply();
			return val;
		}

		private static GUIStyle Nine(Texture2D t, int b)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_0021: Expected O, but got Unknown
			GUIStyle val = new GUIStyle();
			val.normal.background = t;
			val.border = new RectOffset(b, b, b, b);
			return val;
		}

		private void BuildAssets()
		{
			texRound = MakeRounded(64, 16);
			texRoundSm = MakeRounded(16, 4);
			texCircle = MakeRounded(48, 24);
			texGlow = MakeGlow(128, invert: false);
			texVig = MakeGlow(128, invert: true);
			texGrad = MakeGrad();
			texScan = MakeScan();
			texNoise = MakeNoise();
			texGrime = MakeGrime();
			stRound = Nine(texRound, 16);
			stRoundSm = Nine(texRoundSm, 4);
		}

		private void AddBubble(string s)
		{
			bubbles.Add(new Bubble
			{
				text = s,
				born = Time.unscaledTime
			});
			if (bubbles.Count > 5)
			{
				bubbles.RemoveAt(0);
			}
		}

		private void SpawnConfetti()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 90; i++)
			{
				confetti.Add(new Conf
				{
					p = new Vector2(vw / 2f + Random.Range(-250f, 250f), 120f),
					v = new Vector2(Random.Range(-420f, 420f), Random.Range(-100f, 500f)),
					c = Color.HSVToRGB(Random.value, 0.8f, 1f),
					life = Random.Range(2f, 3.6f),
					size = Random.Range(6f, 12f)
				});
			}
		}

		private void AnimateHud(float dt, float max)
		{
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			float t = Time.unscaledTime;
			bool flag = talking || energy < max - 0.01f;
			float num = (talking ? 1f : (flag ? 0.42f : 0f));
			float num2 = (talking ? 1f : (flag ? 0.76f : 0.68f));
			float num3 = 1f - Mathf.Exp((0f - dt) * 6f);
			panelAlpha = Mathf.Lerp(panelAlpha, num, num3);
			panelScale = Mathf.Lerp(panelScale, num2, num3);
			flick = 1f - 0.08f * Mathf.PerlinNoise(t * 25f, 3.3f);
			if (flickDip > 0f)
			{
				flickDip -= dt;
				flick *= 0.55f;
			}
			else if (Random.value < 0.004f)
			{
				flickDip = 0.06f;
			}
			fillPct = Mathf.Lerp(fillPct, Mathf.Clamp01(energy / max), 1f - Mathf.Exp((0f - dt) * 14f));
			for (int num4 = confetti.Count - 1; num4 >= 0; num4--)
			{
				Conf conf = confetti[num4];
				conf.life -= dt;
				conf.p += conf.v * dt;
				conf.v.y += 900f * dt;
				conf.v.x *= 0.992f;
				if (conf.life <= 0f)
				{
					confetti.RemoveAt(num4);
				}
			}
			bubbles.RemoveAll((Bubble b) => t - b.born > 4.5f);
			Dictionary<int, string> dictionary = new Dictionary<int, string>();
			if (facesCfg.Value)
			{
				if (talking)
				{
					dictionary[PhotonNetwork.InRoom ? PhotonNetwork.LocalPlayer.ActorNumber : (-1)] = (PhotonNetwork.InRoom ? PhotonNetwork.LocalPlayer.NickName : "YOU");
				}
				if (PhotonNetwork.InRoom)
				{
					Player[] playerList = PhotonNetwork.PlayerList;
					bool flag2 = default(bool);
					foreach (Player val in playerList)
					{
						if (val.IsLocal)
						{
							continue;
						}
						int num6;
						if (((Dictionary<object, object>)(object)val.CustomProperties).TryGetValue((object)"GlobalVoiceM_On", out object value))
						{
							if (value is bool)
							{
								flag2 = (bool)value;
								num6 = 1;
							}
							else
							{
								num6 = 0;
							}
						}
						else
						{
							num6 = 0;
						}
						if (((uint)num6 & (flag2 ? 1u : 0u)) != 0)
						{
							dictionary[val.ActorNumber] = val.NickName;
						}
					}
				}
			}
			foreach (KeyValuePair<int, string> item in dictionary)
			{
				if (!faces.ContainsKey(item.Key))
				{
					faces[item.Key] = new Face
					{
						phase = Random.value * 6.28f,
						name = item.Value
					};
					faceOrder.Add(item.Key);
				}
			}
			float num7 = 1f - Mathf.Exp((0f - dt) * 7f);
			foreach (int item2 in new List<int>(faceOrder))
			{
				Face face = faces[item2];
				face.target = (dictionary.ContainsKey(item2) ? 1f : 0f);
				face.vis = Mathf.Lerp(face.vis, face.target, num7);
				if (face.target == 0f && face.vis < 0.01f)
				{
					faces.Remove(item2);
					faceOrder.Remove(item2);
				}
			}
		}

		private static string Rank(float s)
		{
			if (s < 10f)
			{
				return "MIME";
			}
			if (s < 30f)
			{
				return "WHISPERER";
			}
			if (s < 60f)
			{
				return "CHATTERBOX";
			}
			if (s < 120f)
			{
				return "RADIO DJ";
			}
			if (s < 240f)
			{
				return "MEGAPHONE MENACE";
			}
			return "WALKING PODCAST";
		}

		private void OnGUI()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Invalid comparison between Unknown and I4
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Invalid comparison between Unknown and I4
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Invalid comparison between Unknown and I4
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			Event current = Event.current;
			if ((int)current.type == 4)
			{
				imHeld.Add(current.keyCode);
			}
			else if ((int)current.type == 5)
			{
				imHeld.Remove(current.keyCode);
			}
			if ((int)current.type == 7 && !((Object)(object)texRound == (Object)null))
			{
				GUI.depth = -1000;
				if (stText == null)
				{
					stText = new GUIStyle(GUI.skin.label)
					{
						fontStyle = (FontStyle)1,
						clipping = (TextClipping)0,
						wordWrap = false
					};
					stText.normal.textColor = Color.white;
				}
				if ((Object)(object)gameFont != (Object)null && (Object)(object)stText.font != (Object)(object)gameFont)
				{
					stText.font = gameFont;
				}
				try
				{
					float num = (float)Screen.height / 1080f;
					baseM = Matrix4x4.Scale(new Vector3(num, num, 1f));
					vw = (float)Screen.width / num;
					DrawScreenFx();
					DrawZoomOverlay();
					DrawFaces();
					DrawPanel();
					DrawBubbles();
					DrawConfetti();
					DrawToast();
				}
				catch (Exception e)
				{
					Err(e);
				}
				GUI.matrix = Matrix4x4.identity;
				GUI.color = Color.white;
			}
		}

		private Matrix4x4 Xform(Vector2 center, float rot, Vector2 scale, Vector2 pivot)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			return baseM * Matrix4x4.TRS(new Vector3(center.x, center.y, 0f), Quaternion.Euler(0f, 0f, rot), new Vector3(scale.x, scale.y, 1f)) * Matrix4x4.Translate(new Vector3(0f - pivot.x, 0f - pivot.y, 0f));
		}

		private void Col(Color c)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			GUI.color = new Color(c.r, c.g, c.b, c.a * A);
		}

		private void Fill(Rect r, Color c)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Col(c);
			GUI.DrawTexture(r, (Texture)(object)Texture2D.whiteTexture);
		}

		private void Round(Rect r, Color c, bool small = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Col(c);
			GUI.Box(r, GUIContent.none, small ? stRoundSm : stRound);
		}

		private void Glow(Rect r, Color c)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Col(c);
			GUI.DrawTexture(r, (Texture)(object)texGlow);
		}

		private void Circle(Vector2 p, float rad, Color c)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			Col(c);
			GUI.DrawTexture(new Rect(p.x - rad, p.y - rad, rad * 2f, rad * 2f), (Texture)(object)texCircle);
		}

		private void Txt(Rect r, string s, int size, TextAnchor al, Color c)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			stText.fontSize = size;
			stText.alignment = al;
			Col(c);
			GUI.Label(r, s, stText);
		}

		private void GlowText(Rect r, string s, int size, TextAnchor al, Color c)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			Txt(new Rect(((Rect)(ref r)).x - 1.5f, ((Rect)(ref r)).y, ((Rect)(ref r)).width, ((Rect)(ref r)).height), s, size, al, new Color(1f, 0.1f, 0.1f, 0.35f));
			Txt(new Rect(((Rect)(ref r)).x + 1.5f, ((Rect)(ref r)).y, ((Rect)(ref r)).width, ((Rect)(ref r)).height), s, size, al, new Color(0.1f, 0.9f, 1f, 0.35f));
			Txt(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).y + 1f, ((Rect)(ref r)).width, ((Rect)(ref r)).height), s, size, al, new Color(c.r, c.g, c.b, 0.3f));
			Txt(r, s, size, al, c);
		}

		private void DrawPanel()
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0378: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0503: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_0565: Unknown result type (might be due to invalid IL or missing references)
			//IL_057e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_0442: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_060e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0641: Unknown result type (might be due to invalid IL or missing references)
			//IL_065a: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0717: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a30: Unknown result type (might be due to invalid IL or missing references)
			//IL_098c: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb1: Unknown result type (might be due to invalid IL or missing references)
			//IL_083f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0846: Unknown result type (might be due to invalid IL or missing references)
			//IL_0869: Unknown result type (might be due to invalid IL or missing references)
			//IL_089b: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0904: Unknown result type (might be due to invalid IL or missing references)
			//IL_090d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0923: Unknown result type (might be due to invalid IL or missing references)
			//IL_093f: Unknown result type (might be due to invalid IL or missing references)
			//IL_095e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0977: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2c: Unknown result type (might be due to invalid IL or missing references)
			if (panelAlpha < 0.01f)
			{
				return;
			}
			float unscaledTime = Time.unscaledTime;
			float num = Mathf.Sin(unscaledTime * 1.3f);
			Vector2 val = (Vector2)(talking ? new Vector2(Mathf.Sin(unscaledTime * 60f) * 0.7f, Mathf.Cos(unscaledTime * 47f) * 0.7f) : Vector2.zero);
			Vector2 center = new Vector2(vw / 2f, 864f) + val;
			GUI.matrix = Xform(center, Mathf.Sin(unscaledTime * 0.9f) * 0.7f, new Vector2(panelScale * (1f + 0.025f * num), panelScale), new Vector2(260f, 66f));
			A = panelAlpha * flick;
			Color val2 = Color.Lerp(accent, new Color(1f, 0.15f, 0.05f), 0.6f);
			Color val3 = (Color)(locked ? new Color(0.9f, 0.12f, 0.08f) : ((fillPct < 0.3f) ? val2 : accent));
			float num2 = (talking ? 1f : 0.5f);
			Glow(new Rect(-50f, -20f, 620f, 222f), new Color(0f, 0f, 0f, 0.65f));
			Glow(new Rect(-90f, -70f, 700f, 272f), new Color(val3.r, val3.g, val3.b, (0.18f + 0.08f * Mathf.Sin(unscaledTime * 3f)) * num2));
			Round(new Rect(6f + 5f * num, 9f, 520f, 132f), new Color(0f, 0f, 0f, 0.7f));
			Round(new Rect(3f + 2.5f * num, 4.5f, 520f, 132f), new Color(0.06f, 0.06f, 0.055f, 1f));
			if ((Object)(object)frameTex != (Object)null)
			{
				Col(Color.white);
				GUI.DrawTextureWithTexCoords(new Rect(0f, 0f, 520f, 132f), (Texture)(object)frameTex, frameUv);
			}
			else
			{
				Round(new Rect(0f, 0f, 520f, 132f), new Color(0.2f, 0.2f, 0.18f, 1f));
				Round(new Rect(3f, 2f, 514f, 72.6f), new Color(1f, 1f, 0.9f, 0.07f));
				Round(new Rect(0f, 79.200005f, 520f, 52.8f), new Color(0f, 0f, 0f, 0.18f));
				Fill(new Rect(18f, 3f, 484f, 1.5f), new Color(0.85f, 0.82f, 0.7f, 0.35f));
				Vector2[] array = (Vector2[])(object)new Vector2[4]
				{
					new Vector2(13f, 13f),
					new Vector2(507f, 13f),
					new Vector2(13f, 119f),
					new Vector2(507f, 119f)
				};
				foreach (Vector2 val4 in array)
				{
					Circle(val4, 6f, new Color(0.05f, 0.05f, 0.05f, 1f));
					Circle(val4, 4.6f, new Color(0.5f, 0.48f, 0.42f, 1f));
					Fill(new Rect(val4.x - 3.2f, val4.y - 0.6f, 6.4f, 1.2f), new Color(0.12f, 0.12f, 0.1f, 1f));
				}
			}
			Rect val5 = default(Rect);
			((Rect)(ref val5))..ctor(28f, 20f, 464f, 92f);
			Round(new Rect(((Rect)(ref val5)).x - 3f, ((Rect)(ref val5)).y - 3f, ((Rect)(ref val5)).width + 6f, ((Rect)(ref val5)).height + 6f), new Color(0f, 0f, 0f, 0.9f));
			Round(val5, new Color(0.012f, 0.03f, 0.014f, 1f));
			Glow(new Rect(((Rect)(ref val5)).x - 20f, ((Rect)(ref val5)).y - 20f, ((Rect)(ref val5)).width + 40f, ((Rect)(ref val5)).height + 40f), new Color(0.1f, 0.45f, 0.12f, 0.1f));
			bool flag = talking && (int)(unscaledTime * 3f) % 2 == 0;
			Circle(new Vector2(((Rect)(ref val5)).x + 18f, ((Rect)(ref val5)).y + 17f), 5f, locked ? new Color(0.4f, 0.05f, 0.04f) : (flag ? new Color(1f, 0.15f, 0.1f) : new Color(0.3f, 0.05f, 0.04f)));
			if (flag)
			{
				Glow(new Rect(((Rect)(ref val5)).x + 2f, ((Rect)(ref val5)).y + 1f, 32f, 32f), new Color(1f, 0.1f, 0.05f, 0.5f));
			}
			string s = (locked ? "RECHARGING" : (talking ? "GLOBAL COMM  ON AIR" : "GLOBAL COMM  STANDBY"));
			GlowText(new Rect(((Rect)(ref val5)).x + 32f, ((Rect)(ref val5)).y + 4f, 260f, 26f), s, 15, (TextAnchor)3, new Color(val3.r, Mathf.Min(1f, val3.g + 0.15f), val3.b + 0.1f, 0.95f));
			GlowText(new Rect(((Rect)(ref val5)).xMax - 120f, ((Rect)(ref val5)).y + 1f, 106f, 32f), energy.ToString("00.0") + "s", 24, (TextAnchor)5, val3);
			float num3 = ((Rect)(ref val5)).x + 14f;
			float num4 = ((Rect)(ref val5)).width - 28f;
			float num5 = ((Rect)(ref val5)).y + 36f;
			float num6 = 26f;
			Round(new Rect(num3 - 4f, num5 - 4f, num4 + 8f, num6 + 8f), new Color(0.05f, 0.035f, 0.02f, 1f), small: true);
			float num7 = (num4 - 60.000004f) / 26f;
			float num8 = fillPct * 26f;
			Color val6 = default(Color);
			for (int j = 0; j < 26; j++)
			{
				float num9 = num3 + (float)j * (num7 + 2.4f);
				float num10 = Mathf.Clamp01(num8 - (float)j);
				if (num10 > 0.01f)
				{
					float num11 = ((j == Mathf.FloorToInt(num8) && talking) ? (0.7f + 0.3f * Mathf.Sin(unscaledTime * 30f)) : 1f);
					((Color)(ref val6))..ctor(val3.r, val3.g * (0.75f + 0.25f * (1f - (float)j / 26f)), val3.b, 1f);
					Glow(new Rect(num9 - 8f, num5 - 12f, num7 + 16f, num6 + 24f), new Color(val6.r, val6.g, val6.b, 0.35f * num10 * num11));
					Fill(new Rect(num9, num5, num7, num6), new Color(val6.r * (0.55f + 0.45f * num10), val6.g * (0.55f + 0.45f * num10), val6.b, num11));
					Fill(new Rect(num9, num5, num7, 3f), new Color(1f, 1f, 0.9f, 0.3f * num10));
					Fill(new Rect(num9, num5 + num6 - 3f, num7, 3f), new Color(0f, 0f, 0f, 0.25f));
				}
				else
				{
					Fill(new Rect(num9, num5, num7, num6), new Color(0.13f, 0.075f, 0.035f, 1f));
				}
			}
			float num12 = ((Rect)(ref val5)).y + 72f;
			float num13 = 20f;
			int num14 = 78;
			float num15 = (((Rect)(ref val5)).width - 28f) / (float)num14;
			Fill(new Rect(num3, num12 + num13 / 2f - 0.5f, ((Rect)(ref val5)).width - 28f, 1f), new Color(val3.r, val3.g, val3.b, 0.25f));
			for (int k = 0; k < num14; k++)
			{
				float num16 = Mathf.Sin((float)k / (float)(num14 - 1) * MathF.PI);
				float num17 = (talking ? ((0.18f + 0.82f * Mathf.PerlinNoise(unscaledTime * 14f + (float)k * 0.33f, 1.7f)) * num16) : (0.05f + 0.03f * Mathf.PerlinNoise(unscaledTime * 3f + (float)k * 0.5f, 4f)));
				float num18 = Mathf.Max(1.5f, num17 * num13);
				Fill(new Rect(num3 + (float)k * num15, num12 + num13 / 2f - num18 / 2f, num15 * 0.62f, num18), new Color(val3.r, Mathf.Min(1f, val3.g + 0.2f), val3.b, talking ? 0.9f : 0.35f));
			}
			Col(new Color(1f, 1f, 1f, 0.85f));
			GUI.DrawTexture(val5, (Texture)(object)texGrime);
			Col(Color.white);
			GUI.DrawTextureWithTexCoords(val5, (Texture)(object)texScan, new Rect(0f, 0f, 1f, ((Rect)(ref val5)).height / 4f));
			Col(new Color(1f, 1f, 1f, 0.09f));
			GUI.DrawTextureWithTexCoords(val5, (Texture)(object)texNoise, new Rect(Random.value, Random.value, 1f, 1f));
			Col(new Color(0f, 0f, 0f, 1f));
			GUI.DrawTexture(val5, (Texture)(object)texVig);
			Col(new Color(1f, 1f, 1f, 0.07f));
			GUI.DrawTexture(new Rect(((Rect)(ref val5)).x, ((Rect)(ref val5)).y, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height * 0.45f), (Texture)(object)texGrad, (ScaleMode)0, true, 0f);
			Glow(new Rect(((Rect)(ref val5)).x - 10f, ((Rect)(ref val5)).y - 10f, 90f, 60f), new Color(1f, 1f, 1f, 0.12f));
			string s2 = "FX: " + FxNames[fx] + "   LIGHT: " + ((!flashOn) ? "OFF" : (rainbow ? "RAINBOW" : "ON")) + "   " + Rank(totalTalk) + " " + totalTalk.ToString("0") + "s";
			GlowText(new Rect(0f, 140f, 520f, 22f), s2, 14, (TextAnchor)4, new Color(val3.r, val3.g, val3.b, 0.85f));
		}

		private void DrawFaces()
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0503: Unknown result type (might be due to invalid IL or missing references)
			//IL_051c: Unknown result type (might be due to invalid IL or missing references)
			//IL_053b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			float unscaledTime = Time.unscaledTime;
			Vector2 center = default(Vector2);
			for (int i = 0; i < faceOrder.Count; i++)
			{
				Face face = faces[faceOrder[i]];
				A = face.vis;
				float num = Mathf.Sin(unscaledTime * 4f + face.phase);
				((Vector2)(ref center))..ctor(vw - 120f - (float)i * 170f + Mathf.Sin(unscaledTime * 2.5f + face.phase) * 16f, 130f);
				float num2 = 1.3f * face.vis * (1f + 0.04f * Mathf.Sin(unscaledTime * 11f));
				GUI.matrix = Xform(center, num * 13f, new Vector2(num2, num2), new Vector2(60f, 60f));
				Glow(new Rect(-70f, -70f, 260f, 260f), new Color(accent.r, accent.g, accent.b, 0.45f));
				Round(new Rect(-8f, 36f, 16f, 40f), new Color(0.33f, 0.33f, 0.3f, 1f), small: true);
				Round(new Rect(112f, 36f, 16f, 40f), new Color(0.33f, 0.33f, 0.3f, 1f), small: true);
				Fill(new Rect(58.5f, -12f, 3f, 20f), new Color(0.3f, 0.3f, 0.28f, 1f));
				bool flag = (int)(unscaledTime * 4f + face.phase) % 2 == 0;
				Circle(new Vector2(60f, -14f), 6f, flag ? new Color(1f, 0.3f, 0.1f) : new Color(0.4f, 0.1f, 0.05f));
				Round(new Rect(3f, 3f, 120f, 112f), new Color(0f, 0f, 0f, 0.5f));
				Round(new Rect(0f, 0f, 120f, 112f), new Color(0.63f, 0.64f, 0.58f, 1f));
				Round(new Rect(3f, 3f, 114f, 44f), new Color(1f, 1f, 1f, 0.12f));
				Col(new Color(1f, 1f, 1f, 0.9f));
				GUI.DrawTexture(new Rect(0f, 0f, 120f, 112f), (Texture)(object)texGrime);
				Round(new Rect(13f, 14f, 94f, 48f), new Color(0.025f, 0.035f, 0.025f, 1f));
				float[] array = new float[2] { 32f, 88f };
				foreach (float num3 in array)
				{
					Glow(new Rect(num3 - 22f, 18f, 44f, 44f), new Color(accent.r, accent.g, accent.b, 0.55f));
					Round(new Rect(num3 - 9f, 29f, 18f, 18f), new Color(1f, 0.68f, 0.12f, 1f), small: true);
					Fill(new Rect(num3 - 6f, 31f, 5f, 4f), new Color(1f, 1f, 0.8f, 0.8f));
				}
				float num4 = Mathf.Clamp01(0.5f + 0.5f * Mathf.Sin(unscaledTime * 17f + face.phase)) * (0.5f + 0.5f * Mathf.PerlinNoise(unscaledTime * 9f, face.phase));
				float num5 = Mathf.Lerp(6f, 28f, num4);
				Round(new Rect(37f, 82f - num5 / 2f, 46f, num5), new Color(0.05f, 0.03f, 0.02f, 1f), small: true);
				Fill(new Rect(41f, 82f - num5 / 2f + 1f, 38f, 2f), new Color(0.85f, 0.85f, 0.8f, 0.8f));
				GlowText(new Rect(-60f, 122f, 240f, 26f), face.name, 18, (TextAnchor)4, new Color(1f, 0.85f, 0.5f));
			}
		}

		private void DrawZoomOverlay()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.SmoothStep(0f, 1f, zT);
			if (!(num < 0.01f))
			{
				A = num;
				float unscaledTime = Time.unscaledTime;
				GUI.matrix = baseM;
				Color c = default(Color);
				((Color)(ref c))..ctor(accent.r, accent.g, accent.b, 0.9f);
				Col(new Color(0f, 0f, 0f, 0.55f));
				GUI.DrawTexture(new Rect(0f, 0f, vw, 1080f), (Texture)(object)texVig);
				Col(new Color(1f, 1f, 1f, 0.5f));
				GUI.DrawTextureWithTexCoords(new Rect(0f, 0f, vw, 1080f), (Texture)(object)texScan, new Rect(0f, 0f, 1f, 270f));
				float num2 = 110f;
				float num3 = 80f;
				float num4 = 3f;
				Fill(new Rect(num2, num2, num3, num4), c);
				Fill(new Rect(num2, num2, num4, num3), c);
				Fill(new Rect(vw - num2 - num3, num2, num3, num4), c);
				Fill(new Rect(vw - num2 - num4, num2, num4, num3), c);
				Fill(new Rect(num2, 1080f - num2 - num4, num3, num4), c);
				Fill(new Rect(num2, 1080f - num2 - num3, num4, num3), c);
				Fill(new Rect(vw - num2 - num3, 1080f - num2 - num4, num3, num4), c);
				Fill(new Rect(vw - num2 - num4, 1080f - num2 - num3, num4, num3), c);
				float num5 = vw / 2f;
				float num6 = 540f;
				Fill(new Rect(num5 - 14f, num6 - 0.75f, 10f, 1.5f), c);
				Fill(new Rect(num5 + 4f, num6 - 0.75f, 10f, 1.5f), c);
				Fill(new Rect(num5 - 0.75f, num6 - 14f, 1.5f, 10f), c);
				Fill(new Rect(num5 - 0.75f, num6 + 4f, 1.5f, 10f), c);
				Circle(new Vector2(num2 + 18f, num2 + 26f + num3), 5f, ((int)(unscaledTime * 2f) % 2 == 0) ? new Color(1f, 0.15f, 0.1f) : new Color(0.3f, 0.05f, 0.04f));
				GlowText(new Rect(num2 + 30f, num2 + 12f + num3, 240f, 28f), "ZOOM " + Mathf.Lerp(1f, zoomFactorCfg.Value, num).ToString("0.0") + "x", 20, (TextAnchor)3, c);
			}
		}

		private void DrawScreenFx()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_043f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			float unscaledTime = Time.unscaledTime;
			GUI.matrix = baseM;
			A = 1f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, vw, 1080f);
			if (drunk)
			{
				Color c = Color.HSVToRGB(unscaledTime * 0.15f % 1f, 0.6f, 1f);
				c.a = 0.07f + 0.03f * Mathf.Sin(unscaledTime * 2f);
				Fill(val, c);
				Col(new Color(0f, 0f, 0f, 0.35f));
				GUI.DrawTexture(val, (Texture)(object)texVig);
				GlowText(new Rect(40f, 1010f, 300f, 30f), "DRUNK VISION", 18, (TextAnchor)3, new Color(1f, 0.5f, 0.9f));
			}
			if (night)
			{
				Fill(val, new Color(0.05f, 0.55f, 0.08f, 0.2f));
				Col(new Color(1f, 1f, 1f, 0.16f));
				GUI.DrawTextureWithTexCoords(val, (Texture)(object)texNoise, new Rect(Random.value, Random.value, vw / 64f, 16.875f));
				Col(new Color(1f, 1f, 1f, 0.6f));
				GUI.DrawTextureWithTexCoords(val, (Texture)(object)texScan, new Rect(0f, 0f, 1f, 270f));
				Col(new Color(0f, 0.1f, 0f, 0.75f));
				GUI.DrawTexture(val, (Texture)(object)texVig);
				if ((int)(unscaledTime * 2f) % 2 == 0)
				{
					GlowText(new Rect(40f, 40f, 320f, 30f), "NIGHT VISION", 20, (TextAnchor)3, new Color(0.4f, 1f, 0.4f));
				}
			}
			if (vhs)
			{
				Col(new Color(0f, 0f, 0f, 0.35f));
				GUI.DrawTexture(val, (Texture)(object)texVig);
				Col(new Color(1f, 1f, 1f, 0.07f));
				GUI.DrawTextureWithTexCoords(val, (Texture)(object)texNoise, new Rect(Random.value, Random.value, vw / 64f, 16.875f));
				float num = unscaledTime * 140f % 1300f - 100f;
				Fill(new Rect(0f, num, vw, 26f), new Color(1f, 1f, 1f, 0.05f));
				if (Random.value < 0.12f)
				{
					Fill(new Rect(0f, Random.Range(0f, 1080f), vw, 2f), new Color(1f, 1f, 1f, 0.18f));
				}
				if ((int)(unscaledTime * 1.5f) % 2 == 0)
				{
					Circle(new Vector2(70f, 62f), 9f, new Color(1f, 0.1f, 0.08f));
				}
				GlowText(new Rect(90f, 46f, 140f, 32f), "REC", 26, (TextAnchor)3, Color.white);
				GlowText(new Rect(40f, 90f, 200f, 28f), "PLAY >", 20, (TextAnchor)3, Color.white);
				GlowText(new Rect(40f, 1000f, 520f, 32f), DateTime.Now.ToString("MMM dd yyyy   HH:mm:ss").ToUpper(), 22, (TextAnchor)3, Color.white);
				float num2 = 30f;
				float num3 = 50f;
				float num4 = 2f;
				Color c2 = default(Color);
				((Color)(ref c2))..ctor(1f, 1f, 1f, 0.6f);
				Fill(new Rect(num2, num2, num3, num4), c2);
				Fill(new Rect(num2, num2, num4, num3), c2);
				Fill(new Rect(vw - num2 - num3, num2, num3, num4), c2);
				Fill(new Rect(vw - num2 - num4, num2, num4, num3), c2);
				Fill(new Rect(num2, 1080f - num2 - num4, num3, num4), c2);
				Fill(new Rect(num2, 1080f - num2 - num3, num4, num3), c2);
				Fill(new Rect(vw - num2 - num3, 1080f - num2 - num4, num3, num4), c2);
				Fill(new Rect(vw - num2 - num4, 1080f - num2 - num3, num4, num3), c2);
			}
		}

		private void DrawBubbles()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			float unscaledTime = Time.unscaledTime;
			GUI.matrix = baseM;
			for (int i = 0; i < bubbles.Count; i++)
			{
				Bubble bubble = bubbles[i];
				float num = unscaledTime - bubble.born;
				A = Mathf.Clamp01(Mathf.Min(num / 0.15f, (4.5f - num) / 0.6f));
				float num2 = 1f + 0.2f * Mathf.Exp((0f - num) * 9f) * Mathf.Cos(num * 25f);
				float num3 = Mathf.Max(220f, (float)bubble.text.Length * 13f + 50f);
				float num4 = 40f;
				float num5 = 100f + (float)i * 48f;
				GUI.matrix = Xform(new Vector2(vw / 2f, num5 + num4 / 2f), 0f, new Vector2(num2, num2), new Vector2(num3 / 2f, num4 / 2f));
				Round(new Rect(3f, 3f, num3, num4), new Color(0f, 0f, 0f, 0.5f), small: true);
				Round(new Rect(0f, 0f, num3, num4), new Color(0.05f, 0.05f, 0.04f, 0.92f), small: true);
				Fill(new Rect(10f, num4 - 3f, num3 - 20f, 2f), new Color(accent.r, accent.g, accent.b, 0.8f));
				GlowText(new Rect(0f, 0f, num3, num4), bubble.text, 18, (TextAnchor)4, new Color(1f, 0.85f, 0.5f));
			}
		}

		private void DrawConfetti()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			GUI.matrix = baseM;
			A = 1f;
			foreach (Conf item in confetti)
			{
				Fill(new Rect(item.p.x, item.p.y, item.size, item.size * 0.6f), new Color(item.c.r, item.c.g, item.c.b, Mathf.Clamp01(item.life)));
			}
		}

		private void DrawToast()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			float num = Time.unscaledTime - startTime;
			if (!(num > 10f))
			{
				A = Mathf.Clamp01(Mathf.Min(num / 0.6f, (10f - num) / 1.2f));
				GUI.matrix = baseM;
				string text = "GlobalVoiceM ready - hold " + ((object)kTalk.Value/*cast due to .constrained prefix*/).ToString() + ": voice | " + ((object)kZoom.Value/*cast due to .constrained prefix*/).ToString() + ": zoom | " + ((object)kFlash.Value/*cast due to .constrained prefix*/).ToString() + ": flashlight | " + ((object)kFx.Value/*cast due to .constrained prefix*/).ToString() + ": voice FX | " + ((object)kAir.Value/*cast due to .constrained prefix*/).ToString() + "/" + ((object)kBoing.Value/*cast due to .constrained prefix*/).ToString() + "/" + ((object)kTrom.Value/*cast due to .constrained prefix*/).ToString() + "/" + ((object)kCoin.Value/*cast due to .constrained prefix*/).ToString() + ": sounds | " + ((object)kShout.Value/*cast due to .constrained prefix*/).ToString() + ": shout";
				if (num > 2f && !inputOK)
				{
					text += "  (Input System keyboard not detected)";
				}
				float num2 = Mathf.Min(vw - 40f, 1500f);
				Round(new Rect(vw / 2f - num2 / 2f, 24f, num2, 40f), new Color(0f, 0f, 0f, 0.75f), small: true);
				GlowText(new Rect(vw / 2f - num2 / 2f, 24f, num2, 40f), text, 16, (TextAnchor)4, new Color(1f, 0.7f, 0.2f));
			}
		}
	}
}