public void Deserialize( IUnrealStream stream ) { FileName = stream.ReadText(); SerialOffset = (uint)stream.ReadIndex(); SerialSize = (uint)stream.ReadIndex(); FileFlags = stream.ReadUInt32(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.R); stream.Serialize(ref this.G); stream.Serialize(ref this.B); stream.Serialize(ref this.A); }
public void Deserialize( IUnrealStream stream ) { FileTableOffset = stream.ReadUInt32(); FileSize = stream.ReadUInt32(); Version = stream.ReadUInt32(); CRC32 = stream.ReadUInt32(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.PowerName); stream.Serialize(ref this.CurrentRank); stream.Serialize(ref this.PowerClassName); stream.Serialize(ref this.WheelDisplayIndex); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.SecondsSinceMidnight); stream.Serialize(ref this.Day); stream.Serialize(ref this.Month); stream.Serialize(ref this.Year); }
public void Deserialize( IUnrealStream stream ) { Name = stream.ReadText(); // Mass effect 2 if (stream.Version == 512) { Flags = stream.ReadUInt32(); } else { Flags = stream.Version >= QWORDVersion ? stream.ReadUInt64() : stream.ReadUInt32(); } #if DEOBFUSCATE // De-obfuscate names that contain unprintable characters! foreach( char c in Name ) { if( !char.IsLetterOrDigit( c ) ) { Name = "N" + TableIndex + "_OBF"; break; } } #endif }
public override void Deserialize( IUnrealStream stream ) { CastedObject = stream.ReadObject(); Decompiler.AlignObjectSize(); base.Deserialize( stream ); }
public void Deserialize( IUnrealStream stream ) { UncompressedOffset = stream.ReadInt32(); UncompressedSize = stream.ReadInt32(); CompressedOffset = stream.ReadInt32(); CompressedSize = stream.ReadInt32(); }
public static void Deserialize(this List <int> indexes, IUnrealStream stream) { indexes.Capacity = stream.ReadInt32(); for (int i = 0; i < indexes.Capacity; ++i) { indexes.Add(stream.ReadIndex()); } }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this._MarkerOwnerPath); stream.Serialize(ref this._MarkerOffset); stream.Serialize(ref this._MarkerLabel); stream.Serialize(ref this._BoneToAttachTo); stream.SerializeEnum(ref this._MarkerIconType); }
public void Serialize(IUnrealStream stream) { Console.WriteLine("Writing import " + ObjectName + " at " + stream.Position); stream.Write(PackageName); stream.Write(_ClassName); stream.Write(OuterTable != null ? (int)OuterTable.Object : 0); // Always an ordinary integer stream.Write(ObjectName); }
public override void Deserialize(IUnrealStream stream) { base.Deserialize(stream); if (CodeOffset != UInt16.MaxValue) { DeserializeNext(); // Condition } // Else "Default:" }
public override void Deserialize(IUnrealStream stream) { // CodeOffset base.Deserialize(stream); // Condition DeserializeNext(); }
public void Serialize(IUnrealStream stream) { Log.Info($"Writing import {ObjectName} at {stream.Position}"); stream.Write(PackageName); stream.Write(_ClassName); stream.Write(OuterTable != null ? (int)OuterTable.Object : 0); // Always an ordinary integer stream.Write(ObjectName); }
public void Deserialize( IUnrealStream stream ) { var index = stream.ReadNameIndex( out _Number ); _NameItem = stream.Package.Names[index]; Debug.Assert( _NameItem != null, "_NameItem cannot be null! " + index ); Debug.Assert( _Number >= -1, "Invalid _Number value! " + _Number ); }
public void Deserialize( IUnrealStream stream ) { _CompressedSize = stream.ReadInt32(); _UncompressedSize = stream.ReadInt32(); _CompressedData = new byte[_CompressedSize]; stream.Read( _CompressedData, 0, _CompressedSize ); }
public override void Deserialize( IUnrealStream stream ) { // Key DeserializeNext(); // Array DeserializeNext(); }
public void Serialize( IUnrealStream stream ) { Console.WriteLine( "Writing import " + ObjectName + " at " + stream.Position ); stream.Write( PackageName ); stream.Write( _ClassName ); stream.Write( OuterTable != null ? (int)OuterTable.Object : 0 ); // Always an ordinary integer stream.Write( ObjectName ); }
public void Serialize( IUnrealStream stream ) { // TODO: Implement code stream.Write( UncompressedOffset ); stream.Write( UncompressedSize ); stream.Write( CompressedOffset ); stream.Write( CompressedSize ); }
public override void Deserialize(IUnrealStream stream) { // Key DeserializeNext(); // Array DeserializeNext(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.Unknown0); stream.Serialize(ref this.Unknown1); stream.Serialize(ref this.Unknown2); stream.Serialize(ref this.Unknown3); stream.Serialize(ref this.Unknown4); stream.Serialize(ref this.Unknown5); }
public void Deserialize( IUnrealStream stream ) { Console.WriteLine( "Reading import " + Index + " at " + stream.Position ); PackageName = stream.ReadNameReference(); _ClassName = stream.ReadNameReference(); ClassIndex = (int)_ClassName; OuterIndex = stream.ReadInt32(); // ObjectIndex, though always written as 32bits regardless of build. ObjectName = stream.ReadNameReference(); }
public void Serialize( IUnrealStream stream ) { stream.WriteIndex( _Index ); if( stream.Version >= VNameNumbered ) { Console.WriteLine( _Number + " " + _Text ); stream.Write( (uint)_Number + 1 ); } }
public override void Deserialize(IUnrealStream stream) { Value.Pitch = stream.ReadInt32(); Decompiler.AlignSize(sizeof(int)); Value.Yaw = stream.ReadInt32(); Decompiler.AlignSize(sizeof(int)); Value.Roll = stream.ReadInt32(); Decompiler.AlignSize(sizeof(int)); }
public override void Deserialize(IUnrealStream stream) { X = stream.UR.ReadSingle(); Decompiler.AlignSize(sizeof(float)); Y = stream.UR.ReadSingle(); Decompiler.AlignSize(sizeof(float)); Z = stream.UR.ReadSingle(); Decompiler.AlignSize(sizeof(float)); }
public override void Deserialize(IUnrealStream stream) { DeserializeNext(); // Left // == DeserializeNext(); // Right // End DeserializeNext(); }
public void Deserialize(IUnrealStream stream) { var index = stream.ReadNameIndex(out _Number); _NameItem = stream.Package.Names[index]; Debug.Assert(_NameItem != null, "_NameItem cannot be null! " + index); Debug.Assert(_Number >= -1, "Invalid _Number value! " + _Number); }
public void Serialize(IUnrealStream stream) { stream.WriteIndex(_Index); if (stream.Version >= VNameNumbered) { Console.WriteLine(_Number + " " + _Text); stream.Write((uint)_Number + 1); } }
public void Serialize( IUnrealStream stream ) { stream.Write( ExportsCount ); stream.Write( NamesCount ); if( stream.Version >= VNetObjectsCount ) { stream.Write( NetObjectsCount ); } }
public void Deserialize(IUnrealStream stream) { Console.WriteLine("Reading import " + Index + " at " + stream.Position); PackageName = stream.ReadNameReference(); _ClassName = stream.ReadNameReference(); ClassIndex = (int)_ClassName; OuterIndex = stream.ReadInt32(); // ObjectIndex, though always written as 32bits regardless of build. ObjectName = stream.ReadNameReference(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this._AssaultRifle); stream.Serialize(ref this._Shotgun); stream.Serialize(ref this._SniperRifle); stream.Serialize(ref this._SubmachineGun); stream.Serialize(ref this._Pistol); stream.Serialize(ref this._HeavyWeapon); }
public void Deserialize(IUnrealStream stream) { Log.Debug($"Reading import {Index} at {stream.Position}"); PackageName = stream.ReadNameReference(); _ClassName = stream.ReadNameReference(); ClassIndex = (int)_ClassName; OuterIndex = stream.ReadInt32(); // ObjectIndex, though always written as 32bits regardless of build. ObjectName = stream.ReadNameReference(); }
public override void Deserialize( IUnrealStream stream ) { stream.ReadObjectIndex(); Decompiler.AlignObjectSize(); DeserializeNext(); // == DeserializeNext(); }
public override void Deserialize( IUnrealStream stream ) { // TODO: Corrigate version. if( stream.Version <= 300 ) return; _ReturnObject = Decompiler._Container.TryGetIndexObject( stream.ReadObjectIndex() ); Decompiler.AlignObjectSize(); }
public void Serialize(IUnrealStream stream) { stream.Write(ExportsCount); stream.Write(NamesCount); if (stream.Version >= VNetObjectsCount) { stream.Write(NetObjectsCount); } }
public void Deserialize(IUnrealStream stream) { ExportsCount = stream.ReadInt32(); NamesCount = stream.ReadInt32(); if (stream.Version >= VNetObjectsCount) { NetObjectsCount = stream.ReadInt32(); } }
public override void Deserialize(IUnrealStream stream) { stream.ReadObjectIndex(); Decompiler.AlignObjectSize(); DeserializeNext(); // == DeserializeNext(); }
public void Deserialize( IUnrealStream stream ) { _StartU = stream.ReadInt32(); _StartV = stream.ReadInt32(); _USize = stream.ReadInt32(); _VSize = stream.ReadInt32(); _TextureIndex = stream.ReadByte(); }
public void Deserialize(IUnrealStream stream) { _StartU = stream.ReadInt32(); _StartV = stream.ReadInt32(); _USize = stream.ReadInt32(); _VSize = stream.ReadInt32(); _TextureIndex = stream.ReadByte(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this._ClassName); stream.Serialize(ref this._AmmoUsedCount); stream.Serialize(ref this._AmmoTotal); stream.Serialize(ref this._CurrentWeapon); stream.Serialize(ref this._WasLastWeapon); stream.Serialize(ref this._AmmoPowerName, s => s.Version < 17, () => null); stream.Serialize(ref this._AmmoPowerSourceTag, s => s.Version < 59, () => null); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } _UnrealStream = null; }
public override void Write(IUnrealStream stream, UnrealPackage package) { FixNameIndexAtPosition(package, "SizeX", 4); FixNameIndexAtPosition(package, "IntProperty", 12); FixNameIndexAtPosition(package, "None", 32); stream.Write(minimalByteArray, 0, serialSize - 4); stream.Write((int)stream.Position + sizeof(int)); }
public void Deserialize( IUnrealStream stream ) { Class = stream.ReadObjectIndex(); // Deep stream.ReadInt32(); // ScriptTextCRC stream.ReadUInt32(); }
internal void Serialize(IUnrealStream stream) { stream.Write(sizeX); stream.Write(sizeY); stream.Write(dataSize); if (dataSize > 0) { stream.Write(data, 0, data.Length); } }
public void Deserialize(IUnrealStream stream) { Class = stream.ReadObjectIndex(); // Deep stream.ReadInt32(); // ScriptTextCRC stream.ReadUInt32(); }
/// <summary> /// Initialize this array with items in the specified stream. /// </summary> /// <param name="stream">The stream to use for initializing this array.</param> /// <param name="count">The size to allocate for the list.</param> public void Deserialize(IUnrealStream stream, int count) { Capacity = count; for (int i = 0; i < count; ++i) { T item = new T(); item.Deserialize(stream); Add(item); } }
public List <int> CodexIDs; // +4C public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.BoolVariables); stream.Serialize(ref this.IntVariables); stream.Serialize(ref this.FloatVariables); stream.Serialize(ref this.QuestProgressCounter); stream.Serialize(ref this.QuestProgress); stream.Serialize(ref this.QuestIDs); stream.Serialize(ref this.CodexEntries); stream.Serialize(ref this.CodexIDs); }
public override void Deserialize( IUnrealStream stream ) { // Array DeserializeNext(); // Param 1 DeserializeNext(); // EndParms DeserializeNext(); }
public override void Deserialize(IUnrealStream stream) { // TODO: Corrigate version. if (stream.Version <= 300) { return; } _ReturnObject = Decompiler._Container.TryGetIndexObject(stream.ReadObjectIndex()); Decompiler.AlignObjectSize(); }
public override void Deserialize(IUnrealStream stream) { // Array DeserializeNext(); // Param 1 DeserializeNext(); // EndParms DeserializeNext(); }
public List<int> CodexIDs; // +4C public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.BoolVariables); stream.Serialize(ref this.IntVariables); stream.Serialize(ref this.FloatVariables); stream.Serialize(ref this.QuestProgressCounter); stream.Serialize(ref this.QuestProgress); stream.Serialize(ref this.QuestIDs); stream.Serialize(ref this.CodexEntries); stream.Serialize(ref this.CodexIDs); }
public static string ReadName(this IUnrealStream stream) { int num; var name = stream.Package.GetIndexName(stream.ReadNameIndex(out num)); if (num > UName.Numeric) { name += "_" + num; } return(name); }
public void Deserialize( IUnrealStream stream ) { if( stream.ReadUInt32() != Signature ) { throw new System.IO.FileLoadException( stream + " isn't a UnrealMod file!" ); } Summary = new FileSummary(); Summary.Deserialize( stream ); stream.Seek( Summary.FileTableOffset, System.IO.SeekOrigin.Begin ); FileTableList = new UArray<FileTable>( stream ); }
public override void Deserialize( IUnrealStream stream ) { stream.ReadUInt16(); // Line Decompiler.AlignSize( sizeof(short) ); // TODO: Corrigate version, at least known since Mirrors Edge(536) if( stream.Version >= 536 ) { DebugMode = stream.ReadByte() > 0; Decompiler.AlignSize( sizeof(byte) ); } DeserializeNext(); }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.WeaponClassName); stream.Serialize(ref this.AmmoUsedCount); stream.Serialize(ref this.TotalAmmo); stream.Serialize(ref this.CurrentWeapon); stream.Serialize(ref this.LastWeapon); if (stream.Version >= 17) { stream.Serialize(ref this.AmmoPowerName); } }
public void Serialize(IUnrealStream stream) { stream.Serialize(ref this.HairMesh); stream.Serialize(ref this.AccessoryMeshes); stream.Serialize(ref this.MorphFeatures); stream.Serialize(ref this.OffsetBones); stream.Serialize(ref this.LOD0Vertices); stream.Serialize(ref this.LOD1Vertices); stream.Serialize(ref this.LOD2Vertices); stream.Serialize(ref this.LOD3Vertices); stream.Serialize(ref this.ScalarParameters); stream.Serialize(ref this.VectorParameters); stream.Serialize(ref this.TextureParameters); }
public void Deserialize( IUnrealStream stream ) { if( stream.Version <= 540 ) { // e.g. Core.Object.X FieldName = stream.ReadText(); } else { FieldIndex = stream.ReadObjectIndex(); } MetaTags = new UArray<UMetaTag>(); MetaTags.Deserialize( stream, tag => tag.Owner = Owner ); }
public void Deserialize( IUnrealStream stream ) { _Signature = stream.ReadUInt32(); if( _Signature != UnrealPackage.Signature ) { throw new System.IO.FileLoadException( "Unrecognized signature!" ); } _BlockSize = stream.ReadInt32(); _CompressedSize = stream.ReadInt32(); _UncompressedSize = stream.ReadInt32(); int blockCount = (int)Math.Ceiling( _UncompressedSize / (float)_BlockSize ); Blocks = new UArray<CompressedChunkBlock>( stream, blockCount ); }
public override void Deserialize( IUnrealStream stream ) { // Expression DeserializeNext(); // Param 1 DeserializeNext(); HasSecondParm = stream.ReadByte() > 0; Decompiler.AlignSize( sizeof(byte) ); DeserializeNext(); base.Deserialize( stream ); }