much happenings in this fucked up world
This commit is contained in:
parent
29fc81ef37
commit
2f6d3b7b5b
55 changed files with 1067 additions and 52 deletions
31
Legacy Tools/mitzifier/RSHWFile.cs
Normal file
31
Legacy Tools/mitzifier/RSHWFile.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
sealed class AntiUnityBinder : System.Runtime.Serialization.SerializationBinder
|
||||
{
|
||||
public override Type BindToType(string assemblyName, string typeName)
|
||||
{
|
||||
return Type.GetType(String.Format("RSHWFile, " + Assembly.GetExecutingAssembly().FullName));
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class RSHWFile
|
||||
{
|
||||
public byte[]? audioData { get; set; }
|
||||
public int[]? signalData { get; set; }
|
||||
public byte[]? videoData { get; set; }
|
||||
}
|
||||
|
||||
public class RSHWLoader
|
||||
{
|
||||
public static RSHWFile Load(string path)
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Binder = new AntiUnityBinder();
|
||||
FileStream stream = File.OpenRead(path);
|
||||
return (RSHWFile)formatter.Deserialize(stream);
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue