Exemplo n.º 1
0
        internal override void ReadData(AwesomeReader ar)
        {
            Events.Clear();
            ar.BaseStream.Position += 8; // Skips constants

            int count = ar.ReadInt32();

            ar.BaseStream.Position += 4;

            for (int i = 0; i < count; i++)
            {
                EventEntry ev = new EventEntry();
                ev.Start     = ar.ReadSingle();
                ev.End       = ar.ReadSingle();
                ev.EventName = ar.ReadUInt64();

                ar.BaseStream.Position += 4; // Always 0
                ev.Index = ar.ReadInt32();

                Events.Add(ev);
            }
        }
Exemplo n.º 2
0
        protected override void ImportData(AwesomeReader ar)
        {
            ar.ReadInt32(); // Always 13
            ar.ReadInt32(); // Size of each TimeEntry (24 bytes)

            int count = ar.ReadInt32();

            ar.ReadInt32(); // Offset to entries (Always 4)

            for (int i = 0; i < count; i++)
            {
                // Reads entry (24 bytes)
                EventEntry entry = new EventEntry();

                entry.Start     = ar.ReadSingle();
                entry.End       = ar.ReadSingle();
                entry.EventName = ar.ReadInt64();
                ar.ReadInt32(); // Always 0
                entry.EventIndex = ar.ReadInt32();

                Entries.Add(entry);
            }
        }