2 using System.Collections.Generic;
\r
4 using System.Runtime;
\r
5 using System.Runtime.InteropServices;
\r
6 using System.Drawing;
\r
7 using System.Drawing.Imaging;
\r
9 using System.Diagnostics;
\r
10 using System.Threading;
\r
12 using SlimDX.Direct3D9;
\r
18 /// 演奏画面の共通クラス (ドラム演奏画面, ギター演奏画面の継承元)
\r
20 internal abstract class CStage演奏画面共通 : CStage
\r
24 public bool bAUTOでないチップが1つでもバーを通過した
\r
32 public void t演奏結果を格納する・ドラム( out CScoreIni.C演奏記録 Drums )
\r
34 Drums = new CScoreIni.C演奏記録();
\r
36 if ( CDTXMania.DTX.bチップがある.Drums && !CDTXMania.ConfigIni.bギタレボモード )
\r
38 Drums.nスコア = (long) this.actScore.Get( E楽器パート.DRUMS );
\r
39 Drums.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す( CDTXMania.DTX.LEVEL.Drums, CDTXMania.DTX.n可視チップ数.Drums, this.nヒット数・Auto含まない.Drums.Perfect, this.actCombo.n現在のコンボ数.Drums最高値, E楽器パート.DRUMS, bIsAutoPlay );
\r
40 Drums.db演奏型スキル値 = CScoreIni.t演奏型スキルを計算して返す( CDTXMania.DTX.n可視チップ数.Drums, this.nヒット数・Auto含まない.Drums.Perfect, this.nヒット数・Auto含まない.Drums.Great, this.nヒット数・Auto含まない.Drums.Good, this.nヒット数・Auto含まない.Drums.Poor, this.nヒット数・Auto含まない.Drums.Miss, E楽器パート.DRUMS, bIsAutoPlay );
\r
41 Drums.nPerfect数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数・Auto含む.Drums.Perfect : this.nヒット数・Auto含まない.Drums.Perfect;
\r
42 Drums.nGreat数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数・Auto含む.Drums.Great : this.nヒット数・Auto含まない.Drums.Great;
\r
43 Drums.nGood数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数・Auto含む.Drums.Good : this.nヒット数・Auto含まない.Drums.Good;
\r
44 Drums.nPoor数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数・Auto含む.Drums.Poor : this.nヒット数・Auto含まない.Drums.Poor;
\r
45 Drums.nMiss数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数・Auto含む.Drums.Miss : this.nヒット数・Auto含まない.Drums.Miss;
\r
46 Drums.nPerfect数・Auto含まない = this.nヒット数・Auto含まない.Drums.Perfect;
\r
47 Drums.nGreat数・Auto含まない = this.nヒット数・Auto含まない.Drums.Great;
\r
48 Drums.nGood数・Auto含まない = this.nヒット数・Auto含まない.Drums.Good;
\r
49 Drums.nPoor数・Auto含まない = this.nヒット数・Auto含まない.Drums.Poor;
\r
50 Drums.nMiss数・Auto含まない = this.nヒット数・Auto含まない.Drums.Miss;
\r
51 Drums.n最大コンボ数 = this.actCombo.n現在のコンボ数.Drums最高値;
\r
52 Drums.n全チップ数 = CDTXMania.DTX.n可視チップ数.Drums;
\r
53 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
55 Drums.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
57 Drums.bTight = CDTXMania.ConfigIni.bTight;
\r
58 for ( int i = 0; i < 3; i++ )
\r
60 Drums.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
61 Drums.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
62 Drums.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
63 Drums.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
64 Drums.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
65 Drums.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
66 Drums.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
68 Drums.eDark = CDTXMania.ConfigIni.eDark;
\r
69 Drums.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
71 Drums.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
72 Drums.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
73 Drums.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
74 Drums.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
75 Drums.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
76 Drums.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
77 Drums.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
78 Drums.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
79 Drums.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
80 Drums.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
81 Drums.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Drums;
\r
82 Drums.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Drums;
\r
83 Drums.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Drums;
\r
84 Drums.b演奏にマウスを使用した = this.b演奏にマウスを使った.Drums;
\r
85 Drums.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
86 Drums.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
87 Drums.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
88 Drums.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
89 Drums.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
90 Drums.最終更新日時 = DateTime.Now.ToString();
\r
91 Drums.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Drums );
\r
94 public void t演奏結果を格納する・ギター( out CScoreIni.C演奏記録 Guitar )
\r
96 Guitar = new CScoreIni.C演奏記録();
\r
98 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
100 Guitar.nスコア = (long) this.actScore.Get( E楽器パート.GUITAR );
\r
101 Guitar.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す( CDTXMania.DTX.LEVEL.Guitar, CDTXMania.DTX.n可視チップ数.Guitar, this.nヒット数・Auto含まない.Guitar.Perfect, this.actCombo.n現在のコンボ数.Guitar最高値, E楽器パート.GUITAR, bIsAutoPlay );
\r
102 Guitar.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 );
\r
103 Guitar.nPerfect数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Perfect : this.nヒット数・Auto含まない.Guitar.Perfect;
\r
104 Guitar.nGreat数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Great : this.nヒット数・Auto含まない.Guitar.Great;
\r
105 Guitar.nGood数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Good : this.nヒット数・Auto含まない.Guitar.Good;
\r
106 Guitar.nPoor数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Poor : this.nヒット数・Auto含まない.Guitar.Poor;
\r
107 Guitar.nMiss数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Miss : this.nヒット数・Auto含まない.Guitar.Miss;
\r
108 Guitar.nPerfect数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Perfect;
\r
109 Guitar.nGreat数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Great;
\r
110 Guitar.nGood数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Good;
\r
111 Guitar.nPoor数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Poor;
\r
112 Guitar.nMiss数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Miss;
\r
113 Guitar.n最大コンボ数 = this.actCombo.n現在のコンボ数.Guitar最高値;
\r
114 Guitar.n全チップ数 = CDTXMania.DTX.n可視チップ数.Guitar;
\r
115 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
117 Guitar.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
119 Guitar.bTight = CDTXMania.ConfigIni.bTight;
\r
120 for ( int i = 0; i < 3; i++ )
\r
122 Guitar.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
123 Guitar.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
124 Guitar.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
125 Guitar.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
126 Guitar.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
127 Guitar.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
128 Guitar.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
130 Guitar.eDark = CDTXMania.ConfigIni.eDark;
\r
131 Guitar.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
132 Guitar.n演奏速度分母 = 20;
\r
133 Guitar.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
134 Guitar.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
135 Guitar.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
136 Guitar.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
137 Guitar.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
138 Guitar.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
139 Guitar.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
140 Guitar.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
141 Guitar.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
142 Guitar.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
143 Guitar.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Guitar;
\r
144 Guitar.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Guitar;
\r
145 Guitar.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Guitar;
\r
146 Guitar.b演奏にマウスを使用した = this.b演奏にマウスを使った.Guitar;
\r
147 Guitar.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
148 Guitar.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
149 Guitar.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
150 Guitar.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
151 Guitar.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
152 Guitar.最終更新日時 = DateTime.Now.ToString();
\r
153 Guitar.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Guitar );
\r
156 public void t演奏結果を格納する・ベース( out CScoreIni.C演奏記録 Bass )
\r
158 Bass = new CScoreIni.C演奏記録();
\r
160 if ( CDTXMania.DTX.bチップがある.Bass )
\r
162 Bass.nスコア = (long) this.actScore.Get( E楽器パート.BASS );
\r
163 Bass.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す( CDTXMania.DTX.LEVEL.Bass, CDTXMania.DTX.n可視チップ数.Bass, this.nヒット数・Auto含まない.Bass.Perfect, this.actCombo.n現在のコンボ数.Bass最高値, E楽器パート.BASS, bIsAutoPlay );
\r
164 Bass.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 );
\r
165 Bass.nPerfect数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Perfect : this.nヒット数・Auto含まない.Bass.Perfect;
\r
166 Bass.nGreat数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Great : this.nヒット数・Auto含まない.Bass.Great;
\r
167 Bass.nGood数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Good : this.nヒット数・Auto含まない.Bass.Good;
\r
168 Bass.nPoor数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Poor : this.nヒット数・Auto含まない.Bass.Poor;
\r
169 Bass.nMiss数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Miss : this.nヒット数・Auto含まない.Bass.Miss;
\r
170 Bass.nPerfect数・Auto含まない = this.nヒット数・Auto含まない.Bass.Perfect;
\r
171 Bass.nGreat数・Auto含まない = this.nヒット数・Auto含まない.Bass.Great;
\r
172 Bass.nGood数・Auto含まない = this.nヒット数・Auto含まない.Bass.Good;
\r
173 Bass.nPoor数・Auto含まない = this.nヒット数・Auto含まない.Bass.Poor;
\r
174 Bass.nMiss数・Auto含まない = this.nヒット数・Auto含まない.Bass.Miss;
\r
175 Bass.n最大コンボ数 = this.actCombo.n現在のコンボ数.Bass最高値;
\r
176 Bass.n全チップ数 = CDTXMania.DTX.n可視チップ数.Bass;
\r
177 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
179 Bass.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
181 Bass.bTight = CDTXMania.ConfigIni.bTight;
\r
182 for ( int i = 0; i < 3; i++ )
\r
184 Bass.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
185 Bass.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
186 Bass.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
187 Bass.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
188 Bass.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
189 Bass.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
190 Bass.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
192 Bass.eDark = CDTXMania.ConfigIni.eDark;
\r
193 Bass.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
195 Bass.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
196 Bass.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
197 Bass.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
198 Bass.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
199 Bass.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
200 Bass.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
201 Bass.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
202 Bass.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
203 Bass.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
204 Bass.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
205 Bass.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Bass; // #24280 2011.1.29 yyagi
\r
206 Bass.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Bass; //
\r
207 Bass.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Bass; //
\r
208 Bass.b演奏にマウスを使用した = this.b演奏にマウスを使った.Bass; //
\r
209 Bass.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
210 Bass.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
211 Bass.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
212 Bass.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
213 Bass.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
214 Bass.最終更新日時 = DateTime.Now.ToString();
\r
215 Bass.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Bass );
\r
221 public override void On活性化()
\r
223 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.継続;
\r
224 this.n現在のトップChip = ( CDTXMania.DTX.listChip.Count > 0 ) ? 0 : -1;
\r
225 this.L最後に再生したHHの実WAV番号 = new List<int>( 16 );
\r
226 this.n最後に再生したHHのチャンネル番号 = 0;
\r
227 this.n最後に再生した実WAV番号.Guitar = -1;
\r
228 this.n最後に再生した実WAV番号.Bass = -1;
\r
229 for ( int i = 0; i < 50; i++ )
\r
231 this.n最後に再生したBGMの実WAV番号[ i ] = -1;
\r
233 this.r次にくるギターChip = null;
\r
234 this.r次にくるベースChip = null;
\r
235 for ( int j = 0; j < 10; j++ )
\r
237 this.r現在の空うちドラムChip[ j ] = null;
\r
239 this.r現在の空うちギターChip = null;
\r
240 this.r現在の空うちベースChip = null;
\r
241 for ( int k = 0; k < 3; k++ )
\r
243 //for ( int n = 0; n < 5; n++ )
\r
245 this.nヒット数・Auto含まない[ k ] = new CHITCOUNTOFRANK();
\r
246 this.nヒット数・Auto含む[ k ] = new CHITCOUNTOFRANK();
\r
248 this.queWailing[ k ] = new Queue<CDTX.CChip>();
\r
249 this.r現在の歓声Chip[ k ] = null;
\r
251 for ( int i = 0; i < 3; i++ )
\r
253 this.b演奏にキーボードを使った[ i ] = false;
\r
254 this.b演奏にジョイパッドを使った[ i ] = false;
\r
255 this.b演奏にMIDI入力を使った[ i ] = false;
\r
256 this.b演奏にマウスを使った[ i ] = false;
\r
258 this.bAUTOでないチップが1つでもバーを通過した = false;
\r
260 this.tステータスパネルの選択();
\r
263 this.nInputAdjustTimeMs.Drums = CDTXMania.ConfigIni.nInputAdjustTimeMs.Drums; // #23580 2011.1.3 yyagi
\r
264 this.nInputAdjustTimeMs.Guitar = CDTXMania.ConfigIni.nInputAdjustTimeMs.Guitar; // 2011.1.7 ikanick 修正
\r
265 this.nInputAdjustTimeMs.Bass = CDTXMania.ConfigIni.nInputAdjustTimeMs.Bass; //
\r
266 this.bIsAutoPlay = CDTXMania.ConfigIni.bAutoPlay; // #24239 2011.1.23 yyagi
\r
267 this.bIsAutoPlay.Guitar = CDTXMania.ConfigIni.bギターが全部オートプレイである;
\r
268 this.bIsAutoPlay.Bass = CDTXMania.ConfigIni.bベースが全部オートプレイである;
\r
269 // this.nRisky = CDTXMania.ConfigIni.nRisky; // #23559 2011.7.28 yyagi
\r
270 actGauge.Init( CDTXMania.ConfigIni.nRisky ); // #23559 2011.7.28 yyagi
\r
271 this.nPolyphonicSounds = CDTXMania.ConfigIni.nPoliphonicSounds;
\r
273 CDTXMania.Skin.tRemoveMixerAll(); // 効果音のストリームをミキサーから解除しておく
\r
275 #region [ 演奏開始前にmixer登録しておくべきサウンド(開幕してすぐに鳴らすことになるチップ音)を登録しておく ]
\r
276 foreach ( CDTX.CChip pChip in CDTXMania.DTX.listChip )
\r
278 // Debug.WriteLine( "CH=" + pChip.nチャンネル番号.ToString( "x2" ) + ", 整数値=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
279 if ( pChip.n発声時刻ms <= 0 )
\r
281 if ( pChip.nチャンネル番号 == 0xDA )
\r
284 // Debug.WriteLine( "first [DA] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
285 if ( CDTXMania.DTX.listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する
\r
287 CDTX.CWAV wc = CDTXMania.DTX.listWAV[ pChip.n整数値・内部番号 ];
\r
288 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
290 if ( wc.rSound[ i ] != null )
\r
292 CDTXMania.Sound管理.AddMixer( wc.rSound[ i ] );
\r
305 if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.24 yyagi Gt/Bsの譜面情報入れ替え
\r
307 CDTXMania.DTX.SwapGuitarBassInfos();
\r
309 this.sw = new Stopwatch();
\r
310 this.sw2 = new Stopwatch();
\r
311 // this.gclatencymode = GCSettings.LatencyMode;
\r
312 // GCSettings.LatencyMode = GCLatencyMode.LowLatency; // GCのgen2はせいぜい1演奏辺り1,2回しか発生しないので、ここでわざわざGC gen2は抑止しない
\r
314 public override void On非活性化()
\r
316 this.L最後に再生したHHの実WAV番号.Clear(); // #23921 2011.1.4 yyagi
\r
317 this.L最後に再生したHHの実WAV番号 = null; //
\r
318 for ( int i = 0; i < 3; i++ )
\r
320 this.queWailing[ i ].Clear();
\r
321 this.queWailing[ i ] = null;
\r
323 this.ctWailingチップ模様アニメ = null;
\r
324 this.ctチップ模様アニメ.Drums = null;
\r
325 this.ctチップ模様アニメ.Guitar = null;
\r
326 this.ctチップ模様アニメ.Bass = null;
\r
327 // GCSettings.LatencyMode = this.gclatencymode;
\r
330 public override void OnManagedリソースの作成()
\r
332 if ( !base.b活性化してない )
\r
334 this.t背景テクスチャの生成();
\r
336 this.txWailing枠 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay wailing cursor.png" ) );
\r
338 base.OnManagedリソースの作成();
\r
341 public override void OnManagedリソースの解放()
\r
343 if ( !base.b活性化してない )
\r
345 CDTXMania.tテクスチャの解放( ref this.tx背景 );
\r
347 CDTXMania.tテクスチャの解放( ref this.txWailing枠 );
\r
348 base.OnManagedリソースの解放();
\r
354 #region [ protected ]
\r
355 //-----------------
\r
356 protected class CHITCOUNTOFRANK
\r
362 public int Perfect;
\r
366 public int this[ int index ]
\r
373 return this.Perfect;
\r
387 throw new IndexOutOfRangeException();
\r
394 this.Perfect = value;
\r
398 this.Great = value;
\r
413 throw new IndexOutOfRangeException();
\r
418 [StructLayout( LayoutKind.Sequential )]
\r
419 protected struct STKARAUCHI
\r
421 public CDTX.CChip HH;
\r
422 public CDTX.CChip SD;
\r
423 public CDTX.CChip BD;
\r
424 public CDTX.CChip HT;
\r
425 public CDTX.CChip LT;
\r
426 public CDTX.CChip FT;
\r
427 public CDTX.CChip CY;
\r
428 public CDTX.CChip HHO;
\r
429 public CDTX.CChip RD;
\r
430 public CDTX.CChip LC;
\r
431 public CDTX.CChip this[ int index ]
\r
467 throw new IndexOutOfRangeException();
\r
513 throw new IndexOutOfRangeException();
\r
518 protected CAct演奏AVI actAVI;
\r
519 protected CAct演奏BGA actBGA;
\r
521 protected CAct演奏チップファイアGB actChipFireGB;
\r
522 protected CAct演奏Combo共通 actCombo;
\r
523 protected CAct演奏Danger共通 actDANGER;
\r
524 protected CActFIFOBlack actFI;
\r
525 protected CActFIFOBlack actFO;
\r
526 protected CActFIFOWhite actFOClear;
\r
527 protected CAct演奏ゲージ共通 actGauge;
\r
529 protected CAct演奏判定文字列共通 actJudgeString;
\r
530 protected CAct演奏DrumsレーンフラッシュD actLaneFlushD;
\r
531 protected CAct演奏レーンフラッシュGB共通 actLaneFlushGB;
\r
532 protected CAct演奏パネル文字列 actPanel;
\r
533 protected CAct演奏演奏情報 actPlayInfo;
\r
534 protected CAct演奏RGB共通 actRGB;
\r
535 protected CAct演奏スコア共通 actScore;
\r
536 protected CAct演奏ステージ失敗 actStageFailed;
\r
537 protected CAct演奏ステータスパネル共通 actStatusPanels;
\r
538 protected CAct演奏WailingBonus共通 actWailingBonus;
\r
539 protected CAct演奏スクロール速度 act譜面スクロール速度;
\r
540 protected bool bPAUSE;
\r
541 protected STDGBVALUE<bool> b演奏にMIDI入力を使った;
\r
542 protected STDGBVALUE<bool> b演奏にキーボードを使った;
\r
543 protected STDGBVALUE<bool> b演奏にジョイパッドを使った;
\r
544 protected STDGBVALUE<bool> b演奏にマウスを使った;
\r
545 protected CCounter ctWailingチップ模様アニメ;
\r
546 protected STDGBVALUE<CCounter> ctチップ模様アニメ;
\r
548 protected E演奏画面の戻り値 eフェードアウト完了時の戻り値;
\r
549 protected readonly int[,] nBGAスコープチャンネルマップ = new int[ , ] { { 0xc4, 0xc7, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xe0 }, { 4, 7, 0x55, 0x56, 0x57, 0x58, 0x59, 0x60 } };
\r
550 protected readonly int[] nチャンネル0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 8, 0 };
\r
551 protected readonly int[] nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 7, 0 };
\r
552 protected readonly int[] nパッド0Atoチャンネル0A = new int[] { 0x11, 0x12, 0x13, 20, 0x15, 0x17, 0x16, 0x18, 0x19, 0x1a };
\r
553 protected readonly int[] nパッド0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 8, 0 }; // パッド画像のヒット処理用
\r
554 protected readonly int[] nパッド0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 7, 0 };
\r
555 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数・Auto含まない;
\r
556 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数・Auto含む;
\r
557 protected int n現在のトップChip = -1;
\r
558 protected int[] n最後に再生したBGMの実WAV番号 = new int[ 50 ];
\r
559 protected int n最後に再生したHHのチャンネル番号;
\r
560 protected List<int> L最後に再生したHHの実WAV番号; // #23921 2011.1.4 yyagi: change "int" to "List<int>", for recording multiple wav No.
\r
561 protected STLANEVALUE<int> n最後に再生した実WAV番号; // #26388 2011.11.8 yyagi: change "n最後に再生した実WAV番号.GUITAR" and "n最後に再生した実WAV番号.BASS"
\r
562 // into "n最後に再生した実WAV番号";
\r
563 // protected int n最後に再生した実WAV番号.GUITAR;
\r
564 // protected int n最後に再生した実WAV番号.BASS;
\r
566 protected STDGBVALUE<Queue<CDTX.CChip>> queWailing;
\r
567 protected STDGBVALUE<CDTX.CChip> r現在の歓声Chip;
\r
568 protected CDTX.CChip r現在の空うちギターChip;
\r
569 protected STKARAUCHI r現在の空うちドラムChip;
\r
570 protected CDTX.CChip r現在の空うちベースChip;
\r
571 protected CDTX.CChip r次にくるギターChip;
\r
572 protected CDTX.CChip r次にくるベースChip;
\r
573 protected CTexture txWailing枠;
\r
574 protected CTexture txチップ;
\r
575 protected CTexture txヒットバー;
\r
577 protected CTexture tx背景;
\r
579 protected STDGBVALUE<int> nInputAdjustTimeMs; // #23580 2011.1.3 yyagi
\r
580 protected STAUTOPLAY bIsAutoPlay; // #24239 2011.1.23 yyagi
\r
581 // protected int nRisky_InitialVar, nRiskyTime; // #23559 2011.7.28 yyagi → CAct演奏ゲージ共通クラスに隠蔽
\r
582 protected int nPolyphonicSounds;
\r
584 protected Stopwatch sw; // 2011.6.13 最適化検討用のストップウォッチ
\r
585 protected Stopwatch sw2;
\r
586 // protected GCLatencyMode gclatencymode;
\r
588 protected E判定 e指定時刻からChipのJUDGEを返す( long nTime, CDTX.CChip pChip, int nInputAdjustTime )
\r
590 if ( pChip != null )
\r
592 pChip.nLag = (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature
\r
593 int nDeltaTime = Math.Abs( pChip.nLag );
\r
594 //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms));
\r
595 if ( nDeltaTime <= CDTXMania.nPerfect範囲ms )
\r
597 return E判定.Perfect;
\r
599 if ( nDeltaTime <= CDTXMania.nGreat範囲ms )
\r
603 if ( nDeltaTime <= CDTXMania.nGood範囲ms )
\r
607 if ( nDeltaTime <= CDTXMania.nPoor範囲ms )
\r
614 protected CDTX.CChip r空うちChip( E楽器パート part, Eパッド pad )
\r
622 if ( this.r現在の空うちドラムChip.HH != null )
\r
624 return this.r現在の空うちドラムChip.HH;
\r
626 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
628 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
630 return this.r現在の空うちドラムChip.HHO;
\r
632 if ( this.r現在の空うちドラムChip.HHO != null )
\r
634 return this.r現在の空うちドラムChip.HHO;
\r
637 return this.r現在の空うちドラムChip.LC;
\r
640 return this.r現在の空うちドラムChip.SD;
\r
643 return this.r現在の空うちドラムChip.BD;
\r
646 return this.r現在の空うちドラムChip.HT;
\r
649 if ( this.r現在の空うちドラムChip.LT != null )
\r
651 return this.r現在の空うちドラムChip.LT;
\r
653 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
655 return this.r現在の空うちドラムChip.FT;
\r
660 if ( this.r現在の空うちドラムChip.FT != null )
\r
662 return this.r現在の空うちドラムChip.FT;
\r
664 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
666 return this.r現在の空うちドラムChip.LT;
\r
671 if ( this.r現在の空うちドラムChip.CY != null )
\r
673 return this.r現在の空うちドラムChip.CY;
\r
675 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
677 return this.r現在の空うちドラムChip.RD;
\r
682 if ( this.r現在の空うちドラムChip.HHO != null )
\r
684 return this.r現在の空うちドラムChip.HHO;
\r
686 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
688 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
690 return this.r現在の空うちドラムChip.HH;
\r
692 if ( this.r現在の空うちドラムChip.HH != null )
\r
694 return this.r現在の空うちドラムChip.HH;
\r
697 return this.r現在の空うちドラムChip.LC;
\r
700 if ( this.r現在の空うちドラムChip.RD != null )
\r
702 return this.r現在の空うちドラムChip.RD;
\r
704 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
706 return this.r現在の空うちドラムChip.CY;
\r
711 if ( this.r現在の空うちドラムChip.LC != null )
\r
713 return this.r現在の空うちドラムChip.LC;
\r
715 if ( ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける ) && ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.全部共通 ) )
\r
719 if ( this.r現在の空うちドラムChip.HH != null )
\r
721 return this.r現在の空うちドラムChip.HH;
\r
723 return this.r現在の空うちドラムChip.HHO;
\r
727 case E楽器パート.GUITAR:
\r
728 return this.r現在の空うちギターChip;
\r
731 return this.r現在の空うちベースChip;
\r
735 protected CDTX.CChip r指定時刻に一番近いChip・ヒット未済問わず不可視考慮( long nTime, int nChannel, int nInputAdjustTime )
\r
738 //Trace.TraceInformation( "NTime={0}, nChannel={1:x2}", nTime, nChannel );
\r
739 nTime += nInputAdjustTime; // #24239 2011.1.23 yyagi InputAdjust
\r
741 int nIndex_InitialPositionSearchingToPast;
\r
742 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
747 int count = CDTXMania.DTX.listChip.Count;
\r
748 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
749 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
751 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
753 //int nIndex_NearestChip_Future; // = nIndex_InitialPositionSearchingToFuture;
\r
754 //while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
755 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
\r
757 CDTX.CChip chip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
758 if ( ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) ) )
\r
760 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
762 if ( chip.n発声時刻ms > nTime )
\r
766 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
768 continue; // ほんの僅かながら高速化
\r
770 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
772 if ( chip.n発声時刻ms > nTime )
\r
776 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
778 else if ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
780 if ( chip.n発声時刻ms > nTime )
\r
784 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
786 // nIndex_NearestChip_Future++;
\r
788 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
789 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
790 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
792 CDTX.CChip chip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
793 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
795 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
800 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
802 if ( ( 0x20 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0x28 ) )
\r
807 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
808 && ( ( 0xa0 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0xa8 ) ) )
\r
812 // nIndex_NearestChip_Past--;
\r
815 if ( nIndex_NearestChip_Future >= count )
\r
817 if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
821 else // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
824 return CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
827 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
830 return CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
832 // 検索対象が過去未来の双方に見つかったなら、より近い方を採用する
\r
833 CDTX.CChip nearestChip_Future = CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
834 CDTX.CChip nearestChip_Past = CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
835 int nDiffTime_Future = Math.Abs( (int) ( nTime - nearestChip_Future.n発声時刻ms ) );
\r
836 int nDiffTime_Past = Math.Abs( (int) ( nTime - nearestChip_Past.n発声時刻ms ) );
\r
837 if ( nDiffTime_Future >= nDiffTime_Past )
\r
840 return nearestChip_Past;
\r
843 return nearestChip_Future;
\r
845 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part )
\r
847 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, CDTXMania.ConfigIni.n手動再生音量, false, false );
\r
849 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量 )
\r
851 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, false, false );
\r
853 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ )
\r
855 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, bモニタ, false );
\r
857 protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
859 // mute sound (auto)
\r
868 if ( pChip != null )
\r
870 bool overwrite = false;
\r
876 int index = pChip.nチャンネル番号;
\r
877 if ( ( 0x11 <= index ) && ( index <= 0x1a ) )
\r
881 else if ( ( 0x31 <= index ) && ( index <= 0x3a ) )
\r
885 // mute sound (auto)
\r
886 // 4A: 84: HH (HO/HC)
\r
892 else if ( 0x84 == index ) // 仮に今だけ追加 HHは消音処理があるので overwriteフラグ系の処理は改めて不要
\r
896 else if ( ( 0x85 <= index ) && ( index <= 0x87 ) ) // 仮に今だけ追加
\r
899 int[] ch = { 0x16, 0x19, 0x1A };
\r
900 pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x85 ];
\r
901 index = pChip.nチャンネル番号 - 0x11;
\r
908 int nLane = this.nチャンネル0Atoレーン07[ index ];
\r
909 if ( ( nLane == 1 ) && // 今回演奏するのがHC or HO
\r
910 ( index == 0 || ( index == 7 && this.n最後に再生したHHのチャンネル番号 != 0x18 && this.n最後に再生したHHのチャンネル番号 != 0x38 ) )
\r
911 // HCを演奏するか、またはHO演奏&以前HO演奏でない&以前不可視HO演奏でない
\r
913 // #24772 2011.4.4 yyagi
\r
914 // == HH mute condition ==
\r
915 // current HH So, the mute logics are:
\r
916 // HC HO 1) All played HC/HOs should be queueing
\r
917 // last HH HC Yes Yes 2) If you aren't in "both current/last HH are HO", queued HH should be muted.
\r
920 // #23921 2011.1.4 yyagi: 2種類以上のオープンハイハットが発音済みだと、最後のHHOしか消せない問題に対応。
\r
921 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
922 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
925 for ( int i = 0; i < this.L最後に再生したHHの実WAV番号.Count; i++ ) // #23921 2011.1.4 yyagi
\r
927 // CDTXMania.DTX.tWavの再生停止(this.L最後に再生したHHの実WAV番号);
\r
928 CDTXMania.DTX.tWavの再生停止( this.L最後に再生したHHの実WAV番号[ i ] ); // #23921 yyagi ストック分全て消音する
\r
930 this.L最後に再生したHHの実WAV番号.Clear();
\r
931 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
934 //this.n最後に再生したHHの実WAV番号 = pChip.n整数値・内部番号;
\r
935 this.n最後に再生したHHのチャンネル番号 = pChip.nチャンネル番号;
\r
937 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
938 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
941 if ( index == 0 || index == 7 || index == 0x20 || index == 0x27 ) // #23921 HOまたは不可視HO演奏時はそのチップ番号をストックしておく
\r
942 { // #24772 HC, 不可視HCも消音キューに追加
\r
943 if ( this.L最後に再生したHHの実WAV番号.Count >= 16 ) // #23921 ただしストック数が16以上になるようなら、頭の1個を削って常に16未満に抑える
\r
944 { // (ストックが増えてList<>のrealloc()が発生するのを予防する)
\r
945 this.L最後に再生したHHの実WAV番号.RemoveAt( 0 );
\r
947 if ( !this.L最後に再生したHHの実WAV番号.Contains( pChip.n整数値・内部番号 ) ) // チップ音がまだストックされてなければ
\r
949 this.L最後に再生したHHの実WAV番号.Add( pChip.n整数値・内部番号 ); // ストックする
\r
952 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
957 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号[index] );
\r
959 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, nLane, n音量, bモニタ );
\r
960 this.n最後に再生した実WAV番号[ nLane ] = pChip.n整数値・内部番号; // nLaneでなくindexにすると、LC(1A-11=09)とギター(enumで09)がかぶってLC音が消されるので注意
\r
964 case E楽器パート.GUITAR:
\r
966 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
967 if (CDTXMania.DTX.b演奏で直前の音を消音する.Guitar) {
\r
969 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
970 #if TEST_NOTEOFFMODE
\r
973 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Guitar, n音量, bモニタ, b音程をずらして再生 );
\r
974 this.n最後に再生した実WAV番号.Guitar = pChip.n整数値・内部番号;
\r
979 #if TEST_NOTEOFFMODE
\r
980 if (CDTXMania.DTX.b演奏で直前の音を消音する.Bass) {
\r
982 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Bass );
\r
983 #if TEST_NOTEOFFMODE
\r
986 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Bass, n音量, bモニタ, b音程をずらして再生 );
\r
987 this.n最後に再生した実WAV番号.Bass = pChip.n整数値・内部番号;
\r
996 protected void tステータスパネルの選択()
\r
998 if ( CDTXMania.bコンパクトモード )
\r
1000 this.actStatusPanels.tラベル名からステータスパネルを決定する( null );
\r
1002 else if ( CDTXMania.stage選曲.r確定された曲 != null )
\r
1004 this.actStatusPanels.tラベル名からステータスパネルを決定する( CDTXMania.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.stage選曲.n確定された曲の難易度 ] );
\r
1007 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip )
\r
1009 return tチップのヒット処理( nHitTime, pChip, true );
\r
1011 protected abstract E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, bool bCorrectLane );
\r
1012 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode ) // E楽器パート screenmode
\r
1014 return tチップのヒット処理( nHitTime, pChip, screenmode, true );
\r
1016 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode, bool bCorrectLane )
\r
1018 pChip.bHit = true;
\r
1019 #region [メソッド化する前の記述(注釈化)]
\r
1020 // bool bPChipIsAutoPlay = false;
\r
1021 // bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
1022 // bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
1023 // bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
1024 // bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
1025 // bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
1026 // if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
1028 // if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
1030 // bPChipIsAutoPlay = true;
\r
1033 // else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
1035 ////Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
1036 ////Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
1037 // bPChipIsAutoPlay = true;
\r
1038 // if ( !bIsAutoPlay[ (int) Eレーン.GtPick ] ) bPChipIsAutoPlay = false;
\r
1041 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.GtR ] ) bPChipIsAutoPlay = false;
\r
1042 // else if ( bGtBsG && !bIsAutoPlay[ (int) Eレーン.GtG ] ) bPChipIsAutoPlay = false;
\r
1043 // else if ( bGtBsB && !bIsAutoPlay[ (int) Eレーン.GtB ] ) bPChipIsAutoPlay = false;
\r
1044 // else if ( bGtBsW && !bIsAutoPlay[ (int) Eレーン.GtW ] ) bPChipIsAutoPlay = false;
\r
1045 // else if ( bGtBsO &&
\r
1046 // ( !bIsAutoPlay[ (int) Eレーン.GtR] || !bIsAutoPlay[ (int) Eレーン.GtG] || !bIsAutoPlay[ (int) Eレーン.GtB] ) )
\r
1047 // bPChipIsAutoPlay = false;
\r
1050 // else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
1052 // bPChipIsAutoPlay = true;
\r
1053 // if ( !bIsAutoPlay[ (int) Eレーン.BsPick ] ) bPChipIsAutoPlay = false;
\r
1056 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.BsR ] ) bPChipIsAutoPlay = false;
\r
1057 // else if ( bGtBsG && bIsAutoPlay[ (int) Eレーン.BsG ] ) bPChipIsAutoPlay = false;
\r
1058 // else if ( bGtBsB && bIsAutoPlay[ (int) Eレーン.BsB ] ) bPChipIsAutoPlay = false;
\r
1059 // else if ( bGtBsW && bIsAutoPlay[ (int) Eレーン.BsW ] ) bPChipIsAutoPlay = false;
\r
1060 // else if ( bGtBsO &&
\r
1061 // ( !bIsAutoPlay[ (int) Eレーン.BsR ] || !bIsAutoPlay[ (int) Eレーン.BsG ] || !bIsAutoPlay[ (int) Eレーン.BsB ] ) )
\r
1062 // bPChipIsAutoPlay = false;
\r
1067 // this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1069 ////Trace.TraceInformation( "ch={0:x2}, flag={1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
1071 if ( pChip.e楽器パート == E楽器パート.UNKNOWN )
\r
1073 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1075 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1077 pChip.bIsAutoPlayed = bPChipIsAutoPlay; // 2011.6.10 yyagi
\r
1078 E判定 eJudgeResult = E判定.Auto;
\r
1079 switch ( pChip.e楽器パート )
\r
1081 case E楽器パート.DRUMS:
\r
1083 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Drums;
\r
1084 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1085 this.actJudgeString.Start( this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ], bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1089 case E楽器パート.GUITAR:
\r
1091 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1092 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1093 this.actJudgeString.Start( 10, bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1099 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1100 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1101 this.actJudgeString.Start( 11, bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1105 if ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) )
\r
1107 // this.t判定にあわせてゲージを増減する( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1108 actGauge.Damage( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1111 switch ( pChip.e楽器パート )
\r
1113 case E楽器パート.DRUMS:
\r
1114 switch ( eJudgeResult )
\r
1118 this.nヒット数・Auto含む.Drums.Miss++;
\r
1119 if ( !bPChipIsAutoPlay )
\r
1121 this.nヒット数・Auto含まない.Drums.Miss++;
\r
1125 this.nヒット数・Auto含む.Drums[ (int) eJudgeResult ]++;
\r
1126 if ( !bPChipIsAutoPlay )
\r
1128 this.nヒット数・Auto含まない.Drums[ (int) eJudgeResult ]++;
\r
1133 if ( CDTXMania.ConfigIni.bドラムが全部オートプレイである || !bPChipIsAutoPlay )
\r
1135 switch ( eJudgeResult )
\r
1140 this.actCombo.n現在のコンボ数.Drums++;
\r
1144 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1150 case E楽器パート.GUITAR:
\r
1152 int indexInst = (int) pChip.e楽器パート;
\r
1153 switch ( eJudgeResult )
\r
1157 this.nヒット数・Auto含む[ indexInst ].Miss++;
\r
1158 if ( !bPChipIsAutoPlay )
\r
1160 this.nヒット数・Auto含まない[ indexInst ].Miss++;
\r
1163 default: // #24068 2011.1.10 ikanick changed
\r
1164 // #24167 2011.1.16 yyagi changed
\r
1165 this.nヒット数・Auto含む[ indexInst ][ (int) eJudgeResult ]++;
\r
1166 if ( !bPChipIsAutoPlay )
\r
1168 this.nヒット数・Auto含まない[ indexInst ][ (int) eJudgeResult ]++;
\r
1172 switch ( eJudgeResult )
\r
1177 this.actCombo.n現在のコンボ数[ indexInst ]++;
\r
1181 this.actCombo.n現在のコンボ数[ indexInst ] = 0;
\r
1189 if ( ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) ) && ( eJudgeResult != E判定.Miss ) && ( eJudgeResult != E判定.Bad ) )
\r
1191 int nCombos = this.actCombo.n現在のコンボ数[ (int) pChip.e楽器パート ];
\r
1192 long nScoreDelta = 0;
\r
1193 long[] nComboScoreDelta = new long[] { 350L, 200L, 50L, 0L };
\r
1194 if ( ( nCombos <= 500 ) || ( eJudgeResult == E判定.Good ) )
\r
1196 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * nCombos;
\r
1198 else if ( ( eJudgeResult == E判定.Perfect ) || ( eJudgeResult == E判定.Great ) )
\r
1200 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * 500L;
\r
1202 this.actScore.Add( pChip.e楽器パート, bIsAutoPlay, nScoreDelta );
\r
1204 return eJudgeResult;
\r
1206 protected abstract void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part );
\r
1207 protected abstract void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, int nLane );
\r
1208 protected void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, E楽器パート screenmode )
\r
1210 this.tチップのヒット処理・BadならびにTight時のMiss( part, 0, screenmode );
\r
1212 protected void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, int nLane, E楽器パート screenmode )
\r
1214 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1215 //this.t判定にあわせてゲージを増減する( screenmode, part, E判定.Miss );
\r
1216 actGauge.Damage( screenmode, part, E判定.Miss );
\r
1219 case E楽器パート.DRUMS:
\r
1220 if ( ( nLane >= 0 ) && ( nLane <= 7 ) )
\r
1222 this.actJudgeString.Start( nLane, bIsAutoPlay[ nLane ] ? E判定.Auto : E判定.Miss, 999 );
\r
1224 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1227 case E楽器パート.GUITAR:
\r
1228 this.actJudgeString.Start( 10, E判定.Bad, 999 );
\r
1229 this.actCombo.n現在のコンボ数.Guitar = 0;
\r
1233 this.actJudgeString.Start( 11, E判定.Bad, 999 );
\r
1234 this.actCombo.n現在のコンボ数.Bass = 0;
\r
1242 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannelFlag, int nInputAdjustTime )
\r
1244 return this.r指定時刻に一番近い未ヒットChip( nTime, nChannelFlag, nInputAdjustTime, 0 );
\r
1246 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannel, int nInputAdjustTime, int n検索範囲時間ms )
\r
1249 //Trace.TraceInformation( "nTime={0}, nChannel={1:x2}, 現在のTop={2}", nTime, nChannel,CDTXMania.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms );
\r
1250 nTime += nInputAdjustTime;
\r
1252 int nIndex_InitialPositionSearchingToPast;
\r
1254 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
1259 int count = CDTXMania.DTX.listChip.Count;
\r
1260 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
1261 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
1263 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
1265 // int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToFuture;
\r
1266 // while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
1267 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++ )
\r
1269 CDTX.CChip chip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
1272 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
1274 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1276 if ( chip.n発声時刻ms > nTime )
\r
1280 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1284 else if ( ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1286 if ( chip.n発声時刻ms > nTime )
\r
1290 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1292 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1294 if ( chip.n発声時刻ms > nTime )
\r
1298 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1301 // nIndex_NearestChip_Future++;
\r
1303 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
1304 // while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
1305 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
1307 CDTX.CChip chip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
1308 if ( (!chip.bHit) &&
\r
1310 ( ( nChannel >= 0x11 ) && ( nChannel <= 0x1a ) &&
\r
1311 ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1315 ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) ||
\r
1316 ( ( ( nChannel >= 0x20 ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1320 ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) ||
\r
1321 ( ( ( nChannel >= 0xA0 ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1328 // nIndex_NearestChip_Past--;
\r
1330 if ( ( nIndex_NearestChip_Future >= count ) && ( nIndex_NearestChip_Past < 0 ) ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
1335 CDTX.CChip nearestChip; // = null; // 以下のifブロックのいずれかで必ずnearestChipには非nullが代入されるので、null初期化を削除
\r
1336 if ( nIndex_NearestChip_Future >= count ) // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
1338 nearestChip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
1339 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1341 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
1343 nearestChip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
1344 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1348 int nTimeDiff_Future = Math.Abs( (int) ( nTime - CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ].n発声時刻ms ) );
\r
1349 int nTimeDiff_Past = Math.Abs( (int) ( nTime - CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ].n発声時刻ms ) );
\r
1350 if ( nTimeDiff_Future < nTimeDiff_Past )
\r
1352 nearestChip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Future ];
\r
1353 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1357 nearestChip = CDTXMania.DTX.listChip[ nIndex_NearestChip_Past ];
\r
1358 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1361 nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1362 if ( ( n検索範囲時間ms > 0 ) && ( nTimeDiff > n検索範囲時間ms ) ) // チップは見つかったが、検索範囲時間外だった場合
\r
1368 return nearestChip;
\r
1371 protected CDTX.CChip r次に来る指定楽器Chipを更新して返す( E楽器パート inst )
\r
1373 switch ( (int) inst )
\r
1375 case (int)E楽器パート.GUITAR:
\r
1376 return r次にくるギターChipを更新して返す();
\r
1377 case (int)E楽器パート.BASS:
\r
1378 return r次にくるベースChipを更新して返す();
\r
1383 protected CDTX.CChip r次にくるギターChipを更新して返す()
\r
1385 int nInputAdjustTime = this.bIsAutoPlay.GtPick ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1386 this.r次にくるギターChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0x2f, nInputAdjustTime, 500 );
\r
1387 return this.r次にくるギターChip;
\r
1389 protected CDTX.CChip r次にくるベースChipを更新して返す()
\r
1391 int nInputAdjustTime = this.bIsAutoPlay.BsPick ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1392 this.r次にくるベースChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0xaf, nInputAdjustTime, 500 );
\r
1393 return this.r次にくるベースChip;
\r
1396 protected void ChangeInputAdjustTimeInPlaying( IInputDevice keyboard, int plusminus ) // #23580 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1398 int part, offset = plusminus;
\r
1399 if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) ) // Guitar InputAdjustTime
\r
1401 part = (int) E楽器パート.GUITAR;
\r
1403 else if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftAlt ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightAlt ) ) // Bass InputAdjustTime
\r
1405 part = (int) E楽器パート.BASS;
\r
1407 else // Drums InputAdjustTime
\r
1409 part = (int) E楽器パート.DRUMS;
\r
1411 if ( !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) && !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) )
\r
1416 this.nInputAdjustTimeMs[ part ] += offset;
\r
1417 if ( this.nInputAdjustTimeMs[ part ] > 0 )
\r
1419 this.nInputAdjustTimeMs[ part ] = 0;
\r
1421 else if ( this.nInputAdjustTimeMs[ part ] < -99 )
\r
1423 this.nInputAdjustTimeMs[ part ] = -99;
\r
1425 CDTXMania.ConfigIni.nInputAdjustTimeMs[ part ] = this.nInputAdjustTimeMs[ part ];
\r
1428 protected abstract void t入力処理・ドラム();
\r
1429 protected abstract void ドラムスクロール速度アップ();
\r
1430 protected abstract void ドラムスクロール速度ダウン();
\r
1431 protected void tキー入力()
\r
1433 IInputDevice keyboard = CDTXMania.Input管理.Keyboard;
\r
1434 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) &&
\r
1435 ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1436 { // shift+f1 (pause)
\r
1437 this.bPAUSE = !this.bPAUSE;
\r
1438 if ( this.bPAUSE )
\r
1440 CSound管理.rc演奏用タイマ.t一時停止();
\r
1441 CDTXMania.Timer.t一時停止();
\r
1442 CDTXMania.DTX.t全チップの再生一時停止();
\r
1446 CSound管理.rc演奏用タイマ.t再開();
\r
1447 CDTXMania.Timer.t再開();
\r
1448 CDTXMania.DTX.t全チップの再生再開();
\r
1451 if ( ( !this.bPAUSE && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1454 this.t入力処理・ギターベース( E楽器パート.GUITAR );
\r
1455 this.t入力処理・ギターベース( E楽器パート.BASS );
\r
1456 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1457 { // shift (+ctrl) + UpArrow (BGMAdjust)
\r
1458 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? 1 : 10 );
\r
1459 CDTXMania.DTX.tWave再生位置自動補正();
\r
1461 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1462 { // shift + DownArrow (BGMAdjust)
\r
1463 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? -1 : -10 );
\r
1464 CDTXMania.DTX.tWave再生位置自動補正();
\r
1466 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) )
\r
1467 { // UpArrow(scrollspeed up)
\r
1470 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) )
\r
1471 { // DownArrow (scrollspeed down)
\r
1474 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Delete ) )
\r
1475 { // del (debug info)
\r
1476 CDTXMania.ConfigIni.b演奏情報を表示する = !CDTXMania.ConfigIni.b演奏情報を表示する;
\r
1478 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.LeftArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1480 ChangeInputAdjustTimeInPlaying( keyboard, -1 );
\r
1482 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1484 ChangeInputAdjustTimeInPlaying( keyboard, +1 );
\r
1486 else if ( ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) && ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || CDTXMania.Pad.b押されたGB( Eパッド.FT ) ) )
\r
1487 { // escape (exit)
\r
1488 this.actFO.tフェードアウト開始();
\r
1489 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
\r
1490 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.演奏中断;
\r
1495 protected void t入力メソッド記憶( E楽器パート part )
\r
1497 if ( CDTXMania.Pad.st検知したデバイス.Keyboard )
\r
1499 this.b演奏にキーボードを使った[ (int) part ] = true;
\r
1501 if ( CDTXMania.Pad.st検知したデバイス.Joypad )
\r
1503 this.b演奏にジョイパッドを使った[ (int) part ] = true;
\r
1505 if ( CDTXMania.Pad.st検知したデバイス.MIDIIN )
\r
1507 this.b演奏にMIDI入力を使った[ (int) part ] = true;
\r
1509 if ( CDTXMania.Pad.st検知したデバイス.Mouse )
\r
1511 this.b演奏にマウスを使った[ (int) part ] = true;
\r
1516 protected abstract void t進行描画・AVI();
\r
1517 protected void t進行描画・AVI(int x, int y)
\r
1519 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bAVI有効 ) )
\r
1521 this.actAVI.t進行描画( x, y );
\r
1524 protected abstract void t進行描画・BGA();
\r
1525 protected void t進行描画・BGA(int x, int y)
\r
1527 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bBGA有効 ) )
\r
1529 this.actBGA.t進行描画( x, y );
\r
1532 protected abstract void t進行描画・DANGER();
\r
1533 protected void t進行描画・MIDIBGM()
\r
1535 if ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED )
\r
1537 CStage.Eフェーズ eフェーズid1 = base.eフェーズID;
\r
1540 protected void t進行描画・RGBボタン()
\r
1542 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
1544 this.actRGB.On進行描画();
\r
1547 protected void t進行描画・STAGEFAILED()
\r
1549 if ( ( ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED ) || ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( ( this.actStageFailed.On進行描画() != 0 ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) )
\r
1551 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.ステージ失敗;
\r
1552 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト;
\r
1553 this.actFO.tフェードアウト開始();
\r
1556 protected void t進行描画・WailingBonus()
\r
1558 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1560 this.actWailingBonus.On進行描画();
\r
1563 protected abstract void t進行描画・Wailing枠();
\r
1564 protected void t進行描画・Wailing枠(int GtWailingFrameX, int BsWailingFrameX, int GtWailingFrameY, int BsWailingFrameY)
\r
1566 if ( ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
1568 if ( this.txWailing枠 != null )
\r
1570 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
1572 this.txWailing枠.t2D描画( CDTXMania.app.Device, GtWailingFrameX, GtWailingFrameY );
\r
1574 if ( CDTXMania.DTX.bチップがある.Bass )
\r
1576 this.txWailing枠.t2D描画( CDTXMania.app.Device, BsWailingFrameX, BsWailingFrameY );
\r
1583 protected void t進行描画・チップファイアGB()
\r
1585 this.actChipFireGB.On進行描画();
\r
1587 protected abstract void t進行描画・パネル文字列();
\r
1588 protected void t進行描画・パネル文字列(int x, int y)
\r
1590 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1592 this.actPanel.t進行描画( x, y );
\r
1595 protected void tパネル文字列の設定()
\r
1597 this.actPanel.SetPanelString( string.IsNullOrEmpty( CDTXMania.DTX.PANEL ) ? CDTXMania.DTX.TITLE : CDTXMania.DTX.PANEL );
\r
1601 protected void t進行描画・ゲージ()
\r
1603 if ( ( ( CDTXMania.ConfigIni.eDark != Eダークモード.HALF ) && ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) ) && ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) )
\r
1605 this.actGauge.On進行描画();
\r
1608 protected void t進行描画・コンボ()
\r
1610 this.actCombo.On進行描画();
\r
1612 protected void t進行描画・スコア()
\r
1614 this.actScore.On進行描画();
\r
1616 protected void t進行描画・ステータスパネル()
\r
1618 this.actStatusPanels.On進行描画();
\r
1620 protected bool t進行描画・チップ( E楽器パート ePlayMode )
\r
1622 if ( ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED ) || ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1626 if ( ( this.n現在のトップChip == -1 ) || ( this.n現在のトップChip >= CDTXMania.DTX.listChip.Count ) )
\r
1630 if ( this.n現在のトップChip == -1 )
\r
1635 //double speed = 264.0; // BPM150の時の1小節の長さ[dot]
\r
1636 const double speed = 234.0; // BPM150の時の1小節の長さ[dot]
\r
1638 double ScrollSpeedDrums = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Drums + 1.0 ) * 0.5 * 37.5 * speed / 60000.0;
\r
1639 double ScrollSpeedGuitar = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Guitar + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1640 double ScrollSpeedBass = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Bass + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1642 CDTX dTX = CDTXMania.DTX;
\r
1643 CConfigIni configIni = CDTXMania.ConfigIni;
\r
1644 for ( int nCurrentTopChip = this.n現在のトップChip; nCurrentTopChip < dTX.listChip.Count; nCurrentTopChip++ )
\r
1646 CDTX.CChip pChip = dTX.listChip[ nCurrentTopChip ];
\r
1647 //Debug.WriteLine( "nCurrentTopChip=" + nCurrentTopChip + ", ch=" + pChip.nチャンネル番号.ToString("x2") + ", 発音位置=" + pChip.n発声位置 + ", 発声時刻ms=" + pChip.n発声時刻ms );
\r
1648 pChip.nバーからの距離dot.Drums = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedDrums );
\r
1649 pChip.nバーからの距離dot.Guitar = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedGuitar );
\r
1650 pChip.nバーからの距離dot.Bass = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedBass );
\r
1651 if ( Math.Min( Math.Min( pChip.nバーからの距離dot.Drums, pChip.nバーからの距離dot.Guitar ), pChip.nバーからの距離dot.Bass ) > 450 )
\r
1655 // if ( ( ( nCurrentTopChip == this.n現在のトップChip ) && ( pChip.nバーからの距離dot.Drums < -65 ) ) && pChip.bHit )
\r
1656 // #28026 2012.4.5 yyagi; 信心ワールドエンドの曲終了後リザルトになかなか行かない問題の修正
\r
1657 if ( ( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Drums < -65 ) && dTX.listChip[ this.n現在のトップChip ].bHit )
\r
1659 // nCurrentTopChip = ++this.n現在のトップChip;
\r
1660 ++this.n現在のトップChip;
\r
1664 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1666 int nInputAdjustTime = ( bPChipIsAutoPlay || (pChip.e楽器パート == E楽器パート.UNKNOWN) )? 0 : this.nInputAdjustTimeMs[ (int) pChip.e楽器パート ];
\r
1668 if ( ( ( pChip.e楽器パート != E楽器パート.UNKNOWN ) && !pChip.bHit ) &&
\r
1669 ( ( pChip.nバーからの距離dot.Drums < 0 ) && ( this.e指定時刻からChipのJUDGEを返す( CSound管理.rc演奏用タイマ.n現在時刻, pChip, nInputAdjustTime ) == E判定.Miss ) ) )
\r
1671 this.tチップのヒット処理( CSound管理.rc演奏用タイマ.n現在時刻, pChip );
\r
1673 switch ( pChip.nチャンネル番号 )
\r
1675 #region [ 01: BGM ]
\r
1677 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1679 pChip.bHit = true;
\r
1680 if ( configIni.bBGM音を発声する )
\r
1682 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
1687 #region [ 03: BPM変更 ]
\r
1688 case 0x03: // BPM変更
\r
1689 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1691 pChip.bHit = true;
\r
1692 this.actPlayInfo.dbBPM = ( pChip.n整数値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1696 #region [ 04, 07, 55, 56,57, 58, 59, 60:レイヤーBGA ]
\r
1697 case 0x04: // レイヤーBGA
\r
1705 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1707 pChip.bHit = true;
\r
1708 if ( configIni.bBGA有効 )
\r
1710 switch ( pChip.eBGA種別 )
\r
1712 case EBGA種別.BMPTEX:
\r
1713 if ( pChip.rBMPTEX != null )
\r
1715 this.actBGA.Start( pChip.nチャンネル番号, null, pChip.rBMPTEX, pChip.rBMPTEX.tx画像.sz画像サイズ.Width, pChip.rBMPTEX.tx画像.sz画像サイズ.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
\r
1720 if ( ( pChip.rBGA != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1722 this.actBGA.Start( pChip.nチャンネル番号, pChip.rBMP, pChip.rBMPTEX, pChip.rBGA.pt画像側右下座標.X - pChip.rBGA.pt画像側左上座標.X, pChip.rBGA.pt画像側右下座標.Y - pChip.rBGA.pt画像側左上座標.Y, 0, 0, pChip.rBGA.pt画像側左上座標.X, pChip.rBGA.pt画像側左上座標.Y, 0, 0, pChip.rBGA.pt表示座標.X, pChip.rBGA.pt表示座標.Y, 0, 0, 0 );
\r
1726 case EBGA種別.BGAPAN:
\r
1727 if ( ( pChip.rBGAPan != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1729 this.actBGA.Start( pChip.nチャンネル番号, pChip.rBMP, pChip.rBMPTEX, pChip.rBGAPan.sz開始サイズ.Width, pChip.rBGAPan.sz開始サイズ.Height, pChip.rBGAPan.sz終了サイズ.Width, pChip.rBGAPan.sz終了サイズ.Height, pChip.rBGAPan.pt画像側開始位置.X, pChip.rBGAPan.pt画像側開始位置.Y, pChip.rBGAPan.pt画像側終了位置.X, pChip.rBGAPan.pt画像側終了位置.Y, pChip.rBGAPan.pt表示側開始位置.X, pChip.rBGAPan.pt表示側開始位置.Y, pChip.rBGAPan.pt表示側終了位置.X, pChip.rBGAPan.pt表示側終了位置.Y, pChip.n総移動時間 );
\r
1734 if ( pChip.rBMP != null )
\r
1736 this.actBGA.Start( pChip.nチャンネル番号, pChip.rBMP, null, pChip.rBMP.n幅, pChip.rBMP.n高さ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
\r
1744 #region [ 08: BPM変更(拡張) ]
\r
1745 case 0x08: // BPM変更(拡張)
\r
1746 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1748 pChip.bHit = true;
\r
1749 if ( dTX.listBPM.ContainsKey( pChip.n整数値・内部番号 ) )
\r
1751 this.actPlayInfo.dbBPM = ( dTX.listBPM[ pChip.n整数値・内部番号 ].dbBPM値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1756 #region [ 11-1a: ドラム演奏 ]
\r
1757 case 0x11: // ドラム演奏
\r
1767 this.t進行描画・チップ・ドラムス( configIni, ref dTX, ref pChip );
\r
1770 #region [ 1f: フィルインサウンド(ドラム) ]
\r
1771 case 0x1f: // フィルインサウンド(ドラム)
\r
1772 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1774 pChip.bHit = true;
\r
1775 this.r現在の歓声Chip.Drums = pChip;
\r
1779 #region [ 20-27: ギター演奏 ]
\r
1780 case 0x20: // ギター演奏
\r
1788 this.t進行描画・チップ・ギターベース( configIni, ref dTX, ref pChip, E楽器パート.GUITAR );
\r
1791 #region [ 28: ウェイリング(ギター) ]
\r
1792 case 0x28: // ウェイリング(ギター)
\r
1793 this.t進行描画・チップ・ギター・ウェイリング( configIni, ref dTX, ref pChip );
\r
1796 #region [ 2f: ウェイリングサウンド(ギター) ]
\r
1797 case 0x2f: // ウェイリングサウンド(ギター)
\r
1798 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
1800 pChip.bHit = true;
\r
1801 this.r現在の歓声Chip.Guitar = pChip;
\r
1805 #region [ 31-3a: 不可視チップ配置(ドラム) ]
\r
1806 case 0x31: // 不可視チップ配置(ドラム)
\r
1816 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1818 pChip.bHit = true;
\r
1822 #region [ 50: 小節線 ]
\r
1825 this.t進行描画・チップ・小節線( configIni, ref dTX, ref pChip );
\r
1829 #region [ 51: 拍線 ]
\r
1831 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1833 pChip.bHit = true;
\r
1835 if ( ( ePlayMode == E楽器パート.DRUMS ) && ( configIni.eDark != Eダークモード.FULL ) && pChip.b可視 && ( this.txチップ != null ) )
\r
1837 this.txチップ.t2D描画( CDTXMania.app.Device, 0x23, configIni.bReverse.Drums ? ( ( 0x38 + pChip.nバーからの距離dot.Drums ) - 1 ) : ( ( 0x1a6 - pChip.nバーからの距離dot.Drums ) - 1 ), new Rectangle( 0, 0x1bf, 0x128, 1 ) );
\r
1841 #region [ 52: MIDIコーラス ]
\r
1842 case 0x52: // MIDIコーラス
\r
1843 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1845 pChip.bHit = true;
\r
1849 #region [ 53: フィルイン ]
\r
1850 case 0x53: // フィルイン
\r
1851 this.t進行描画・チップ・フィルイン( configIni, ref dTX, ref pChip );
\r
1854 #region [ 54: 動画再生 ]
\r
1855 case 0x54: // 動画再生
\r
1856 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1858 pChip.bHit = true;
\r
1859 if ( configIni.bAVI有効 )
\r
1861 switch ( pChip.eAVI種別 )
\r
1864 if ( pChip.rAVI != null )
\r
1866 this.actAVI.Start( pChip.nチャンネル番号, pChip.rAVI, 0x116, 0x163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pChip.n発声時刻ms );
\r
1870 case EAVI種別.AVIPAN:
\r
1871 if ( pChip.rAVIPan != null )
\r
1873 this.actAVI.Start( pChip.nチャンネル番号, pChip.rAVI, pChip.rAVIPan.sz開始サイズ.Width, pChip.rAVIPan.sz開始サイズ.Height, pChip.rAVIPan.sz終了サイズ.Width, pChip.rAVIPan.sz終了サイズ.Height, pChip.rAVIPan.pt動画側開始位置.X, pChip.rAVIPan.pt動画側開始位置.Y, pChip.rAVIPan.pt動画側終了位置.X, pChip.rAVIPan.pt動画側終了位置.Y, pChip.rAVIPan.pt表示側開始位置.X, pChip.rAVIPan.pt表示側開始位置.Y, pChip.rAVIPan.pt表示側終了位置.X, pChip.rAVIPan.pt表示側終了位置.Y, pChip.n総移動時間, pChip.n発声時刻ms );
\r
1881 #region [ 61-92: 自動再生(BGM, SE) ]
\r
1885 case 0x64: // 自動再生(BGM, SE)
\r
1908 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1910 pChip.bHit = true;
\r
1911 if ( configIni.bBGM音を発声する )
\r
1913 dTX.tWavの再生停止( this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] );
\r
1914 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, ( int ) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
1915 this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] = pChip.n整数値・内部番号;
\r
1922 #region [ 84-89: 仮: override sound ] // #26338 2011.11.8 yyagi
\r
1923 case 0x84: // HH (HO/HC)
\r
1927 case 0x88: // Guitar
\r
1928 case 0x89: // Bass
\r
1929 // mute sound (auto)
\r
1930 // 4A: 84: HH (HO/HC)
\r
1937 // CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
1938 // CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, 8, n音量, bモニタ, b音程をずらして再生 );
\r
1939 // this.n最後に再生した実WAV番号.Guitar = pChip.n整数値・内部番号;
\r
1941 // protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
1942 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1944 pChip.bHit = true;
\r
1945 E楽器パート[] p = { E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.GUITAR, E楽器パート.BASS };
\r
1947 E楽器パート pp = p[ pChip.nチャンネル番号 - 0x84 ];
\r
1949 // if ( pp == E楽器パート.DRUMS ) { // pChip.nチャンネル番号= ..... HHとか、ドラムの場合は変える。
\r
1951 // int[] ch = { 0x11, 0x16, 0x19, 0x1A };
\r
1952 // pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x84 ];
\r
1954 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, pp, dTX.nモニタを考慮した音量( pp ) );
\r
1959 #region [ a0-a7: ベース演奏 ]
\r
1960 case 0xa0: // ベース演奏
\r
1968 this.t進行描画・チップ・ギターベース( configIni, ref dTX, ref pChip, E楽器パート.BASS );
\r
1971 #region [ a8: ウェイリング(ベース) ]
\r
1972 case 0xa8: // ウェイリング(ベース)
\r
1973 this.t進行描画・チップ・ベース・ウェイリング( configIni, ref dTX, ref pChip );
\r
1976 #region [ af: ウェイリングサウンド(ベース) ]
\r
1977 case 0xaf: // ウェイリングサウンド(ベース)
\r
1978 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
1980 pChip.bHit = true;
\r
1981 this.r現在の歓声Chip.Bass = pChip;
\r
1985 #region [ b1-b9, bc: 空打ち音設定(ドラム) ]
\r
1986 case 0xb1: // 空打ち音設定(ドラム)
\r
1996 this.t進行描画・チップ・空打ち音設定・ドラム( configIni, ref dTX, ref pChip );
\r
1999 #region [ ba: 空打ち音設定(ギター) ]
\r
2000 case 0xba: // 空打ち音設定(ギター)
\r
2001 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2003 pChip.bHit = true;
\r
2004 this.r現在の空うちギターChip = pChip;
\r
2005 pChip.nチャンネル番号 = 0x20;
\r
2009 #region [ bb: 空打ち音設定(ベース) ]
\r
2010 case 0xbb: // 空打ち音設定(ベース)
\r
2011 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
2013 pChip.bHit = true;
\r
2014 this.r現在の空うちベースChip = pChip;
\r
2015 pChip.nチャンネル番号 = 0xA0;
\r
2019 #region [ c4, c7, d5-d9, e0: BGA画像入れ替え ]
\r
2023 case 0xd6: // BGA画像入れ替え
\r
2028 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2030 pChip.bHit = true;
\r
2031 if ( ( configIni.bBGA有効 && ( pChip.eBGA種別 == EBGA種別.BMP ) ) || ( pChip.eBGA種別 == EBGA種別.BMPTEX ) )
\r
2033 for ( int i = 0; i < 8; i++ )
\r
2035 if ( this.nBGAスコープチャンネルマップ[ 0, i ] == pChip.nチャンネル番号 )
\r
2037 this.actBGA.ChangeScope( this.nBGAスコープチャンネルマップ[ 1, i ], pChip.rBMP, pChip.rBMPTEX );
\r
2044 #region [ da: ミキサーへチップ音追加 ]
\r
2046 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2048 Debug.WriteLine( "[DA(AddMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2049 pChip.bHit = true;
\r
2050 if ( CDTXMania.DTX.listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する
\r
2052 CDTX.CWAV wc = CDTXMania.DTX.listWAV[ pChip.n整数値・内部番号 ];
\r
2053 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2055 if ( wc.rSound[ i ] != null )
\r
2057 CDTXMania.Sound管理.AddMixer( wc.rSound[ i ] );
\r
2064 #region [ db: ミキサーからチップ音削除 ]
\r
2066 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2068 Debug.WriteLine( "[DB(RemoveMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2069 pChip.bHit = true;
\r
2070 if ( CDTXMania.DTX.listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する
\r
2072 CDTX.CWAV wc = CDTXMania.DTX.listWAV[ pChip.n整数値・内部番号 ];
\r
2073 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2075 if ( wc.rSound[ i ] != null )
\r
2077 CDTXMania.Sound管理.RemoveMixer( wc.rSound[ i ] );
\r
2084 #region [ その他(未定義) ]
\r
2086 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2088 pChip.bHit = true;
\r
2097 private bool bCheckAutoPlay( CDTX.CChip pChip )
\r
2099 bool bPChipIsAutoPlay = false;
\r
2100 bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2101 bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2102 bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2103 bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2104 bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2106 // ( ( pChip.e楽器パート == E楽器パート.DRUMS ) && bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ) ||
\r
2107 // ( ( pChip.e楽器パート == E楽器パート.GUITAR ) && bIsAutoPlay.Guitar ) ) ||
\r
2108 // ( ( pChip.e楽器パート == E楽器パート.BASS ) && bIsAutoPlay.Bass )
\r
2110 //// if ((pChip.e楽器パート == E楽器パート.DRUMS) && bIsAutoPlay[this.nチャンネル0Atoレーン07[pChip.nチャンネル番号 - 0x11]])
\r
2112 // bPChipIsAutoPlay = true;
\r
2114 if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
2116 if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
2118 bPChipIsAutoPlay = true;
\r
2121 else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
2123 //Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
2124 //Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
2125 bPChipIsAutoPlay = true;
\r
2126 if ( bIsAutoPlay[ (int) Eレーン.GtPick ] == false ) bPChipIsAutoPlay = false;
\r
2129 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.GtR ] == false ) bPChipIsAutoPlay = false;
\r
2130 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.GtG ] == false ) bPChipIsAutoPlay = false;
\r
2131 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.GtB ] == false ) bPChipIsAutoPlay = false;
\r
2132 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.GtW ] == false ) bPChipIsAutoPlay = false;
\r
2133 else if ( bGtBsO == true &&
\r
2134 ( bIsAutoPlay[ (int) Eレーン.GtR ] == false || bIsAutoPlay[ (int) Eレーン.GtG ] == false || bIsAutoPlay[ (int) Eレーン.GtB ] == false ) )
\r
2135 bPChipIsAutoPlay = false;
\r
2137 //Trace.TraceInformation( "{0:x2}: {1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
2139 else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
2141 bPChipIsAutoPlay = true;
\r
2142 if ( bIsAutoPlay[ (int) Eレーン.BsPick ] == false ) bPChipIsAutoPlay = false;
\r
2145 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.BsR ] == false ) bPChipIsAutoPlay = false;
\r
2146 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.BsG ] == false ) bPChipIsAutoPlay = false;
\r
2147 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.BsB ] == false ) bPChipIsAutoPlay = false;
\r
2148 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.BsW ] == false ) bPChipIsAutoPlay = false;
\r
2149 else if ( bGtBsO == true &&
\r
2150 ( bIsAutoPlay[ (int) Eレーン.BsR ] == false || bIsAutoPlay[ (int) Eレーン.BsG ] == false || bIsAutoPlay[ (int) Eレーン.BsB ] == false ) )
\r
2151 bPChipIsAutoPlay = false;
\r
2154 return bPChipIsAutoPlay;
\r
2157 protected abstract void t進行描画・チップ・ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2158 //protected abstract void t進行描画・チップ・ギター( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2159 protected abstract void t進行描画・チップ・ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst );
\r
2161 protected void t進行描画・チップ・ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst,
\r
2162 int barYNormal, int barYReverse, int showRangeY0, int showRangeY1, int openXg, int openXb,
\r
2163 int rectOpenOffsetX, int rectOpenOffsetY, int openChipWidth, int chipHeight,
\r
2164 int chipWidth, int guitarNormalX, int guitarLeftyX, int bassNormalX, int bassLeftyX, int drawDeltaX, int chipTexDeltaX )
\r
2166 int instIndex = (int) inst;
\r
2167 if ( configIni.bGuitar有効 )
\r
2169 #region [ Hidden/Sudden処理 ]
\r
2170 if ( configIni.bSudden[ instIndex ] )
\r
2172 pChip.b可視 = pChip.nバーからの距離dot[ instIndex ] < 200;
\r
2174 if ( configIni.bHidden[ instIndex ] && ( pChip.nバーからの距離dot[ instIndex ] < 100 ) )
\r
2176 pChip.b可視 = false;
\r
2180 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2181 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2182 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2183 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2184 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2186 #region [ chip描画 ]
\r
2187 int OPEN = ( inst == E楽器パート.GUITAR ) ? 0x20 : 0xA0;
\r
2188 if ( !pChip.bHit && pChip.b可視 )
\r
2190 int y = configIni.bReverse[ instIndex ] ? ( barYReverse - pChip.nバーからの距離dot[ instIndex ] ) : ( barYNormal + pChip.nバーからの距離dot[ instIndex ] );
\r
2191 if ( ( showRangeY0 < y ) && ( y < showRangeY1 ) )
\r
2193 if ( this.txチップ != null )
\r
2195 int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[ instIndex ].n現在の値;
\r
2196 if ( pChip.nチャンネル番号 == OPEN )
\r
2198 int xo = ( inst == E楽器パート.GUITAR ) ? openXg : openXb;
\r
2199 this.txチップ.t2D描画( CDTXMania.app.Device, xo, y - 2, new Rectangle( rectOpenOffsetX, rectOpenOffsetY + ( ( nアニメカウンタ現在の値 % 5 ) * chipHeight ), openChipWidth, chipHeight ) );
\r
2201 Rectangle rc = new Rectangle( rectOpenOffsetX, nアニメカウンタ現在の値 * chipHeight, chipWidth, chipHeight );
\r
2203 if ( inst == E楽器パート.GUITAR )
\r
2205 x = ( configIni.bLeft.Guitar ) ? guitarLeftyX : guitarNormalX;
\r
2209 x = ( configIni.bLeft.Bass ) ? bassLeftyX : bassNormalX;
\r
2211 int deltaX = ( configIni.bLeft[ instIndex ] ) ? -drawDeltaX : +drawDeltaX;
\r
2213 //Trace.TraceInformation( "chip={0:x2}, E楽器パート={1}, x={2}", pChip.nチャンネル番号, inst, x );
\r
2216 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - chipHeight / 2, rc );
\r
2218 rc.X += chipTexDeltaX;
\r
2222 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - chipHeight / 2, rc );
\r
2224 rc.X += chipTexDeltaX;
\r
2228 this.txチップ.t2D描画( CDTXMania.app.Device, x, y - chipHeight / 2, rc );
\r
2234 //if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2235 if ( ( !pChip.bHit ) && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
\r
2237 int lo = ( inst == E楽器パート.GUITAR ) ? 0 : 3; // lane offset
\r
2238 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
2239 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
2240 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
2241 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
2242 bool pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R );
\r
2243 bool pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G );
\r
2244 bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );
\r
2246 #region [ Chip Fire effects ]
\r
2247 bool bSuccessOPEN = bChipIsO && ( autoR || !pushingR ) && ( autoG || !pushingG ) && ( autoB || !pushingB );
\r
2248 if ( ( bChipHasR && ( autoR || pushingR ) && autoPick ) || bSuccessOPEN )
\r
2250 this.actChipFireGB.Start( 0 + lo );
\r
2252 if ( ( bChipHasG && ( autoG || pushingG ) && autoPick ) || bSuccessOPEN )
\r
2254 this.actChipFireGB.Start( 1 + lo );
\r
2256 if ( ( bChipHasB && ( autoB || pushingB ) && autoPick ) || bSuccessOPEN )
\r
2258 this.actChipFireGB.Start( 2 + lo );
\r
2263 bool bMiss = true;
\r
2264 if ( bChipHasR == autoR && bChipHasG == autoG && bChipHasB == autoB ) // autoレーンとチップレーン一致時はOK
\r
2265 { // この条件を加えないと、同時に非autoレーンを押下している時にNGとなってしまう。
\r
2268 else if ( ( autoR || ( bChipHasR == pushingR ) ) && ( autoG || ( bChipHasG == pushingG ) ) && ( autoB || ( bChipHasB == pushingB ) ) )
\r
2269 // ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
\r
2273 else if ( ( ( bChipIsO == true ) && ( !pushingR | autoR ) && ( !pushingG | autoG ) && ( !pushingB | autoB ) ) ) // OPEN時
\r
2277 pChip.bHit = true;
\r
2278 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ), false, bMiss );
\r
2279 this.r次にくるギターChip = null;
\r
2282 this.tチップのヒット処理( pChip.n発声時刻ms, pChip );
\r
2286 pChip.nLag = 0; // tチップのヒット処理()の引数最後がfalseの時はpChip.nLagを計算しないため、ここでAutoPickかつMissのLag=0を代入
\r
2287 this.tチップのヒット処理( pChip.n発声時刻ms, pChip, false );
\r
2289 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
2290 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip( pChip.n発声時刻ms, chWailingChip, this.nInputAdjustTimeMs[ instIndex ], 140 );
\r
2291 if ( item != null && !bMiss )
\r
2293 this.queWailing[ instIndex ].Enqueue( item );
\r
2298 } // end of "if configIni.bGuitar有効"
\r
2299 if ( !pChip.bHit && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) ) // Guitar/Bass無効の場合は、自動演奏する
\r
2301 pChip.bHit = true;
\r
2302 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
\r
2307 protected virtual void t進行描画・チップ・ギターベース・ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst )
\r
2309 int indexInst = (int) inst;
\r
2310 if ( configIni.bGuitar有効 )
\r
2312 #region [ Sudden/Hidden処理 ]
\r
2313 if ( configIni.bSudden[indexInst] )
\r
2315 pChip.b可視 = pChip.nバーからの距離dot[indexInst] < 200;
\r
2317 if ( configIni.bHidden[indexInst] && ( pChip.nバーからの距離dot[indexInst] < 100 ) )
\r
2319 pChip.b可視 = false;
\r
2323 // ここにチップ更新処理が入る(overrideで入れる)。といっても座標とチップサイズが違うだけで処理はまるまる同じ。
\r
2325 if ( !pChip.bHit && ( pChip.nバーからの距離dot[indexInst] < 0 ) )
\r
2327 if ( pChip.nバーからの距離dot[indexInst] < -234 ) // #25253 2011.5.29 yyagi: Don't set pChip.bHit=true for wailing at once. It need to 1sec-delay (234pix per 1sec).
\r
2329 pChip.bHit = true;
\r
2331 bool autoW = ( inst == E楽器パート.GUITAR ) ? configIni.bAutoPlay.GtW : configIni.bAutoPlay.BsW;
\r
2332 //if ( configIni.bAutoPlay[ ((int) Eレーン.Guitar - 1) + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
2335 // pChip.bHit = true; // #25253 2011.5.29 yyagi: Set pChip.bHit=true if autoplay.
\r
2336 // this.actWailingBonus.Start( inst, this.r現在の歓声Chip[indexInst] );
\r
2337 // #23886 2012.5.22 yyagi; To support auto Wailing; Don't do wailing for ALL wailing chips. Do wailing for queued wailing chip.
\r
2338 // wailing chips are queued when 1) manually wailing and not missed at that time 2) AutoWailing=ON and not missed at that time
\r
2339 long nTimeStamp_Wailed = pChip.n発声時刻ms + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2340 DoWailingFromQueue( inst, nTimeStamp_Wailed, autoW );
\r
2345 pChip.bHit = true;
\r
2347 protected virtual void t進行描画・チップ・ギター・ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
\r
2349 t進行描画・チップ・ギターベース・ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.GUITAR );
\r
2351 protected abstract void t進行描画・チップ・フィルイン( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2352 protected abstract void t進行描画・チップ・小節線( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2353 //protected abstract void t進行描画・チップ・ベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2354 protected virtual void t進行描画・チップ・ベース・ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
\r
2356 t進行描画・チップ・ギターベース・ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.BASS );
\r
2358 protected abstract void t進行描画・チップ・空打ち音設定・ドラム( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2359 protected void t進行描画・チップアニメ()
\r
2361 for ( int i = 0; i < 3; i++ ) // 0=drums, 1=guitar, 2=bass
\r
2363 if ( this.ctチップ模様アニメ[ i ] != null )
\r
2365 this.ctチップ模様アニメ[ i ].t進行Loop();
\r
2368 if ( this.ctWailingチップ模様アニメ != null )
\r
2370 this.ctWailingチップ模様アニメ.t進行Loop();
\r
2374 protected bool t進行描画・フェードイン・アウト()
\r
2376 switch ( base.eフェーズID )
\r
2378 case CStage.Eフェーズ.共通_フェードイン:
\r
2379 if ( this.actFI.On進行描画() != 0 )
\r
2381 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
\r
2385 case CStage.Eフェーズ.共通_フェードアウト:
\r
2386 case CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト:
\r
2387 if ( this.actFO.On進行描画() != 0 )
\r
2393 case CStage.Eフェーズ.演奏_STAGE_CLEAR_フェードアウト:
\r
2394 if ( this.actFOClear.On進行描画() == 0 )
\r
2403 protected void t進行描画・レーンフラッシュD()
\r
2405 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
2407 this.actLaneFlushD.On進行描画();
\r
2410 protected void t進行描画・レーンフラッシュGB()
\r
2412 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
2414 this.actLaneFlushGB.On進行描画();
\r
2417 protected abstract void t進行描画・演奏情報();
\r
2418 protected void t進行描画・演奏情報(int x, int y)
\r
2420 if ( !CDTXMania.ConfigIni.b演奏情報を表示しない )
\r
2422 this.actPlayInfo.t進行描画( x, y );
\r
2425 protected void t進行描画・背景()
\r
2427 if ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF )
\r
2429 if ( this.tx背景 != null )
\r
2431 this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 );
\r
2436 CDTXMania.app.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 0f, 0 );
\r
2440 protected void t進行描画・判定ライン()
\r
2442 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
2444 int y = CDTXMania.ConfigIni.bReverse.Drums ? 0x35 : 0x1a3;
\r
2445 for ( int i = 0x20; i < 0x14f; i += 8 )
\r
2447 if ( this.txヒットバー != null )
\r
2449 this.txヒットバー.t2D描画( CDTXMania.app.Device, i, y, new Rectangle( 0, 0, ( ( i + 8 ) >= 0x14f ) ? ( 7 - ( ( i + 8 ) - 0x14f ) ) : 8, 8 ) );
\r
2454 protected void t進行描画・判定文字列()
\r
2456 this.actJudgeString.On進行描画();
\r
2458 protected void t進行描画・判定文字列1・通常位置指定の場合()
\r
2460 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) != E判定文字表示位置.判定ライン上または横 )
\r
2462 this.actJudgeString.On進行描画();
\r
2465 protected void t進行描画・判定文字列2・判定ライン上指定の場合()
\r
2467 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) == E判定文字表示位置.判定ライン上または横 )
\r
2469 this.actJudgeString.On進行描画();
\r
2473 protected void t進行描画・譜面スクロール速度()
\r
2475 this.act譜面スクロール速度.On進行描画();
\r
2478 protected abstract void t背景テクスチャの生成();
\r
2479 protected void t背景テクスチャの生成( string DefaultBgFilename, Rectangle bgrect, string bgfilename )
\r
2481 Bitmap image = null;
\r
2484 if ( bgfilename != null && File.Exists( bgfilename ) )
\r
2488 Bitmap bitmap2 = null;
\r
2489 bitmap2 = new Bitmap( bgfilename );
\r
2490 if ( ( bitmap2.Size.Width == 0 ) && ( bitmap2.Size.Height == 0 ) )
\r
2495 Bitmap bitmap3 = new Bitmap(SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height);
\r
2496 Graphics graphics = Graphics.FromImage( bitmap3 );
\r
2497 for ( int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height )
\r
2499 for ( int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width )
\r
2501 graphics.DrawImage( bitmap2, j, i, bitmap2.Width, bitmap2.Height );
\r
2504 graphics.Dispose();
\r
2505 bitmap2.Dispose();
\r
2506 image = new Bitmap( CSkin.Path( DefaultBgFilename ) );
\r
2507 graphics = Graphics.FromImage( image );
\r
2508 ColorMatrix matrix2 = new ColorMatrix();
\r
2509 matrix2.Matrix00 = 1f;
\r
2510 matrix2.Matrix11 = 1f;
\r
2511 matrix2.Matrix22 = 1f;
\r
2512 matrix2.Matrix33 = ( (float) CDTXMania.ConfigIni.n背景の透過度 ) / 255f;
\r
2513 matrix2.Matrix44 = 1f;
\r
2514 ColorMatrix newColorMatrix = matrix2;
\r
2515 ImageAttributes imageAttr = new ImageAttributes();
\r
2516 imageAttr.SetColorMatrix( newColorMatrix );
\r
2517 graphics.DrawImage( bitmap3, new Rectangle( 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ), 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, GraphicsUnit.Pixel, imageAttr );
\r
2518 imageAttr.Dispose();
\r
2519 graphics.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );
\r
2520 graphics.Dispose();
\r
2521 bitmap3.Dispose();
\r
2526 Trace.TraceError( "背景画像の読み込みに失敗しました。({0})", new object[] { bgfilename } );
\r
2531 bgfilename = CSkin.Path( DefaultBgFilename );
\r
2534 image = new Bitmap( bgfilename );
\r
2538 Trace.TraceError( "背景画像の読み込みに失敗しました。({0})", new object[] { bgfilename } );
\r
2543 if ( ( CDTXMania.DTX.listBMP.Count > 0 ) || ( CDTXMania.DTX.listBMPTEX.Count > 0 ) )
\r
2545 Graphics graphics2 = Graphics.FromImage( image );
\r
2546 graphics2.FillRectangle( Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height );
\r
2547 graphics2.Dispose();
\r
2551 this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
\r
2553 catch ( CTextureCreateFailedException )
\r
2555 Trace.TraceError( "背景テクスチャの生成に失敗しました。" );
\r
2561 protected virtual void t入力処理・ギター()
\r
2563 t入力処理・ギターベース( E楽器パート.GUITAR );
\r
2565 protected virtual void t入力処理・ベース()
\r
2567 t入力処理・ギターベース( E楽器パート.BASS );
\r
2571 protected virtual void t入力処理・ギターベース(E楽器パート inst)
\r
2573 int indexInst = (int) inst;
\r
2574 #region [ スクロール速度変更 ]
\r
2575 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.B ) )
\r
2577 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Min( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] + 1, 0x7cf );
\r
2579 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.R ) )
\r
2581 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Max( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] - 1, 0 );
\r
2585 if ( !CDTXMania.ConfigIni.bGuitar有効 || !CDTXMania.DTX.bチップがある[indexInst] )
\r
2590 int R = ( inst == E楽器パート.GUITAR ) ? 0 : 3;
\r
2593 bool autoW = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtW : bIsAutoPlay.BsW;
\r
2594 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
2595 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
2596 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
2597 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
2598 int nAutoW = ( autoW ) ? 8 : 0;
\r
2599 int nAutoR = ( autoR ) ? 4 : 0;
\r
2600 int nAutoG = ( autoG ) ? 2 : 0;
\r
2601 int nAutoB = ( autoB ) ? 1 : 0;
\r
2602 int nAutoMask = nAutoW | nAutoR | nAutoG | nAutoB;
\r
2604 // if ( bIsAutoPlay[ (int) Eレーン.Guitar - 1 + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
2606 CDTX.CChip chip = this.r次に来る指定楽器Chipを更新して返す(inst);
\r
2607 if ( chip != null )
\r
2609 if ( ( chip.nチャンネル番号 & 4 ) != 0 && autoR )
\r
2611 this.actLaneFlushGB.Start( R );
\r
2612 this.actRGB.Push( R );
\r
2614 if ( ( chip.nチャンネル番号 & 2 ) != 0 && autoG )
\r
2616 this.actLaneFlushGB.Start( G );
\r
2617 this.actRGB.Push( G );
\r
2619 if ( ( chip.nチャンネル番号 & 1 ) != 0 && autoB )
\r
2621 this.actLaneFlushGB.Start( B );
\r
2622 this.actRGB.Push( B );
\r
2629 int pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R ) ? 4 : 0;
\r
2630 this.t入力メソッド記憶( inst );
\r
2631 int pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G ) ? 2 : 0;
\r
2632 this.t入力メソッド記憶( inst );
\r
2633 int pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B ) ? 1 : 0;
\r
2634 this.t入力メソッド記憶( inst );
\r
2635 int flagRGB = pushingR | pushingG | pushingB;
\r
2636 if ( pushingR != 0 )
\r
2638 this.actLaneFlushGB.Start( R );
\r
2639 this.actRGB.Push( R );
\r
2641 if ( pushingG != 0 )
\r
2643 this.actLaneFlushGB.Start( G );
\r
2644 this.actRGB.Push( G );
\r
2646 if ( pushingB != 0 )
\r
2648 this.actLaneFlushGB.Start( B );
\r
2649 this.actRGB.Push( B );
\r
2651 // auto pickだとここから先に行かないので注意
\r
2652 List<STInputEvent> events = CDTXMania.Pad.GetEvents( inst, Eパッド.Pick );
\r
2653 if ( ( events != null ) && ( events.Count > 0 ) )
\r
2655 foreach ( STInputEvent eventPick in events )
\r
2657 if ( !eventPick.b押された )
\r
2661 this.t入力メソッド記憶( inst );
\r
2662 long nTime = eventPick.nTimeStamp - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2663 int chWailingSound = ( inst == E楽器パート.GUITAR ) ? 0x2F : 0xAF;
\r
2664 CDTX.CChip pChip = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ); // E楽器パート.GUITARなチップ全てにヒットする
\r
2665 E判定 e判定 = this.e指定時刻からChipのJUDGEを返す( nTime, pChip, this.nInputAdjustTimeMs[indexInst] );
\r
2666 //Trace.TraceInformation("ch={0:x2}, mask1={1:x1}, mask2={2:x2}", pChip.nチャンネル番号, ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F, ( flagRGB & ~nAutoMask) & 0x0F );
\r
2667 if ( ( pChip != null ) && ( ( ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F ) == ( ( flagRGB & ~nAutoMask) & 0x0F ) ) && ( e判定 != E判定.Miss ) )
\r
2669 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2670 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2671 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2672 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2673 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2674 bool bSuccessOPEN = bChipIsO && ( autoR || pushingR == 0 ) && ( autoG || pushingG == 0 ) && ( autoB || pushingB == 0 );
\r
2675 if ( ( bChipHasR && ( autoR || pushingR != 0 ) ) || bSuccessOPEN )
\r
2676 //if ( ( pushingR != 0 ) || autoR || ( flagRGB == 0 ) )
\r
2678 this.actChipFireGB.Start( R );
\r
2680 if ( ( bChipHasG && ( autoG || pushingG != 0 ) ) || bSuccessOPEN )
\r
2681 //if ( ( pushingG != 0 ) || autoG || ( flagRGB == 0 ) )
\r
2683 this.actChipFireGB.Start( G );
\r
2685 if ( ( bChipHasB && ( autoB || pushingB != 0 ) ) || bSuccessOPEN )
\r
2686 //if ( ( pushingB != 0 ) || autoB || ( flagRGB == 0 ) )
\r
2688 this.actChipFireGB.Start( B );
\r
2690 this.tチップのヒット処理( nTime, pChip );
\r
2691 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], e判定 == E判定.Poor );
\r
2692 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
2693 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingChip, this.nInputAdjustTimeMs[ indexInst ], 140 );
\r
2694 if ( item != null )
\r
2696 this.queWailing[indexInst].Enqueue( item );
\r
2701 // 以下、間違いレーンでのピック時
\r
2702 CDTX.CChip NoChipPicked = ( inst == E楽器パート.GUITAR ) ? this.r現在の空うちギターChip : this.r現在の空うちベースChip;
\r
2703 if ( ( NoChipPicked != null ) || ( ( NoChipPicked = this.r指定時刻に一番近いChip・ヒット未済問わず不可視考慮( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ) ) != null ) )
\r
2705 this.tサウンド再生( NoChipPicked, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], true );
\r
2707 if ( !CDTXMania.ConfigIni.bLight[indexInst] )
\r
2709 this.tチップのヒット処理・BadならびにTight時のMiss( inst );
\r
2713 List<STInputEvent> list = CDTXMania.Pad.GetEvents(inst, Eパッド.Wail );
\r
2714 if ( ( list != null ) && ( list.Count > 0 ) )
\r
2716 foreach ( STInputEvent eventWailed in list )
\r
2718 if ( !eventWailed.b押された )
\r
2722 DoWailingFromQueue( inst, eventWailed.nTimeStamp, autoW );
\r
2728 private void DoWailingFromQueue( E楽器パート inst, long nTimeStamp_Wailed, bool autoW )
\r
2730 int indexInst = (int) inst;
\r
2731 long nTimeWailed = nTimeStamp_Wailed - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2732 CDTX.CChip chipWailing;
\r
2733 while ( ( this.queWailing[ indexInst ].Count > 0 ) && ( ( chipWailing = this.queWailing[ indexInst ].Dequeue() ) != null ) )
\r
2735 if ( ( nTimeWailed - chipWailing.n発声時刻ms ) <= 1000 ) // #24245 2011.1.26 yyagi: 800 -> 1000
\r
2737 chipWailing.bHit = true;
\r
2738 this.actWailingBonus.Start( inst, this.r現在の歓声Chip[ indexInst ] );
\r
2739 //if ( !bIsAutoPlay[indexInst] )
\r
2742 int nCombo = ( this.actCombo.n現在のコンボ数[ indexInst ] < 500 ) ? this.actCombo.n現在のコンボ数[ indexInst ] : 500;
\r
2743 this.actScore.Add( inst, bIsAutoPlay, nCombo * 3000L ); // #24245 2011.1.26 yyagi changed DRUMS->BASS, add nCombo conditions
\r