示例#1
0
        //
        public CSongListNode ShallowCopyOfSelf()
        {
            CSongListNode newNode = new CSongListNode();

            newNode.eNodeType                    = this.eNodeType;
            newNode.nID                          = this.nID;
            newNode.arDifficultyLabel            = this.arDifficultyLabel;
            newNode.arScore                      = this.arScore;
            newNode.bDTXFilesで始まるフォルダ名のBOXである    = this.bDTXFilesで始まるフォルダ名のBOXである;
            newNode.bBoxDefで作成されたBOXである          = this.bBoxDefで作成されたBOXである;
            newNode.col文字色                       = this.col文字色;
            newNode.listランダム用ノードリスト              = this.listランダム用ノードリスト;
            newNode.list子リスト                     = this.list子リスト;
            newNode.nGood範囲ms                    = this.nGood範囲ms;
            newNode.nGreat範囲ms                   = this.nGreat範囲ms;
            newNode.nPerfect範囲ms                 = this.nPerfect範囲ms;
            newNode.nPoor範囲ms                    = this.nPoor範囲ms;
            newNode.nスコア数                        = this.nスコア数;
            newNode.pathSetDefの絶対パス              = this.pathSetDefの絶対パス;
            newNode.r親ノード                        = this.r親ノード;
            newNode.SetDefのブロック番号                = this.SetDefのブロック番号;
            newNode.stackRandomPerformanceNumber = this.stackRandomPerformanceNumber;
            newNode.strジャンル                      = this.strジャンル;
            newNode.strタイトル                      = this.strタイトル;
            newNode.strバージョン                     = this.strバージョン;
            newNode.strBreadcrumbs               = this.strBreadcrumbs;
            newNode.strSkinPath                  = this.strSkinPath;

            return(newNode);
        }
示例#2
0
 private void t指定された曲の子リストの曲を列挙する_孫リスト含む(CSongListNode r親, ref List <CSongListNode> list)
 {
     if ((r親 != null) && (r親.list子リスト != null))
     {
         foreach (CSongListNode c曲リストノード in r親.list子リスト)
         {
             if ((c曲リストノード.eNodeType == CSongListNode.ENodeType.SCORE) || (c曲リストノード.eNodeType == CSongListNode.ENodeType.SCORE_MIDI))
             {
                 list.Add(c曲リストノード);
             }
             if ((c曲リストノード.list子リスト != null) && CDTXMania.ConfigIni.bランダムセレクトで子BOXを検索対象とする)
             {
                 this.t指定された曲の子リストの曲を列挙する_孫リスト含む(c曲リストノード, ref list);
             }
         }
     }
 }
