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
97 #region [ t演奏結果を格納する・ギター() ]
\r
98 public void t演奏結果を格納する・ギター( out CScoreIni.C演奏記録 Guitar )
\r
100 Guitar = new CScoreIni.C演奏記録();
\r
102 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
104 Guitar.nスコア = (long) this.actScore.Get( E楽器パート.GUITAR );
\r
105 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
106 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
107 Guitar.nPerfect数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Perfect : this.nヒット数・Auto含まない.Guitar.Perfect;
\r
108 Guitar.nGreat数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Great : this.nヒット数・Auto含まない.Guitar.Great;
\r
109 Guitar.nGood数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Good : this.nヒット数・Auto含まない.Guitar.Good;
\r
110 Guitar.nPoor数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Poor : this.nヒット数・Auto含まない.Guitar.Poor;
\r
111 Guitar.nMiss数 = CDTXMania.ConfigIni.bギターが全部オートプレイである ? this.nヒット数・Auto含む.Guitar.Miss : this.nヒット数・Auto含まない.Guitar.Miss;
\r
112 Guitar.nPerfect数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Perfect;
\r
113 Guitar.nGreat数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Great;
\r
114 Guitar.nGood数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Good;
\r
115 Guitar.nPoor数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Poor;
\r
116 Guitar.nMiss数・Auto含まない = this.nヒット数・Auto含まない.Guitar.Miss;
\r
117 Guitar.n最大コンボ数 = this.actCombo.n現在のコンボ数.Guitar最高値;
\r
118 Guitar.n全チップ数 = CDTXMania.DTX.n可視チップ数.Guitar;
\r
119 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
121 Guitar.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
123 Guitar.bTight = CDTXMania.ConfigIni.bTight;
\r
124 for ( int i = 0; i < 3; i++ )
\r
126 Guitar.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
127 Guitar.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
128 Guitar.eInvisible[ i ] = CDTXMania.ConfigIni.eInvisible[ i ];
\r
129 Guitar.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
130 Guitar.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
131 Guitar.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
132 Guitar.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
133 Guitar.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
135 Guitar.eDark = CDTXMania.ConfigIni.eDark;
\r
136 Guitar.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
137 Guitar.n演奏速度分母 = 20;
\r
138 Guitar.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
139 Guitar.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
140 Guitar.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
141 Guitar.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
142 Guitar.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
143 Guitar.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
144 Guitar.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
145 Guitar.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
146 Guitar.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
147 Guitar.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
148 Guitar.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Guitar;
\r
149 Guitar.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Guitar;
\r
150 Guitar.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Guitar;
\r
151 Guitar.b演奏にマウスを使用した = this.b演奏にマウスを使った.Guitar;
\r
152 Guitar.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
153 Guitar.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
154 Guitar.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
155 Guitar.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
156 Guitar.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
157 Guitar.最終更新日時 = DateTime.Now.ToString();
\r
158 Guitar.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Guitar );
\r
162 #region [ t演奏結果を格納する・ベース() ]
\r
163 public void t演奏結果を格納する・ベース( out CScoreIni.C演奏記録 Bass )
\r
165 Bass = new CScoreIni.C演奏記録();
\r
167 if ( CDTXMania.DTX.bチップがある.Bass )
\r
169 Bass.nスコア = (long) this.actScore.Get( E楽器パート.BASS );
\r
170 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
171 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
172 Bass.nPerfect数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Perfect : this.nヒット数・Auto含まない.Bass.Perfect;
\r
173 Bass.nGreat数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Great : this.nヒット数・Auto含まない.Bass.Great;
\r
174 Bass.nGood数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Good : this.nヒット数・Auto含まない.Bass.Good;
\r
175 Bass.nPoor数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Poor : this.nヒット数・Auto含まない.Bass.Poor;
\r
176 Bass.nMiss数 = CDTXMania.ConfigIni.bベースが全部オートプレイである ? this.nヒット数・Auto含む.Bass.Miss : this.nヒット数・Auto含まない.Bass.Miss;
\r
177 Bass.nPerfect数・Auto含まない = this.nヒット数・Auto含まない.Bass.Perfect;
\r
178 Bass.nGreat数・Auto含まない = this.nヒット数・Auto含まない.Bass.Great;
\r
179 Bass.nGood数・Auto含まない = this.nヒット数・Auto含まない.Bass.Good;
\r
180 Bass.nPoor数・Auto含まない = this.nヒット数・Auto含まない.Bass.Poor;
\r
181 Bass.nMiss数・Auto含まない = this.nヒット数・Auto含まない.Bass.Miss;
\r
182 Bass.n最大コンボ数 = this.actCombo.n現在のコンボ数.Bass最高値;
\r
183 Bass.n全チップ数 = CDTXMania.DTX.n可視チップ数.Bass;
\r
184 for ( int i = 0; i < (int) Eレーン.MAX; i++ )
\r
186 Bass.bAutoPlay[ i ] = bIsAutoPlay[ i ];
\r
188 Bass.bTight = CDTXMania.ConfigIni.bTight;
\r
189 for ( int i = 0; i < 3; i++ )
\r
191 Bass.bSudden[ i ] = CDTXMania.ConfigIni.bSudden[ i ];
\r
192 Bass.bHidden[ i ] = CDTXMania.ConfigIni.bHidden[ i ];
\r
193 Bass.eInvisible[ i ] = CDTXMania.ConfigIni.eInvisible[ i ];
\r
194 Bass.bReverse[ i ] = CDTXMania.ConfigIni.bReverse[ i ];
\r
195 Bass.eRandom[ i ] = CDTXMania.ConfigIni.eRandom[ i ];
\r
196 Bass.bLight[ i ] = CDTXMania.ConfigIni.bLight[ i ];
\r
197 Bass.bLeft[ i ] = CDTXMania.ConfigIni.bLeft[ i ];
\r
198 Bass.f譜面スクロール速度[ i ] = ( (float) ( CDTXMania.ConfigIni.n譜面スクロール速度[ i ] + 1 ) ) * 0.5f;
\r
200 Bass.eDark = CDTXMania.ConfigIni.eDark;
\r
201 Bass.n演奏速度分子 = CDTXMania.ConfigIni.n演奏速度;
\r
203 Bass.eHHGroup = CDTXMania.ConfigIni.eHHGroup;
\r
204 Bass.eFTGroup = CDTXMania.ConfigIni.eFTGroup;
\r
205 Bass.eCYGroup = CDTXMania.ConfigIni.eCYGroup;
\r
206 Bass.eHitSoundPriorityHH = CDTXMania.ConfigIni.eHitSoundPriorityHH;
\r
207 Bass.eHitSoundPriorityFT = CDTXMania.ConfigIni.eHitSoundPriorityFT;
\r
208 Bass.eHitSoundPriorityCY = CDTXMania.ConfigIni.eHitSoundPriorityCY;
\r
209 Bass.bGuitar有効 = CDTXMania.ConfigIni.bGuitar有効;
\r
210 Bass.bDrums有効 = CDTXMania.ConfigIni.bDrums有効;
\r
211 Bass.bSTAGEFAILED有効 = CDTXMania.ConfigIni.bSTAGEFAILED有効;
\r
212 Bass.eダメージレベル = CDTXMania.ConfigIni.eダメージレベル;
\r
213 Bass.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Bass; // #24280 2011.1.29 yyagi
\r
214 Bass.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Bass; //
\r
215 Bass.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Bass; //
\r
216 Bass.b演奏にマウスを使用した = this.b演奏にマウスを使った.Bass; //
\r
217 Bass.nPerfectになる範囲ms = CDTXMania.nPerfect範囲ms;
\r
218 Bass.nGreatになる範囲ms = CDTXMania.nGreat範囲ms;
\r
219 Bass.nGoodになる範囲ms = CDTXMania.nGood範囲ms;
\r
220 Bass.nPoorになる範囲ms = CDTXMania.nPoor範囲ms;
\r
221 Bass.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
222 Bass.最終更新日時 = DateTime.Now.ToString();
\r
223 Bass.Hash = CScoreIni.t演奏セクションのMD5を求めて返す( Bass );
\r
230 public override void On活性化()
\r
232 listChip = CDTXMania.DTX.listChip;
\r
233 listWAV = CDTXMania.DTX.listWAV;
\r
235 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.継続;
\r
236 this.n現在のトップChip = ( listChip.Count > 0 ) ? 0 : -1;
\r
237 this.L最後に再生したHHの実WAV番号 = new List<int>( 16 );
\r
238 this.n最後に再生したHHのチャンネル番号 = 0;
\r
239 this.n最後に再生した実WAV番号.Guitar = -1;
\r
240 this.n最後に再生した実WAV番号.Bass = -1;
\r
241 for ( int i = 0; i < 50; i++ )
\r
243 this.n最後に再生したBGMの実WAV番号[ i ] = -1;
\r
245 this.r次にくるギターChip = null;
\r
246 this.r次にくるベースChip = null;
\r
247 for ( int j = 0; j < 10; j++ )
\r
249 this.r現在の空うちドラムChip[ j ] = null;
\r
251 this.r現在の空うちギターChip = null;
\r
252 this.r現在の空うちベースChip = null;
\r
253 cInvisibleChip = new CInvisibleChip( CDTXMania.ConfigIni.nDisplayTimesMs, CDTXMania.ConfigIni.nFadeoutTimeMs );
\r
254 this.演奏判定ライン座標 = new C演奏判定ライン座標共通();
\r
255 for ( int k = 0; k < 3; k++ )
\r
257 //for ( int n = 0; n < 5; n++ )
\r
259 this.nヒット数・Auto含まない[ k ] = new CHITCOUNTOFRANK();
\r
260 this.nヒット数・Auto含む[ k ] = new CHITCOUNTOFRANK();
\r
262 this.queWailing[ k ] = new Queue<CDTX.CChip>();
\r
263 this.r現在の歓声Chip[ k ] = null;
\r
264 cInvisibleChip.eInvisibleMode[ k ] = CDTXMania.ConfigIni.eInvisible[ k ];
\r
265 if ( CDTXMania.DTXVmode.Enabled )
\r
267 CDTXMania.ConfigIni.n譜面スクロール速度[ k ] = CDTXMania.ConfigIni.nViewerScrollSpeed[ k ];
\r
270 this.nInputAdjustTimeMs[ k ] = CDTXMania.ConfigIni.nInputAdjustTimeMs[ k ]; // #23580 2011.1.3 yyagi
\r
271 // 2011.1.7 ikanick 修正
\r
272 //this.nJudgeLinePosY_delta[ k ] = CDTXMania.ConfigIni.nJudgeLinePosOffset[ k ]; // #31602 2013.6.23 yyagi
\r
274 this.演奏判定ライン座標.n判定位置[ k ] = CDTXMania.ConfigIni.e判定位置[ k ];
\r
275 this.演奏判定ライン座標.nJudgeLinePosY_delta[ k ] = CDTXMania.ConfigIni.nJudgeLinePosOffset[ k ];
\r
276 this.bReverse[ k ] = CDTXMania.ConfigIni.bReverse[ k ]; //
\r
279 actCombo.演奏判定ライン座標 = 演奏判定ライン座標;
\r
280 for ( int i = 0; i < 3; i++ )
\r
282 this.b演奏にキーボードを使った[ i ] = false;
\r
283 this.b演奏にジョイパッドを使った[ i ] = false;
\r
284 this.b演奏にMIDI入力を使った[ i ] = false;
\r
285 this.b演奏にマウスを使った[ i ] = false;
\r
287 this.bAUTOでないチップが1つでもバーを通過した = false;
\r
288 cInvisibleChip.Reset();
\r
290 this.tステータスパネルの選択();
\r
292 //this.演奏判定ライン座標();
\r
294 this.bIsAutoPlay = CDTXMania.ConfigIni.bAutoPlay; // #24239 2011.1.23 yyagi
\r
297 //this.bIsAutoPlay.Guitar = CDTXMania.ConfigIni.bギターが全部オートプレイである;
\r
298 //this.bIsAutoPlay.Bass = CDTXMania.ConfigIni.bベースが全部オートプレイである;
\r
299 // this.nRisky = CDTXMania.ConfigIni.nRisky; // #23559 2011.7.28 yyagi
\r
300 actGauge.Init( CDTXMania.ConfigIni.nRisky ); // #23559 2011.7.28 yyagi
\r
301 this.nPolyphonicSounds = CDTXMania.ConfigIni.nPoliphonicSounds;
\r
302 e判定表示優先度 = CDTXMania.ConfigIni.e判定表示優先度;
\r
304 CDTXMania.Skin.tRemoveMixerAll(); // 効果音のストリームをミキサーから解除しておく
\r
306 queueMixerSound = new Queue<stmixer>( 64 );
\r
307 bIsDirectSound = ( CDTXMania.Sound管理.GetCurrentSoundDeviceType() == "DirectSound" );
\r
308 bUseOSTimer = CDTXMania.ConfigIni.bUseOSTimer;
\r
309 this.bPAUSE = false;
\r
310 if ( CDTXMania.DTXVmode.Enabled )
\r
312 db再生速度 = CDTXMania.DTX.dbDTXVPlaySpeed;
\r
313 CDTXMania.ConfigIni.n演奏速度 = (int) (CDTXMania.DTX.dbDTXVPlaySpeed * 20 + 0.5 );
\r
317 db再生速度 = ( (double) CDTXMania.ConfigIni.n演奏速度 ) / 20.0;
\r
319 bValidScore = ( CDTXMania.DTXVmode.Enabled ) ? false : true;
\r
321 cWailingChip = new CWailingChip共通[ 3 ]; // 0:未使用, 1:Gutiar, 2:Bass
\r
322 if ( CDTXMania.ConfigIni.bDrums有効 )
\r
324 cWailingChip[ 1 ] = new CWailngChip_Guitar_Drum画面( ref 演奏判定ライン座標 );
\r
325 cWailingChip[ 2 ] = new CWailngChip_Bass_Drum画面( ref 演奏判定ライン座標 );
\r
329 cWailingChip[ 1 ] = new CWailngChip_Guitar_GR画面( ref 演奏判定ライン座標 );
\r
330 cWailingChip[ 2 ] = new CWailngChip_Bass_GR画面( ref 演奏判定ライン座標 );
\r
333 #region [ 演奏開始前にmixer登録しておくべきサウンド(開幕してすぐに鳴らすことになるチップ音)を登録しておく ]
\r
334 foreach ( CDTX.CChip pChip in listChip )
\r
336 // Debug.WriteLine( "CH=" + pChip.nチャンネル番号.ToString( "x2" ) + ", 整数値=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
337 if ( pChip.n発声時刻ms <= 0 )
\r
339 if ( pChip.nチャンネル番号 == 0xDA )
\r
342 // Trace.TraceInformation( "first [DA] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
343 if ( listWAV.ContainsKey( pChip.n整数値・内部番号 ) )
\r
345 CDTX.CWAV wc = listWAV[ pChip.n整数値・内部番号 ];
\r
346 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
348 if ( wc.rSound[ i ] != null )
\r
350 CDTXMania.Sound管理.AddMixer( wc.rSound[ i ], db再生速度, pChip.b演奏終了後も再生が続くチップである );
\r
351 //AddMixer( wc.rSound[ i ] ); // 最初はqueueを介さず直接ミキサー登録する
\r
364 if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.24 yyagi Gt/Bsの譜面情報入れ替え
\r
366 CDTXMania.DTX.SwapGuitarBassInfos();
\r
368 this.sw = new Stopwatch();
\r
369 this.sw2 = new Stopwatch();
\r
370 // this.gclatencymode = GCSettings.LatencyMode;
\r
371 // GCSettings.LatencyMode = GCLatencyMode.Batch; // 演奏画面中はGCを抑止する
\r
373 public override void On非活性化()
\r
375 this.L最後に再生したHHの実WAV番号.Clear(); // #23921 2011.1.4 yyagi
\r
376 this.L最後に再生したHHの実WAV番号 = null; //
\r
377 for ( int i = 0; i < 3; i++ )
\r
379 this.queWailing[ i ].Clear();
\r
380 this.queWailing[ i ] = null;
\r
382 this.ctWailingチップ模様アニメ = null;
\r
383 this.ctチップ模様アニメ.Drums = null;
\r
384 this.ctチップ模様アニメ.Guitar = null;
\r
385 this.ctチップ模様アニメ.Bass = null;
\r
389 queueMixerSound.Clear();
\r
390 queueMixerSound = null;
\r
391 cInvisibleChip.Dispose();
\r
392 cInvisibleChip = null;
\r
393 // GCSettings.LatencyMode = this.gclatencymode;
\r
396 public override void OnManagedリソースの作成()
\r
398 if ( !base.b活性化してない )
\r
400 this.t背景テクスチャの生成();
\r
402 this.txWailing枠 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay wailing cursor.png" ) );
\r
404 base.OnManagedリソースの作成();
\r
407 public override void OnManagedリソースの解放()
\r
409 if ( !base.b活性化してない )
\r
411 CDTXMania.tテクスチャの解放( ref this.tx背景 );
\r
413 CDTXMania.tテクスチャの解放( ref this.txWailing枠 );
\r
414 base.OnManagedリソースの解放();
\r
420 #region [ protected ]
\r
421 //-----------------
\r
422 protected class CHITCOUNTOFRANK
\r
428 public int Perfect;
\r
432 public int this[ int index ]
\r
439 return this.Perfect;
\r
453 throw new IndexOutOfRangeException();
\r
460 this.Perfect = value;
\r
464 this.Great = value;
\r
479 throw new IndexOutOfRangeException();
\r
484 [StructLayout( LayoutKind.Sequential )]
\r
485 protected struct STKARAUCHI
\r
487 public CDTX.CChip HH;
\r
488 public CDTX.CChip SD;
\r
489 public CDTX.CChip BD;
\r
490 public CDTX.CChip HT;
\r
491 public CDTX.CChip LT;
\r
492 public CDTX.CChip FT;
\r
493 public CDTX.CChip CY;
\r
494 public CDTX.CChip HHO;
\r
495 public CDTX.CChip RD;
\r
496 public CDTX.CChip LC;
\r
497 public CDTX.CChip this[ int index ]
\r
533 throw new IndexOutOfRangeException();
\r
579 throw new IndexOutOfRangeException();
\r
584 protected struct stmixer
\r
586 internal bool bIsAdd;
\r
587 internal CSound csound;
\r
588 internal bool b演奏終了後も再生が続くチップである;
\r
591 protected CAct演奏AVI actAVI;
\r
592 protected CAct演奏BGA actBGA;
\r
594 protected CAct演奏チップファイアGB actChipFireGB;
\r
595 protected CAct演奏Combo共通 actCombo;
\r
596 protected CAct演奏Danger共通 actDANGER;
\r
597 protected CActFIFOBlack actFI;
\r
598 protected CActFIFOBlack actFO;
\r
599 protected CActFIFOWhite actFOClear;
\r
600 protected CAct演奏ゲージ共通 actGauge;
\r
602 protected CAct演奏判定文字列共通 actJudgeString;
\r
603 protected CAct演奏DrumsレーンフラッシュD actLaneFlushD;
\r
604 protected CAct演奏レーンフラッシュGB共通 actLaneFlushGB;
\r
605 protected CAct演奏パネル文字列 actPanel;
\r
606 protected CAct演奏演奏情報 actPlayInfo;
\r
607 protected CAct演奏RGB共通 actRGB;
\r
608 protected CAct演奏スコア共通 actScore;
\r
609 protected CAct演奏ステージ失敗 actStageFailed;
\r
610 protected CAct演奏ステータスパネル共通 actStatusPanels;
\r
611 protected CAct演奏WailingBonus共通 actWailingBonus;
\r
612 protected CAct演奏スクロール速度 act譜面スクロール速度;
\r
613 public C演奏判定ライン座標共通 演奏判定ライン座標;
\r
614 protected bool bPAUSE;
\r
615 protected STDGBVALUE<bool> b演奏にMIDI入力を使った;
\r
616 protected STDGBVALUE<bool> b演奏にキーボードを使った;
\r
617 protected STDGBVALUE<bool> b演奏にジョイパッドを使った;
\r
618 protected STDGBVALUE<bool> b演奏にマウスを使った;
\r
619 protected CCounter ctWailingチップ模様アニメ;
\r
620 protected STDGBVALUE<CCounter> ctチップ模様アニメ;
\r
622 protected E演奏画面の戻り値 eフェードアウト完了時の戻り値;
\r
623 protected readonly int[,] nBGAスコープチャンネルマップ = new int[ , ] { { 0xc4, 0xc7, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xe0 }, { 4, 7, 0x55, 0x56, 0x57, 0x58, 0x59, 0x60 } };
\r
624 protected readonly int[] nチャンネル0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 8, 0 };
\r
625 protected readonly int[] nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 7, 0 };
\r
626 protected readonly int[] nパッド0Atoチャンネル0A = new int[] { 0x11, 0x12, 0x13, 20, 0x15, 0x17, 0x16, 0x18, 0x19, 0x1a };
\r
627 protected readonly int[] nパッド0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 8, 0 }; // パッド画像のヒット処理用
\r
628 protected readonly int[] nパッド0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 7, 0 };
\r
629 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数・Auto含まない;
\r
630 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数・Auto含む;
\r
631 protected int n現在のトップChip = -1;
\r
632 protected int[] n最後に再生したBGMの実WAV番号 = new int[ 50 ];
\r
633 protected int n最後に再生したHHのチャンネル番号;
\r
634 protected List<int> L最後に再生したHHの実WAV番号; // #23921 2011.1.4 yyagi: change "int" to "List<int>", for recording multiple wav No.
\r
635 protected STLANEVALUE<int> n最後に再生した実WAV番号; // #26388 2011.11.8 yyagi: change "n最後に再生した実WAV番号.GUITAR" and "n最後に再生した実WAV番号.BASS"
\r
636 // into "n最後に再生した実WAV番号";
\r
637 // protected int n最後に再生した実WAV番号.GUITAR;
\r
638 // protected int n最後に再生した実WAV番号.BASS;
\r
640 protected volatile Queue<stmixer> queueMixerSound; // #24820 2013.1.21 yyagi まずは単純にAdd/Removeを1個のキューでまとめて管理するやり方で設計する
\r
641 protected DateTime dtLastQueueOperation; //
\r
642 protected bool bIsDirectSound; //
\r
643 protected double db再生速度;
\r
644 protected bool bValidScore;
\r
645 // protected bool bDTXVmode;
\r
646 // protected STDGBVALUE<int> nJudgeLinePosY_delta; // #31602 2013.6.23 yyagi 表示遅延対策として、判定ラインの表示位置をずらす機能を追加する
\r
647 protected STDGBVALUE<bool> bReverse;
\r
649 protected STDGBVALUE<Queue<CDTX.CChip>> queWailing;
\r
650 protected STDGBVALUE<CDTX.CChip> r現在の歓声Chip;
\r
651 protected CDTX.CChip r現在の空うちギターChip;
\r
652 protected STKARAUCHI r現在の空うちドラムChip;
\r
653 protected CDTX.CChip r現在の空うちベースChip;
\r
654 protected CDTX.CChip r次にくるギターChip;
\r
655 protected CDTX.CChip r次にくるベースChip;
\r
656 protected CTexture txWailing枠;
\r
657 protected CTexture txチップ;
\r
658 protected CTexture txヒットバー;
\r
660 protected CTexture tx背景;
\r
662 protected STDGBVALUE<int> nInputAdjustTimeMs; // #23580 2011.1.3 yyagi
\r
663 protected STAUTOPLAY bIsAutoPlay; // #24239 2011.1.23 yyagi
\r
664 // protected int nRisky_InitialVar, nRiskyTime; // #23559 2011.7.28 yyagi → CAct演奏ゲージ共通クラスに隠蔽
\r
665 protected int nPolyphonicSounds;
\r
666 protected List<CDTX.CChip> listChip;
\r
667 protected Dictionary<int, CDTX.CWAV> listWAV;
\r
668 protected CInvisibleChip cInvisibleChip;
\r
669 protected bool bUseOSTimer;
\r
670 protected E判定表示優先度 e判定表示優先度;
\r
671 protected CWailingChip共通[] cWailingChip;
\r
673 protected Stopwatch sw; // 2011.6.13 最適化検討用のストップウォッチ
\r
674 protected Stopwatch sw2;
\r
675 // protected GCLatencyMode gclatencymode;
\r
677 public void AddMixer( CSound cs, bool _b演奏終了後も再生が続くチップである )
\r
679 stmixer stm = new stmixer()
\r
683 b演奏終了後も再生が続くチップである = _b演奏終了後も再生が続くチップである
\r
685 queueMixerSound.Enqueue( stm );
\r
686 // Debug.WriteLine( "★Queue: add " + Path.GetFileName( stm.csound.strファイル名 ));
\r
688 public void RemoveMixer( CSound cs )
\r
690 stmixer stm = new stmixer()
\r
694 b演奏終了後も再生が続くチップである = false
\r
696 queueMixerSound.Enqueue( stm );
\r
697 // Debug.WriteLine( "★Queue: remove " + Path.GetFileName( stm.csound.strファイル名 ));
\r
699 public void ManageMixerQueue()
\r
701 // もしサウンドの登録/削除が必要なら、実行する
\r
702 if ( queueMixerSound.Count > 0 )
\r
704 //Debug.WriteLine( "☆queueLength=" + queueMixerSound.Count );
\r
705 DateTime dtnow = DateTime.Now;
\r
706 TimeSpan ts = dtnow - dtLastQueueOperation;
\r
707 if ( ts.Milliseconds > 7 )
\r
709 for ( int i = 0; i < 2 && queueMixerSound.Count > 0; i++ )
\r
711 dtLastQueueOperation = dtnow;
\r
712 stmixer stm = queueMixerSound.Dequeue();
\r
715 CDTXMania.Sound管理.AddMixer( stm.csound, db再生速度, stm.b演奏終了後も再生が続くチップである );
\r
719 CDTXMania.Sound管理.RemoveMixer( stm.csound );
\r
726 protected E判定 e指定時刻からChipのJUDGEを返す( long nTime, CDTX.CChip pChip, int nInputAdjustTime )
\r
728 if ( pChip != null )
\r
730 pChip.nLag = (int) ( nTime + nInputAdjustTime - pChip.n発声時刻ms ); // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature
\r
731 int nDeltaTime = Math.Abs( pChip.nLag );
\r
732 //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms));
\r
733 if ( nDeltaTime <= CDTXMania.nPerfect範囲ms )
\r
735 return E判定.Perfect;
\r
737 if ( nDeltaTime <= CDTXMania.nGreat範囲ms )
\r
741 if ( nDeltaTime <= CDTXMania.nGood範囲ms )
\r
745 if ( nDeltaTime <= CDTXMania.nPoor範囲ms )
\r
752 protected CDTX.CChip r空うちChip( E楽器パート part, Eパッド pad )
\r
760 if ( this.r現在の空うちドラムChip.HH != null )
\r
762 return this.r現在の空うちドラムChip.HH;
\r
764 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
766 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
768 return this.r現在の空うちドラムChip.HHO;
\r
770 if ( this.r現在の空うちドラムChip.HHO != null )
\r
772 return this.r現在の空うちドラムChip.HHO;
\r
775 return this.r現在の空うちドラムChip.LC;
\r
778 return this.r現在の空うちドラムChip.SD;
\r
781 return this.r現在の空うちドラムChip.BD;
\r
784 return this.r現在の空うちドラムChip.HT;
\r
787 if ( this.r現在の空うちドラムChip.LT != null )
\r
789 return this.r現在の空うちドラムChip.LT;
\r
791 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
793 return this.r現在の空うちドラムChip.FT;
\r
798 if ( this.r現在の空うちドラムChip.FT != null )
\r
800 return this.r現在の空うちドラムChip.FT;
\r
802 if ( CDTXMania.ConfigIni.eFTGroup == EFTGroup.共通 )
\r
804 return this.r現在の空うちドラムChip.LT;
\r
809 if ( this.r現在の空うちドラムChip.CY != null )
\r
811 return this.r現在の空うちドラムChip.CY;
\r
813 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
815 return this.r現在の空うちドラムChip.RD;
\r
820 if ( this.r現在の空うちドラムChip.HHO != null )
\r
822 return this.r現在の空うちドラムChip.HHO;
\r
824 if ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける )
\r
826 if ( CDTXMania.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける )
\r
828 return this.r現在の空うちドラムChip.HH;
\r
830 if ( this.r現在の空うちドラムChip.HH != null )
\r
832 return this.r現在の空うちドラムChip.HH;
\r
835 return this.r現在の空うちドラムChip.LC;
\r
838 if ( this.r現在の空うちドラムChip.RD != null )
\r
840 return this.r現在の空うちドラムChip.RD;
\r
842 if ( CDTXMania.ConfigIni.eCYGroup == ECYGroup.共通 )
\r
844 return this.r現在の空うちドラムChip.CY;
\r
849 if ( this.r現在の空うちドラムChip.LC != null )
\r
851 return this.r現在の空うちドラムChip.LC;
\r
853 if ( ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける ) && ( CDTXMania.ConfigIni.eHHGroup != EHHGroup.全部共通 ) )
\r
857 if ( this.r現在の空うちドラムChip.HH != null )
\r
859 return this.r現在の空うちドラムChip.HH;
\r
861 return this.r現在の空うちドラムChip.HHO;
\r
865 case E楽器パート.GUITAR:
\r
866 return this.r現在の空うちギターChip;
\r
869 return this.r現在の空うちベースChip;
\r
873 protected CDTX.CChip r指定時刻に一番近いChip・ヒット未済問わず不可視考慮( long nTime, int nChannel, int nInputAdjustTime )
\r
876 //Trace.TraceInformation( "NTime={0}, nChannel={1:x2}", nTime, nChannel );
\r
877 nTime += nInputAdjustTime; // #24239 2011.1.23 yyagi InputAdjust
\r
879 int nIndex_InitialPositionSearchingToPast;
\r
880 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
885 int count = listChip.Count;
\r
886 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
887 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
889 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
891 //int nIndex_NearestChip_Future; // = nIndex_InitialPositionSearchingToFuture;
\r
892 //while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
893 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
\r
895 CDTX.CChip chip = listChip[ nIndex_NearestChip_Future ];
\r
896 if ( chip.b空打ちチップである )
\r
900 if ( ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) ) )
\r
902 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
904 if ( chip.n発声時刻ms > nTime )
\r
908 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
910 continue; // ほんの僅かながら高速化
\r
912 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
914 if ( chip.n発声時刻ms > nTime )
\r
918 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
920 else if ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
922 if ( chip.n発声時刻ms > nTime )
\r
926 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
928 // nIndex_NearestChip_Future++;
\r
930 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
931 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
932 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
934 CDTX.CChip chip = listChip[ nIndex_NearestChip_Past ];
\r
935 if ( chip.b空打ちチップである )
\r
939 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
941 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
946 else if ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
948 if ( ( 0x20 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0x28 ) )
\r
953 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) )
\r
954 && ( ( 0xa0 <= chip.nチャンネル番号 ) && ( chip.nチャンネル番号 <= 0xa8 ) ) )
\r
958 // nIndex_NearestChip_Past--;
\r
961 if ( nIndex_NearestChip_Future >= count )
\r
963 if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
967 else // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
970 return listChip[ nIndex_NearestChip_Past ];
\r
973 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
976 return listChip[ nIndex_NearestChip_Future ];
\r
978 // 検索対象が過去未来の双方に見つかったなら、より近い方を採用する
\r
979 CDTX.CChip nearestChip_Future = listChip[ nIndex_NearestChip_Future ];
\r
980 CDTX.CChip nearestChip_Past = listChip[ nIndex_NearestChip_Past ];
\r
981 int nDiffTime_Future = Math.Abs( (int) ( nTime - nearestChip_Future.n発声時刻ms ) );
\r
982 int nDiffTime_Past = Math.Abs( (int) ( nTime - nearestChip_Past.n発声時刻ms ) );
\r
983 if ( nDiffTime_Future >= nDiffTime_Past )
\r
986 return nearestChip_Past;
\r
989 return nearestChip_Future;
\r
991 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part )
\r
993 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, CDTXMania.ConfigIni.n手動再生音量, false, false );
\r
995 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量 )
\r
997 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, false, false );
\r
999 protected void tサウンド再生( CDTX.CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ )
\r
1001 this.tサウンド再生( rChip, n再生開始システム時刻ms, part, n音量, bモニタ, false );
\r
1003 protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
1005 // mute sound (auto)
\r
1014 if ( pChip != null )
\r
1016 bool overwrite = false;
\r
1019 case E楽器パート.DRUMS:
\r
1022 int index = pChip.nチャンネル番号;
\r
1023 if ( ( 0x11 <= index ) && ( index <= 0x1a ) )
\r
1027 else if ( ( 0x31 <= index ) && ( index <= 0x3a ) )
\r
1031 // mute sound (auto)
\r
1032 // 4A: 84: HH (HO/HC)
\r
1038 else if ( 0x84 == index ) // 仮に今だけ追加 HHは消音処理があるので overwriteフラグ系の処理は改めて不要
\r
1042 else if ( ( 0x85 <= index ) && ( index <= 0x87 ) ) // 仮に今だけ追加
\r
1045 int[] ch = { 0x16, 0x19, 0x1A };
\r
1046 pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x85 ];
\r
1047 index = pChip.nチャンネル番号 - 0x11;
\r
1054 int nLane = this.nチャンネル0Atoレーン07[ index ];
\r
1055 if ( ( nLane == 1 ) && // 今回演奏するのがHC or HO
\r
1056 ( index == 0 || ( index == 7 && this.n最後に再生したHHのチャンネル番号 != 0x18 && this.n最後に再生したHHのチャンネル番号 != 0x38 ) )
\r
1057 // HCを演奏するか、またはHO演奏&以前HO演奏でない&以前不可視HO演奏でない
\r
1059 // #24772 2011.4.4 yyagi
\r
1060 // == HH mute condition ==
\r
1061 // current HH So, the mute logics are:
\r
1062 // HC HO 1) All played HC/HOs should be queueing
\r
1063 // last HH HC Yes Yes 2) If you aren't in "both current/last HH are HO", queued HH should be muted.
\r
1066 // #23921 2011.1.4 yyagi: 2種類以上のオープンハイハットが発音済みだと、最後のHHOしか消せない問題に対応。
\r
1067 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1068 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
1071 for ( int i = 0; i < this.L最後に再生したHHの実WAV番号.Count; i++ ) // #23921 2011.1.4 yyagi
\r
1073 // CDTXMania.DTX.tWavの再生停止(this.L最後に再生したHHの実WAV番号);
\r
1074 CDTXMania.DTX.tWavの再生停止( this.L最後に再生したHHの実WAV番号[ i ] ); // #23921 yyagi ストック分全て消音する
\r
1076 this.L最後に再生したHHの実WAV番号.Clear();
\r
1077 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1080 //this.n最後に再生したHHの実WAV番号 = pChip.n整数値・内部番号;
\r
1081 this.n最後に再生したHHのチャンネル番号 = pChip.nチャンネル番号;
\r
1083 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1084 if (CDTXMania.DTX.b演奏で直前の音を消音する.HH)
\r
1087 if ( index == 0 || index == 7 || index == 0x20 || index == 0x27 ) // #23921 HOまたは不可視HO演奏時はそのチップ番号をストックしておく
\r
1088 { // #24772 HC, 不可視HCも消音キューに追加
\r
1089 if ( this.L最後に再生したHHの実WAV番号.Count >= 16 ) // #23921 ただしストック数が16以上になるようなら、頭の1個を削って常に16未満に抑える
\r
1090 { // (ストックが増えてList<>のrealloc()が発生するのを予防する)
\r
1091 this.L最後に再生したHHの実WAV番号.RemoveAt( 0 );
\r
1093 if ( !this.L最後に再生したHHの実WAV番号.Contains( pChip.n整数値・内部番号 ) ) // チップ音がまだストックされてなければ
\r
1095 this.L最後に再生したHHの実WAV番号.Add( pChip.n整数値・内部番号 ); // ストックする
\r
1098 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1103 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号[index] );
\r
1105 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, nLane, n音量, bモニタ );
\r
1106 this.n最後に再生した実WAV番号[ nLane ] = pChip.n整数値・内部番号; // nLaneでなくindexにすると、LC(1A-11=09)とギター(enumで09)がかぶってLC音が消されるので注意
\r
1110 case E楽器パート.GUITAR:
\r
1111 #region [ GUITAR ]
\r
1112 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1113 if (CDTXMania.DTX.b演奏で直前の音を消音する.Guitar) {
\r
1115 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
1116 #if TEST_NOTEOFFMODE
\r
1119 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Guitar, n音量, bモニタ, b音程をずらして再生 );
\r
1120 this.n最後に再生した実WAV番号.Guitar = pChip.n整数値・内部番号;
\r
1125 #if TEST_NOTEOFFMODE
\r
1126 if (CDTXMania.DTX.b演奏で直前の音を消音する.Bass) {
\r
1128 CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Bass );
\r
1129 #if TEST_NOTEOFFMODE
\r
1132 CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, (int) Eレーン.Bass, n音量, bモニタ, b音程をずらして再生 );
\r
1133 this.n最後に再生した実WAV番号.Bass = pChip.n整数値・内部番号;
\r
1142 protected void tステータスパネルの選択()
\r
1144 if ( CDTXMania.bコンパクトモード )
\r
1146 this.actStatusPanels.tラベル名からステータスパネルを決定する( null );
\r
1148 else if ( CDTXMania.stage選曲.r確定された曲 != null )
\r
1150 this.actStatusPanels.tラベル名からステータスパネルを決定する( CDTXMania.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.stage選曲.n確定された曲の難易度 ] );
\r
1153 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip )
\r
1155 return tチップのヒット処理( nHitTime, pChip, true );
\r
1157 protected abstract E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, bool bCorrectLane );
\r
1158 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode ) // E楽器パート screenmode
\r
1160 return tチップのヒット処理( nHitTime, pChip, screenmode, true );
\r
1162 protected E判定 tチップのヒット処理( long nHitTime, CDTX.CChip pChip, E楽器パート screenmode, bool bCorrectLane )
\r
1164 pChip.bHit = true;
\r
1165 #region [メソッド化する前の記述(注釈化)]
\r
1166 // bool bPChipIsAutoPlay = false;
\r
1167 // bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
1168 // bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
1169 // bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
1170 // bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
1171 // bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
1172 // if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
1174 // if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
1176 // bPChipIsAutoPlay = true;
\r
1179 // else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
1181 ////Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
1182 ////Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
1183 // bPChipIsAutoPlay = true;
\r
1184 // if ( !bIsAutoPlay[ (int) Eレーン.GtPick ] ) bPChipIsAutoPlay = false;
\r
1187 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.GtR ] ) bPChipIsAutoPlay = false;
\r
1188 // else if ( bGtBsG && !bIsAutoPlay[ (int) Eレーン.GtG ] ) bPChipIsAutoPlay = false;
\r
1189 // else if ( bGtBsB && !bIsAutoPlay[ (int) Eレーン.GtB ] ) bPChipIsAutoPlay = false;
\r
1190 // else if ( bGtBsW && !bIsAutoPlay[ (int) Eレーン.GtW ] ) bPChipIsAutoPlay = false;
\r
1191 // else if ( bGtBsO &&
\r
1192 // ( !bIsAutoPlay[ (int) Eレーン.GtR] || !bIsAutoPlay[ (int) Eレーン.GtG] || !bIsAutoPlay[ (int) Eレーン.GtB] ) )
\r
1193 // bPChipIsAutoPlay = false;
\r
1196 // else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
1198 // bPChipIsAutoPlay = true;
\r
1199 // if ( !bIsAutoPlay[ (int) Eレーン.BsPick ] ) bPChipIsAutoPlay = false;
\r
1202 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.BsR ] ) bPChipIsAutoPlay = false;
\r
1203 // else if ( bGtBsG && bIsAutoPlay[ (int) Eレーン.BsG ] ) bPChipIsAutoPlay = false;
\r
1204 // else if ( bGtBsB && bIsAutoPlay[ (int) Eレーン.BsB ] ) bPChipIsAutoPlay = false;
\r
1205 // else if ( bGtBsW && bIsAutoPlay[ (int) Eレーン.BsW ] ) bPChipIsAutoPlay = false;
\r
1206 // else if ( bGtBsO &&
\r
1207 // ( !bIsAutoPlay[ (int) Eレーン.BsR ] || !bIsAutoPlay[ (int) Eレーン.BsG ] || !bIsAutoPlay[ (int) Eレーン.BsB ] ) )
\r
1208 // bPChipIsAutoPlay = false;
\r
1213 // this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1215 ////Trace.TraceInformation( "ch={0:x2}, flag={1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
1217 if ( pChip.e楽器パート == E楽器パート.UNKNOWN )
\r
1219 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1223 cInvisibleChip.StartSemiInvisible( pChip.e楽器パート );
\r
1225 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1227 pChip.bIsAutoPlayed = bPChipIsAutoPlay; // 2011.6.10 yyagi
\r
1228 E判定 eJudgeResult = E判定.Auto;
\r
1229 switch ( pChip.e楽器パート )
\r
1231 case E楽器パート.DRUMS:
\r
1233 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Drums;
\r
1234 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1235 this.actJudgeString.Start( this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ], bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1239 case E楽器パート.GUITAR:
\r
1241 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1242 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1243 this.actJudgeString.Start( 10, bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1249 int nInputAdjustTime = bPChipIsAutoPlay ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1250 eJudgeResult = (bCorrectLane)? this.e指定時刻からChipのJUDGEを返す( nHitTime, pChip, nInputAdjustTime ) : E判定.Miss;
\r
1251 this.actJudgeString.Start( 11, bPChipIsAutoPlay ? E判定.Auto : eJudgeResult, pChip.nLag );
\r
1255 if ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) )
\r
1257 // this.t判定にあわせてゲージを増減する( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1258 actGauge.Damage( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1260 if ( eJudgeResult == E判定.Poor || eJudgeResult == E判定.Miss || eJudgeResult == E判定.Bad )
\r
1262 cInvisibleChip.ShowChipTemporally( pChip.e楽器パート );
\r
1264 switch ( pChip.e楽器パート )
\r
1266 case E楽器パート.DRUMS:
\r
1267 switch ( eJudgeResult )
\r
1271 this.nヒット数・Auto含む.Drums.Miss++;
\r
1272 if ( !bPChipIsAutoPlay )
\r
1274 this.nヒット数・Auto含まない.Drums.Miss++;
\r
1278 this.nヒット数・Auto含む.Drums[ (int) eJudgeResult ]++;
\r
1279 if ( !bPChipIsAutoPlay )
\r
1281 this.nヒット数・Auto含まない.Drums[ (int) eJudgeResult ]++;
\r
1286 if ( CDTXMania.ConfigIni.bドラムが全部オートプレイである || !bPChipIsAutoPlay )
\r
1288 switch ( eJudgeResult )
\r
1293 this.actCombo.n現在のコンボ数.Drums++;
\r
1297 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1303 case E楽器パート.GUITAR:
\r
1305 int indexInst = (int) pChip.e楽器パート;
\r
1306 switch ( eJudgeResult )
\r
1310 this.nヒット数・Auto含む[ indexInst ].Miss++;
\r
1311 if ( !bPChipIsAutoPlay )
\r
1313 this.nヒット数・Auto含まない[ indexInst ].Miss++;
\r
1316 default: // #24068 2011.1.10 ikanick changed
\r
1317 // #24167 2011.1.16 yyagi changed
\r
1318 this.nヒット数・Auto含む[ indexInst ][ (int) eJudgeResult ]++;
\r
1319 if ( !bPChipIsAutoPlay )
\r
1321 this.nヒット数・Auto含まない[ indexInst ][ (int) eJudgeResult ]++;
\r
1325 switch ( eJudgeResult )
\r
1330 this.actCombo.n現在のコンボ数[ indexInst ]++;
\r
1334 this.actCombo.n現在のコンボ数[ indexInst ] = 0;
\r
1342 if ( ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) ) && ( eJudgeResult != E判定.Miss ) && ( eJudgeResult != E判定.Bad ) )
\r
1344 int nCombos = this.actCombo.n現在のコンボ数[ (int) pChip.e楽器パート ];
\r
1345 long nScoreDelta = 0;
\r
1346 long[] nComboScoreDelta = new long[] { 350L, 200L, 50L, 0L };
\r
1347 if ( ( nCombos <= 500 ) || ( eJudgeResult == E判定.Good ) )
\r
1349 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * nCombos;
\r
1351 else if ( ( eJudgeResult == E判定.Perfect ) || ( eJudgeResult == E判定.Great ) )
\r
1353 nScoreDelta = nComboScoreDelta[ (int) eJudgeResult ] * 500L;
\r
1355 this.actScore.Add( pChip.e楽器パート, bIsAutoPlay, nScoreDelta );
\r
1357 return eJudgeResult;
\r
1359 protected abstract void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part );
\r
1360 protected abstract void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, int nLane );
\r
1361 protected void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, E楽器パート screenmode )
\r
1363 this.tチップのヒット処理・BadならびにTight時のMiss( part, 0, screenmode );
\r
1365 protected void tチップのヒット処理・BadならびにTight時のMiss( E楽器パート part, int nLane, E楽器パート screenmode )
\r
1367 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1368 cInvisibleChip.StartSemiInvisible( part );
\r
1369 cInvisibleChip.ShowChipTemporally( part );
\r
1370 //this.t判定にあわせてゲージを増減する( screenmode, part, E判定.Miss );
\r
1371 actGauge.Damage( screenmode, part, E判定.Miss );
\r
1374 case E楽器パート.DRUMS:
\r
1375 if ( ( nLane >= 0 ) && ( nLane <= 7 ) )
\r
1377 this.actJudgeString.Start( nLane, bIsAutoPlay[ nLane ] ? E判定.Auto : E判定.Miss, 999 );
\r
1379 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1382 case E楽器パート.GUITAR:
\r
1383 this.actJudgeString.Start( 10, E判定.Bad, 999 );
\r
1384 this.actCombo.n現在のコンボ数.Guitar = 0;
\r
1388 this.actJudgeString.Start( 11, E判定.Bad, 999 );
\r
1389 this.actCombo.n現在のコンボ数.Bass = 0;
\r
1397 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannelFlag, int nInputAdjustTime )
\r
1399 return this.r指定時刻に一番近い未ヒットChip( nTime, nChannelFlag, nInputAdjustTime, 0 );
\r
1401 protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannel, int nInputAdjustTime, int n検索範囲時間ms )
\r
1404 //Trace.TraceInformation( "nTime={0}, nChannel={1:x2}, 現在のTop={2}", nTime, nChannel,CDTXMania.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms );
\r
1405 nTime += nInputAdjustTime;
\r
1407 int nIndex_InitialPositionSearchingToPast;
\r
1409 if ( this.n現在のトップChip == -1 ) // 演奏データとして1個もチップがない場合は
\r
1414 int count = listChip.Count;
\r
1415 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
1416 if ( this.n現在のトップChip >= count ) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
1418 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
1420 // int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToFuture;
\r
1421 // while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
1422 for ( ; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++ )
\r
1424 CDTX.CChip chip = listChip[ nIndex_NearestChip_Future ];
\r
1427 if ( chip.b空打ちチップである )
\r
1431 if ( ( 0x11 <= nChannel ) && ( nChannel <= 0x1a ) )
\r
1433 if ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1435 if ( chip.n発声時刻ms > nTime )
\r
1439 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1443 else if ( ( ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) || ( ( ( 0x20 <= nChannel ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1445 if ( chip.n発声時刻ms > nTime )
\r
1449 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1451 else if ( ( ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) || ( ( ( 0xa0 <= nChannel ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) ) ) )
\r
1453 if ( chip.n発声時刻ms > nTime )
\r
1457 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1460 // nIndex_NearestChip_Future++;
\r
1462 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
1463 // while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
1464 for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
\r
1466 CDTX.CChip chip = listChip[ nIndex_NearestChip_Past ];
\r
1467 if ( chip.b空打ちチップである )
\r
1471 if ( ( !chip.bHit ) &&
\r
1473 ( ( nChannel >= 0x11 ) && ( nChannel <= 0x1a ) &&
\r
1474 ( ( chip.nチャンネル番号 == nChannel ) || ( chip.nチャンネル番号 == ( nChannel + 0x20 ) ) )
\r
1478 ( ( nChannel == 0x2f ) && ( chip.e楽器パート == E楽器パート.GUITAR ) ) ||
\r
1479 ( ( ( nChannel >= 0x20 ) && ( nChannel <= 0x28 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1483 ( ( nChannel == 0xaf ) && ( chip.e楽器パート == E楽器パート.BASS ) ) ||
\r
1484 ( ( ( nChannel >= 0xA0 ) && ( nChannel <= 0xa8 ) ) && ( chip.nチャンネル番号 == nChannel ) )
\r
1491 // nIndex_NearestChip_Past--;
\r
1493 if ( ( nIndex_NearestChip_Future >= count ) && ( nIndex_NearestChip_Past < 0 ) ) // 検索対象が過去未来どちらにも見つからなかった場合
\r
1498 CDTX.CChip nearestChip; // = null; // 以下のifブロックのいずれかで必ずnearestChipには非nullが代入されるので、null初期化を削除
\r
1499 if ( nIndex_NearestChip_Future >= count ) // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
1501 nearestChip = listChip[ nIndex_NearestChip_Past ];
\r
1502 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1504 else if ( nIndex_NearestChip_Past < 0 ) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
1506 nearestChip = listChip[ nIndex_NearestChip_Future ];
\r
1507 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1511 int nTimeDiff_Future = Math.Abs( (int) ( nTime - listChip[ nIndex_NearestChip_Future ].n発声時刻ms ) );
\r
1512 int nTimeDiff_Past = Math.Abs( (int) ( nTime - listChip[ nIndex_NearestChip_Past ].n発声時刻ms ) );
\r
1513 if ( nTimeDiff_Future < nTimeDiff_Past )
\r
1515 nearestChip = listChip[ nIndex_NearestChip_Future ];
\r
1516 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1520 nearestChip = listChip[ nIndex_NearestChip_Past ];
\r
1521 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1524 nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1525 if ( ( n検索範囲時間ms > 0 ) && ( nTimeDiff > n検索範囲時間ms ) ) // チップは見つかったが、検索範囲時間外だった場合
\r
1531 return nearestChip;
\r
1534 protected CDTX.CChip r次に来る指定楽器Chipを更新して返す( E楽器パート inst )
\r
1536 switch ( (int) inst )
\r
1538 case (int)E楽器パート.GUITAR:
\r
1539 return r次にくるギターChipを更新して返す();
\r
1540 case (int)E楽器パート.BASS:
\r
1541 return r次にくるベースChipを更新して返す();
\r
1546 protected CDTX.CChip r次にくるギターChipを更新して返す()
\r
1548 int nInputAdjustTime = this.bIsAutoPlay.GtPick ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1549 this.r次にくるギターChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0x2f, nInputAdjustTime, 500 );
\r
1550 return this.r次にくるギターChip;
\r
1552 protected CDTX.CChip r次にくるベースChipを更新して返す()
\r
1554 int nInputAdjustTime = this.bIsAutoPlay.BsPick ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1555 this.r次にくるベースChip = this.r指定時刻に一番近い未ヒットChip( CSound管理.rc演奏用タイマ.n現在時刻, 0xaf, nInputAdjustTime, 500 );
\r
1556 return this.r次にくるベースChip;
\r
1559 protected void ChangeInputAdjustTimeInPlaying( IInputDevice keyboard, int plusminus ) // #23580 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1561 int part, offset = plusminus;
\r
1562 if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) ) // Guitar InputAdjustTime
\r
1564 part = (int) E楽器パート.GUITAR;
\r
1566 else if ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftAlt ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightAlt ) ) // Bass InputAdjustTime
\r
1568 part = (int) E楽器パート.BASS;
\r
1570 else // Drums InputAdjustTime
\r
1572 part = (int) E楽器パート.DRUMS;
\r
1574 if ( !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) && !keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) )
\r
1579 this.nInputAdjustTimeMs[ part ] += offset;
\r
1580 if ( this.nInputAdjustTimeMs[ part ] > 99 )
\r
1582 this.nInputAdjustTimeMs[ part ] = 99;
\r
1584 else if ( this.nInputAdjustTimeMs[ part ] < -99 )
\r
1586 this.nInputAdjustTimeMs[ part ] = -99;
\r
1588 CDTXMania.ConfigIni.nInputAdjustTimeMs[ part ] = this.nInputAdjustTimeMs[ part ];
\r
1591 protected abstract void t入力処理・ドラム();
\r
1592 protected abstract void ドラムスクロール速度アップ();
\r
1593 protected abstract void ドラムスクロール速度ダウン();
\r
1594 protected void tキー入力()
\r
1596 IInputDevice keyboard = CDTXMania.Input管理.Keyboard;
\r
1597 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) &&
\r
1598 ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1599 { // shift+f1 (pause)
\r
1600 this.bPAUSE = !this.bPAUSE;
\r
1601 if ( this.bPAUSE )
\r
1603 CSound管理.rc演奏用タイマ.t一時停止();
\r
1604 CDTXMania.Timer.t一時停止();
\r
1605 CDTXMania.DTX.t全チップの再生一時停止();
\r
1609 CSound管理.rc演奏用タイマ.t再開();
\r
1610 CDTXMania.Timer.t再開();
\r
1611 CDTXMania.DTX.t全チップの再生再開();
\r
1614 if ( ( !this.bPAUSE && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1617 this.t入力処理・ギターベース( E楽器パート.GUITAR );
\r
1618 this.t入力処理・ギターベース( E楽器パート.BASS );
\r
1619 if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1620 { // shift (+ctrl) + UpArrow (BGMAdjust)
\r
1621 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? 1 : 10 );
\r
1622 CDTXMania.DTX.tWave再生位置自動補正();
\r
1624 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) )
\r
1625 { // shift + DownArrow (BGMAdjust)
\r
1626 CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? -1 : -10 );
\r
1627 CDTXMania.DTX.tWave再生位置自動補正();
\r
1629 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) )
\r
1630 { // UpArrow(scrollspeed up)
\r
1633 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.DownArrow ) )
\r
1634 { // DownArrow (scrollspeed down)
\r
1637 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Delete ) )
\r
1638 { // del (debug info)
\r
1639 CDTXMania.ConfigIni.b演奏情報を表示する = !CDTXMania.ConfigIni.b演奏情報を表示する;
\r
1641 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.LeftArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1643 ChangeInputAdjustTimeInPlaying( keyboard, -1 );
\r
1645 else if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) ) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1647 ChangeInputAdjustTimeInPlaying( keyboard, +1 );
\r
1649 else if ( ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) && ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || CDTXMania.Pad.b押されたGB( Eパッド.FT ) ) )
\r
1650 { // escape (exit)
\r
1651 this.actFO.tフェードアウト開始();
\r
1652 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
\r
1653 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.演奏中断;
\r
1658 protected void t入力メソッド記憶( E楽器パート part )
\r
1660 if ( CDTXMania.Pad.st検知したデバイス.Keyboard )
\r
1662 this.b演奏にキーボードを使った[ (int) part ] = true;
\r
1664 if ( CDTXMania.Pad.st検知したデバイス.Joypad )
\r
1666 this.b演奏にジョイパッドを使った[ (int) part ] = true;
\r
1668 if ( CDTXMania.Pad.st検知したデバイス.MIDIIN )
\r
1670 this.b演奏にMIDI入力を使った[ (int) part ] = true;
\r
1672 if ( CDTXMania.Pad.st検知したデバイス.Mouse )
\r
1674 this.b演奏にマウスを使った[ (int) part ] = true;
\r
1679 protected abstract void t進行描画・AVI();
\r
1680 protected void t進行描画・AVI(int x, int y)
\r
1682 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bAVI有効 ) )
\r
1684 this.actAVI.t進行描画( (int) ( x * Scale.X ), (int) ( y * Scale.Y ) );
\r
1687 protected abstract void t進行描画・BGA();
\r
1688 protected void t進行描画・BGA(int x, int y)
\r
1690 if ( ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) && ( !CDTXMania.ConfigIni.bストイックモード && CDTXMania.ConfigIni.bBGA有効 ) )
\r
1692 this.actBGA.t進行描画( x, y );
\r
1695 protected abstract void t進行描画・DANGER();
\r
1696 protected void t進行描画・MIDIBGM()
\r
1698 if ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED )
\r
1700 CStage.Eフェーズ eフェーズid1 = base.eフェーズID;
\r
1703 protected void t進行描画・RGBボタン()
\r
1705 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
1707 this.actRGB.t進行描画( 演奏判定ライン座標 );
\r
1710 protected void t進行描画・STAGEFAILED()
\r
1712 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
1714 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.ステージ失敗;
\r
1715 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト;
\r
1716 this.actFO.tフェードアウト開始();
\r
1719 protected void t進行描画・WailingBonus()
\r
1721 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1723 this.actWailingBonus.On進行描画();
\r
1726 protected abstract void t進行描画・Wailing枠();
\r
1727 protected void t進行描画・Wailing枠(int GtWailingFrameX, int BsWailingFrameX, int GtWailingFrameY, int BsWailingFrameY)
\r
1729 if ( ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
1731 if ( this.txWailing枠 != null )
\r
1733 if ( CDTXMania.DTX.bチップがある.Guitar )
\r
1735 this.txWailing枠.t2D描画( CDTXMania.app.Device, GtWailingFrameX, GtWailingFrameY );
\r
1737 if ( CDTXMania.DTX.bチップがある.Bass )
\r
1739 this.txWailing枠.t2D描画( CDTXMania.app.Device, BsWailingFrameX, BsWailingFrameY );
\r
1746 protected void t進行描画・チップファイアGB()
\r
1748 this.actChipFireGB.On進行描画();
\r
1750 protected abstract void t進行描画・パネル文字列();
\r
1751 protected void t進行描画・パネル文字列(int x, int y)
\r
1753 if ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1755 this.actPanel.t進行描画( x, y );
\r
1758 protected void tパネル文字列の設定()
\r
1760 this.actPanel.SetPanelString( string.IsNullOrEmpty( CDTXMania.DTX.PANEL ) ? CDTXMania.DTX.TITLE : CDTXMania.DTX.PANEL );
\r
1764 protected void t進行描画・ゲージ()
\r
1766 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
1768 this.actGauge.On進行描画();
\r
1771 protected void t進行描画・コンボ()
\r
1773 this.actCombo.On進行描画();
\r
1775 protected void t進行描画・スコア()
\r
1777 this.actScore.On進行描画();
\r
1779 protected void t進行描画・ステータスパネル()
\r
1781 this.actStatusPanels.On進行描画();
\r
1783 protected bool t進行描画・チップ( E楽器パート ePlayMode )
\r
1785 if ( ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED ) || ( base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
1789 if ( ( this.n現在のトップChip == -1 ) || ( this.n現在のトップChip >= listChip.Count ) )
\r
1793 if ( this.n現在のトップChip == -1 )
\r
1798 //double speed = 264.0; // BPM150の時の1小節の長さ[dot]
\r
1799 const double speed = 234.0; // BPM150の時の1小節の長さ[dot]
\r
1801 double ScrollSpeedDrums = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Drums + 1.0 ) * 0.5 * 37.5 * speed / 60000.0;
\r
1802 double ScrollSpeedGuitar = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Guitar + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1803 double ScrollSpeedBass = ( this.act譜面スクロール速度.db現在の譜面スクロール速度.Bass + 1.0 ) * 0.5 * 0.5 * 37.5 * speed / 60000.0;
\r
1805 CDTX dTX = CDTXMania.DTX;
\r
1806 CConfigIni configIni = CDTXMania.ConfigIni;
\r
1807 for ( int nCurrentTopChip = this.n現在のトップChip; nCurrentTopChip < dTX.listChip.Count; nCurrentTopChip++ )
\r
1809 CDTX.CChip pChip = dTX.listChip[ nCurrentTopChip ];
\r
1810 //Debug.WriteLine( "nCurrentTopChip=" + nCurrentTopChip + ", ch=" + pChip.nチャンネル番号.ToString("x2") + ", 発音位置=" + pChip.n発声位置 + ", 発声時刻ms=" + pChip.n発声時刻ms );
\r
1811 pChip.nバーからの距離dot.Drums = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedDrums );
\r
1812 pChip.nバーからの距離dot.Guitar = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedGuitar );
\r
1813 pChip.nバーからの距離dot.Bass = (int) ( ( pChip.n発声時刻ms - CSound管理.rc演奏用タイマ.n現在時刻 ) * ScrollSpeedBass );
\r
1814 if ( Math.Min( Math.Min( pChip.nバーからの距離dot.Drums, pChip.nバーからの距離dot.Guitar ), pChip.nバーからの距離dot.Bass ) > 450 )
\r
1818 // if ( ( ( nCurrentTopChip == this.n現在のトップChip ) && ( pChip.nバーからの距離dot.Drums < -65 ) ) && pChip.bHit )
\r
1819 // #28026 2012.4.5 yyagi; 信心ワールドエンドの曲終了後リザルトになかなか行かない問題の修正
\r
1821 if (( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Drums < -65 ) && // 小節線の消失処理などに影響するため、
\r
1822 ( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Guitar < -65 ) && // Drumsのスクロールスピードだけには依存させない。
\r
1823 ( dTX.listChip[ this.n現在のトップChip ].nバーからの距離dot.Bass < -65 ) &&
\r
1824 dTX.listChip[ this.n現在のトップChip ].bHit )
\r
1826 // nCurrentTopChip = ++this.n現在のトップChip;
\r
1827 ++this.n現在のトップChip;
\r
1830 bool bPChipIsAutoPlay = bCheckAutoPlay( pChip );
\r
1832 int nInputAdjustTime = ( bPChipIsAutoPlay || (pChip.e楽器パート == E楽器パート.UNKNOWN) )? 0 : this.nInputAdjustTimeMs[ (int) pChip.e楽器パート ];
\r
1834 int instIndex = (int) pChip.e楽器パート;
\r
1835 if ( ( ( pChip.e楽器パート != E楽器パート.UNKNOWN ) && !pChip.bHit ) &&
\r
1836 ( ( pChip.nバーからの距離dot[ instIndex ] < -40 ) && ( this.e指定時刻からChipのJUDGEを返す( CSound管理.rc演奏用タイマ.n現在時刻, pChip, nInputAdjustTime ) == E判定.Miss ) ) )
\r
1838 this.tチップのヒット処理( CSound管理.rc演奏用タイマ.n現在時刻, pChip );
\r
1840 switch ( pChip.nチャンネル番号 )
\r
1842 #region [ 01: BGM ]
\r
1844 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1846 pChip.bHit = true;
\r
1847 if ( configIni.bBGM音を発声する )
\r
1849 //long t = CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms;
\r
1850 //Trace.TraceInformation( "BGM再生開始: 演奏タイマのn前回リセットしたときのシステム時刻=" + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + ", pChip.n発生時刻ms=" + pChip.n発声時刻ms + ", 合計=" + t );
\r
1851 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
1856 #region [ 03: BPM変更 ]
\r
1857 case 0x03: // BPM変更
\r
1858 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1860 pChip.bHit = true;
\r
1861 this.actPlayInfo.dbBPM = ( pChip.n整数値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1865 #region [ 04, 07, 55, 56,57, 58, 59, 60:レイヤーBGA ]
\r
1866 case 0x04: // レイヤーBGA
\r
1874 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1876 pChip.bHit = true;
\r
1877 if ( configIni.bBGA有効 )
\r
1879 switch ( pChip.eBGA種別 )
\r
1881 case EBGA種別.BMPTEX:
\r
1882 if ( pChip.rBMPTEX != null )
\r
1884 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
1889 if ( ( pChip.rBGA != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1891 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
1895 case EBGA種別.BGAPAN:
\r
1896 if ( ( pChip.rBGAPan != null ) && ( ( pChip.rBMP != null ) || ( pChip.rBMPTEX != null ) ) )
\r
1898 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
1903 if ( pChip.rBMP != null )
\r
1905 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
1913 #region [ 08: BPM変更(拡張) ]
\r
1914 case 0x08: // BPM変更(拡張)
\r
1915 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1917 pChip.bHit = true;
\r
1918 if ( dTX.listBPM.ContainsKey( pChip.n整数値・内部番号 ) )
\r
1920 this.actPlayInfo.dbBPM = ( dTX.listBPM[ pChip.n整数値・内部番号 ].dbBPM値 * ( ( (double) configIni.n演奏速度 ) / 20.0 ) ) + dTX.BASEBPM;
\r
1925 #region [ 11-1a: ドラム演奏 ]
\r
1926 case 0x11: // ドラム演奏
\r
1936 if ( pChip.b空打ちチップである )
\r
1938 this.t進行描画・チップ・空打ち音設定・ドラム( configIni, ref dTX, ref pChip );
\r
1942 this.t進行描画・チップ・ドラムス( configIni, ref dTX, ref pChip );
\r
1946 #region [ 1f: フィルインサウンド(ドラム) ]
\r
1947 case 0x1f: // フィルインサウンド(ドラム)
\r
1948 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1950 pChip.bHit = true;
\r
1951 this.r現在の歓声Chip.Drums = pChip;
\r
1955 #region [ 20-27: ギター演奏 ]
\r
1956 case 0x20: // ギター演奏
\r
1964 this.t進行描画・チップ・ギターベース( configIni, ref dTX, ref pChip, E楽器パート.GUITAR );
\r
1967 #region [ 28: ウェイリング(ギター) ]
\r
1968 case 0x28: // ウェイリング(ギター)
\r
1969 this.t進行描画・チップ・ギター・ウェイリング( configIni, ref dTX, ref pChip, !CDTXMania.ConfigIni.bDrums有効 );
\r
1972 #region [ 2f: ウェイリングサウンド(ギター) ]
\r
1973 case 0x2f: // ウェイリングサウンド(ギター)
\r
1974 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
1976 pChip.bHit = true;
\r
1977 this.r現在の歓声Chip.Guitar = pChip;
\r
1981 #region [ 31-3a: 不可視チップ配置(ドラム) ]
\r
1982 case 0x31: // 不可視チップ配置(ドラム)
\r
1992 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
1994 pChip.bHit = true;
\r
1998 #region [ 50: 小節線 ]
\r
2001 this.t進行描画・チップ・小節線( configIni, ref dTX, ref pChip );
\r
2005 #region [ 51: 拍線 ]
\r
2007 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2009 pChip.bHit = true;
\r
2011 if ( ( ePlayMode == E楽器パート.DRUMS ) && ( configIni.eDark != Eダークモード.FULL ) && pChip.b可視 && ( this.txチップ != null ) )
\r
2013 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2015 configIni.bReverse.Drums ?
\r
2016 (int) ( ( ( 0x38 + pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ) :
\r
2017 (int) ( ( ( 0x1a6 - pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ),
\r
2018 new Rectangle( 0, (int) ( 0x1bf * Scale.Y ), (int) ( 0x128 * Scale.X ), (int) ( 1 * Scale.Y ) )
\r
2023 #region [ 52: MIDIコーラス ]
\r
2024 case 0x52: // MIDIコーラス
\r
2025 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2027 pChip.bHit = true;
\r
2031 #region [ 53: フィルイン ]
\r
2032 case 0x53: // フィルイン
\r
2033 this.t進行描画・チップ・フィルイン( configIni, ref dTX, ref pChip );
\r
2036 #region [ 54: 動画再生(BGA領域), 5A: 動画再生(全画面) ]
\r
2037 case (int) Ech定義.Movie: // 動画再生 (BGA領域)
\r
2038 case (int) Ech定義.MovieFull: // 動画再生 (全画面)
\r
2039 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2041 pChip.bHit = true;
\r
2042 if ( configIni.bAVI有効 )
\r
2044 if ( CDTXMania.DTX.bチップがある.BGA )
\r
2046 this.actAVI.bHasBGA = true;
\r
2048 if ( pChip.nチャンネル番号 == (int) Ech定義.MovieFull || CDTXMania.ConfigIni.bForceAVIFullscreen )
\r
2050 this.actAVI.bFullScreenMovie = true;
\r
2052 switch ( pChip.eAVI種別 )
\r
2055 //if ( pChip.rAVI != null )
\r
2057 //int startWidth = ( CDTXMania.DTX.bチップがある.BGA ) ? 278 : SampleFramework.GameWindowSize.Width;
\r
2058 //int startHeight = ( CDTXMania.DTX.bチップがある.BGA ) ? 355 : SampleFramework.GameWindowSize.Height;
\r
2059 int startWidth = !this.actAVI.bFullScreenMovie ? 278 : SampleFramework.GameWindowSize.Width;
\r
2060 int startHeight = !this.actAVI.bFullScreenMovie ? 355 : SampleFramework.GameWindowSize.Height;
\r
2061 this.actAVI.Start( pChip.nチャンネル番号, pChip.rAVI, startWidth, startHeight, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pChip.n発声時刻ms );
\r
2065 case EAVI種別.AVIPAN:
\r
2066 if ( pChip.rAVIPan != null )
\r
2068 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
2076 #region [ 61-92: 自動再生(BGM, SE) ]
\r
2080 case 0x64: // 自動再生(BGM, SE)
\r
2103 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2105 pChip.bHit = true;
\r
2106 if ( configIni.bBGM音を発声する )
\r
2108 dTX.tWavの再生停止( this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] );
\r
2109 dTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, ( int ) Eレーン.BGM, dTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
2110 this.n最後に再生したBGMの実WAV番号[ pChip.nチャンネル番号 - 0x61 ] = pChip.n整数値・内部番号;
\r
2117 #region [ 84-89: 仮: override sound ] // #26338 2011.11.8 yyagi
\r
2118 case 0x84: // HH (HO/HC)
\r
2122 case 0x88: // Guitar
\r
2123 case 0x89: // Bass
\r
2124 // mute sound (auto)
\r
2125 // 4A: 84: HH (HO/HC)
\r
2132 // CDTXMania.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
2133 // CDTXMania.DTX.tチップの再生( pChip, n再生開始システム時刻ms, 8, n音量, bモニタ, b音程をずらして再生 );
\r
2134 // this.n最後に再生した実WAV番号.Guitar = pChip.n整数値・内部番号;
\r
2136 // protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
2137 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2139 pChip.bHit = true;
\r
2140 E楽器パート[] p = { E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.GUITAR, E楽器パート.BASS };
\r
2142 E楽器パート pp = p[ pChip.nチャンネル番号 - 0x84 ];
\r
2144 // if ( pp == E楽器パート.DRUMS ) { // pChip.nチャンネル番号= ..... HHとか、ドラムの場合は変える。
\r
2146 // int[] ch = { 0x11, 0x16, 0x19, 0x1A };
\r
2147 // pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x84 ];
\r
2149 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, pp, dTX.nモニタを考慮した音量( pp ) );
\r
2154 #region [ a0-a7: ベース演奏 ]
\r
2155 case 0xa0: // ベース演奏
\r
2163 this.t進行描画・チップ・ギターベース( configIni, ref dTX, ref pChip, E楽器パート.BASS );
\r
2166 #region [ a8: ウェイリング(ベース) ]
\r
2167 case 0xa8: // ウェイリング(ベース)
\r
2168 this.t進行描画・チップ・ベース・ウェイリング( configIni, ref dTX, ref pChip, !CDTXMania.ConfigIni.bDrums有効 );
\r
2171 #region [ af: ウェイリングサウンド(ベース) ]
\r
2172 case 0xaf: // ウェイリングサウンド(ベース)
\r
2173 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
2175 pChip.bHit = true;
\r
2176 this.r現在の歓声Chip.Bass = pChip;
\r
2180 #region [ b1-b9, bc: 空打ち音設定(ドラム) ]
\r
2181 case 0xb1: // 空打ち音設定(ドラム)
\r
2191 // ここには来なくなったはずだが、一応残しておく
\r
2192 this.t進行描画・チップ・空打ち音設定・ドラム( configIni, ref dTX, ref pChip );
\r
2195 #region [ ba: 空打ち音設定(ギター) ]
\r
2196 case 0xba: // 空打ち音設定(ギター)
\r
2197 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2199 pChip.bHit = true;
\r
2200 this.r現在の空うちギターChip = pChip;
\r
2201 pChip.nチャンネル番号 = 0x20;
\r
2205 #region [ bb: 空打ち音設定(ベース) ]
\r
2206 case 0xbb: // 空打ち音設定(ベース)
\r
2207 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Bass < 0 ) )
\r
2209 pChip.bHit = true;
\r
2210 this.r現在の空うちベースChip = pChip;
\r
2211 pChip.nチャンネル番号 = 0xA0;
\r
2215 #region [ c4, c7, d5-d9, e0: BGA画像入れ替え ]
\r
2219 case 0xd6: // BGA画像入れ替え
\r
2224 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2226 pChip.bHit = true;
\r
2227 if ( ( configIni.bBGA有効 && ( pChip.eBGA種別 == EBGA種別.BMP ) ) || ( pChip.eBGA種別 == EBGA種別.BMPTEX ) )
\r
2229 for ( int i = 0; i < 8; i++ )
\r
2231 if ( this.nBGAスコープチャンネルマップ[ 0, i ] == pChip.nチャンネル番号 )
\r
2233 this.actBGA.ChangeScope( this.nBGAスコープチャンネルマップ[ 1, i ], pChip.rBMP, pChip.rBMPTEX );
\r
2240 #region [ da: ミキサーへチップ音追加 ]
\r
2242 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2244 //Debug.WriteLine( "[DA(AddMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2245 pChip.bHit = true;
\r
2246 if ( listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する
\r
2248 CDTX.CWAV wc = listWAV[ pChip.n整数値・内部番号 ];
\r
2249 //Debug.Write( "[AddMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2251 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2253 if ( wc.rSound[ i ] != null )
\r
2255 //CDTXMania.Sound管理.AddMixer( wc.rSound[ i ] );
\r
2256 AddMixer( wc.rSound[ i ], pChip.b演奏終了後も再生が続くチップである );
\r
2260 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2263 //if ( i == nPolyphonicSounds - 1 )
\r
2265 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2272 #region [ db: ミキサーからチップ音削除 ]
\r
2274 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2276 //Debug.WriteLine( "[DB(RemoveMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2277 pChip.bHit = true;
\r
2278 if ( listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する
\r
2280 CDTX.CWAV wc = listWAV[ pChip.n整数値・内部番号 ];
\r
2281 //Debug.Write( "[DelMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2282 for ( int i = 0; i < nPolyphonicSounds; i++ )
\r
2284 if ( wc.rSound[ i ] != null )
\r
2286 //CDTXMania.Sound管理.RemoveMixer( wc.rSound[ i ] );
\r
2287 if ( !wc.rSound[ i ].b演奏終了後も再生が続くチップである ) // #32248 2013.10.16 yyagi
\r
2288 { // DTX終了後も再生が続くチップの0xDB登録をなくすことはできず。
\r
2289 RemoveMixer( wc.rSound[ i ] ); // (ミキサー解除のタイミングが遅延する場合の対応が面倒なので。)
\r
2290 } // そこで、代わりにフラグをチェックしてミキサー削除ロジックへの遷移をカットする。
\r
2294 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2297 //if ( i == nPolyphonicSounds - 1 )
\r
2299 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );
\r
2306 #region [ その他(未定義) ]
\r
2308 if ( !pChip.bHit && ( pChip.nバーからの距離dot.Drums < 0 ) )
\r
2310 pChip.bHit = true;
\r
2319 public void t再読込()
\r
2321 CDTXMania.DTX.t全チップの再生停止とミキサーからの削除();
\r
2322 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.再読込・再演奏;
\r
2323 base.eフェーズID = CStage.Eフェーズ.演奏_再読込;
\r
2324 this.bPAUSE = false;
\r
2326 // #34048 2014.7.16 yyagi
\r
2327 #region [ 読み込み画面に遷移する前に、設定変更した可能性があるパラメータをConfigIniクラスに書き戻す ]
\r
2328 for ( int i = 0; i < 3; i++ )
\r
2330 CDTXMania.ConfigIni.nViewerScrollSpeed[ i ] = CDTXMania.ConfigIni.n譜面スクロール速度[ i ];
\r
2332 CDTXMania.ConfigIni.b演奏情報を表示する = CDTXMania.ConfigIni.bViewerShowDebugStatus;
\r
2338 CDTXMania.DTX.t全チップの再生停止とミキサーからの削除();
\r
2339 this.actAVI.Stop();
\r
2340 this.actBGA.Stop();
\r
2341 this.actPanel.Stop(); // PANEL表示停止
\r
2342 CDTXMania.Timer.t一時停止(); // 再生時刻カウンタ停止
\r
2344 this.n現在のトップChip = CDTXMania.DTX.listChip.Count - 1; // 終端にシーク
\r
2346 // 自分自身のOn活性化()相当の処理もすべき。
\r
2349 public void t演奏位置の変更( int nStartBar )
\r
2352 CDTXMania.DTX.t全チップの再生停止();
\r
2353 this.actAVI.Stop();
\r
2354 this.actBGA.Stop();
\r
2356 #region [ 再生開始小節の変更 ]
\r
2357 nStartBar++; // +1が必要
\r
2359 #region [ 演奏済みフラグのついたChipをリセットする ]
\r
2360 for ( int i = 0; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2362 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2365 CDTX.CChip p = (CDTX.CChip) pChip.Clone();
\r
2367 CDTXMania.DTX.listChip[ i ] = p;
\r
2372 #region [ 処理を開始するチップの特定 ]
\r
2373 //for ( int i = this.n現在のトップChip; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2374 bool bSuccessSeek = false;
\r
2375 for ( int i = 0; i < CDTXMania.DTX.listChip.Count; i++ )
\r
2377 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2378 if ( pChip.n発声位置 < 384 * nStartBar )
\r
2384 bSuccessSeek = true;
\r
2385 this.n現在のトップChip = i;
\r
2389 if ( !bSuccessSeek )
\r
2391 // this.n現在のトップChip = CDTXMania.DTX.listChip.Count - 1;
\r
2392 this.n現在のトップChip = 0; // 対象小節が存在しないなら、最初から再生
\r
2396 #region [ 演奏開始の発声時刻msを取得し、タイマに設定 ]
\r
2397 int nStartTime = CDTXMania.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms;
\r
2399 CSound管理.rc演奏用タイマ.tリセット(); // これでPAUSE解除されるので、次のPAUSEチェックは不要
\r
2400 //if ( !this.bPAUSE )
\r
2402 CSound管理.rc演奏用タイマ.t一時停止();
\r
2404 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2407 List<CSound> pausedCSound = new List<CSound>();
\r
2409 #region [ BGMやギターなど、演奏開始のタイミングで再生がかかっているサウンドのの途中再生開始 ] // (CDTXのt入力・行解析・チップ配置()で小節番号が+1されているのを削っておくこと)
\r
2410 for ( int i = this.n現在のトップChip; i >= 0; i-- )
\r
2412 CDTX.CChip pChip = CDTXMania.DTX.listChip[ i ];
\r
2413 int nDuration = pChip.GetDuration();
\r
2415 if ( ( pChip.n発声時刻ms + nDuration > 0 ) && ( pChip.n発声時刻ms <= nStartTime ) && ( nStartTime <= pChip.n発声時刻ms + nDuration ) )
\r
2417 if ( pChip.bWAVを使うチャンネルである && !pChip.b空打ちチップである ) // wav系チャンネル、且つ、空打ちチップではない
\r
2420 bool b = CDTXMania.DTX.listWAV.TryGetValue( pChip.n整数値・内部番号, out wc );
\r
2421 if ( !b ) continue;
\r
2423 if ( ( wc.bIsBGMSound && CDTXMania.ConfigIni.bBGM音を発声する ) || ( !wc.bIsBGMSound ) )
\r
2425 CDTXMania.DTX.tチップの再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int) Eレーン.BGM, CDTXMania.DTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) );
\r
2426 #region [ PAUSEする ]
\r
2427 int j = wc.n現在再生中のサウンド番号;
\r
2428 if ( wc.rSound[ j ] != null )
\r
2430 wc.rSound[ j ].t再生を一時停止する();
\r
2431 wc.rSound[ j ].t再生位置を変更する( nStartTime - pChip.n発声時刻ms );
\r
2432 pausedCSound.Add( wc.rSound[ j ] );
\r
2440 #region [ 演奏開始時点で既に表示されているBGAとAVIの、シークと再生 ]
\r
2441 this.actBGA.SkipStart( nStartTime );
\r
2442 this.actAVI.SkipStart( nStartTime );
\r
2444 #region [ PAUSEしていたサウンドを一斉に再生再開する(ただしタイマを止めているので、ここではまだ再生開始しない) ]
\r
2445 foreach ( CSound cs in pausedCSound )
\r
2449 pausedCSound.Clear();
\r
2450 pausedCSound = null;
\r
2452 #region [ タイマを再開して、PAUSEから復帰する ]
\r
2453 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2454 CDTXMania.Timer.tリセット(); // これでPAUSE解除されるので、3行先の再開()は不要
\r
2455 CDTXMania.Timer.n現在時刻 = nStartTime; // Debug表示のTime: 表記を正しくするために必要
\r
2456 CSound管理.rc演奏用タイマ.t再開();
\r
2457 //CDTXMania.Timer.t再開();
\r
2458 this.bPAUSE = false; // システムがPAUSE状態だったら、強制解除
\r
2459 this.actPanel.Start();
\r
2466 /// DTXV用の設定をする。(全AUTOなど)
\r
2467 /// 元の設定のバックアップなどはしないので、あとでConfig.iniを上書き保存しないこと。
\r
2469 protected void tDTXV用の設定()
\r
2471 CDTXMania.ConfigIni.bAutoPlay.HH = true;
\r
2472 CDTXMania.ConfigIni.bAutoPlay.SD = true;
\r
2473 CDTXMania.ConfigIni.bAutoPlay.BD = true;
\r
2474 CDTXMania.ConfigIni.bAutoPlay.HT = true;
\r
2475 CDTXMania.ConfigIni.bAutoPlay.LT = true;
\r
2476 CDTXMania.ConfigIni.bAutoPlay.CY = true;
\r
2477 CDTXMania.ConfigIni.bAutoPlay.FT = true;
\r
2478 CDTXMania.ConfigIni.bAutoPlay.RD = true;
\r
2479 CDTXMania.ConfigIni.bAutoPlay.LC = true;
\r
2480 CDTXMania.ConfigIni.bAutoPlay.GtR = true;
\r
2481 CDTXMania.ConfigIni.bAutoPlay.GtB = true;
\r
2482 CDTXMania.ConfigIni.bAutoPlay.GtB = true;
\r
2483 CDTXMania.ConfigIni.bAutoPlay.GtPick = true;
\r
2484 CDTXMania.ConfigIni.bAutoPlay.GtW = true;
\r
2485 CDTXMania.ConfigIni.bAutoPlay.BsR = true;
\r
2486 CDTXMania.ConfigIni.bAutoPlay.BsB = true;
\r
2487 CDTXMania.ConfigIni.bAutoPlay.BsB = true;
\r
2488 CDTXMania.ConfigIni.bAutoPlay.BsPick = true;
\r
2489 CDTXMania.ConfigIni.bAutoPlay.BsW = true;
\r
2491 this.bIsAutoPlay = CDTXMania.ConfigIni.bAutoPlay;
\r
2493 CDTXMania.ConfigIni.bAVI有効 = true;
\r
2494 CDTXMania.ConfigIni.bBGA有効 = true;
\r
2495 for ( int i = 0; i < 3; i++ )
\r
2497 CDTXMania.ConfigIni.bGraph[ i ] = false;
\r
2498 CDTXMania.ConfigIni.bHidden[ i ] = false;
\r
2499 CDTXMania.ConfigIni.bLeft[ i ] = false;
\r
2500 CDTXMania.ConfigIni.bLight[ i ] = false;
\r
2501 CDTXMania.ConfigIni.bReverse[ i ] = false;
\r
2502 CDTXMania.ConfigIni.bSudden[ i ] = false;
\r
2503 CDTXMania.ConfigIni.eInvisible[ i ] = EInvisible.OFF;
\r
2504 CDTXMania.ConfigIni.eRandom[ i ] = Eランダムモード.OFF;
\r
2505 CDTXMania.ConfigIni.n表示可能な最小コンボ数[ i ] = 65535;
\r
2506 CDTXMania.ConfigIni.判定文字表示位置[ i ] = E判定文字表示位置.表示OFF;
\r
2507 // CDTXMania.ConfigIni.n譜面スクロール速度[ i ] = CDTXMania.ConfigIni.nViewerScrollSpeed[ i ]; // これだけはOn活性化()で行うこと。
\r
2508 // そうしないと、演奏開始直後にスクロール速度が変化して見苦しい。
\r
2511 CDTXMania.ConfigIni.eDark = Eダークモード.OFF;
\r
2513 CDTXMania.ConfigIni.b演奏情報を表示する = CDTXMania.ConfigIni.bViewerShowDebugStatus;
\r
2514 CDTXMania.ConfigIni.bフィルイン有効 = true;
\r
2515 CDTXMania.ConfigIni.bScoreIniを出力する = false;
\r
2516 CDTXMania.ConfigIni.bSTAGEFAILED有効 = false;
\r
2517 CDTXMania.ConfigIni.bTight = false;
\r
2518 CDTXMania.ConfigIni.bストイックモード = false;
\r
2519 CDTXMania.ConfigIni.bドラム打音を発声する = true;
\r
2520 CDTXMania.ConfigIni.bBGM音を発声する = true;
\r
2522 CDTXMania.ConfigIni.nRisky = 0;
\r
2523 CDTXMania.ConfigIni.nShowLagType = 0;
\r
2524 CDTXMania.ConfigIni.ドラムコンボ文字の表示位置 = Eドラムコンボ文字の表示位置.OFF;
\r
2528 private bool bCheckAutoPlay( CDTX.CChip pChip )
\r
2530 bool bPChipIsAutoPlay = false;
\r
2531 bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2532 bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2533 bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2534 bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2535 bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2537 // ( ( pChip.e楽器パート == E楽器パート.DRUMS ) && bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] ) ||
\r
2538 // ( ( pChip.e楽器パート == E楽器パート.GUITAR ) && bIsAutoPlay.Guitar ) ) ||
\r
2539 // ( ( pChip.e楽器パート == E楽器パート.BASS ) && bIsAutoPlay.Bass )
\r
2541 //// if ((pChip.e楽器パート == E楽器パート.DRUMS) && bIsAutoPlay[this.nチャンネル0Atoレーン07[pChip.nチャンネル番号 - 0x11]])
\r
2543 // bPChipIsAutoPlay = true;
\r
2545 if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
2547 if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
2549 bPChipIsAutoPlay = true;
\r
2552 else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
2554 //Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
2555 //Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
2556 bPChipIsAutoPlay = true;
\r
2557 if ( bIsAutoPlay[ (int) Eレーン.GtPick ] == false ) bPChipIsAutoPlay = false;
\r
2560 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.GtR ] == false ) bPChipIsAutoPlay = false;
\r
2561 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.GtG ] == false ) bPChipIsAutoPlay = false;
\r
2562 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.GtB ] == false ) bPChipIsAutoPlay = false;
\r
2563 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.GtW ] == false ) bPChipIsAutoPlay = false;
\r
2564 else if ( bGtBsO == true &&
\r
2565 ( bIsAutoPlay[ (int) Eレーン.GtR ] == false || bIsAutoPlay[ (int) Eレーン.GtG ] == false || bIsAutoPlay[ (int) Eレーン.GtB ] == false ) )
\r
2566 bPChipIsAutoPlay = false;
\r
2568 //Trace.TraceInformation( "{0:x2}: {1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
2570 else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
2572 bPChipIsAutoPlay = true;
\r
2573 if ( bIsAutoPlay[ (int) Eレーン.BsPick ] == false ) bPChipIsAutoPlay = false;
\r
2576 if ( bGtBsR == true && bIsAutoPlay[ (int) Eレーン.BsR ] == false ) bPChipIsAutoPlay = false;
\r
2577 else if ( bGtBsG == true && bIsAutoPlay[ (int) Eレーン.BsG ] == false ) bPChipIsAutoPlay = false;
\r
2578 else if ( bGtBsB == true && bIsAutoPlay[ (int) Eレーン.BsB ] == false ) bPChipIsAutoPlay = false;
\r
2579 else if ( bGtBsW == true && bIsAutoPlay[ (int) Eレーン.BsW ] == false ) bPChipIsAutoPlay = false;
\r
2580 else if ( bGtBsO == true &&
\r
2581 ( bIsAutoPlay[ (int) Eレーン.BsR ] == false || bIsAutoPlay[ (int) Eレーン.BsG ] == false || bIsAutoPlay[ (int) Eレーン.BsB ] == false ) )
\r
2582 bPChipIsAutoPlay = false;
\r
2585 return bPChipIsAutoPlay;
\r
2588 protected abstract void t進行描画・チップ・ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2589 //protected abstract void t進行描画・チップ・ギター( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2590 protected abstract void t進行描画・チップ・ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst );
\r
2592 protected void t進行描画・チップ・ギターベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst,
\r
2593 int barYNormal, int barYReverse,
\r
2594 int showRangeY0, int showRangeY1, int openXg, int openXb,
\r
2595 int rectOpenOffsetX, int rectOpenOffsetY, int openChipWidth, int chipHeight, int chipWidth,
\r
2596 int guitarNormalX, int guitarLeftyX, int bassNormalX, int bassLeftyX, int drawDeltaX, int chipTexDeltaX )
\r
2598 int instIndex = (int) inst;
\r
2599 if ( configIni.bGuitar有効 )
\r
2601 #region [ Invisible処理 ]
\r
2602 if ( configIni.eInvisible[ instIndex ] != EInvisible.OFF )
\r
2604 cInvisibleChip.SetInvisibleStatus( ref pChip );
\r
2609 #region [ Hidden/Sudden処理 ]
\r
2610 if ( configIni.bSudden[ instIndex ] )
\r
2612 pChip.b可視 = pChip.nバーからの距離dot[ instIndex ] < 200;
\r
2614 if ( configIni.bHidden[ instIndex ] && ( pChip.nバーからの距離dot[ instIndex ] < 100 ) )
\r
2616 pChip.b可視 = false;
\r
2621 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
2622 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
2623 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
2624 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
2625 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
2627 #region [ chip描画 ]
\r
2628 int OPEN = ( inst == E楽器パート.GUITAR ) ? 0x20 : 0xA0;
\r
2629 if ( !pChip.bHit && pChip.b可視 )
\r
2631 if ( this.txチップ != null )
\r
2633 this.txチップ.n透明度 = pChip.n透明度;
\r
2635 int y = configIni.bReverse[ instIndex ] ?
\r
2636 (int) ( barYReverse - pChip.nバーからの距離dot[ instIndex ] * Scale.Y ) :
\r
2637 (int) ( barYNormal + pChip.nバーからの距離dot[ instIndex ] * Scale.Y );
\r
2638 int n小節線消失距離dot = configIni.bReverse[ instIndex ] ?
\r
2639 (int) ( -100 * Scale.Y ) :
\r
2640 ( configIni.e判定位置[ instIndex ] == E判定位置.標準 ) ? (int) ( -36 * Scale.Y ) : (int) ( -25 * Scale.Y );
\r
2641 if ( configIni.bReverse[ instIndex ] )
\r
2643 //showRangeY1 = barYReverse - n小節線消失距離dot;
\r
2647 showRangeY0 = barYNormal + n小節線消失距離dot;
\r
2649 if ( ( showRangeY0 < y ) && ( y < showRangeY1 ) )
\r
2651 if ( this.txチップ != null )
\r
2653 int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[ instIndex ].n現在の値;
\r
2654 #region [ OPENチップの描画 ]
\r
2655 if ( pChip.nチャンネル番号 == OPEN )
\r
2657 int xo = ( inst == E楽器パート.GUITAR ) ? openXg : openXb;
\r
2658 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2660 y - ( 2 * Scale.Y ),
\r
2662 (int) ( rectOpenOffsetX * Scale.X ),
\r
2663 (int) ( rectOpenOffsetY * Scale.Y ) + (int) ( ( ( nアニメカウンタ現在の値 % 5 ) * chipHeight * Scale.Y ) ),
\r
2664 (int) ( openChipWidth * Scale.X ),
\r
2665 (int) ( chipHeight * Scale.Y )
\r
2670 Rectangle rc = new Rectangle(
\r
2671 (int) ( rectOpenOffsetX * Scale.X ),
\r
2672 (int) ( nアニメカウンタ現在の値 * chipHeight * Scale.Y ),
\r
2673 (int) ( chipWidth * Scale.X ),
\r
2674 (int) ( chipHeight * Scale.Y )
\r
2676 #region [ RGBチップのX座標初期化 ]
\r
2678 if ( inst == E楽器パート.GUITAR )
\r
2680 x = ( configIni.bLeft.Guitar ) ? guitarLeftyX : guitarNormalX;
\r
2684 x = ( configIni.bLeft.Bass ) ? bassLeftyX : bassNormalX;
\r
2686 int deltaX = ( configIni.bLeft[ instIndex ] ) ? -drawDeltaX : +drawDeltaX;
\r
2688 //Trace.TraceInformation( "chip={0:x2}, E楽器パート={1}, x={2}", pChip.nチャンネル番号, inst, x );
\r
2689 #region [ Rチップ描画 ]
\r
2692 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2694 y - ( chipHeight / 2 ) * Scale.Y,
\r
2699 #region [ Gチップ描画 ]
\r
2700 rc.X += (int) ( chipTexDeltaX * Scale.X );
\r
2704 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2706 y - ( chipHeight / 2 ) * Scale.Y,
\r
2711 #region [ Bチップ描画 ]
\r
2712 rc.X += (int) ( chipTexDeltaX * Scale.X );
\r
2716 this.txチップ.t2D描画( CDTXMania.app.Device,
\r
2718 y - ( chipHeight / 2 ) * Scale.Y,
\r
2727 //if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2728 if ( ( !pChip.bHit ) && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) )
\r
2730 int lo = ( inst == E楽器パート.GUITAR ) ? 0 : 3; // lane offset
\r
2731 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
2732 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
2733 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
2734 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
2735 bool pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R );
\r
2736 bool pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G );
\r
2737 bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );
\r
2739 cInvisibleChip.StartSemiInvisible( inst );
\r
2740 #region [ Chip Fire effects (auto時用) ]
\r
2741 bool bSuccessOPEN = bChipIsO && ( autoR || !pushingR ) && ( autoG || !pushingG ) && ( autoB || !pushingB );
\r
2742 if ( autoPick ) // autoPickでない時の処理は、 t入力処理・ギターベース(E楽器パート) で行う
\r
2744 if ( ( bChipHasR && ( autoR || pushingR ) ) || bSuccessOPEN )
\r
2746 this.actChipFireGB.Start( 0 + lo, 演奏判定ライン座標 );
\r
2748 if ( ( bChipHasG && ( autoG || pushingG ) ) || bSuccessOPEN )
\r
2750 this.actChipFireGB.Start( 1 + lo, 演奏判定ライン座標 );
\r
2752 if ( ( bChipHasB && ( autoB || pushingB ) ) || bSuccessOPEN )
\r
2754 this.actChipFireGB.Start( 2 + lo, 演奏判定ライン座標 );
\r
2758 #region [ autopick ]
\r
2761 bool bMiss = true;
\r
2762 if ( bChipHasR == autoR && bChipHasG == autoG && bChipHasB == autoB ) // autoレーンとチップレーン一致時はOK
\r
2763 { // この条件を加えないと、同時に非autoレーンを押下している時にNGとなってしまう。
\r
2766 else if ( ( autoR || ( bChipHasR == pushingR ) ) && ( autoG || ( bChipHasG == pushingG ) ) && ( autoB || ( bChipHasB == pushingB ) ) )
\r
2767 // ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
\r
2771 else if ( ( ( bChipIsO == true ) && ( !pushingR | autoR ) && ( !pushingG | autoG ) && ( !pushingB | autoB ) ) ) // OPEN時
\r
2775 pChip.bHit = true;
\r
2776 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ), false, bMiss );
\r
2777 this.r次にくるギターChip = null;
\r
2780 this.tチップのヒット処理( pChip.n発声時刻ms, pChip );
\r
2784 pChip.nLag = 0; // tチップのヒット処理()の引数最後がfalseの時はpChip.nLagを計算しないため、ここでAutoPickかつMissのLag=0を代入
\r
2785 this.tチップのヒット処理( pChip.n発声時刻ms, pChip, false );
\r
2787 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
2788 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip( pChip.n発声時刻ms, chWailingChip, this.nInputAdjustTimeMs[ instIndex ], 140 );
\r
2789 if ( item != null && !bMiss )
\r
2791 this.queWailing[ instIndex ].Enqueue( item );
\r
2797 } // end of "if configIni.bGuitar有効"
\r
2798 if ( !pChip.bHit && ( pChip.nバーからの距離dot[ instIndex ] < 0 ) ) // Guitar/Bass無効の場合は、自動演奏する
\r
2800 pChip.bHit = true;
\r
2801 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量( inst ) );
\r
2806 protected virtual void t進行描画・チップ・ギターベース・ウェイリング(
\r
2807 CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, E楽器パート inst, bool bGRmode )
\r
2809 int indexInst = (int) inst;
\r
2810 if ( configIni.bGuitar有効 )
\r
2812 #region [ Invisible処理 ]
\r
2813 if ( configIni.eInvisible[ indexInst ] != EInvisible.OFF )
\r
2815 cInvisibleChip.SetInvisibleStatus( ref pChip );
\r
2818 #region [ Sudden/Hidden処理 ]
\r
2819 if ( configIni.bSudden[indexInst] )
\r
2821 pChip.b可視 = pChip.nバーからの距離dot[indexInst] < 200;
\r
2823 if ( configIni.bHidden[indexInst] && ( pChip.nバーからの距離dot[indexInst] < 100 ) )
\r
2825 pChip.b可視 = false;
\r
2829 cWailingChip[ indexInst ].t進行描画・チップ・ギターベース・ウェイリング(
\r
2830 configIni, ref dTX, ref pChip,
\r
2831 ref txチップ, ref 演奏判定ライン座標, ref ctWailingチップ模様アニメ
\r
2834 if ( !pChip.bHit && ( pChip.nバーからの距離dot[indexInst] < 0 ) )
\r
2836 if ( pChip.nバーからの距離dot[indexInst] < -234 ) // #25253 2011.5.29 yyagi: Don't set pChip.bHit=true for wailing at once. It need to 1sec-delay (234pix per 1sec).
\r
2838 pChip.bHit = true;
\r
2840 bool autoW = ( inst == E楽器パート.GUITAR ) ? configIni.bAutoPlay.GtW : configIni.bAutoPlay.BsW;
\r
2841 //if ( configIni.bAutoPlay[ ((int) Eレーン.Guitar - 1) + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
2844 // pChip.bHit = true; // #25253 2011.5.29 yyagi: Set pChip.bHit=true if autoplay.
\r
2845 // this.actWailingBonus.Start( inst, this.r現在の歓声Chip[indexInst] );
\r
2846 // #23886 2012.5.22 yyagi; To support auto Wailing; Don't do wailing for ALL wailing chips. Do wailing for queued wailing chip.
\r
2847 // wailing chips are queued when 1) manually wailing and not missed at that time 2) AutoWailing=ON and not missed at that time
\r
2848 long nTimeStamp_Wailed = pChip.n発声時刻ms + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2849 DoWailingFromQueue( inst, nTimeStamp_Wailed, autoW );
\r
2851 cInvisibleChip.StartSemiInvisible( inst );
\r
2855 pChip.bHit = true;
\r
2857 protected virtual void t進行描画・チップ・ギター・ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, bool bGRmode )
\r
2859 t進行描画・チップ・ギターベース・ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.GUITAR, bGRmode );
\r
2861 protected abstract void t進行描画・チップ・フィルイン( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2862 protected abstract void t進行描画・チップ・小節線( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2863 //protected abstract void t進行描画・チップ・ベース( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2864 protected virtual void t進行描画・チップ・ベース・ウェイリング( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip, bool bGRmode )
\r
2866 t進行描画・チップ・ギターベース・ウェイリング( configIni, ref dTX, ref pChip, E楽器パート.BASS, bGRmode );
\r
2871 protected abstract void t進行描画・チップ・空打ち音設定・ドラム( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2872 protected void t進行描画・チップアニメ()
\r
2874 for ( int i = 0; i < 3; i++ ) // 0=drums, 1=guitar, 2=bass
\r
2876 if ( this.ctチップ模様アニメ[ i ] != null )
\r
2878 this.ctチップ模様アニメ[ i ].t進行Loop();
\r
2881 if ( this.ctWailingチップ模様アニメ != null )
\r
2883 this.ctWailingチップ模様アニメ.t進行Loop();
\r
2887 protected bool t進行描画・フェードイン・アウト()
\r
2889 switch ( base.eフェーズID )
\r
2891 case CStage.Eフェーズ.共通_フェードイン:
\r
2892 if ( this.actFI.On進行描画() != 0 )
\r
2894 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
\r
2898 case CStage.Eフェーズ.共通_フェードアウト:
\r
2899 case CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト:
\r
2900 if ( this.actFO.On進行描画() != 0 )
\r
2906 case CStage.Eフェーズ.演奏_STAGE_CLEAR_フェードアウト:
\r
2907 if ( this.actFOClear.On進行描画() == 0 )
\r
2916 protected void t進行描画・レーンフラッシュD()
\r
2918 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) )
\r
2920 this.actLaneFlushD.On進行描画();
\r
2923 protected void t進行描画・レーンフラッシュGB()
\r
2925 if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && CDTXMania.ConfigIni.bGuitar有効 )
\r
2927 this.actLaneFlushGB.On進行描画();
\r
2930 protected abstract void t進行描画・演奏情報();
\r
2931 protected void t進行描画・演奏情報(int x, int y)
\r
2933 if ( !CDTXMania.ConfigIni.b演奏情報を表示しない )
\r
2935 this.actPlayInfo.t進行描画( x, y );
\r
2938 protected void t進行描画・背景()
\r
2940 if ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF )
\r
2942 if ( this.tx背景 != null )
\r
2944 this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 );
\r
2949 CDTXMania.app.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 0f, 0 );
\r
2953 protected void t進行描画・判定ライン()
\r
2955 if ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL )
\r
2957 int y = CDTXMania.ConfigIni.bReverse.Drums ? (int) ( 53 * Scale.Y ) - 演奏判定ライン座標.nJudgeLinePosY_delta.Drums : (int) ( 419 * Scale.Y ) + 演奏判定ライン座標.nJudgeLinePosY_delta.Drums;
\r
2958 // #31602 2013.6.23 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
\r
2959 if ( this.txヒットバー != null )
\r
2961 for ( int i = 32; i < 335; i += 8 )
\r
2963 this.txヒットバー.t2D描画( CDTXMania.app.Device,
\r
2966 new Rectangle( 0, 0, ( ( i + 8 ) >= 335 ) ? (int) ( ( 7 - ( ( i + 8 ) - 335 ) ) * Scale.X ) : (int) ( 8 * Scale.X ), (int) ( 8 * Scale.Y ) ) );
\r
2971 protected void t進行描画・判定文字列()
\r
2973 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
2975 protected void t進行描画・判定文字列1・通常位置指定の場合()
\r
2977 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) != E判定文字表示位置.コンボ下 ) // 判定ライン上または横
\r
2979 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
2982 protected void t進行描画・判定文字列2・判定ライン上指定の場合()
\r
2984 if ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) == E判定文字表示位置.コンボ下 ) // 判定ライン上または横
\r
2986 this.actJudgeString.t進行描画( 演奏判定ライン座標 );
\r
2990 protected void t進行描画・譜面スクロール速度()
\r
2992 this.act譜面スクロール速度.On進行描画();
\r
2995 protected abstract void t背景テクスチャの生成();
\r
2996 protected void t背景テクスチャの生成( string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename )
\r
2997 { // Default...: レーン等があるレイヤー bgfilename: DTXファイルで指定する背景
\r
2998 Bitmap image = null;
\r
2999 bool bSuccessLoadDTXbgfile = false;
\r
3001 int[] offsetX = new int[2]{ 96, 506 };
\r
3002 //int nLanePosition = (int) CDTXMania.ConfigIni.eドラムレーン表示位置;
\r
3003 int nLanePosition = (int) Eドラムレーン表示位置.Left;
\r
3005 if ( bgfilename != null && File.Exists( bgfilename ) && !CDTXMania.DTX.bチップがある.Movie )
\r
3009 #region [ DTXデータで指定されている背景画像を読み込む ]
\r
3010 Bitmap bitmap1 = null;
\r
3011 bitmap1 = new Bitmap( bgfilename );
\r
3012 if ( ( bitmap1.Size.Width == 0 ) && ( bitmap1.Size.Height == 0 ) )
\r
3019 int newWidth = (int) ( bitmap1.Width * Scale.X );
\r
3020 int newHeight = (int) ( bitmap1.Height * Scale.Y );
\r
3023 #region [ 背景画像がVGAサイズ以下なら、FullHDサイズに拡大する ]
\r
3024 if ( bitmap1.Width <= 640 && bitmap1.Height <= 480 )
\r
3026 bitmap2 = new Bitmap( newWidth, newHeight );
\r
3027 Graphics graphic2 = Graphics.FromImage( bitmap2 );
\r
3028 graphic2.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
\r
3029 graphic2.DrawImage( bitmap1, 0, 0, newWidth, newHeight );
\r
3030 graphic2.Dispose();
\r
3034 bitmap2 = (Bitmap) bitmap1.Clone();
\r
3036 bitmap1.Dispose();
\r
3039 #region [ 実背景に格子状に配置するよう、コピーしていく ]
\r
3040 Bitmap bitmap3 = new Bitmap( SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height );
\r
3041 Graphics graphics3 = Graphics.FromImage( bitmap3 );
\r
3042 for ( int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height )
\r
3044 for ( int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width )
\r
3046 graphics3.DrawImage( bitmap2, j, i, bitmap2.Width, bitmap2.Height );
\r
3049 graphics3.Dispose();
\r
3050 bitmap2.Dispose();
\r
3053 #region [ レーン外・レーンそのもののフレームを合成 ]
\r
3054 image = new Bitmap( CSkin.Path( DefaultBgFilename ) ); // レーン外のフレーム
\r
3055 graphics3 = Graphics.FromImage( image );
\r
3057 #region [ レーンのフレームがあれば、それを合成 ]
\r
3058 if ( DefaultLaneFilename != "" )
\r
3060 Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
\r
3061 graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
\r
3066 ColorMatrix matrix2 = new ColorMatrix();
\r
3067 matrix2.Matrix00 = 1f;
\r
3068 matrix2.Matrix11 = 1f;
\r
3069 matrix2.Matrix22 = 1f;
\r
3070 matrix2.Matrix33 = ( (float) CDTXMania.ConfigIni.n背景の透過度 ) / 255f;
\r
3071 matrix2.Matrix44 = 1f;
\r
3072 ColorMatrix newColorMatrix = matrix2;
\r
3073 ImageAttributes imageAttr = new ImageAttributes();
\r
3074 imageAttr.SetColorMatrix( newColorMatrix );
\r
3075 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
3076 // graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );
\r
3077 bitmap3.Dispose();
\r
3080 imageAttr.Dispose();
\r
3081 graphics3.Dispose();
\r
3082 bSuccessLoadDTXbgfile = true;
\r
3086 Trace.TraceError( "背景画像とレーン画像の合成に失敗しました。({0})", bgfilename );
\r
3089 #region [ DTXデータで指定する背景画像を合成しない場合は、レーン画像単体を背景画像とする ]
\r
3090 if ( !bSuccessLoadDTXbgfile )
\r
3092 bgfilename = CSkin.Path( DefaultBgFilename );
\r
3095 image = new Bitmap( bgfilename );
\r
3097 if ( DefaultLaneFilename != "" )
\r
3099 Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
\r
3100 Graphics g = Graphics.FromImage( image );
\r
3101 g.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
\r
3108 Trace.TraceError( "レーン画像の読み込みに失敗しました。({0})", bgfilename );
\r
3114 #region [ BGA画像を表示する予定がある場合は、背景画像からあらかじめその領域を黒抜きにしておく ]
\r
3115 if ( ( CDTXMania.DTX.listBMP.Count > 0 ) || ( CDTXMania.DTX.listBMPTEX.Count > 0 ) )
\r
3117 Graphics graphics2 = Graphics.FromImage( image );
\r
3118 graphics2.FillRectangle( Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height );
\r
3119 graphics2.Dispose();
\r
3122 #region [ 背景画像をテクスチャにする。背景動画の表示予定上がる場合は、更に透明度を付与する。 ]
\r
3125 this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
\r
3126 if ( CDTXMania.DTX.bMovieをFullscreen再生する ) // Fullscreen動画再生が発生する場合は、動画レイヤーに対してレーン+背景レイヤーに透明度を設定する
\r
3128 this.tx背景.n透明度 = 255 - CDTXMania.ConfigIni.n背景の透過度; // 背景動画用
\r
3131 catch ( CTextureCreateFailedException )
\r
3133 Trace.TraceError( "背景テクスチャの生成に失敗しました。" );
\r
3140 protected virtual void t入力処理・ギター()
\r
3142 t入力処理・ギターベース( E楽器パート.GUITAR );
\r
3144 protected virtual void t入力処理・ベース()
\r
3146 t入力処理・ギターベース( E楽器パート.BASS );
\r
3150 protected virtual void t入力処理・ギターベース(E楽器パート inst)
\r
3152 int indexInst = (int) inst;
\r
3153 #region [ スクロール速度変更 ]
\r
3154 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.B ) )
\r
3156 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Min( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] + 1, 0x7cf );
\r
3158 if ( CDTXMania.Pad.b押されている( inst, Eパッド.Decide ) && CDTXMania.Pad.b押された( inst, Eパッド.R ) )
\r
3160 CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] = Math.Max( CDTXMania.ConfigIni.n譜面スクロール速度[indexInst] - 1, 0 );
\r
3164 if ( !CDTXMania.ConfigIni.bGuitar有効 || !CDTXMania.DTX.bチップがある[indexInst] )
\r
3169 int R = ( inst == E楽器パート.GUITAR ) ? 0 : 3;
\r
3172 bool autoW = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtW : bIsAutoPlay.BsW;
\r
3173 bool autoR = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
3174 bool autoG = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
3175 bool autoB = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
3176 bool autoPick = ( inst == E楽器パート.GUITAR ) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
3177 int nAutoW = ( autoW ) ? 8 : 0;
\r
3178 int nAutoR = ( autoR ) ? 4 : 0;
\r
3179 int nAutoG = ( autoG ) ? 2 : 0;
\r
3180 int nAutoB = ( autoB ) ? 1 : 0;
\r
3181 int nAutoMask = nAutoW | nAutoR | nAutoG | nAutoB;
\r
3183 // if ( bIsAutoPlay[ (int) Eレーン.Guitar - 1 + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
3185 CDTX.CChip chip = this.r次に来る指定楽器Chipを更新して返す(inst);
\r
3186 if ( chip != null )
\r
3188 if ( ( chip.nチャンネル番号 & 4 ) != 0 && autoR )
\r
3190 this.actLaneFlushGB.Start( R );
\r
3191 this.actRGB.Push( R );
\r
3193 if ( ( chip.nチャンネル番号 & 2 ) != 0 && autoG )
\r
3195 this.actLaneFlushGB.Start( G );
\r
3196 this.actRGB.Push( G );
\r
3198 if ( ( chip.nチャンネル番号 & 1 ) != 0 && autoB )
\r
3200 this.actLaneFlushGB.Start( B );
\r
3201 this.actRGB.Push( B );
\r
3208 int pushingR = CDTXMania.Pad.b押されている( inst, Eパッド.R ) ? 4 : 0;
\r
3209 this.t入力メソッド記憶( inst );
\r
3210 int pushingG = CDTXMania.Pad.b押されている( inst, Eパッド.G ) ? 2 : 0;
\r
3211 this.t入力メソッド記憶( inst );
\r
3212 int pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B ) ? 1 : 0;
\r
3213 this.t入力メソッド記憶( inst );
\r
3214 int flagRGB = pushingR | pushingG | pushingB;
\r
3215 if ( pushingR != 0 )
\r
3217 this.actLaneFlushGB.Start( R );
\r
3218 this.actRGB.Push( R );
\r
3220 if ( pushingG != 0 )
\r
3222 this.actLaneFlushGB.Start( G );
\r
3223 this.actRGB.Push( G );
\r
3225 if ( pushingB != 0 )
\r
3227 this.actLaneFlushGB.Start( B );
\r
3228 this.actRGB.Push( B );
\r
3230 // auto pickだとここから先に行かないので注意
\r
3231 List<STInputEvent> events = CDTXMania.Pad.GetEvents( inst, Eパッド.Pick );
\r
3232 if ( ( events != null ) && ( events.Count > 0 ) )
\r
3234 foreach ( STInputEvent eventPick in events )
\r
3236 if ( !eventPick.b押された )
\r
3240 this.t入力メソッド記憶( inst );
\r
3241 long nTime = eventPick.nTimeStamp - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3242 int chWailingSound = ( inst == E楽器パート.GUITAR ) ? 0x2F : 0xAF;
\r
3243 CDTX.CChip pChip = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ); // E楽器パート.GUITARなチップ全てにヒットする
\r
3244 E判定 e判定 = this.e指定時刻からChipのJUDGEを返す( nTime, pChip, this.nInputAdjustTimeMs[indexInst] );
\r
3245 //Trace.TraceInformation("ch={0:x2}, mask1={1:x1}, mask2={2:x2}", pChip.nチャンネル番号, ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F, ( flagRGB & ~nAutoMask) & 0x0F );
\r
3246 if ( ( pChip != null ) && ( ( ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F ) == ( ( flagRGB & ~nAutoMask) & 0x0F ) ) && ( e判定 != E判定.Miss ) )
\r
3248 bool bChipHasR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
3249 bool bChipHasG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
3250 bool bChipHasB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
3251 bool bChipHasW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
3252 bool bChipIsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
3253 bool bSuccessOPEN = bChipIsO && ( autoR || pushingR == 0 ) && ( autoG || pushingG == 0 ) && ( autoB || pushingB == 0 );
\r
3254 if ( ( bChipHasR && ( autoR || pushingR != 0 ) ) || bSuccessOPEN )
\r
3255 //if ( ( pushingR != 0 ) || autoR || ( flagRGB == 0 ) )
\r
3257 this.actChipFireGB.Start( R, 演奏判定ライン座標 );
\r
3259 if ( ( bChipHasG && ( autoG || pushingG != 0 ) ) || bSuccessOPEN )
\r
3260 //if ( ( pushingG != 0 ) || autoG || ( flagRGB == 0 ) )
\r
3262 this.actChipFireGB.Start( G, 演奏判定ライン座標 );
\r
3264 if ( ( bChipHasB && ( autoB || pushingB != 0 ) ) || bSuccessOPEN )
\r
3265 //if ( ( pushingB != 0 ) || autoB || ( flagRGB == 0 ) )
\r
3267 this.actChipFireGB.Start( B, 演奏判定ライン座標 );
\r
3269 this.tチップのヒット処理( nTime, pChip );
\r
3270 this.tサウンド再生( pChip, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], e判定 == E判定.Poor );
\r
3271 int chWailingChip = ( inst == E楽器パート.GUITAR ) ? 0x28 : 0xA8;
\r
3272 CDTX.CChip item = this.r指定時刻に一番近い未ヒットChip( nTime, chWailingChip, this.nInputAdjustTimeMs[ indexInst ], 140 );
\r
3273 if ( item != null )
\r
3275 this.queWailing[indexInst].Enqueue( item );
\r
3280 // 以下、間違いレーンでのピック時
\r
3281 CDTX.CChip NoChipPicked = ( inst == E楽器パート.GUITAR ) ? this.r現在の空うちギターChip : this.r現在の空うちベースChip;
\r
3282 if ( ( NoChipPicked != null ) || ( ( NoChipPicked = this.r指定時刻に一番近いChip・ヒット未済問わず不可視考慮( nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst] ) ) != null ) )
\r
3284 this.tサウンド再生( NoChipPicked, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する[indexInst], true );
\r
3286 if ( !CDTXMania.ConfigIni.bLight[indexInst] )
\r
3288 this.tチップのヒット処理・BadならびにTight時のMiss( inst );
\r
3292 List<STInputEvent> list = CDTXMania.Pad.GetEvents(inst, Eパッド.Wail );
\r
3293 if ( ( list != null ) && ( list.Count > 0 ) )
\r
3295 foreach ( STInputEvent eventWailed in list )
\r
3297 if ( !eventWailed.b押された )
\r
3301 DoWailingFromQueue( inst, eventWailed.nTimeStamp, autoW );
\r
3307 private void DoWailingFromQueue( E楽器パート inst, long nTimeStamp_Wailed, bool autoW )
\r
3309 int indexInst = (int) inst;
\r
3310 long nTimeWailed = nTimeStamp_Wailed - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3311 CDTX.CChip chipWailing;
\r
3312 while ( ( this.queWailing[ indexInst ].Count > 0 ) && ( ( chipWailing = this.queWailing[ indexInst ].Dequeue() ) != null ) )
\r
3314 if ( ( nTimeWailed - chipWailing.n発声時刻ms ) <= 1000 ) // #24245 2011.1.26 yyagi: 800 -> 1000
\r
3316 chipWailing.bHit = true;
\r
3317 this.actWailingBonus.Start( inst, this.r現在の歓声Chip[ indexInst ] );
\r
3318 //if ( !bIsAutoPlay[indexInst] )
\r
3321 int nCombo = ( this.actCombo.n現在のコンボ数[ indexInst ] < 500 ) ? this.actCombo.n現在のコンボ数[ indexInst ] : 500;
\r
3322 this.actScore.Add( inst, bIsAutoPlay, nCombo * 3000L ); // #24245 2011.1.26 yyagi changed DRUMS->BASS, add nCombo conditions
\r