コード例 #1
0
        public void SaveChanges(IStream stream)
        {
            _tags.SaveChanges(stream);
            _fileNames.SaveChanges(stream);
            _stringIds.SaveChanges(stream);
            if (_simulationDefinitions != null)
            {
                _simulationDefinitions.SaveChanges(stream);
            }
            if (_effects != null)
            {
                _effects.SaveChanges(stream);
            }
            int checksumOffset = WriteHeader(stream);

            WriteLanguageInfo(stream);

            if (checksumOffset != -1)
            {
                //checksum needs to be handled last due to WriteLanguageInfo writing where we need to calculate,
                //and WriteHeader updates important info for languages so it has to come before that, (but maybe that should be run separately?)
                //leaving this hacky checksum writing
                _header.Checksum = ICacheFileExtensions.GenerateChecksum(this, stream);
                stream.SeekTo(checksumOffset);
                stream.WriteUInt32(_header.Checksum);
            }
        }
コード例 #2
0
        public void SaveChanges(IStream stream)
        {
            //only save tag header if its actually secondgen
            if (_tags is SecondGenTagTable)
            {
                ((SecondGenTagTable)_tags).SaveChanges(stream);
                _fileNames.SaveChanges(stream);
            }

            WriteStringBlock(stream);

            _stringIDs.SaveChanges(stream);
            if (_simulationDefinitions != null)
            {
                _simulationDefinitions.SaveChanges(stream);
            }
            int checksumOffset = WriteHeader(stream);

            WriteLanguageInfo(stream);

            if (checksumOffset != -1)
            {
                //checksum needs to be handled last due to WriteLanguageInfo writing where we need to calculate,
                //and WriteHeader updates important info for languages so it has to come before that, (but maybe that should be run separately?)
                //leaving this hacky checksum writing
                _header.Checksum = ICacheFileExtensions.GenerateChecksum(this, stream);
                stream.SeekTo(checksumOffset);
                stream.WriteUInt32(_header.Checksum);
            }
        }
コード例 #3
0
ファイル: ThirdGenCacheFile.cs プロジェクト: ChadSki/Assembly
 public void SaveChanges(IStream stream)
 {
     _tags.SaveChanges(stream);
     _fileNames.SaveChanges(stream);
     _stringIds.SaveChanges(stream);
     WriteHeader(stream);
     WriteLanguageInfo(stream);
 }
コード例 #4
0
 public void SaveChanges(IStream stream)
 {
     _tags.SaveChanges(stream);
     _fileNames.SaveChanges(stream);
     _stringIds.SaveChanges(stream);
     if (_simulationDefinitions != null)
     {
         _simulationDefinitions.SaveChanges(stream);
     }
     WriteHeader(stream);
     WriteLanguageInfo(stream);
 }
コード例 #5
0
ファイル: SecondGenCacheFile.cs プロジェクト: Krevil/Assembly
 public void SaveChanges(IStream stream)
 {
     _tags.SaveChanges(stream);
     WriteStringBlock(stream);
     _fileNames.SaveChanges(stream);
     _stringIDs.SaveChanges(stream);
     if (_simulationDefinitions != null)
     {
         _simulationDefinitions.SaveChanges(stream);
     }
     WriteLanguageInfo(stream);
     _header.Checksum = ICacheFileExtensions.GenerateChecksum(this, stream);
     WriteHeader(stream);
 }
コード例 #6
0
 public void SaveChanges(IStream stream)
 {
     _tags.SaveChanges(stream);
     WriteStringBlock(stream);
     _fileNames.SaveChanges(stream);
     _stringIDs.SaveChanges(stream);
     if (_simulationDefinitions != null)
     {
         _simulationDefinitions.SaveChanges(stream);
     }
     CalculateChecksum(stream);
     WriteHeader(stream);
     WriteLanguageInfo(stream);
 }