Example #1
0
                public override void Deserialize(IUnrealStream stream)
                {
#if TRANSFORMERS
                    if (Package.Build == UnrealPackage.GameBuild.BuildName.Transformers)
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize(sizeof(ushort));
                        goto deserialize;
                    }
#endif
                    if (stream.Version >= 600)
                    {
                        // Points to the object that was passed to the switch,
                        // beware that the followed token chain contains it as well!
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // TODO: Corrigate version
                    if (stream.Version >= 536 && stream.Version <= 587)
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize(sizeof(ushort));
                    }
                    else
                    {
                        PropertyType = stream.ReadByte();
                        Decompiler.AlignSize(sizeof(byte));
                    }

deserialize:
                    // Expression
                    DeserializeNext();
                }
Example #2
0
                public override void Deserialize(IUnrealStream stream)
                {
                    var propertyAdded = stream.Version >= VSizeByteMoved;

                    // A.?
                    DeserializeNext();

                    // SkipSize
                    stream.ReadUInt16();
                    Decompiler.AlignSize(sizeof(ushort));

                    // Doesn't seem to exist in APB
                    if (propertyAdded)
                    {
                        // Property
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // PropertyType
                    stream.ReadByte();
                    Decompiler.AlignSize(sizeof(byte));

                    // Additional byte in APB?
                    if (stream.Version > 512 && !propertyAdded)
                    {
                        stream.ReadByte();
                        Decompiler.AlignSize(sizeof(byte));
                    }

                    // ?.B
                    DeserializeNext();
                }
Example #3
0
                public override void Deserialize(IUnrealStream stream)
                {
                    stream.ReadUInt16();    // Size
                    Decompiler.AlignSize(sizeof(ushort));

                    DeserializeNext();
                }
Example #4
0
                public override void Deserialize(IUnrealStream stream)
                {
                    if (stream.Version >= 600)
                    {
                        // Points to the object that was passed to the switch,
                        // beware that the followed token chain contains it as well!
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // TODO: Corrigate version
                    if (stream.Version >= 536 && stream.Version <= 587)
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize(sizeof(ushort));
                    }
                    else
                    {
                        PropertyType = stream.ReadByte();
                        Decompiler.AlignSize(sizeof(byte));
                    }

                    // Expression
                    DeserializeNext();
                }
Example #5
0
                public override void Deserialize(IUnrealStream stream)
                {
                    // Condition
                    DeserializeNext();

                    // Size. Used to skip ? if Condition is False.
                    stream.ReadUInt16();
                    Decompiler.AlignSize(sizeof(ushort));

                    // If TRUE expression
                    DeserializeNext();

                    // Size. Used to skip : if Condition is True.
                    stream.ReadUInt16();
                    Decompiler.AlignSize(sizeof(ushort));

                    // If FALSE expression
                    DeserializeNext();
                }
Example #6
0
                public override void Deserialize( IUnrealStream stream )
                {
                    // Condition
                    DeserializeNext();

                    // Size. Used to skip ? if Condition is False.
                    stream.ReadUInt16();
                    Decompiler.AlignSize( sizeof(ushort) );

                    // If TRUE expression
                    DeserializeNext();

                    // Size. Used to skip : if Condition is True.
                    stream.ReadUInt16();
                    Decompiler.AlignSize( sizeof(ushort) );

                    // If FALSE expression
                    DeserializeNext();
                }
Example #7
0
                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();
                }
Example #8
0
                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();
                }
Example #9
0
                public override void Deserialize(IUnrealStream stream)
                {
                    stream.ReadUInt16();    // Size
                    Decompiler.AlignSize(sizeof(ushort));

                    // FIXME: MOHA or general?
                    if (stream.Version == 421)
                    {
                        Decompiler.AlignSize(sizeof(ushort));
                    }

                    DeserializeNext();  // Expression
                    DeserializeNext();  // EndParmValue
                }
