예제 #1
0
 public void Load(string filePath)
 {
     this.Path = filePath;
     BinaryReader binaryReader = new BinaryReader(File.Open(filePath, FileMode.Open));
     short num = binaryReader.ReadInt16();
     this.listDDS = new List<TSI.DDS>((int)num);
     for (int i = 0; i < (int)num; i++)
     {
         TSI.DDS dDS = new TSI.DDS();
         dDS.Path = RoseFile.ReadSString(ref binaryReader);
         dDS.ColourKey = binaryReader.ReadInt32();
         this.listDDS.Add(dDS);
     }
     short num2 = binaryReader.ReadInt16();
     for (int i = 0; i < (int)num; i++)
     {
         short num3 = binaryReader.ReadInt16();
         this.listDDS[i].ListDDS_element = new List<TSI.DDS.DDSElement>((int)num3);
         for (int j = 0; j < (int)num3; j++)
         {
             TSI.DDS.DDSElement dDSElement = new TSI.DDS.DDSElement();
             dDSElement.OwnerId = binaryReader.ReadInt16();
             dDSElement.X = binaryReader.ReadInt32();
             dDSElement.Y = binaryReader.ReadInt32();
             dDSElement.Width = binaryReader.ReadInt32() - dDSElement.X;
             dDSElement.Height = binaryReader.ReadInt32() - dDSElement.Y;
             dDSElement.Color = binaryReader.ReadInt32();
             dDSElement.Name = RoseFile.ReadFString(ref binaryReader, 32);
             this.listDDS[i].ListDDS_element.Add(dDSElement);
         }
     }
     binaryReader.Close();
 }
예제 #2
0
        public void Load(string filePath)
        {
            this.Path = filePath;
            BinaryReader binaryReader = new BinaryReader(File.Open(filePath, FileMode.Open));
            short        num          = binaryReader.ReadInt16();

            this.listDDS = new List <TSI.DDS>((int)num);
            for (int i = 0; i < (int)num; i++)
            {
                TSI.DDS dDS = new TSI.DDS();
                dDS.Path      = RoseFile.ReadSString(ref binaryReader);
                dDS.ColourKey = binaryReader.ReadInt32();
                this.listDDS.Add(dDS);
            }
            short num2 = binaryReader.ReadInt16();

            for (int i = 0; i < (int)num; i++)
            {
                short num3 = binaryReader.ReadInt16();
                this.listDDS[i].ListDDS_element = new List <TSI.DDS.DDSElement>((int)num3);
                for (int j = 0; j < (int)num3; j++)
                {
                    TSI.DDS.DDSElement dDSElement = new TSI.DDS.DDSElement();
                    dDSElement.OwnerId = binaryReader.ReadInt16();
                    dDSElement.X       = binaryReader.ReadInt32();
                    dDSElement.Y       = binaryReader.ReadInt32();
                    dDSElement.Width   = binaryReader.ReadInt32() - dDSElement.X;
                    dDSElement.Height  = binaryReader.ReadInt32() - dDSElement.Y;
                    dDSElement.Color   = binaryReader.ReadInt32();
                    dDSElement.Name    = RoseFile.ReadFString(ref binaryReader, 32);
                    this.listDDS[i].ListDDS_element.Add(dDSElement);
                }
            }
            binaryReader.Close();
        }