244 lines
8.5 KiB
C#
244 lines
8.5 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Async;
|
|
using RecRoom.Avatar.Poseable;
|
|
using RecRoom.Core.Imposters;
|
|
using UnityEngine;
|
|
using UnityEngine.Experimental.Rendering;
|
|
|
|
// Token: 0x0200219B RID: 8603
|
|
[Token(Token = "0x200219B")]
|
|
[StructLayout(3)]
|
|
public static class FPKIFEPMJFK
|
|
{
|
|
// Token: 0x0600ED07 RID: 60679 RVA: 0x00382D18 File Offset: 0x00380F18
|
|
[Token(Token = "0x600ED07")]
|
|
[Address(RVA = "0x1651D30", Offset = "0x1650730", VA = "0x181651D30")]
|
|
public static RenderTexture GOGOEPEJEOB()
|
|
{
|
|
int imageResolution = FPKIFEPMJFK.PBGBNMCPEAJ.ImageResolution;
|
|
int num;
|
|
RenderTexture renderTexture = new RenderTexture(imageResolution, imageResolution, 24, (RenderTextureFormat)num);
|
|
num = 0;
|
|
renderTexture.name = "[PoseableAvatarImage]RenderTexture";
|
|
EOAEDHMGACB.KFHLFMBHDBC(renderTexture);
|
|
return renderTexture;
|
|
}
|
|
|
|
// Token: 0x0600ED08 RID: 60680 RVA: 0x00382D58 File Offset: 0x00380F58
|
|
[Token(Token = "0x600ED08")]
|
|
[Address(RVA = "0x1651E00", Offset = "0x1650800", VA = "0x181651E00")]
|
|
public static IPromise IHIAJEDJADM(GGMFNEALJGL KJAFOCJMDIH, RenderTexture LDEKHANDCBO)
|
|
{
|
|
PoseableAvatarAsset[] poses = FPKIFEPMJFK.PBGBNMCPEAJ.Poses;
|
|
global::System.Random pnldcpgaopc = FPKIFEPMJFK.PNLDCPGAOPC;
|
|
int length = poses.Length;
|
|
int num;
|
|
PoseableAvatarAsset poseableAvatarAsset = FPKIFEPMJFK.PBGBNMCPEAJ.Poses[num];
|
|
return FPKIFEPMJFK.MEKBLKFCOKE(KJAFOCJMDIH, poseableAvatarAsset, LDEKHANDCBO);
|
|
}
|
|
|
|
// Token: 0x0600ED09 RID: 60681 RVA: 0x00382DA4 File Offset: 0x00380FA4
|
|
[Token(Token = "0x600ED09")]
|
|
[Address(RVA = "0x1651EF0", Offset = "0x16508F0", VA = "0x181651EF0")]
|
|
public static IPromise MEKBLKFCOKE(GGMFNEALJGL KJAFOCJMDIH, PoseableAvatarAsset BEKEOBJFIAC, RenderTexture LDEKHANDCBO)
|
|
{
|
|
FPKIFEPMJFK.EAPKGEEBNAD eapkgeebnad = new FPKIFEPMJFK.EAPKGEEBNAD();
|
|
eapkgeebnad.renderTexture = LDEKHANDCBO;
|
|
eapkgeebnad.asset = BEKEOBJFIAC;
|
|
int num = 0;
|
|
if (!(LDEKHANDCBO == num) && PoseableAvatarPuppet.IsAvatarValidForPoseGeneration(KJAFOCJMDIH))
|
|
{
|
|
int graphicsFormat = (int)eapkgeebnad.renderTexture.graphicsFormat;
|
|
PoseableAvatarConfig pbgbnmcpeaj = FPKIFEPMJFK.PBGBNMCPEAJ;
|
|
if (graphicsFormat == pbgbnmcpeaj.ImageResolution)
|
|
{
|
|
RenderTexture renderTexture = eapkgeebnad.renderTexture;
|
|
PoseableAvatarConfig pbgbnmcpeaj2 = FPKIFEPMJFK.PBGBNMCPEAJ;
|
|
if (eapkgeebnad.renderTexture.format == RenderTextureFormat.ARGB32 && eapkgeebnad.renderTexture.depth == 24)
|
|
{
|
|
PoseableAvatarPuppet poseableAvatarPuppet = global::UnityEngine.Object.Instantiate<PoseableAvatarPuppet>(FPKIFEPMJFK.PBGBNMCPEAJ.PuppetPrefab);
|
|
eapkgeebnad.puppetInstance = poseableAvatarPuppet;
|
|
poseableAvatarPuppet.gameObject.NHCPFEKJPIA(DAJFOCGPHGP.Water);
|
|
PoseableAvatarPuppet puppetInstance = eapkgeebnad.puppetInstance;
|
|
PoseableAvatarAsset asset = eapkgeebnad.asset;
|
|
IPromise promise = puppetInstance.InitializeAsync(KJAFOCJMDIH, asset);
|
|
Func<IPromise> func = delegate
|
|
{
|
|
GameObject gameObject = eapkgeebnad.puppetInstance.gameObject;
|
|
RenderTexture renderTexture2 = eapkgeebnad.renderTexture;
|
|
ImposterRenderConfig renderConfiguration = eapkgeebnad.asset.RenderConfiguration;
|
|
if (renderConfiguration == 0)
|
|
{
|
|
PoseableAvatarConfig pbgbnmcpeaj3 = FPKIFEPMJFK.PBGBNMCPEAJ;
|
|
}
|
|
JODFIHBJHJM.LHIJJOKKALC(gameObject, renderTexture2, renderConfiguration);
|
|
IPromise <CompletedPromise>k__BackingField = Promise.<CompletedPromise>k__BackingField;
|
|
IPromise promise2;
|
|
return promise2;
|
|
};
|
|
int num2 = 0;
|
|
num2 += num2;
|
|
num2++;
|
|
Action action = delegate
|
|
{
|
|
global::UnityEngine.Object.Destroy(eapkgeebnad.puppetInstance.gameObject);
|
|
};
|
|
if (num2 < eapkgeebnad)
|
|
{
|
|
num2 += num2;
|
|
num2++;
|
|
}
|
|
action += action;
|
|
num2 += num2;
|
|
}
|
|
}
|
|
return Promise.FromError("Texture does not meet the expected requirements. Get a suitable texture by calling CreateAvatarImageRenderTexture()");
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600ED0A RID: 60682 RVA: 0x00382ED0 File Offset: 0x003810D0
|
|
[Token(Token = "0x600ED0A")]
|
|
[Address(RVA = "0x1652420", Offset = "0x1650E20", VA = "0x181652420")]
|
|
public static void PFKMOKFOLCH(RenderTexture FAACBOBPIKK, RenderTexture LBPIJFELLCN)
|
|
{
|
|
PoseableAvatarConfig pbgbnmcpeaj = FPKIFEPMJFK.PBGBNMCPEAJ;
|
|
GraphicsFormat graphicsFormat = FAACBOBPIKK.graphicsFormat;
|
|
int num = (int)graphicsFormat;
|
|
int num2 = (int)graphicsFormat;
|
|
int num3 = Mathf.Min(num, num2);
|
|
int num4 = Mathf.RoundToInt(Mathf.Log((float)num, 2f)) - 1;
|
|
int num5 = Mathf.Clamp(num, 1, num4);
|
|
RenderTexture[] array = new RenderTexture[num5];
|
|
int num6 = 0;
|
|
if (num5 > 0)
|
|
{
|
|
num -= num5;
|
|
num = num2;
|
|
num -= num5;
|
|
GraphicsFormat graphicsFormat2 = FAACBOBPIKK.graphicsFormat;
|
|
RenderTexture renderTexture;
|
|
if (renderTexture != 0)
|
|
{
|
|
}
|
|
array[0] = renderTexture;
|
|
int length = array.Length;
|
|
if (num6 == 0)
|
|
{
|
|
}
|
|
RenderTexture renderTexture2 = array[num6];
|
|
int num7 = 0;
|
|
FPKIFEPMJFK.OMCPCPLPCNK(renderTexture2, renderTexture, num7);
|
|
num6++;
|
|
}
|
|
GraphicsFormat graphicsFormat3 = FAACBOBPIKK.graphicsFormat;
|
|
int num8 = num5 - 1;
|
|
RenderTexture renderTexture3 = array[num8];
|
|
Material dropShadowMaterial = FPKIFEPMJFK.PBGBNMCPEAJ.DropShadowMaterial;
|
|
RenderTexture renderTexture4;
|
|
FPKIFEPMJFK.OMCPCPLPCNK(renderTexture3, renderTexture4, dropShadowMaterial);
|
|
RenderTexture.ReleaseTemporary(array[num8]);
|
|
if (renderTexture4 != 0)
|
|
{
|
|
}
|
|
array[0] = renderTexture4;
|
|
if (num5 > 0)
|
|
{
|
|
int length2 = array.Length;
|
|
RenderTexture renderTexture5 = array[num8];
|
|
if (num8 > 0)
|
|
{
|
|
}
|
|
if (num5 > 0)
|
|
{
|
|
RenderTexture.ReleaseTemporary(array[num6]);
|
|
num6++;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600ED0B RID: 60683 RVA: 0x00383004 File Offset: 0x00381204
|
|
[Token(Token = "0x600ED0B")]
|
|
[Address(RVA = "0x1652340", Offset = "0x1650D40", VA = "0x181652340")]
|
|
private static void OMCPCPLPCNK(RenderTexture DIEPOPNJNCO, RenderTexture IKAFBCDJOCL, [Optional] Material KFENPJENIOI)
|
|
{
|
|
EOAEDHMGACB.KFHLFMBHDBC(IKAFBCDJOCL);
|
|
int num = 0;
|
|
if (!(KFENPJENIOI != num))
|
|
{
|
|
Graphics.Blit(DIEPOPNJNCO, IKAFBCDJOCL);
|
|
return;
|
|
}
|
|
Graphics.Blit(DIEPOPNJNCO, IKAFBCDJOCL, KFENPJENIOI);
|
|
}
|
|
|
|
// Token: 0x04009D73 RID: 40307
|
|
[Token(Token = "0x4009D73")]
|
|
private static readonly PoseableAvatarConfig PBGBNMCPEAJ = OIOLECLLCPM.GDJBDCKGDLE<PoseableAvatarConfig>("LoadingScreen");
|
|
|
|
// Token: 0x04009D74 RID: 40308
|
|
[Token(Token = "0x4009D74")]
|
|
private static global::System.Random PNLDCPGAOPC = new global::System.Random((int)DateTime.Now.dateData);
|
|
|
|
// Token: 0x04009D75 RID: 40309
|
|
[Token(Token = "0x4009D75")]
|
|
public static string KBPLNLKJCMO = "LoadingScreen";
|
|
|
|
// Token: 0x0200219C RID: 8604
|
|
[Token(Token = "0x200219C")]
|
|
[CompilerGenerated]
|
|
private sealed class EAPKGEEBNAD
|
|
{
|
|
// Token: 0x0600ED0D RID: 60685 RVA: 0x00383070 File Offset: 0x00381270
|
|
[Token(Token = "0x600ED0D")]
|
|
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
|
public EAPKGEEBNAD()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600ED0E RID: 60686 RVA: 0x00383084 File Offset: 0x00381284
|
|
[Token(Token = "0x600ED0E")]
|
|
[Address(RVA = "0x164AE10", Offset = "0x1649810", VA = "0x18164AE10")]
|
|
internal IPromise <CaptureAvatarPoseAsync>b__0()
|
|
{
|
|
GameObject gameObject = this.puppetInstance.gameObject;
|
|
RenderTexture renderTexture = this.renderTexture;
|
|
ImposterRenderConfig renderConfiguration = this.asset.RenderConfiguration;
|
|
if (renderConfiguration == 0)
|
|
{
|
|
PoseableAvatarConfig pbgbnmcpeaj = FPKIFEPMJFK.PBGBNMCPEAJ;
|
|
}
|
|
JODFIHBJHJM.LHIJJOKKALC(gameObject, renderTexture, renderConfiguration);
|
|
IPromise <CompletedPromise>k__BackingField = Promise.<CompletedPromise>k__BackingField;
|
|
IPromise promise;
|
|
return promise;
|
|
}
|
|
|
|
// Token: 0x0600ED0F RID: 60687 RVA: 0x003830E4 File Offset: 0x003812E4
|
|
[Token(Token = "0x600ED0F")]
|
|
[Address(RVA = "0x164AFE0", Offset = "0x16499E0", VA = "0x18164AFE0")]
|
|
internal void <CaptureAvatarPoseAsync>b__1()
|
|
{
|
|
global::UnityEngine.Object.Destroy(this.puppetInstance.gameObject);
|
|
}
|
|
|
|
// Token: 0x04009D76 RID: 40310
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4009D76")]
|
|
public PoseableAvatarPuppet puppetInstance;
|
|
|
|
// Token: 0x04009D77 RID: 40311
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4009D77")]
|
|
public RenderTexture renderTexture;
|
|
|
|
// Token: 0x04009D78 RID: 40312
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4009D78")]
|
|
public PoseableAvatarAsset asset;
|
|
}
|
|
}
|