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 #region [ t演奏結果を格納する_ドラム() ]
\r
33 public void t演奏結果を格納する_ドラム( out CScoreIni.C演奏記録 Drums )
\r
35 Drums = new CScoreIni.C演奏記録();
\r
37 if ( CDTXMania.DTX.bチップがある.Drums && !CDTXMania.ConfigIni.bギタレボモード )
\r
39 Drums.nスコア = (long) this.actScore.Get( E楽器パート.DRUMS );
\r
40 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
41 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
42 Drums.nPerfect数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Perfect : this.nヒット数_Auto含まない.Drums.Perfect;
\r
43 Drums.nGreat数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Great : this.nヒット数_Auto含まない.Drums.Great;
\r
44 Drums.nGood数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Good : this.nヒット数_Auto含まない.Drums.Good;
\r
45 Drums.nPoor数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Poor : this.nヒット数_Auto含まない.Drums.Poor;
\r
46 Drums.nMiss数 = CDTXMania.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Miss : this.nヒット数_Auto含まない.Drums.Miss;
\r
47 Drums.nPerfect数_Auto含まない = this.nヒット数_Auto含まない.Drums.Perfect;
\r
48 Drums.nGreat数_Auto含まない = this.nヒット数_Auto含まない.Drums.Great;
\r
49 Drums.nGood数_Auto含まない = this.nヒット数_Auto含まない.Drums.Good;
\r
50 Drums.nPoor数_Auto含まない = this.nヒット数_Auto含まない.Drums.Poor;
\r
51 Drums.nMiss数_Auto含まない = this.nヒット数_Auto含まない.Drums.Miss;
\r
52 Drums.n最大コンボ数 = this.actCombo.n現在のコンボ数.Drums最高値;
\r
53 Drums.n全チップ数 = CDTXMania.DTX.n可視チップ数.Drums;
\r
54 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
56 Drums.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
58 Drums.bTight = CDTXMania.ConfigIni.bTight;
\r
59 for ( int i = 0; i < 3; i++ )
\r
61 Drums.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
62 Drums.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
63 Drums.eInvisible[ i ] = CDTXMania.ConfigIni.eInvisible[ i ];
\r
64 Drums.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
65 Drums.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
66 Drums.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
67 Drums.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
68 Drums.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
70 Drums.eDark = CDTXMania.ConfigIni.eDark;
\r
71 Drums.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
73 Drums.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
74 Drums.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
75 Drums.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
76 Drums.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
77 Drums.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
78 Drums.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
79 Drums.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
80 Drums.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
81 Drums.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
82 Drums.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
83 Drums.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Drums;
\r
84 Drums.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Drums;
\r
85 Drums.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Drums;
\r
86 Drums.b演奏にマウスを使用した = this.b演奏にマウスを使った.Drums;
\r
87 Drums.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
88 Drums.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
89 Drums.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
90 Drums.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
91 Drums.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
92 Drums.最終更新日時 = DateTime.Now.ToString();
\r
93 Drums.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Drums );
\r
94 Drums.nRisky = CDTXMania.ConfigIni.nRisky; // #35461 chnmr0 add
\r
95 Drums.bギターとベースを入れ替えた = CDTXMania.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
99 #region [ t演奏結果を格納する_ギター() ]
\r
100 public void t演奏結果を格納する_ギター( out CScoreIni.C演奏記録 Guitar )
\r
102 Guitar = new CScoreIni.C演奏記録();
\r
104 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
106 Guitar.nスコア = (long) this.actScore.Get( E楽器パート.GUITAR );
\r
107 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
108 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
109 Guitar.nPerfect数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Perfect : this.nヒット数_Auto含まない.Guitar.Perfect;
\r
110 Guitar.nGreat数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Great : this.nヒット数_Auto含まない.Guitar.Great;
\r
111 Guitar.nGood数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Good : this.nヒット数_Auto含まない.Guitar.Good;
\r
112 Guitar.nPoor数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Poor : this.nヒット数_Auto含まない.Guitar.Poor;
\r
113 Guitar.nMiss数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Miss : this.nヒット数_Auto含まない.Guitar.Miss;
\r
114 Guitar.nPerfect数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Perfect;
\r
115 Guitar.nGreat数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Great;
\r
116 Guitar.nGood数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Good;
\r
117 Guitar.nPoor数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Poor;
\r
118 Guitar.nMiss数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Miss;
\r
119 Guitar.n最大コンボ数 = this.actCombo.n現在のコンボ数.Guitar最高値;
\r
120 Guitar.n全チップ数 = CDTXMania.DTX.n可視チップ数.Guitar;
\r
121 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
123 Guitar.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
125 Guitar.bTight = CDTXMania.ConfigIni.bTight;
\r
126 for ( int i = 0; i < 3; i++ )
\r
128 Guitar.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
129 Guitar.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
130 Guitar.eInvisible[ i ] = CDTXMania.ConfigIni.eInvisible[ i ];
\r
131 Guitar.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
132 Guitar.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
133 Guitar.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
134 Guitar.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
135 Guitar.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
137 Guitar.eDark = CDTXMania.ConfigIni.eDark;
\r
138 Guitar.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
139 Guitar.n演奏速度分母 = 20;
\r
140 Guitar.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
141 Guitar.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
142 Guitar.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
143 Guitar.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
144 Guitar.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
145 Guitar.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
146 Guitar.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
147 Guitar.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
148 Guitar.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
149 Guitar.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
150 Guitar.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Guitar;
\r
151 Guitar.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Guitar;
\r
152 Guitar.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Guitar;
\r
153 Guitar.b演奏にマウスを使用した = this.b演奏にマウスを使った.Guitar;
\r
154 Guitar.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
155 Guitar.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
156 Guitar.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
157 Guitar.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
158 Guitar.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
159 Guitar.最終更新日時 = DateTime.Now.ToString();
\r
160 Guitar.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Guitar );
\r
161 Guitar.bギターとベースを入れ替えた = CDTXMania.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
165 #region [ t演奏結果を格納する_ベース() ]
\r
166 public void t演奏結果を格納する_ベース( out CScoreIni.C演奏記録 Bass )
\r
168 Bass = new CScoreIni.C演奏記録();
\r
170 if ( CDTXMania.DTX.bチップがある.Bass )
\r
172 Bass.nスコア = (long) this.actScore.Get( E楽器パート.BASS );
\r
173 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
174 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
175 Bass.nPerfect数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Perfect : this.nヒット数_Auto含まない.Bass.Perfect;
\r
176 Bass.nGreat数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Great : this.nヒット数_Auto含まない.Bass.Great;
\r
177 Bass.nGood数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Good : this.nヒット数_Auto含まない.Bass.Good;
\r
178 Bass.nPoor数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Poor : this.nヒット数_Auto含まない.Bass.Poor;
\r
179 Bass.nMiss数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Miss : this.nヒット数_Auto含まない.Bass.Miss;
\r
180 Bass.nPerfect数_Auto含まない = this.nヒット数_Auto含まない.Bass.Perfect;
\r
181 Bass.nGreat数_Auto含まない = this.nヒット数_Auto含まない.Bass.Great;
\r
182 Bass.nGood数_Auto含まない = this.nヒット数_Auto含まない.Bass.Good;
\r
183 Bass.nPoor数_Auto含まない = this.nヒット数_Auto含まない.Bass.Poor;
\r
184 Bass.nMiss数_Auto含まない = this.nヒット数_Auto含まない.Bass.Miss;
\r
185 Bass.n最大コンボ数 = this.actCombo.n現在のコンボ数.Bass最高値;
\r
186 Bass.n全チップ数 = CDTXMania.DTX.n可視チップ数.Bass;
\r
187 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
189 Bass.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
191 Bass.bTight = CDTXMania.ConfigIni.bTight;
\r
192 for ( int i = 0; i < 3; i++ )
\r
194 Bass.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
195 Bass.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
196 Bass.eInvisible[ i ] = CDTXMania.ConfigIni.eInvisible[ i ];
\r
197 Bass.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
198 Bass.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
199 Bass.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
200 Bass.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
201 Bass.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
203 Bass.eDark = CDTXMania.ConfigIni.eDark;
\r
204 Bass.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
206 Bass.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
207 Bass.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
208 Bass.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
209 Bass.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
210 Bass.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
211 Bass.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
212 Bass.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
213 Bass.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
214 Bass.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
215 Bass.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
216 Bass.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Bass; // #24280 2011.1.29 yyagi
\r
217 Bass.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Bass; //
\r
218 Bass.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Bass; //
\r
219 Bass.b演奏にマウスを使用した = this.b演奏にマウスを使った.Bass; //
\r
220 Bass.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
221 Bass.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
222 Bass.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
223 Bass.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
224 Bass.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
225 Bass.最終更新日時 = DateTime.Now.ToString();
\r
226 Bass.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Bass );
\r
227 Bass.bギターとベースを入れ替えた = CDTXMania.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
234 public override void On活性化()
\r
236 listChip = CDTXMania.DTX.listChip;
\r
237 listWAV = CDTXMania.DTX.listWAV;
\r
239 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.継続;
\r
240 this.n現在のトップChip = ( listChip.Count > 0 ) ? 0 : -1;
\r
241 this.L最後に再生したHHの実WAV番号 = new List<int>( 16 );
\r
242 this.n最後に再生したHHのチャンネル番号 = 0;
\r
243 this.n最後に再生した実WAV番号.Guitar = -1;
\r
244 this.n最後に再生した実WAV番号.Bass = -1;
\r
245 for ( int i = 0; i < 50; i++ )
\r
247 this.n最後に再生したBGMの実WAV番号[ i ] = -1;
\r
249 this.r次にくるギターChip = null;
\r
250 this.r次にくるベースChip = null;
\r
251 for ( int j = 0; j < 10; j++ )
\r
253 this.r現在の空うちドラムChip[ j ] = null;
\r
255 this.r現在の空うちギターChip = null;
\r
256 this.r現在の空うちベースChip = null;
\r
257 cInvisibleChip = new CInvisibleChip( CDTXMania.ConfigIni.nDisplayTimesMs, CDTXMania.ConfigIni.nFadeoutTimeMs );
\r
258 this.演奏判定ライン座標 = new C演奏判定ライン座標共通();
\r
259 this.n最大コンボ数_TargetGhost = new STDGBVALUE<int>(); // #35411 2015.08.21 chnmr0 add
\r
260 for ( int k = 0; k < 3; k++ )
\r
262 //for ( int n = 0; n < 5; n++ )
\r
264 this.nヒット数_Auto含まない[ k ] = new CHITCOUNTOFRANK();
\r
265 this.nヒット数_Auto含む[ k ] = new CHITCOUNTOFRANK();
\r
266 this.nヒット数_TargetGhost[k] = new CHITCOUNTOFRANK(); // #35411 2015.08.21 chnmr0 add
\r
268 this.queWailing[ k ] = new Queue<CDTX.CChip>();
\r
269 this.r現在の歓声Chip[ k ] = null;
\r
270 cInvisibleChip.eInvisibleMode[ k ] = CDTXMania.ConfigIni.eInvisible[ k ];
\r
271 if ( CDTXMania.DTXVmode.Enabled )
\r
273 CDTXMania.ConfigIni.n譜面スクロール速度[ k ] = CDTXMania.ConfigIni.nViewerScrollSpeed[ k ];
\r
276 this.nInputAdjustTimeMs[ k ] = CDTXMania.ConfigIni.nInputAdjustTimeMs[ k ]; // #23580 2011.1.3 yyagi
\r
277 // 2011.1.7 ikanick 修正
\r
278 //this.nJudgeLinePosY_delta[ k ] = CDTXMania.ConfigIni.nJudgeLinePosOffset[ k ]; // #31602 2013.6.23 yyagi
\r
280 this.演奏判定ライン座標.n判定位置[ k ] = CDTXMania.ConfigIni.e判定位置[ k ];
\r
281 this.演奏判定ライン座標.nJudgeLinePosY_delta[ k ] = CDTXMania.ConfigIni.nJudgeLinePosOffset[ k ];
\r
282 this.bReverse[ k ] = CDTXMania.ConfigIni.bReverse[ k ]; //
\r
285 actCombo.演奏判定ライン座標 = 演奏判定ライン座標;
\r
286 for ( int i = 0; i < 3; i++ )
\r
288 this.b演奏にキーボードを使った[ i ] = false;
\r
289 this.b演奏にジョイパッドを使った[ i ] = false;
\r
290 this.b演奏にMIDI入力を使った[ i ] = false;
\r
291 this.b演奏にマウスを使った[ i ] = false;
\r
293 this.bAUTOでないチップが1つでもバーを通過した = false;
\r
294 cInvisibleChip.Reset();
\r
296 this.tステータスパネルの選択();
\r
298 //this.演奏判定ライン座標();
\r
300 this.bIsAutoPlay = CDTXMania.ConfigIni.bAutoPlay; // #24239 2011.1.23 yyagi
\r
303 //this.bIsAutoPlay.Guitar = CDTXMania.ConfigIni.bギターが全部オートプレイである;
\r
304 //this.bIsAutoPlay.Bass = CDTXMania.ConfigIni.bベースが全部オートプレイである;
\r
305 // this.nRisky = CDTXMania.ConfigIni.nRisky; // #23559 2011.7.28 yyagi
\r
306 actGauge.Init( CDTXMania.ConfigIni.nRisky ); // #23559 2011.7.28 yyagi
\r
307 this.nPolyphonicSounds = CDTXMania.ConfigIni.nPoliphonicSounds;
\r
308 e判定表示優先度 = CDTXMania.ConfigIni.e判定表示優先度;
\r
310 CDTXMania.Skin.tRemoveMixerAll(); // 効果音のストリームをミキサーから解除しておく
\r
312 queueMixerSound = new Queue<stmixer>( 64 );
\r
313 bIsDirectSound = ( CDTXMania.Sound管理.GetCurrentSoundDeviceType() == "DirectSound" );
\r
314 bUseOSTimer = CDTXMania.ConfigIni.bUseOSTimer;
\r
315 this.bPAUSE = false;
\r
316 if ( CDTXMania.DTXVmode.Enabled )
\r
318 db再生速度 = CDTXMania.DTX.dbDTXVPlaySpeed;
\r
319 CDTXMania.ConfigIni.n演奏速度 = (int) (CDTXMania.DTX.dbDTXVPlaySpeed * 20 + 0.5 );
\r
323 db再生速度 = ( (double) CDTXMania.ConfigIni.n演奏速度 ) / 20.0;
\r
325 bValidScore = ( CDTXMania.DTXVmode.Enabled ) ? false : true;
\r
327 cWailingChip = new CWailingChip共通[ 3 ]; // 0:未使用, 1:Gutiar, 2:Bass
\r
328 if ( CDTXMania.ConfigIni.bDrums有効 )
\r
330 cWailingChip[ 1 ] = new CWailngChip_Guitar_Drum画面( ref 演奏判定ライン座標 );
\r
331 cWailingChip[ 2 ] = new CWailngChip_Bass_Drum画面( ref 演奏判定ライン座標 );
\r
335 cWailingChip[ 1 ] = new CWailngChip_Guitar_GR画面( ref 演奏判定ライン座標 );
\r
336 cWailingChip[ 2 ] = new CWailngChip_Bass_GR画面( ref 演奏判定ライン座標 );
\r
339 #region [ 演奏開始前にmixer登録しておくべきサウンド(開幕してすぐに鳴らすことになるチップ音)を登録しておく ]
\r
340 foreach ( CDTX.CChip pChip in listChip )
\r
342 // Debug.WriteLine( "CH=" + pChip.nチャンネル番号.ToString( "x2" ) + ", 整数値=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
343 if ( pChip.n発声時刻ms <= 0 )
\r
345 if ( pChip.nチャンネル番号 == 0xDA )
\r
348 // Trace.TraceInformation( "first [DA] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
349 if ( listWAV.ContainsKey( pChip.n整数値_内部番号 ) )
\r
351 CDTX.CWAV wc = listWAV[ pChip.n整数値_内部番号 ];
\r
352 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
354 if ( wc.rSound[ i ] != null )
\r
356 CDTXMania.Sound管理.AddMixer( wc.rSound[ i ], db再生速度, pChip.b演奏終了後も再生が続くチップである );
\r
357 //AddMixer( wc.rSound[ i ] ); // 最初はqueueを介さず直接ミキサー登録する
\r
370 if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.24 yyagi Gt/Bsの譜面情報入れ替え
\r
372 CDTXMania.DTX.SwapGuitarBassInfos();
\r
374 this.sw = new Stopwatch();
\r
375 this.sw2 = new Stopwatch();
\r
376 // this.gclatencymode = GCSettings.LatencyMode;
\r
377 // GCSettings.LatencyMode = GCLatencyMode.Batch; // 演奏画面中はGCを抑止する
\r
379 public override void On非活性化()
\r
381 this.L最後に再生したHHの実WAV番号.Clear(); // #23921 2011.1.4 yyagi
\r
382 this.L最後に再生したHHの実WAV番号 = null; //
\r
383 for ( int i = 0; i < 3; i++ )
\r
385 this.queWailing[ i ].Clear();
\r
386 this.queWailing[ i ] = null;
\r
388 this.ctWailingチップ模様アニメ = null;
\r
389 this.ctチップ模様アニメ.Drums = null;
\r
390 this.ctチップ模様アニメ.Guitar = null;
\r
391 this.ctチップ模様アニメ.Bass = null;
\r
395 queueMixerSound.Clear();
\r
396 queueMixerSound = null;
\r
397 cInvisibleChip.Dispose();
\r
398 cInvisibleChip = null;
\r
399 // GCSettings.LatencyMode = this.gclatencymode;
\r
402 public override void OnManagedリソースの作成()
\r
404 if ( !base.b活性化してない )
\r
406 this.t背景テクスチャの生成();
\r
408 this.txWailing枠 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay wailing cursor.png" ) );
\r
410 base.OnManagedリソースの作成();
\r
413 public override void OnManagedリソースの解放()
\r
415 if ( !base.b活性化してない )
\r
417 CDTXMania.tテクスチャの解放( ref this.tx背景 );
\r
419 CDTXMania.tテクスチャの解放( ref this.txWailing枠 );
\r
420 base.OnManagedリソースの解放();
\r
426 #region [ protected ]
\r
427 //-----------------
\r
428 protected class CHITCOUNTOFRANK
\r
434 public int Perfect;
\r
438 public int this[ int index ]
\r
445 return this.Perfect;
\r
459 throw new IndexOutOfRangeException();
\r
466 this.Perfect = value;
\r
470 this.Great = value;
\r
485 throw new IndexOutOfRangeException();
\r
490 [StructLayout( LayoutKind.Sequential )]
\r
491 protected struct STKARAUCHI
\r
493 public CDTX.CChip HH;
\r
494 public CDTX.CChip SD;
\r
495 public CDTX.CChip BD;
\r
496 public CDTX.CChip HT;
\r
497 public CDTX.CChip LT;
\r
498 public CDTX.CChip FT;
\r
499 public CDTX.CChip CY;
\r
500 public CDTX.CChip HHO;
\r
501 public CDTX.CChip RD;
\r
502 public CDTX.CChip LC;
\r
503 public CDTX.CChip this[ int index ]
\r
539 throw new IndexOutOfRangeException();
\r
585 throw new IndexOutOfRangeException();
\r
590 protected struct stmixer
\r
592 internal bool bIsAdd;
\r
593 internal CSound csound;
\r
594 internal bool b演奏終了後も再生が続くチップである;
\r
597 protected CAct演奏AVI actAVI;
\r
598 protected CAct演奏BGA actBGA;
\r
600 protected CAct演奏チップファイアGB actChipFireGB;
\r
601 protected CAct演奏Combo共通 actCombo;
\r
602 protected CAct演奏Danger共通 actDANGER;
\r
603 protected CActFIFOBlack actFI;
\r
604 protected CActFIFOBlack actFO;
\r
605 protected CActFIFOWhite actFOClear;
\r
606 protected CAct演奏ゲージ共通 actGauge;
\r
608 protected CAct演奏判定文字列共通 actJudgeString;
\r
609 protected CAct演奏DrumsレーンフラッシュD actLaneFlushD;
\r
610 protected CAct演奏レーンフラッシュGB共通 actLaneFlushGB;
\r
611 protected CAct演奏パネル文字列 actPanel;
\r
612 protected CAct演奏演奏情報 actPlayInfo;
\r
613 protected CAct演奏RGB共通 actRGB;
\r
614 protected CAct演奏スコア共通 actScore;
\r
615 protected CAct演奏ステージ失敗 actStageFailed;
\r
616 protected CAct演奏ステータスパネル共通 actStatusPanels;
\r
617 protected CAct演奏WailingBonus共通 actWailingBonus;
\r
618 protected CAct演奏スクロール速度 act譜面スクロール速度;
\r
619 public C演奏判定ライン座標共通 演奏判定ライン座標;
\r
620 protected bool bPAUSE;
\r
621 protected STDGBVALUE<bool> b演奏にMIDI入力を使った;
\r
622 protected STDGBVALUE<bool> b演奏にキーボードを使った;
\r
623 protected STDGBVALUE<bool> b演奏にジョイパッドを使った;
\r
624 protected STDGBVALUE<bool> b演奏にマウスを使った;
\r
625 protected CCounter ctWailingチップ模様アニメ;
\r
626 protected STDGBVALUE<CCounter> ctチップ模様アニメ;
\r
628 protected E演奏画面の戻り値 eフェードアウト完了時の戻り値;
\r
629 protected readonly int[,] nBGAスコープチャンネルマップ = new int[ , ] { { 0xc4, 0xc7, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xe0 }, { 4, 7, 0x55, 0x56, 0x57, 0x58, 0x59, 0x60 } };
\r
630 protected readonly int[] nチャンネル0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 8, 0 };
\r
631 protected readonly int[] nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 7, 0 };
\r
632 protected readonly int[] nパッド0Atoチャンネル0A = new int[] { 0x11, 0x12, 0x13, 20, 0x15, 0x17, 0x16, 0x18, 0x19, 0x1a };
\r
633 protected readonly int[] nパッド0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 8, 0 }; // パッド画像のヒット処理用
\r
634 protected readonly int[] nパッド0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 7, 0 };
\r
635 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_Auto含まない;
\r
636 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_Auto含む;
\r
637 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_TargetGhost; // #35411 2015.08.21 chnmr0 add
\r
638 protected STDGBVALUE<int> nコンボ数_TargetGhost;
\r
639 protected STDGBVALUE<int> n最大コンボ数_TargetGhost;
\r
640 protected int n現在のトップChip = -1;
\r
641 protected int[] n最後に再生したBGMの実WAV番号 = new int[ 50 ];
\r
642 protected int n最後に再生したHHのチャンネル番号;
\r
643 protected List<int> L最後に再生したHHの実WAV番号; // #23921 2011.1.4 yyagi: change "int" to "List<int>", for recording multiple wav No.
\r
644 protected STLANEVALUE<int> n最後に再生した実WAV番号; // #26388 2011.11.8 yyagi: change "n最後に再生した実WAV番号.GUITAR" and "n最後に再生した実WAV番号.BASS"
\r
645 // into "n最後に再生した実WAV番号";
\r
646 // protected int n最後に再生した実WAV番号.GUITAR;
\r
647 // protected int n最後に再生した実WAV番号.BASS;
\r
649 protected volatile Queue<stmixer> queueMixerSound; // #24820 2013.1.21 yyagi まずは単純にAdd/Removeを1個のキューでまとめて管理するやり方で設計する
\r
650 protected DateTime dtLastQueueOperation; //
\r
651 protected bool bIsDirectSound; //
\r
652 protected double db再生速度;
\r
653 protected bool bValidScore;
\r
654 // protected bool bDTXVmode;
\r
655 // protected STDGBVALUE<int> nJudgeLinePosY_delta; // #31602 2013.6.23 yyagi 表示遅延対策として、判定ラインの表示位置をずらす機能を追加する
\r
656 protected STDGBVALUE<bool> bReverse;
\r
658 protected STDGBVALUE<Queue<CDTX.CChip>> queWailing;
\r
659 protected STDGBVALUE<CDTX.CChip> r現在の歓声Chip;
\r
660 protected CDTX.CChip r現在の空うちギターChip;
\r
661 protected STKARAUCHI r現在の空うちドラムChip;
\r
662 protected CDTX.CChip r現在の空うちベースChip;
\r
663 protected CDTX.CChip r次にくるギターChip;
\r
664 protected CDTX.CChip r次にくるベースChip;
\r
665 protected CTexture txWailing枠;
\r
666 protected CTexture txチップ;
\r
667 protected CTexture txヒットバー;
\r
669 protected CTexture tx背景;
\r
671 protected STDGBVALUE<int> nInputAdjustTimeMs; // #23580 2011.1.3 yyagi
\r
672 protected STAUTOPLAY bIsAutoPlay; // #24239 2011.1.23 yyagi
\r
673 // protected int nRisky_InitialVar, nRiskyTime; // #23559 2011.7.28 yyagi → CAct演奏ゲージ共通クラスに隠蔽
\r
674 protected int nPolyphonicSounds;
\r
675 protected List<CDTX.CChip> listChip;
\r
676 protected Dictionary<int, CDTX.CWAV> listWAV;
\r
677 protected CInvisibleChip cInvisibleChip;
\r
678 protected bool bUseOSTimer;
\r
679 protected E判定表示優先度 e判定表示優先度;
\r
680 protected CWailingChip共通[] cWailingChip;
\r
682 protected Stopwatch sw; // 2011.6.13 最適化検討用のストップウォッチ
\r
683 protected Stopwatch sw2;
\r
684 // protected GCLatencyMode gclatencymode;
\r
686 public void AddMixer( CSound cs, bool _b演奏終了後も再生が続くチップである )
\r
688 stmixer stm = new stmixer()
\r
692 b演奏終了後も再生が続くチップである = _b演奏終了後も再生が続くチップである
\r
694 queueMixerSound.Enqueue( stm );
\r
695 // Debug.WriteLine( "★Queue: add " + Path.GetFileName( stm.csound.strファイル名 ));
\r
697 public void RemoveMixer( CSound cs )
\r
699 stmixer stm = new stmixer()
\r
703 b演奏終了後も再生が続くチップである = false
\r
705 queueMixerSound.Enqueue( stm );
\r
706 // Debug.WriteLine( "★Queue: remove " + Path.GetFileName( stm.csound.strファイル名 ));
\r
708 public void ManageMixerQueue()
\r
710 // もしサウンドの登録/削除が必要なら、実行する
\r
711 if ( queueMixerSound.Count > 0 )
\r
713 //Debug.WriteLine( "☆queueLength=" + queueMixerSound.Count );
\r
714 DateTime dtnow = DateTime.Now;
\r
715 TimeSpan ts = dtnow - dtLastQueueOperation;
\r
716 if ( ts.Milliseconds > 7 )
\r
718 for ( int i = 0; i < 2 && queueMixerSound.Count > 0; i++ )
\r
720 dtLastQueueOperation = dtnow;
\r
721 stmixer stm = queueMixerSound.Dequeue();
\r
724 CDTXMania.Sound管理.AddMixer( stm.csound, db再生速度, stm.b演奏終了後も再生が続くチップである );
\r
728 CDTXMania.Sound管理.RemoveMixer( stm.csound );
\r
735 protected E判定 e指定時刻からChipのJUDGEを返す( long nTime, CDTX.CChip pChip, int nInputAdjustTime, bool saveLag = true )
\r
737 if ( pChip != null )
\r
739 // #35411 2015.08.22 chnmr0 modified add check save lag flag for ghost
\r
740 int lag = (int)(nTime + nInputAdjustTime - pChip.n発声時刻ms);
\r
743 pChip.nLag = lag; // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature
\r
744 pChip.nCurrentComboForGhost = this.actCombo.n現在のコンボ数[(int)pChip.e楽器パート];
\r
746 // #35411 modify end
\r
748 int nDeltaTime = Math.Abs( lag );
\r
749 //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms));
\r
750 if ( nDeltaTime <= CDTXMania.nPerfect範囲ms )
\r
752 return E判定.Perfect;
\r
754 if ( nDeltaTime <= CDTXMania.nGreat範囲ms )
\r
758 if ( nDeltaTime <= CDTXMania.nGood範囲ms )
\r
762 if ( nDeltaTime <= CDTXMania.nPoor範囲ms )
\r
769 protected CDTX.CChip r空うちChip( E楽器パート part, Eパッド pad )
\r
777 if ( this.r現在の空うちドラムChip.HH != null )
\r
779 return this.r現在の空うちドラムChip.HH;
\r
781 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
783 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
785 return this.r現在の空うちドラムChip.HHO;
\r
787 if ( this.r現在の空うちドラムChip.HHO != null )
\r
789 return this.r現在の空うちドラムChip.HHO;
\r
792 return this.r現在の空うちドラムChip.LC;
\r
795 return this.r現在の空うちドラムChip.SD;
\r
798 return this.r現在の空うちドラムChip.BD;
\r
801 return this.r現在の空うちドラムChip.HT;
\r
804 if ( this.r現在の空うちドラムChip.LT != null )
\r
806 return this.r現在の空うちドラムChip.LT;
\r
808 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
810 return this.r現在の空うちドラムChip.FT;
\r
815 if ( this.r現在の空うちドラムChip.FT != null )
\r
817 return this.r現在の空うちドラムChip.FT;
\r
819 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
821 return this.r現在の空うちドラムChip.LT;
\r
826 if ( this.r現在の空うちドラムChip.CY != null )
\r
828 return this.r現在の空うちドラムChip.CY;
\r
830 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
832 return this.r現在の空うちドラムChip.RD;
\r
837 if ( this.r現在の空うちドラムChip.HHO != null )
\r
839 return this.r現在の空うちドラムChip.HHO;
\r
841 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
843 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
845 return this.r現在の空うちドラムChip.HH;
\r
847 if ( this.r現在の空うちドラムChip.HH != null )
\r
849 return this.r現在の空うちドラムChip.HH;
\r
852 return this.r現在の空うちドラムChip.LC;
\r
855 if ( this.r現在の空うちドラムChip.RD != null )
\r
857 return this.r現在の空うちドラムChip.RD;
\r
859 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
861 return this.r現在の空うちドラムChip.CY;
\r
866 if ( this.r現在の空うちドラムChip.LC != null )
\r
868 return this.r現在の空うちドラムChip.LC;
\r
870 if ( ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける ) && ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.全部共通 ) )
\r
874 if ( this.r現在の空うちドラムChip.HH != null )
\r
876 return this.r現在の空うちドラムChip.HH;
\r
878 return this.r現在の空うちドラムChip.HHO;
\r
882 case E楽器パート.GUITAR:
\r
883 return this.r現在の空うちギターChip;
\r
886 return this.r現在の空うちベースChip;
\r
890 protected CDTX.CChip r指定時刻に一番近いChip_ヒット未済問わず不可視考慮( long nTime, int nChannel, int nInputAdjustTime )
\r
893 //Trace.TraceInformation( "NTime={0}, nChannel={1:x2}", nTime, nChannel );
\r
894 nTime += nInputAdjustTime; // #24239 2011.1.23 yyagi InputAdjust
\r
896 int nIndex_InitialPositionSearchingToPast;
\r
897 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
902 int count = listChip.Count;
\r
903 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
904 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
906 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
908 //int nIndex_NearestChip_Future; // = nIndex_InitialPositionSearchingToFuture;
\r
909 //while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
910 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
\r
912 CDTX.CChip chip = listChip[ nIndex_NearestChip_Future ];
\r
913 if ( chip.b空打ちチップである )
\r
917 if ( ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) ) )
\r
919 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
921 if ( chip.n発声時刻ms > nTime )
\r
925 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
927 continue; // ほんの僅かながら高速化
\r
929 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
931 if ( chip.n発声時刻ms > nTime )
\r
935 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
937 else if ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
939 if ( chip.n発声時刻ms > nTime )
\r
943 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
945 // nIndex_NearestChip_Future++;
\r
947 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
948 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
949 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
951 CDTX.CChip chip = listChip[ nIndex_NearestChip_Past ];
\r
952 if ( chip.b空打ちチップである )
\r
956 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
958 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
963 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
965 if ( ( 0x20 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0x28 ) )
\r
970 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
971 && ( ( 0xa0 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0xa8 ) ) )
\r
975 // nIndex_NearestChip_Past--;
\r
978 if ( nIndex_NearestChip_Future >= count )
\r
980 if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
984 else // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
987 return listChip[ nIndex_NearestChip_Past ];
\r
990 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
993 return listChip[ nIndex_NearestChip_Future ];
\r
995 // 検索対象が過去未来の双方に見つかったなら、より近い方を採用する
\r
996 CDTX.CChip nearestChip_Future = listChip[ nIndex_NearestChip_Future ];
\r
997 CDTX.CChip nearestChip_Past = listChip[ nIndex_NearestChip_Past ];
\r
998 int nDiffTime_Future = Math.Abs( (int) ( nTime - nearestChip_Future.n発声時刻ms ) );
\r
999 int nDiffTime_Past = Math.Abs( (int) ( nTime - nearestChip_Past.n発声時刻ms ) );
\r
1000 if ( nDiffTime_Future >= nDiffTime_Past )
\r
1003 return nearestChip_Past;
\r
1006 return nearestChip_Future;
\r
1008 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part )
\r
1010 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, CDTXMania.ConfigIni.n手動再生音量, false, false );
\r
1012 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量 )
\r
1014 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, false, false );
\r
1016 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ )
\r
1018 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, bモニタ, false );
\r
1020 protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
1022 // mute sound (auto)
\r
1031 if ( pChip != null )
\r
1033 bool overwrite = false;
\r
1036 case E楽器パート.DRUMS:
\r
1039 int index = pChip.nチャンネル番号;
\r
1040 if ( ( 0x11 <= index ) && ( index <= 0x1a ) )
\r
1044 else if ( ( 0x31 <= index ) && ( index <= 0x3a ) )
\r
1048 // mute sound (auto)
\r
1049 // 4A: 84: HH (HO/HC)
\r
1055 else if ( 0x84 == index ) // 仮に今だけ追加 HHは消音処理があるので overwriteフラグ系の処理は改めて不要
\r
1059 else if ( ( 0x85 <= index ) && ( index <= 0x87 ) ) // 仮に今だけ追加
\r
1062 int[] ch = { 0x16, 0x19, 0x1A };
\r
1063 pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x85 ];
\r
1064 index = pChip.nチャンネル番号 - 0x11;
\r
1071 int nLane = this.nチャンネル0Atoレーン07[ index ];
\r
1072 if ( ( nLane == 1 ) && // 今回演奏するのがHC or HO
\r
1073 ( index == 0 || ( index == 7 && this.n最後に再生したHHのチャンネル番号 != 0x18 && this.n最後に再生したHHのチャンネル番号 != 0x38 ) )
\r
1074 // HCを演奏するか、またはHO演奏&以前HO演奏でない&以前不可視HO演奏でない
\r
1076 // #24772 2011.4.4 yyagi
\r
1077 // == HH mute condition ==
\r
1078 // current HH So, the mute logics are:
\r
1079 // HC HO 1) All played HC/HOs should be queueing
\r
1080 // last HH HC Yes Yes 2) If you aren't in "both current/last HH are HO", queued HH should be muted.
\r
1083 // #23921 2011.1.4 yyagi: 2種類以上のオープンハイハットが発音済みだと、最後のHHOしか消せない問題に対応。
\r
1084 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1085 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
1088 for ( int i = 0; i < this.L最後に再生したHHの実WAV番号.Count; i++ ) // #23921 2011.1.4 yyagi
\r
1090 // CDTXMania.DTX.tWavの再生停止(this.L最後に再生したHHの実WAV番号);
\r
1091 CDTXMania.DTX.tWavの再生停止( this.L最後に再生したHHの実WAV番号[ i ] ); // #23921 yyagi ストック分全て消音する
\r
1093 this.L最後に再生したHHの実WAV番号.Clear();
\r
1094 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1097 //this.n最後に再生したHHの実WAV番号 = pChip.n整数値_内部番号;
\r
1098 this.n最後に再生したHHのチャンネル番号 = pChip.nチャンネル番号;
\r
1100 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1101 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
1104 if ( index == 0 || index == 7 || index == 0x20 || index == 0x27 ) // #23921 HOまたは不可視HO演奏時はそのチップ番号をストックしておく
\r
1105 { // #24772 HC, 不可視HCも消音キューに追加
\r
1106 if ( this.L最後に再生したHHの実WAV番号.Count >= 16 ) // #23921 ただしストック数が16以上になるようなら、頭の1個を削って常に16未満に抑える
\r
1107 { // (ストックが増えてList<>のrealloc()が発生するのを予防する)
\r
1108 this.L最後に再生したHHの実WAV番号.RemoveAt( 0 );
\r
1110 if ( !this.L最後に再生したHHの実WAV番号.Contains( pChip.n整数値_内部番号 ) ) // チップ音がまだストックされてなければ
\r
1112 this.L最後に再生したHHの実WAV番号.Add( pChip.n整数値_内部番号 ); // ストックする
\r
1115 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1120 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号[index] );
\r
1122 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, nLane, n音量, bモニタ );
\r
1123 this.n最後に再生した実WAV番号[ nLane ] = pChip.n整数値_内部番号; // nLaneでなくindexにすると、LC(1A-11=09)とギター(enumで09)がかぶってLC音が消されるので注意
\r
1127 case E楽器パート.GUITAR:
\r
1128 #region [ GUITAR ]
\r
1129 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1130 if (CDTXMania.DTX.b演奏で直前の音を消音する.Guitar) {
\r
1132 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
1133 #if TEST_NOTEOFFMODE
\r
1136 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Guitar, n音量, bモニタ, b音程をずらして再生 );
\r
1137 this.n最後に再生した実WAV番号.Guitar = pChip.n整数値_内部番号;
\r
1142 #if TEST_NOTEOFFMODE
\r
1143 if (CDTXMania.DTX.b演奏で直前の音を消音する.Bass) {
\r
1145 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Bass );
\r
1146 #if TEST_NOTEOFFMODE
\r
1149 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Bass, n音量, bモニタ, b音程をずらして再生 );
\r
1150 this.n最後に再生した実WAV番号.Bass = pChip.n整数値_内部番号;
\r
1159 protected void tステータスパネルの選択()
\r
1161 if ( CDTXMania.bコンパクトモード )
\r
1163 this.actStatusPanels.tラベル名からステータスパネルを決定する( null );
\r
1165 else if ( CDTXMania.stage選曲.r確定された曲 != null )
\r
1167 this.actStatusPanels.tラベル名からステータスパネルを決定する( CDTXMania.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.stage選曲.n確定された曲の難易度 ] );
\r
1170 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip )
\r
1172 return tチップのヒット処理( nHitTime, pChip, true );
\r
1174 protected abstract E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, bool bCorrectLane );
\r
1175 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode ) // E楽器パート screenmode
\r
1177 return tチップのヒット処理( nHitTime, pChip, screenmode, true );
\r
1179 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode, bool bCorrectLane )
\r
1181 pChip.bHit = true;
\r
1182 #region [メソッド化する前の記述(注釈化)]
\r
1183 // bool bPChipIsAutoPlay = false;
\r
1184 // bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
1185 // bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
1186 // bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
1187 // bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
1188 // bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
1189 // if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
1191 // if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
1193 // bPChipIsAutoPlay = true;
\r
1196 // else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
1198 ////Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
1199 ////Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
1200 // bPChipIsAutoPlay = true;
\r
1201 // if ( !bIsAutoPlay[ (int) Eレーン.GtPick ] ) bPChipIsAutoPlay = false;
\r
1204 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.GtR ] ) bPChipIsAutoPlay = false;
\r
1205 // else if ( bGtBsG && !bIsAutoPlay[ (int) Eレーン.GtG ] ) bPChipIsAutoPlay = false;
\r
1206 // else if ( bGtBsB && !bIsAutoPlay[ (int) Eレーン.GtB ] ) bPChipIsAutoPlay = false;
\r
1207 // else if ( bGtBsW && !bIsAutoPlay[ (int) Eレーン.GtW ] ) bPChipIsAutoPlay = false;
\r
1208 // else if ( bGtBsO &&
\r
1209 // ( !bIsAutoPlay[ (int) Eレーン.GtR] || !bIsAutoPlay[ (int) Eレーン.GtG] || !bIsAutoPlay[ (int) Eレーン.GtB] ) )
\r
1210 // bPChipIsAutoPlay = false;
\r
1213 // else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
1215 // bPChipIsAutoPlay = true;
\r
1216 // if ( !bIsAutoPlay[ (int) Eレーン.BsPick ] ) bPChipIsAutoPlay = false;
\r
1219 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.BsR ] ) bPChipIsAutoPlay = false;
\r
1220 // else if ( bGtBsG && bIsAutoPlay[ (int) Eレーン.BsG ] ) bPChipIsAutoPlay = false;
\r
1221 // else if ( bGtBsB && bIsAutoPlay[ (int) Eレーン.BsB ] ) bPChipIsAutoPlay = false;
\r
1222 // else if ( bGtBsW && bIsAutoPlay[ (int) Eレーン.BsW ] ) bPChipIsAutoPlay = false;
\r
1223 // else if ( bGtBsO &&
\r
1224 // ( !bIsAutoPlay[ (int) Eレーン.BsR ] || !bIsAutoPlay[ (int) Eレーン.BsG ] || !bIsAutoPlay[ (int) Eレーン.BsB ] ) )
\r
1225 // bPChipIsAutoPlay = false;
\r
1230 // this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1232 ////Trace.TraceInformation( "ch={0:x2}, flag={1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
1234 if ( pChip.e楽器パート == E楽器パート.UNKNOWN )
\r
1236 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1240 cInvisibleChip.StartSemiInvisible( pChip.e楽器パート );
\r
1242 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1244 pChip.bIsAutoPlayed = bPChipIsAutoPlay; // 2011.6.10 yyagi
\r
1245 E判定 eJudgeResult = E判定.Auto;
\r
1247 // #35411 2015.08.20 chnmr0 modified (begin)
\r
1248 bool bIsPerfectGhost = CDTXMania.ConfigIni.eAutoGhost[(int)pChip.e楽器パート] == EAutoGhostData.PERFECT ||
\r
1249 CDTXMania.listAutoGhostLag[(int)pChip.e楽器パート] == null;
\r
1250 int nInputAdjustTime = bPChipIsAutoPlay && bIsPerfectGhost ? 0 : this.nInputAdjustTimeMs[(int)pChip.e楽器パート];
\r
1251 eJudgeResult = (bCorrectLane) ? this.e指定時刻からChipのJUDGEを返す(nHitTime, pChip, nInputAdjustTime) : E判定.Miss;
\r
1253 if( pChip.e楽器パート != E楽器パート.UNKNOWN )
\r
1255 int nChannel = -1;
\r
1256 switch( pChip.e楽器パート )
\r
1258 case E楽器パート.DRUMS:
\r
1259 nChannel = this.nチャンネル0Atoレーン07[pChip.nチャンネル番号 - 0x11];
\r
1261 case E楽器パート.GUITAR:
\r
1268 this.actJudgeString.Start(nChannel, bPChipIsAutoPlay && bIsPerfectGhost ? E判定.Auto : eJudgeResult, pChip.nLag);
\r
1272 if ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) )
\r
1274 // this.t判定にあわせてゲージを増減する( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1275 actGauge.Damage( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1277 if ( eJudgeResult == E判定.Poor || eJudgeResult == E判定.Miss || eJudgeResult == E判定.Bad )
\r
1279 cInvisibleChip.ShowChipTemporally( pChip.e楽器パート );
\r
1281 switch ( pChip.e楽器パート )
\r
1283 case E楽器パート.DRUMS:
\r
1284 switch ( eJudgeResult )
\r
1288 this.nヒット数_Auto含む.Drums.Miss++;
\r
1289 if ( !bPChipIsAutoPlay )
\r
1291 this.nヒット数_Auto含まない.Drums.Miss++;
\r
1295 this.nヒット数_Auto含む.Drums[ (int) eJudgeResult ]++;
\r
1296 if ( !bPChipIsAutoPlay )
\r
1298 this.nヒット数_Auto含まない.Drums[ (int) eJudgeResult ]++;
\r
1303 if ( CDTXMania.ConfigIni.bドラムが全部オートプレイである || !bPChipIsAutoPlay )
\r
1305 switch ( eJudgeResult )
\r
1310 this.actCombo.n現在のコンボ数.Drums++;
\r
1314 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1320 case E楽器パート.GUITAR:
\r
1322 int indexInst = (int) pChip.e楽器パート;
\r
1323 switch ( eJudgeResult )
\r
1327 this.nヒット数_Auto含む[ indexInst ].Miss++;
\r
1328 if ( !bPChipIsAutoPlay )
\r
1330 this.nヒット数_Auto含まない[ indexInst ].Miss++;
\r
1333 default: // #24068 2011.1.10 ikanick changed
\r
1334 // #24167 2011.1.16 yyagi changed
\r
1335 this.nヒット数_Auto含む[ indexInst ][ (int) eJudgeResult ]++;
\r
1336 if ( !bPChipIsAutoPlay )
\r
1338 this.nヒット数_Auto含まない[ indexInst ][ (int) eJudgeResult ]++;
\r
1342 switch ( eJudgeResult )
\r
1347 this.actCombo.n現在のコンボ数[ indexInst ]++;
\r
1351 this.actCombo.n現在のコンボ数[ indexInst ] = 0;
\r
1359 if ( ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) ) && ( eJudgeResult != E判定.Miss ) && ( eJudgeResult != E判定.Bad ) )
\r
1361 int nCombos = this.actCombo.n現在のコンボ数[ (int) pChip.e楽器パート ];
\r
1362 long nScoreDelta = 0;
\r
1363 long[] nComboScoreDelta = new long[] { 350L, 200L, 50L, 0L };
\r
1364 if ( ( nCombos <= 500 ) || ( eJudgeResult == E判定.Good ) )
\r
1366 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * nCombos;
\r
1368 else if ( ( eJudgeResult == E判定.Perfect ) || ( eJudgeResult == E判定.Great ) )
\r
1370 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * 500L;
\r
1372 this.actScore.Add( pChip.e楽器パート, bIsAutoPlay, nScoreDelta );
\r
1374 return eJudgeResult;
\r
1376 protected abstract void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part );
\r
1377 protected abstract void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part, int nLane );
\r
1378 protected void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part, E楽器パート screenmode )
\r
1380 this.tチップのヒット処理_BadならびにTight時のMiss( part, 0, screenmode );
\r
1382 protected void tチップのヒット処理_BadならびにTight時のMiss( E楽器パート part, int nLane, E楽器パート screenmode )
\r
1384 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1385 cInvisibleChip.StartSemiInvisible( part );
\r
1386 cInvisibleChip.ShowChipTemporally( part );
\r
1387 //this.t判定にあわせてゲージを増減する( screenmode, part, E判定.Miss );
\r
1388 actGauge.Damage( screenmode, part, E判定.Miss );
\r
1391 case E楽器パート.DRUMS:
\r
1392 if ( ( nLane >= 0 ) && ( nLane <= 7 ) )
\r
1394 this.actJudgeString.Start( nLane, bIsAutoPlay[ nLane ] ? E判定.Auto : E判定.Miss, 999 );
\r
1396 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1399 case E楽器パート.GUITAR:
\r
1400 this.actJudgeString.Start( 10, E判定.Bad, 999 );
\r
1401 this.actCombo.n現在のコンボ数.Guitar = 0;
\r
1405 this.actJudgeString.Start( 11, E判定.Bad, 999 );
\r
1406 this.actCombo.n現在のコンボ数.Bass = 0;
\r
1414 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannelFlag, int nInputAdjustTime )
\r
1416 return this.r指定時刻に一番近い未ヒットChip( nTime, nChannelFlag, nInputAdjustTime, 0 );
\r
1418 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannel, int nInputAdjustTime, int n検索範囲時間ms )
\r
1421 //Trace.TraceInformation( "nTime={0}, nChannel={1:x2}, 現在のTop={2}", nTime, nChannel,CDTXMania.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms );
\r
1422 nTime += nInputAdjustTime;
\r
1424 int nIndex_InitialPositionSearchingToPast;
\r
1426 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
1431 int count = listChip.Count;
\r
1432 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
1433 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
1435 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
1437 // int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToFuture;
\r
1438 // while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
1439 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++ )
\r
1441 CDTX.CChip chip = listChip[ nIndex_NearestChip_Future ];
\r
1444 if ( chip.b空打ちチップである )
\r
1448 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
1450 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1452 if ( chip.n発声時刻ms > nTime )
\r
1456 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1460 else if ( ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1462 if ( chip.n発声時刻ms > nTime )
\r
1466 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1468 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1470 if ( chip.n発声時刻ms > nTime )
\r
1474 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1477 // nIndex_NearestChip_Future++;
\r
1479 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
1480 // while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
1481 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
1483 CDTX.CChip chip = listChip[ nIndex_NearestChip_Past ];
\r
1484 if ( chip.b空打ちチップである )
\r
1488 if ( ( !chip.bHit ) &&
\r
1490 ( ( nChannel >= 0x11 ) && ( nChannel <= 0x1a ) &&
\r
1491 ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1495 ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) ||
\r
1496 ( ( ( nChannel >= 0x20 ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1500 ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) ||
\r
1501 ( ( ( nChannel >= 0xA0 ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1508 // nIndex_NearestChip_Past--;
\r
1510 if ( ( nIndex_NearestChip_Future >= count ) && ( nIndex_NearestChip_Past < 0 ) ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
1515 CDTX.CChip nearestChip; // = null; // 以下のifブロックのいずれかで必ずnearestChipには非nullが代入されるので、null初期化を削除
\r
1516 if ( nIndex_NearestChip_Future >= count ) // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
1518 nearestChip = listChip[ nIndex_NearestChip_Past ];
\r
1519 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1521 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
1523 nearestChip = listChip[ nIndex_NearestChip_Future ];
\r
1524 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1528 int nTimeDiff_Future = Math.Abs( (int) ( nTime - listChip[ nIndex_NearestChip_Future ].n発声時刻ms ) );
\r
1529 int nTimeDiff_Past = Math.Abs( (int) ( nTime - listChip[ nIndex_NearestChip_Past ].n発声時刻ms ) );
\r
1530 if ( nTimeDiff_Future < nTimeDiff_Past )
\r
1532 nearestChip = listChip[ nIndex_NearestChip_Future ];
\r
1533 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1537 nearestChip = listChip[ nIndex_NearestChip_Past ];
\r
1538 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1541 nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1542 if ( ( n検索範囲時間ms > 0 ) && ( nTimeDiff > n検索範囲時間ms ) ) // チップは見つかったが、検索範囲時間外だった場合
\r
1548 return nearestChip;
\r
1551 protected CDTX.CChip r次に来る指定楽器Chipを更新して返す( E楽器パート inst )
\r
1553 switch ( (int) inst )
\r
1555 case (int)E楽器パート.GUITAR:
\r
1556 return r次にくるギターChipを更新して返す();
\r
1557 case (int)E楽器パート.BASS:
\r
1558 return r次にくるベースChipを更新して返す();
\r
1563 protected CDTX.CChip r次にくるギターChipを更新して返す()
\r
1565 int nInputAdjustTime = this.bIsAutoPlay.GtPick ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1566 this.r次にくるギターChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0x2f, nInputAdjustTime, 500 );
\r
1567 return this.r次にくるギターChip;
\r
1569 protected CDTX.CChip r次にくるベースChipを更新して返す()
\r
1571 int nInputAdjustTime = this.bIsAutoPlay.BsPick ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1572 this.r次にくるベースChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0xaf, nInputAdjustTime, 500 );
\r
1573 return this.r次にくるベースChip;
\r
1576 protected void ChangeInputAdjustTimeInPlaying( IInputDevice keyboard, int plusminus ) // #23580 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1578 int part, offset = plusminus;
\r
1579 if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) ) // Guitar InputAdjustTime
\r
1581 part = (int) E楽器パート.GUITAR;
\r
1583 else if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftAlt ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightAlt ) ) // Bass InputAdjustTime
\r
1585 part = (int) E楽器パート.BASS;
\r
1587 else // Drums InputAdjustTime
\r
1589 part = (int) E楽器パート.DRUMS;
\r
1591 if ( !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) && !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) )
\r
1596 this.nInputAdjustTimeMs[ part ] += offset;
\r
1597 if ( this.nInputAdjustTimeMs[ part ] > 99 )
\r
1599 this.nInputAdjustTimeMs[ part ] = 99;
\r
1601 else if ( this.nInputAdjustTimeMs[ part ] < -99 )
\r
1603 this.nInputAdjustTimeMs[ part ] = -99;
\r
1605 CDTXMania.ConfigIni.nInputAdjustTimeMs[ part ] = this.nInputAdjustTimeMs[ part ];
\r
1608 protected abstract void t入力処理_ドラム();
\r
1609 protected abstract void ドラムスクロール速度アップ();
\r
1610 protected abstract void ドラムスクロール速度ダウン();
\r
1611 protected void tキー入力()
\r
1613 IInputDevice keyboard = CDTXMania.Input管理.Keyboard;
\r
1614 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) &&
\r
1615 ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1616 { // shift+f1 (pause)
\r
1617 this.bPAUSE = !this.bPAUSE;
\r
1618 if ( this.bPAUSE )
\r
1620 CSound管理.rc演奏用タイマ.t一時停止();
\r
1621 CDTXMania.Timer.t一時停止();
\r
1622 CDTXMania.DTX.t全チップの再生一時停止();
\r
1626 CSound管理.rc演奏用タイマ.t再開();
\r
1627 CDTXMania.Timer.t再開();
\r
1628 CDTXMania.DTX.t全チップの再生再開();
\r
1631 if ( ( !this.bPAUSE && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1634 this.t入力処理_ギターベース( E楽器パート.GUITAR );
\r
1635 this.t入力処理_ギターベース( E楽器パート.BASS );
\r
1636 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1637 { // shift (+ctrl) + UpArrow (BGMAdjust)
\r
1638 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? 1 : 10 );
\r
1639 CDTXMania.DTX.tWave再生位置自動補正();
\r
1641 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1642 { // shift + DownArrow (BGMAdjust)
\r
1643 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? -1 : -10 );
\r
1644 CDTXMania.DTX.tWave再生位置自動補正();
\r
1646 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) )
\r
1647 { // UpArrow(scrollspeed up)
\r
1650 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) )
\r
1651 { // DownArrow (scrollspeed down)
\r
1654 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Delete ) )
\r
1655 { // del (debug info)
\r
1656 CDTXMania.ConfigIni.b演奏情報を表示する = !CDTXMania.ConfigIni.b演奏情報を表示する;
\r
1658 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.LeftArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1660 ChangeInputAdjustTimeInPlaying( keyboard, -1 );
\r
1662 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1664 ChangeInputAdjustTimeInPlaying( keyboard, +1 );
\r
1666 else if ( ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) && ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || CDTXMania.Pad.b押されたGB( Eパッド.FT ) ) )
\r
1667 { // escape (exit)
\r
1668 this.actFO.tフェードアウト開始();
\r
1669 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
\r
1670 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.演奏中断;
\r
1675 protected void t入力メソッド記憶( E楽器パート part )
\r
1677 if ( CDTXMania.Pad.st検知したデバイス.Keyboard )
\r
1679 this.b演奏にキーボードを使った[ (int) part ] = true;
\r
1681 if ( CDTXMania.Pad.st検知したデバイス.Joypad )
\r
1683 this.b演奏にジョイパッドを使った[ (int) part ] = true;
\r
1685 if ( CDTXMania.Pad.st検知したデバイス.MIDIIN )
\r
1687 this.b演奏にMIDI入力を使った[ (int) part ] = true;
\r
1689 if ( CDTXMania.Pad.st検知したデバイス.Mouse )
\r
1691 this.b演奏にマウスを使った[ (int) part ] = true;
\r
1694 protected abstract void t進行描画_AVI();
\r
1695 protected void t進行描画_AVI(int x, int y)
\r
1697 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bAVI有効 ) )
\r
1699 this.actAVI.t進行描画(x, y, 556, 710);
\r
1702 protected abstract void t進行描画_BGA();
\r
1703 protected void t進行描画_BGA(int x, int y)
\r
1705 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bBGA有効 ) )
\r
1707 this.actBGA.t進行描画( x, y );
\r
1710 protected abstract void t進行描画_DANGER();
\r
1711 protected void t進行描画_MIDIBGM()
\r
1713 if ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED )
\r
1715 CStage.Eフェーズ eフェーズid1 = base.eフェーズID;
\r
1718 protected void t進行描画_RGBボタン()
\r
1720 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
1722 this.actRGB.t進行描画( 演奏判定ライン座標 );
\r
1725 protected void t進行描画_STAGEFAILED()
\r
1727 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
1729 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.ステージ失敗;
\r
1730 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト;
\r
1731 this.actFO.tフェードアウト開始();
\r
1734 protected void t進行描画_WailingBonus()
\r
1736 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1738 this.actWailingBonus.On進行描画();
\r
1741 protected abstract void t進行描画_Wailing枠();
\r
1742 protected void t進行描画_Wailing枠(int GtWailingFrameX, int BsWailingFrameX, int GtWailingFrameY, int BsWailingFrameY)
\r
1744 if ( ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
1746 if ( this.txWailing枠 != null )
\r
1748 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
1750 this.txWailing枠.t2D描画( CDTXMania.app.Device, GtWailingFrameX, GtWailingFrameY );
\r
1752 if ( CDTXMania.DTX.bチップがある.Bass )
\r
1754 this.txWailing枠.t2D描画( CDTXMania.app.Device, BsWailingFrameX, BsWailingFrameY );
\r
1761 protected void t進行描画_チップファイアGB()
\r
1763 this.actChipFireGB.On進行描画();
\r
1765 protected abstract void t進行描画_パネル文字列();
\r
1766 protected void t進行描画_パネル文字列(int x, int y)
\r
1768 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1770 this.actPanel.t進行描画( x, y );
\r
1773 protected void tパネル文字列の設定()
\r
1775 this.actPanel.SetPanelString( string.IsNullOrEmpty( CDTXMania.DTX.PANEL ) ? CDTXMania.DTX.TITLE : CDTXMania.DTX.PANEL );
\r
1779 protected void t進行描画_ゲージ()
\r
1781 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
1783 this.actGauge.On進行描画();
\r
1786 protected void t進行描画_コンボ()
\r
1788 this.actCombo.On進行描画();
\r
1790 protected void t進行描画_スコア()
\r
1792 this.actScore.On進行描画();
\r
1794 protected void t進行描画_ステータスパネル()
\r
1796 this.actStatusPanels.On進行描画();
\r
1798 protected bool t進行描画_チップ( E楽器パート ePlayMode )
\r
1800 if ( ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED ) || ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1804 if ( ( this.n現在のトップChip == -1 ) || ( this.n現在のトップChip >= listChip.Count ) )
\r
1808 if ( this.n現在のトップChip == -1 )
\r
1813 //double speed = 264.0; // BPM150の時の1小節の長さ[dot]
\r
1814 const double speed = 234.0 * Scale.Y; // BPM150の時の1小節の長さ[dot]
\r
1816 double ScrollSpeedDrums = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Drums + 1.0 ) * 0.5 * 37.5 * speed / 60000.0;
\r
1817 double ScrollSpeedGuitar = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Guitar + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1818 double ScrollSpeedBass = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Bass + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1820 CDTX dTX = CDTXMania.DTX;
\r
1821 CConfigIni configIni = CDTXMania.ConfigIni;
\r
1822 for ( int nCurrentTopChip = this.n現在のトップChip; nCurrentTopChip < dTX.listChip.Count; nCurrentTopChip++ )
\r
1824 CDTX.CChip pChip = dTX.listChip[ nCurrentTopChip ];
\r
1825 //Debug.WriteLine( "nCurrentTopChip=" + nCurrentTopChip + ", ch=" + pChip.nチャンネル番号.ToString("x2") + ", 発音位置=" + pChip.n発声位置 + ", 発声時刻ms=" + pChip.n発声時刻ms );
\r
1826 pChip.nバーからの距離dot.Drums = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedDrums );
\r
1827 pChip.nバーからの距離dot.Guitar = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedGuitar );
\r
1828 pChip.nバーからの距離dot.Bass = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedBass );
\r
1829 if ( Math.Min( Math.Min( pChip.nバーからの距離dot.Drums, pChip.nバーからの距離dot.Guitar ), pChip.nバーからの距離dot.Bass ) > 450 * Scale.Y )
\r
1833 // if ( ( ( nCurrentTopChip == this.n現在のトップChip ) && ( pChip.nバーからの距離dot.Drums < -65 ) ) && pChip.bHit )
\r
1834 // #28026 2012.4.5 yyagi; 信心ワールドエンドの曲終了後リザルトになかなか行かない問題の修正
\r
1836 if (( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Drums < -65 * Scale.Y ) && // 小節線の消失処理などに影響するため、
\r
1837 ( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Guitar < -65 * Scale.Y ) && // Drumsのスクロールスピードだけには依存させない。
\r
1838 ( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Bass < -65 * Scale.Y ) &&
\r
1839 dTX.listChip[ this.n現在のトップChip ].bHit )
\r
1841 // nCurrentTopChip = ++this.n現在のトップChip;
\r
1842 ++this.n現在のトップChip;
\r
1845 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1847 int nInputAdjustTime = ( bPChipIsAutoPlay || (pChip.e楽器パート == E楽器パート.UNKNOWN) )? 0 : this.nInputAdjustTimeMs[ (int) pChip.e楽器パート ];
\r
1849 int instIndex = (int) pChip.e楽器パート;
\r
1850 if ( ( ( pChip.e楽器パート != E楽器パート.UNKNOWN ) && !pChip.bHit ) &&
\r
1851 ( ( pChip.nバーからの距離dot[ instIndex ] < -40 * Scale.Y ) && ( this.e指定時刻からChipのJUDGEを返す( CSound管理.rc演奏用タイマ.n現在時刻, pChip, nInputAdjustTime ) == E判定.Miss ) ) )
\r
1853 this.tチップのヒット処理( CSound管理.rc演奏用タイマ.n現在時刻, pChip );
\r
1856 // #35411 chnmr0 add (ターゲットゴースト)
\r
1857 if ( CDTXMania.ConfigIni.eTargetGhost[instIndex] != ETargetGhostData.NONE &&
\r
1858 CDTXMania.listTargetGhsotLag[instIndex] != null &&
\r
1859 pChip.e楽器パート != E楽器パート.UNKNOWN &&
\r
1860 pChip.nバーからの距離dot[instIndex] < 0 )
\r
1862 if ( !pChip.bTargetGhost判定済み )
\r
1864 pChip.bTargetGhost判定済み = true;
\r
1866 int ghostLag = 128;
\r
1867 if( 0 <= pChip.n楽器パートでの出現順 && pChip.n楽器パートでの出現順 < CDTXMania.listTargetGhsotLag[instIndex].Count )
\r
1869 ghostLag = CDTXMania.listTargetGhsotLag[instIndex][pChip.n楽器パートでの出現順];
\r
1870 // 上位8ビットが1ならコンボが途切れている(ギターBAD空打ちでコンボ数を再現するための措置)
\r
1871 if( ghostLag > 255 )
\r
1873 this.nコンボ数_TargetGhost[instIndex] = 0;
\r
1875 ghostLag = (ghostLag & 255) - 128;
\r
1877 else if( CDTXMania.ConfigIni.eTargetGhost[instIndex] == ETargetGhostData.PERFECT )
\r
1882 if ( ghostLag <= 127 )
\r
1884 E判定 eJudge = this.e指定時刻からChipのJUDGEを返す(pChip.n発声時刻ms + ghostLag , pChip, 0, false);
\r
1885 this.nヒット数_TargetGhost[instIndex][(int)eJudge]++;
\r
1886 if (eJudge == E判定.Miss || eJudge == E判定.Poor)
\r
1888 this.n最大コンボ数_TargetGhost[instIndex] = Math.Max(this.n最大コンボ数_TargetGhost[instIndex], this.nコンボ数_TargetGhost[instIndex]);
\r
1889 this.nコンボ数_TargetGhost[instIndex] = 0;
\r
1893 this.nコンボ数_TargetGhost[instIndex]++;
\r
1899 switch ( pChip.nチャンネル番号 )
\r
1901 #region [ 01: BGM ]
\r
1903 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1905 pChip.bHit = true;
\r
1906 if ( configIni.bBGM音を発声する )
\r
1908 //long t = CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms;
\r
1909 //Trace.TraceInformation( "BGM再生開始: 演奏タイマのn前回リセットしたときのシステム時刻=" + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + ", pChip.n発生時刻ms=" + pChip.n発声時刻ms + ", 合計=" + t );
\r
1910 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
1915 #region [ 03: BPM変更 ]
\r
1916 case 0x03: // BPM変更
\r
1917 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1919 pChip.bHit = true;
\r
1920 this.actPlayInfo.dbBPM = ( pChip.n整数値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1924 #region [ 04, 07, 55, 56,57, 58, 59, 60:レイヤーBGA ]
\r
1925 case 0x04: // レイヤーBGA
\r
1933 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1935 pChip.bHit = true;
\r
1936 if ( configIni.bBGA有効 )
\r
1938 switch ( pChip.eBGA種別 )
\r
1940 case EBGA種別.BMPTEX:
\r
1941 if ( pChip.rBMPTEX != null )
\r
1943 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
1948 if ( ( pChip.rBGA != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1950 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
1954 case EBGA種別.BGAPAN:
\r
1955 if ( ( pChip.rBGAPan != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1957 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
1962 if ( pChip.rBMP != null )
\r
1964 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
1972 #region [ 08: BPM変更(拡張) ]
\r
1973 case 0x08: // BPM変更(拡張)
\r
1974 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1976 pChip.bHit = true;
\r
1977 if ( dTX.listBPM.ContainsKey( pChip.n整数値_内部番号 ) )
\r
1979 this.actPlayInfo.dbBPM = ( dTX.listBPM[ pChip.n整数値_内部番号 ].dbBPM値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1984 #region [ 11-1a: ドラム演奏 ]
\r
1985 case 0x11: // ドラム演奏
\r
1995 if ( pChip.b空打ちチップである )
\r
1997 this.t進行描画_チップ_空打ち音設定_ドラム( configIni, ref dTX, ref pChip );
\r
2001 this.t進行描画_チップ_ドラムス( configIni, ref dTX, ref pChip );
\r
2005 #region [ 1f: フィルインサウンド(ドラム) ]
\r
2006 case 0x1f: // フィルインサウンド(ドラム)
\r
2007 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2009 pChip.bHit = true;
\r
2010 this.r現在の歓声Chip.Drums = pChip;
\r
2014 #region [ 20-27: ギター演奏 ]
\r
2015 case 0x20: // ギター演奏
\r
2023 this.t進行描画_チップ_ギターベース( configIni, ref dTX, ref pChip, E楽器パート.GUITAR );
\r
2026 #region [ 28: ウェイリング(ギター) ]
\r
2027 case 0x28: // ウェイリング(ギター)
\r
2028 this.t進行描画_チップ_ギター_ウェイリング( configIni, ref dTX, ref pChip, !CDTXMania.ConfigIni.bDrums有効 );
\r
2031 #region [ 2f: ウェイリングサウンド(ギター) ]
\r
2032 case 0x2f: // ウェイリングサウンド(ギター)
\r
2033 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2035 pChip.bHit = true;
\r
2036 this.r現在の歓声Chip.Guitar = pChip;
\r
2040 #region [ 31-3a: 不可視チップ配置(ドラム) ]
\r
2041 case 0x31: // 不可視チップ配置(ドラム)
\r
2051 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2053 pChip.bHit = true;
\r
2057 #region [ 50: 小節線 ]
\r
2060 this.t進行描画_チップ_小節線( configIni, ref dTX, ref pChip );
\r
2064 #region [ 51: 拍線 ]
\r
2066 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2068 pChip.bHit = true;
\r
2070 if ( ( ePlayMode == E楽器パート.DRUMS ) && ( configIni.eDark != Eダークモード.FULL ) && pChip.b可視 && ( this.txチップ != null ) )
\r
2072 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2074 configIni.bReverse.Drums ?
\r
2075 //(int) ( ( ( 0x38 + pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ) :
\r
2076 //(int) ( ( ( 0x1a6 - pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ),
\r
2077 (int) ( 0x37 * Scale.Y + pChip.nバーからの距離dot.Drums ) :
\r
2078 (int) ( 0x1a5 * Scale.Y - pChip.nバーからの距離dot.Drums ),
\r
2079 new Rectangle( 0, (int) ( 0x1bf * Scale.Y ), (int) ( 0x128 * Scale.X ), (int) ( 1 * Scale.Y ) )
\r
2084 #region [ 52: MIDIコーラス ]
\r
2085 case 0x52: // MIDIコーラス
\r
2086 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2088 pChip.bHit = true;
\r
2092 #region [ 53: フィルイン ]
\r
2093 case 0x53: // フィルイン
\r
2094 this.t進行描画_チップ_フィルイン( configIni, ref dTX, ref pChip );
\r
2097 #region [ 54: 動画再生(BGA領域), 5A: 動画再生(全画面) ]
\r
2098 case (int) Ech定義.Movie: // 動画再生 (BGA領域)
\r
2099 case (int) Ech定義.MovieFull: // 動画再生 (全画面)
\r
2100 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2102 pChip.bHit = true;
\r
2103 if ( configIni.bAVI有効 )
\r
2105 if ( CDTXMania.DTX.bチップがある.BGA )
\r
2107 this.actAVI.bHasBGA = true;
\r
2109 if ( pChip.nチャンネル番号 == (int) Ech定義.MovieFull || CDTXMania.ConfigIni.bForceAVIFullscreen )
\r
2111 this.actAVI.bFullScreenMovie = true;
\r
2113 switch ( pChip.eAVI種別 )
\r
2116 //if ( pChip.rAVI != null )
\r
2118 //int startWidth = ( CDTXMania.DTX.bチップがある.BGA ) ? 278 : SampleFramework.GameWindowSize.Width;
\r
2119 //int startHeight = ( CDTXMania.DTX.bチップがある.BGA ) ? 355 : SampleFramework.GameWindowSize.Height;
\r
2120 int startWidth = !this.actAVI.bFullScreenMovie ? 278 : SampleFramework.GameWindowSize.Width;
\r
2121 int startHeight = !this.actAVI.bFullScreenMovie ? 355 : SampleFramework.GameWindowSize.Height;
\r
2122 this.actAVI.Start( pChip.nチャンネル番号, pChip.rAVI, startWidth, startHeight, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pChip.n発声時刻ms );
\r
2126 case EAVI種別.AVIPAN:
\r
2127 if ( pChip.rAVIPan != null )
\r
2129 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
2137 #region [ 61-92: 自動再生(BGM, SE) ]
\r
2141 case 0x64: // 自動再生(BGM, SE)
\r
2164 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2166 pChip.bHit = true;
\r
2167 if ( configIni.bBGM音を発声する )
\r
2169 dTX.tWavの再生停止( this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] );
\r
2170 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, ( int ) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
2171 this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] = pChip.n整数値_内部番号;
\r
2178 #region [ 84-89: 仮: override sound ] // #26338 2011.11.8 yyagi
\r
2179 case 0x84: // HH (HO/HC)
\r
2183 case 0x88: // Guitar
\r
2184 case 0x89: // Bass
\r
2185 // mute sound (auto)
\r
2186 // 4A: 84: HH (HO/HC)
\r
2193 // CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
2194 // CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, 8, n音量, bモニタ, b音程をずらして再生 );
\r
2195 // this.n最後に再生した実WAV番号.Guitar = pChip.n整数値_内部番号;
\r
2197 // protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
2198 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2200 pChip.bHit = true;
\r
2201 E楽器パート[] p = { E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.GUITAR, E楽器パート.BASS };
\r
2203 E楽器パート pp = p[ pChip.nチャンネル番号 - 0x84 ];
\r
2205 // if ( pp == E楽器パート.DRUMS ) { // pChip.nチャンネル番号= ..... HHとか、ドラムの場合は変える。
\r
2207 // int[] ch = { 0x11, 0x16, 0x19, 0x1A };
\r
2208 // pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x84 ];
\r
2210 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, pp, dTX.nモニタを考慮した音量( pp ) );
\r
2215 #region [ a0-a7: ベース演奏 ]
\r
2216 case 0xa0: // ベース演奏
\r
2224 this.t進行描画_チップ_ギターベース( configIni, ref dTX, ref pChip, E楽器パート.BASS );
\r
2227 #region [ a8: ウェイリング(ベース) ]
\r
2228 case 0xa8: // ウェイリング(ベース)
\r
2229 this.t進行描画_チップ_ベース_ウェイリング( configIni, ref dTX, ref pChip, !CDTXMania.ConfigIni.bDrums有効 );
\r
2232 #region [ af: ウェイリングサウンド(ベース) ]
\r
2233 case 0xaf: // ウェイリングサウンド(ベース)
\r
2234 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
2236 pChip.bHit = true;
\r
2237 this.r現在の歓声Chip.Bass = pChip;
\r
2241 #region [ b1-b9, bc: 空打ち音設定(ドラム) ]
\r
2242 case 0xb1: // 空打ち音設定(ドラム)
\r
2252 // ここには来なくなったはずだが、一応残しておく
\r
2253 this.t進行描画_チップ_空打ち音設定_ドラム( configIni, ref dTX, ref pChip );
\r
2256 #region [ ba: 空打ち音設定(ギター) ]
\r
2257 case 0xba: // 空打ち音設定(ギター)
\r
2258 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2260 pChip.bHit = true;
\r
2261 this.r現在の空うちギターChip = pChip;
\r
2262 pChip.nチャンネル番号 = 0x20;
\r
2266 #region [ bb: 空打ち音設定(ベース) ]
\r
2267 case 0xbb: // 空打ち音設定(ベース)
\r
2268 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
2270 pChip.bHit = true;
\r
2271 this.r現在の空うちベースChip = pChip;
\r
2272 pChip.nチャンネル番号 = 0xA0;
\r
2276 #region [ c4, c7, d5-d9, e0: BGA画像入れ替え ]
\r
2280 case 0xd6: // BGA画像入れ替え
\r
2285 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2287 pChip.bHit = true;
\r
2288 if ( ( configIni.bBGA有効 && ( pChip.eBGA種別 == EBGA種別.BMP ) ) || ( pChip.eBGA種別 == EBGA種別.BMPTEX ) )
\r
2290 for ( int i = 0; i < 8; i++ )
\r
2292 if ( this.nBGAスコープチャンネルマップ[ 0, i ] == pChip.nチャンネル番号 )
\r
2294 this.actBGA.ChangeScope( this.nBGAスコープチャンネルマップ[ 1, i ], pChip.rBMP, pChip.rBMPTEX );
\r
2301 #region [ da: ミキサーへチップ音追加 ]
\r
2303 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2305 //Debug.WriteLine( "[DA(AddMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2306 pChip.bHit = true;
\r
2307 if ( listWAV.ContainsKey( pChip.n整数値_内部番号 ) ) // 参照が遠いので後日最適化する
\r
2309 CDTX.CWAV wc = listWAV[ pChip.n整数値_内部番号 ];
\r
2310 //Debug.Write( "[AddMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2312 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2314 if ( wc.rSound[ i ] != null )
\r
2316 //CDTXMania.Sound管理.AddMixer( wc.rSound[ i ] );
\r
2317 AddMixer( wc.rSound[ i ], pChip.b演奏終了後も再生が続くチップである );
\r
2321 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2324 //if ( i == nPolyphonicSounds - 1 )
\r
2326 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2333 #region [ db: ミキサーからチップ音削除 ]
\r
2335 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2337 //Debug.WriteLine( "[DB(RemoveMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2338 pChip.bHit = true;
\r
2339 if ( listWAV.ContainsKey( pChip.n整数値_内部番号) ) // 参照が遠いので後日最適化する
\r
2341 CDTX.CWAV wc = listWAV[ pChip.n整数値_内部番号];
\r
2342 //Debug.Write( "[DelMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2343 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2345 if ( wc.rSound[ i ] != null )
\r
2347 //CDTXMania.Sound管理.RemoveMixer( wc.rSound[ i ] );
\r
2348 if ( !wc.rSound[ i ].b演奏終了後も再生が続くチップである ) // #32248 2013.10.16 yyagi
\r
2349 { // DTX終了後も再生が続くチップの0xDB登録をなくすことはできず。
\r
2350 RemoveMixer( wc.rSound[ i ] ); // (ミキサー解除のタイミングが遅延する場合の対応が面倒なので。)
\r
2351 } // そこで、代わりにフラグをチェックしてミキサー削除ロジックへの遷移をカットする。
\r
2355 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2358 //if ( i == nPolyphonicSounds - 1 )
\r
2360 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2367 #region [ その他(未定義) ]
\r
2369 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2371 pChip.bHit = true;
\r
2380 public void t再読込()
\r
2382 CDTXMania.DTX.t全チップの再生停止とミキサーからの削除();
\r
2383 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.再読込_再演奏;
\r
2384 base.eフェーズID = CStage.Eフェーズ.演奏_再読込;
\r
2385 this.bPAUSE = false;
\r
2387 // #34048 2014.7.16 yyagi
\r
2388 #region [ 読み込み画面に遷移する前に、設定変更した可能性があるパラメータをConfigIniクラスに書き戻す ]
\r
2389 for ( int i = 0; i < 3; i++ )
\r
2391 CDTXMania.ConfigIni.nViewerScrollSpeed[ i ] = CDTXMania.ConfigIni.n譜面スクロール速度[ i ];
\r
2393 CDTXMania.ConfigIni.b演奏情報を表示する = CDTXMania.ConfigIni.bViewerShowDebugStatus;
\r
2399 CDTXMania.DTX.t全チップの再生停止とミキサーからの削除();
\r
2400 this.actAVI.Stop();
\r
2401 this.actBGA.Stop();
\r
2402 this.actPanel.Stop(); // PANEL表示停止
\r
2403 CDTXMania.Timer.t一時停止(); // 再生時刻カウンタ停止
\r
2405 this.n現在のトップChip = CDTXMania.DTX.listChip.Count - 1; // 終端にシーク
\r
2407 // 自分自身のOn活性化()相当の処理もすべき。
\r
2410 public void t演奏位置の変更( int nStartBar )
\r
2413 CDTXMania.DTX.t全チップの再生停止();
\r
2414 this.actAVI.Stop();
\r
2415 this.actBGA.Stop();
\r
2417 #region [ 再生開始小節の変更 ]
\r
2418 nStartBar++; // +1が必要
\r
2420 #region [ 演奏済みフラグのついたChipをリセットする ]
\r
2421 for ( int i = 0; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2423 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2426 CDTX.CChip p = (CDTX.CChip) pChip.Clone();
\r
2428 CDTXMania.DTX.listChip[ i ] = p;
\r
2433 #region [ 処理を開始するチップの特定 ]
\r
2434 //for ( int i = this.n現在のトップChip; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2435 bool bSuccessSeek = false;
\r
2436 for ( int i = 0; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2438 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2439 if ( pChip.n発声位置 < 384 * nStartBar )
\r
2445 bSuccessSeek = true;
\r
2446 this.n現在のトップChip = i;
\r
2450 if ( !bSuccessSeek )
\r
2452 // this.n現在のトップChip = CDTXMania.DTX.listChip.Count - 1;
\r
2453 this.n現在のトップChip = 0; // 対象小節が存在しないなら、最初から再生
\r
2457 #region [ 演奏開始の発声時刻msを取得し、タイマに設定 ]
\r
2458 int nStartTime = CDTXMania.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms;
\r
2460 CSound管理.rc演奏用タイマ.tリセット(); // これでPAUSE解除されるので、次のPAUSEチェックは不要
\r
2461 //if ( !this.bPAUSE )
\r
2463 CSound管理.rc演奏用タイマ.t一時停止();
\r
2465 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2468 List<CSound> pausedCSound = new List<CSound>();
\r
2470 #region [ BGMやギターなど、演奏開始のタイミングで再生がかかっているサウンドのの途中再生開始 ] // (CDTXのt入力・行解析・チップ配置()で小節番号が+1されているのを削っておくこと)
\r
2471 for ( int i = this.n現在のトップChip; i >= 0; i-- )
\r
2473 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2474 int nDuration = pChip.GetDuration();
\r
2476 if ( ( pChip.n発声時刻ms + nDuration > 0 ) && ( pChip.n発声時刻ms <= nStartTime ) && ( nStartTime <= pChip.n発声時刻ms + nDuration ) )
\r
2478 if ( pChip.bWAVを使うチャンネルである && !pChip.b空打ちチップである ) // wav系チャンネル、且つ、空打ちチップではない
\r
2481 bool b = CDTXMania.DTX.listWAV.TryGetValue( pChip.n整数値_内部番号, out wc );
\r
2482 if ( !b ) continue;
\r
2484 if ( ( wc.bIsBGMSound && CDTXMania.ConfigIni.bBGM音を発声する ) || ( !wc.bIsBGMSound ) )
\r
2486 CDTXMania.DTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int) Eレーン.BGM, CDTXMania.DTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
2487 #region [ PAUSEする ]
\r
2488 int j = wc.n現在再生中のサウンド番号;
\r
2489 if ( wc.rSound[ j ] != null )
\r
2491 wc.rSound[ j ].t再生を一時停止する();
\r
2492 wc.rSound[ j ].t再生位置を変更する( nStartTime - pChip.n発声時刻ms );
\r
2493 pausedCSound.Add( wc.rSound[ j ] );
\r
2501 #region [ 演奏開始時点で既に表示されているBGAとAVIの、シークと再生 ]
\r
2502 this.actBGA.SkipStart( nStartTime );
\r
2503 this.actAVI.SkipStart( nStartTime );
\r
2505 #region [ PAUSEしていたサウンドを一斉に再生再開する(ただしタイマを止めているので、ここではまだ再生開始しない) ]
\r
2506 foreach ( CSound cs in pausedCSound )
\r
2510 pausedCSound.Clear();
\r
2511 pausedCSound = null;
\r
2513 #region [ タイマを再開して、PAUSEから復帰する ]
\r
2514 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2515 CDTXMania.Timer.tリセット(); // これでPAUSE解除されるので、3行先の再開()は不要
\r
2516 CDTXMania.Timer.n現在時刻 = nStartTime; // Debug表示のTime: 表記を正しくするために必要
\r
2517 CSound管理.rc演奏用タイマ.t再開();
\r
2518 //CDTXMania.Timer.t再開();
\r
2519 this.bPAUSE = false; // システムがPAUSE状態だったら、強制解除
\r
2520 this.actPanel.Start();
\r
2527 /// DTXV用の設定をする。(全AUTOなど)
\r
2528 /// 元の設定のバックアップなどはしないので、あとでConfig.iniを上書き保存しないこと。
\r
2530 protected void tDTXV用の設定()
\r
2532 CDTXMania.ConfigIni.bAutoPlay.HH = true;
\r
2533 CDTXMania.ConfigIni.bAutoPlay.SD = true;
\r
2534 CDTXMania.ConfigIni.bAutoPlay.BD = true;
\r
2535 CDTXMania.ConfigIni.bAutoPlay.HT = true;
\r
2536 CDTXMania.ConfigIni.bAutoPlay.LT = true;
\r
2537 CDTXMania.ConfigIni.bAutoPlay.CY = true;
\r
2538 CDTXMania.ConfigIni.bAutoPlay.FT = true;
\r
2539 CDTXMania.ConfigIni.bAutoPlay.RD = true;
\r
2540 CDTXMania.ConfigIni.bAutoPlay.LC = true;
\r
2541 CDTXMania.ConfigIni.bAutoPlay.GtR = true;
\r
2542 CDTXMania.ConfigIni.bAutoPlay.GtG = true;
\r
2543 CDTXMania.ConfigIni.bAutoPlay.GtB = true;
\r
2544 CDTXMania.ConfigIni.bAutoPlay.GtPick = true;
\r
2545 CDTXMania.ConfigIni.bAutoPlay.GtW = true;
\r
2546 CDTXMania.ConfigIni.bAutoPlay.BsR = true;
\r
2547 CDTXMania.ConfigIni.bAutoPlay.BsG = true;
\r
2548 CDTXMania.ConfigIni.bAutoPlay.BsB = true;
\r
2549 CDTXMania.ConfigIni.bAutoPlay.BsPick = true;
\r
2550 CDTXMania.ConfigIni.bAutoPlay.BsW = true;
\r
2552 this.bIsAutoPlay = CDTXMania.ConfigIni.bAutoPlay;
\r
2554 CDTXMania.ConfigIni.bAVI有効 = true;
\r
2555 CDTXMania.ConfigIni.bBGA有効 = true;
\r
2556 for ( int i = 0; i < 3; i++ )
\r
2558 CDTXMania.ConfigIni.bGraph[ i ] = false;
\r
2559 CDTXMania.ConfigIni.bHidden[ i ] = false;
\r
2560 CDTXMania.ConfigIni.bLeft[ i ] = false;
\r
2561 CDTXMania.ConfigIni.bLight[ i ] = false;
\r
2562 CDTXMania.ConfigIni.bReverse[ i ] = false;
\r
2563 CDTXMania.ConfigIni.bSudden[ i ] = false;
\r
2564 CDTXMania.ConfigIni.eInvisible[ i ] = EInvisible.OFF;
\r
2565 CDTXMania.ConfigIni.eRandom[ i ] = Eランダムモード.OFF;
\r
2566 CDTXMania.ConfigIni.n表示可能な最小コンボ数[ i ] = 65535;
\r
2567 CDTXMania.ConfigIni.判定文字表示位置[ i ] = E判定文字表示位置.表示OFF;
\r
2568 // CDTXMania.ConfigIni.n譜面スクロール速度[ i ] = CDTXMania.ConfigIni.nViewerScrollSpeed[ i ]; // これだけはOn活性化()で行うこと。
\r
2569 // そうしないと、演奏開始直後にスクロール速度が変化して見苦しい。
\r
2572 CDTXMania.ConfigIni.eDark = Eダークモード.OFF;
\r
2574 CDTXMania.ConfigIni.b演奏情報を表示する = CDTXMania.ConfigIni.bViewerShowDebugStatus;
\r
2575 CDTXMania.ConfigIni.bフィルイン有効 = true;
\r
2576 CDTXMania.ConfigIni.bScoreIniを出力する = false;
\r
2577 CDTXMania.ConfigIni.bSTAGEFAILED有効 = false;
\r
2578 CDTXMania.ConfigIni.bTight = false;
\r
2579 CDTXMania.ConfigIni.bストイックモード = false;
\r
2580 CDTXMania.ConfigIni.bドラム打音を発声する = true;
\r
2581 CDTXMania.ConfigIni.bBGM音を発声する = true;
\r
2583 CDTXMania.ConfigIni.nRisky = 0;
\r
2584 CDTXMania.ConfigIni.nShowLagType = 0;
\r
2585 CDTXMania.ConfigIni.ドラムコンボ文字の表示位置 = Eドラムコンボ文字の表示位置.OFF;
\r
2589 private bool bCheckAutoPlay( CDTX.CChip pChip )
\r
2591 bool bPChipIsAutoPlay = false;
\r
2592 bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2593 bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2594 bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2595 bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2596 bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2598 // ( ( pChip.e楽器パート == E楽器パート.DRUMS ) && bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ) ||
\r
2599 // ( ( pChip.e楽器パート == E楽器パート.GUITAR ) && bIsAutoPlay.Guitar ) ) ||
\r
2600 // ( ( pChip.e楽器パート == E楽器パート.BASS ) && bIsAutoPlay.Bass )
\r
2602 //// if ((pChip.e楽器パート == E楽器パート.DRUMS) && bIsAutoPlay[this.nチャンネル0Atoレーン07[pChip.nチャンネル番号 - 0x11]])
\r
2604 // bPChipIsAutoPlay = true;
\r
2606 if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
2608 if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
2610 bPChipIsAutoPlay = true;
\r
2613 else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
2615 //Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
2616 //Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
2617 bPChipIsAutoPlay = true;
\r
2618 if ( bIsAutoPlay[ (int) Eレーン.GtPick ] == false ) bPChipIsAutoPlay = false;
\r
2621 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.GtR ] == false ) bPChipIsAutoPlay = false;
\r
2622 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.GtG ] == false ) bPChipIsAutoPlay = false;
\r
2623 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.GtB ] == false ) bPChipIsAutoPlay = false;
\r
2624 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.GtW ] == false ) bPChipIsAutoPlay = false;
\r
2625 else if ( bGtBsO == true &&
\r
2626 ( bIsAutoPlay[ (int) Eレーン.GtR ] == false || bIsAutoPlay[ (int) Eレーン.GtG ] == false || bIsAutoPlay[ (int) Eレーン.GtB ] == false ) )
\r
2627 bPChipIsAutoPlay = false;
\r
2629 //Trace.TraceInformation( "{0:x2}: {1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
2631 else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
2633 bPChipIsAutoPlay = true;
\r
2634 if ( bIsAutoPlay[ (int) Eレーン.BsPick ] == false ) bPChipIsAutoPlay = false;
\r
2637 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.BsR ] == false ) bPChipIsAutoPlay = false;
\r
2638 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.BsG ] == false ) bPChipIsAutoPlay = false;
\r
2639 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.BsB ] == false ) bPChipIsAutoPlay = false;
\r
2640 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.BsW ] == false ) bPChipIsAutoPlay = false;
\r
2641 else if ( bGtBsO == true &&
\r
2642 ( bIsAutoPlay[ (int) Eレーン.BsR ] == false || bIsAutoPlay[ (int) Eレーン.BsG ] == false || bIsAutoPlay[ (int) Eレーン.BsB ] == false ) )
\r
2643 bPChipIsAutoPlay = false;
\r
2646 return bPChipIsAutoPlay;
\r
2649 protected abstract void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2650 //protected abstract void t進行描画_チップ_ギター( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2651 protected abstract void t進行描画_チップ_ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst );
\r
2655 /// <param name="configIni"></param>
\r
2656 /// <param name="dTX"></param>
\r
2657 /// <param name="pChip">描画するチップ</param>
\r
2658 /// <param name="inst">楽器種別</param>
\r
2659 /// <param name="barYNormal">Normal時判定ライン表示Y座標</param>
\r
2660 /// <param name="barYReverse">Reverse時判定ライン表示Y座標</param>
\r
2661 /// <param name="showRangeY0">チップ表示Y座標範囲(最小値)</param>
\r
2662 /// <param name="showRangeY1">チップ表示Y座標範囲(最大値)</param>
\r
2663 /// <param name="openXg">オープンチップの表示X座標(ギター用)</param>
\r
2664 /// <param name="openXb">オープンチップの表示X座標(ベース用)</param>
\r
2665 /// <param name="rectOpenOffsetX">テクスチャ内のオープンチップregionのx座標</param>
\r
2666 /// <param name="rectOpenOffsetY">テクスチャ内のオープンチップregionのy座標</param>
\r
2667 /// <param name="openChipWidth">テクスチャ内のオープンチップregionのwidth</param>
\r
2668 /// <param name="chipHeight">テクスチャ内のチップのheight</param>
\r
2669 /// <param name="chipWidth">テクスチャ内のチップのwidth</param>
\r
2670 /// <param name="guitarNormalX">ギターチップ描画のx座標(Normal)</param>
\r
2671 /// <param name="guitarLeftyX">ギターチップ描画のx座標(Lefty)</param>
\r
2672 /// <param name="bassNormalX">ベースチップ描画のx座標(Normal)</param>
\r
2673 /// <param name="bassLeftyX">ベースチップ描画のx座標(Lefty)</param>
\r
2674 /// <param name="drawDeltaX">描画のX座標間隔(R,G,B...)</param>
\r
2675 /// <param name="chipTexDeltaX">テクスチャののX座標間隔(R,G,B...)</param>
\r
2676 protected void t進行描画_チップ_ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst,
\r
2677 int barYNormal, int barYReverse,
\r
2678 int showRangeY0, int showRangeY1, int openXg, int openXb,
\r
2679 int rectOpenOffsetX, int rectOpenOffsetY, int openChipWidth, int chipHeight, int chipWidth,
\r
2680 int guitarNormalX, int guitarLeftyX, int bassNormalX, int bassLeftyX, int drawDeltaX, int chipTexDeltaX )
\r
2682 int instIndex = (int) inst;
\r
2683 if ( configIni.bGuitar有効 )
\r
2685 #region [ Invisible処理 ]
\r
2686 if ( configIni.eInvisible[ instIndex ] != EInvisible.OFF )
\r
2688 cInvisibleChip.SetInvisibleStatus( ref pChip );
\r
2693 #region [ Hidden/Sudden処理 ]
\r
2694 if ( configIni.bSudden[ instIndex ] )
\r
2696 pChip.b可視 = ( pChip.nバーからの距離dot[ instIndex ] < 200 * Scale.Y );
\r
2698 if ( configIni.bHidden[ instIndex ] && ( pChip.nバーからの距離dot[ instIndex ] < 100 * Scale.Y ) )
\r
2700 pChip.b可視 = false;
\r
2705 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2706 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2707 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2708 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2709 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2711 #region [ chip描画 ]
\r
2712 int OPEN = ( inst == E楽器パート.GUITAR ) ? 0x20 : 0xA0;
\r
2713 if ( !pChip.bHit && pChip.b可視 )
\r
2715 if ( this.txチップ != null )
\r
2717 this.txチップ.n透明度 = pChip.n透明度;
\r
2719 int y = configIni.bReverse[ instIndex ] ?
\r
2720 (int) ( barYReverse - pChip.nバーからの距離dot[ instIndex ] ) :
\r
2721 (int) ( barYNormal + pChip.nバーからの距離dot[ instIndex ] );
\r
2722 int n小節線消失距離dot = configIni.bReverse[ instIndex ] ?
\r
2723 (int) ( -100 * Scale.Y ) :
\r
2724 ( configIni.e判定位置[ instIndex ] == E判定位置.標準 ) ? (int) ( -36 * Scale.Y ) : (int) ( -25 * Scale.Y );
\r
2725 if ( configIni.bReverse[ instIndex ] )
\r
2727 //showRangeY1 = barYReverse - n小節線消失距離dot;
\r
2731 showRangeY0 = barYNormal + n小節線消失距離dot;
\r
2733 if ( ( showRangeY0 < y ) && ( y < showRangeY1 ) )
\r
2735 if ( this.txチップ != null )
\r
2737 int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[ instIndex ].n現在の値;
\r
2738 #region [ OPENチップの描画 ]
\r
2739 if ( pChip.nチャンネル番号 == OPEN )
\r
2741 int xo = ( inst == E楽器パート.GUITAR ) ? openXg : openXb;
\r
2742 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2744 y - ( 2 * Scale.Y ),
\r
2746 (int) ( rectOpenOffsetX * Scale.X ),
\r
2747 (int) ( rectOpenOffsetY * Scale.Y ) + (int) ( ( ( nアニメカウンタ現在の値 % 5 ) * chipHeight * Scale.Y ) ),
\r
2748 (int) ( openChipWidth * Scale.X ),
\r
2749 (int) ( chipHeight * Scale.Y )
\r
2754 Rectangle rc = new Rectangle(
\r
2755 (int) ( rectOpenOffsetX * Scale.X ),
\r
2756 (int) ( nアニメカウンタ現在の値 * chipHeight * Scale.Y ),
\r
2757 (int) ( chipWidth * Scale.X ),
\r
2758 (int) ( chipHeight * Scale.Y )
\r
2760 #region [ RGBチップのX座標初期化 ]
\r
2762 if ( inst == E楽器パート.GUITAR )
\r
2764 x = ( configIni.bLeft.Guitar ) ? guitarLeftyX : guitarNormalX;
\r
2768 x = ( configIni.bLeft.Bass ) ? bassLeftyX : bassNormalX;
\r
2770 int deltaX = ( configIni.bLeft[ instIndex ] ) ? -drawDeltaX : +drawDeltaX;
\r
2772 //Trace.TraceInformation( "chip={0:x2}, E楽器パート={1}, x={2}", pChip.nチャンネル番号, inst, x );
\r
2773 #region [ Rチップ描画 ]
\r
2776 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2778 y - ( chipHeight / 2 ) * Scale.Y,
\r
2783 #region [ Gチップ描画 ]
\r
2784 rc.X += (int) ( chipTexDeltaX * Scale.X );
\r
2788 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2790 y - ( chipHeight / 2 ) * Scale.Y,
\r
2795 #region [ Bチップ描画 ]
\r
2796 rc.X += (int) ( chipTexDeltaX * Scale.X );
\r
2800 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2802 y - ( chipHeight / 2 ) * Scale.Y,
\r
2811 //if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2814 // #35411 2015.08.20 chnmr0 modified
\r
2815 // 従来のAUTO処理に加えてプレーヤーゴーストの再生機能を追加
\r
2816 bool autoPlayCondition = (!pChip.bHit) && (pChip.nバーからの距離dot[instIndex] < 0);
\r
2817 if ( autoPlayCondition )
\r
2819 cInvisibleChip.StartSemiInvisible( inst );
\r
2822 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
2823 autoPlayCondition = !pChip.bHit && autoPick;
\r
2824 long ghostLag = 0;
\r
2825 bool bUsePerfectGhost = true;
\r
2827 if ( (pChip.e楽器パート == E楽器パート.GUITAR || pChip.e楽器パート == E楽器パート.BASS ) &&
\r
2828 CDTXMania.ConfigIni.eAutoGhost[(int)(pChip.e楽器パート)] != EAutoGhostData.PERFECT &&
\r
2829 CDTXMania.listAutoGhostLag[(int)pChip.e楽器パート] != null &&
\r
2830 0 <= pChip.n楽器パートでの出現順 &&
\r
2831 pChip.n楽器パートでの出現順 < CDTXMania.listAutoGhostLag[(int)pChip.e楽器パート].Count)
\r
2833 // #35411 (mod) Ghost data が有効なので 従来のAUTOではなくゴーストのラグを利用
\r
2834 // 発生時刻と現在時刻からこのタイミングで演奏するかどうかを決定
\r
2835 ghostLag = CDTXMania.listAutoGhostLag[(int)pChip.e楽器パート][pChip.n楽器パートでの出現順];
\r
2836 bool resetCombo = ghostLag > 255;
\r
2837 ghostLag = (ghostLag & 255) - 128;
\r
2838 ghostLag -= (pChip.e楽器パート == E楽器パート.GUITAR ? nInputAdjustTimeMs.Guitar : nInputAdjustTimeMs.Bass);
\r
2839 autoPlayCondition &= (pChip.n発声時刻ms + ghostLag <= CSound管理.rc演奏用タイマ.n現在時刻ms);
\r
2840 if (resetCombo && autoPlayCondition )
\r
2842 this.actCombo.n現在のコンボ数[(int)pChip.e楽器パート] = 0;
\r
2844 bUsePerfectGhost = false;
\r
2847 if( bUsePerfectGhost )
\r
2850 autoPlayCondition &= (pChip.nバーからの距離dot[instIndex] < 0);
\r
2853 if ( autoPlayCondition )
\r
2855 int lo = ( inst == E楽器パート.GUITAR ) ? 0 : 3; // lane offset
\r
2856 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
2857 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
2858 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
2859 bool pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R );
\r
2860 bool pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G );
\r
2861 bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );
\r
2863 #region [ Chip Fire effects (auto時用) ]
\r
2864 // autoPickでない時の処理は、 t入力処理・ギターベース(E楽器パート) で行う
\r
2865 bool bSuccessOPEN = bChipIsO && (autoR || !pushingR) && (autoG || !pushingG) && (autoB || !pushingB);
\r
2867 if ( ( bChipHasR && ( autoR || pushingR ) ) || bSuccessOPEN )
\r
2869 this.actChipFireGB.Start( 0 + lo, 演奏判定ライン座標 );
\r
2871 if ( ( bChipHasG && ( autoG || pushingG ) ) || bSuccessOPEN )
\r
2873 this.actChipFireGB.Start( 1 + lo, 演奏判定ライン座標 );
\r
2875 if ( ( bChipHasB && ( autoB || pushingB ) ) || bSuccessOPEN )
\r
2877 this.actChipFireGB.Start( 2 + lo, 演奏判定ライン座標 );
\r
2881 #region [ autopick ]
\r
2883 bool bMiss = true;
\r
2884 if ( bChipHasR == autoR && bChipHasG == autoG && bChipHasB == autoB ) // autoレーンとチップレーン一致時はOK
\r
2885 { // この条件を加えないと、同時に非autoレーンを押下している時にNGとなってしまう。
\r
2888 else if ( ( autoR || ( bChipHasR == pushingR ) ) && ( autoG || ( bChipHasG == pushingG ) ) && ( autoB || ( bChipHasB == pushingB ) ) )
\r
2889 // ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
\r
2893 else if ( ( ( bChipIsO == true ) && ( !pushingR | autoR ) && ( !pushingG | autoG ) && ( !pushingB | autoB ) ) ) // OPEN時
\r
2897 pChip.bHit = true;
\r
2898 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms + ghostLag, inst, dTX.nモニタを考慮した音量( inst ), false, bMiss );
\r
2899 this.r次にくるギターChip = null;
\r
2902 this.tチップのヒット処理(pChip.n発声時刻ms + ghostLag, pChip);
\r
2906 pChip.nLag = 0; // tチップのヒット処理()の引数最後がfalseの時はpChip.nLagを計算しないため、ここでAutoPickかつMissのLag=0を代入
\r
2907 this.tチップのヒット処理(pChip.n発声時刻ms + ghostLag, pChip, false);
\r
2909 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
2910 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip(pChip.n発声時刻ms + ghostLag, chWailingChip, this.nInputAdjustTimeMs[instIndex], 140);
\r
2911 if ( item != null && !bMiss )
\r
2913 this.queWailing[ instIndex ].Enqueue( item );
\r
2917 // #35411 modify end
\r
2920 } // end of "if configIni.bGuitar有効"
\r
2921 if ( !pChip.bHit && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) ) // Guitar/Bass無効の場合は、自動演奏する
\r
2923 pChip.bHit = true;
\r
2924 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
\r
2929 protected virtual void t進行描画_チップ_ギターベース_ウェイリング(
\r
2930 CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst, bool bGRmode )
\r
2932 int indexInst = (int) inst;
\r
2933 if ( configIni.bGuitar有効 )
\r
2935 #region [ Invisible処理 ]
\r
2936 if ( configIni.eInvisible[ indexInst ] != EInvisible.OFF )
\r
2938 cInvisibleChip.SetInvisibleStatus( ref pChip );
\r
2941 #region [ Sudden/Hidden処理 ]
\r
2942 if ( configIni.bSudden[indexInst] )
\r
2944 pChip.b可視 = ( pChip.nバーからの距離dot[indexInst] < 200 * Scale.Y );
\r
2946 if ( configIni.bHidden[indexInst] && ( pChip.nバーからの距離dot[indexInst] < 100 * Scale.Y ) )
\r
2948 pChip.b可視 = false;
\r
2952 cWailingChip[ indexInst ].t進行描画_チップ_ギターベース_ウェイリング(
\r
2953 configIni, ref dTX, ref pChip,
\r
2954 ref txチップ, ref 演奏判定ライン座標, ref ctWailingチップ模様アニメ
\r
2957 if ( !pChip.bHit && ( pChip.nバーからの距離dot[indexInst] < 0 ) )
\r
2959 if ( pChip.nバーからの距離dot[indexInst] < -234 * Scale.Y ) // #25253 2011.5.29 yyagi: Don't set pChip.bHit=true for wailing at once. It need to 1sec-delay (234pix per 1sec).
\r
2961 pChip.bHit = true;
\r
2963 bool autoW = ( inst == E楽器パート.GUITAR ) ? configIni.bAutoPlay.GtW : configIni.bAutoPlay.BsW;
\r
2964 //if ( configIni.bAutoPlay[ ((int) Eレーン.Guitar - 1) + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
2967 // pChip.bHit = true; // #25253 2011.5.29 yyagi: Set pChip.bHit=true if autoplay.
\r
2968 // this.actWailingBonus.Start( inst, this.r現在の歓声Chip[indexInst] );
\r
2969 // #23886 2012.5.22 yyagi; To support auto Wailing; Don't do wailing for ALL wailing chips. Do wailing for queued wailing chip.
\r
2970 // wailing chips are queued when 1) manually wailing and not missed at that time 2) AutoWailing=ON and not missed at that time
\r
2971 long nTimeStamp_Wailed = pChip.n発声時刻ms + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2972 DoWailingFromQueue( inst, nTimeStamp_Wailed, autoW );
\r
2974 cInvisibleChip.StartSemiInvisible( inst );
\r
2978 pChip.bHit = true;
\r
2980 protected virtual void t進行描画_チップ_ギター_ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, bool bGRmode )
\r
2982 t進行描画_チップ_ギターベース_ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.GUITAR, bGRmode );
\r
2984 protected abstract void t進行描画_チップ_フィルイン( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2985 protected abstract void t進行描画_チップ_小節線( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2986 //protected abstract void t進行描画_チップ_ベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2987 protected virtual void t進行描画_チップ_ベース_ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, bool bGRmode )
\r
2989 t進行描画_チップ_ギターベース_ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.BASS, bGRmode );
\r
2994 protected abstract void t進行描画_チップ_空打ち音設定_ドラム( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2995 protected void t進行描画_チップアニメ()
\r
2997 for ( int i = 0; i < 3; i++ ) // 0=drums, 1=guitar, 2=bass
\r
2999 if ( this.ctチップ模様アニメ[ i ] != null )
\r
3001 this.ctチップ模様アニメ[ i ].t進行Loop();
\r
3004 if ( this.ctWailingチップ模様アニメ != null )
\r
3006 this.ctWailingチップ模様アニメ.t進行Loop();
\r
3010 protected bool t進行描画_フェードイン_アウト()
\r
3012 switch ( base.eフェーズID )
\r
3014 case CStage.Eフェーズ.共通_フェードイン:
\r
3015 if ( this.actFI.On進行描画() != 0 )
\r
3017 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
\r
3021 case CStage.Eフェーズ.共通_フェードアウト:
\r
3022 case CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト:
\r
3023 if ( this.actFO.On進行描画() != 0 )
\r
3029 case CStage.Eフェーズ.演奏_STAGE_CLEAR_フェードアウト:
\r
3030 if ( this.actFOClear.On進行描画() == 0 )
\r
3039 protected void t進行描画_レーンフラッシュD()
\r
3041 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
3043 this.actLaneFlushD.On進行描画();
\r
3046 protected void t進行描画_レーンフラッシュGB()
\r
3048 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
3050 this.actLaneFlushGB.On進行描画();
\r
3053 protected abstract void t進行描画_演奏情報();
\r
3054 protected void t進行描画_演奏情報(int x, int y)
\r
3056 if ( !CDTXMania.ConfigIni.b演奏情報を表示しない )
\r
3058 this.actPlayInfo.t進行描画( x, y );
\r
3061 protected void t進行描画_背景()
\r
3063 if ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF )
\r
3065 if ( this.tx背景 != null )
\r
3067 this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 );
\r
3072 // FullHD版では、背景描画のさらに奥でAVI描画をするため、
\r
3073 // Dark!=OFF時下記の画面クリアをすると、AVI描画がクリアされてしまう
\r
3074 // CDTXMania.app.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 0f, 0 );
\r
3078 protected void t進行描画_判定ライン()
\r
3080 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
3082 int y = CDTXMania.ConfigIni.bReverse.Drums ? (int) ( 53 * Scale.Y ) - 演奏判定ライン座標.nJudgeLinePosY_delta.Drums : (int) ( 419 * Scale.Y ) + 演奏判定ライン座標.nJudgeLinePosY_delta.Drums;
\r
3083 // #31602 2013.6.23 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
\r
3084 if ( this.txヒットバー != null )
\r
3086 for ( int i = 32; i < 335; i += 8 )
\r
3088 this.txヒットバー.t2D描画( CDTXMania.app.Device,
\r
3091 new Rectangle( 0, 0, ( ( i + 8 ) >= 335 ) ? (int) ( ( 7 - ( ( i + 8 ) - 335 ) ) * Scale.X ) : (int) ( 8 * Scale.X ), (int) ( 8 * Scale.Y ) ) );
\r
3096 protected void t進行描画_判定文字列()
\r
3098 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
3100 protected void t進行描画_判定文字列1_通常位置指定の場合()
\r
3102 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) != E判定文字表示位置.コンボ下 ) // 判定ライン上または横
\r
3104 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
3107 protected void t進行描画_判定文字列2_判定ライン上指定の場合()
\r
3109 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) == E判定文字表示位置.コンボ下 ) // 判定ライン上または横
\r
3111 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
3115 protected void t進行描画_譜面スクロール速度()
\r
3117 this.act譜面スクロール速度.On進行描画();
\r
3120 protected abstract void t背景テクスチャの生成();
\r
3121 protected void t背景テクスチャの生成( string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename )
\r
3122 { // Default...: レーン等があるレイヤー bgfilename: DTXファイルで指定する背景
\r
3123 Bitmap image = null;
\r
3124 bool bSuccessLoadDTXbgfile = false;
\r
3126 int[] offsetX = new int[2]{ 96, 506 };
\r
3127 //int nLanePosition = (int) CDTXMania.ConfigIni.eドラムレーン表示位置;
\r
3128 int nLanePosition = (int) Eドラムレーン表示位置.Left;
\r
3130 if ( bgfilename != null && File.Exists( bgfilename ) && !CDTXMania.DTX.bチップがある.Movie )
\r
3134 #region [ DTXデータで指定されている背景画像を読み込む ]
\r
3135 Bitmap bitmap1 = null;
\r
3136 bitmap1 = new Bitmap( bgfilename );
\r
3137 if ( ( bitmap1.Size.Width == 0 ) && ( bitmap1.Size.Height == 0 ) )
\r
3144 int newWidth = (int) ( bitmap1.Width * Scale.X );
\r
3145 int newHeight = (int) ( bitmap1.Height * Scale.Y );
\r
3148 #region [ 背景画像がVGAサイズ以下なら、FullHDサイズに拡大する ]
\r
3149 if ( bitmap1.Width <= 640 && bitmap1.Height <= 480 )
\r
3151 bitmap2 = new Bitmap( newWidth, newHeight );
\r
3152 Graphics graphic2 = Graphics.FromImage( bitmap2 );
\r
3153 graphic2.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
\r
3154 graphic2.DrawImage( bitmap1, 0, 0, newWidth, newHeight );
\r
3155 graphic2.Dispose();
\r
3159 bitmap2 = (Bitmap) bitmap1.Clone();
\r
3161 bitmap1.Dispose();
\r
3164 #region [ 実背景に格子状に配置するよう、コピーしていく ]
\r
3165 Bitmap bitmap3 = new Bitmap( SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height );
\r
3166 Graphics graphics3 = Graphics.FromImage( bitmap3 );
\r
3167 for ( int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height )
\r
3169 for ( int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width )
\r
3171 graphics3.DrawImage( bitmap2, j, i, bitmap2.Width, bitmap2.Height );
\r
3174 graphics3.Dispose();
\r
3175 bitmap2.Dispose();
\r
3178 #region [ レーン外・レーンそのもののフレームを合成 ]
\r
3179 image = new Bitmap( CSkin.Path( DefaultBgFilename ) ); // レーン外のフレーム
\r
3180 graphics3 = Graphics.FromImage( image );
\r
3182 #region [ レーンのフレームがあれば、それを合成 ]
\r
3183 if ( DefaultLaneFilename != "" )
\r
3185 Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
\r
3186 graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
\r
3191 ColorMatrix matrix2 = new ColorMatrix();
\r
3192 matrix2.Matrix00 = 1f;
\r
3193 matrix2.Matrix11 = 1f;
\r
3194 matrix2.Matrix22 = 1f;
\r
3195 matrix2.Matrix33 = ( (float) CDTXMania.ConfigIni.n背景の透過度 ) / 255f;
\r
3196 matrix2.Matrix44 = 1f;
\r
3197 ColorMatrix newColorMatrix = matrix2;
\r
3198 ImageAttributes imageAttr = new ImageAttributes();
\r
3199 imageAttr.SetColorMatrix( newColorMatrix );
\r
3200 graphics3.DrawImage( bitmap3, new Rectangle( 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ), 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, GraphicsUnit.Pixel, imageAttr );
\r
3201 // graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );
\r
3202 bitmap3.Dispose();
\r
3205 imageAttr.Dispose();
\r
3206 graphics3.Dispose();
\r
3207 bSuccessLoadDTXbgfile = true;
\r
3211 Trace.TraceError( "背景画像とレーン画像の合成に失敗しました。({0})", bgfilename );
\r
3214 #region [ DTXデータで指定する背景画像を合成しない場合は、レーン画像単体を背景画像とする ]
\r
3215 if ( !bSuccessLoadDTXbgfile )
\r
3217 bgfilename = CSkin.Path( DefaultBgFilename );
\r
3220 image = new Bitmap( bgfilename );
\r
3222 if ( DefaultLaneFilename != "" )
\r
3224 Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
\r
3225 Graphics g = Graphics.FromImage( image );
\r
3226 g.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
\r
3233 Trace.TraceError( "レーン画像の読み込みに失敗しました。({0})", bgfilename );
\r
3239 #region [ BGA画像を表示する予定がある場合は、背景画像からあらかじめその領域を黒抜きにしておく ]
\r
3240 if ( ( CDTXMania.DTX.listBMP.Count > 0 ) || ( CDTXMania.DTX.listBMPTEX.Count > 0 ) || CDTXMania.DTX.listAVI.Count > 0 )
\r
3242 Graphics graphics2 = Graphics.FromImage( image );
\r
3243 graphics2.FillRectangle( Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height );
\r
3244 graphics2.Dispose();
\r
3247 #region [ 背景画像をテクスチャにする。背景動画の表示予定がある場合は、更に透明度を付与する。 ]
\r
3250 this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
\r
3251 if ( CDTXMania.DTX.bMovieをFullscreen再生する ) // Fullscreen動画再生が発生する場合は、動画レイヤーに対してレーン+背景レイヤーに透明度を設定する
\r
3253 this.tx背景.n透明度 = 255 - CDTXMania.ConfigIni.n背景の透過度; // 背景動画用
\r
3256 catch ( CTextureCreateFailedException )
\r
3258 Trace.TraceError( "背景テクスチャの生成に失敗しました。" );
\r
3265 protected virtual void t入力処理_ギター()
\r
3267 t入力処理_ギターベース( E楽器パート.GUITAR );
\r
3269 protected virtual void t入力処理_ベース()
\r
3271 t入力処理_ギターベース( E楽器パート.BASS );
\r
3275 protected virtual void t入力処理_ギターベース(E楽器パート inst)
\r
3277 int indexInst = (int) inst;
\r
3278 #region [ スクロール速度変更 ]
\r
3279 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.B ) )
\r
3281 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Min( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] + 1, 0x7cf );
\r
3283 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.R ) )
\r
3285 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Max( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] - 1, 0 );
\r
3289 if ( !CDTXMania.ConfigIni.bGuitar有効 || !CDTXMania.DTX.bチップがある[indexInst] )
\r
3294 int R = ( inst == E楽器パート.GUITAR ) ? 0 : 3;
\r
3297 bool autoW = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtW : bIsAutoPlay.BsW;
\r
3298 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
3299 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
3300 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
3301 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
3302 int nAutoW = ( autoW ) ? 8 : 0;
\r
3303 int nAutoR = ( autoR ) ? 4 : 0;
\r
3304 int nAutoG = ( autoG ) ? 2 : 0;
\r
3305 int nAutoB = ( autoB ) ? 1 : 0;
\r
3306 int nAutoMask = nAutoW | nAutoR | nAutoG | nAutoB;
\r
3308 // if ( bIsAutoPlay[ (int) Eレーン.Guitar - 1 + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
3310 CDTX.CChip chip = this.r次に来る指定楽器Chipを更新して返す(inst);
\r
3311 if ( chip != null )
\r
3313 if ( ( chip.nチャンネル番号 & 4 ) != 0 && autoR )
\r
3315 this.actLaneFlushGB.Start( R );
\r
3316 this.actRGB.Push( R );
\r
3318 if ( ( chip.nチャンネル番号 & 2 ) != 0 && autoG )
\r
3320 this.actLaneFlushGB.Start( G );
\r
3321 this.actRGB.Push( G );
\r
3323 if ( ( chip.nチャンネル番号 & 1 ) != 0 && autoB )
\r
3325 this.actLaneFlushGB.Start( B );
\r
3326 this.actRGB.Push( B );
\r
3333 int pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R ) ? 4 : 0;
\r
3334 this.t入力メソッド記憶( inst );
\r
3335 int pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G ) ? 2 : 0;
\r
3336 this.t入力メソッド記憶( inst );
\r
3337 int pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B ) ? 1 : 0;
\r
3338 this.t入力メソッド記憶( inst );
\r
3339 int flagRGB = pushingR | pushingG | pushingB;
\r
3340 if ( pushingR != 0 )
\r
3342 this.actLaneFlushGB.Start( R );
\r
3343 this.actRGB.Push( R );
\r
3345 if ( pushingG != 0 )
\r
3347 this.actLaneFlushGB.Start( G );
\r
3348 this.actRGB.Push( G );
\r
3350 if ( pushingB != 0 )
\r
3352 this.actLaneFlushGB.Start( B );
\r
3353 this.actRGB.Push( B );
\r
3355 // auto pickだとここから先に行かないので注意
\r
3356 List<STInputEvent> events = CDTXMania.Pad.GetEvents( inst, Eパッド.Pick );
\r
3357 if ( ( events != null ) && ( events.Count > 0 ) )
\r
3359 foreach ( STInputEvent eventPick in events )
\r
3361 if ( !eventPick.b押された )
\r
3365 this.t入力メソッド記憶( inst );
\r
3366 long nTime = eventPick.nTimeStamp - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3367 int chWailingSound = ( inst == E楽器パート.GUITAR ) ? 0x2F : 0xAF;
\r
3368 CDTX.CChip pChip = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ); // E楽器パート.GUITARなチップ全てにヒットする
\r
3369 E判定 e判定 = this.e指定時刻からChipのJUDGEを返す( nTime, pChip, this.nInputAdjustTimeMs[indexInst] );
\r
3370 //Trace.TraceInformation("ch={0:x2}, mask1={1:x1}, mask2={2:x2}", pChip.nチャンネル番号, ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F, ( flagRGB & ~nAutoMask) & 0x0F );
\r
3371 if ( ( pChip != null ) && ( ( ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F ) == ( ( flagRGB & ~nAutoMask) & 0x0F ) ) && ( e判定 != E判定.Miss ) )
\r
3373 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
3374 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
3375 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
3376 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
3377 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
3378 bool bSuccessOPEN = bChipIsO && ( autoR || pushingR == 0 ) && ( autoG || pushingG == 0 ) && ( autoB || pushingB == 0 );
\r
3379 if ( ( bChipHasR && ( autoR || pushingR != 0 ) ) || bSuccessOPEN )
\r
3380 //if ( ( pushingR != 0 ) || autoR || ( flagRGB == 0 ) )
\r
3382 this.actChipFireGB.Start( R, 演奏判定ライン座標 );
\r
3384 if ( ( bChipHasG && ( autoG || pushingG != 0 ) ) || bSuccessOPEN )
\r
3385 //if ( ( pushingG != 0 ) || autoG || ( flagRGB == 0 ) )
\r
3387 this.actChipFireGB.Start( G, 演奏判定ライン座標 );
\r
3389 if ( ( bChipHasB && ( autoB || pushingB != 0 ) ) || bSuccessOPEN )
\r
3390 //if ( ( pushingB != 0 ) || autoB || ( flagRGB == 0 ) )
\r
3392 this.actChipFireGB.Start( B, 演奏判定ライン座標 );
\r
3394 this.tチップのヒット処理( nTime, pChip );
\r
3395 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], e判定 == E判定.Poor );
\r
3396 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
3397 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingChip, this.nInputAdjustTimeMs[ indexInst ], 140 );
\r
3398 if ( item != null )
\r
3400 this.queWailing[indexInst].Enqueue( item );
\r
3405 // 以下、間違いレーンでのピック時
\r
3406 CDTX.CChip NoChipPicked = ( inst == E楽器パート.GUITAR ) ? this.r現在の空うちギターChip : this.r現在の空うちベースChip;
\r
3407 if ( ( NoChipPicked != null ) || ( ( NoChipPicked = this.r指定時刻に一番近いChip_ヒット未済問わず不可視考慮( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ) ) != null ) )
\r
3409 this.tサウンド再生( NoChipPicked, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], true );
\r
3411 if ( !CDTXMania.ConfigIni.bLight[indexInst] )
\r
3413 this.tチップのヒット処理_BadならびにTight時のMiss( inst );
\r
3417 List<STInputEvent> list = CDTXMania.Pad.GetEvents(inst, Eパッド.Wail );
\r
3418 if ( ( list != null ) && ( list.Count > 0 ) )
\r
3420 foreach ( STInputEvent eventWailed in list )
\r
3422 if ( !eventWailed.b押された )
\r
3426 DoWailingFromQueue( inst, eventWailed.nTimeStamp, autoW );
\r
3432 private void DoWailingFromQueue( E楽器パート inst, long nTimeStamp_Wailed, bool autoW )
\r
3434 int indexInst = (int) inst;
\r
3435 long nTimeWailed = nTimeStamp_Wailed - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3436 CDTX.CChip chipWailing;
\r
3437 while ( ( this.queWailing[ indexInst ].Count > 0 ) && ( ( chipWailing = this.queWailing[ indexInst ].Dequeue() ) != null ) )
\r
3439 if ( ( nTimeWailed - chipWailing.n発声時刻ms ) <= 1000 ) // #24245 2011.1.26 yyagi: 800 -> 1000
\r
3441 chipWailing.bHit = true;
\r
3442 this.actWailingBonus.Start( inst, this.r現在の歓声Chip[ indexInst ] );
\r
3443 //if ( !bIsAutoPlay[indexInst] )
\r
3446 int nCombo = ( this.actCombo.n現在のコンボ数[ indexInst ] < 500 ) ? this.actCombo.n現在のコンボ数[ indexInst ] : 500;
\r
3447 this.actScore.Add( inst, bIsAutoPlay, nCombo * 3000L ); // #24245 2011.1.26 yyagi changed DRUMS->BASS, add nCombo conditions
\r