OSDN Git Service

#32713 初コミット。SVNrev567時点での、ファイルはbranch/140707(ReBuild XGVersion)から移行したもの。
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / DTXManiaプロジェクト / コード / ステージ / 05.選曲 / CStage選曲.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Runtime.InteropServices;
5 using System.Drawing;
6 using System.Diagnostics;
7 using System.IO;
8 using FDK;
9
10 namespace DTXMania
11 {
12         internal class CStage選曲 : CStage
13         {
14                 // プロパティ
15                 public int nスクロールバー相対y座標
16                 {
17                         get
18                         {
19                                 if ( act曲リスト != null )
20                                 {
21                                         return act曲リスト.nスクロールバー相対y座標;
22                                 }
23                                 else
24                                 {
25                                         return 0;
26                                 }
27                         }
28                 }
29                 public bool bIsEnumeratingSongs
30                 {
31                         get
32                         {
33                                 return act曲リスト.bIsEnumeratingSongs;
34                         }
35                         set
36                         {
37                                 act曲リスト.bIsEnumeratingSongs = value;
38                         }
39                 }
40                 public bool bスクロール中
41                 {
42                         get
43                         {
44                                 return this.act曲リスト.bスクロール中;
45                         }
46                 }
47                 public int n確定された曲の難易度
48                 {
49                         get;
50                         private set;
51                 }
52                 public Cスコア r確定されたスコア
53                 {
54                         get;
55                         private set;
56                 }
57                 public C曲リストノード r確定された曲 
58                 {
59                         get;
60                         private set;
61                 }
62                 public int n現在選択中の曲の難易度
63                 {
64                         get
65                         {
66                                 return this.act曲リスト.n現在選択中の曲の現在の難易度レベル;
67                         }
68                 }
69                 public Cスコア r現在選択中のスコア
70                 {
71                         get
72                         {
73                                 return this.act曲リスト.r現在選択中のスコア;
74                         }
75                 }
76                 public C曲リストノード r現在選択中の曲
77                 {
78                         get
79                         {
80                                 return this.act曲リスト.r現在選択中の曲;
81                         }
82                 }
83
84                 // コンストラクタ
85                 public CStage選曲()
86                 {
87                         base.eステージID = CStage.Eステージ.選曲;
88                         base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
89                         base.b活性化してない = true;
90                         base.list子Activities.Add( this.actオプションパネル = new CActオプションパネル() );
91                         base.list子Activities.Add( this.actFIFO = new CActFIFOBlack() );
92                         base.list子Activities.Add( this.actFIfrom結果画面 = new CActFIFOBlack() );
93                         base.list子Activities.Add( this.actFOtoNowLoading = new CActFIFOBlack() );     // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
94                         base.list子Activities.Add( this.act曲リスト = new CActSelect曲リスト() );
95                         base.list子Activities.Add( this.actステータスパネル = new CActSelectステータスパネル() );
96                         base.list子Activities.Add( this.act演奏履歴パネル = new CActSelect演奏履歴パネル() );
97                         base.list子Activities.Add( this.actPreimageパネル = new CActSelectPreimageパネル() );
98                         base.list子Activities.Add( this.actPresound = new CActSelectPresound() );
99                         base.list子Activities.Add( this.actArtistComment = new CActSelectArtistComment() );
100                         base.list子Activities.Add( this.actInformation = new CActSelectInformation() );
101                         base.list子Activities.Add( this.actSortSongs = new CActSortSongs() );
102                         base.list子Activities.Add( this.actShowCurrentPosition = new CActSelectShowCurrentPosition() );
103                         base.list子Activities.Add( this.actQuickConfig = new CActSelectQuickConfig() );
104                         base.list子Activities.Add( this.actAVI = new CAct演奏AVI() );
105
106                         this.CommandHistory = new CCommandHistory();            // #24063 2011.1.16 yyagi
107                 }
108                 
109                 
110                 // メソッド
111
112                 public void t選択曲変更通知()
113                 {
114                         this.actPreimageパネル.t選択曲が変更された();
115                         this.actPresound.t選択曲が変更された();
116                         this.act演奏履歴パネル.t選択曲が変更された();
117                         this.actステータスパネル.t選択曲が変更された();
118                         this.actArtistComment.t選択曲が変更された();
119
120                         #region [ プラグインにも通知する(BOX, RANDOM, BACK なら通知しない)]
121                         //---------------------
122                         if( CDTXMania.app != null )
123                         {
124                                 var c曲リストノード = CDTXMania.stage選曲.r現在選択中の曲;
125                                 var cスコア = CDTXMania.stage選曲.r現在選択中のスコア;
126
127                                 if( c曲リストノード != null && cスコア != null && c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE )
128                                 {
129                                         string str選択曲ファイル名 = cスコア.ファイル情報.ファイルの絶対パス;
130                                         CSetDef setDef = null;
131                                         int nブロック番号inSetDef = -1;
132                                         int n曲番号inブロック = -1;
133
134                                         if( !string.IsNullOrEmpty( c曲リストノード.pathSetDefの絶対パス ) && File.Exists( c曲リストノード.pathSetDefの絶対パス ) )
135                                         {
136                                                 setDef = new CSetDef( c曲リストノード.pathSetDefの絶対パス );
137                                                 nブロック番号inSetDef = c曲リストノード.SetDefのブロック番号;
138                                                 n曲番号inブロック = CDTXMania.stage選曲.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( c曲リストノード );
139                                         }
140
141                                         foreach( CDTXMania.STPlugin stPlugin in CDTXMania.app.listプラグイン )
142                                         {
143                                                 Directory.SetCurrentDirectory( stPlugin.strプラグインフォルダ );
144                                                 stPlugin.plugin.On選択曲変更( str選択曲ファイル名, setDef, nブロック番号inSetDef, n曲番号inブロック );
145                                                 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
146                                         }
147                                 }
148                         }
149                         //---------------------
150                         #endregion
151                 }
152
153                 // CStage 実装
154
155                 /// <summary>
156                 /// 曲リストをリセットする
157                 /// </summary>
158                 /// <param name="cs"></param>
159                 public void Refresh( CSongs管理 cs, bool bRemakeSongTitleBar)
160                 {
161                         this.act曲リスト.Refresh( cs, bRemakeSongTitleBar );
162                 }
163
164                 public override void On活性化()
165                 {
166                         Trace.TraceInformation( "選曲ステージを活性化します。" );
167                         Trace.Indent();
168                         try
169                         {
170                                 this.eフェードアウト完了時の戻り値 = E戻り値.継続;
171                                 this.bBGM再生済み = false;
172                                 for( int i = 0; i < 4; i++ )
173                                         this.ctキー反復用[ i ] = new CCounter( 0, 0, 0, CDTXMania.Timer );
174                 this.ct決定演出待機 = new CCounter();
175                 this.b決定演出カウンタ使用中 = false;
176                                 base.On活性化();
177
178                                 this.actステータスパネル.t選択曲が変更された();        // 最大ランクを更新
179                         }
180                         finally
181                         {
182                                 Trace.TraceInformation( "選曲ステージの活性化を完了しました。" );
183                                 Trace.Unindent();
184                         }
185                 }
186                 public override void On非活性化()
187                 {
188                         Trace.TraceInformation( "選曲ステージを非活性化します。" );
189                         Trace.Indent();
190                         try
191                         {
192                                 for( int i = 0; i < 4; i++ )
193                                 {
194                                         this.ctキー反復用[ i ] = null;
195                                 }
196                 this.ct決定演出待機 = null;
197                                 base.On非活性化();
198                         }
199                         finally
200                         {
201                                 Trace.TraceInformation( "選曲ステージの非活性化を完了しました。" );
202                                 Trace.Unindent();
203                         }
204                 }
205                 public override void OnManagedリソースの作成()
206                 {
207                         if( !base.b活性化してない )
208                         {
209                                 this.tx背景 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_background.png" ) );
210                                 this.tx背景_決定後 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_background decide.png" ) );
211                                 this.tx上部パネル = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_header panel.png" ) );
212                                 this.tx下部パネル = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_footer panel.png" ) );
213                                 this.txFLIP = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill number on gauge etc.png" ) );
214                                 base.OnManagedリソースの作成();
215                         }
216                 }
217                 public override void OnManagedリソースの解放()
218                 {
219                         if( !base.b活性化してない )
220                         {
221                                 CDTXMania.tテクスチャの解放( ref this.tx背景 );
222                                 CDTXMania.tテクスチャの解放( ref this.tx背景_決定後 );
223                                 CDTXMania.tテクスチャの解放( ref this.tx上部パネル );
224                                 CDTXMania.tテクスチャの解放( ref this.tx下部パネル );
225                                 CDTXMania.tテクスチャの解放( ref this.txFLIP );
226                                 base.OnManagedリソースの解放();
227                         }
228                 }
229                 public override int On進行描画()
230                 {
231                         if( !base.b活性化してない )
232                         {
233                                 #region [ 初めての進行描画 ]
234                                 //---------------------
235                                 if( base.b初めての進行描画 )
236                                 {
237                                         this.ct登場時アニメ用共通 = new CCounter( 0, 100, 3, CDTXMania.Timer );
238                                         if( CDTXMania.r直前のステージ == CDTXMania.stage結果 )
239                                         {
240                                                 this.actFIfrom結果画面.tフェードイン開始();
241                                                 base.eフェーズID = CStage.Eフェーズ.選曲_結果画面からのフェードイン;
242                                         }
243                                         else
244                                         {
245                                                 this.actFIFO.tフェードイン開始();
246                                                 base.eフェーズID = CStage.Eフェーズ.共通_フェードイン;
247                                         }
248                                         this.t選択曲変更通知();
249                                         base.b初めての進行描画 = false;
250                                 }
251                                 //---------------------
252                                 #endregion
253
254                                 this.ct登場時アニメ用共通.t進行();
255
256                                 if( this.tx背景 != null )
257                                         this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 );
258                 if( this.tx背景_決定後 != null )
259                 {
260                     if( CDTXMania.stage選曲.ct決定演出待機.n現在の値 < 1000 )
261                     {
262                         this.tx背景_決定後.n透明度 = (int)( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 500.0 ) );
263                     }
264                     else if( CDTXMania.stage選曲.ct決定演出待機.n現在の値 > 1000 )
265                     {
266                         this.tx背景_決定後.n透明度 = 255;
267                     }
268                     this.tx背景_決定後.t2D描画( CDTXMania.app.Device, 0, 0 );
269                 }
270
271                                 this.actPreimageパネル.On進行描画();
272                         //      this.bIsEnumeratingSongs = !this.actPreimageパネル.bIsPlayingPremovie;                               // #27060 2011.3.2 yyagi: #PREMOVIE再生中は曲検索を中断する
273
274                                 this.act曲リスト.On進行描画();
275                                 int y = 0;
276                                 if( this.ct登場時アニメ用共通.b進行中 )
277                                 {
278                                         double db登場割合 = ( (double) this.ct登場時アニメ用共通.n現在の値 ) / 100.0;  // 100が最終値
279                                         double dbY表示割合 = Math.Sin( Math.PI / 2 * db登場割合 );
280                                         y = ( (int) ( this.tx上部パネル.sz画像サイズ.Height * dbY表示割合 ) ) - this.tx上部パネル.sz画像サイズ.Height;
281                                 }
282                                 #region [ 上部パネル描画 ]
283                                 if( this.tx上部パネル != null )
284                 {
285                             this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0f, 78.0f - ( this.ct登場時アニメ用共通.n現在の値 * 0.61f ) , new Rectangle(0, 17, 200, 55 ) );
286                     this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0f, 24.0f + ( this.ct登場時アニメ用共通.n現在の値 * 0.57f ) , new Rectangle(0, 81, 200, 55 ) );
287                     this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0f, 150.0f, new Rectangle(0, 150, 200, 12 ) );
288                     this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0f, 143.0f, new Rectangle(0, 143, 200, 3 ) );
289                 }
290                                 #endregion
291                                 //this.actInformation.On進行描画();
292                                 #region [ 下部パネル描画 ]
293                                 if ( this.tx下部パネル != null )
294                                         this.tx下部パネル.t2D描画(
295                                                 CDTXMania.app.Device,
296                                                 0,
297                                                 SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height
298                                         );
299                                 #endregion
300                                 this.actステータスパネル.On進行描画();
301                 if( CDTXMania.ConfigIni.bDrums有効 )
302                                     this.act演奏履歴パネル.On進行描画();
303                                 this.actShowCurrentPosition.On進行描画();                                                           // #27648 2011.3.28 yyagi
304                 this.t決定アニメーション();
305                 if( base.eフェーズID != CStage.Eフェーズ.選曲_決定演出 && base.eフェーズID != Eフェーズ.選曲_NowLoading画面へのフェードアウト )
306                 {
307                                     this.actArtistComment.On進行描画();
308                     this.actPresound.On進行描画();
309                 }
310                                 #region [ フェーズ処理 ]
311                                 switch ( base.eフェーズID )
312                                 {
313                                         case CStage.Eフェーズ.共通_フェードイン:
314                                                 if( this.actFIFO.On進行描画() != 0 )
315                                                 {
316                                                         base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
317                                                 }
318                                                 break;
319
320                                         case CStage.Eフェーズ.共通_フェードアウト:
321                                                 if( this.actFIFO.On進行描画() == 0 )
322                                                 {
323                                                         break;
324                                                 }
325                                                 return (int) this.eフェードアウト完了時の戻り値;
326
327                                         case CStage.Eフェーズ.選曲_結果画面からのフェードイン:
328                                                 if( this.actFIfrom結果画面.On進行描画() != 0 )
329                                                 {
330                                                         base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
331                                                 }
332                                                 break;
333
334                                         case CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト:
335 #if animetest
336                                                 if( this.actFOtoNowLoading.On進行描画() == 0 )
337                                                 {
338                                                         break;
339                                                 }
340 #endif
341                                                 return (int) this.eフェードアウト完了時の戻り値;
342                                 }
343                                 #endregion
344
345                                 if( !this.bBGM再生済み && ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) )
346                                 {
347                                         CDTXMania.Skin.bgm選曲画面.n音量_次に鳴るサウンド = 100;
348                                         CDTXMania.Skin.bgm選曲画面.t再生する();
349                                         this.bBGM再生済み = true;
350                                 }
351
352
353 //Debug.WriteLine( "パンくず=" + this.r現在選択中の曲.strBreadcrumbs );
354
355
356                                 // キー入力
357                                 if( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 
358                                         && CDTXMania.act現在入力を占有中のプラグイン == null )
359                                 {
360                                         #region [ 簡易CONFIGでMore、またはShift+F1: 詳細CONFIG呼び出し ]
361                                         if (  actQuickConfig.bGotoDetailConfig )
362                                         {       // 詳細CONFIG呼び出し
363                                                 actQuickConfig.tDeativatePopupMenu();
364                                                 this.actPresound.tサウンド停止();
365                                                 this.eフェードアウト完了時の戻り値 = E戻り値.コンフィグ呼び出し;      // #24525 2011.3.16 yyagi: [SHIFT]-[F1]でCONFIG呼び出し
366                                                 this.actFIFO.tフェードアウト開始();
367                                                 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
368                                                 CDTXMania.Skin.sound取消音.t再生する();
369                                                 return 0;
370                                         }
371                                         #endregion
372                                         if ( !this.actSortSongs.bIsActivePopupMenu && !this.actQuickConfig.bIsActivePopupMenu )
373                                         {
374                                                 #region [ ESC ]
375                                                 if ( CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || ( ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || CDTXMania.Pad.b押されたGB( Eパッド.Cancel ) || CDTXMania.Pad.b押されたGB( Eパッド.Pick ) ) && ( ( this.act曲リスト.r現在選択中の曲 != null ) && ( this.act曲リスト.r現在選択中の曲.r親ノード == null ) ) ) )
376                                                 {       // [ESC]
377                                                         CDTXMania.Skin.sound取消音.t再生する();
378                                                         this.eフェードアウト完了時の戻り値 = E戻り値.タイトルに戻る;
379                                                         this.actFIFO.tフェードアウト開始();
380                                                         base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
381                                                         return 0;
382                                                 }
383                                                 #endregion
384                                                 #region [ Shift-F1: CONFIG画面 ]
385                                                 if ( ( CDTXMania.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || CDTXMania.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) &&
386                                                         CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) )
387                                                 {       // [SHIFT] + [F1] CONFIG
388                                                         this.actPresound.tサウンド停止();
389                                                         this.eフェードアウト完了時の戻り値 = E戻り値.コンフィグ呼び出し;      // #24525 2011.3.16 yyagi: [SHIFT]-[F1]でCONFIG呼び出し
390                                                         this.actFIFO.tフェードアウト開始();
391                                                         base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
392                                                         CDTXMania.Skin.sound取消音.t再生する();
393                                                         return 0;
394                                                 }
395                                                 #endregion
396                                                 #region [ Shift-F2: 未使用 ]
397                                                 // #24525 2011.3.16 yyagi: [SHIFT]+[F2]は廃止(将来発生するかもしれない別用途のためにキープ)
398                                                 /*
399                                                                                         if ( ( CDTXMania.Input管理.Keyboard.bキーが押されている( (int)SlimDX.DirectInput.Key.RightShift ) || CDTXMania.Input管理.Keyboard.bキーが押されている( (int)SlimDX.DirectInput.Key.LeftShift ) ) &&
400                                                                                                 CDTXMania.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.F2 ) )
401                                                                                         {       // [SHIFT] + [F2] CONFIGURATION
402                                                                                                 this.actPresound.tサウンド停止();
403                                                                                                 this.eフェードアウト完了時の戻り値 = E戻り値.コンフィグ呼び出し;
404                                                                                                 this.actFIFO.tフェードアウト開始();
405                                                                                                 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
406                                                                                                 CDTXMania.Skin.sound取消音.t再生する();
407                                                                                                 return 0;
408                                                                                         }
409                                                 */
410                                                 #endregion
411                                                 if ( this.act曲リスト.r現在選択中の曲 != null )
412                                                 {
413                                                         #region [ Right ]
414                             //2016.02.20 kairera0467 XG風の場合は使わない。
415                                                         if ( CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) && !CDTXMania.bXGRelease )
416                                                         {
417                                                                 if ( this.act曲リスト.r現在選択中の曲 != null )
418                                                                 {
419                                                                         switch ( this.act曲リスト.r現在選択中の曲.eノード種別 )
420                                                                         {
421                                                                                 case C曲リストノード.Eノード種別.BOX:
422                                                                                         {
423                                                                                                 CDTXMania.Skin.sound決定音.t再生する();
424                                                                                                 bool bNeedChangeSkin = this.act曲リスト.tBOXに入る();
425                                                                                                 if ( bNeedChangeSkin )
426                                                                                                 {
427                                                                                                         this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更;
428                                                                                                         base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト;
429                                                                                                 }
430                                                                                         }
431                                                                                         break;
432                                                                         }
433                                                                 }
434                                                         }
435                                                         #endregion
436                                                         #region [ Decide ]
437                                                         if (( CDTXMania.Pad.b押されたDGB( Eパッド.Decide ) || CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) ||
438                                                                 ( ( CDTXMania.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) )
439                                                         {
440                                                                 if ( this.act曲リスト.r現在選択中の曲 != null )
441                                                                 {
442                                                                         switch ( this.act曲リスト.r現在選択中の曲.eノード種別 )
443                                                                         {
444                                                                                 case C曲リストノード.Eノード種別.SCORE:
445                                             CDTXMania.Skin.sound曲決定音.t再生する();
446                                             this.t決定アニメーション開始();
447                                                                                         this.t曲を選択する();
448                                                                                         break;
449
450                                                                                 case C曲リストノード.Eノード種別.SCORE_MIDI:
451                                                                                         this.t曲を選択する();
452                                                                                         break;
453
454                                                                                 case C曲リストノード.Eノード種別.BOX:
455                                                                                         {
456                                                 CDTXMania.Skin.sound決定音.t再生する();
457                                                                                                 bool bNeedChangeSkin = this.act曲リスト.tBOXに入る();
458                                                                                                 if ( bNeedChangeSkin )
459                                                                                                 {
460                                                                                                         this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; 
461                                                                                                         base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト;
462                                                                                                 }
463                                                                                         }
464                                                                                         break;
465
466                                                                                 case C曲リストノード.Eノード種別.BACKBOX:
467                                                                                         {
468                                                 CDTXMania.Skin.sound決定音.t再生する();
469                                                                                                 bool bNeedChangeSkin = this.act曲リスト.tBOXを出る();
470                                                                                                 if ( bNeedChangeSkin )
471                                                                                                 {
472                                                                                                         this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; 
473                                                                                                         base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト;
474                                                                                                 }
475                                                                                         }
476                                                                                         break;
477
478                                                                                 case C曲リストノード.Eノード種別.RANDOM:
479                                             CDTXMania.Skin.sound曲決定音.t再生する();
480                                             this.t決定アニメーション開始();
481                                                                                         this.t曲をランダム選択する();
482                                                                                         break;
483                                                                         }
484                                                                 }
485                                                         }
486                                                         #endregion
487                                                         #region [ Up ]
488                                                         this.ctキー反復用.Up.tキー反復( CDTXMania.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftArrow ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) );
489                                                         this.ctキー反復用.R.tキー反復( CDTXMania.Pad.b押されているGB( Eパッド.R ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) );
490                                                         if ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.SD ) )
491                                                         {
492                                                                 this.tカーソルを上へ移動する();
493                                                         }
494                                                         #endregion
495                                                         #region [ Down ]
496                                                         this.ctキー反復用.Down.tキー反復( CDTXMania.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightArrow ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) );
497                                                         this.ctキー反復用.B.tキー反復( CDTXMania.Pad.b押されているGB( Eパッド.G ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) );
498                                                         if ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.FT ) )
499                                                         {
500                                                                 this.tカーソルを下へ移動する();
501                                                         }
502                                                         #endregion
503                                                         #region [ Upstairs / Left ]
504                                                         if ( ( ( this.act曲リスト.r現在選択中の曲 != null ) && ( this.act曲リスト.r現在選択中の曲.r親ノード != null ) ) &&
505                                                                 ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) ||
506                                                                   CDTXMania.Pad.b押されたGB( Eパッド.Pick ) || CDTXMania.Pad.b押されたGB( Eパッド.Cancel ) ) )
507                                                         {
508                                                                 this.actPresound.tサウンド停止();
509                                                                 CDTXMania.Skin.sound取消音.t再生する();
510                                                                 this.act曲リスト.tBOXを出る();
511                                                                 this.t選択曲変更通知();
512                                                         }
513                                                         #endregion
514                                                         #region [ BDx2: 簡易CONFIG ]
515                                                         if ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.BD ) )
516                                                         {       // [BD]x2 スクロール速度変更
517                                                                 CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.BD );
518                                                                 EパッドFlag[] comChangeScrollSpeed = new EパッドFlag[] { EパッドFlag.BD, EパッドFlag.BD };
519                                                                 if ( CommandHistory.CheckCommand( comChangeScrollSpeed, E楽器パート.DRUMS ) )
520                                                                 {
521                                                                         CDTXMania.Skin.sound変更音.t再生する();
522                                                                         this.actQuickConfig.tActivatePopupMenu( E楽器パート.DRUMS );
523                                                                 }
524                                                         }
525                                                         #endregion
526                                                         #region [ HHx2: 難易度変更 ]
527                                                         if ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.HH ) || CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.HHO ) )
528                                                         {       // [HH]x2 難易度変更
529                                                                 CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.HH );
530                                                                 EパッドFlag[] comChangeDifficulty = new EパッドFlag[] { EパッドFlag.HH, EパッドFlag.HH };
531                                                                 if ( CommandHistory.CheckCommand( comChangeDifficulty, E楽器パート.DRUMS ) )
532                                                                 {
533                                                                         this.act曲リスト.t難易度レベルをひとつ進める();
534                                                                 }
535                                                         }
536                                                         #endregion
537                                                         #region [ Bx2 Guitar: 難易度変更 ]
538                                                         if( CDTXMania.Pad.b押された( E楽器パート.GUITAR, Eパッド.B ) )
539                                                         {       // [B]x2 ギター難易度変更
540                                                                 CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.B );
541                                                                 EパッドFlag[] comChangeDifficultyG = new EパッドFlag[] { EパッドFlag.B, EパッドFlag.B };
542                                                                 if ( CommandHistory.CheckCommand( comChangeDifficultyG, E楽器パート.GUITAR ) )
543                                                                 {
544                                                                         Debug.WriteLine( "ギター難易度変更" );
545                                                                         this.act曲リスト.t難易度レベルをひとつ進める();
546                                                                         //CDTXMania.Skin.sound変更音.t再生する();
547                                                                 }
548                                                         }
549                                                         #endregion
550                                                         #region [ Bx2 Bass: 難易度変更 ]
551                                                         if( CDTXMania.Pad.b押された( E楽器パート.BASS, Eパッド.B ) )
552                                                         {       // [B]x2 ベース難易度変更
553                                                                 CommandHistory.Add( E楽器パート.BASS, EパッドFlag.B );
554                                                                 EパッドFlag[] comChangeDifficultyB = new EパッドFlag[] { EパッドFlag.B, EパッドFlag.B };
555                                                                 if ( CommandHistory.CheckCommand( comChangeDifficultyB, E楽器パート.BASS ) )
556                                                                 {
557                                                                         Debug.WriteLine( "ベース難易度変更" );
558                                                                         this.act曲リスト.t難易度レベルをひとつ進める();
559                                                                 }
560                                                         }
561                                                         #endregion
562                                                         #region [ Yx2 Guitar: ギターとベースを入れ替え ]
563                                                         if ( CDTXMania.Pad.b押された( E楽器パート.GUITAR, Eパッド.Y ) )
564                                                         {       // Yx2 ギターとベースを入れ替え
565                                                                 CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.Y );
566                                                                 EパッドFlag[] comSwapGtBs1 = new EパッドFlag[] { EパッドFlag.Y, EパッドFlag.Y };
567                                                                 if ( CommandHistory.CheckCommand( comSwapGtBs1, E楽器パート.GUITAR ) )
568                                                                 {
569                                                                         Debug.WriteLine( "ギターとベースの入れ替え1" );
570                                                                         CDTXMania.Skin.sound変更音.t再生する();
571                                                                         CDTXMania.ConfigIni.bIsSwappedGuitarBass = !CDTXMania.ConfigIni.bIsSwappedGuitarBass;
572                                                                 }
573                                                         }
574                                                         #endregion
575                                                         #region [ Yx2 Bass: ギターとベースを入れ替え ]
576                             if ( CDTXMania.Pad.b押された( E楽器パート.BASS, Eパッド.Y ) )
577                                                         {
578                                                                 CommandHistory.Add( E楽器パート.BASS, EパッドFlag.Y );
579                                                                 // Yx2 ギターとベースを入れ替え
580                                                                 EパッドFlag[] comSwapGtBs1 = new EパッドFlag[] { EパッドFlag.Y, EパッドFlag.Y };
581                                                                 if ( CommandHistory.CheckCommand( comSwapGtBs1, E楽器パート.BASS ) )
582                                                                 {
583                                                                         Debug.WriteLine( "ギターとベースの入れ替え2" );
584                                                                         CDTXMania.Skin.sound変更音.t再生する();
585                                                                         CDTXMania.ConfigIni.bIsSwappedGuitarBass = !CDTXMania.ConfigIni.bIsSwappedGuitarBass;
586                                                                 }
587                                                         }
588                                                         #endregion
589                             #region [ Px2 Guitar: 簡易CONFIG ]
590                                                         if ( CDTXMania.Pad.b押された( E楽器パート.GUITAR, Eパッド.P ) )
591                                                         {
592                                                                 CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.P );
593                                                                 EパッドFlag[] comChangeScrollSpeed = new EパッドFlag[] { EパッドFlag.P, EパッドFlag.P };
594                                                                 if ( CommandHistory.CheckCommand( comChangeScrollSpeed, E楽器パート.GUITAR ) )
595                                                                 {
596                                                                         CDTXMania.Skin.sound変更音.t再生する();
597                                                                         this.actQuickConfig.tActivatePopupMenu( E楽器パート.GUITAR );
598                                                                 }
599                                                         }
600                                                         #endregion
601                             #region [ Px2 Bass: 簡易CONFIG ]
602                                                         if ( CDTXMania.Pad.b押された( E楽器パート.BASS, Eパッド.P ) )
603                                                         {
604                                                                 CommandHistory.Add( E楽器パート.BASS, EパッドFlag.P );
605                                                                 EパッドFlag[] comChangeScrollSpeed = new EパッドFlag[] { EパッドFlag.P, EパッドFlag.P };
606                                                                 if ( CommandHistory.CheckCommand( comChangeScrollSpeed, E楽器パート.BASS ) )
607                                                                 {
608                                                                         CDTXMania.Skin.sound変更音.t再生する();
609                                                                         this.actQuickConfig.tActivatePopupMenu( E楽器パート.BASS );
610                                                                 }
611                                                         }
612                                                         #endregion
613                                                         #region [ Y P Guitar: ソート画面 ]
614                                                         if ( CDTXMania.Pad.b押されている( E楽器パート.GUITAR, Eパッド.Y ) && CDTXMania.Pad.b押された( E楽器パート.GUITAR, Eパッド.P ) )
615                                                         {
616                                     CDTXMania.Skin.sound変更音.t再生する();
617                                     this.actSortSongs.tActivatePopupMenu( E楽器パート.GUITAR, ref this.act曲リスト );
618                                                         }
619                                                         #endregion
620                                                         #region [ Y P Bass: ソート画面 ]
621                                                         if ( CDTXMania.Pad.b押されている( E楽器パート.BASS, Eパッド.Y ) && CDTXMania.Pad.b押された( E楽器パート.BASS, Eパッド.P ) )
622                                                         {
623                                                                         CDTXMania.Skin.sound変更音.t再生する();
624                                                                         this.actSortSongs.tActivatePopupMenu( E楽器パート.BASS, ref this.act曲リスト );
625                                                         }
626                                                         #endregion
627                                                         #region [ HTx2 Drums: ソート画面 ]
628                                                         if ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.HT ) )
629                                                         {       // [HT]x2 ソート画面        2013.12.31.kairera0467
630                                                         CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.HT );
631                                                                 EパッドFlag[] comSort = new EパッドFlag[] { EパッドFlag.HT, EパッドFlag.HT };
632                                                                 if ( CommandHistory.CheckCommand( comSort, E楽器パート.DRUMS ) )
633                                                                 {
634                                                                         CDTXMania.Skin.sound変更音.t再生する();
635                                                                         this.actSortSongs.tActivatePopupMenu( E楽器パート.DRUMS, ref this.act曲リスト );
636                                                                 }
637                                                         }
638                                                         #endregion
639                                                 }
640                                         }
641                     
642                     {
643                         //Debug
644                                                         if( CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F5 ) )
645                                                         {
646                                                                         Debug.WriteLine( "ギターとベースの入れ替え1" );
647                                                                         CDTXMania.Skin.sound変更音.t再生する();
648                                                                         CDTXMania.ConfigIni.bIsSwappedGuitarBass = !CDTXMania.ConfigIni.bIsSwappedGuitarBass;
649                                                         }
650                     }
651                                         this.actSortSongs.t進行描画();
652                                         this.actQuickConfig.t進行描画();
653                                 }
654                 else if( base.eフェーズID == CStage.Eフェーズ.選曲_決定演出
655                       && CDTXMania.act現在入力を占有中のプラグイン == null )
656                 {
657                     #region [ Decide ]
658                     if( ( CDTXMania.Pad.b押されたDGB( Eパッド.Decide ) || CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) ||
659                         ( ( CDTXMania.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Return ) ) ) )
660                     {
661                         this.t決定アニメーション終了();
662                         if( this.ct決定演出待機.b進行中 )
663                         {
664                             this.ct決定演出待機.n現在の値 = this.ct決定演出待機.n終了値;
665                         }
666                     }
667                     #endregion
668                 }
669                         }
670                         return 0;
671                 }
672                 public enum E戻り値 : int
673                 {
674                         継続,
675                         タイトルに戻る,
676                         選曲した,
677                         オプション呼び出し,
678                         コンフィグ呼び出し,
679                         スキン変更
680                 }
681                 
682
683                 // その他
684
685                 #region [ private ]
686                 //-----------------
687                 [StructLayout( LayoutKind.Sequential )]
688                 private struct STキー反復用カウンタ
689                 {
690                         public CCounter Up;
691                         public CCounter Down;
692                         public CCounter R;
693                         public CCounter B;
694                         public CCounter this[ int index ]
695                         {
696                                 get
697                                 {
698                                         switch( index )
699                                         {
700                                                 case 0:
701                                                         return this.Up;
702
703                                                 case 1:
704                                                         return this.Down;
705
706                                                 case 2:
707                                                         return this.R;
708
709                                                 case 3:
710                                                         return this.B;
711                                         }
712                                         throw new IndexOutOfRangeException();
713                                 }
714                                 set
715                                 {
716                                         switch( index )
717                                         {
718                                                 case 0:
719                                                         this.Up = value;
720                                                         return;
721
722                                                 case 1:
723                                                         this.Down = value;
724                                                         return;
725
726                                                 case 2:
727                                                         this.R = value;
728                                                         return;
729
730                                                 case 3:
731                                                         this.B = value;
732                                                         return;
733                                         }
734                                         throw new IndexOutOfRangeException();
735                                 }
736                         }
737                 }
738                 private CActSelectArtistComment actArtistComment;
739                 private CActFIFOBlack actFIFO;
740                 private CActFIFOBlack actFIfrom結果画面;
741                 private CActFIFOBlack actFOtoNowLoading;        // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
742                 private CActSelectInformation actInformation;
743                 private CActSelectPreimageパネル actPreimageパネル;
744                 private CActSelectPresound actPresound;
745                 private CActオプションパネル actオプションパネル;
746                 public  CActSelectステータスパネル actステータスパネル;
747                 private CActSelect演奏履歴パネル act演奏履歴パネル;
748                 public  CActSelect曲リスト act曲リスト;
749                 private CActSelectShowCurrentPosition actShowCurrentPosition;
750
751                 private CActSortSongs actSortSongs;
752                 private CActSelectQuickConfig actQuickConfig;
753                 private CAct演奏AVI actAVI;
754
755                 private bool bBGM再生済み;
756                 private STキー反復用カウンタ ctキー反復用;
757                 public CCounter ct登場時アニメ用共通;
758         public CCounter ct決定演出待機; //テスト
759         private bool b決定演出カウンタ使用中;
760                 private E戻り値 eフェードアウト完了時の戻り値;
761                 private CTextureAf tx下部パネル;
762                 private CTextureAf tx上部パネル;
763                 private CTexture tx背景;
764         private CTexture tx背景_決定後;
765                 private CTexture txFLIP;
766
767                 private struct STCommandTime            // #24063 2011.1.16 yyagi コマンド入力時刻の記録用
768                 {
769                         public E楽器パート eInst;          // 使用楽器
770                         public EパッドFlag ePad;             // 押されたコマンド(同時押しはOR演算で列挙する)
771                         public long time;                               // コマンド入力時刻
772                 }
773                 private class CCommandHistory           // #24063 2011.1.16 yyagi コマンド入力履歴を保持・確認するクラス
774                 {
775                         readonly int buffersize = 16;
776                         private List<STCommandTime> stct;
777
778                         public CCommandHistory()                // コンストラクタ
779                         {
780                                 stct = new List<STCommandTime>( buffersize );
781                         }
782
783                         /// <summary>
784                         /// コマンド入力履歴へのコマンド追加
785                         /// </summary>
786                         /// <param name="_eInst">楽器の種類</param>
787                         /// <param name="_ePad">入力コマンド(同時押しはOR演算で列挙すること)</param>
788                         public void Add( E楽器パート _eInst, EパッドFlag _ePad )
789                         {
790                                 STCommandTime _stct = new STCommandTime {
791                                         eInst = _eInst,
792                                         ePad = _ePad,
793                                         time = CDTXMania.Timer.n現在時刻
794                                 };
795
796                                 if ( stct.Count >= buffersize )
797                                 {
798                                         stct.RemoveAt( 0 );
799                                 }
800                                 stct.Add(_stct);
801 //Debug.WriteLine( "CMDHIS: 楽器=" + _stct.eInst + ", CMD=" + _stct.ePad + ", time=" + _stct.time );
802                         }
803                         public void RemoveAt( int index )
804                         {
805                                 stct.RemoveAt( index );
806                         }
807
808                         /// <summary>
809                         /// コマンド入力に成功しているか調べる
810                         /// </summary>
811                         /// <param name="_ePad">入力が成功したか調べたいコマンド</param>
812                         /// <param name="_eInst">対象楽器</param>
813                         /// <returns>コマンド入力成功時true</returns>
814                         public bool CheckCommand( EパッドFlag[] _ePad, E楽器パート _eInst)
815                         {
816                                 int targetCount = _ePad.Length;
817                                 int stciCount = stct.Count;
818                                 if ( stciCount < targetCount )
819                                 {
820 //Debug.WriteLine("NOT start checking...stciCount=" + stciCount + ", targetCount=" + targetCount);
821                                         return false;
822                                 }
823
824                                 long curTime = CDTXMania.Timer.n現在時刻;
825 //Debug.WriteLine("Start checking...targetCount=" + targetCount);
826                                 for ( int i = targetCount - 1, j = stciCount - 1; i >= 0; i--, j-- )
827                                 {
828                                         if ( _ePad[ i ] != stct[ j ].ePad )
829                                         {
830 //Debug.WriteLine( "CMD解析: false targetCount=" + targetCount + ", i=" + i + ", j=" + j + ": ePad[]=" + _ePad[i] + ", stci[j] = " + stct[j].ePad );
831                                                 return false;
832                                         }
833                                         if ( stct[ j ].eInst != _eInst )
834                                         {
835 //Debug.WriteLine( "CMD解析: false " + i );
836                                                 return false;
837                                         }
838                                         if ( curTime - stct[ j ].time > 500 )
839                                         {
840 //Debug.WriteLine( "CMD解析: false " + i + "; over 500ms" );
841                                                 return false;
842                                         }
843                                         curTime = stct[ j ].time;
844                                 }
845
846 //Debug.Write( "CMD解析: 成功!(" + _ePad.Length + ") " );
847 //for ( int i = 0; i < _ePad.Length; i++ ) Debug.Write( _ePad[ i ] + ", " );
848 //Debug.WriteLine( "" );
849                                 //stct.RemoveRange( 0, targetCount );                   // #24396 2011.2.13 yyagi 
850                                 stct.Clear();                                                                   // #24396 2011.2.13 yyagi Clear all command input history in case you succeeded inputting some command
851
852                                 return true;
853                         }
854                 }
855                 private CCommandHistory CommandHistory;
856
857                 private void tカーソルを下へ移動する()
858                 {
859                         CDTXMania.Skin.soundカーソル移動音.t再生する();
860                         this.act曲リスト.t次に移動();
861                 }
862                 private void tカーソルを上へ移動する()
863                 {
864                         CDTXMania.Skin.soundカーソル移動音.t再生する();
865                         this.act曲リスト.t前に移動();
866                 }
867                 private void t曲をランダム選択する()
868                 {
869                         C曲リストノード song = this.act曲リスト.r現在選択中の曲;
870                         if( ( song.stackランダム演奏番号.Count == 0 ) || ( song.listランダム用ノードリスト == null ) )
871                         {
872                                 if( song.listランダム用ノードリスト == null )
873                                 {
874                                         song.listランダム用ノードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む( song );
875                                 }
876                                 int count = song.listランダム用ノードリスト.Count;
877                                 if( count == 0 )
878                                 {
879                                         return;
880                                 }
881                                 int[] numArray = new int[ count ];
882                                 for( int i = 0; i < count; i++ )
883                                 {
884                                         numArray[ i ] = i;
885                                 }
886                                 for( int j = 0; j < ( count * 1.5 ); j++ )
887                                 {
888                                         int index = CDTXMania.Random.Next( count );
889                                         int num5 = CDTXMania.Random.Next( count );
890                                         int num6 = numArray[ num5 ];
891                                         numArray[ num5 ] = numArray[ index ];
892                                         numArray[ index ] = num6;
893                                 }
894                                 for( int k = 0; k < count; k++ )
895                                 {
896                                         song.stackランダム演奏番号.Push( numArray[ k ] );
897                                 }
898                                 if( CDTXMania.ConfigIni.bLogDTX詳細ログ出力 )
899                                 {
900                                         StringBuilder builder = new StringBuilder( 0x400 );
901                                         builder.Append( string.Format( "ランダムインデックスリストを作成しました: {0}曲: ", song.stackランダム演奏番号.Count ) );
902                                         for( int m = 0; m < count; m++ )
903                                         {
904                                                 builder.Append( string.Format( "{0} ", numArray[ m ] ) );
905                                         }
906                                         Trace.TraceInformation( builder.ToString() );
907                                 }
908                         }
909                         this.r確定された曲 = song.listランダム用ノードリスト[ song.stackランダム演奏番号.Pop() ];
910                         this.n確定された曲の難易度 = this.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( this.r確定された曲 );
911                         this.r確定されたスコア = this.r確定された曲.arスコア[ this.n確定された曲の難易度 ];
912                         this.eフェードアウト完了時の戻り値 = E戻り値.選曲した;
913                 //      this.actFOtoNowLoading.tフェードアウト開始();                                  // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
914 #if animetest
915             base.eフェーズID = CStage.Eフェーズ.選曲_決定演出;
916 #else
917                         base.eフェーズID = CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト;
918 #endif
919                         if( CDTXMania.ConfigIni.bLogDTX詳細ログ出力 )
920                         {
921                                 int[] numArray2 = song.stackランダム演奏番号.ToArray();
922                                 StringBuilder builder2 = new StringBuilder( 0x400 );
923                                 builder2.Append( "ランダムインデックスリスト残り: " );
924                                 if( numArray2.Length > 0 )
925                                 {
926                                         for( int n = 0; n < numArray2.Length; n++ )
927                                         {
928                                                 builder2.Append( string.Format( "{0} ", numArray2[ n ] ) );
929                                         }
930                                 }
931                                 else
932                                 {
933                                         builder2.Append( "(なし)" );
934                                 }
935                                 Trace.TraceInformation( builder2.ToString() );
936                         }
937                         CDTXMania.Skin.bgm選曲画面.t停止する();
938                 }
939                 private void t曲を選択する()
940                 {
941                         this.r確定された曲 = this.act曲リスト.r現在選択中の曲;
942                         this.r確定されたスコア = this.act曲リスト.r現在選択中のスコア;
943                         this.n確定された曲の難易度 = this.act曲リスト.n現在選択中の曲の現在の難易度レベル;
944                         if( ( this.r確定された曲 != null ) && ( this.r確定されたスコア != null ) )
945                         {
946                                 this.eフェードアウト完了時の戻り値 = E戻り値.選曲した;
947                         //      this.actFOtoNowLoading.tフェードアウト開始();                          // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
948 #if animetest
949                 base.eフェーズID = CStage.Eフェーズ.選曲_決定演出;
950 #else
951                 base.eフェーズID = CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト;
952 #endif
953                         }
954                         CDTXMania.Skin.bgm選曲画面.t停止する();
955                 }
956         private void t決定アニメーション()
957         {
958             //決定からの演出
959             if( this.b決定演出カウンタ使用中 )
960             {
961                 this.ct決定演出待機.t進行();
962                 if( this.ct決定演出待機.b終了値に達した )
963                 {
964                     this.ct決定演出待機.t停止();
965                     this.b決定演出カウンタ使用中 = false;
966                 }
967             }
968
969             if( base.eフェーズID == Eフェーズ.選曲_決定演出 )
970             {
971                 if( this.ct決定演出待機.b進行中 )
972                 {
973                     this.actPresound.tサウンド停止();
974                     //CDTXMania.act文字コンソール.tPrint( 0, 0, C文字コンソール.Eフォント種別.白, "MUSIC DECIDED." );
975                     //CDTXMania.act文字コンソール.tPrint( 0, 16, C文字コンソール.Eフォント種別.白, "PLEASE WAIT  " + this.ct決定演出待機.n現在の値.ToString() );
976                 }
977
978                 if( this.ct決定演出待機.b終了値に達した )
979                 {
980                     this.t決定アニメーション終了();
981                 }
982             }
983         }
984         private void t決定アニメーション開始()
985         {
986             if( !this.b決定演出カウンタ使用中 )
987             {
988                 this.b決定演出カウンタ使用中 = true;
989                 this.ct決定演出待機 = new CCounter( 0, 6000, 1, CDTXMania.Timer );
990             }
991         }
992         private void t決定アニメーション終了()
993         {
994             //アニメーション終了後の処理。
995             this.actFOtoNowLoading.tフェードアウト開始();
996             base.eフェーズID = CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト;
997         }
998                 private List<C曲リストノード> t指定された曲が存在する場所の曲を列挙する_子リスト含む( C曲リストノード song )
999                 {
1000                         List<C曲リストノード> list = new List<C曲リストノード>();
1001                         song = song.r親ノード;
1002                         if( ( song == null ) && ( CDTXMania.Songs管理.list曲ルート.Count > 0 ) )
1003                         {
1004                                 foreach( C曲リストノード c曲リストノード in CDTXMania.Songs管理.list曲ルート )
1005                                 {
1006                                         if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) )
1007                                         {
1008                                                 list.Add( c曲リストノード );
1009                                         }
1010                                         if( ( c曲リストノード.list子リスト != null ) && CDTXMania.ConfigIni.bランダムセレクトで子BOXを検索対象とする )
1011                                         {
1012                                                 this.t指定された曲の子リストの曲を列挙する_孫リスト含む( c曲リストノード, ref list );
1013                                         }
1014                                 }
1015                                 return list;
1016                         }
1017                         this.t指定された曲の子リストの曲を列挙する_孫リスト含む( song, ref list );
1018                         return list;
1019                 }
1020                 private void t指定された曲の子リストの曲を列挙する_孫リスト含む( C曲リストノード r親, ref List<C曲リストノード> list )
1021                 {
1022                         if( ( r親 != null ) && ( r親.list子リスト != null ) )
1023                         {
1024                                 foreach( C曲リストノード c曲リストノード in r親.list子リスト )
1025                                 {
1026                                         if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) )
1027                                         {
1028                                                 list.Add( c曲リストノード );
1029                                         }
1030                                         if( ( c曲リストノード.list子リスト != null ) && CDTXMania.ConfigIni.bランダムセレクトで子BOXを検索対象とする )
1031                                         {
1032                                                 this.t指定された曲の子リストの曲を列挙する_孫リスト含む( c曲リストノード, ref list );
1033                                         }
1034                                 }
1035                         }
1036                 }
1037                 //-----------------
1038                 #endregion
1039         }
1040 }