OSDN Git Service

#26005 DTXC: 効果音レーン追加前の準備。レーンの初期化部分をリファクタし、メンバ変数を少し追加。
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Sat, 13 Aug 2011 18:08:40 +0000 (18:08 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Sat, 13 Aug 2011 18:08:40 +0000 (18:08 +0000)
git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@240 16f42ceb-6dc6-49c8-ba94-f2d53467949d

DTXCreatorプロジェクト/コード/00.全体/CDTX入出力.cs
DTXCreatorプロジェクト/コード/05.譜面/Cレーン.cs

index 4409952..6cef230 100644 (file)
@@ -136,6 +136,7 @@ namespace DTXCreator
                        0xe3, 0xe5, 0xe9, 0xef, 0xf1, 0xfb, 0x101, 0x107, 0x10d, 0x10f, 0x115, 0x119, 0x11b, 0x125, 0x133, 0x137, \r
                        0x139, 0x13d, 0x14b, 0x151, 0x15b, 0x15d, 0x161, 0x167, 0x16f, 0x175, 0x17b, 0x17f\r
                };\r
+#region [ #25990; for BMS/BME to DTX conversion ]\r
                // #25990 2011.8.12 yyagi: DTXのBGM用ch群(正確には効果音用ch群)\r
                private readonly int[] DTXbgmChs = new int[] {\r
                              0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,\r
@@ -174,12 +175,13 @@ namespace DTXCreator
                        0x1A,   0x11,   0x12,   0x13,   0x14,   0x16,   0x53,   0x15,   0x17\r
                //      LC,             HC,             SD,             BD,             HT,             CY,             FI,             LT,             FT\r
                };\r
+               private int nLastBarConverted = -1;     // #25990 2011.8.12 yyagi BMS/BME→DTX変換用\r
+               private IEnumerator eDTXbgmChs;                 // #25990 2011.8.12 yyagi BMS/BME→DTX変換用\r
+#endregion\r
                private Dictionary<int, float> dic小節長倍率;\r
                private E種別 e種別;\r
                private List<int> listチップパレット;\r
                private int nBGMWAV番号 = -1;\r
-               private int nLastBarConverted = -1;     // #25990 2011.8.12 yyagi BMS/BME→DTX変換用\r
-               private IEnumerator eDTXbgmChs;                 // #25990 2011.8.12 yyagi BMS/BME→DTX変換用\r
                \r
                private void tDTX入力・BPMチップにBPx数値をバインドする()\r
                {\r
@@ -739,9 +741,13 @@ namespace DTXCreator
                        }\r
                        if( strコマンド.Equals( "PANEL", StringComparison.OrdinalIgnoreCase ) )\r
                        {\r
-                               CUndoRedo管理.bUndoRedoした直後 = true;\r
-                               this._Form.textBoxパネル.Text = strパラメータ.Trim();\r
-                               return true;\r
+                               int dummyResult;                                                                // #23885, #26007 2011.8.13 yyagi: not to confuse "#PANEL strings (panel)" and "#PANEL int (panpot of EL)"\r
+                               if ( !int.TryParse( strパラメータ, out dummyResult ) )     // 数値じゃないならPANELとみなす\r
+                               {\r
+                                       CUndoRedo管理.bUndoRedoした直後 = true;\r
+                                       this._Form.textBoxパネル.Text = strパラメータ.Trim();\r
+                                       return true;\r
+                               }                                                                                               // 数値なら、ここでは何もせず、後で#PANに拾ってもらう (PAN ELとみなす)\r
                        }\r
                        if( strコマンド.Equals( "PREVIEW", StringComparison.OrdinalIgnoreCase ) )\r
                        {\r
index 8909485..1b5fced 100644 (file)
@@ -26,7 +26,7 @@ namespace DTXCreator.譜面
                        BsW\r
                }\r
                \r
-               public bool bå\8f³側の線が太線;\r
+               public bool bå·¦側の線が太線;\r
                public Color col背景色 = Color.Black;\r
                public E種別 eレーン種別 = E種別.WAV;\r
                public int nチャンネル番号・表00toFF;\r
