scripts
This commit is contained in:
@@ -0,0 +1,300 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Video;
|
||||
|
||||
namespace RecRoom.Core.Cinematics
|
||||
{
|
||||
// Token: 0x02002A99 RID: 10905
|
||||
[Token(Token = "0x2002A99")]
|
||||
[StructLayout(3)]
|
||||
public class CinematicVideoPlayer : CinematicBehaviour
|
||||
{
|
||||
// Token: 0x06013149 RID: 78153 RVA: 0x004956A8 File Offset: 0x004938A8
|
||||
[Token(Token = "0x6013149")]
|
||||
[Address(RVA = "0x185A3E0", Offset = "0x1858DE0", VA = "0x18185A3E0", Slot = "4")]
|
||||
protected override void Awake()
|
||||
{
|
||||
VideoPlayer videoPlayer = this.videoPlayer;
|
||||
this.isPlaying = false;
|
||||
VideoClip clip = videoPlayer.clip;
|
||||
int num = 0;
|
||||
if (clip == num && !string.IsNullOrEmpty(this.streamingAssetsMoviePath))
|
||||
{
|
||||
VideoPlayer videoPlayer2 = this.videoPlayer;
|
||||
string streamingAssetsPath = Application.streamingAssetsPath;
|
||||
string text = this.streamingAssetsMoviePath;
|
||||
string text2 = string.Format("{0}/{1}", streamingAssetsPath, text);
|
||||
videoPlayer2.url = text2;
|
||||
}
|
||||
if (this.videoPlayer.audioOutputMode == VideoAudioOutputMode.AudioSource)
|
||||
{
|
||||
AudioSource audioSource = this.audioSource;
|
||||
int num2 = 0;
|
||||
if (audioSource != num2)
|
||||
{
|
||||
VideoPlayer videoPlayer3 = this.videoPlayer;
|
||||
int num3 = 0;
|
||||
videoPlayer3.EnableAudioTrack((ushort)num3, true);
|
||||
VideoPlayer videoPlayer4 = this.videoPlayer;
|
||||
AudioSource audioSource2 = this.audioSource;
|
||||
int num4 = 0;
|
||||
videoPlayer4.SetTargetAudioSource((ushort)num4, audioSource2);
|
||||
VideoPlayer videoPlayer5 = this.videoPlayer;
|
||||
}
|
||||
}
|
||||
this.videoPlayer.Prepare();
|
||||
}
|
||||
|
||||
// Token: 0x0601314A RID: 78154 RVA: 0x00495788 File Offset: 0x00493988
|
||||
[Token(Token = "0x601314A")]
|
||||
[Address(RVA = "0x185A930", Offset = "0x1859330", VA = "0x18185A930", Slot = "5")]
|
||||
protected override void Start()
|
||||
{
|
||||
this.BDBPEDPLJOD();
|
||||
if (this.useAntiTamperHash)
|
||||
{
|
||||
VideoClip clip = this.videoPlayer.clip;
|
||||
int num = 0;
|
||||
if (clip == num && !string.IsNullOrEmpty(this.streamingAssetsMoviePath))
|
||||
{
|
||||
string streamingAssetsPath = Application.streamingAssetsPath;
|
||||
string text = this.streamingAssetsMoviePath;
|
||||
string text2 = string.Format("{0}/{1}", streamingAssetsPath, text);
|
||||
string text3 = this.antiTamperHash;
|
||||
if (text2 == 0)
|
||||
{
|
||||
string text4 = ABDNCGCKIDC.EKMIBHHBDNO(text2);
|
||||
string text5 = this.antiTamperHash;
|
||||
bool flag = text4 != text5;
|
||||
if (flag)
|
||||
{
|
||||
string text6;
|
||||
Debug.LogWarning(text6);
|
||||
this.GCPANLLFEDJ = true;
|
||||
CFLMJLFBOKH.PDMJKFBIEGI(this.streamingAssetsMoviePath);
|
||||
return;
|
||||
}
|
||||
if (this.autoPlay != flag)
|
||||
{
|
||||
this.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601314B RID: 78155 RVA: 0x0049584C File Offset: 0x00493A4C
|
||||
[Token(Token = "0x601314B")]
|
||||
[Address(RVA = "0x185A690", Offset = "0x1859090", VA = "0x18185A690")]
|
||||
private void OnEnable()
|
||||
{
|
||||
if (this.HNIKJLNICGN)
|
||||
{
|
||||
bool isCompleted = ((IAsyncResult)this).IsCompleted;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601314C RID: 78156 RVA: 0x0049586C File Offset: 0x00493A6C
|
||||
[Token(Token = "0x601314C")]
|
||||
[Address(RVA = "0x185A850", Offset = "0x1859250", VA = "0x18185A850")]
|
||||
public void PlayStreamingVideo(string IDJBCFJGMNH)
|
||||
{
|
||||
this.videoPlayer.Stop();
|
||||
VideoPlayer videoPlayer = this.videoPlayer;
|
||||
string streamingAssetsPath = Application.streamingAssetsPath;
|
||||
string text = string.Format("{0}/{1}", streamingAssetsPath, IDJBCFJGMNH);
|
||||
videoPlayer.url = text;
|
||||
this.videoPlayer.Play();
|
||||
Debug.Log("Playing: " + IDJBCFJGMNH);
|
||||
}
|
||||
|
||||
// Token: 0x170032E6 RID: 13030
|
||||
// (get) Token: 0x0601314D RID: 78157 RVA: 0x004958C8 File Offset: 0x00493AC8
|
||||
[Token(Token = "0x170032E6")]
|
||||
public bool MDOLKDKPOGF
|
||||
{
|
||||
[Token(Token = "0x601314D")]
|
||||
[Address(RVA = "0x185AB00", Offset = "0x1859500", VA = "0x18185AB00")]
|
||||
get
|
||||
{
|
||||
return this.videoPlayer.isPlaying;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601314E RID: 78158 RVA: 0x004958E8 File Offset: 0x00493AE8
|
||||
[Token(Token = "0x601314E")]
|
||||
[Address(RVA = "0x1170520", Offset = "0x116EF20", VA = "0x181170520")]
|
||||
public void PlayVideo()
|
||||
{
|
||||
bool isCompleted = ((IAsyncResult)this).IsCompleted;
|
||||
}
|
||||
|
||||
// Token: 0x0601314F RID: 78159 RVA: 0x004958FC File Offset: 0x00493AFC
|
||||
[Token(Token = "0x601314F")]
|
||||
[Address(RVA = "0x9E3670", Offset = "0x9E2070", VA = "0x1809E3670")]
|
||||
public void StopVideo()
|
||||
{
|
||||
bool isCompleted = ((IAsyncResult)this).IsCompleted;
|
||||
}
|
||||
|
||||
// Token: 0x06013150 RID: 78160 RVA: 0x00495910 File Offset: 0x00493B10
|
||||
[Token(Token = "0x6013150")]
|
||||
[Address(RVA = "0x185A780", Offset = "0x1859180", VA = "0x18185A780")]
|
||||
public void PauseVideo()
|
||||
{
|
||||
if (!this.GCPANLLFEDJ)
|
||||
{
|
||||
VideoPlayer videoPlayer = this.videoPlayer;
|
||||
int num = 0;
|
||||
if (videoPlayer != num)
|
||||
{
|
||||
this.videoPlayer.Pause();
|
||||
}
|
||||
AudioSource audioSource = this.audioSource;
|
||||
int num2 = 0;
|
||||
if (audioSource != num2)
|
||||
{
|
||||
this.audioSource.Pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06013151 RID: 78161 RVA: 0x00495968 File Offset: 0x00493B68
|
||||
[Token(Token = "0x6013151")]
|
||||
[Address(RVA = "0x185A570", Offset = "0x1858F70", VA = "0x18185A570", Slot = "8")]
|
||||
protected override void BDBPEDPLJOD()
|
||||
{
|
||||
if (!this.GCPANLLFEDJ)
|
||||
{
|
||||
VideoPlayer videoPlayer = this.videoPlayer;
|
||||
this.HNIKJLNICGN = true;
|
||||
int num = 0;
|
||||
if (videoPlayer != num)
|
||||
{
|
||||
this.videoPlayer.Play();
|
||||
}
|
||||
AudioSource audioSource = this.audioSource;
|
||||
int num2 = 0;
|
||||
if (audioSource != num2)
|
||||
{
|
||||
this.audioSource.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06013152 RID: 78162 RVA: 0x004959C8 File Offset: 0x00493BC8
|
||||
[Token(Token = "0x6013152")]
|
||||
[Address(RVA = "0x185A6B0", Offset = "0x18590B0", VA = "0x18185A6B0", Slot = "9")]
|
||||
protected override void PHPEJNODMHE()
|
||||
{
|
||||
if (!this.GCPANLLFEDJ)
|
||||
{
|
||||
VideoPlayer videoPlayer = this.videoPlayer;
|
||||
int num = 0;
|
||||
if (videoPlayer != num)
|
||||
{
|
||||
this.videoPlayer.Stop();
|
||||
}
|
||||
AudioSource audioSource = this.audioSource;
|
||||
int num2 = 0;
|
||||
if (audioSource != num2)
|
||||
{
|
||||
this.audioSource.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06013153 RID: 78163 RVA: 0x00495A20 File Offset: 0x00493C20
|
||||
[Token(Token = "0x6013153")]
|
||||
[Address(RVA = "0x185A640", Offset = "0x1859040", VA = "0x18185A640")]
|
||||
private string FKEEDFICEHJ()
|
||||
{
|
||||
string streamingAssetsPath = Application.streamingAssetsPath;
|
||||
string text = this.streamingAssetsMoviePath;
|
||||
return string.Format("{0}/{1}", streamingAssetsPath, text);
|
||||
}
|
||||
|
||||
// Token: 0x06013154 RID: 78164 RVA: 0x00495A48 File Offset: 0x00493C48
|
||||
[Token(Token = "0x6013154")]
|
||||
[Address(RVA = "0x185AAE0", Offset = "0x18594E0", VA = "0x18185AAE0")]
|
||||
public CinematicVideoPlayer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400CF2C RID: 53036
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400CF2C")]
|
||||
[SerializeField]
|
||||
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false)]
|
||||
private VideoPlayer videoPlayer;
|
||||
|
||||
// Token: 0x0400CF2D RID: 53037
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400CF2D")]
|
||||
[SerializeField]
|
||||
private AudioSource audioSource;
|
||||
|
||||
// Token: 0x0400CF2E RID: 53038
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400CF2E")]
|
||||
public string streamingAssetsMoviePath;
|
||||
|
||||
// Token: 0x0400CF2F RID: 53039
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400CF2F")]
|
||||
[SerializeField]
|
||||
private bool autoPlay;
|
||||
|
||||
// Token: 0x0400CF30 RID: 53040
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x400CF30")]
|
||||
[Header("PS4-specific Parameters")]
|
||||
public int renderWidth = (int)((ulong)1280L);
|
||||
|
||||
// Token: 0x0400CF31 RID: 53041
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400CF31")]
|
||||
public int renderHeight = (int)((ulong)720L);
|
||||
|
||||
// Token: 0x0400CF32 RID: 53042
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400CF32")]
|
||||
public Renderer playTarget;
|
||||
|
||||
// Token: 0x0400CF33 RID: 53043
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400CF33")]
|
||||
[SerializeField]
|
||||
[HideInInspector]
|
||||
[Header("Anti Tamper")]
|
||||
private bool useAntiTamperHash = true;
|
||||
|
||||
// Token: 0x0400CF34 RID: 53044
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400CF34")]
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
[Tooltip("Generate this when you setup the streamingAssetsMoviePath. This is so the users dont put a new file under here and mess with what plays in the game.")]
|
||||
private string antiTamperHash;
|
||||
|
||||
// Token: 0x0400CF35 RID: 53045
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400CF35")]
|
||||
[SerializeField]
|
||||
[HideInInspector]
|
||||
private string hashedStreamingAssetsMoviePath;
|
||||
|
||||
// Token: 0x0400CF36 RID: 53046
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x400CF36")]
|
||||
private bool GCPANLLFEDJ;
|
||||
|
||||
// Token: 0x0400CF37 RID: 53047
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x69")]
|
||||
[Token(Token = "0x400CF37")]
|
||||
private bool HNIKJLNICGN;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user