Exemple #1
0
        private void ReadFileTable(EndianReader reader)
        {
            int fileCount = reader.ReadInt32();

            // Read each file and sort it into its folder
            for (int i = 0; i < fileCount; i++)
            {
                SoundPackFile file = new SoundPackFile(this, reader);

                // Put the file into its parent folder
                SoundPackFolder folder = FindFolderByID(file.FolderID);
                if (folder != null)
                {
                    folder.AddFile(file);
                }

                // Associate its ID
                _filesById[file.ID] = file;
                _objects.Add(file);
            }
        }
 /// <summary>
 /// Adds a file to the folder.
 /// </summary>
 /// <param name="file">The file to add.</param>
 public void AddFile(SoundPackFile file)
 {
     Files.Add(file);
 }
        private void ReadFileTable(EndianReader reader)
        {
            int fileCount = reader.ReadInt32();

            // Read each file and sort it into its folder
            for (int i = 0; i < fileCount; i++)
            {
                SoundPackFile file = new SoundPackFile(this, reader);

                // Put the file into its parent folder
                SoundPackFolder folder = FindFolderByID(file.FolderID);
                if (folder != null)
                    folder.AddFile(file);

                // Associate its ID
                _filesById[file.ID] = file;
                _objects.Add(file);
            }
        }
 /// <summary>
 /// Adds a file to the folder.
 /// </summary>
 /// <param name="file">The file to add.</param>
 public void AddFile(SoundPackFile file)
 {
     Files.Add(file);
 }