Beispiel #1
0
 internal void Write(EndianBinaryWriter writer, AetSection parentAet)
 {
     foreach (var aetObj in AetObjects)
     {
         aetObj.Write(writer, parentAet);
     }
 }
Beispiel #2
0
        internal void Write(EndianBinaryWriter writer, AetSection parentAet)
        {
            ThisOffset = (int)writer.Position;

            writer.Write(ReferencedObjectPair.AetObjects.Count);

            writer.ScheduleWriteOffset(() =>
            {
                AetObjPairOffset = (int)writer.Position;
                ReferencedObjectPair.Write(writer, parentAet);
            });
        }
Beispiel #3
0
        internal void Write(EndianBinaryWriter writer, AetSection parentAet)
        {
            ThisOffset = (int)writer.Position;

            writer.AddStringToStringTable(Name);

            writer.Write(FrameStartTime);
            writer.Write(FrameLoopDuration);
            writer.Write(FrameStartTimeAlt);
            writer.Write(PlaybackSpeed);

            writer.Write(UnkownByte0);
            writer.Write(UnkownByte1);
            writer.Write(UnkownByte2);

            writer.Write((byte)ObjectBody.BodyType);
            ObjectBody.Write(writer, parentAet);
        }
Beispiel #4
0
        internal void Read(EndianBinaryReader reader, AetSection parentAet)
        {
            ThisOffset = (int)reader.Position;

            Name = reader.ReadStringOffset(StringBinaryFormat.NullTerminated);

            FrameStartTime    = reader.ReadSingle();
            FrameLoopDuration = reader.ReadSingle();
            FrameStartTimeAlt = reader.ReadSingle();
            PlaybackSpeed     = reader.ReadSingle();

            UnkownByte0 = reader.ReadByte();
            UnkownByte1 = reader.ReadByte();
            UnkownByte2 = reader.ReadByte();

            BodyType bodyType = (BodyType)reader.ReadByte();

            switch (bodyType)
            {
            case BodyType.NOP:
                ObjectBody = new NopBody();
                break;

            case BodyType.PIC:
                ObjectBody = new PicBody();
                break;

            case BodyType.AIF:
                ObjectBody = new AifBody();
                break;

            case BodyType.EFF:
                ObjectBody = new EffBody();
                break;

            default:
                ObjectBody = null;
                break;
            }

            ObjectBody?.Read(reader);
        }