コード例 #1
0
 public override void Parse(GameBitBuffer buffer)
 {
     Name = buffer.ReadCharArray(128);
     Type = buffer.ReadInt(32);
     PRTransform = new PRTransform();
     PRTransform.Parse(buffer);
     Field3 = new SNOName();
     Field3.Parse(buffer);
     serTagMap = new SerializeData();
     serTagMap.Parse(buffer);
     TagMap = new DT_TAGMAP();
     TagMap.Parse(buffer);
     Field6 = buffer.ReadInt(32);
     serMarkerLinks = new SerializeData();
     serMarkerLinks.Parse(buffer);
     //still checking variablearrays
     this.MarkerLinks = new List<MarkerLink>( buffer.ReadInt(0) );
     for(int loop12 = 0; loop12 < _MarkerLinks.Count; loop12++)
     {
         _MarkerLinks[loop12] = new MarkerLink();
         _MarkerLinks[loop12].Parse(buffer);
     }
 }
コード例 #2
0
 public void FileRead(MpqFileStream stream, long offset)
 {
     stream.Position = offset + 0;
     Name = stream.ReadString(128);
     stream.Position = offset + 128;
     Type = stream.ReadValueS32();
     stream.Position = offset + 132;
     PRTransform = new PRTransform();
     PRTransform.FileRead(stream, stream.Position);
     stream.Position = offset + 160;
     Field3 = new SNOName();
     Field3.FileRead(stream, stream.Position);
     stream.Position = offset + 168;
     serTagMap = new SerializeData();
     serTagMap.FileRead(stream, stream.Position);
     stream.Position = offset + 176;
     // TagMap: type DT_TAGMAP hasnt a deserializer implemented
     throw new Exception("some fields arent going to be decoded.");
     stream.Position = offset + 184;
     Field6 = stream.ReadValueS32();
     stream.Position = offset + 188;
     serMarkerLinks = new SerializeData();
     serMarkerLinks.FileRead(stream, stream.Position);
     stream.Position = offset + 200;
     //still checking variablearrays
     MarkerLinks = new List<MarkerLink>();
     for(int i = 0; i < (int)(serMarkerLinks.Field1 / 256); i++)
     {
     stream.Position = serMarkerLinks.Field0 + 16 + (256*i) ;
         MarkerLink temp12_MarkerLinks;
         temp12_MarkerLinks = new MarkerLink();
         temp12_MarkerLinks.FileRead(stream, stream.Position);
         _MarkerLinks.Add(temp12_MarkerLinks);
     }
 }