@@ -36,10 +36,67 @@ namespace DTXCreator.譜面
                public int n位置Xdot;\r
                public int n幅dot = 30;\r
                public string strレーン名 = "";\r
+               public int nGroupNo;\r
+               public bool bIsVisible;\r
+\r
+\r
+               /// <summary>\r
+               /// コンストラクタ\r
+               /// </summary>\r
+               public Cレーン()\r
+               {\r
+                       this.eレーン種別 = E種別.WAV;\r
+                       this.strレーン名 = "";\r
+                       this.nチャンネル番号・表00toFF = 0;\r
+                       this.nチャンネル番号・裏00toFF = 0;\r
+                       this.b左側の線が太線 = false;\r
+                       this.col背景色 = Color.FromArgb(0, 0, 0, 0);\r
+                       this.n位置Xdot = 0;\r
+                       this.n幅dot = 30;\r
+                       this.nGroupNo = 0;\r
+                       this.bIsVisible = true;\r
+               }\r
+\r
+               /// <summary>\r
+               /// コンストラクタ(初期化用)\r
+               /// </summary>\r
+               /// <param name="eレーン種別_"></param>\r
+               /// <param name="strレーン名_"></param>\r
+               /// <param name="nチャンネル番号・表00toFF_"></param>\r
+               /// <param name="nチャンネル番号・裏00toFF_"></param>\r
+               /// <param name="b左側の線が太線_"></param>\r
+               /// <param name="col背景色_"></param>\r
+               /// <param name="n位置Xdot_"></param>\r
+               /// <param name="n幅dot_"></param>\r
+               /// <param name="nGroupNo_"></param>\r
+               /// <param name="bIsVisible_"></param>\r
+               public Cレーン(\r
+                       E種別 eレーン種別_, string strレーン名_,\r
+                       int nチャンネル番号・表00toFF_, int nチャンネル番号・裏00toFF_,\r
+//                     int nレーン割付チップ・表0or1to1295_, int nレーン割付チップ・裏0or1to1295_,\r
+                       bool b左側の線が太線_,\r
+                       Color col背景色_,\r
+                       int n位置Xdot_, int n幅dot_,\r
+                       int nGroupNo_,\r
+                       bool bIsVisible_ )\r
+               {\r
+                       this.eレーン種別 = eレーン種別_;\r
+                       this.strレーン名 = strレーン名_;\r
+                       this.nチャンネル番号・表00toFF = nチャンネル番号・表00toFF_;\r
+                       this.nチャンネル番号・裏00toFF = nチャンネル番号・裏00toFF_;\r
+//                     this.nレーン割付チップ・表0or1to1295 = nレーン割付チップ・表0or1to1295_;\r
+//                     this.nレーン割付チップ・裏0or1to1295 = nレーン割付チップ・裏0or1to1295_;\r
+                       this.b左側の線が太線 = b左側の線が太線_;\r
+                       this.col背景色 = col背景色_;\r
+                       this.n位置Xdot = n位置Xdot_;\r
+                       this.n幅dot = n幅dot_;\r
+                       this.nGroupNo = nGroupNo_;\r
+                       this.bIsVisible = bIsVisible_;\r
+               }\r
 \r
                public bool bパターンレーンである()\r
                {\r
-                       if( ( ( ( this.eレーン種別 != E種別.GtR ) && ( this.eレーン種別 != E種別.GtG ) ) && ( ( this.eレーン種別 != E種別.GtB ) && ( this.eレーン種別 != E種別.BsR ) ) ) && ( ( this.eレーン種別 != E種別.BsG ) && ( this.eレーン種別 != E種別.BsB ) ) )\r
+                       if( ( this.eレーン種別 != E種別.GtR ) && ( this.eレーン種別 != E種別.GtG ) && ( this.eレーン種別 != E種別.GtB ) && ( this.eレーン種別 != E種別.BsR ) && ( this.eレーン種別 != E種別.BsG ) && ( this.eレーン種別 != E種別.BsB ) )\r
                        {\r
                                return false;\r
                        }\r