Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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);
            }
        }