OSDN Git Service

#24280 ベースの入力デバイス記録がギターのそれになる問題の修正
[dtxmania/dtxmania.git] / DTXManiaプロジェクト / コード / スコア、曲 / CDTX.cs
index 976fd32..c27418f 100644 (file)
@@ -2971,6 +2971,37 @@ namespace DTXMania
                        }\r
                }\r
 \r
+               /// <summary>\r
+               /// Swap infos between Guitar and Bass\r
+               /// </summary>\r
+               public void SwapGuitarBassInfos()                                               // #24063 2011.1.24 yyagi ギターとベースの譜面情報入替\r
+               {\r
+                       for (int i = this.listChip.Count - 1; i >= 0; i--) {\r
+                               if (listChip[i].e楽器パート == E楽器パート.BASS) {\r
+                                       listChip[i].e楽器パート = E楽器パート.GUITAR;\r
+                                       listChip[i].nチャンネル番号 -= ( 0xA0 - 0x20 );\r
+                               }\r
+                               else if ( listChip[i].e楽器パート == E楽器パート.GUITAR )\r
+                               {\r
+                                       listChip[i].e楽器パート = E楽器パート.BASS;\r
+                                       listChip[i].nチャンネル番号 += ( 0xA0 - 0x20 );\r
+                               }\r
+                       }\r
+\r
+                       int t = this.LEVEL.Bass;\r
+                       this.LEVEL.Bass = this.LEVEL.Guitar;\r
+                       this.LEVEL.Guitar = t;\r
+\r
+                       t = this.n可視チップ数.Bass;\r
+                       this.n可視チップ数.Bass = this.n可視チップ数.Guitar;\r
+                       this.n可視チップ数.Guitar = t;\r
+\r
+                       bool ts = this.bチップがある.Bass;\r
+                       this.bチップがある.Bass = this.bチップがある.Guitar;\r
+                       this.bチップがある.Guitar = ts;\r
+\r
+               }\r
+\r
                // CActivity 実装\r
 \r
                public override void On活性化()\r
@@ -3396,7 +3427,7 @@ namespace DTXMania
                                                        if (str.StartsWith("PANEL", StringComparison.OrdinalIgnoreCase)) {\r
                                                                this.t入力・パラメータ食い込みチェック("PANEL", ref str, ref str2);\r
                                                                int dummyResult;                                                                // #23885 2010.12.12 yyagi: not to confuse "#PANEL strings (panel)" and "#PANEL int (panpot of EL)"\r
-                                                               if (!int.TryParse(str2, out dummyResult)) {     // 数値じゃないならPANELとみなす\r
+                                                               if (!int.TryParse(str2, out dummyResult)) {             // 数値じゃないならPANELとみなす\r
                                                                        this.PANEL = str2;                                                      //\r
                                                                        goto EOL;                                                                       //\r
                                                                }                                                                                               // 数値ならPAN ELとみなす\r
@@ -3418,8 +3449,8 @@ namespace DTXMania
                                                                        this.t入力・パラメータ食い込みチェック("BASEBPM", ref str, ref str2);\r
                                                                        double basebpm = 0.0;\r
                                                                        //if( double.TryParse( str2, out num6 ) && ( num6 > 0.0 ) )\r
-                                                                       if (!TryParse(str2, out basebpm) && basebpm > 0.0)      // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point\r
-                                                                       {\r
+                                                                       if (TryParse(str2, out basebpm) && basebpm > 0.0)       // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point\r
+                                                                       {                                                                                                       // #24204 2011.01.21 yyagi: Fix the condition correctly\r
                                                                                this.BASEBPM = basebpm;\r
                                                                        }\r
                                                                } else if (str.StartsWith("SOUND_STAGEFAILED", StringComparison.OrdinalIgnoreCase)) {\r
@@ -4063,34 +4094,33 @@ namespace DTXMania
                                {\r
                                        case "_SS":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 0, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_S":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 1, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_A":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 2, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_B":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 3, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_C":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 4, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_D":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 5, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
 \r
                                        case "_E":\r
                                                this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 6, strパラメータ );\r
-                                               goto Label_0142;\r
+                                               break;\r
                                }\r
                        }\r
-               Label_0142:\r
                        return true;\r
                }\r
                private void t入力・行解析・RESULTIMAGE・ファイルを設定する( int nランク0to6, string strファイル名 )\r