Example #10
0
                public override void Deserialize( IUnrealStream stream )
                {
                    var propertyAdded = stream.Version >= VSizeByteMoved
#if TERA
                        && stream.Package.Build != UnrealPackage.GameBuild.BuildName.Tera
#endif
#if TRANSFORMERS
                        && stream.Package.Build != UnrealPackage.GameBuild.BuildName.Transformers
#endif
                        ; 

                    // A.?
                    DeserializeNext();

                    // SkipSize
                    stream.ReadUInt16();
                    Decompiler.AlignSize( sizeof(ushort) );

                    // Doesn't seem to exist in APB
                    if( propertyAdded )
                    {
                        // Property
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // PropertyType
                    stream.ReadByte();
                    Decompiler.AlignSize( sizeof(byte) );

                    // Additional byte in APB?
                    if( stream.Version > 512 && !propertyAdded )
                    {
                        stream.ReadByte();
                        Decompiler.AlignSize( sizeof(byte) );
                    }

                    // ?.B
                    DeserializeNext();
                }
Example #11
0
                public override void Deserialize(IUnrealStream stream)
                {
                    var propertyAdded = stream.Version >= VSizeByteMoved
#if TERA
                                        && stream.Package.Build != UnrealPackage.GameBuild.BuildName.Tera
#endif
#if TRANSFORMERS
                                        && stream.Package.Build != UnrealPackage.GameBuild.BuildName.Transformers
#endif
                    ;

                    // A.?
                    DeserializeNext();

                    // SkipSize
                    stream.ReadUInt16();
                    Decompiler.AlignSize(sizeof(ushort));

                    // Doesn't seem to exist in APB
                    if (propertyAdded)
                    {
                        // Property
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // PropertyType
                    stream.ReadByte();
                    Decompiler.AlignSize(sizeof(byte));

                    // Additional byte in APB?
                    if (stream.Version > 512 && !propertyAdded)
                    {
                        stream.ReadByte();
                        Decompiler.AlignSize(sizeof(byte));
                    }

                    // ?.B
                    DeserializeNext();
                }
Example #12
0
                public override void Deserialize( IUnrealStream stream )
                {
                    if( stream.Version >= 600 )
                    {
                        // Points to the object that was passed to the switch,
                        // beware that the followed token chain contains it as well!
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // TODO: Corrigate version
                    if( stream.Version >= 536 && stream.Version <= 587 )
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize( sizeof(ushort) );
                    }
                    else
                    {
                        PropertyType = stream.ReadByte();
                        Decompiler.AlignSize( sizeof(byte) );
                    }

                    // Expression
                    DeserializeNext();
                }
Example #13
0
                public override void Deserialize( IUnrealStream stream )
                {
                    stream.ReadUInt16();    // Size
                    Decompiler.AlignSize( sizeof(ushort) );

                    DeserializeNext();
                }
Example #14
0
 public override void Deserialize( IUnrealStream stream )
 {
     CodeOffset = stream.ReadUInt16();
     Decompiler.AlignSize( sizeof(ushort) );
 }
Example #15
0
 public override void Deserialize(IUnrealStream stream)
 {
     CodeOffset = stream.ReadUInt16();
     Decompiler.AlignSize(sizeof(ushort));
 }
Example #16
0
                public override void Deserialize( IUnrealStream stream )
                {
#if TRANSFORMERS
                    if( Package.Build == UnrealPackage.GameBuild.BuildName.Transformers )
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize( sizeof(ushort) );
                        goto deserialize;
                    }
#endif
                    if( stream.Version >= 600 )
                    {
                        // Points to the object that was passed to the switch,
                        // beware that the followed token chain contains it as well!
                        stream.ReadObjectIndex();
                        Decompiler.AlignObjectSize();
                    }

                    // TODO: Corrigate version
                    if( stream.Version >= 536 && stream.Version <= 587 )
                    {
                        PropertyType = stream.ReadUInt16();
                        Decompiler.AlignSize( sizeof(ushort) );
                    }
                    else
                    {
                        PropertyType = stream.ReadByte();
                        Decompiler.AlignSize( sizeof(byte) );
                    }

                deserialize:
                    // Expression
                    DeserializeNext();
                }
Example #17
0
                public override void Deserialize( IUnrealStream stream )
                {
                    stream.ReadUInt16();    // Size
                    Decompiler.AlignSize( sizeof(ushort) );

                    // FIXME: MOHA or general?
                    if( stream.Version == 421 )
                    {
                        Decompiler.AlignSize( sizeof(ushort) );
                    }

                    DeserializeNext();  // Expression
                    DeserializeNext();  // EndParmValue
                }