Esempio n. 1
0
        /// <summary>
        /// Locates .osu sections and their locations, then loads that info into a BeatmapSections struct.
        /// Nonpresent sections are given a location of -1 (see BeatmapSections)
        /// </summary>
        private void LoadSectionMarkers()
        {
            //Initialize the section member
            this.section = new BeatmapSections();

            //Search through each line, and if the line is a tag then set it
            for (int i = 0; i < this.filelines.Length; i++)
            {
                if (filelines[i] == "[General]")
                {
                    section.General = i;
                }
                else if (filelines[i] == "[Editor]")
                {
                    section.Editor = i;
                }
                else if (filelines[i] == "[Metadata]")
                {
                    section.Metadata = i;
                }
                else if (filelines[i] == "[Difficulty]")
                {
                    section.Difficulty = i;
                }
                else if (filelines[i] == "[Events]")
                {
                    section.Events = i;
                }
                else if (filelines[i] == "[TimingPoints]")
                {
                    section.TimingPoints = i;
                }
                else if (filelines[i] == "[Colours]")
                {
                    section.Colours = i;
                }
                else if (filelines[i] == "[HitObjects]")
                {
                    section.HitObjects = i;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Locates .osu sections and their locations, then loads that info into a BeatmapSections struct.
        /// Nonpresent sections are given a location of -1 (see BeatmapSections)
        /// </summary>
        private void LoadSectionMarkers()
        {
            //Initialize the section member
            this.section = new BeatmapSections();

            //Search through each line, and if the line is a tag then set it
            for(int i = 0; i < this.filelines.Length; i++)
            {
                if(filelines[i] == "[General]")
                    section.General = i;
                else if(filelines[i] =="[Editor]")
                    section.Editor = i;
                else if(filelines[i] == "[Metadata]")
                    section.Metadata = i;
                else if(filelines[i] == "[Difficulty]")
                    section.Difficulty = i;
                else if(filelines[i] == "[Events]")
                    section.Events = i;
                else if(filelines[i] == "[TimingPoints]")
                    section.TimingPoints = i;
                else if(filelines[i] == "[Colours]")
                    section.Colours = i;
                else if(filelines[i] == "[HitObjects]")
                    section.HitObjects = i;
            }
        }