示例#3
0
        private List <CSongListNode> t指定された曲が存在する場所の曲を列挙する_子リスト含む(CSongListNode song)
        {
            List <CSongListNode> list = new List <CSongListNode>();

            song = song.r親ノード;
            if ((song == null) && (CDTXMania.SongManager.listSongRoot.Count > 0))
            {
                foreach (CSongListNode c曲リストノード in CDTXMania.SongManager.listSongRoot)
                {
                    if ((c曲リストノード.eNodeType == CSongListNode.ENodeType.SCORE) || (c曲リストノード.eNodeType == CSongListNode.ENodeType.SCORE_MIDI))
                    {
                        list.Add(c曲リストノード);
                    }
                    if ((c曲リストノード.list子リスト != null) && CDTXMania.ConfigIni.bランダムセレクトで子BOXを検索対象とする)
                    {
                        this.t指定された曲の子リストの曲を列挙する_孫リスト含む(c曲リストノード, ref list);
                    }
                }
                return(list);
            }
            this.t指定された曲の子リストの曲を列挙する_孫リスト含む(song, ref list);
            return(list);
        }
        public void tSelectedSongChanged()
        {
            CSongListNode c曲リストノード = CDTXMania.stageSongSelection.r現在選択中の曲;
            CScore        cスコア     = CDTXMania.stageSongSelection.rSelectedScore;

            if ((c曲リストノード != null) && (cスコア != null))
            {
                this.n現在選択中の曲の難易度 = CDTXMania.stageSongSelection.nSelectedSongDifficultyLevel;
                for (int i = 0; i < 3; i++)
                {
                    if (CDTXMania.ConfigIni.nSkillMode == 0)
                    {
                        this.n現在選択中の曲の最高ランク[i] = cスコア.SongInformation.BestRank[i];
                    }
                    else if (CDTXMania.ConfigIni.nSkillMode == 1)
                    {
                        this.n現在選択中の曲の最高ランク[i] = DTXMania.CScoreIni.tCalculateRank(0, cスコア.SongInformation.HighSkill[i]);
                    }

                    this.b現在選択中の曲がフルコンボ[i]   = cスコア.SongInformation.FullCombo[i];
                    this.db現在選択中の曲の最高スキル値[i] = cスコア.SongInformation.HighSkill[i];
                    this.db現在選択中の曲の曲別スキル[i]  = cスコア.SongInformation.HighSongSkill[i];
                    this.b現在選択中の曲の譜面[i]      = cスコア.SongInformation.bScoreExists[i];
                    this.n現在選択中の曲のレベル[i]     = cスコア.SongInformation.Level[i];
                    this.n現在選択中の曲のレベル小数点[i]  = cスコア.SongInformation.LevelDec[i];
                    for (int j = 0; j < 5; j++)
                    {
                        if (c曲リストノード.arScore[j] != null)
                        {
                            this.n現在選択中の曲のレベル難易度毎DGB[j][i]    = c曲リストノード.arScore[j].SongInformation.Level[i];
                            this.n現在選択中の曲のレベル小数点難易度毎DGB[j][i] = c曲リストノード.arScore[j].SongInformation.LevelDec[i];
                            //this.n現在選択中の曲の最高ランク難易度毎[j][i] = c曲リストノード.arScore[j].SongInformation.BestRank[i];
                            if (CDTXMania.ConfigIni.nSkillMode == 0)
                            {
                                this.n現在選択中の曲の最高ランク難易度毎[j][i] = c曲リストノード.arScore[j].SongInformation.BestRank[i];
                            }
                            else if (CDTXMania.ConfigIni.nSkillMode == 1)
                            {
                                // Fix github.com/limyz/DTXmaniaXG/issues/33
                                //this.n現在選択中の曲の最高ランク難易度毎[j][i] = (DTXMania.CScoreIni.tCalculateRank(0, c曲リストノード.arScore[j].SongInformation.HighSkill[i]) == (int)DTXMania.CScoreIni.ERANK.S && DTXMania.CScoreIni.tCalculateRank(0, c曲リストノード.arScore[j].SongInformation.HighSkill[i]) >= 95 ? DTXMania.CScoreIni.tCalculateRank(0, cスコア.SongInformation.HighSkill[i]) : c曲リストノード.arScore[j].SongInformation.BestRank[i]);
                                this.n現在選択中の曲の最高ランク難易度毎[j][i] = DTXMania.CScoreIni.tCalculateRank(0, c曲リストノード.arScore[j].SongInformation.HighSkill[i]);
                            }

                            this.db現在選択中の曲の最高スキル値難易度毎[j][i] = c曲リストノード.arScore[j].SongInformation.HighSkill[i];
                            this.b現在選択中の曲がフルコンボ難易度毎[j][i]   = c曲リストノード.arScore[j].SongInformation.FullCombo[i];
                            this.b現在選択中の曲に譜面がある[j][i]       = c曲リストノード.arScore[j].SongInformation.bScoreExists[i];
                        }
                    }
                }
                for (int i = 0; i < 5; i++)
                {
                    if (c曲リストノード.arScore[i] != null)
                    {
                        int nLevel = c曲リストノード.arScore[i].SongInformation.Level.Drums;
                        if (nLevel < 0)
                        {
                            nLevel = 0;
                        }
                        if (nLevel > 999)
                        {
                            nLevel = 999;
                        }
                        this.n選択中の曲のレベル難易度毎[i] = nLevel;

                        this.db現在選択中の曲の曲別スキル値難易度毎[i] = c曲リストノード.arScore[i].SongInformation.HighSongSkill.Drums;
                    }
                    else
                    {
                        this.n選択中の曲のレベル難易度毎[i] = 0;
                    }
                    this.str難易度ラベル[i] = c曲リストノード.arDifficultyLabel[i];
                }
                if (this.r直前の曲 != c曲リストノード)
                {
                    this.n難易度開始文字位置 = 0;
                }
                this.r直前の曲 = c曲リストノード;
            }
        }
        private void t描画処理_ジャンル文字列()
        {
            CSongListNode c曲リストノード = CDTXMania.stageSongSelection.r現在選択中の曲;
            CScore        cスコア     = CDTXMania.stageSongSelection.rSelectedScore;

            if ((c曲リストノード != null) && (cスコア != null))
            {
                string str = "";
                switch (c曲リストノード.eNodeType)
                {
                case CSongListNode.ENodeType.SCORE:
                    if ((c曲リストノード.strジャンル == null) || (c曲リストノード.strジャンル.Length <= 0))
                    {
                        if ((cスコア.SongInformation.Genre != null) && (cスコア.SongInformation.Genre.Length > 0))
                        {
                            str = cスコア.SongInformation.Genre;
                        }
                        else
                        {
                            switch (cスコア.SongInformation.SongType)
                            {
                            case CDTX.EType.DTX:
                                str = "DTX";
                                break;

                            case CDTX.EType.GDA:
                                str = "GDA";
                                break;

                            case CDTX.EType.G2D:
                                str = "G2D";
                                break;

                            case CDTX.EType.BMS:
                                str = "BMS";
                                break;

                            case CDTX.EType.BME:
                                str = "BME";
                                break;
                            }
                            str = "Unknown";
                        }
                        break;
                    }
                    str = c曲リストノード.strジャンル;
                    break;

                case CSongListNode.ENodeType.SCORE_MIDI:
                    str = "MIDI";
                    break;

                case CSongListNode.ENodeType.BOX:
                    str = "MusicBox";
                    break;

                case CSongListNode.ENodeType.BACKBOX:
                    str = "BackBox";
                    break;

                case CSongListNode.ENodeType.RANDOM:
                    str = "Random";
                    break;

                default:
                    str = "Unknown";
                    break;
                }
                CDTXMania.actDisplayString.tPrint(this.n本体X + 0x12, this.n本体Y - 30, CCharacterConsole.EFontType.RedThin, str);
            }
        }
