コード例 #1
0
        private static void ReadBlocks(IReader reader, ContainerReader containerFile, TagContainer tags)
        {
            while (containerFile.NextBlock())
            {
                switch (containerFile.BlockName)
                {
                case "data":
                    // Data block
                    tags.AddDataBlock(ReadDataBlock(reader, containerFile.BlockVersion));
                    break;

                case "tag!":
                    // Extracted tag
                    tags.AddTag(ReadTag(reader, containerFile.BlockVersion));
                    break;

                case "ersp":
                    // Extracted Raw Resource Page
                    tags.AddExtractedResourcePage(ReadExtractedResourcePage(reader, containerFile.BlockVersion));
                    break;

                case "rspg":
                    // Resource page
                    tags.AddResourcePage(ReadResourcePage(reader, containerFile.BlockVersion));
                    break;

                case "rsrc":
                    // Resource info
                    tags.AddResource(ReadResource(reader, containerFile.BlockVersion));
                    break;

                case "pdct":
                    // Prediction info
                    tags.AddPrediction(ReadPrediction(reader, containerFile.BlockVersion));
                    break;

                case "sndc":
                    // Sound platform codec
                    tags.AddSoundCodec(ReadSoundCodec(reader, containerFile.BlockVersion));
                    break;

                case "snpr":
                    // Sound pitch range
                    tags.AddSoundPitchRange(ReadSoundPitchRange(reader, containerFile.BlockVersion));
                    break;

                case "snld":
                    // Sound language pitch range
                    tags.AddSoundLanguageDuration(ReadSoundLanguageDuration(reader, containerFile.BlockVersion));
                    break;

                case "snpb":
                    // Sound playback parameter
                    tags.AddSoundPlayback(ReadSoundPlayback(reader, containerFile.BlockVersion));
                    break;

                case "snsc":
                    // Sound scale
                    tags.AddSoundScale(ReadSoundScale(reader, containerFile.BlockVersion));
                    break;

                case "spro":
                    // Sound promotion
                    tags.AddSoundPromotion(ReadSoundPromotion(reader, containerFile.BlockVersion));
                    break;

                case "scpb":
                    // Sound custom playback
                    tags.AddSoundCustomPlayback(ReadSoundCustomPlayback(reader, containerFile.BlockVersion));
                    break;

                case "snex":
                    // Sound extra info
                    tags.AddSoundExtraInfo(ReadSoundExtraInfo(reader, containerFile.BlockVersion));
                    break;
                }
            }
        }