예제 #1
0
 private static void WriteDataFiles(IList <KeyValuePair <string, GMDataFile> > _data, Stream _s, IFF _iff)
 {
     foreach (KeyValuePair <string, GMDataFile> _datum in _data)
     {
         GMDataFile value = _datum.Value;
         string     text  = Path.Combine(Program.OutputDir, value.FileName);
         File.WriteAllBytes(text, value.Data);
         _iff.ExternalFiles.Add(text);
     }
 }
예제 #2
0
        private void LoadGMK_GMDataFile(IList <KeyValuePair <string, GMDataFile> > _list, Stream _s)
        {
            _s.ReadInteger();
            int num = _s.ReadInteger();

            for (int i = 0; i < num; i++)
            {
                string     key   = _s.ReadString();
                GMDataFile value = new GMDataFile(this, _s);
                _list.Add(new KeyValuePair <string, GMDataFile>(key, value));
            }
        }
예제 #3
0
        public void DataFile_Load(Stream _s)
        {
            int num  = _s.ReadInteger();
            int num2 = _s.ReadInteger();

            for (int i = 0; i < num2; i++)
            {
                Stream stream = _s;
                if (num == 800)
                {
                    stream = _s.ReadStreamC();
                }
                KeyValuePair <string, GMDataFile> keyValuePair = default(KeyValuePair <string, GMDataFile>);
                GMDataFile value = new GMDataFile(this, stream);
                keyValuePair = new KeyValuePair <string, GMDataFile>("datafile" + i, value);
                DataFiles.Add(keyValuePair);
            }
        }