示例#1
0
        public static JsdFile Load(Stream aInput)
        {
            Deserializer _deserializer = new Deserializer(aInput);

            JsdFile.Header _header = (Header)_deserializer.Deserialize(typeof(Header));

            JsdFile _jsdFile = new JsdFile(_header);

            for (int i = 0; i < _jsdFile.FAuxilarity.Length; i++)
            {
                AuxObjectData data = new AuxObjectData();
                data.Load(_deserializer);
                _jsdFile.FAuxilarity[i] = data;
            }

            aInput.Read(_jsdFile.FTileLocData, 0, _jsdFile.FTileLocData.Length);

            for (int i = 0; i < _jsdFile.FStructs.Length; i++)
            {
                JsdStruct jsdStruct = new JsdStruct(_jsdFile.IsHighDefenition);
                jsdStruct.Load(_deserializer);
                _jsdFile.FStructs[i] = jsdStruct;
            }

            return(_jsdFile);
        }
示例#2
0
        public static string ReloadJsdFile(string aFileName)
        {
            JsdFile _file = null;

            using (FileStream _fsi = new FileStream(aFileName, FileMode.Open))
                _file = JsdFile.Load(_fsi);

            using (FileStream _fso = new FileStream(aFileName, FileMode.Create))
                _file.Save(_fso);

            return(_file.ToString());
        }
示例#3
0
        public static string ConvertJsdFileToHighDefinition(string aFileName)
        {
            JsdFile _file = null;

            using (FileStream _fsi = new FileStream(aFileName, FileMode.Open))
                _file = JsdFile.Load(_fsi);

            _file.ConvertToHighDefinition();

            using (FileStream _fso = new FileStream(aFileName, FileMode.Create))
                _file.Save(_fso);

            return(_file.ToString());
        }
示例#4
0
 public TileObject(StciIndexed sti, JsdFile jsd)
 {
     this.jsd = jsd;
     this.sti = sti;
 }