OSDN Git Service

eed52dd433dc2af5d9116790ab9591f27aa9da4c
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / DTXManiaプロジェクト / コード / ステージ / 07.演奏 / ギター画面 / 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.Drawing.Imaging;
7 using System.IO;
8 using System.Diagnostics;
9 using System.Threading;
10 using SlimDX.Direct3D9;
11 using FDK;
12
13 namespace DTXMania
14 {
15         internal class CStage演奏ギター画面 : CStage演奏画面共通
16         {
17                 // コンストラクタ
18
19                 public CStage演奏ギター画面()
20                 {
21                         base.eステージID = CStage.Eステージ.演奏;
22                         base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
23                         base.b活性化してない = true;
24                         base.list子Activities.Add( this.actStageFailed = new CAct演奏ステージ失敗() );
25             base.list子Activities.Add( this.actBPMBar = new CAct演奏GuitarBPMバー() );
26                         base.list子Activities.Add( this.actDANGER = new CAct演奏GuitarDanger() );
27                         base.list子Activities.Add( this.actAVI = new CAct演奏AVI() );
28                         base.list子Activities.Add( this.actBGA = new CAct演奏BGA() );
29                         base.list子Activities.Add( this.actPanel = new CAct演奏パネル文字列() );
30                         base.list子Activities.Add( this.act譜面スクロール速度 = new CAct演奏スクロール速度() );
31                         base.list子Activities.Add( this.actStatusPanels = new CAct演奏Guitarステータスパネル() );
32                         base.list子Activities.Add( this.actWailingBonus = new CAct演奏GuitarWailingBonus() );
33                         base.list子Activities.Add( this.actScore = new CAct演奏Guitarスコア() );
34                         base.list子Activities.Add( this.actRGB = new CAct演奏GuitarRGB() );
35             base.list子Activities.Add( this.actLane = new CAct演奏Guitarレーン() );
36                         base.list子Activities.Add( this.actLaneFlushGB = new CAct演奏GuitarレーンフラッシュGB() );
37                         base.list子Activities.Add( this.actJudgeString = new CAct演奏Guitar判定文字列() );
38                         base.list子Activities.Add( this.actGauge = new CAct演奏Guitarゲージ() );
39                         base.list子Activities.Add( this.actCombo = new CAct演奏Guitarコンボ() );
40                         base.list子Activities.Add( this.actChipFireGB = new CAct演奏Guitarチップファイア() );
41                         base.list子Activities.Add( this.actPlayInfo = new CAct演奏演奏情報() );
42                         base.list子Activities.Add( this.actFI = new CActFIFOBlack() );
43                         base.list子Activities.Add( this.actFO = new CActFIFOBlack() );
44                         base.list子Activities.Add( this.actFOClear = new CActFIFOWhite() );
45             base.list子Activities.Add( this.actGraph = new CAct演奏グラフ() );
46                 }
47
48
49                 // メソッド
50
51                 public void t演奏結果を格納する( out CScoreIni.C演奏記録 Drums, out CScoreIni.C演奏記録 Guitar, out CScoreIni.C演奏記録 Bass )
52                 {
53                         Drums = new CScoreIni.C演奏記録();
54
55                         base.t演奏結果を格納する_ギター( out Guitar );
56                         base.t演奏結果を格納する_ベース( out Bass );
57
58 //                      if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass )         // #24063 2011.1.24 yyagi Gt/Bsを入れ替えていたなら、演奏結果も入れ替える
59 //                      {
60 //                              CScoreIni.C演奏記録 t;
61 //                              t = Guitar;
62 //                              Guitar = Bass;
63 //                              Bass = t;
64 //                      
65 //                              CDTXMania.DTX.SwapGuitarBassInfos();                    // 譜面情報も元に戻す
66 //                      }
67                 }
68                 
69
70                 // CStage 実装
71
72                 public override void On活性化()
73                 {
74             int nGraphUsePart = CDTXMania.ConfigIni.bGraph.Guitar ? 1 : 2;
75
76                         if( CDTXMania.bコンパクトモード )
77                         {
78                                 var score = new Cスコア();
79                                 CDTXMania.Songs管理.tScoreIniを読み込んで譜面情報を設定する( CDTXMania.strコンパクトモードファイル + ".score.ini", ref score );
80                                 this.actGraph.dbグラフ値目標_渡 = score.譜面情報.最大スキル[ nGraphUsePart ];
81                         }
82                         else
83                         {
84                                 this.actGraph.dbグラフ値目標_渡 = CDTXMania.stage選曲.r確定されたスコア.譜面情報.最大スキル[ nGraphUsePart ]; // #24074 2011.01.23 add ikanick
85                 this.actGraph.dbグラフ値自己ベスト = CDTXMania.stage選曲.r確定されたスコア.譜面情報.最大スキル[ nGraphUsePart ];
86
87                 // #35411 2015.08.21 chnmr0 add
88                 // ゴースト利用可のなとき、0で初期化
89                 if (CDTXMania.ConfigIni.eTargetGhost[ nGraphUsePart ] != ETargetGhostData.NONE)
90                 {
91                     if (CDTXMania.listTargetGhsotLag[ nGraphUsePart ] != null)
92                     {
93                         this.actGraph.dbグラフ値目標_渡 = 0;
94                     }
95                 }
96                         }
97                         dtLastQueueOperation = DateTime.MinValue;
98                         base.On活性化();
99                 }
100                 public override void OnManagedリソースの作成()
101                 {
102                         if( !base.b活性化してない )
103                         {
104                                 //this.t背景テクスチャの生成();
105                                 this.txチップ = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Chips_Guitar.png" ) );
106                                 this.txヒットバー = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Guitar_JudgeLine.png" ) );
107                                 //this.txWailing枠 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay wailing cursor.png" ) );
108                                 base.OnManagedリソースの作成();
109                         }
110                 }
111                 public override void OnManagedリソースの解放()
112                 {
113                         if( !base.b活性化してない )
114                         {
115                                 //CDTXMania.tテクスチャの解放( ref this.tx背景 );
116                                 CDTXMania.tテクスチャの解放( ref this.txチップ );
117                                 CDTXMania.tテクスチャの解放( ref this.txヒットバー );
118                                 //CDTXMania.tテクスチャの解放( ref this.txWailing枠 );
119                                 base.OnManagedリソースの解放();
120                         }
121                 }
122                 public override int On進行描画()
123                 {
124                         if( !base.b活性化してない )
125                         {
126                                 bool bIsFinishedPlaying = false;
127                                 bool bIsFinishedFadeout = false;
128
129                                 if( base.b初めての進行描画 )
130                                 {
131                                         this.PrepareAVITexture();
132
133                                         CSound管理.rc演奏用タイマ.tリセット();
134                                         CDTXMania.Timer.tリセット();
135                                         this.ctチップ模様アニメ.Guitar = new CCounter( 0, 0x17, 20, CDTXMania.Timer );
136                                         this.ctチップ模様アニメ.Bass = new CCounter( 0, 0x17, 20, CDTXMania.Timer );
137                                         this.ctチップ模様アニメ[ 0 ] = null;
138                                         this.ctWailingチップ模様アニメ = new CCounter( 0, 4, 50, CDTXMania.Timer );
139                                         base.eフェーズID = CStage.Eフェーズ.共通_フェードイン;
140                                         this.actFI.tフェードイン開始();
141
142                                         if ( CDTXMania.DTXVmode.Enabled )                       // DTXVモードなら
143                                         {
144                                                 #region [ DTXV用の再生設定にする(全AUTOなど) ]
145                                                 tDTXV用の設定();
146                                                 #endregion
147                                                 t演奏位置の変更( CDTXMania.DTXVmode.nStartBar );
148                                         }
149
150                                         CDTXMania.Sound管理.tDisableUpdateBufferAutomatically();
151                                         base.b初めての進行描画 = false;
152                                 }
153                                 if( CDTXMania.ConfigIni.bSTAGEFAILED有効 && ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) )
154                                 {
155 //                                      bool flag3 = ( CDTXMania.ConfigIni.bAutoPlay.Guitar || !CDTXMania.DTX.bチップがある.Guitar ) || ( this.actGauge.db現在のゲージ値.Guitar <= -0.1 );                         // #23630
156 //                                      bool flag4 = ( CDTXMania.ConfigIni.bAutoPlay.Bass || !CDTXMania.DTX.bチップがある.Bass ) || ( this.actGauge.db現在のゲージ値.Bass <= -0.1 );                                       // #23630
157                                         bool bFailedGuitar = this.actGauge.IsFailed( E楽器パート.GUITAR );         // #23630 2011.11.12 yyagi: deleted AutoPlay condition: not to be failed at once
158                                         bool bFailedBass   = this.actGauge.IsFailed( E楽器パート.BASS );           // #23630
159                                         bool bFailedNoChips = (!CDTXMania.DTX.bチップがある.Guitar && !CDTXMania.DTX.bチップがある.Bass);   // #25216 2011.5.21 yyagi add condition
160                                         if ( bFailedGuitar || bFailedBass || bFailedNoChips )                                           // #25216 2011.5.21 yyagi: changed codition: && -> ||
161                                         {
162                                                 this.actStageFailed.Start();
163                                                 CDTXMania.DTX.t全チップの再生停止();
164                                                 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_FAILED;
165                                         }
166                                 }
167                                 this.t進行描画_AVI();
168                                 this.t進行描画_背景();
169                                 this.t進行描画_MIDIBGM();
170                                 //this.t進行描画_パネル文字列();
171                                 this.t進行描画_スコア();
172                                 this.t進行描画_BGA();
173
174                 this.actLane.On進行描画();
175                                 this.t進行描画_ステータスパネル();
176                                 this.t進行描画_レーンフラッシュGB();
177                                 this.t進行描画_ギターベース判定ライン();
178                                 this.t進行描画_DANGER();
179                 this.t進行描画_グラフ();
180                                 if ( this.e判定表示優先度 == E判定表示優先度.Chipより下 )
181                                 {
182                                         this.t進行描画_RGBボタン();
183                                         this.t進行描画_判定文字列();
184                                         //this.t進行描画_コンボ();
185                                 }
186                                 this.t進行描画_WailingBonus();
187                                 this.t進行描画_譜面スクロール速度();
188                                 this.t進行描画_チップアニメ();
189                                 bIsFinishedPlaying = this.t進行描画_チップ(E楽器パート.GUITAR);
190                                 this.t進行描画_ゲージ();
191                                 if ( this.e判定表示優先度 == E判定表示優先度.Chipより上 )
192                                 {
193                                         this.t進行描画_RGBボタン();
194                                         this.t進行描画_判定文字列();
195                                         //this.t進行描画_コンボ();
196                                 }
197                                 this.t進行描画_演奏情報();
198                                 //this.t進行描画_Wailing枠();
199                                 this.t進行描画_チップファイアGB();
200                                 this.t進行描画_STAGEFAILED();
201                                 bIsFinishedFadeout = this.t進行描画_フェードイン_アウト();
202                                 if( bIsFinishedPlaying && ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) )
203                                 {
204                                         if ( CDTXMania.DTXVmode.Enabled )
205                                         {
206                                                 if ( CDTXMania.Timer.b停止していない )
207                                                 {
208                                                         this.actPanel.Stop();                           // PANEL表示停止
209                                                         CDTXMania.Timer.t一時停止();                // 再生時刻カウンタ停止
210                                                 }
211                                                 Thread.Sleep( 5 );
212                                                 // DTXCからの次のメッセージを待ち続ける
213                                         }
214                                         else
215                                         {
216                                                 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.ステージクリア;
217                                                 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_CLEAR_フェードアウト;
218                                                 this.actFOClear.tフェードアウト開始();
219                                         } 
220                                 }
221                                 if ( this.eフェードアウト完了時の戻り値 == E演奏画面の戻り値.再読込_再演奏)
222                                 {
223                                         bIsFinishedFadeout = true;
224                                 }
225                                 if ( bIsFinishedFadeout )
226                                 {
227                                         return (int) this.eフェードアウト完了時の戻り値;
228                                 }
229
230                                 ManageMixerQueue();
231
232                                 // キー入力
233
234                                 if( CDTXMania.act現在入力を占有中のプラグイン == null )
235                                 {
236                                         this.tキー入力();
237                                 }
238                         }
239                         return 0;
240                 }
241
242
243                 // その他
244
245                 #region [ private ]
246                 //-----------------
247         private CAct演奏Guitarレーン actLane;
248
249                 protected override E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, bool bCorrectLane )
250                 {
251                         E判定 eJudgeResult = tチップのヒット処理( nHitTime, pChip, E楽器パート.GUITAR, bCorrectLane );
252             if( pChip.e楽器パート == E楽器パート.GUITAR && CDTXMania.ConfigIni.bGraph.Guitar )
253             {
254                 if( CDTXMania.ConfigIni.eSkillMode == ESkillType.DTXMania )
255                                 this.actGraph.dbグラフ値現在_渡 = CScoreIni.t演奏型スキルを計算して返す( CDTXMania.DTX.n可視チップ数.Guitar, this.nヒット数_Auto含まない.Guitar.Perfect, this.nヒット数_Auto含まない.Guitar.Great, this.nヒット数_Auto含まない.Guitar.Good, this.nヒット数_Auto含まない.Guitar.Poor, this.nヒット数_Auto含まない.Guitar.Miss, E楽器パート.GUITAR,  bIsAutoPlay );
256                 else
257                             this.actGraph.dbグラフ値現在_渡 = CScoreIni.tXG演奏型スキルを計算して返す( CDTXMania.DTX.n可視チップ数.Guitar, this.nヒット数_Auto含まない.Guitar.Perfect, this.nヒット数_Auto含まない.Guitar.Great, this.nヒット数_Auto含まない.Guitar.Good, this.nヒット数_Auto含まない.Guitar.Poor, this.nヒット数_Auto含まない.Guitar.Miss, this.actCombo.n現在のコンボ数.Guitar最高値, E楽器パート.GUITAR,  bIsAutoPlay );
258
259                         if( CDTXMania.listTargetGhsotLag.Guitar != null &&
260                     CDTXMania.ConfigIni.eTargetGhost.Guitar == ETargetGhostData.ONLINE &&
261                                     CDTXMania.DTX.n可視チップ数.Guitar > 0 )
262                         {
263
264                                 this.actGraph.dbグラフ値現在_渡 = 100 *
265                                                                 (this.nヒット数_Auto含まない.Guitar.Perfect * 17 +
266                                                                  this.nヒット数_Auto含まない.Guitar.Great * 7 +
267                                                                  this.actCombo.n現在のコンボ数.Guitar最高値 * 3) / (20.0 * CDTXMania.DTX.n可視チップ数.Guitar );
268                         }
269
270                 this.actGraph.n現在のAutoを含まない判定数_渡[ 0 ] = this.nヒット数_Auto含まない.Guitar.Perfect;
271                 this.actGraph.n現在のAutoを含まない判定数_渡[ 1 ] = this.nヒット数_Auto含まない.Guitar.Great;
272                 this.actGraph.n現在のAutoを含まない判定数_渡[ 2 ] = this.nヒット数_Auto含まない.Guitar.Good;
273                 this.actGraph.n現在のAutoを含まない判定数_渡[ 3 ] = this.nヒット数_Auto含まない.Guitar.Poor;
274                 this.actGraph.n現在のAutoを含まない判定数_渡[ 4 ] = this.nヒット数_Auto含まない.Guitar.Miss;
275                 this.actGraph.n現在のAutoを含まない判定数_渡[ 5 ] = this.nヒット数_Auto含まない.Guitar.XPerfect;
276             }
277             else if( pChip.e楽器パート == E楽器パート.BASS && CDTXMania.ConfigIni.bGraph.Bass )
278             {
279                 if( CDTXMania.ConfigIni.eSkillMode == ESkillType.DTXMania )
280                                 this.actGraph.dbグラフ値現在_渡 = CScoreIni.t演奏型スキルを計算して返す( CDTXMania.DTX.n可視チップ数.Bass, this.nヒット数_Auto含まない.Bass.Perfect, this.nヒット数_Auto含まない.Bass.Great, this.nヒット数_Auto含まない.Bass.Good, this.nヒット数_Auto含まない.Bass.Poor, this.nヒット数_Auto含まない.Bass.Miss, E楽器パート.BASS,  bIsAutoPlay );
281                 else
282                             this.actGraph.dbグラフ値現在_渡 = CScoreIni.tXG演奏型スキルを計算して返す( CDTXMania.DTX.n可視チップ数.Bass, this.nヒット数_Auto含まない.Bass.Perfect, this.nヒット数_Auto含まない.Bass.Great, this.nヒット数_Auto含まない.Bass.Good, this.nヒット数_Auto含まない.Bass.Poor, this.nヒット数_Auto含まない.Bass.Miss, this.actCombo.n現在のコンボ数.Bass最高値, E楽器パート.BASS,  bIsAutoPlay );
283
284                         if( CDTXMania.listTargetGhsotLag.Bass != null &&
285                     CDTXMania.ConfigIni.eTargetGhost.Bass == ETargetGhostData.ONLINE &&
286                                     CDTXMania.DTX.n可視チップ数.Bass > 0 )
287                         {
288
289                                 this.actGraph.dbグラフ値現在_渡 = 100 *
290                                                                 (this.nヒット数_Auto含まない.Bass.Perfect * 17 +
291                                                                  this.nヒット数_Auto含まない.Bass.Great * 7 +
292                                                                  this.actCombo.n現在のコンボ数.Bass最高値 * 3) / (20.0 * CDTXMania.DTX.n可視チップ数.Bass );
293                         }
294
295                 this.actGraph.n現在のAutoを含まない判定数_渡[ 0 ] = this.nヒット数_Auto含まない.Bass.Perfect;
296                 this.actGraph.n現在のAutoを含まない判定数_渡[ 1 ] = this.nヒット数_Auto含まない.Bass.Great;
297                 this.actGraph.n現在のAutoを含まない判定数_渡[ 2 ] = this.nヒット数_Auto含まない.Bass.Good;
298                 this.actGraph.n現在のAutoを含まない判定数_渡[ 3 ] = this.nヒット数_Auto含まない.Bass.Poor;
299                 this.actGraph.n現在のAutoを含まない判定数_渡[ 4 ] = this.nヒット数_Auto含まない.Bass.Miss;
300                 this.actGraph.n現在のAutoを含まない判定数_渡[ 5 ] = this.nヒット数_Auto含まない.Bass.XPerfect;
301             }
302                         return eJudgeResult;
303                 }
304                 protected override void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part )
305                 {
306                         this.tチップのヒット処理_BadならびにTight時のMiss( part, 0, E楽器パート.GUITAR );
307                 }
308                 protected override void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part, int nLane )
309                 {
310                         this.tチップのヒット処理_BadならびにTight時のMiss( part, nLane, E楽器パート.GUITAR );
311                 }
312
313                 protected override void t進行描画_AVI()
314                 {
315                     base.t進行描画_AVI( 682, 112 );
316                 }
317                 protected override void t進行描画_BGA()
318                 {
319                     base.t進行描画_BGA( 640 - ( 278 / 2 ), 0 );
320                 }
321                 protected override void t進行描画_DANGER()                  // #23631 2011.4.19 yyagi
322                 {
323                         //this.actDANGER.t進行描画( false, this.actGauge.db現在のゲージ値.Guitar < 0.3, this.actGauge.db現在のゲージ値.Bass < 0.3 );
324                         this.actDANGER.t進行描画( false, this.actGauge.IsDanger(E楽器パート.GUITAR), this.actGauge.IsDanger(E楽器パート.BASS) );
325                 }
326
327                 protected override void t進行描画_Wailing枠()
328                 {
329                         int yG = this.演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, bReverse[ (int) E楽器パート.GUITAR ], true );
330                         int yB = this.演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS,   true, bReverse[ (int) E楽器パート.BASS   ], true );
331                         //base.t進行描画_Wailing枠( 139, 593,      yG,     yB );
332                 }
333                 private void t進行描画_ギターベース判定ライン()  // yyagi: ドラム画面とは座標が違うだけですが、まとめづらかったのでそのまま放置してます。
334                 {
335                         if ( CDTXMania.ConfigIni.bGuitar有効 )
336                         {
337                                 if ( CDTXMania.DTX.bチップがある.Guitar && CDTXMania.ConfigIni.bJudgeLineDisp.Guitar )
338                                 {
339                                         int y = this.演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, bReverse[ (int) E楽器パート.GUITAR ] ) - 3;
340                                                                                                                         // #31602 2013.6.23 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
341                                         if ( this.txヒットバー != null )
342                                         {
343                                                 this.txヒットバー.t2D描画( CDTXMania.app.Device, 80, y, new Rectangle( 0, 0, 206, 6 ) );
344                                         }
345                     if( this.txWailing枠 != null )
346                     {
347                         this.txWailing枠.t2D描画( CDTXMania.app.Device, 281, y - 21, new Rectangle( 0, 0, 51, 48 ) );
348                     }
349                                 }
350                                 if ( CDTXMania.DTX.bチップがある.Bass && CDTXMania.ConfigIni.bJudgeLineDisp.Bass )
351                                 {
352                                         int y = this.演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, bReverse[ (int) E楽器パート.BASS   ] ) - 3;
353                                                                                                                         // #31602 2013.6.23 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
354                                         if ( this.txヒットバー != null )
355                                         {
356                                                 this.txヒットバー.t2D描画( CDTXMania.app.Device, 947, y, new Rectangle( 0, 0, 206, 6 ) );
357                                         }
358                     if( this.txWailing枠 != null )
359                     {
360                         this.txWailing枠.t2D描画( CDTXMania.app.Device, 1149, y - 21, new Rectangle( 0, 0, 51, 48 ) );
361                     }
362                                 }
363                         }
364                 }
365
366                 protected override void t進行描画_パネル文字列()
367                 {
368                         base.t進行描画_パネル文字列( 0xb5, 430 );
369                 }
370
371                 protected override void t進行描画_演奏情報()
372                 {
373                         base.t進行描画_演奏情報( 520, 360 );
374                 }
375
376                 protected override void ドラムスクロール速度アップ()
377                 {
378                         // ギタレボモードでは何もしない
379                 }
380                 protected override void ドラムスクロール速度ダウン()
381                 {
382                         // ギタレボモードでは何もしない
383                 }
384
385                 protected override void t入力処理_ドラム()
386                 {
387                         // ギタレボモードでは何もしない
388                 }
389
390                 private void t進行描画_グラフ()
391         {
392                         if ( !CDTXMania.ConfigIni.bストイックモード && ( CDTXMania.ConfigIni.bGraph.Guitar || CDTXMania.ConfigIni.bGraph.Bass ) )
393                         {
394                 this.actGraph.On進行描画();
395             }
396         }
397
398                 protected override void t背景テクスチャの生成()
399                 {
400                         Rectangle bgrect = new Rectangle( 640 - ( 278 / 2 ), 0, 278, 355 );
401                         string DefaultBgFilename = @"Graphics\7_background Guitar.png";
402                         string DefaultLaneFilename = "";
403                         string BgFilename = "";
404                         string BACKGROUND = null;
405                         if ( ( CDTXMania.DTX.BACKGROUND_GR != null ) && ( CDTXMania.DTX.BACKGROUND_GR.Length > 0 ) )
406                         {
407                                 BACKGROUND = CDTXMania.DTX.BACKGROUND_GR;
408                         }
409                         else if ( ( CDTXMania.DTX.BACKGROUND != null ) && ( CDTXMania.DTX.BACKGROUND.Length > 0 ) )
410                         {
411                                 BACKGROUND = CDTXMania.DTX.BACKGROUND;
412                         }
413                         if ( ( BACKGROUND != null ) && ( BACKGROUND.Length > 0 ) )
414                         {
415                                 BgFilename = CDTXMania.DTX.strフォルダ名 + BACKGROUND;
416                         }
417                         base.t背景テクスチャの生成( DefaultBgFilename, bgrect, BgFilename );
418                 }
419
420                 protected override void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
421                 {
422                         // int indexSevenLanes = this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ];
423                         if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
424                         {
425                                 pChip.bHit = true;
426                                 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, E楽器パート.DRUMS, dTX.nモニタを考慮した音量( E楽器パート.DRUMS ) );
427                         }
428                 }
429                 protected override void t進行描画_チップ_ドラムス模様( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
430                 {
431                 }
432                 protected override void t進行描画_チップ_ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst )
433                 {
434                         base.t進行描画_チップ_ギターベース( configIni, ref dTX, ref pChip, inst,
435                                 演奏判定ライン座標.n判定ラインY座標( inst, true, false ),       // 40
436                                 演奏判定ライン座標.n判定ラインY座標( inst, true, true ),        // 369
437                                 (int) ( 0 * Scale.Y ), (int) ( 409 * Scale.Y ),                         // Y軸表示範囲
438                                 26, 480,                                        // openチップのX座標(Gt, Bs)
439                                 0, 192, 103, 8, 32,                     // オープンチップregionの x, y, w, h, 通常チップのw
440                                 26, 98, 480, 552,                       // GtのX, Gt左利きのX, BsのX, Bs左利きのX,
441                                 36, 32                                          // 描画のX座標間隔, テクスチャのX座標間隔
442                         );
443                 }
444 #if false
445                 protected override void t進行描画・チップ・ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst )
446                 {
447                         int instIndex = (int) inst;
448                         if ( configIni.bGuitar有効 )
449                         {
450                                 if ( configIni.bSudden[instIndex ] )
451                                 {
452                                         pChip.b可視 = pChip.nバーからの距離dot[ instIndex ] < 200;
453                                 }
454                                 if ( configIni.bHidden[ instIndex ] && ( pChip.nバーからの距離dot[ instIndex ] < 100 ) )
455                                 {
456                                         pChip.b可視 = false;
457                                 }
458
459                                 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
460                                 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
461                                 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
462                                 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
463                                 bool bChipIsO  = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
464
465                                 int OPEN = ( inst == E楽器パート.GUITAR ) ? 0x20 : 0xA0;
466                                 if ( !pChip.bHit && pChip.b可視 )
467                                 {
468                                         int y = configIni.bReverse[ instIndex ] ? ( 369 - pChip.nバーからの距離dot[ instIndex ]) : ( 40 + pChip.nバーからの距離dot[ instIndex ] );
469                                         if ( ( y > 0 ) && ( y < 409 ) )
470                                         {
471                                                 if ( this.txチップ != null )
472                                                 {
473                                                         int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[ instIndex ].n現在の値;
474                                                         if ( pChip.nチャンネル番号 == OPEN )
475                                                         {
476                                                                 {
477                                                                         int xo = ( inst == E楽器パート.GUITAR ) ? 26 : 480;
478                                                                         this.txチップ.t2D描画( CDTXMania.app.Device, xo, y - 4, new Rectangle( 0, 192 + ( ( nアニメカウンタ現在の値 % 5 ) * 8 ), 103, 8 ) );
479                                                                 }
480                                                         }
481                                                         Rectangle rc = new Rectangle( 0, nアニメカウンタ現在の値 * 8, 32, 8 );
482                                                         int x;
483                                                         if ( inst == E楽器パート.GUITAR )
484                                                         {
485                                                                 x = ( configIni.bLeft.Guitar ) ? 98 : 26;
486                                                         }
487                                                         else
488                                                         {
489                                                                 x = ( configIni.bLeft.Bass ) ? 552 : 480;
490                                                         }
491                                                         int deltaX = ( configIni.bLeft[ instIndex ] ) ? -36 : +36; 
492                                                         if ( bChipHasR )
493                                                         {
494                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
495                                                         }
496                                                         rc.X += 32;
497                                                         if ( bChipHasG )
498                                                         {
499                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
500                                                         }
501                                                         rc.X += 32;
502                                                         if ( bChipHasB )
503                                                         {
504                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
505                                                         }
506                                                 }
507                                         }
508                                 }
509                                 // if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
510                                 if ( ( !pChip.bHit ) && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
511                                 {
512                                         int lo = ( inst == E楽器パート.GUITAR ) ? 0 : 3;   // lane offset
513                                         bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
514                                         bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
515                                         bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
516                                         if ( ( bChipHasR || bChipIsO ) && autoR )
517                                         {
518                                                 this.actChipFireGB.Start( 0 + lo );
519                                         }
520                                         if ( ( bChipHasG || bChipIsO ) && autoG )
521                                         {
522                                                 this.actChipFireGB.Start( 1 + lo );
523                                         }
524                                         if ( ( bChipHasB || bChipIsO ) && autoB )
525                                         {
526                                                 this.actChipFireGB.Start( 2 + lo );
527                                         }
528                                         if ( ( inst == E楽器パート.GUITAR && bIsAutoPlay.GtPick ) || ( inst == E楽器パート.BASS && bIsAutoPlay.BsPick ) )
529                                         {
530                                                 bool pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R );
531                                                 bool pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G );
532                                                 bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );
533                                                 bool bMiss = true;
534                                                 if ( ( ( bChipIsO == true ) && ( !pushingR | autoR ) && ( !pushingG | autoG ) && ( !pushingB | autoB ) ) ||
535                                                         ( ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
536                                                 )
537                                                 {
538                                                         bMiss = false;
539                                                 }
540                                                 pChip.bHit = true;
541                                                 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
542                                                 this.r次にくるギターChip = null;
543                                                 this.tチップのヒット処理( pChip.n発声時刻ms, pChip );
544                                         }
545                                 }
546                                 // break;
547                                 return;
548                         }
549                         if ( !pChip.bHit && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
550                         {
551                                 pChip.bHit = true;
552                                 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
553                         }
554                 }
555 #endif
556
557         //protected override void t進行描画_チップ_ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst )
558         //{
559         //    int instIndex = (int) inst;
560         //    if ( configIni.bGuitar有効 )
561         //    {
562         //        if ( configIni.bSudden[instIndex ] )
563         //        {
564         //            pChip.b可視 = pChip.nバーからの距離dot[ instIndex ] < 200;
565         //        }
566         //        if ( configIni.bHidden[ instIndex ] && ( pChip.nバーからの距離dot[ instIndex ] < 100 ) )
567         //        {
568         //            pChip.b可視 = false;
569         //        }
570
571         //        bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
572         //        bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
573         //        bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
574         //        bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
575         //        bool bChipIsO  = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
576
577         //        int OPEN = ( inst == E楽器パート.GUITAR ) ? 0x20 : 0xA0;
578         //        if ( !pChip.bHit && pChip.b可視 )
579         //        {
580         //            int y = configIni.bReverse[ instIndex ] ? ( 369 - pChip.nバーからの距離dot[ instIndex ]) : ( 40 + pChip.nバーからの距離dot[ instIndex ] );
581         //            if ( ( y > 0 ) && ( y < 409 ) )
582         //            {
583         //                if ( this.txチップ != null )
584         //                {
585         //                    int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[ instIndex ].n現在の値;
586         //                    if ( pChip.nチャンネル番号 == OPEN )
587         //                    {
588         //                        {
589         //                            int xo = ( inst == E楽器パート.GUITAR ) ? 26 : 480;
590         //                            this.txチップ.t2D描画( CDTXMania.app.Device, xo, y - 4, new Rectangle( 0, 192 + ( ( nアニメカウンタ現在の値 % 5 ) * 8 ), 103, 8 ) );
591         //                        }
592         //                    }
593         //                    Rectangle rc = new Rectangle( 0, nアニメカウンタ現在の値 * 8, 32, 8 );
594         //                    int x;
595         //                    if ( inst == E楽器パート.GUITAR )
596         //                    {
597         //                        x = ( configIni.bLeft.Guitar ) ? 98 : 26;
598         //                    }
599         //                    else
600         //                    {
601         //                        x = ( configIni.bLeft.Bass ) ? 552 : 480;
602         //                    }
603         //                    int deltaX = ( configIni.bLeft[ instIndex ] ) ? -36 : +36; 
604         //                    if ( bChipHasR )
605         //                    {
606         //                        this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
607         //                    }
608         //                    rc.X += 32;
609         //                    if ( bChipHasG )
610         //                    {
611         //                        this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
612         //                    }
613         //                    rc.X += 32;
614         //                    if ( bChipHasB )
615         //                    {
616         //                        this.txチップ.t2D描画( CDTXMania.app.Device, x, y - 4, rc );
617         //                    }
618         //                }
619         //            }
620         //        }
621         //        // if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
622         //        if ( ( !pChip.bHit ) && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
623         //        {
624         //            int lo = ( inst == E楽器パート.GUITAR ) ? 0 : 3;     // lane offset
625         //            bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
626         //            bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
627         //            bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
628         //            if ( ( bChipHasR || bChipIsO ) && autoR )
629         //            {
630         //                //this.actChipFireGB.Start( 0 + lo );
631         //            }
632         //            if ( ( bChipHasG || bChipIsO ) && autoG )
633         //            {
634         //                //this.actChipFireGB.Start( 1 + lo );
635         //            }
636         //            if ( ( bChipHasB || bChipIsO ) && autoB )
637         //            {
638         //                //this.actChipFireGB.Start( 2 + lo );
639         //            }
640         //            if ( ( inst == E楽器パート.GUITAR && bIsAutoPlay.GtPick ) || ( inst == E楽器パート.BASS && bIsAutoPlay.BsPick ) )
641         //            {
642         //                bool pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R );
643         //                bool pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G );
644         //                bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );
645         //                bool bMiss = true;
646         //                if ( ( ( bChipIsO == true ) && ( !pushingR | autoR ) && ( !pushingG | autoG ) && ( !pushingB | autoB ) ) ||
647         //                    ( ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
648         //                )
649         //                {
650         //                    bMiss = false;
651         //                }
652         //                pChip.bHit = true;
653         //                this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
654         //                this.r次にくるギターChip = null;
655         //                this.tチップのヒット処理( pChip.n発声時刻ms, pChip );
656         //            }
657         //        }
658         //        // break;
659         //        return;
660         //    }
661         //    if ( !pChip.bHit && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
662         //    {
663         //        pChip.bHit = true;
664         //        this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
665         //    }
666         //}
667
668                 protected void t進行描画_チップ_ギター_ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
669                 {
670                         //if ( configIni.bGuitar有効 )
671                         //{
672                         //    //
673                         //    // 後日、以下の部分を何とかCStage演奏画面共通.csに移したい。
674                         //    //
675                         //    if ( !pChip.bHit && pChip.b可視 )
676                         //    {
677                         //        if ( this.txチップ != null )
678                         //        {
679                         //            this.txチップ.n透明度 = pChip.n透明度;
680                         //        }
681                         //        int[] y_base = {
682                         //            演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, false ),              // 40
683                         //            演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, true )                // 369
684                         //        };                    // ドラム画面かギター画面かで変わる値
685                         //        int offset = 0;                                               // ドラム画面かギター画面かで変わる値
686
687                         //        const int WailingWidth  = (int) ( 20 * Scale.X );             // 4種全て同じ値
688                         //        const int WailingHeight = (int) ( 50 * Scale.Y );             // 4種全て同じ値
689                         //        const int baseTextureOffsetX = (int) ( 96 * Scale.X );        // ドラム画面かギター画面かで変わる値
690                         //        const int baseTextureOffsetY = (int) (  0 * Scale.Y );        // ドラム画面かギター画面かで変わる値
691                         //        const int drawX = (int) ( 140 * Scale.X );                            // 4種全て異なる値
692
693                         //        const int numA = (int) ( 29 * Scale.Y );                              // ドラム画面かギター画面かで変わる値
694                         //        int y = configIni.bReverse.Guitar ?
695                         //            ( y_base[ 1 ] - (int) ( pChip.nバーからの距離dot.Guitar * Scale.Y ) ) :
696                         //            ( y_base[ 0 ] + (int) ( pChip.nバーからの距離dot.Guitar * Scale.Y ) );
697                         //        int numB = y - offset;                                // 4種全て同じ定義
698                         //        int numC = 0;                                         // 4種全て同じ初期値
699                         //        const int showRangeY1 = (int) ( 409 * Scale.Y );                              // ドラム画面かギター画面かで変わる値
700                         //        if ( ( numB < ( showRangeY1 + numA ) ) && ( numB > -numA ) )  // 以下のロジックは4種全て同じ
701                         //        {
702                         //            int c = this.ctWailingチップ模様アニメ.n現在の値;
703                         //            Rectangle rect = new Rectangle(
704                         //                baseTextureOffsetX + ( c * WailingWidth ),
705                         //                baseTextureOffsetY,
706                         //                WailingWidth,
707                         //                WailingHeight
708                         //            );
709                         //            if ( numB < numA )
710                         //            {
711                         //                rect.Y += numA - numB;
712                         //                rect.Height -= numA - numB;
713                         //                numC = numA - numB;
714                         //            }
715                         //            if ( numB > ( showRangeY1 - numA ) )
716                         //            {
717                         //                rect.Height -= numB - ( showRangeY1 - numA );
718                         //            }
719                         //            if ( ( rect.Bottom > rect.Top ) && ( this.txチップ != null ) )
720                         //            {
721                         //                this.txチップ.t2D描画(
722                         //                    CDTXMania.app.Device,
723                         //                    drawX,
724                         //                    ( ( y - numA ) + numC ),
725                         //                    rect
726                         //                );
727                         //            }
728                         //        }
729                         //    }
730                         //}
731                         base.t進行描画_チップ_ギター_ウェイリング( configIni, ref dTX, ref pChip, true );
732                 }
733
734         //protected void t進行描画_チップ_ギター_ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
735         //{
736         //    if ( configIni.bGuitar有効 )
737         //    {
738         //        //
739         //        // 後日、以下の部分を何とかCStage演奏画面共通.csに移したい。
740         //        //
741         //        if ( !pChip.bHit && pChip.b可視 )
742         //        {
743         //            if ( this.txチップ != null )
744         //            {
745         //                this.txチップ.n透明度 = pChip.n透明度;
746         //            }
747         //            int[] y_base = {
748         //                演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, false ),          // 40
749         //                演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, true )            // 369
750         //            };                        // ドラム画面かギター画面かで変わる値
751         //            int offset = 0;                                           // ドラム画面かギター画面かで変わる値
752
753         //            const int WailingWidth  = (int) ( 20 * Scale.X );         // 4種全て同じ値
754         //            const int WailingHeight = (int) ( 50 * Scale.Y );         // 4種全て同じ値
755         //            const int baseTextureOffsetX = (int) ( 96 * Scale.X );    // ドラム画面かギター画面かで変わる値
756         //            const int baseTextureOffsetY = (int) (  0 * Scale.Y );    // ドラム画面かギター画面かで変わる値
757         //            const int drawX = (int) ( 140 * Scale.X );                                // 4種全て異なる値
758
759         //            const int numA = (int) ( 29 * Scale.Y );                          // ドラム画面かギター画面かで変わる値
760         //            int y = configIni.bReverse.Guitar ?
761         //                ( y_base[ 1 ] - (int) ( pChip.nバーからの距離dot.Guitar * Scale.Y ) ) :
762         //                ( y_base[ 0 ] + (int) ( pChip.nバーからの距離dot.Guitar * Scale.Y ) );
763         //            int numB = y - offset;                            // 4種全て同じ定義
764         //            int numC = 0;                                             // 4種全て同じ初期値
765         //            const int showRangeY1 = (int) ( 409 * Scale.Y );                          // ドラム画面かギター画面かで変わる値
766         //            if ( ( numB < ( showRangeY1 + numA ) ) && ( numB > -numA ) )      // 以下のロジックは4種全て同じ
767         //            {
768         //                int c = this.ctWailingチップ模様アニメ.n現在の値;
769         //                Rectangle rect = new Rectangle(
770         //                    baseTextureOffsetX + ( c * WailingWidth ),
771         //                    baseTextureOffsetY,
772         //                    WailingWidth,
773         //                    WailingHeight
774         //                );
775         //                if ( numB < numA )
776         //                {
777         //                    rect.Y += numA - numB;
778         //                    rect.Height -= numA - numB;
779         //                    numC = numA - numB;
780         //                }
781         //                if ( numB > ( showRangeY1 - numA ) )
782         //                {
783         //                    rect.Height -= numB - ( showRangeY1 - numA );
784         //                }
785         //                if ( ( rect.Bottom > rect.Top ) && ( this.txチップ != null ) )
786         //                {
787         //                    this.txチップ.t2D描画(
788         //                        CDTXMania.app.Device,
789         //                        drawX,
790         //                        ( ( y - numA ) + numC ),
791         //                        rect
792         //                    );
793         //                }
794         //            }
795         //        }
796         //    }
797         //}
798                 protected override void t進行描画_チップ_フィルイン( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
799                 {
800                         if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
801                         {
802                                 pChip.bHit = true;
803                         }
804 #if TEST_NOTEOFFMODE    // 2011.1.1 yyagi TEST
805                         switch ( pChip.n整数値 )
806                         {
807                                 case 0x04:      // HH消音あり(従来同等)
808                                         CDTXMania.DTX.b演奏で直前の音を消音する.HH = true;
809                                         break;
810                                 case 0x05:      // HH消音無し
811                                         CDTXMania.DTX.b演奏で直前の音を消音する.HH = false;
812                                         break;
813                                 case 0x06:      // ギター消音あり(従来同等)
814                                         CDTXMania.DTX.b演奏で直前の音を消音する.Guitar = true;
815                                         break;
816                                 case 0x07:      // ギター消音無し
817                                         CDTXMania.DTX.b演奏で直前の音を消音する.Guitar = false;
818                                         break;
819                                 case 0x08:      // ベース消音あり(従来同等)
820                                         CDTXMania.DTX.b演奏で直前の音を消音する.Bass = true;
821                                         break;
822                                 case 0x09:      // ベース消音無し
823                                         CDTXMania.DTX.b演奏で直前の音を消音する.Bass = false;
824                                         break;
825                         }
826 #endif
827
828                 }
829 #if false
830                 protected override void t進行描画・チップ・ベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
831                 {
832                         if ( configIni.bGuitar有効 )
833                         {
834                                 if ( configIni.bSudden.Bass )
835                                 {
836                                         pChip.b可視 = pChip.nバーからの距離dot.Bass < 200;
837                                 }
838                                 if ( configIni.bHidden.Bass && ( pChip.nバーからの距離dot.Bass < 100 ) )
839                                 {
840                                         pChip.b可視 = false;
841                                 }
842                                 if ( !pChip.bHit && pChip.b可視 )
843                                 {
844                                         int num8 = configIni.bReverse.Bass ? ( 0x171 - pChip.nバーからの距離dot.Bass ) : ( 40 + pChip.nバーからの距離dot.Bass );
845                                         if ( ( num8 > 0 ) && ( num8 < 0x199 ) )
846                                         {
847                                                 int num9 = this.ctチップ模様アニメ.Bass.n現在の値;
848                                                 if ( pChip.nチャンネル番号 == 160 )
849                                                 {
850                                                         if ( this.txチップ != null )
851                                                         {
852                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 480, num8 - 4, new Rectangle( 0, 0xc0 + ( ( num9 % 5 ) * 8 ), 0x67, 8 ) );
853                                                         }
854                                                 }
855                                                 else if ( !configIni.bLeft.Bass )
856                                                 {
857                                                         Rectangle rectangle3 = new Rectangle( 0, num9 * 8, 0x20, 8 );
858                                                         if ( ( ( pChip.nチャンネル番号 & 4 ) != 0 ) && ( this.txチップ != null ) )
859                                                         {
860                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 480, num8 - 4, rectangle3 );
861                                                         }
862                                                         rectangle3.X += 0x20;
863                                                         if ( ( ( pChip.nチャンネル番号 & 2 ) != 0 ) && ( this.txチップ != null ) )
864                                                         {
865                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 0x204, num8 - 4, rectangle3 );
866                                                         }
867                                                         rectangle3.X += 0x20;
868                                                         if ( ( ( pChip.nチャンネル番号 & 1 ) != 0 ) && ( this.txチップ != null ) )
869                                                         {
870                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 0x228, num8 - 4, rectangle3 );
871                                                         }
872                                                 }
873                                                 else
874                                                 {
875                                                         Rectangle rectangle4 = new Rectangle( 0, num9 * 8, 0x20, 8 );
876                                                         if ( ( ( pChip.nチャンネル番号 & 4 ) != 0 ) && ( this.txチップ != null ) )
877                                                         {
878                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 0x228, num8 - 4, rectangle4 );
879                                                         }
880                                                         rectangle4.X += 0x20;
881                                                         if ( ( ( pChip.nチャンネル番号 & 2 ) != 0 ) && ( this.txチップ != null ) )
882                                                         {
883                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 0x204, num8 - 4, rectangle4 );
884                                                         }
885                                                         rectangle4.X += 0x20;
886                                                         if ( ( ( pChip.nチャンネル番号 & 1 ) != 0 ) && ( this.txチップ != null ) )
887                                                         {
888                                                                 this.txチップ.t2D描画( CDTXMania.app.Device, 480, num8 - 4, rectangle4 );
889                                                         }
890                                                 }
891                                         }
892                                 }
893                                 if ( ( configIni.bAutoPlay.Bass && !pChip.bHit ) && ( pChip.nバーからの距離dot.Bass < 0 ) )
894                                 {
895                                         pChip.bHit = true;
896                                         if ( ( ( pChip.nチャンネル番号 & 4 ) != 0 ) || ( pChip.nチャンネル番号 == 0xA0 ) )
897                                         {
898                                                 this.actChipFireGB.Start( 3 );
899                                         }
900                                         if ( ( ( pChip.nチャンネル番号 & 2 ) != 0 ) || ( pChip.nチャンネル番号 == 0xA0 ) )
901                                         {
902                                                 this.actChipFireGB.Start( 4 );
903                                         }
904                                         if ( ( ( pChip.nチャンネル番号 & 1 ) != 0 ) || ( pChip.nチャンネル番号 == 0xA0 ) )
905                                         {
906                                                 this.actChipFireGB.Start( 5 );
907                                         }
908                                         this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, E楽器パート.BASS, dTX.nモニタを考慮した音量( E楽器パート.BASS ) );
909                                         this.r次にくるベースChip = null;
910                                         this.tチップのヒット処理( pChip.n発声時刻ms, pChip );
911                                 }
912                                 return;
913                         }
914                         if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
915                         {
916                                 pChip.bHit = true;
917                                 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, E楽器パート.BASS, dTX.nモニタを考慮した音量( E楽器パート.BASS ) );
918                         }
919                 }
920 #endif
921                 protected void t進行描画_チップ_ベース_ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
922                 {
923                         if ( configIni.bGuitar有効 )
924                         {
925                                 //
926                                 // 後日、以下の部分を何とかCStage演奏画面共通.csに移したい。
927                                 //
928                                 //if ( !pChip.bHit && pChip.b可視 )
929                                 //{
930                                 //    if ( this.txチップ != null )
931                                 //    {
932                                 //        this.txチップ.n透明度 = pChip.n透明度;
933                                 //    }
934                                 //    int[] y_base = {
935                                 //        演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, false ),            // 40
936                                 //        演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, true )                      // 369
937                                 //    };                        // ドラム画面かギター画面かで変わる値
938                                 //    int offset = 0;                                           // ドラム画面かギター画面かで変わる値
939
940                                 //    const int WailingWidth  = (int) ( 20 * Scale.X );         // 4種全て同じ値
941                                 //    const int WailingHeight = (int) ( 50 * Scale.Y );         // 4種全て同じ値
942                                 //    const int baseTextureOffsetX = (int) ( 96 * Scale.X );    // ドラム画面かギター画面かで変わる値
943                                 //    const int baseTextureOffsetY = (int) (  0 * Scale.Y );    // ドラム画面かギター画面かで変わる値
944                                 //    const int drawX =(int) ( 594 * Scale.X );                         // 4種全て異なる値
945
946                                 //    const int numA = (int) ( 29 * Scale.Y );                          // ドラム画面かギター画面かで変わる値
947                                 //    int y = configIni.bReverse.Bass ?
948                                 //        ( y_base[ 1 ] - (int) ( pChip.nバーからの距離dot.Bass * Scale.Y ) ) :
949                                 //        ( y_base[ 0 ] + (int) ( pChip.nバーからの距離dot.Bass * Scale.Y ) );
950                                 //    int numB = y - offset;                            // 4種全て同じ定義
951                                 //    int numC = 0;                                             // 4種全て同じ初期値
952                                 //    const int showRangeY1 = (int) ( 409 * Scale.Y );                          // ドラム画面かギター画面かで変わる値
953                                 //    if ( ( numB < ( showRangeY1 + numA ) ) && ( numB > -numA ) )      // 以下のロジックは4種全て同じ
954                                 //    {
955                                 //        int c = this.ctWailingチップ模様アニメ.n現在の値;
956                                 //        Rectangle rect = new Rectangle(
957                                 //            baseTextureOffsetX + ( c * WailingWidth ),
958                                 //            baseTextureOffsetY,
959                                 //            WailingWidth,
960                                 //            WailingHeight
961                                 //        );
962                                 //        if ( numB < numA )                                            // 上にスクロールして、見切れる場合
963                                 //        {
964                                 //            rect.Y += numA - numB;
965                                 //            rect.Height -= numA - numB;
966                                 //            numC = numA - numB;
967                                 //        }
968                                 //        if ( numB > ( showRangeY1 - numA ) )  // 下にスクロールして、見切れる場合
969                                 //        {
970                                 //            rect.Height -= numB - ( showRangeY1 - numA );
971                                 //        }
972                                 //        if ( ( rect.Bottom > rect.Top ) && ( this.txチップ != null ) )
973                                 //        {
974                                 //            this.txチップ.t2D描画(
975                                 //                CDTXMania.app.Device,
976                                 //                drawX,
977                                 //                ( ( y - numA ) + numC ),
978                                 //                rect
979                                 //            );
980                                 //        }
981                                 //    }
982                                 //}
983                                 base.t進行描画_チップ_ベース_ウェイリング( configIni, ref dTX, ref pChip, true );
984                         }
985                 }
986                 protected override void t進行描画_チップ_空打ち音設定_ドラム( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
987                 {
988                         if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
989                         {
990                                 pChip.bHit = true;
991                         }
992                 }
993                 protected override void t進行描画_チップ_小節線( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
994                 {
995                         int n小節番号plus1 = pChip.n発声位置 / 384;
996                         if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
997                         {
998                                 pChip.bHit = true;
999                                 this.actPlayInfo.n小節番号 = n小節番号plus1 - 1;
1000                                 if ( configIni.bWave再生位置自動調整機能有効 && ( bIsDirectSound || bUseOSTimer ) )
1001                                 {
1002                                         dTX.tWave再生位置自動補正();
1003                                 }
1004                         }
1005                         if ( ( pChip.b可視 && configIni.bGuitar有効 ) && ( this.txチップ != null ) )
1006                         {
1007                                 this.txチップ.n透明度 = 255;
1008                                 #region [ Guitarの小節線 ]
1009                                 int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, configIni.bReverse.Guitar );
1010                                 if ( configIni.bReverse.Guitar )
1011                                 {
1012                                         y = y - (int) ( pChip.nバーからの距離dot.Guitar ) - 1;
1013                                 }
1014                                 else
1015                                 {
1016                                         y = y + (int) ( pChip.nバーからの距離dot.Guitar ) - 1;
1017                                 }
1018                                 int n小節線消失距離dot;
1019                                 // Reverse時の小節線消失位置を、RGBボタンの真ん中程度に。
1020                                 // 非Reverse時の消失処理は、従来通りt進行描画・チップ()にお任せ。
1021                                 n小節線消失距離dot = configIni.bReverse.Guitar ?
1022                                         (int) ( -100 * Scale.Y ) :
1023                                         ( configIni.e判定位置.Guitar == E判定位置.標準 ) ? (int) ( -36 * Scale.Y ) : (int) ( -25 * Scale.Y );
1024
1025                                 if ( dTX.bチップがある.Guitar && ( 0 < y ) && ( y < 670 ) &&
1026                                         ( pChip.nバーからの距離dot.Guitar >= n小節線消失距離dot ) && configIni.nLaneDispType.Guitar < 2
1027                                         )
1028                                 {
1029                                         this.txチップ.t2D描画( CDTXMania.app.Device, 87, y,        new Rectangle( 0, 20, 196, 2 ) );
1030                                 }
1031                                 #endregion
1032
1033                                 #region [ Bassの小節線 ]
1034                                 y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, configIni.bReverse.Bass );
1035                                 if ( configIni.bReverse.Bass )
1036                                 {
1037                                         y = y - (int) ( pChip.nバーからの距離dot.Bass ) - 1;
1038                                 }
1039                                 else
1040                                 {
1041                                         y = y + (int) ( pChip.nバーからの距離dot.Bass ) - 1;
1042                                 }
1043                                 n小節線消失距離dot = configIni.bReverse.Bass ?
1044                                         (int) ( -100 * Scale.Y ) :
1045                                         ( configIni.e判定位置.Bass == E判定位置.標準 ) ? (int) ( -36 * Scale.Y ) : (int) ( -25 * Scale.Y ); 
1046                                 if ( dTX.bチップがある.Bass && ( 0 < y ) && ( y < 670 ) &&
1047                     ( pChip.nバーからの距離dot.Bass >= n小節線消失距離dot && configIni.nLaneDispType.Bass < 2 )
1048                                         )
1049                                 {
1050                                         this.txチップ.t2D描画( CDTXMania.app.Device, 955, y, new Rectangle( 0, 20, 196, 2 )        );
1051                                 }
1052                                 #endregion
1053                         }
1054                 }
1055
1056                 #endregion
1057         }
1058 }