Ejemplo n.º 1
0
 public static DoodadSet Read(Stream s)
 {
     var r = new BinaryReader(s);
     var ret = new DoodadSet();
     ret.Name = Encoding.ASCII.GetString(r.ReadBytes(20));
     ret.FirstInstanceIndex = r.ReadUInt32();
     ret.CountInstances = r.ReadUInt32();
     ret.UnknownZero = r.ReadUInt32();
     return ret;
 }
Ejemplo n.º 2
0
        public static DoodadSet Read(Stream s)
        {
            var r   = new BinaryReader(s);
            var ret = new DoodadSet();

            ret.Name = Encoding.ASCII.GetString(r.ReadBytes(20));
            ret.FirstInstanceIndex = r.ReadUInt32();
            ret.CountInstances     = r.ReadUInt32();
            ret.UnknownZero        = r.ReadUInt32();
            return(ret);
        }
Ejemplo n.º 3
0
        private void ReadDoodadSets()
        {
            var chunk = Data.GetChunkByName("MODS");

            if (chunk == null)
            {
                return;
            }

            var stream = chunk.GetStream();

            Debug.Assert(chunk.Length / 32 == Header.CountSets);
            DoodadSets = new List <DoodadSet>((int)Header.CountSets);
            for (int i = 0; i < Header.CountSets; i++)
            {
                DoodadSets.Add(DoodadSet.Read(stream));
            }
        }