示例#6
0
        private void tSelectSongRandomly()
        {
            CSongListNode song = this.actSongList.rSelectedSong;

            if ((song.stackRandomPerformanceNumber.Count == 0) || (song.listランダム用ノードリスト == null))
            {
                if (song.listランダム用ノードリスト == null)
                {
                    song.listランダム用ノードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む(song);
                }
                int count = song.listランダム用ノードリスト.Count;
                if (count == 0)
                {
                    return;
                }
                int[] numArray = new int[count];
                for (int i = 0; i < count; i++)
                {
                    numArray[i] = i;
                }
                for (int j = 0; j < (count * 1.5); j++)
                {
                    int index = CDTXMania.Random.Next(count);
                    int num5  = CDTXMania.Random.Next(count);
                    int num6  = numArray[num5];
                    numArray[num5]  = numArray[index];
                    numArray[index] = num6;
                }
                for (int k = 0; k < count; k++)
                {
                    song.stackRandomPerformanceNumber.Push(numArray[k]);
                }
                if (CDTXMania.ConfigIni.bLogDTX詳細ログ出力)
                {
                    StringBuilder builder = new StringBuilder(0x400);
                    builder.Append(string.Format("ランダムインデックスリストを作成しました: {0}曲: ", song.stackRandomPerformanceNumber.Count));
                    for (int m = 0; m < count; m++)
                    {
                        builder.Append(string.Format("{0} ", numArray[m]));
                    }
                    Trace.TraceInformation(builder.ToString());
                }
            }
            this.rConfirmedSong                   = song.listランダム用ノードリスト[song.stackRandomPerformanceNumber.Pop()];
            this.nConfirmedSongDifficulty         = this.actSongList.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.rConfirmedSong);
            this.rChosenScore                     = this.rConfirmedSong.arScore[this.nConfirmedSongDifficulty];
            this.eReturnValueWhenFadeOutCompleted = EReturnValue.Selected;
            //	this.actFOtoNowLoading.tStartFadeOut();					// #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
            base.ePhaseID = CStage.EPhase.選曲_NowLoading画面へのフェードアウト;
            if (CDTXMania.ConfigIni.bLogDTX詳細ログ出力)
            {
                int[]         numArray2 = song.stackRandomPerformanceNumber.ToArray();
                StringBuilder builder2  = new StringBuilder(0x400);
                builder2.Append("ランダムインデックスリスト残り: ");
                if (numArray2.Length > 0)
                {
                    for (int n = 0; n < numArray2.Length; n++)
                    {
                        builder2.Append(string.Format("{0} ", numArray2[n]));
                    }
                }
                else
                {
                    builder2.Append("(なし)");
                }
                Trace.TraceInformation(builder2.ToString());
            }
            CDTXMania.Skin.bgm選曲画面.t停止する();
        }