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.Instance.DTX.bチップがある.Drums && !CDTXMania.Instance.ConfigIni.bギタレボモード)
\r
39 Drums.nスコア = (long)this.actScore.Get(E楽器パート.DRUMS);
\r
40 Drums.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す(CDTXMania.Instance.DTX.LEVEL.Drums, CDTXMania.Instance.DTX.n可視チップ数.Drums, this.nヒット数_Auto含まない.Drums.Perfect, this.actCombo.n現在のコンボ数.Drums最高値, E楽器パート.DRUMS, bIsAutoPlay);
\r
41 Drums.db演奏型スキル値 = CScoreIni.t演奏型スキルを計算して返す(CDTXMania.Instance.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.Instance.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Perfect : this.nヒット数_Auto含まない.Drums.Perfect;
\r
43 Drums.nGreat数 = CDTXMania.Instance.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Great : this.nヒット数_Auto含まない.Drums.Great;
\r
44 Drums.nGood数 = CDTXMania.Instance.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Good : this.nヒット数_Auto含まない.Drums.Good;
\r
45 Drums.nPoor数 = CDTXMania.Instance.ConfigIni.bドラムが全部オートプレイである ? this.nヒット数_Auto含む.Drums.Poor : this.nヒット数_Auto含まない.Drums.Poor;
\r
46 Drums.nMiss数 = CDTXMania.Instance.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.Instance.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.Instance.ConfigIni.bTight;
\r
59 for (int i = 0; i < 3; i++)
\r
61 Drums.bSudden[i] = CDTXMania.Instance.ConfigIni.bSudden[i];
\r
62 Drums.bHidden[i] = CDTXMania.Instance.ConfigIni.bHidden[i];
\r
63 Drums.eInvisible[i] = CDTXMania.Instance.ConfigIni.eInvisible[i];
\r
64 Drums.bReverse[i] = CDTXMania.Instance.ConfigIni.bReverse[i];
\r
65 Drums.eRandom[i] = CDTXMania.Instance.ConfigIni.eRandom[i];
\r
66 Drums.bLight[i] = CDTXMania.Instance.ConfigIni.bLight[i];
\r
67 Drums.bLeft[i] = CDTXMania.Instance.ConfigIni.bLeft[i];
\r
68 Drums.f譜面スクロール速度[i] = ((float)(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[i] + 1)) * 0.5f;
\r
70 Drums.eDark = CDTXMania.Instance.ConfigIni.eDark;
\r
71 Drums.n演奏速度分子 = CDTXMania.Instance.ConfigIni.n演奏速度;
\r
73 Drums.eHHGroup = CDTXMania.Instance.ConfigIni.eHHGroup;
\r
74 Drums.eFTGroup = CDTXMania.Instance.ConfigIni.eFTGroup;
\r
75 Drums.eCYGroup = CDTXMania.Instance.ConfigIni.eCYGroup;
\r
76 Drums.eHitSoundPriorityHH = CDTXMania.Instance.ConfigIni.eHitSoundPriorityHH;
\r
77 Drums.eHitSoundPriorityFT = CDTXMania.Instance.ConfigIni.eHitSoundPriorityFT;
\r
78 Drums.eHitSoundPriorityCY = CDTXMania.Instance.ConfigIni.eHitSoundPriorityCY;
\r
79 Drums.bGuitar有効 = CDTXMania.Instance.ConfigIni.bGuitar有効;
\r
80 Drums.bDrums有効 = CDTXMania.Instance.ConfigIni.bDrums有効;
\r
81 Drums.bSTAGEFAILED有効 = CDTXMania.Instance.ConfigIni.bSTAGEFAILED有効;
\r
82 Drums.eダメージレベル = CDTXMania.Instance.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.Instance.nPerfect範囲ms;
\r
88 Drums.nGreatになる範囲ms = CDTXMania.Instance.nGreat範囲ms;
\r
89 Drums.nGoodになる範囲ms = CDTXMania.Instance.nGood範囲ms;
\r
90 Drums.nPoorになる範囲ms = CDTXMania.Instance.nPoor範囲ms;
\r
91 Drums.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
92 Drums.最終更新日時 = DateTime.Now.ToString();
\r
93 Drums.Hash = CScoreIni.t演奏セクションのMD5を求めて返す(Drums);
\r
94 Drums.nRisky = CDTXMania.Instance.ConfigIni.nRisky; // #35461 chnmr0 add
\r
95 Drums.bギターとベースを入れ替えた = CDTXMania.Instance.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
99 #region [ t演奏結果を格納する_ギター() ]
\r
100 public void t演奏結果を格納する_ギター(out CScoreIni.C演奏記録 Guitar)
\r
102 Guitar = new CScoreIni.C演奏記録();
\r
104 if (CDTXMania.Instance.DTX.bチップがある.Guitar)
\r
106 Guitar.nスコア = (long)this.actScore.Get(E楽器パート.GUITAR);
\r
107 Guitar.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す(CDTXMania.Instance.DTX.LEVEL.Guitar, CDTXMania.Instance.DTX.n可視チップ数.Guitar, this.nヒット数_Auto含まない.Guitar.Perfect, this.actCombo.n現在のコンボ数.Guitar最高値, E楽器パート.GUITAR, bIsAutoPlay);
\r
108 Guitar.db演奏型スキル値 = CScoreIni.t演奏型スキルを計算して返す(CDTXMania.Instance.DTX.n可視チップ数.Guitar, this.nヒット数_Auto含まない.Guitar.Perfect, this.nヒット数_Auto含まない.Guitar.Great, this.nヒット数_Auto含まない.Guitar.Good, this.nヒット数_Auto含まない.Guitar.Poor, this.nヒット数_Auto含まない.Guitar.Miss, E楽器パート.GUITAR, bIsAutoPlay);
\r
109 Guitar.nPerfect数 = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Perfect : this.nヒット数_Auto含まない.Guitar.Perfect;
\r
110 Guitar.nGreat数 = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Great : this.nヒット数_Auto含まない.Guitar.Great;
\r
111 Guitar.nGood数 = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Good : this.nヒット数_Auto含まない.Guitar.Good;
\r
112 Guitar.nPoor数 = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Poor : this.nヒット数_Auto含まない.Guitar.Poor;
\r
113 Guitar.nMiss数 = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである ? this.nヒット数_Auto含む.Guitar.Miss : this.nヒット数_Auto含まない.Guitar.Miss;
\r
114 Guitar.nPerfect数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Perfect;
\r
115 Guitar.nGreat数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Great;
\r
116 Guitar.nGood数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Good;
\r
117 Guitar.nPoor数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Poor;
\r
118 Guitar.nMiss数_Auto含まない = this.nヒット数_Auto含まない.Guitar.Miss;
\r
119 Guitar.n最大コンボ数 = this.actCombo.n現在のコンボ数.Guitar最高値;
\r
120 Guitar.n全チップ数 = CDTXMania.Instance.DTX.n可視チップ数.Guitar;
\r
121 for (int i = 0; i < (int)Eレーン.MAX; i++)
\r
123 Guitar.bAutoPlay[i] = bIsAutoPlay[i];
\r
125 Guitar.bTight = CDTXMania.Instance.ConfigIni.bTight;
\r
126 for (int i = 0; i < 3; i++)
\r
128 Guitar.bSudden[i] = CDTXMania.Instance.ConfigIni.bSudden[i];
\r
129 Guitar.bHidden[i] = CDTXMania.Instance.ConfigIni.bHidden[i];
\r
130 Guitar.eInvisible[i] = CDTXMania.Instance.ConfigIni.eInvisible[i];
\r
131 Guitar.bReverse[i] = CDTXMania.Instance.ConfigIni.bReverse[i];
\r
132 Guitar.eRandom[i] = CDTXMania.Instance.ConfigIni.eRandom[i];
\r
133 Guitar.bLight[i] = CDTXMania.Instance.ConfigIni.bLight[i];
\r
134 Guitar.bLeft[i] = CDTXMania.Instance.ConfigIni.bLeft[i];
\r
135 Guitar.f譜面スクロール速度[i] = ((float)(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[i] + 1)) * 0.5f;
\r
137 Guitar.eDark = CDTXMania.Instance.ConfigIni.eDark;
\r
138 Guitar.n演奏速度分子 = CDTXMania.Instance.ConfigIni.n演奏速度;
\r
139 Guitar.n演奏速度分母 = 20;
\r
140 Guitar.eHHGroup = CDTXMania.Instance.ConfigIni.eHHGroup;
\r
141 Guitar.eFTGroup = CDTXMania.Instance.ConfigIni.eFTGroup;
\r
142 Guitar.eCYGroup = CDTXMania.Instance.ConfigIni.eCYGroup;
\r
143 Guitar.eHitSoundPriorityHH = CDTXMania.Instance.ConfigIni.eHitSoundPriorityHH;
\r
144 Guitar.eHitSoundPriorityFT = CDTXMania.Instance.ConfigIni.eHitSoundPriorityFT;
\r
145 Guitar.eHitSoundPriorityCY = CDTXMania.Instance.ConfigIni.eHitSoundPriorityCY;
\r
146 Guitar.bGuitar有効 = CDTXMania.Instance.ConfigIni.bGuitar有効;
\r
147 Guitar.bDrums有効 = CDTXMania.Instance.ConfigIni.bDrums有効;
\r
148 Guitar.bSTAGEFAILED有効 = CDTXMania.Instance.ConfigIni.bSTAGEFAILED有効;
\r
149 Guitar.eダメージレベル = CDTXMania.Instance.ConfigIni.eダメージレベル;
\r
150 Guitar.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Guitar;
\r
151 Guitar.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Guitar;
\r
152 Guitar.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Guitar;
\r
153 Guitar.b演奏にマウスを使用した = this.b演奏にマウスを使った.Guitar;
\r
154 Guitar.nPerfectになる範囲ms = CDTXMania.Instance.nPerfect範囲ms;
\r
155 Guitar.nGreatになる範囲ms = CDTXMania.Instance.nGreat範囲ms;
\r
156 Guitar.nGoodになる範囲ms = CDTXMania.Instance.nGood範囲ms;
\r
157 Guitar.nPoorになる範囲ms = CDTXMania.Instance.nPoor範囲ms;
\r
158 Guitar.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
159 Guitar.最終更新日時 = DateTime.Now.ToString();
\r
160 Guitar.Hash = CScoreIni.t演奏セクションのMD5を求めて返す(Guitar);
\r
161 Guitar.bギターとベースを入れ替えた = CDTXMania.Instance.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
165 #region [ t演奏結果を格納する_ベース() ]
\r
166 public void t演奏結果を格納する_ベース(out CScoreIni.C演奏記録 Bass)
\r
168 Bass = new CScoreIni.C演奏記録();
\r
170 if (CDTXMania.Instance.DTX.bチップがある.Bass)
\r
172 Bass.nスコア = (long)this.actScore.Get(E楽器パート.BASS);
\r
173 Bass.dbゲーム型スキル値 = CScoreIni.tゲーム型スキルを計算して返す(CDTXMania.Instance.DTX.LEVEL.Bass, CDTXMania.Instance.DTX.n可視チップ数.Bass, this.nヒット数_Auto含まない.Bass.Perfect, this.actCombo.n現在のコンボ数.Bass最高値, E楽器パート.BASS, bIsAutoPlay);
\r
174 Bass.db演奏型スキル値 = CScoreIni.t演奏型スキルを計算して返す(CDTXMania.Instance.DTX.n可視チップ数.Bass, this.nヒット数_Auto含まない.Bass.Perfect, this.nヒット数_Auto含まない.Bass.Great, this.nヒット数_Auto含まない.Bass.Good, this.nヒット数_Auto含まない.Bass.Poor, this.nヒット数_Auto含まない.Bass.Miss, E楽器パート.BASS, bIsAutoPlay);
\r
175 Bass.nPerfect数 = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Perfect : this.nヒット数_Auto含まない.Bass.Perfect;
\r
176 Bass.nGreat数 = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Great : this.nヒット数_Auto含まない.Bass.Great;
\r
177 Bass.nGood数 = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Good : this.nヒット数_Auto含まない.Bass.Good;
\r
178 Bass.nPoor数 = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Poor : this.nヒット数_Auto含まない.Bass.Poor;
\r
179 Bass.nMiss数 = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである ? this.nヒット数_Auto含む.Bass.Miss : this.nヒット数_Auto含まない.Bass.Miss;
\r
180 Bass.nPerfect数_Auto含まない = this.nヒット数_Auto含まない.Bass.Perfect;
\r
181 Bass.nGreat数_Auto含まない = this.nヒット数_Auto含まない.Bass.Great;
\r
182 Bass.nGood数_Auto含まない = this.nヒット数_Auto含まない.Bass.Good;
\r
183 Bass.nPoor数_Auto含まない = this.nヒット数_Auto含まない.Bass.Poor;
\r
184 Bass.nMiss数_Auto含まない = this.nヒット数_Auto含まない.Bass.Miss;
\r
185 Bass.n最大コンボ数 = this.actCombo.n現在のコンボ数.Bass最高値;
\r
186 Bass.n全チップ数 = CDTXMania.Instance.DTX.n可視チップ数.Bass;
\r
187 for (int i = 0; i < (int)Eレーン.MAX; i++)
\r
189 Bass.bAutoPlay[i] = bIsAutoPlay[i];
\r
191 Bass.bTight = CDTXMania.Instance.ConfigIni.bTight;
\r
192 for (int i = 0; i < 3; i++)
\r
194 Bass.bSudden[i] = CDTXMania.Instance.ConfigIni.bSudden[i];
\r
195 Bass.bHidden[i] = CDTXMania.Instance.ConfigIni.bHidden[i];
\r
196 Bass.eInvisible[i] = CDTXMania.Instance.ConfigIni.eInvisible[i];
\r
197 Bass.bReverse[i] = CDTXMania.Instance.ConfigIni.bReverse[i];
\r
198 Bass.eRandom[i] = CDTXMania.Instance.ConfigIni.eRandom[i];
\r
199 Bass.bLight[i] = CDTXMania.Instance.ConfigIni.bLight[i];
\r
200 Bass.bLeft[i] = CDTXMania.Instance.ConfigIni.bLeft[i];
\r
201 Bass.f譜面スクロール速度[i] = ((float)(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[i] + 1)) * 0.5f;
\r
203 Bass.eDark = CDTXMania.Instance.ConfigIni.eDark;
\r
204 Bass.n演奏速度分子 = CDTXMania.Instance.ConfigIni.n演奏速度;
\r
206 Bass.eHHGroup = CDTXMania.Instance.ConfigIni.eHHGroup;
\r
207 Bass.eFTGroup = CDTXMania.Instance.ConfigIni.eFTGroup;
\r
208 Bass.eCYGroup = CDTXMania.Instance.ConfigIni.eCYGroup;
\r
209 Bass.eHitSoundPriorityHH = CDTXMania.Instance.ConfigIni.eHitSoundPriorityHH;
\r
210 Bass.eHitSoundPriorityFT = CDTXMania.Instance.ConfigIni.eHitSoundPriorityFT;
\r
211 Bass.eHitSoundPriorityCY = CDTXMania.Instance.ConfigIni.eHitSoundPriorityCY;
\r
212 Bass.bGuitar有効 = CDTXMania.Instance.ConfigIni.bGuitar有効;
\r
213 Bass.bDrums有効 = CDTXMania.Instance.ConfigIni.bDrums有効;
\r
214 Bass.bSTAGEFAILED有効 = CDTXMania.Instance.ConfigIni.bSTAGEFAILED有効;
\r
215 Bass.eダメージレベル = CDTXMania.Instance.ConfigIni.eダメージレベル;
\r
216 Bass.b演奏にキーボードを使用した = this.b演奏にキーボードを使った.Bass; // #24280 2011.1.29 yyagi
\r
217 Bass.b演奏にMIDI入力を使用した = this.b演奏にMIDI入力を使った.Bass; //
\r
218 Bass.b演奏にジョイパッドを使用した = this.b演奏にジョイパッドを使った.Bass; //
\r
219 Bass.b演奏にマウスを使用した = this.b演奏にマウスを使った.Bass; //
\r
220 Bass.nPerfectになる範囲ms = CDTXMania.Instance.nPerfect範囲ms;
\r
221 Bass.nGreatになる範囲ms = CDTXMania.Instance.nGreat範囲ms;
\r
222 Bass.nGoodになる範囲ms = CDTXMania.Instance.nGood範囲ms;
\r
223 Bass.nPoorになる範囲ms = CDTXMania.Instance.nPoor範囲ms;
\r
224 Bass.strDTXManiaのバージョン = CDTXMania.VERSION;
\r
225 Bass.最終更新日時 = DateTime.Now.ToString();
\r
226 Bass.Hash = CScoreIni.t演奏セクションのMD5を求めて返す(Bass);
\r
227 Bass.bギターとベースを入れ替えた = CDTXMania.Instance.ConfigIni.bIsSwappedGuitarBass; // #35417 chnmr0 add
\r
234 public override void On活性化()
\r
236 listChip = CDTXMania.Instance.DTX.listChip;
\r
237 listWAV = CDTXMania.Instance.DTX.listWAV;
\r
239 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.継続;
\r
240 this.n現在のトップChip = (listChip.Count > 0) ? 0 : -1;
\r
241 this.L最後に再生したHHの実WAV番号 = new List<int>(16);
\r
242 this.e最後に再生したHHのチャンネル番号 = 0;
\r
243 this.n最後に再生した実WAV番号.Guitar = -1;
\r
244 this.n最後に再生した実WAV番号.Bass = -1;
\r
245 for (int i = 0; i < 50; i++)
\r
247 this.n最後に再生したBGMの実WAV番号[i] = -1;
\r
249 this.r次にくるギターChip = null;
\r
250 this.r次にくるベースChip = null;
\r
251 for (int j = 0; j < 10; j++)
\r
253 this.r現在の空うちドラムChip[j] = null;
\r
255 this.r現在の空うちギターChip = null;
\r
256 this.r現在の空うちベースChip = null;
\r
257 cInvisibleChip = new CInvisibleChip(CDTXMania.Instance.ConfigIni.nChipDisplayTimeMs, CDTXMania.Instance.ConfigIni.nChipFadeoutTimeMs);
\r
258 this.演奏判定ライン座標 = new C演奏判定ライン座標共通();
\r
259 this.n最大コンボ数_TargetGhost = new STDGBVALUE<int>(); // #35411 2015.08.21 chnmr0 add
\r
260 for (int k = 0; k < 3; k++)
\r
262 //for ( int n = 0; n < 5; n++ )
\r
264 this.nヒット数_Auto含まない[k] = new CHITCOUNTOFRANK();
\r
265 this.nヒット数_Auto含む[k] = new CHITCOUNTOFRANK();
\r
266 this.nヒット数_TargetGhost[k] = new CHITCOUNTOFRANK(); // #35411 2015.08.21 chnmr0 add
\r
268 this.queWailing[k] = new Queue<CChip>();
\r
269 this.r現在の歓声Chip[k] = null;
\r
270 cInvisibleChip.eInvisibleMode[k] = CDTXMania.Instance.ConfigIni.eInvisible[k];
\r
271 if (CDTXMania.Instance.DTXVmode.Enabled)
\r
273 CDTXMania.Instance.ConfigIni.n譜面スクロール速度[k] = CDTXMania.Instance.ConfigIni.nViewerScrollSpeed[k];
\r
276 this.nInputAdjustTimeMs[k] = CDTXMania.Instance.ConfigIni.nInputAdjustTimeMs[k]; // #23580 2011.1.3 yyagi
\r
277 // 2011.1.7 ikanick 修正
\r
278 //this.nJudgeLinePosY_delta[ k ] = CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset[ k ]; // #31602 2013.6.23 yyagi
\r
280 this.演奏判定ライン座標.n判定位置[k] = CDTXMania.Instance.ConfigIni.e判定位置[k];
\r
281 this.演奏判定ライン座標.nJudgeLinePosY_delta[k] = CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset[k];
\r
282 this.bReverse[k] = CDTXMania.Instance.ConfigIni.bReverse[k]; //
\r
285 actCombo.演奏判定ライン座標 = 演奏判定ライン座標;
\r
286 for (int i = 0; i < 3; i++)
\r
288 this.b演奏にキーボードを使った[i] = false;
\r
289 this.b演奏にジョイパッドを使った[i] = false;
\r
290 this.b演奏にMIDI入力を使った[i] = false;
\r
291 this.b演奏にマウスを使った[i] = false;
\r
293 this.bAUTOでないチップが1つでもバーを通過した = false;
\r
294 cInvisibleChip.Reset();
\r
296 this.tステータスパネルの選択();
\r
298 //this.演奏判定ライン座標();
\r
300 this.bIsAutoPlay = CDTXMania.Instance.ConfigIni.bAutoPlay; // #24239 2011.1.23 yyagi
\r
303 //this.bIsAutoPlay.Guitar = CDTXMania.Instance.ConfigIni.bギターが全部オートプレイである;
\r
304 //this.bIsAutoPlay.Bass = CDTXMania.Instance.ConfigIni.bベースが全部オートプレイである;
\r
305 // this.nRisky = CDTXMania.Instance.ConfigIni.nRisky; // #23559 2011.7.28 yyagi
\r
306 actGauge.Init(CDTXMania.Instance.ConfigIni.nRisky); // #23559 2011.7.28 yyagi
\r
307 this.nPolyphonicSounds = CDTXMania.Instance.ConfigIni.nPoliphonicSounds;
\r
308 e判定表示優先度 = CDTXMania.Instance.ConfigIni.e判定表示優先度;
\r
310 CDTXMania.Instance.Skin.tRemoveMixerAll(); // 効果音のストリームをミキサーから解除しておく
\r
312 queueMixerSound = new Queue<stmixer>(64);
\r
313 bIsDirectSound = (CDTXMania.Instance.Sound管理.GetCurrentSoundDeviceType() == "DirectSound");
\r
314 bUseOSTimer = CDTXMania.Instance.ConfigIni.bUseOSTimer;
\r
315 this.bPAUSE = false;
\r
316 if (CDTXMania.Instance.DTXVmode.Enabled)
\r
318 db再生速度 = CDTXMania.Instance.DTX.dbDTXVPlaySpeed;
\r
319 CDTXMania.Instance.ConfigIni.n演奏速度 = (int)(CDTXMania.Instance.DTX.dbDTXVPlaySpeed * 20 + 0.5);
\r
323 db再生速度 = ((double)CDTXMania.Instance.ConfigIni.n演奏速度) / 20.0;
\r
325 bValidScore = (CDTXMania.Instance.DTXVmode.Enabled) ? false : true;
\r
327 cWailingChip = new CWailingChip共通[3]; // 0:未使用, 1:Gutiar, 2:Bass
\r
328 if (CDTXMania.Instance.ConfigIni.bDrums有効)
\r
330 cWailingChip[1] = new CWailngChip_Guitar_Drum画面(ref 演奏判定ライン座標);
\r
331 cWailingChip[2] = new CWailngChip_Bass_Drum画面(ref 演奏判定ライン座標);
\r
335 cWailingChip[1] = new CWailngChip_Guitar_GR画面(ref 演奏判定ライン座標);
\r
336 cWailingChip[2] = new CWailngChip_Bass_GR画面(ref 演奏判定ライン座標);
\r
339 #region [ 演奏開始前にmixer登録しておくべきサウンド(開幕してすぐに鳴らすことになるチップ音)を登録しておく ]
\r
340 foreach (CChip pChip in listChip)
\r
342 // Debug.WriteLine( "CH=" + pChip.nチャンネル番号.ToString( "x2" ) + ", 整数値=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
343 if (pChip.n発声時刻ms <= 0)
\r
345 if (pChip.eチャンネル番号 == Ech定義.MixerAdd)
\r
348 // Trace.TraceInformation( "first [DA] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms );
\r
349 if (listWAV.ContainsKey(pChip.n整数値_内部番号))
\r
351 CDTX.CWAV wc = listWAV[pChip.n整数値_内部番号];
\r
352 for (int i = 0; i < nPolyphonicSounds; i++)
\r
354 if (wc.rSound[i] != null)
\r
356 CDTXMania.Instance.Sound管理.AddMixer(wc.rSound[i], db再生速度, pChip.b演奏終了後も再生が続くチップである);
\r
357 //AddMixer( wc.rSound[ i ] ); // 最初はqueueを介さず直接ミキサー登録する
\r
370 if (CDTXMania.Instance.ConfigIni.bIsSwappedGuitarBass) // #24063 2011.1.24 yyagi Gt/Bsの譜面情報入れ替え
\r
372 CDTXMania.Instance.DTX.SwapGuitarBassInfos();
\r
374 this.sw = new Stopwatch();
\r
375 this.sw2 = new Stopwatch();
\r
376 // this.gclatencymode = GCSettings.LatencyMode;
\r
377 // GCSettings.LatencyMode = GCLatencyMode.Batch; // 演奏画面中はGCを抑止する
\r
379 public override void On非活性化()
\r
381 this.L最後に再生したHHの実WAV番号.Clear(); // #23921 2011.1.4 yyagi
\r
382 this.L最後に再生したHHの実WAV番号 = null; //
\r
383 for (int i = 0; i < 3; i++)
\r
385 this.queWailing[i].Clear();
\r
386 this.queWailing[i] = null;
\r
388 this.ctWailingチップ模様アニメ = null;
\r
389 this.ctチップ模様アニメ.Drums = null;
\r
390 this.ctチップ模様アニメ.Guitar = null;
\r
391 this.ctチップ模様アニメ.Bass = null;
\r
395 queueMixerSound.Clear();
\r
396 queueMixerSound = null;
\r
397 cInvisibleChip.Dispose();
\r
398 cInvisibleChip = null;
\r
399 // GCSettings.LatencyMode = this.gclatencymode;
\r
402 public override void OnManagedリソースの作成()
\r
404 if (!base.b活性化してない)
\r
406 this.t背景テクスチャの生成();
\r
408 this.txWailing枠 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay wailing cursor.png"));
\r
410 base.OnManagedリソースの作成();
\r
413 public override void OnManagedリソースの解放()
\r
415 if (!base.b活性化してない)
\r
417 TextureFactory.tテクスチャの解放(ref this.tx背景);
\r
419 TextureFactory.tテクスチャの解放(ref this.txWailing枠);
\r
420 base.OnManagedリソースの解放();
\r
426 #region [ protected ]
\r
427 //-----------------
\r
428 protected class CHITCOUNTOFRANK
\r
434 public int Perfect;
\r
438 public int this[int index]
\r
445 return this.Perfect;
\r
459 throw new IndexOutOfRangeException();
\r
466 this.Perfect = value;
\r
470 this.Great = value;
\r
485 throw new IndexOutOfRangeException();
\r
490 [StructLayout(LayoutKind.Sequential)]
\r
491 protected struct STKARAUCHI
\r
503 public CChip this[int index]
\r
539 throw new IndexOutOfRangeException();
\r
585 throw new IndexOutOfRangeException();
\r
590 protected struct stmixer
\r
592 internal bool bIsAdd;
\r
593 internal CSound csound;
\r
594 internal bool b演奏終了後も再生が続くチップである;
\r
597 protected CAct演奏AVI actAVI;
\r
598 protected CAct演奏BGA actBGA;
\r
600 protected CAct演奏チップファイアGB actChipFireGB;
\r
601 protected CAct演奏Combo共通 actCombo;
\r
602 protected CAct演奏Danger共通 actDANGER;
\r
603 protected CActFIFOBlack actFI;
\r
604 protected CActFIFOBlack actFO;
\r
605 protected CActFIFOWhite actFOClear;
\r
606 protected CAct演奏ゲージ共通 actGauge;
\r
608 protected CAct演奏判定文字列共通 actJudgeString;
\r
609 protected CAct演奏DrumsレーンフラッシュD actLaneFlushD;
\r
610 protected CAct演奏レーンフラッシュGB共通 actLaneFlushGB;
\r
611 protected CAct演奏パネル文字列 actPanel;
\r
612 protected CAct演奏演奏情報 actPlayInfo;
\r
613 protected CAct演奏RGB共通 actRGB;
\r
614 protected CAct演奏スコア共通 actScore;
\r
615 protected CAct演奏ステージ失敗 actStageFailed;
\r
616 protected CAct演奏ステータスパネル共通 actStatusPanels;
\r
617 protected CAct演奏WailingBonus共通 actWailingBonus;
\r
618 protected CAct演奏スクロール速度 act譜面スクロール速度;
\r
619 public C演奏判定ライン座標共通 演奏判定ライン座標;
\r
620 protected bool bPAUSE;
\r
621 protected STDGBVALUE<bool> b演奏にMIDI入力を使った;
\r
622 protected STDGBVALUE<bool> b演奏にキーボードを使った;
\r
623 protected STDGBVALUE<bool> b演奏にジョイパッドを使った;
\r
624 protected STDGBVALUE<bool> b演奏にマウスを使った;
\r
625 protected CCounter ctWailingチップ模様アニメ;
\r
626 protected STDGBVALUE<CCounter> ctチップ模様アニメ;
\r
628 protected E演奏画面の戻り値 eフェードアウト完了時の戻り値;
\r
630 protected readonly int[] nチャンネル0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 8, 0 };
\r
631 public static readonly int[] nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 7, 0 };
\r
632 protected readonly Ech定義[] nパッド0Atoチャンネル0A = new Ech定義[]
\r
645 protected readonly int[] nパッド0Atoパッド08 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 8, 0 }; // パッド画像のヒット処理用
\r
646 protected readonly int[] nパッド0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 6, 7, 1, 7, 0 };
\r
647 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_Auto含まない;
\r
648 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_Auto含む;
\r
649 protected STDGBVALUE<CHITCOUNTOFRANK> nヒット数_TargetGhost; // #35411 2015.08.21 chnmr0 add
\r
650 protected STDGBVALUE<int> nコンボ数_TargetGhost;
\r
651 protected STDGBVALUE<int> n最大コンボ数_TargetGhost;
\r
652 protected int n現在のトップChip = -1;
\r
653 protected int[] n最後に再生したBGMの実WAV番号 = new int[50];
\r
654 protected Ech定義 e最後に再生したHHのチャンネル番号;
\r
655 protected List<int> L最後に再生したHHの実WAV番号; // #23921 2011.1.4 yyagi: change "int" to "List<int>", for recording multiple wav No.
\r
656 protected STLANEVALUE<int> n最後に再生した実WAV番号; // #26388 2011.11.8 yyagi: change "n最後に再生した実WAV番号.GUITAR" and "n最後に再生した実WAV番号.BASS"
\r
657 // into "n最後に再生した実WAV番号";
\r
658 // protected int n最後に再生した実WAV番号.GUITAR;
\r
659 // protected int n最後に再生した実WAV番号.BASS;
\r
661 protected volatile Queue<stmixer> queueMixerSound; // #24820 2013.1.21 yyagi まずは単純にAdd/Removeを1個のキューでまとめて管理するやり方で設計する
\r
662 protected DateTime dtLastQueueOperation; //
\r
663 protected bool bIsDirectSound; //
\r
664 protected double db再生速度;
\r
665 protected bool bValidScore;
\r
666 // protected bool bDTXVmode;
\r
667 // protected STDGBVALUE<int> nJudgeLinePosY_delta; // #31602 2013.6.23 yyagi 表示遅延対策として、判定ラインの表示位置をずらす機能を追加する
\r
668 protected STDGBVALUE<bool> bReverse;
\r
670 protected STDGBVALUE<Queue<CChip>> queWailing;
\r
671 protected STDGBVALUE<CChip> r現在の歓声Chip;
\r
672 protected CChip r現在の空うちギターChip;
\r
673 protected STKARAUCHI r現在の空うちドラムChip;
\r
674 protected CChip r現在の空うちベースChip;
\r
675 protected CChip r次にくるギターChip;
\r
676 protected CChip r次にくるベースChip;
\r
677 protected CTexture txWailing枠;
\r
678 protected CTexture txチップ;
\r
679 protected CTexture txヒットバー;
\r
681 protected CTexture tx背景;
\r
683 protected STDGBVALUE<int> nInputAdjustTimeMs; // #23580 2011.1.3 yyagi
\r
684 protected STAUTOPLAY bIsAutoPlay; // #24239 2011.1.23 yyagi
\r
685 // protected int nRisky_InitialVar, nRiskyTime; // #23559 2011.7.28 yyagi → CAct演奏ゲージ共通クラスに隠蔽
\r
686 protected int nPolyphonicSounds;
\r
687 protected List<CChip> listChip;
\r
688 protected Dictionary<int, CDTX.CWAV> listWAV;
\r
689 protected CInvisibleChip cInvisibleChip;
\r
690 protected bool bUseOSTimer;
\r
691 protected E判定表示優先度 e判定表示優先度;
\r
692 protected CWailingChip共通[] cWailingChip;
\r
694 protected Stopwatch sw; // 2011.6.13 最適化検討用のストップウォッチ
\r
695 protected Stopwatch sw2;
\r
696 // protected GCLatencyMode gclatencymode;
\r
698 public void AddMixer(CSound cs, bool _b演奏終了後も再生が続くチップである)
\r
700 stmixer stm = new stmixer()
\r
704 b演奏終了後も再生が続くチップである = _b演奏終了後も再生が続くチップである
\r
706 queueMixerSound.Enqueue(stm);
\r
707 // Debug.WriteLine( "★Queue: add " + Path.GetFileName( stm.csound.strファイル名 ));
\r
709 public void RemoveMixer(CSound cs)
\r
711 stmixer stm = new stmixer()
\r
715 b演奏終了後も再生が続くチップである = false
\r
717 queueMixerSound.Enqueue(stm);
\r
718 // Debug.WriteLine( "★Queue: remove " + Path.GetFileName( stm.csound.strファイル名 ));
\r
720 public void ManageMixerQueue()
\r
722 // もしサウンドの登録/削除が必要なら、実行する
\r
723 if (queueMixerSound.Count > 0)
\r
725 //Debug.WriteLine( "☆queueLength=" + queueMixerSound.Count );
\r
726 DateTime dtnow = DateTime.Now;
\r
727 TimeSpan ts = dtnow - dtLastQueueOperation;
\r
728 if (ts.Milliseconds > 7)
\r
730 for (int i = 0; i < 2 && queueMixerSound.Count > 0; i++)
\r
732 dtLastQueueOperation = dtnow;
\r
733 stmixer stm = queueMixerSound.Dequeue();
\r
736 CDTXMania.Instance.Sound管理.AddMixer(stm.csound, db再生速度, stm.b演奏終了後も再生が続くチップである);
\r
740 CDTXMania.Instance.Sound管理.RemoveMixer(stm.csound);
\r
748 /// 演奏開始前に適切なサイズのAVIテクスチャを作成しておくことで、AVI再生開始時のもたつきをなくす
\r
750 protected void PrepareAVITexture()
\r
752 if (CDTXMania.Instance.ConfigIni.bAVI有効)
\r
754 foreach (CChip pChip in listChip)
\r
756 if (pChip.eチャンネル番号 == Ech定義.Movie || pChip.eチャンネル番号 == Ech定義.MovieFull)
\r
758 // 最初に再生するAVIチップに合わせて、テクスチャを準備しておく
\r
759 if (pChip.rAVI != null)
\r
761 this.actAVI.PrepareProperSizeTexture((int)pChip.rAVI.avi.nフレーム幅, (int)pChip.rAVI.avi.nフレーム高さ);
\r
769 protected E判定 e指定時刻からChipのJUDGEを返す(long nTime, CChip pChip, int nInputAdjustTime, bool saveLag = true)
\r
773 // #35411 2015.08.22 chnmr0 modified add check save lag flag for ghost
\r
774 int lag = (int)(nTime + nInputAdjustTime - pChip.n発声時刻ms);
\r
777 pChip.nLag = lag; // #23580 2011.1.3 yyagi: add "nInputAdjustTime" to add input timing adjust feature
\r
778 if (pChip.e楽器パート != E楽器パート.UNKNOWN)
\r
780 pChip.extendInfoForGhost = this.actCombo.n現在のコンボ数[(int)pChip.e楽器パート] > 0 ? true : false;
\r
783 // #35411 modify end
\r
785 int nDeltaTime = Math.Abs(lag);
\r
786 //Debug.WriteLine("nAbsTime=" + (nTime - pChip.n発声時刻ms) + ", nDeltaTime=" + (nTime + nInputAdjustTime - pChip.n発声時刻ms));
\r
787 if (nDeltaTime <= CDTXMania.Instance.nPerfect範囲ms)
\r
789 return E判定.Perfect;
\r
791 if (nDeltaTime <= CDTXMania.Instance.nGreat範囲ms)
\r
795 if (nDeltaTime <= CDTXMania.Instance.nGood範囲ms)
\r
799 if (nDeltaTime <= CDTXMania.Instance.nPoor範囲ms)
\r
806 protected CChip r空うちChip(E楽器パート part, Eパッド pad)
\r
814 if (this.r現在の空うちドラムChip.HH != null)
\r
816 return this.r現在の空うちドラムChip.HH;
\r
818 if (CDTXMania.Instance.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける)
\r
820 if (CDTXMania.Instance.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける)
\r
822 return this.r現在の空うちドラムChip.HHO;
\r
824 if (this.r現在の空うちドラムChip.HHO != null)
\r
826 return this.r現在の空うちドラムChip.HHO;
\r
829 return this.r現在の空うちドラムChip.LC;
\r
832 return this.r現在の空うちドラムChip.SD;
\r
835 return this.r現在の空うちドラムChip.BD;
\r
838 return this.r現在の空うちドラムChip.HT;
\r
841 if (this.r現在の空うちドラムChip.LT != null)
\r
843 return this.r現在の空うちドラムChip.LT;
\r
845 if (CDTXMania.Instance.ConfigIni.eFTGroup == EFTGroup.共通)
\r
847 return this.r現在の空うちドラムChip.FT;
\r
852 if (this.r現在の空うちドラムChip.FT != null)
\r
854 return this.r現在の空うちドラムChip.FT;
\r
856 if (CDTXMania.Instance.ConfigIni.eFTGroup == EFTGroup.共通)
\r
858 return this.r現在の空うちドラムChip.LT;
\r
863 if (this.r現在の空うちドラムChip.CY != null)
\r
865 return this.r現在の空うちドラムChip.CY;
\r
867 if (CDTXMania.Instance.ConfigIni.eCYGroup == ECYGroup.共通)
\r
869 return this.r現在の空うちドラムChip.RD;
\r
874 if (this.r現在の空うちドラムChip.HHO != null)
\r
876 return this.r現在の空うちドラムChip.HHO;
\r
878 if (CDTXMania.Instance.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける)
\r
880 if (CDTXMania.Instance.ConfigIni.eHHGroup == EHHGroup.左シンバルのみ打ち分ける)
\r
882 return this.r現在の空うちドラムChip.HH;
\r
884 if (this.r現在の空うちドラムChip.HH != null)
\r
886 return this.r現在の空うちドラムChip.HH;
\r
889 return this.r現在の空うちドラムChip.LC;
\r
892 if (this.r現在の空うちドラムChip.RD != null)
\r
894 return this.r現在の空うちドラムChip.RD;
\r
896 if (CDTXMania.Instance.ConfigIni.eCYGroup == ECYGroup.共通)
\r
898 return this.r現在の空うちドラムChip.CY;
\r
903 if (this.r現在の空うちドラムChip.LC != null)
\r
905 return this.r現在の空うちドラムChip.LC;
\r
907 if ((CDTXMania.Instance.ConfigIni.eHHGroup != EHHGroup.ハイハットのみ打ち分ける) && (CDTXMania.Instance.ConfigIni.eHHGroup != EHHGroup.全部共通))
\r
911 if (this.r現在の空うちドラムChip.HH != null)
\r
913 return this.r現在の空うちドラムChip.HH;
\r
915 return this.r現在の空うちドラムChip.HHO;
\r
919 case E楽器パート.GUITAR:
\r
920 return this.r現在の空うちギターChip;
\r
923 return this.r現在の空うちベースChip;
\r
927 protected CChip r指定時刻に一番近いChip_ヒット未済問わず不可視考慮(long nTime, Ech定義 eChannel, int nInputAdjustTime)
\r
930 //Trace.TraceInformation( "NTime={0}, nChannel={1:x2}", nTime, nChannel );
\r
931 nTime += nInputAdjustTime; // #24239 2011.1.23 yyagi InputAdjust
\r
933 int nIndex_InitialPositionSearchingToPast;
\r
934 if (this.n現在のトップChip == -1) // 演奏データとして1個もチップがない場合は
\r
939 int count = listChip.Count;
\r
940 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
941 if (this.n現在のトップChip >= count) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
943 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
945 //int nIndex_NearestChip_Future; // = nIndex_InitialPositionSearchingToFuture;
\r
946 //while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
947 for (; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
\r
949 CChip chip = listChip[nIndex_NearestChip_Future];
\r
950 if (chip.b空打ちチップである)
\r
954 if (((Ech定義.HiHatClose <= eChannel) && (eChannel <= Ech定義.LeftCymbal)))
\r
956 if ((chip.eチャンネル番号 == eChannel) || (chip.eチャンネル番号 == (eChannel + 0x20)))
\r
958 if (chip.n発声時刻ms > nTime)
\r
962 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
964 continue; // ほんの僅かながら高速化
\r
966 else if (((eChannel == Ech定義.Guitar_WailingSound) && (chip.e楽器パート == E楽器パート.GUITAR)) ||
\r
967 (((Ech定義.Guitar_Open <= eChannel) && (eChannel <= Ech定義.Guitar_Wailing)) && (chip.eチャンネル番号 == eChannel)))
\r
969 if (chip.n発声時刻ms > nTime)
\r
973 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
975 else if (((eChannel == Ech定義.Bass_WailingSound) && (chip.e楽器パート == E楽器パート.BASS)) ||
\r
976 (((Ech定義.Bass_Open <= eChannel) && (eChannel <= Ech定義.Bass_Wailing)) && (chip.eチャンネル番号 == eChannel)))
\r
978 if (chip.n発声時刻ms > nTime)
\r
982 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
984 // nIndex_NearestChip_Future++;
\r
986 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
987 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
988 for (; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past--)
\r
990 CChip chip = listChip[nIndex_NearestChip_Past];
\r
991 if (chip.b空打ちチップである)
\r
995 if ((Ech定義.HiHatClose <= eChannel) && (eChannel <= Ech定義.LeftCymbal))
\r
997 if ((chip.eチャンネル番号 == eChannel) || (chip.eチャンネル番号 == (eChannel + 0x20)))
\r
1002 else if (((eChannel == Ech定義.Guitar_WailingSound) && (chip.e楽器パート == E楽器パート.GUITAR)) ||
\r
1003 (((Ech定義.Guitar_Open <= eChannel) && (eChannel <= Ech定義.Guitar_Wailing)) && (chip.eチャンネル番号 == eChannel)))
\r
1005 if ((Ech定義.Guitar_Open <= chip.eチャンネル番号) && (chip.eチャンネル番号 <= Ech定義.Guitar_Wailing))
\r
1010 else if (((eChannel == Ech定義.Bass_WailingSound) && (chip.e楽器パート == E楽器パート.BASS)) ||
\r
1011 (((Ech定義.Bass_Open <= eChannel) && (eChannel <= Ech定義.Bass_Wailing)) && (chip.eチャンネル番号 == eChannel)))
\r
1013 if ((Ech定義.Bass_Open <= chip.eチャンネル番号) && (chip.eチャンネル番号 <= Ech定義.Bass_Wailing))
\r
1018 // nIndex_NearestChip_Past--;
\r
1021 if (nIndex_NearestChip_Future >= count)
\r
1023 if (nIndex_NearestChip_Past < 0) // 検索対象が過去未来どちらにも見つからなかった場合
\r
1027 else // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
1030 return listChip[nIndex_NearestChip_Past];
\r
1033 else if (nIndex_NearestChip_Past < 0) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
1036 return listChip[nIndex_NearestChip_Future];
\r
1038 // 検索対象が過去未来の双方に見つかったなら、より近い方を採用する
\r
1039 CChip nearestChip_Future = listChip[nIndex_NearestChip_Future];
\r
1040 CChip nearestChip_Past = listChip[nIndex_NearestChip_Past];
\r
1041 int nDiffTime_Future = Math.Abs((int)(nTime - nearestChip_Future.n発声時刻ms));
\r
1042 int nDiffTime_Past = Math.Abs((int)(nTime - nearestChip_Past.n発声時刻ms));
\r
1043 if (nDiffTime_Future >= nDiffTime_Past)
\r
1046 return nearestChip_Past;
\r
1049 return nearestChip_Future;
\r
1051 protected void tサウンド再生(CChip rChip, long n再生開始システム時刻ms, E楽器パート part)
\r
1053 this.tサウンド再生(rChip, n再生開始システム時刻ms, part, CDTXMania.Instance.ConfigIni.n手動再生音量, false, false);
\r
1055 protected void tサウンド再生(CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量)
\r
1057 this.tサウンド再生(rChip, n再生開始システム時刻ms, part, n音量, false, false);
\r
1059 protected void tサウンド再生(CChip rChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ)
\r
1061 this.tサウンド再生(rChip, n再生開始システム時刻ms, part, n音量, bモニタ, false);
\r
1063 protected void tサウンド再生(CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生)
\r
1065 // mute sound (auto)
\r
1074 if (pChip != null)
\r
1076 bool overwrite = false;
\r
1079 case E楽器パート.DRUMS:
\r
1083 if ( pChip.bDrums可視チップ_LP_LBD含まない )
\r
1085 index = pChip.eチャンネル番号 - Ech定義.HiHatClose;
\r
1087 else if ( pChip.bDrums不可視チップ_LP_LBD含まない )
\r
1089 index = pChip.eチャンネル番号 - Ech定義.HiHatClose_Hidden;
\r
1091 // mute sound (auto)
\r
1092 // 4A: 84: HH (HO/HC)
\r
1098 else if (Ech定義.SE24 == pChip.eチャンネル番号) // 仮に今だけ追加 HHは消音処理があるので overwriteフラグ系の処理は改めて不要
\r
1102 else if ((Ech定義.SE25 <= pChip.eチャンネル番号) && (pChip.eチャンネル番号 <= Ech定義.SE27)) // 仮に今だけ追加
\r
1104 pChip.ConvertSE25_26_27toCY_RCY_LCY();
\r
1105 index = pChip.eチャンネル番号 - Ech定義.HiHatClose;
\r
1112 int nLane = CStage演奏画面共通.nチャンネル0Atoレーン07[index];
\r
1113 if ((nLane == 1) && // 今回演奏するのがHC or HO
\r
1116 this.e最後に再生したHHのチャンネル番号 != Ech定義.HiHatOpen &&
\r
1117 this.e最後に再生したHHのチャンネル番号 != Ech定義.HiHatOpen_Hidden))
\r
1118 // HCを演奏するか、またはHO演奏&以前HO演奏でない&以前不可視HO演奏でない
\r
1120 // #24772 2011.4.4 yyagi
\r
1121 // == HH mute condition ==
\r
1122 // current HH So, the mute logics are:
\r
1123 // HC HO 1) All played HC/HOs should be queueing
\r
1124 // last HH HC Yes Yes 2) If you aren't in "both current/last HH are HO", queued HH should be muted.
\r
1127 // #23921 2011.1.4 yyagi: 2種類以上のオープンハイハットが発音済みだと、最後のHHOしか消せない問題に対応。
\r
1128 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1129 if (CDTXMania.Instance.DTX.b演奏で直前の音を消音する.HH)
\r
1132 for (int i = 0; i < this.L最後に再生したHHの実WAV番号.Count; i++) // #23921 2011.1.4 yyagi
\r
1134 // CDTXMania.Instance.DTX.tWavの再生停止(this.L最後に再生したHHの実WAV番号);
\r
1135 CDTXMania.Instance.DTX.tWavの再生停止(this.L最後に再生したHHの実WAV番号[i]); // #23921 yyagi ストック分全て消音する
\r
1137 this.L最後に再生したHHの実WAV番号.Clear();
\r
1138 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1141 //this.n最後に再生したHHの実WAV番号 = pChip.n整数値_内部番号;
\r
1142 this.e最後に再生したHHのチャンネル番号 = pChip.eチャンネル番号;
\r
1144 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1145 if (CDTXMania.Instance.DTX.b演奏で直前の音を消音する.HH)
\r
1148 if (index == 0 || index == 7 || index == 0x20 || index == 0x27) // #23921 HOまたは不可視HO演奏時はそのチップ番号をストックしておく
\r
1149 { // #24772 HC, 不可視HCも消音キューに追加
\r
1150 if (this.L最後に再生したHHの実WAV番号.Count >= 16) // #23921 ただしストック数が16以上になるようなら、頭の1個を削って常に16未満に抑える
\r
1151 { // (ストックが増えてList<>のrealloc()が発生するのを予防する)
\r
1152 this.L最後に再生したHHの実WAV番号.RemoveAt(0);
\r
1154 if (!this.L最後に再生したHHの実WAV番号.Contains(pChip.n整数値_内部番号)) // チップ音がまだストックされてなければ
\r
1156 this.L最後に再生したHHの実WAV番号.Add(pChip.n整数値_内部番号); // ストックする
\r
1159 #if TEST_NOTEOFFMODE // 2011.1.4 yyagi test
\r
1164 CDTXMania.Instance.DTX.tWavの再生停止(this.n最後に再生した実WAV番号[index]);
\r
1166 CDTXMania.Instance.DTX.tチップの再生(pChip, n再生開始システム時刻ms, nLane, n音量, bモニタ);
\r
1167 this.n最後に再生した実WAV番号[nLane] = pChip.n整数値_内部番号; // nLaneでなくindexにすると、LC(1A-11=09)とギター(enumで09)がかぶってLC音が消されるので注意
\r
1171 case E楽器パート.GUITAR:
\r
1172 #region [ GUITAR ]
\r
1173 #if TEST_NOTEOFFMODE // 2011.1.1 yyagi test
\r
1174 if (CDTXMania.Instance.DTX.b演奏で直前の音を消音する.Guitar) {
\r
1176 CDTXMania.Instance.DTX.tWavの再生停止(this.n最後に再生した実WAV番号.Guitar);
\r
1177 #if TEST_NOTEOFFMODE
\r
1180 CDTXMania.Instance.DTX.tチップの再生(pChip, n再生開始システム時刻ms, (int)Eレーン.Guitar, n音量, bモニタ, b音程をずらして再生);
\r
1181 this.n最後に再生した実WAV番号.Guitar = pChip.n整数値_内部番号;
\r
1186 #if TEST_NOTEOFFMODE
\r
1187 if (CDTXMania.Instance.DTX.b演奏で直前の音を消音する.Bass) {
\r
1189 CDTXMania.Instance.DTX.tWavの再生停止(this.n最後に再生した実WAV番号.Bass);
\r
1190 #if TEST_NOTEOFFMODE
\r
1193 CDTXMania.Instance.DTX.tチップの再生(pChip, n再生開始システム時刻ms, (int)Eレーン.Bass, n音量, bモニタ, b音程をずらして再生);
\r
1194 this.n最後に再生した実WAV番号.Bass = pChip.n整数値_内部番号;
\r
1203 protected void tステータスパネルの選択()
\r
1205 if (CDTXMania.Instance.bコンパクトモード)
\r
1207 this.actStatusPanels.tラベル名からステータスパネルを決定する(null);
\r
1209 else if (CDTXMania.Instance.stage選曲.r確定された曲 != null)
\r
1211 this.actStatusPanels.tラベル名からステータスパネルを決定する(CDTXMania.Instance.stage選曲.r確定された曲.ar難易度ラベル[CDTXMania.Instance.stage選曲.n確定された曲の難易度]);
\r
1214 protected E判定 tチップのヒット処理(long nHitTime, CChip pChip)
\r
1216 return tチップのヒット処理(nHitTime, pChip, true);
\r
1218 protected abstract E判定 tチップのヒット処理(long nHitTime, CChip pChip, bool bCorrectLane);
\r
1219 protected E判定 tチップのヒット処理(long nHitTime, CChip pChip, E楽器パート screenmode) // E楽器パート screenmode
\r
1221 return tチップのヒット処理(nHitTime, pChip, screenmode, true);
\r
1223 protected E判定 tチップのヒット処理(long nHitTime, CChip pChip, E楽器パート screenmode, bool bCorrectLane)
\r
1225 pChip.bHit = true;
\r
1226 #region [メソッド化する前の記述(注釈化)]
\r
1227 // bool bPChipIsAutoPlay = false;
\r
1228 // bool bGtBsR = ( ( pChip.nチャンネル番号 & 4 ) > 0 );
\r
1229 // bool bGtBsG = ( ( pChip.nチャンネル番号 & 2 ) > 0 );
\r
1230 // bool bGtBsB = ( ( pChip.nチャンネル番号 & 1 ) > 0 );
\r
1231 // bool bGtBsW = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x08 );
\r
1232 // bool bGtBsO = ( ( pChip.nチャンネル番号 & 0x0F ) == 0x00 );
\r
1233 // if ( pChip.e楽器パート == E楽器パート.DRUMS )
\r
1235 // if ( bIsAutoPlay[ this.nチャンネル0Atoレーン07[ pChip.nチャンネル番号 - 0x11 ] ] )
\r
1237 // bPChipIsAutoPlay = true;
\r
1240 // else if ( pChip.e楽器パート == E楽器パート.GUITAR )
\r
1242 ////Trace.TraceInformation( "chip:{0}{1}{2} ", bGtBsR, bGtBsG, bGtBsB );
\r
1243 ////Trace.TraceInformation( "auto:{0}{1}{2} ", bIsAutoPlay[ (int) Eレーン.GtR ], bIsAutoPlay[ (int) Eレーン.GtG ], bIsAutoPlay[ (int) Eレーン.GtB ]);
\r
1244 // bPChipIsAutoPlay = true;
\r
1245 // if ( !bIsAutoPlay[ (int) Eレーン.GtPick ] ) bPChipIsAutoPlay = false;
\r
1248 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.GtR ] ) bPChipIsAutoPlay = false;
\r
1249 // else if ( bGtBsG && !bIsAutoPlay[ (int) Eレーン.GtG ] ) bPChipIsAutoPlay = false;
\r
1250 // else if ( bGtBsB && !bIsAutoPlay[ (int) Eレーン.GtB ] ) bPChipIsAutoPlay = false;
\r
1251 // else if ( bGtBsW && !bIsAutoPlay[ (int) Eレーン.GtW ] ) bPChipIsAutoPlay = false;
\r
1252 // else if ( bGtBsO &&
\r
1253 // ( !bIsAutoPlay[ (int) Eレーン.GtR] || !bIsAutoPlay[ (int) Eレーン.GtG] || !bIsAutoPlay[ (int) Eレーン.GtB] ) )
\r
1254 // bPChipIsAutoPlay = false;
\r
1257 // else if ( pChip.e楽器パート == E楽器パート.BASS )
\r
1259 // bPChipIsAutoPlay = true;
\r
1260 // if ( !bIsAutoPlay[ (int) Eレーン.BsPick ] ) bPChipIsAutoPlay = false;
\r
1263 // if ( bGtBsR && !bIsAutoPlay[ (int) Eレーン.BsR ] ) bPChipIsAutoPlay = false;
\r
1264 // else if ( bGtBsG && bIsAutoPlay[ (int) Eレーン.BsG ] ) bPChipIsAutoPlay = false;
\r
1265 // else if ( bGtBsB && bIsAutoPlay[ (int) Eレーン.BsB ] ) bPChipIsAutoPlay = false;
\r
1266 // else if ( bGtBsW && bIsAutoPlay[ (int) Eレーン.BsW ] ) bPChipIsAutoPlay = false;
\r
1267 // else if ( bGtBsO &&
\r
1268 // ( !bIsAutoPlay[ (int) Eレーン.BsR ] || !bIsAutoPlay[ (int) Eレーン.BsG ] || !bIsAutoPlay[ (int) Eレーン.BsB ] ) )
\r
1269 // bPChipIsAutoPlay = false;
\r
1274 // this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1276 ////Trace.TraceInformation( "ch={0:x2}, flag={1}", pChip.nチャンネル番号, bPChipIsAutoPlay.ToString() );
\r
1278 if (pChip.e楽器パート == E楽器パート.UNKNOWN)
\r
1280 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1284 cInvisibleChip.StartSemiInvisible(pChip.e楽器パート);
\r
1286 bool bPChipIsAutoPlay = pChip.bAssignAutoPlayState(bIsAutoPlay);// 2011.6.10 yyagi
\r
1287 E判定 eJudgeResult = E判定.Auto;
\r
1289 // #35411 2015.08.20 chnmr0 modified (begin)
\r
1290 bool bIsPerfectGhost = CDTXMania.Instance.ConfigIni.eAutoGhost[(int)pChip.e楽器パート] == EAutoGhostData.PERFECT ||
\r
1291 CDTXMania.Instance.DTX.listAutoGhostLag[(int)pChip.e楽器パート] == null;
\r
1292 int nInputAdjustTime = bPChipIsAutoPlay && bIsPerfectGhost ? 0 : this.nInputAdjustTimeMs[(int)pChip.e楽器パート];
\r
1293 eJudgeResult = (bCorrectLane) ? this.e指定時刻からChipのJUDGEを返す(nHitTime, pChip, nInputAdjustTime) : E判定.Miss;
\r
1295 if (pChip.e楽器パート != E楽器パート.UNKNOWN)
\r
1298 switch (pChip.e楽器パート)
\r
1300 case E楽器パート.DRUMS:
\r
1301 nLane = CStage演奏画面共通.nチャンネル0Atoレーン07[pChip.eチャンネル番号 - Ech定義.HiHatClose];
\r
1303 case E楽器パート.GUITAR:
\r
1310 this.actJudgeString.Start(nLane, bPChipIsAutoPlay && bIsPerfectGhost ? E判定.Auto : eJudgeResult, pChip.nLag);
\r
1314 if (!bPChipIsAutoPlay && (pChip.e楽器パート != E楽器パート.UNKNOWN))
\r
1316 // this.t判定にあわせてゲージを増減する( screenmode, pChip.e楽器パート, eJudgeResult );
\r
1317 actGauge.Damage(screenmode, pChip.e楽器パート, eJudgeResult);
\r
1319 if (eJudgeResult == E判定.Poor || eJudgeResult == E判定.Miss || eJudgeResult == E判定.Bad)
\r
1321 cInvisibleChip.ShowChipTemporally(pChip.e楽器パート);
\r
1323 switch (pChip.e楽器パート)
\r
1325 case E楽器パート.DRUMS:
\r
1326 switch (eJudgeResult)
\r
1330 this.nヒット数_Auto含む.Drums.Miss++;
\r
1331 if (!bPChipIsAutoPlay)
\r
1333 this.nヒット数_Auto含まない.Drums.Miss++;
\r
1337 this.nヒット数_Auto含む.Drums[(int)eJudgeResult]++;
\r
1338 if (!bPChipIsAutoPlay)
\r
1340 this.nヒット数_Auto含まない.Drums[(int)eJudgeResult]++;
\r
1345 if (CDTXMania.Instance.ConfigIni.bドラムが全部オートプレイである || !bPChipIsAutoPlay)
\r
1347 switch (eJudgeResult)
\r
1352 this.actCombo.n現在のコンボ数.Drums++;
\r
1356 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1362 case E楽器パート.GUITAR:
\r
1364 int indexInst = (int)pChip.e楽器パート;
\r
1365 switch (eJudgeResult)
\r
1369 this.nヒット数_Auto含む[indexInst].Miss++;
\r
1370 if (!bPChipIsAutoPlay)
\r
1372 this.nヒット数_Auto含まない[indexInst].Miss++;
\r
1375 default: // #24068 2011.1.10 ikanick changed
\r
1376 // #24167 2011.1.16 yyagi changed
\r
1377 this.nヒット数_Auto含む[indexInst][(int)eJudgeResult]++;
\r
1378 if (!bPChipIsAutoPlay)
\r
1380 this.nヒット数_Auto含まない[indexInst][(int)eJudgeResult]++;
\r
1384 switch (eJudgeResult)
\r
1389 this.actCombo.n現在のコンボ数[indexInst]++;
\r
1393 this.actCombo.n現在のコンボ数[indexInst] = 0;
\r
1401 if ((!bPChipIsAutoPlay && (pChip.e楽器パート != E楽器パート.UNKNOWN)) && (eJudgeResult != E判定.Miss) && (eJudgeResult != E判定.Bad))
\r
1403 int nCombos = this.actCombo.n現在のコンボ数[(int)pChip.e楽器パート];
\r
1404 long nScoreDelta = 0;
\r
1405 long[] nComboScoreDelta = new long[] { 350L, 200L, 50L, 0L };
\r
1406 if ((nCombos <= 500) || (eJudgeResult == E判定.Good))
\r
1408 nScoreDelta = nComboScoreDelta[(int)eJudgeResult] * nCombos;
\r
1410 else if ((eJudgeResult == E判定.Perfect) || (eJudgeResult == E判定.Great))
\r
1412 nScoreDelta = nComboScoreDelta[(int)eJudgeResult] * 500L;
\r
1414 this.actScore.Add(pChip.e楽器パート, bIsAutoPlay, nScoreDelta);
\r
1416 return eJudgeResult;
\r
1418 protected abstract void tチップのヒット処理_BadならびにTight時のMiss(E楽器パート part);
\r
1419 protected abstract void tチップのヒット処理_BadならびにTight時のMiss(E楽器パート part, int nLane);
\r
1420 protected void tチップのヒット処理_BadならびにTight時のMiss(E楽器パート part, E楽器パート screenmode)
\r
1422 this.tチップのヒット処理_BadならびにTight時のMiss(part, 0, screenmode);
\r
1424 protected void tチップのヒット処理_BadならびにTight時のMiss(E楽器パート part, int nLane, E楽器パート screenmode)
\r
1426 this.bAUTOでないチップが1つでもバーを通過した = true;
\r
1427 cInvisibleChip.StartSemiInvisible(part);
\r
1428 cInvisibleChip.ShowChipTemporally(part);
\r
1429 //this.t判定にあわせてゲージを増減する( screenmode, part, E判定.Miss );
\r
1430 actGauge.Damage(screenmode, part, E判定.Miss);
\r
1433 case E楽器パート.DRUMS:
\r
1434 if ((nLane >= 0) && (nLane <= 7))
\r
1436 this.actJudgeString.Start(nLane, bIsAutoPlay[nLane] ? E判定.Auto : E判定.Miss, 999);
\r
1438 this.actCombo.n現在のコンボ数.Drums = 0;
\r
1441 case E楽器パート.GUITAR:
\r
1442 this.actJudgeString.Start(10, E判定.Bad, 999);
\r
1443 this.actCombo.n現在のコンボ数.Guitar = 0;
\r
1447 this.actJudgeString.Start(11, E判定.Bad, 999);
\r
1448 this.actCombo.n現在のコンボ数.Bass = 0;
\r
1456 protected CChip r指定時刻に一番近い未ヒットChip(long nTime, Ech定義 eChannelFlag, int nInputAdjustTime)
\r
1458 return this.r指定時刻に一番近い未ヒットChip(nTime, eChannelFlag, nInputAdjustTime, 0);
\r
1460 protected CChip r指定時刻に一番近い未ヒットChip(long nTime, Ech定義 eChannel, int nInputAdjustTime, int n検索範囲時間ms)
\r
1463 //Trace.TraceInformation( "nTime={0}, nChannel={1:x2}, 現在のTop={2}", nTime, nChannel,CDTXMania.Instance.DTX.listChip[ this.n現在のトップChip ].n発声時刻ms );
\r
1464 nTime += nInputAdjustTime;
\r
1466 int nIndex_InitialPositionSearchingToPast;
\r
1468 if (this.n現在のトップChip == -1) // 演奏データとして1個もチップがない場合は
\r
1473 int count = listChip.Count;
\r
1474 int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = this.n現在のトップChip;
\r
1475 if (this.n現在のトップChip >= count) // その時点で演奏すべきチップが既に全部無くなっていたら
\r
1477 nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToPast = count - 1;
\r
1479 // int nIndex_NearestChip_Future = nIndex_InitialPositionSearchingToFuture;
\r
1480 // while ( nIndex_NearestChip_Future < count ) // 未来方向への検索
\r
1481 for (; nIndex_NearestChip_Future < count; nIndex_NearestChip_Future++)
\r
1483 CChip chip = listChip[nIndex_NearestChip_Future];
\r
1486 if (chip.b空打ちチップである)
\r
1490 if ((Ech定義.HiHatClose <= eChannel) && (eChannel <= Ech定義.LeftCymbal))
\r
1492 if ((chip.eチャンネル番号 == eChannel) || (chip.eチャンネル番号 == (eChannel + 0x20)))
\r
1494 if (chip.n発声時刻ms > nTime)
\r
1498 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1502 else if ((((eChannel == Ech定義.Guitar_WailingSound) && (chip.e楽器パート == E楽器パート.GUITAR)) ||
\r
1503 (((Ech定義.Guitar_Open <= eChannel) && (eChannel <= Ech定義.Guitar_Wailing)) && (chip.eチャンネル番号 == eChannel))))
\r
1505 if (chip.n発声時刻ms > nTime)
\r
1509 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1511 else if ((((eChannel == Ech定義.Bass_WailingSound) && (chip.e楽器パート == E楽器パート.BASS)) ||
\r
1512 (((Ech定義.Bass_Open <= eChannel) && (eChannel <= Ech定義.Bass_Wailing)) && (chip.eチャンネル番号 == eChannel))))
\r
1514 if (chip.n発声時刻ms > nTime)
\r
1518 nIndex_InitialPositionSearchingToPast = nIndex_NearestChip_Future;
\r
1521 // nIndex_NearestChip_Future++;
\r
1523 int nIndex_NearestChip_Past = nIndex_InitialPositionSearchingToPast;
\r
1524 // while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
\r
1525 for (; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past--)
\r
1527 CChip chip = listChip[nIndex_NearestChip_Past];
\r
1528 if (chip.b空打ちチップである)
\r
1532 if ((!chip.bHit) &&
\r
1534 ((eChannel >= Ech定義.HiHatClose) && (eChannel <= Ech定義.LeftCymbal) &&
\r
1535 ((chip.eチャンネル番号 == eChannel) || (chip.eチャンネル番号 == (eChannel + 0x20)))
\r
1539 ((eChannel == Ech定義.Guitar_WailingSound) && (chip.e楽器パート == E楽器パート.GUITAR)) ||
\r
1540 (((eChannel >= Ech定義.Guitar_Open) && (eChannel <= Ech定義.Guitar_Wailing)) && (chip.eチャンネル番号 == eChannel))
\r
1544 ((eChannel == Ech定義.Bass_WailingSound) && (chip.e楽器パート == E楽器パート.BASS)) ||
\r
1545 (((eChannel >= Ech定義.Bass_Open) && (eChannel <= Ech定義.Bass_Wailing)) && (chip.eチャンネル番号 == eChannel))
\r
1552 // nIndex_NearestChip_Past--;
\r
1554 if ((nIndex_NearestChip_Future >= count) && (nIndex_NearestChip_Past < 0)) // 検索対象が過去未来どちらにも見つからなかった場合
\r
1559 CChip nearestChip; // = null; // 以下のifブロックのいずれかで必ずnearestChipには非nullが代入されるので、null初期化を削除
\r
1560 if (nIndex_NearestChip_Future >= count) // 検索対象が未来方向には見つからなかった(しかし過去方向には見つかった)場合
\r
1562 nearestChip = listChip[nIndex_NearestChip_Past];
\r
1563 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1565 else if (nIndex_NearestChip_Past < 0) // 検索対象が過去方向には見つからなかった(しかし未来方向には見つかった)場合
\r
1567 nearestChip = listChip[nIndex_NearestChip_Future];
\r
1568 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1572 int nTimeDiff_Future = Math.Abs((int)(nTime - listChip[nIndex_NearestChip_Future].n発声時刻ms));
\r
1573 int nTimeDiff_Past = Math.Abs((int)(nTime - listChip[nIndex_NearestChip_Past].n発声時刻ms));
\r
1574 if (nTimeDiff_Future < nTimeDiff_Past)
\r
1576 nearestChip = listChip[nIndex_NearestChip_Future];
\r
1577 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1581 nearestChip = listChip[nIndex_NearestChip_Past];
\r
1582 // nTimeDiff = Math.Abs( (int) ( nTime - nearestChip.n発声時刻ms ) );
\r
1585 nTimeDiff = Math.Abs((int)(nTime - nearestChip.n発声時刻ms));
\r
1586 if ((n検索範囲時間ms > 0) && (nTimeDiff > n検索範囲時間ms)) // チップは見つかったが、検索範囲時間外だった場合
\r
1592 return nearestChip;
\r
1595 protected CChip r次に来る指定楽器Chipを更新して返す(E楽器パート inst)
\r
1597 switch ((int)inst)
\r
1599 case (int)E楽器パート.GUITAR:
\r
1600 return r次にくるギターChipを更新して返す();
\r
1601 case (int)E楽器パート.BASS:
\r
1602 return r次にくるベースChipを更新して返す();
\r
1607 protected CChip r次にくるギターChipを更新して返す()
\r
1609 int nInputAdjustTime = this.bIsAutoPlay.GtPick ? 0 : this.nInputAdjustTimeMs.Guitar;
\r
1610 this.r次にくるギターChip = this.r指定時刻に一番近い未ヒットChip(CSound管理.rc演奏用タイマ.n現在時刻, Ech定義.Guitar_WailingSound, nInputAdjustTime, 500);
\r
1611 return this.r次にくるギターChip;
\r
1613 protected CChip r次にくるベースChipを更新して返す()
\r
1615 int nInputAdjustTime = this.bIsAutoPlay.BsPick ? 0 : this.nInputAdjustTimeMs.Bass;
\r
1616 this.r次にくるベースChip = this.r指定時刻に一番近い未ヒットChip(CSound管理.rc演奏用タイマ.n現在時刻, Ech定義.Bass_WailingSound, nInputAdjustTime, 500);
\r
1617 return this.r次にくるベースChip;
\r
1620 protected void ChangeInputAdjustTimeInPlaying(IInputDevice keyboard, int plusminus) // #23580 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1622 int part, offset = plusminus;
\r
1623 if (keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift)) // Guitar InputAdjustTime
\r
1625 part = (int)E楽器パート.GUITAR;
\r
1627 else if (keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftAlt) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightAlt)) // Bass InputAdjustTime
\r
1629 part = (int)E楽器パート.BASS;
\r
1631 else // Drums InputAdjustTime
\r
1633 part = (int)E楽器パート.DRUMS;
\r
1635 if (!keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftControl) && !keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightControl))
\r
1640 this.nInputAdjustTimeMs[part] += offset;
\r
1641 if (this.nInputAdjustTimeMs[part] > 99)
\r
1643 this.nInputAdjustTimeMs[part] = 99;
\r
1645 else if (this.nInputAdjustTimeMs[part] < -99)
\r
1647 this.nInputAdjustTimeMs[part] = -99;
\r
1649 CDTXMania.Instance.ConfigIni.nInputAdjustTimeMs[part] = this.nInputAdjustTimeMs[part];
\r
1652 protected abstract void t入力処理_ドラム();
\r
1653 protected abstract void ドラムスクロール速度アップ();
\r
1654 protected abstract void ドラムスクロール速度ダウン();
\r
1655 private int nStartTime_ = 0;
\r
1656 protected void tキー入力()
\r
1658 IInputDevice keyboard = CDTXMania.Instance.Input管理.Keyboard;
\r
1659 if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F1) &&
\r
1660 (keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift)))
\r
1661 { // shift+f1 (pause)
\r
1662 this.bPAUSE = !this.bPAUSE;
\r
1665 nStartTime_ = (int)CSound管理.rc演奏用タイマ.n現在時刻;
\r
1666 CSound管理.rc演奏用タイマ.t一時停止();
\r
1667 CDTXMania.Instance.Timer.t一時停止();
\r
1668 CDTXMania.Instance.DTX.t全チップの再生一時停止();
\r
1669 CDTXMania.Instance.DTX.t全AVIの一時停止();
\r
1673 CDTXMania.Instance.DTX.t全AVIの再生再開();
\r
1674 //CDTXMania.Instance.DTX.t全チップの再生再開();
\r
1675 #region [ PAUSE連打でのBGMずれ対策 (AVIはずれたままになるが無視・・・) ]
\r
1676 List<CSound> pausedCSound = new List<CSound>();
\r
1677 for (int i = this.n現在のトップChip; i >= 0; i--)
\r
1679 CChip pChip = CDTXMania.Instance.DTX.listChip[i];
\r
1680 int nDuration = pChip.GetDuration();
\r
1682 if ((pChip.n発声時刻ms + nDuration > 0) && (pChip.n発声時刻ms <= nStartTime_) && (nStartTime_ <= pChip.n発声時刻ms + nDuration))
\r
1684 if (pChip.bWAVを使うチャンネルである && !pChip.b空打ちチップである) // wav系チャンネル、且つ、空打ちチップではない
\r
1687 bool b = CDTXMania.Instance.DTX.listWAV.TryGetValue(pChip.n整数値_内部番号, out wc);
\r
1690 if ((wc.bIsBGMSound && CDTXMania.Instance.ConfigIni.bBGM音を発声する) || (!wc.bIsBGMSound))
\r
1692 CDTXMania.Instance.DTX.tチップの再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int)Eレーン.BGM, CDTXMania.Instance.DTX.nモニタを考慮した音量(E楽器パート.UNKNOWN));
\r
1693 #region [ PAUSEする ]
\r
1694 int j = wc.n現在再生中のサウンド番号;
\r
1695 if (wc.rSound[j] != null)
\r
1697 wc.rSound[j].t再生を一時停止する();
\r
1698 wc.rSound[j].t再生位置を変更する(nStartTime_ - pChip.n発声時刻ms);
\r
1699 pausedCSound.Add(wc.rSound[j]);
\r
1706 foreach (CSound cs in pausedCSound)
\r
1711 CDTXMania.Instance.Timer.t再開();
\r
1712 CSound管理.rc演奏用タイマ.t再開();
\r
1716 if ((!this.bPAUSE && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED)) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト))
\r
1719 this.t入力処理_ギターベース(E楽器パート.GUITAR);
\r
1720 this.t入力処理_ギターベース(E楽器パート.BASS);
\r
1721 if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.UpArrow) && (keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift)))
\r
1722 { // shift (+ctrl) + UpArrow (BGMAdjust)
\r
1723 CDTXMania.Instance.DTX.t各自動再生音チップの再生時刻を変更する((keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftControl) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightControl)) ? 1 : 10);
\r
1724 CDTXMania.Instance.DTX.tWave再生位置自動補正();
\r
1726 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.DownArrow) && (keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift)))
\r
1727 { // shift + DownArrow (BGMAdjust)
\r
1728 CDTXMania.Instance.DTX.t各自動再生音チップの再生時刻を変更する((keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftControl) || keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightControl)) ? -1 : -10);
\r
1729 CDTXMania.Instance.DTX.tWave再生位置自動補正();
\r
1731 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.UpArrow))
\r
1732 { // UpArrow(scrollspeed up)
\r
1735 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.DownArrow))
\r
1736 { // DownArrow (scrollspeed down)
\r
1739 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Delete))
\r
1740 { // del (debug info)
\r
1741 CDTXMania.Instance.ConfigIni.b演奏情報を表示する = !CDTXMania.Instance.ConfigIni.b演奏情報を表示する;
\r
1743 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.LeftArrow)) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1745 ChangeInputAdjustTimeInPlaying(keyboard, -1);
\r
1747 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.RightArrow)) // #24243 2011.1.16 yyagi UI for InputAdjustTime in playing screen.
\r
1749 ChangeInputAdjustTimeInPlaying(keyboard, +1);
\r
1751 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F5))
\r
1753 int n描画遅延ms = CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Drums;
\r
1754 n描画遅延ms = Math.Max(n描画遅延ms - 1, -99);
\r
1755 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Drums =
\r
1756 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Guitar =
\r
1757 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Bass = n描画遅延ms;
\r
1758 this.演奏判定ライン座標.nJudgeLinePosY_delta.Drums =
\r
1759 this.演奏判定ライン座標.nJudgeLinePosY_delta.Guitar =
\r
1760 this.演奏判定ライン座標.nJudgeLinePosY_delta.Bass = n描画遅延ms;
\r
1762 else if (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F6))
\r
1764 int n描画遅延ms = CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Drums;
\r
1765 n描画遅延ms = Math.Min(n描画遅延ms + 1, 99);
\r
1766 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Drums =
\r
1767 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Guitar =
\r
1768 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset.Bass = n描画遅延ms;
\r
1769 this.演奏判定ライン座標.nJudgeLinePosY_delta.Drums =
\r
1770 this.演奏判定ライン座標.nJudgeLinePosY_delta.Guitar =
\r
1771 this.演奏判定ライン座標.nJudgeLinePosY_delta.Bass = n描画遅延ms;
\r
1773 else if ((base.eフェーズID == CStage.Eフェーズ.共通_通常状態) && (keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape) || CDTXMania.Instance.Pad.b押されたGB(Eパッド.FT)))
\r
1774 { // escape (exit)
\r
1775 this.actFO.tフェードアウト開始();
\r
1776 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
\r
1777 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.演奏中断;
\r
1782 protected void t入力メソッド記憶(E楽器パート part)
\r
1784 if (CDTXMania.Instance.Pad.st検知したデバイス.Keyboard)
\r
1786 this.b演奏にキーボードを使った[(int)part] = true;
\r
1788 if (CDTXMania.Instance.Pad.st検知したデバイス.Joypad)
\r
1790 this.b演奏にジョイパッドを使った[(int)part] = true;
\r
1792 if (CDTXMania.Instance.Pad.st検知したデバイス.MIDIIN)
\r
1794 this.b演奏にMIDI入力を使った[(int)part] = true;
\r
1796 if (CDTXMania.Instance.Pad.st検知したデバイス.Mouse)
\r
1798 this.b演奏にマウスを使った[(int)part] = true;
\r
1801 protected abstract void t進行描画_AVI();
\r
1802 protected void t進行描画_AVI(int x, int y)
\r
1804 if (((base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト)) && (!CDTXMania.Instance.ConfigIni.bストイックモード && CDTXMania.Instance.ConfigIni.bAVI有効))
\r
1806 this.actAVI.t進行描画(x, y, 556, 710);
\r
1809 protected abstract void t進行描画_BGA();
\r
1810 protected void t進行描画_BGA(int x, int y)
\r
1812 if (((base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト)) && (!CDTXMania.Instance.ConfigIni.bストイックモード && CDTXMania.Instance.ConfigIni.bBGA有効))
\r
1814 this.actBGA.t進行描画(x, y);
\r
1817 protected abstract void t進行描画_DANGER();
\r
1818 protected void t進行描画_MIDIBGM()
\r
1820 if (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED)
\r
1822 CStage.Eフェーズ eフェーズid1 = base.eフェーズID;
\r
1825 protected void t進行描画_RGBボタン()
\r
1827 if (CDTXMania.Instance.ConfigIni.eDark != Eダークモード.FULL)
\r
1829 this.actRGB.t進行描画(演奏判定ライン座標);
\r
1832 protected void t進行描画_STAGEFAILED()
\r
1834 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
1836 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.ステージ失敗;
\r
1837 base.eフェーズID = CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト;
\r
1838 this.actFO.tフェードアウト開始();
\r
1841 protected void t進行描画_WailingBonus()
\r
1843 if ((base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト))
\r
1845 this.actWailingBonus.On進行描画();
\r
1848 protected abstract void t進行描画_Wailing枠();
\r
1849 protected void t進行描画_Wailing枠(int GtWailingFrameX, int BsWailingFrameX, int GtWailingFrameY, int BsWailingFrameY)
\r
1851 if ((CDTXMania.Instance.ConfigIni.eDark != Eダークモード.FULL) && CDTXMania.Instance.ConfigIni.bGuitar有効)
\r
1853 if (this.txWailing枠 != null)
\r
1855 if (CDTXMania.Instance.DTX.bチップがある.Guitar)
\r
1857 this.txWailing枠.t2D描画(CDTXMania.Instance.Device, GtWailingFrameX, GtWailingFrameY);
\r
1859 if (CDTXMania.Instance.DTX.bチップがある.Bass)
\r
1861 this.txWailing枠.t2D描画(CDTXMania.Instance.Device, BsWailingFrameX, BsWailingFrameY);
\r
1868 protected void t進行描画_チップファイアGB()
\r
1870 this.actChipFireGB.On進行描画();
\r
1872 protected abstract void t進行描画_パネル文字列();
\r
1873 protected void t進行描画_パネル文字列(int x, int y)
\r
1875 if ((base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト))
\r
1877 this.actPanel.t進行描画(x, y);
\r
1880 protected void tパネル文字列の設定()
\r
1882 this.actPanel.SetPanelString(string.IsNullOrEmpty(CDTXMania.Instance.DTX.PANEL) ? CDTXMania.Instance.DTX.TITLE : CDTXMania.Instance.DTX.PANEL);
\r
1886 protected void t進行描画_ゲージ()
\r
1888 if (((CDTXMania.Instance.ConfigIni.eDark != Eダークモード.HALF) && (CDTXMania.Instance.ConfigIni.eDark != Eダークモード.FULL)) && ((base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト)))
\r
1890 this.actGauge.On進行描画();
\r
1893 protected void t進行描画_コンボ()
\r
1895 this.actCombo.On進行描画();
\r
1897 protected void t進行描画_スコア()
\r
1899 this.actScore.On進行描画();
\r
1901 protected void t進行描画_ステータスパネル()
\r
1903 this.actStatusPanels.On進行描画();
\r
1905 protected bool t進行描画_チップ(E楽器パート ePlayMode)
\r
1907 if ((base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED) || (base.eフェーズID == CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト))
\r
1911 if ((this.n現在のトップChip == -1) || (this.n現在のトップChip >= listChip.Count))
\r
1915 if (this.n現在のトップChip == -1)
\r
1920 //double speed = 264.0; // BPM150の時の1小節の長さ[dot]
\r
1921 // const double speed = 234.0 * Scale.Y; // BPM150の時の1小節の長さ[dot]
\r
1923 CDTX dTX = CDTXMania.Instance.DTX;
\r
1924 CConfigIni configIni = CDTXMania.Instance.ConfigIni;
\r
1925 for (int nCurrentTopChip = this.n現在のトップChip; nCurrentTopChip < dTX.listChip.Count; nCurrentTopChip++)
\r
1927 CChip pChip = dTX.listChip[nCurrentTopChip];
\r
1928 //Debug.WriteLine( "nCurrentTopChip=" + nCurrentTopChip + ", ch=" + pChip.nチャンネル番号.ToString("x2") + ", 発音位置=" + pChip.n発声位置 + ", 発声時刻ms=" + pChip.n発声時刻ms );
\r
1929 pChip.CalcDistanceFromBar(CSound管理.rc演奏用タイマ.n現在時刻, this.act譜面スクロール速度.db現在の譜面スクロール速度);
\r
1930 if (Math.Min(Math.Min(pChip.nバーからの距離dot.Drums, pChip.nバーからの距離dot.Guitar), pChip.nバーからの距離dot.Bass) > 450 * Scale.Y)
\r
1934 // if ( ( ( nCurrentTopChip == this.n現在のトップChip ) && ( pChip.nバーからの距離dot.Drums < -65 ) ) && pChip.bHit )
\r
1935 // #28026 2012.4.5 yyagi; 信心ワールドエンドの曲終了後リザルトになかなか行かない問題の修正
\r
1937 if ((dTX.listChip[this.n現在のトップChip].nバーからの距離dot.Drums < -65 * Scale.Y) && // 小節線の消失処理などに影響するため、
\r
1938 (dTX.listChip[this.n現在のトップChip].nバーからの距離dot.Guitar < -65 * Scale.Y) && // Drumsのスクロールスピードだけには依存させない。
\r
1939 (dTX.listChip[this.n現在のトップChip].nバーからの距離dot.Bass < -65 * Scale.Y) &&
\r
1940 dTX.listChip[this.n現在のトップChip].bHit)
\r
1942 // nCurrentTopChip = ++this.n現在のトップChip;
\r
1943 ++this.n現在のトップChip;
\r
1946 bool bPChipIsAutoPlay = pChip.bAssignAutoPlayState(bIsAutoPlay);
\r
1948 int nInputAdjustTime = (bPChipIsAutoPlay || (pChip.e楽器パート == E楽器パート.UNKNOWN)) ? 0 : this.nInputAdjustTimeMs[(int)pChip.e楽器パート];
\r
1950 int instIndex = (int)pChip.e楽器パート;
\r
1951 if (((pChip.e楽器パート != E楽器パート.UNKNOWN) && !pChip.bHit) &&
\r
1952 ((pChip.nバーからの距離dot[instIndex] < -40 * Scale.Y) &&
\r
1953 (this.e指定時刻からChipのJUDGEを返す(CSound管理.rc演奏用タイマ.n現在時刻, pChip, nInputAdjustTime) == E判定.Miss)))
\r
1955 this.tチップのヒット処理(CSound管理.rc演奏用タイマ.n現在時刻, pChip); //チップ消失(Hitせずスルーした場合)
\r
1957 if (((pChip.e楽器パート != E楽器パート.UNKNOWN) && !pChip.bHit) &&
\r
1958 ((pChip.nバーからの距離dot[instIndex] + this.演奏判定ライン座標.nJudgeLinePosY_delta[instIndex] < 0)))
\r
1960 //Debug.WriteLine( "透明度=" + pChip.n透明度 );
\r
1961 pChip.n透明度 -= 12; // チップが判定バーを越えたら、徐々に透明にする。VSyncWaitの有無で加減が変わるが・・
\r
1962 if (pChip.n透明度 < 0)
\r
1968 // #35411 chnmr0 add (ターゲットゴースト)
\r
1969 if (CDTXMania.Instance.ConfigIni.eTargetGhost[instIndex] != ETargetGhostData.NONE &&
\r
1970 CDTXMania.Instance.DTX.listTargetGhsotLag[instIndex] != null &&
\r
1971 pChip.e楽器パート != E楽器パート.UNKNOWN &&
\r
1972 pChip.nバーからの距離dot[instIndex] < 0)
\r
1974 if (!pChip.bTargetGhost判定済み)
\r
1976 pChip.bTargetGhost判定済み = true;
\r
1978 int ghostLag = 128;
\r
1979 if (0 <= pChip.n楽器パートでの出現順 && pChip.n楽器パートでの出現順 < CDTXMania.Instance.DTX.listTargetGhsotLag[instIndex].Count)
\r
1981 ghostLag = CDTXMania.Instance.DTX.listTargetGhsotLag[instIndex][pChip.n楽器パートでの出現順];
\r
1982 // 上位8ビットが1ならコンボが途切れている(ギターBAD空打ちでコンボ数を再現するための措置)
\r
1983 if (ghostLag > 255)
\r
1985 this.nコンボ数_TargetGhost[instIndex] = 0;
\r
1987 ghostLag = (ghostLag & 255) - 128;
\r
1989 else if (CDTXMania.Instance.ConfigIni.eTargetGhost[instIndex] == ETargetGhostData.PERFECT)
\r
1994 if (ghostLag <= 127)
\r
1996 E判定 eJudge = this.e指定時刻からChipのJUDGEを返す(pChip.n発声時刻ms + ghostLag, pChip, 0, false);
\r
1997 this.nヒット数_TargetGhost[instIndex][(int)eJudge]++;
\r
1998 if (eJudge == E判定.Miss || eJudge == E判定.Poor)
\r
2000 this.n最大コンボ数_TargetGhost[instIndex] = Math.Max(this.n最大コンボ数_TargetGhost[instIndex], this.nコンボ数_TargetGhost[instIndex]);
\r
2001 this.nコンボ数_TargetGhost[instIndex] = 0;
\r
2005 this.nコンボ数_TargetGhost[instIndex]++;
\r
2011 if (pChip[Ech定義.BGM] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2013 pChip.bHit = true;
\r
2014 if (configIni.bBGM音を発声する)
\r
2016 //long t = CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms;
\r
2017 //Trace.TraceInformation( "BGM再生開始: 演奏タイマのn前回リセットしたときのシステム時刻=" + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + ", pChip.n発生時刻ms=" + pChip.n発声時刻ms + ", 合計=" + t );
\r
2018 dTX.tチップの再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int)Eレーン.BGM, dTX.nモニタを考慮した音量(E楽器パート.UNKNOWN));
\r
2021 else if (pChip[Ech定義.BPM] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2023 pChip.bHit = true;
\r
2024 this.actPlayInfo.dbBPM = (pChip.n整数値 * (((double)configIni.n演奏速度) / 20.0)) + dTX.BASEBPM;
\r
2026 else if (pChip.bBGALayer && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2028 pChip.bHit = true;
\r
2029 if (configIni.bBGA有効)
\r
2031 switch (pChip.eBGA種別)
\r
2033 case EBGA種別.BMPTEX:
\r
2034 if (pChip.rBMPTEX != null)
\r
2036 this.actBGA.Start(pChip, 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
2041 if ((pChip.rBGA != null) && ((pChip.rBMP != null) || (pChip.rBMPTEX != null)))
\r
2043 this.actBGA.Start(pChip, 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
2047 case EBGA種別.BGAPAN:
\r
2048 if ((pChip.rBGAPan != null) && ((pChip.rBMP != null) || (pChip.rBMPTEX != null)))
\r
2050 this.actBGA.Start(pChip, 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
2055 if (pChip.rBMP != null)
\r
2057 this.actBGA.Start(pChip, pChip.rBMP, null, pChip.rBMP.n幅, pChip.rBMP.n高さ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
\r
2063 else if (pChip[Ech定義.BPMEx] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2065 pChip.bHit = true;
\r
2066 if (dTX.listBPM.ContainsKey(pChip.n整数値_内部番号))
\r
2068 this.actPlayInfo.dbBPM = (dTX.listBPM[pChip.n整数値_内部番号].dbBPM値 * (((double)configIni.n演奏速度) / 20.0)) + dTX.BASEBPM;
\r
2071 else if (pChip.bDrums可視チップ && pChip.b空打ちチップである)
\r
2073 this.t進行描画_チップ_空打ち音設定_ドラム(configIni, ref dTX, ref pChip);
\r
2075 else if (pChip.bDrums可視チップ_LP_LBD含まない)
\r
2077 this.t進行描画_チップ_ドラムス(configIni, ref dTX, ref pChip);
\r
2079 else if (pChip[Ech定義.DrumsFillin] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2081 pChip.bHit = true;
\r
2082 this.r現在の歓声Chip.Drums = pChip;
\r
2084 else if (pChip.bGuitar可視チップ)
\r
2086 this.t進行描画_チップ_ギターベース(configIni, ref dTX, ref pChip, E楽器パート.GUITAR);
\r
2088 else if (pChip[Ech定義.Guitar_Wailing])
\r
2090 this.t進行描画_チップ_ギター_ウェイリング(configIni, ref dTX, ref pChip, !CDTXMania.Instance.ConfigIni.bDrums有効);
\r
2092 else if (pChip[Ech定義.Guitar_WailingSound] && !pChip.bHit && (pChip.nバーからの距離dot.Guitar < 0))
\r
2094 pChip.bHit = true;
\r
2095 this.r現在の歓声Chip.Guitar = pChip;
\r
2097 else if (pChip.bDrums不可視チップ && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2099 pChip.bHit = true;
\r
2101 else if (pChip[Ech定義.BarLine])
\r
2104 this.t進行描画_チップ_小節線(configIni, ref dTX, ref pChip);
\r
2106 else if (pChip[Ech定義.BarLine] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2109 pChip.bHit = true;
\r
2111 if ((ePlayMode == E楽器パート.DRUMS) && (configIni.eDark != Eダークモード.FULL) && pChip.b可視 && (this.txチップ != null))
\r
2113 this.txチップ.t2D描画(CDTXMania.Instance.Device,
\r
2114 configIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ?
\r
2116 configIni.bReverse.Drums ?
\r
2117 //(int) ( ( ( 0x38 + pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ) :
\r
2118 //(int) ( ( ( 0x1a6 - pChip.nバーからの距離dot.Drums ) - 1 ) * Scale.Y ),
\r
2119 124 + pChip.nバーからの距離dot.Drums : 947 - pChip.nバーからの距離dot.Drums,
\r
2123 (configIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 888 : 682,
\r
2129 else if (pChip[Ech定義.MIDIChorus] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2131 pChip.bHit = true;
\r
2133 else if (pChip[Ech定義.FillIn])
\r
2135 this.t進行描画_チップ_フィルイン(configIni, ref dTX, ref pChip);
\r
2137 else if (pChip.bMovie && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2139 pChip.bHit = true;
\r
2140 if (configIni.bAVI有効)
\r
2142 if (CDTXMania.Instance.DTX.bチップがある.BGA)
\r
2144 this.actAVI.bHasBGA = true;
\r
2146 if (pChip.eチャンネル番号 == Ech定義.MovieFull || CDTXMania.Instance.ConfigIni.bForceAVIFullscreen)
\r
2148 this.actAVI.bFullScreenMovie = true;
\r
2150 switch (pChip.eAVI種別)
\r
2153 //if ( pChip.rAVI != null )
\r
2155 //int startWidth = ( CDTXMania.Instance.DTX.bチップがある.BGA ) ? 278 : SampleFramework.GameWindowSize.Width;
\r
2156 //int startHeight = ( CDTXMania.Instance.DTX.bチップがある.BGA ) ? 355 : SampleFramework.GameWindowSize.Height;
\r
2157 int startWidth = !this.actAVI.bFullScreenMovie ? 278 : SampleFramework.GameWindowSize.Width;
\r
2158 int startHeight = !this.actAVI.bFullScreenMovie ? 355 : SampleFramework.GameWindowSize.Height;
\r
2159 this.actAVI.Start(pChip.eチャンネル番号, pChip.rAVI, startWidth, startHeight, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, pChip.n発声時刻ms);
\r
2163 case EAVI種別.AVIPAN:
\r
2164 if (pChip.rAVIPan != null)
\r
2166 this.actAVI.Start(pChip.eチャンネル番号, 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
2172 else if (pChip.bSE && !pChip.bOverrideSE && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2174 pChip.bHit = true;
\r
2175 if (configIni.bBGM音を発声する)
\r
2177 dTX.tWavの再生停止(this.n最後に再生したBGMの実WAV番号[pChip.eチャンネル番号 - Ech定義.SE01]);
\r
2178 dTX.tチップの再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int)Eレーン.BGM, dTX.nモニタを考慮した音量(E楽器パート.UNKNOWN));
\r
2179 this.n最後に再生したBGMの実WAV番号[pChip.eチャンネル番号 - Ech定義.SE01] = pChip.n整数値_内部番号;
\r
2182 else if (pChip.bOverrideSE && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2185 // mute sound (auto)
\r
2186 // 4A: 84: HH (HO/HC)
\r
2193 // CDTXMania.Instance.DTX.tWavの再生停止( this.n最後に再生した実WAV番号.Guitar );
\r
2194 // CDTXMania.Instance.DTX.tチップの再生( pChip, n再生開始システム時刻ms, 8, n音量, bモニタ, b音程をずらして再生 );
\r
2195 // this.n最後に再生した実WAV番号.Guitar = pChip.n整数値_内部番号;
\r
2197 // protected void tサウンド再生( CDTX.CChip pChip, long n再生開始システム時刻ms, E楽器パート part, int n音量, bool bモニタ, bool b音程をずらして再生 )
\r
2198 pChip.bHit = true;
\r
2199 E楽器パート[] p = { E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.DRUMS, E楽器パート.GUITAR, E楽器パート.BASS };
\r
2201 E楽器パート pp = p[pChip.eチャンネル番号 - Ech定義.SE24];
\r
2203 // if ( pp == E楽器パート.DRUMS ) { // pChip.nチャンネル番号= ..... HHとか、ドラムの場合は変える。
\r
2205 // int[] ch = { 0x11, 0x16, 0x19, 0x1A };
\r
2206 // pChip.nチャンネル番号 = ch[ pChip.nチャンネル番号 - 0x84 ];
\r
2208 this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, pp, dTX.nモニタを考慮した音量(pp));
\r
2211 else if (pChip.bBass可視チップ)
\r
2213 this.t進行描画_チップ_ギターベース(configIni, ref dTX, ref pChip, E楽器パート.BASS);
\r
2215 else if (pChip[Ech定義.Bass_Wailing])
\r
2217 this.t進行描画_チップ_ベース_ウェイリング(configIni, ref dTX, ref pChip, !CDTXMania.Instance.ConfigIni.bDrums有効);
\r
2219 else if (pChip[Ech定義.Bass_WailingSound] && !pChip.bHit && (pChip.nバーからの距離dot.Bass < 0))
\r
2221 pChip.bHit = true;
\r
2222 this.r現在の歓声Chip.Bass = pChip;
\r
2224 else if (pChip[Ech定義.Guitar_NoChip] && !pChip.bHit && (pChip.nバーからの距離dot.Guitar < 0))
\r
2226 pChip.bHit = true;
\r
2227 this.r現在の空うちギターChip = pChip;
\r
2228 pChip.ConvertGBNoChip();
\r
2230 else if (pChip[Ech定義.Bass_NoChip] && !pChip.bHit && (pChip.nバーからの距離dot.Bass < 0))
\r
2232 pChip.bHit = true;
\r
2233 this.r現在の空うちベースChip = pChip;
\r
2234 pChip.ConvertGBNoChip();
\r
2236 else if (pChip.bBGALayerSwap && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2238 pChip.bHit = true;
\r
2239 if ((configIni.bBGA有効 && (pChip.eBGA種別 == EBGA種別.BMP)) || (pChip.eBGA種別 == EBGA種別.BMPTEX))
\r
2241 this.actBGA.ChangeScope(pChip);
\r
2244 else if (pChip[Ech定義.MixerAdd] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2246 //Debug.WriteLine( "[DA(AddMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2247 pChip.bHit = true;
\r
2248 if (listWAV.ContainsKey(pChip.n整数値_内部番号)) // 参照が遠いので後日最適化する
\r
2250 CDTX.CWAV wc = listWAV[pChip.n整数値_内部番号];
\r
2251 //Debug.Write( "[AddMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2253 for (int i = 0; i < nPolyphonicSounds; i++)
\r
2255 if (wc.rSound[i] != null)
\r
2257 //CDTXMania.Instance.Sound管理.AddMixer( wc.rSound[ i ] );
\r
2258 AddMixer(wc.rSound[i], pChip.b演奏終了後も再生が続くチップである);
\r
2262 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Instance.Sound管理.GetMixingStreams() );
\r
2265 //if ( i == nPolyphonicSounds - 1 )
\r
2267 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Instance.Sound管理.GetMixingStreams() );
\r
2272 else if (pChip[Ech定義.MixerRemove] && !pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2274 //Debug.WriteLine( "[DB(RemoveMixer)] BAR=" + pChip.n発声位置 / 384 + " ch=" + pChip.nチャンネル番号.ToString( "x2" ) + ", wav=" + pChip.n整数値.ToString( "x2" ) + ", time=" + pChip.n発声時刻ms );
\r
2275 pChip.bHit = true;
\r
2276 if (listWAV.ContainsKey(pChip.n整数値_内部番号)) // 参照が遠いので後日最適化する
\r
2278 CDTX.CWAV wc = listWAV[pChip.n整数値_内部番号];
\r
2279 //Debug.Write( "[DelMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
\r
2280 for (int i = 0; i < nPolyphonicSounds; i++)
\r
2282 if (wc.rSound[i] != null)
\r
2284 //CDTXMania.Instance.Sound管理.RemoveMixer( wc.rSound[ i ] );
\r
2285 if (!wc.rSound[i].b演奏終了後も再生が続くチップである) // #32248 2013.10.16 yyagi
\r
2286 { // DTX終了後も再生が続くチップの0xDB登録をなくすことはできず。
\r
2287 RemoveMixer(wc.rSound[i]); // (ミキサー解除のタイミングが遅延する場合の対応が面倒なので。)
\r
2288 } // そこで、代わりにフラグをチェックしてミキサー削除ロジックへの遷移をカットする。
\r
2292 // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Instance.Sound管理.GetMixingStreams() );
\r
2295 //if ( i == nPolyphonicSounds - 1 )
\r
2297 // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Instance.Sound管理.GetMixingStreams() );
\r
2302 else if (!pChip.bHit && (pChip.nバーからの距離dot.Drums < 0))
\r
2305 pChip.bHit = true;
\r
2311 public void t再読込()
\r
2313 CDTXMania.Instance.DTX.t全チップの再生停止とミキサーからの削除();
\r
2314 this.eフェードアウト完了時の戻り値 = E演奏画面の戻り値.再読込_再演奏;
\r
2315 base.eフェーズID = CStage.Eフェーズ.演奏_再読込;
\r
2316 this.bPAUSE = false;
\r
2318 // #34048 2014.7.16 yyagi
\r
2319 #region [ 読み込み画面に遷移する前に、設定変更した可能性があるパラメータをConfigIniクラスに書き戻す ]
\r
2320 for (int i = 0; i < 3; i++)
\r
2322 CDTXMania.Instance.ConfigIni.nViewerScrollSpeed[i] = CDTXMania.Instance.ConfigIni.n譜面スクロール速度[i];
\r
2324 CDTXMania.Instance.ConfigIni.b演奏情報を表示する = CDTXMania.Instance.ConfigIni.bViewerShowDebugStatus;
\r
2330 CDTXMania.Instance.DTX.t全チップの再生停止とミキサーからの削除();
\r
2331 this.actAVI.Stop();
\r
2332 this.actBGA.Stop();
\r
2333 this.actPanel.Stop(); // PANEL表示停止
\r
2334 CDTXMania.Instance.Timer.t一時停止(); // 再生時刻カウンタ停止
\r
2336 this.n現在のトップChip = CDTXMania.Instance.DTX.listChip.Count - 1; // 終端にシーク
\r
2338 // 自分自身のOn活性化()相当の処理もすべき。
\r
2344 /// <param name="nStartBar">演奏開始小節番号</param>
\r
2345 /// <param name="bResetHitStatus">演奏済み情報(bHit)をクリアするかどうか</param>
\r
2346 public void t演奏位置の変更(int nStartBar)
\r
2349 CDTXMania.Instance.DTX.t全チップの再生停止();
\r
2350 this.actAVI.Stop();
\r
2351 this.actBGA.Stop();
\r
2353 #region [ 再生開始小節の変更 ]
\r
2354 nStartBar++; // +1が必要
\r
2356 #region [ 演奏済みフラグのついたChipをリセットする ]
\r
2357 for (int i = 0; i < CDTXMania.Instance.DTX.listChip.Count; i++)
\r
2359 CChip pChip = CDTXMania.Instance.DTX.listChip[i];
\r
2362 CChip p = (CChip)pChip.Clone();
\r
2364 CDTXMania.Instance.DTX.listChip[i] = p;
\r
2369 #region [ 処理を開始するチップの特定 ]
\r
2370 //for ( int i = this.n現在のトップChip; i < CDTXMania.Instance.DTX.listChip.Count; i++ )
\r
2371 bool bSuccessSeek = false;
\r
2372 for (int i = 0; i < CDTXMania.Instance.DTX.listChip.Count; i++)
\r
2374 CChip pChip = CDTXMania.Instance.DTX.listChip[i];
\r
2375 if (pChip.n発声位置 < 384 * nStartBar)
\r
2381 bSuccessSeek = true;
\r
2382 this.n現在のトップChip = i;
\r
2386 if (!bSuccessSeek)
\r
2388 // this.n現在のトップChip = CDTXMania.Instance.DTX.listChip.Count - 1;
\r
2389 this.n現在のトップChip = 0; // 対象小節が存在しないなら、最初から再生
\r
2393 #region [ 演奏開始の発声時刻msを取得し、タイマに設定 ]
\r
2394 int nStartTime = CDTXMania.Instance.DTX.listChip[this.n現在のトップChip].n発声時刻ms;
\r
2396 CSound管理.rc演奏用タイマ.tリセット(); // これでPAUSE解除されるので、次のPAUSEチェックは不要
\r
2397 //if ( !this.bPAUSE )
\r
2399 CSound管理.rc演奏用タイマ.t一時停止();
\r
2401 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2404 List<CSound> pausedCSound = new List<CSound>();
\r
2406 #region [ BGMやギターなど、演奏開始のタイミングで再生がかかっているサウンドのの途中再生開始 ] // (CDTXのt入力・行解析・チップ配置()で小節番号が+1されているのを削っておくこと)
\r
2407 for (int i = this.n現在のトップChip; i >= 0; i--)
\r
2409 CChip pChip = CDTXMania.Instance.DTX.listChip[i];
\r
2410 int nDuration = pChip.GetDuration();
\r
2412 if ((pChip.n発声時刻ms + nDuration > 0) && (pChip.n発声時刻ms <= nStartTime) && (nStartTime <= pChip.n発声時刻ms + nDuration))
\r
2414 if (pChip.bWAVを使うチャンネルである && !pChip.b空打ちチップである) // wav系チャンネル、且つ、空打ちチップではない
\r
2417 bool b = CDTXMania.Instance.DTX.listWAV.TryGetValue(pChip.n整数値_内部番号, out wc);
\r
2420 if ((wc.bIsBGMSound && CDTXMania.Instance.ConfigIni.bBGM音を発声する) || (!wc.bIsBGMSound))
\r
2422 CDTXMania.Instance.DTX.tチップの再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, (int)Eレーン.BGM, CDTXMania.Instance.DTX.nモニタを考慮した音量(E楽器パート.UNKNOWN));
\r
2423 #region [ PAUSEする ]
\r
2424 int j = wc.n現在再生中のサウンド番号;
\r
2425 if (wc.rSound[j] != null)
\r
2427 wc.rSound[j].t再生を一時停止する();
\r
2428 wc.rSound[j].t再生位置を変更する(nStartTime - pChip.n発声時刻ms);
\r
2429 pausedCSound.Add(wc.rSound[j]);
\r
2437 #region [ 演奏開始時点で既に表示されているBGAとAVIの、シークと再生 ]
\r
2438 this.actBGA.SkipStart(nStartTime);
\r
2439 this.actAVI.SkipStart(nStartTime);
\r
2441 #region [ PAUSEしていたサウンドを一斉に再生再開する(ただしタイマを止めているので、ここではまだ再生開始しない) ]
\r
2442 foreach (CSound cs in pausedCSound)
\r
2446 pausedCSound.Clear();
\r
2447 pausedCSound = null;
\r
2449 #region [ タイマを再開して、PAUSEから復帰する ]
\r
2450 CSound管理.rc演奏用タイマ.n現在時刻 = nStartTime;
\r
2451 CDTXMania.Instance.Timer.tリセット(); // これでPAUSE解除されるので、3行先の再開()は不要
\r
2452 CDTXMania.Instance.Timer.n現在時刻 = nStartTime; // Debug表示のTime: 表記を正しくするために必要
\r
2453 CSound管理.rc演奏用タイマ.t再開();
\r
2454 //CDTXMania.Instance.Timer.t再開();
\r
2455 this.bPAUSE = false; // システムがPAUSE状態だったら、強制解除
\r
2456 this.actPanel.Start();
\r
2463 /// DTXV用の設定をする。(全AUTOなど)
\r
2464 /// 元の設定のバックアップなどはしないので、あとでConfig.iniを上書き保存しないこと。
\r
2466 protected void tDTXV用の設定()
\r
2468 CDTXMania.Instance.ConfigIni.bAutoPlay.HH = true;
\r
2469 CDTXMania.Instance.ConfigIni.bAutoPlay.SD = true;
\r
2470 CDTXMania.Instance.ConfigIni.bAutoPlay.BD = true;
\r
2471 CDTXMania.Instance.ConfigIni.bAutoPlay.HT = true;
\r
2472 CDTXMania.Instance.ConfigIni.bAutoPlay.LT = true;
\r
2473 CDTXMania.Instance.ConfigIni.bAutoPlay.CY = true;
\r
2474 CDTXMania.Instance.ConfigIni.bAutoPlay.FT = true;
\r
2475 CDTXMania.Instance.ConfigIni.bAutoPlay.RD = true;
\r
2476 CDTXMania.Instance.ConfigIni.bAutoPlay.LC = true;
\r
2477 CDTXMania.Instance.ConfigIni.bAutoPlay.GtR = true;
\r
2478 CDTXMania.Instance.ConfigIni.bAutoPlay.GtG = true;
\r
2479 CDTXMania.Instance.ConfigIni.bAutoPlay.GtB = true;
\r
2480 CDTXMania.Instance.ConfigIni.bAutoPlay.GtPick = true;
\r
2481 CDTXMania.Instance.ConfigIni.bAutoPlay.GtW = true;
\r
2482 CDTXMania.Instance.ConfigIni.bAutoPlay.BsR = true;
\r
2483 CDTXMania.Instance.ConfigIni.bAutoPlay.BsG = true;
\r
2484 CDTXMania.Instance.ConfigIni.bAutoPlay.BsB = true;
\r
2485 CDTXMania.Instance.ConfigIni.bAutoPlay.BsPick = true;
\r
2486 CDTXMania.Instance.ConfigIni.bAutoPlay.BsW = true;
\r
2488 this.bIsAutoPlay = CDTXMania.Instance.ConfigIni.bAutoPlay;
\r
2490 CDTXMania.Instance.ConfigIni.bAVI有効 = true;
\r
2491 CDTXMania.Instance.ConfigIni.bBGA有効 = true;
\r
2492 for (int i = 0; i < 3; i++)
\r
2494 CDTXMania.Instance.ConfigIni.bGraph[i] = false;
\r
2495 CDTXMania.Instance.ConfigIni.bHidden[i] = false;
\r
2496 CDTXMania.Instance.ConfigIni.bLeft[i] = false;
\r
2497 CDTXMania.Instance.ConfigIni.bLight[i] = false;
\r
2498 CDTXMania.Instance.ConfigIni.bReverse[i] = false;
\r
2499 CDTXMania.Instance.ConfigIni.bSudden[i] = false;
\r
2500 CDTXMania.Instance.ConfigIni.eInvisible[i] = EInvisible.OFF;
\r
2501 CDTXMania.Instance.ConfigIni.eRandom[i] = Eランダムモード.OFF;
\r
2502 CDTXMania.Instance.ConfigIni.n表示可能な最小コンボ数[i] = 65535;
\r
2503 CDTXMania.Instance.ConfigIni.判定文字表示位置[i] = E判定文字表示位置.表示OFF;
\r
2504 // CDTXMania.Instance.ConfigIni.n譜面スクロール速度[ i ] = CDTXMania.Instance.ConfigIni.nViewerScrollSpeed[ i ]; // これだけはOn活性化()で行うこと。
\r
2505 // そうしないと、演奏開始直後にスクロール速度が変化して見苦しい。
\r
2508 CDTXMania.Instance.ConfigIni.eDark = Eダークモード.OFF;
\r
2510 CDTXMania.Instance.ConfigIni.b演奏情報を表示する = CDTXMania.Instance.ConfigIni.bViewerShowDebugStatus;
\r
2511 CDTXMania.Instance.ConfigIni.bフィルイン有効 = true;
\r
2512 CDTXMania.Instance.ConfigIni.bScoreIniを出力する = false;
\r
2513 CDTXMania.Instance.ConfigIni.bSTAGEFAILED有効 = false;
\r
2514 CDTXMania.Instance.ConfigIni.bTight = false;
\r
2515 CDTXMania.Instance.ConfigIni.bストイックモード = false;
\r
2516 CDTXMania.Instance.ConfigIni.bドラム打音を発声する = true;
\r
2517 CDTXMania.Instance.ConfigIni.bBGM音を発声する = true;
\r
2519 CDTXMania.Instance.ConfigIni.nRisky = 0;
\r
2520 CDTXMania.Instance.ConfigIni.nShowLagType = 0;
\r
2521 CDTXMania.Instance.ConfigIni.ドラムコンボ文字の表示位置 = Eドラムコンボ文字の表示位置.OFF;
\r
2524 protected abstract void t進行描画_チップ_ドラムス(CConfigIni configIni, ref CDTX dTX, ref CChip pChip);
\r
2525 //protected abstract void t進行描画_チップ_ギター( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip );
\r
2526 protected abstract void t進行描画_チップ_ギターベース(CConfigIni configIni, ref CDTX dTX, ref CChip pChip, E楽器パート inst);
\r
2530 /// <param name="configIni"></param>
\r
2531 /// <param name="dTX"></param>
\r
2532 /// <param name="pChip">描画するチップ</param>
\r
2533 /// <param name="inst">楽器種別</param>
\r
2534 /// <param name="barYNormal">Normal時判定ライン表示Y座標</param>
\r
2535 /// <param name="barYReverse">Reverse時判定ライン表示Y座標</param>
\r
2536 /// <param name="showRangeY0">チップ表示Y座標範囲(最小値)</param>
\r
2537 /// <param name="showRangeY1">チップ表示Y座標範囲(最大値)</param>
\r
2538 /// <param name="openXg">オープンチップの表示X座標(ギター用)</param>
\r
2539 /// <param name="openXb">オープンチップの表示X座標(ベース用)</param>
\r
2540 /// <param name="rectOpenOffsetX">テクスチャ内のオープンチップregionのx座標</param>
\r
2541 /// <param name="rectOpenOffsetY">テクスチャ内のオープンチップregionのy座標</param>
\r
2542 /// <param name="openChipWidth">テクスチャ内のオープンチップregionのwidth</param>
\r
2543 /// <param name="chipHeight">テクスチャ内のチップのheight</param>
\r
2544 /// <param name="chipWidth">テクスチャ内のチップのwidth</param>
\r
2545 /// <param name="guitarNormalX">ギターチップ描画のx座標(Normal)</param>
\r
2546 /// <param name="guitarLeftyX">ギターチップ描画のx座標(Lefty)</param>
\r
2547 /// <param name="bassNormalX">ベースチップ描画のx座標(Normal)</param>
\r
2548 /// <param name="bassLeftyX">ベースチップ描画のx座標(Lefty)</param>
\r
2549 /// <param name="drawDeltaX">描画のX座標間隔(R,G,B...)</param>
\r
2550 /// <param name="chipTexDeltaX">テクスチャののX座標間隔(R,G,B...)</param>
\r
2551 protected void t進行描画_チップ_ギターベース(CConfigIni configIni, ref CDTX dTX, ref CChip pChip, E楽器パート inst,
\r
2552 int barYNormal, int barYReverse,
\r
2553 int showRangeY0, int showRangeY1, int openXg, int openXb,
\r
2554 int rectOpenOffsetX, int rectOpenOffsetY, int openChipWidth, int chipHeight, int chipWidth,
\r
2555 int guitarNormalX, int guitarLeftyX, int bassNormalX, int bassLeftyX, int drawDeltaX, int chipTexDeltaX)
\r
2557 int instIndex = (int)inst;
\r
2558 if (configIni.bGuitar有効)
\r
2560 #region [ Invisible処理 ]
\r
2561 if (configIni.eInvisible[instIndex] != EInvisible.OFF)
\r
2563 cInvisibleChip.SetInvisibleStatus(ref pChip);
\r
2568 #region [ Hidden/Sudden処理 ]
\r
2569 if (configIni.bSudden[instIndex])
\r
2571 pChip.b可視 = (pChip.nバーからの距離dot[instIndex] < 200 * Scale.Y);
\r
2573 if (configIni.bHidden[instIndex] && (pChip.nバーからの距離dot[instIndex] < 100 * Scale.Y))
\r
2575 pChip.b可視 = false;
\r
2580 bool bChipHasR = pChip.bGuitarBass_R;
\r
2581 bool bChipHasG = pChip.bGuitarBass_G;
\r
2582 bool bChipHasB = pChip.bGuitarBass_B;
\r
2583 bool bChipHasW = pChip.bGuitarBass_Wailing;
\r
2584 bool bChipIsO = pChip.bGuitarBass_Open;
\r
2586 #region [ chip描画 ]
\r
2587 Ech定義 OPEN = (inst == E楽器パート.GUITAR) ? Ech定義.Guitar_Open : Ech定義.Bass_Open;
\r
2588 if (!pChip.bHit && pChip.b可視)
\r
2590 if (this.txチップ != null)
\r
2592 this.txチップ.n透明度 = pChip.n透明度;
\r
2594 int y = configIni.bReverse[instIndex] ?
\r
2595 (int)(barYReverse - pChip.nバーからの距離dot[instIndex]) :
\r
2596 (int)(barYNormal + pChip.nバーからの距離dot[instIndex]);
\r
2597 int n小節線消失距離dot = configIni.bReverse[instIndex] ?
\r
2598 (int)(-100 * Scale.Y) :
\r
2599 (configIni.e判定位置[instIndex] == E判定位置.標準) ? (int)(-36 * Scale.Y) : (int)(-25 * Scale.Y);
\r
2600 if (configIni.bReverse[instIndex])
\r
2602 //showRangeY1 = barYReverse - n小節線消失距離dot;
\r
2606 showRangeY0 = barYNormal + n小節線消失距離dot;
\r
2608 if ((showRangeY0 < y) && (y < showRangeY1))
\r
2610 if (this.txチップ != null)
\r
2612 int nアニメカウンタ現在の値 = this.ctチップ模様アニメ[instIndex].n現在の値;
\r
2613 #region [ OPENチップの描画 ]
\r
2614 if (pChip.eチャンネル番号 == OPEN)
\r
2616 int xo = (inst == E楽器パート.GUITAR) ? openXg : openXb;
\r
2617 this.txチップ.t2D描画(CDTXMania.Instance.Device,
\r
2619 y - (2 * Scale.Y),
\r
2621 (int)(rectOpenOffsetX * Scale.X),
\r
2622 (int)(rectOpenOffsetY * Scale.Y) + (int)(((nアニメカウンタ現在の値 % 5) * chipHeight * Scale.Y)),
\r
2623 (int)(openChipWidth * Scale.X),
\r
2624 (int)(chipHeight * Scale.Y)
\r
2629 Rectangle rc = new Rectangle(
\r
2630 (int)(rectOpenOffsetX * Scale.X),
\r
2631 (int)(nアニメカウンタ現在の値 * chipHeight * Scale.Y),
\r
2632 (int)(chipWidth * Scale.X),
\r
2633 (int)(chipHeight * Scale.Y)
\r
2635 #region [ RGBチップのX座標初期化 ]
\r
2637 if (inst == E楽器パート.GUITAR)
\r
2639 x = (configIni.bLeft.Guitar) ? guitarLeftyX : guitarNormalX;
\r
2643 x = (configIni.bLeft.Bass) ? bassLeftyX : bassNormalX;
\r
2645 int deltaX = (configIni.bLeft[instIndex]) ? -drawDeltaX : +drawDeltaX;
\r
2647 //Trace.TraceInformation( "chip={0:x2}, E楽器パート={1}, x={2}", pChip.nチャンネル番号, inst, x );
\r
2648 #region [ Rチップ描画 ]
\r
2651 this.txチップ.t2D描画(CDTXMania.Instance.Device,
\r
2653 y - (chipHeight / 2) * Scale.Y,
\r
2658 #region [ Gチップ描画 ]
\r
2659 rc.X += (int)(chipTexDeltaX * Scale.X);
\r
2663 this.txチップ.t2D描画(CDTXMania.Instance.Device,
\r
2665 y - (chipHeight / 2) * Scale.Y,
\r
2670 #region [ Bチップ描画 ]
\r
2671 rc.X += (int)(chipTexDeltaX * Scale.X);
\r
2675 this.txチップ.t2D描画(CDTXMania.Instance.Device,
\r
2677 y - (chipHeight / 2) * Scale.Y,
\r
2686 //if ( ( configIni.bAutoPlay.Guitar && !pChip.bHit ) && ( pChip.nバーからの距離dot.Guitar < 0 ) )
\r
2689 // #35411 2015.08.20 chnmr0 modified
\r
2690 // 従来のAUTO処理に加えてプレーヤーゴーストの再生機能を追加
\r
2691 bool autoPlayCondition = (!pChip.bHit) && (pChip.nバーからの距離dot[instIndex] < 0);
\r
2692 if (autoPlayCondition)
\r
2694 cInvisibleChip.StartSemiInvisible(inst);
\r
2697 bool autoPick = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
2698 autoPlayCondition = !pChip.bHit && autoPick;
\r
2699 long ghostLag = 0;
\r
2700 bool bUsePerfectGhost = true;
\r
2702 if ((pChip.e楽器パート == E楽器パート.GUITAR || pChip.e楽器パート == E楽器パート.BASS) &&
\r
2703 CDTXMania.Instance.ConfigIni.eAutoGhost[(int)(pChip.e楽器パート)] != EAutoGhostData.PERFECT &&
\r
2704 CDTXMania.Instance.DTX.listAutoGhostLag[(int)pChip.e楽器パート] != null &&
\r
2705 0 <= pChip.n楽器パートでの出現順 &&
\r
2706 pChip.n楽器パートでの出現順 < CDTXMania.Instance.DTX.listAutoGhostLag[(int)pChip.e楽器パート].Count)
\r
2708 // #35411 (mod) Ghost data が有効なので 従来のAUTOではなくゴーストのラグを利用
\r
2709 // 発生時刻と現在時刻からこのタイミングで演奏するかどうかを決定
\r
2710 ghostLag = CDTXMania.Instance.DTX.listAutoGhostLag[(int)pChip.e楽器パート][pChip.n楽器パートでの出現順];
\r
2711 bool resetCombo = ghostLag > 255;
\r
2712 ghostLag = (ghostLag & 255) - 128;
\r
2713 ghostLag -= (pChip.e楽器パート == E楽器パート.GUITAR ? nInputAdjustTimeMs.Guitar : nInputAdjustTimeMs.Bass);
\r
2714 autoPlayCondition &= (pChip.n発声時刻ms + ghostLag <= CSound管理.rc演奏用タイマ.n現在時刻ms);
\r
2715 if (resetCombo && autoPlayCondition)
\r
2717 this.actCombo.n現在のコンボ数[(int)pChip.e楽器パート] = 0;
\r
2719 bUsePerfectGhost = false;
\r
2722 if (bUsePerfectGhost)
\r
2725 autoPlayCondition &= (pChip.nバーからの距離dot[instIndex] < 0);
\r
2728 if (autoPlayCondition)
\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 pushingR = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.R);
\r
2735 bool pushingG = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.G);
\r
2736 bool pushingB = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.B);
\r
2738 #region [ Chip Fire effects (auto時用) ]
\r
2739 // autoPickでない時の処理は、 t入力処理・ギターベース(E楽器パート) で行う
\r
2740 bool bSuccessOPEN = bChipIsO && (autoR || !pushingR) && (autoG || !pushingG) && (autoB || !pushingB);
\r
2742 if ((bChipHasR && (autoR || pushingR)) || bSuccessOPEN)
\r
2744 this.actChipFireGB.Start(0 + lo, 演奏判定ライン座標);
\r
2746 if ((bChipHasG && (autoG || pushingG)) || bSuccessOPEN)
\r
2748 this.actChipFireGB.Start(1 + lo, 演奏判定ライン座標);
\r
2750 if ((bChipHasB && (autoB || pushingB)) || bSuccessOPEN)
\r
2752 this.actChipFireGB.Start(2 + lo, 演奏判定ライン座標);
\r
2756 #region [ autopick ]
\r
2758 bool bMiss = true;
\r
2759 if (bChipHasR == autoR && bChipHasG == autoG && bChipHasB == autoB) // autoレーンとチップレーン一致時はOK
\r
2760 { // この条件を加えないと、同時に非autoレーンを押下している時にNGとなってしまう。
\r
2763 else if ((autoR || (bChipHasR == pushingR)) && (autoG || (bChipHasG == pushingG)) && (autoB || (bChipHasB == pushingB)))
\r
2764 // ( bChipHasR == ( pushingR | autoR ) ) && ( bChipHasG == ( pushingG | autoG ) ) && ( bChipHasB == ( pushingB | autoB ) ) )
\r
2768 else if (((bChipIsO == true) && (!pushingR | autoR) && (!pushingG | autoG) && (!pushingB | autoB))) // OPEN時
\r
2772 pChip.bHit = true;
\r
2773 this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms + ghostLag, inst, dTX.nモニタを考慮した音量(inst), false, bMiss);
\r
2774 this.r次にくるギターChip = null;
\r
2777 this.tチップのヒット処理(pChip.n発声時刻ms + ghostLag, pChip);
\r
2781 pChip.nLag = 0; // tチップのヒット処理()の引数最後がfalseの時はpChip.nLagを計算しないため、ここでAutoPickかつMissのLag=0を代入
\r
2782 this.tチップのヒット処理(pChip.n発声時刻ms + ghostLag, pChip, false);
\r
2784 Ech定義 chWailingChip = (inst == E楽器パート.GUITAR) ? Ech定義.Guitar_Wailing : Ech定義.Bass_Wailing;
\r
2785 CChip item = this.r指定時刻に一番近い未ヒットChip(pChip.n発声時刻ms + ghostLag, chWailingChip, this.nInputAdjustTimeMs[instIndex], 140);
\r
2786 if (item != null && !bMiss)
\r
2788 this.queWailing[instIndex].Enqueue(item);
\r
2792 // #35411 modify end
\r
2795 } // end of "if configIni.bGuitar有効"
\r
2796 if (!pChip.bHit && (pChip.nバーからの距離dot[instIndex] < 0)) // Guitar/Bass無効の場合は、自動演奏する
\r
2798 pChip.bHit = true;
\r
2799 this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻 + pChip.n発声時刻ms, inst, dTX.nモニタを考慮した音量(inst));
\r
2804 protected virtual void t進行描画_チップ_ギターベース_ウェイリング(
\r
2805 CConfigIni configIni, ref CDTX dTX, ref CChip pChip, E楽器パート inst, bool bGRmode)
\r
2807 int indexInst = (int)inst;
\r
2808 if (configIni.bGuitar有効)
\r
2810 #region [ Invisible処理 ]
\r
2811 if (configIni.eInvisible[indexInst] != EInvisible.OFF)
\r
2813 cInvisibleChip.SetInvisibleStatus(ref pChip);
\r
2816 #region [ Sudden/Hidden処理 ]
\r
2817 if (configIni.bSudden[indexInst])
\r
2819 pChip.b可視 = (pChip.nバーからの距離dot[indexInst] < 200 * Scale.Y);
\r
2821 if (configIni.bHidden[indexInst] && (pChip.nバーからの距離dot[indexInst] < 100 * Scale.Y))
\r
2823 pChip.b可視 = false;
\r
2827 cWailingChip[indexInst].t進行描画_チップ_ギターベース_ウェイリング(
\r
2828 configIni, ref dTX, ref pChip,
\r
2829 ref txチップ, ref 演奏判定ライン座標, ref ctWailingチップ模様アニメ
\r
2832 if (!pChip.bHit && (pChip.nバーからの距離dot[indexInst] < 0))
\r
2834 if (pChip.nバーからの距離dot[indexInst] < -234 * Scale.Y) // #25253 2011.5.29 yyagi: Don't set pChip.bHit=true for wailing at once. It need to 1sec-delay (234pix per 1sec).
\r
2836 pChip.bHit = true;
\r
2838 bool autoW = (inst == E楽器パート.GUITAR) ? configIni.bAutoPlay.GtW : configIni.bAutoPlay.BsW;
\r
2839 //if ( configIni.bAutoPlay[ ((int) Eレーン.Guitar - 1) + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
2842 // pChip.bHit = true; // #25253 2011.5.29 yyagi: Set pChip.bHit=true if autoplay.
\r
2843 // this.actWailingBonus.Start( inst, this.r現在の歓声Chip[indexInst] );
\r
2844 // #23886 2012.5.22 yyagi; To support auto Wailing; Don't do wailing for ALL wailing chips. Do wailing for queued wailing chip.
\r
2845 // wailing chips are queued when 1) manually wailing and not missed at that time 2) AutoWailing=ON and not missed at that time
\r
2846 long nTimeStamp_Wailed = pChip.n発声時刻ms + CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
2847 DoWailingFromQueue(inst, nTimeStamp_Wailed, autoW);
\r
2849 cInvisibleChip.StartSemiInvisible(inst);
\r
2853 pChip.bHit = true;
\r
2855 protected virtual void t進行描画_チップ_ギター_ウェイリング(CConfigIni configIni, ref CDTX dTX, ref CChip pChip, bool bGRmode)
\r
2857 t進行描画_チップ_ギターベース_ウェイリング(configIni, ref dTX, ref pChip, E楽器パート.GUITAR, bGRmode);
\r
2859 protected abstract void t進行描画_チップ_フィルイン(CConfigIni configIni, ref CDTX dTX, ref CChip pChip);
\r
2860 protected abstract void t進行描画_チップ_小節線(CConfigIni configIni, ref CDTX dTX, ref CChip pChip);
\r
2861 //protected abstract void t進行描画_チップ_ベース( CConfigIni configIni, ref CDTX dTX, ref CChip pChip );
\r
2862 protected virtual void t進行描画_チップ_ベース_ウェイリング(CConfigIni configIni, ref CDTX dTX, ref CChip pChip, bool bGRmode)
\r
2864 t進行描画_チップ_ギターベース_ウェイリング(configIni, ref dTX, ref pChip, E楽器パート.BASS, bGRmode);
\r
2869 protected abstract void t進行描画_チップ_空打ち音設定_ドラム(CConfigIni configIni, ref CDTX dTX, ref CChip pChip);
\r
2870 protected void t進行描画_チップアニメ()
\r
2872 for (int i = 0; i < 3; i++) // 0=drums, 1=guitar, 2=bass
\r
2874 if (this.ctチップ模様アニメ[i] != null)
\r
2876 this.ctチップ模様アニメ[i].t進行Loop();
\r
2879 if (this.ctWailingチップ模様アニメ != null)
\r
2881 this.ctWailingチップ模様アニメ.t進行Loop();
\r
2885 protected bool t進行描画_フェードイン_アウト()
\r
2887 switch (base.eフェーズID)
\r
2889 case CStage.Eフェーズ.共通_フェードイン:
\r
2890 if (this.actFI.On進行描画() != 0)
\r
2892 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
\r
2896 case CStage.Eフェーズ.共通_フェードアウト:
\r
2897 case CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト:
\r
2898 if (this.actFO.On進行描画() != 0)
\r
2904 case CStage.Eフェーズ.演奏_STAGE_CLEAR_フェードアウト:
\r
2905 if (this.actFOClear.On進行描画() == 0)
\r
2914 protected void t進行描画_レーンフラッシュD()
\r
2916 if ((CDTXMania.Instance.ConfigIni.eDark == Eダークモード.OFF) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED) && (base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト))
\r
2918 this.actLaneFlushD.On進行描画();
\r
2921 protected void t進行描画_レーンフラッシュGB()
\r
2923 if ((CDTXMania.Instance.ConfigIni.eDark == Eダークモード.OFF) && CDTXMania.Instance.ConfigIni.bGuitar有効)
\r
2925 this.actLaneFlushGB.On進行描画();
\r
2928 protected abstract void t進行描画_演奏情報();
\r
2929 protected void t進行描画_演奏情報(int x, int y)
\r
2931 if (!CDTXMania.Instance.ConfigIni.b演奏情報を表示しない)
\r
2933 this.actPlayInfo.t進行描画(x, y);
\r
2936 protected void t進行描画_背景()
\r
2938 if (CDTXMania.Instance.ConfigIni.eDark == Eダークモード.OFF)
\r
2940 if (this.tx背景 != null)
\r
2942 this.tx背景.t2D描画(CDTXMania.Instance.Device, 0, 0);
\r
2947 // FullHD版では、背景描画のさらに奥でAVI描画をするため、
\r
2948 // Dark!=OFF時下記の画面クリアをすると、AVI描画がクリアされてしまう
\r
2949 // CDTXMania.Instance.app.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 0f, 0 );
\r
2953 protected void t進行描画_判定ライン()
\r
2955 if (CDTXMania.Instance.ConfigIni.eDark != Eダークモード.FULL)
\r
2957 int y = this.演奏判定ライン座標.n判定ラインY座標(E楽器パート.DRUMS, false, bReverse[(int)E楽器パート.DRUMS], false, true); // -(int) ( 3 * Scale.Y );
\r
2958 // #31602 2016.2.11 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
\r
2959 // #31602 2013.6.23 yyagi 描画遅延対策として、判定ラインの表示位置をオフセット調整できるようにする
\r
2960 if (this.txヒットバー != null)
\r
2962 int xStart = (CDTXMania.Instance.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 32 * 3 : 619;
\r
2963 int xEnd = (CDTXMania.Instance.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 335 * 3 : 619 + 682;
\r
2964 for (int x = xStart; x < xEnd; x += 24)
\r
2966 this.txヒットバー.t2D描画(CDTXMania.Instance.Device,
\r
2972 ((x + 24) >= xEnd) ? (int)((23 - ((x + 24) - xEnd))) : 24,
\r
2980 protected void t進行描画_判定文字列()
\r
2982 this.actJudgeString.t進行描画(演奏判定ライン座標);
\r
2984 protected void t進行描画_判定文字列1_通常位置指定の場合()
\r
2986 if (((E判定文字表示位置)CDTXMania.Instance.ConfigIni.判定文字表示位置.Drums) != E判定文字表示位置.コンボ下) // 判定ライン上または横
\r
2988 this.actJudgeString.t進行描画(演奏判定ライン座標);
\r
2991 protected void t進行描画_判定文字列2_判定ライン上指定の場合()
\r
2993 if (((E判定文字表示位置)CDTXMania.Instance.ConfigIni.判定文字表示位置.Drums) == E判定文字表示位置.コンボ下) // 判定ライン上または横
\r
2995 this.actJudgeString.t進行描画(演奏判定ライン座標);
\r
2999 protected void t進行描画_譜面スクロール速度()
\r
3001 this.act譜面スクロール速度.On進行描画();
\r
3004 protected abstract void t背景テクスチャの生成();
\r
3005 protected void t背景テクスチャの生成(string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename)
\r
3006 { // Default...: レーン等があるレイヤー bgfilename: DTXファイルで指定する背景
\r
3007 Bitmap image = null;
\r
3008 bool bSuccessLoadDTXbgfile = false;
\r
3010 int[] offsetX = new int[2] { 96, 506 };
\r
3011 int nLanePosition = (int)CDTXMania.Instance.ConfigIni.eドラムレーン表示位置;
\r
3012 //int nLanePosition = (int) Eドラムレーン表示位置.Left;
\r
3014 if (bgfilename != null && File.Exists(bgfilename) && !CDTXMania.Instance.DTX.bチップがある.Movie)
\r
3018 #region [ DTXデータで指定されている背景画像を読み込む ]
\r
3019 Bitmap bitmap1 = null;
\r
3020 bitmap1 = new Bitmap(bgfilename);
\r
3021 if ((bitmap1.Size.Width == 0) && (bitmap1.Size.Height == 0))
\r
3028 int newWidth = (int)(bitmap1.Width * Scale.X);
\r
3029 int newHeight = (int)(bitmap1.Height * Scale.Y);
\r
3032 #region [ 背景画像がVGAサイズ以下なら、FullHDサイズに拡大する ]
\r
3033 if (bitmap1.Width <= 640 && bitmap1.Height <= 480)
\r
3035 bitmap2 = new Bitmap(newWidth, newHeight);
\r
3036 Graphics graphic2 = Graphics.FromImage(bitmap2);
\r
3037 graphic2.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
\r
3038 graphic2.DrawImage(bitmap1, 0, 0, newWidth, newHeight);
\r
3039 graphic2.Dispose();
\r
3043 bitmap2 = (Bitmap)bitmap1.Clone();
\r
3045 bitmap1.Dispose();
\r
3048 #region [ 実背景に格子状に配置するよう、コピーしていく ]
\r
3049 Bitmap bitmap3 = new Bitmap(SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height);
\r
3050 Graphics graphics3 = Graphics.FromImage(bitmap3);
\r
3051 for (int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height)
\r
3053 for (int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width)
\r
3055 graphics3.DrawImage(bitmap2, j, i, bitmap2.Width, bitmap2.Height);
\r
3058 graphics3.Dispose();
\r
3059 bitmap2.Dispose();
\r
3062 #region [ レーン外・レーンそのもののフレームを合成 ]
\r
3063 image = new Bitmap(CSkin.Path(DefaultBgFilename)); // レーン外のフレーム
\r
3064 graphics3 = Graphics.FromImage(image);
\r
3066 //#region [ レーンのフレームがあれば、それを合成 ]
\r
3067 //if ( DefaultLaneFilename != "" )
\r
3069 // Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
\r
3070 // graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
\r
3071 // bmLane.Dispose();
\r
3075 ColorMatrix matrix2 = new ColorMatrix();
\r
3076 matrix2.Matrix00 = 1f;
\r
3077 matrix2.Matrix11 = 1f;
\r
3078 matrix2.Matrix22 = 1f;
\r
3079 matrix2.Matrix33 = ((float)CDTXMania.Instance.ConfigIni.n背景の透過度) / 255f;
\r
3080 matrix2.Matrix44 = 1f;
\r
3081 ColorMatrix newColorMatrix = matrix2;
\r
3082 ImageAttributes imageAttr = new ImageAttributes();
\r
3083 imageAttr.SetColorMatrix(newColorMatrix);
\r
3084 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
3085 // graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );
\r
3086 bitmap3.Dispose();
\r
3089 imageAttr.Dispose();
\r
3090 graphics3.Dispose();
\r
3091 bSuccessLoadDTXbgfile = true;
\r
3095 Trace.TraceError("背景画像とレーン画像の合成に失敗しました。({0})", bgfilename);
\r
3098 #region [ DTXデータで指定する背景画像を合成しない場合は、レーン画像単体を背景画像とする ]
\r
3099 if (!bSuccessLoadDTXbgfile)
\r
3101 bgfilename = CSkin.Path(DefaultBgFilename);
\r
3104 image = new Bitmap(bgfilename);
\r
3106 if (DefaultLaneFilename != "")
\r
3108 Bitmap bmLane = new Bitmap(CSkin.Path(DefaultLaneFilename));
\r
3109 Graphics g = Graphics.FromImage(image);
\r
3110 g.DrawImage(bmLane, offsetX[nLanePosition], 0);
\r
3117 Trace.TraceError("レーン画像の読み込みに失敗しました。({0})", bgfilename);
\r
3123 #region [ BGA画像を表示する予定がある場合は、背景画像からあらかじめその領域を黒抜きにしておく ]
\r
3124 if ((CDTXMania.Instance.DTX.listBMP.Count > 0) || (CDTXMania.Instance.DTX.listBMPTEX.Count > 0) || CDTXMania.Instance.DTX.listAVI.Count > 0)
\r
3126 Graphics graphics2 = Graphics.FromImage(image);
\r
3127 graphics2.FillRectangle(Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height);
\r
3128 graphics2.Dispose();
\r
3131 #region [ 背景画像をテクスチャにする。背景動画の表示予定がある場合は、更に透明度を付与する。 ]
\r
3134 this.tx背景 = new CTexture(CDTXMania.Instance.Device, image, CDTXMania.Instance.TextureFormat);
\r
3135 if (CDTXMania.Instance.DTX.bMovieをFullscreen再生する) // Fullscreen動画再生が発生する場合は、動画レイヤーに対してレーン+背景レイヤーに透明度を設定する
\r
3137 this.tx背景.n透明度 = 255 - CDTXMania.Instance.ConfigIni.n背景の透過度; // 背景動画用
\r
3140 catch (CTextureCreateFailedException)
\r
3142 Trace.TraceError("背景テクスチャの生成に失敗しました。");
\r
3149 protected virtual void t入力処理_ギター()
\r
3151 t入力処理_ギターベース(E楽器パート.GUITAR);
\r
3153 protected virtual void t入力処理_ベース()
\r
3155 t入力処理_ギターベース(E楽器パート.BASS);
\r
3159 protected virtual void t入力処理_ギターベース(E楽器パート inst)
\r
3161 int indexInst = (int)inst;
\r
3162 #region [ スクロール速度変更 ]
\r
3163 if (CDTXMania.Instance.Pad.b押されている(inst, Eパッド.Decide) && CDTXMania.Instance.Pad.b押された(inst, Eパッド.B))
\r
3165 float f = (float)this.演奏判定ライン座標.nJudgeLinePosY_delta[indexInst] / (CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] + 1);
\r
3166 CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] = Math.Min(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] + 1, 1999);
\r
3167 f *= CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst];
\r
3168 this.演奏判定ライン座標.nJudgeLinePosY_delta[indexInst] = (int)(f + 0.5);
\r
3169 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset[indexInst] = (int)(f + 0.5);
\r
3171 if (CDTXMania.Instance.Pad.b押されている(inst, Eパッド.Decide) && CDTXMania.Instance.Pad.b押された(inst, Eパッド.R))
\r
3173 CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] = Math.Max(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] - 1, 0);
\r
3175 float f = (float)this.演奏判定ライン座標.nJudgeLinePosY_delta[indexInst] / (CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] + 1);
\r
3176 CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] = Math.Max(CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst] - 1, 0);
\r
3177 f *= CDTXMania.Instance.ConfigIni.n譜面スクロール速度[indexInst];
\r
3178 this.演奏判定ライン座標.nJudgeLinePosY_delta[indexInst] = (int)(f + 0.5);
\r
3179 CDTXMania.Instance.ConfigIni.nJudgeLinePosOffset[indexInst] = (int)(f + 0.5);
\r
3183 if (!CDTXMania.Instance.ConfigIni.bGuitar有効 || !CDTXMania.Instance.DTX.bチップがある[indexInst])
\r
3188 int R = (inst == E楽器パート.GUITAR) ? 0 : 3;
\r
3191 bool autoW = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtW : bIsAutoPlay.BsW;
\r
3192 bool autoR = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtR : bIsAutoPlay.BsR;
\r
3193 bool autoG = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtG : bIsAutoPlay.BsG;
\r
3194 bool autoB = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtB : bIsAutoPlay.BsB;
\r
3195 bool autoPick = (inst == E楽器パート.GUITAR) ? bIsAutoPlay.GtPick : bIsAutoPlay.BsPick;
\r
3196 int nAutoW = (autoW) ? 8 : 0;
\r
3197 int nAutoR = (autoR) ? 4 : 0;
\r
3198 int nAutoG = (autoG) ? 2 : 0;
\r
3199 int nAutoB = (autoB) ? 1 : 0;
\r
3200 int nAutoMask = nAutoW | nAutoR | nAutoG | nAutoB;
\r
3202 // if ( bIsAutoPlay[ (int) Eレーン.Guitar - 1 + indexInst ] ) // このような、バグの入りやすい書き方(GT/BSのindex値が他と異なる)はいずれ見直したい
\r
3204 CChip chip = this.r次に来る指定楽器Chipを更新して返す(inst);
\r
3207 if ((chip.bGuitarBass_R) && autoR)
\r
3209 this.actLaneFlushGB.Start(R);
\r
3210 this.actRGB.Push(R);
\r
3212 if ((chip.bGuitarBass_G) && autoG)
\r
3214 this.actLaneFlushGB.Start(G);
\r
3215 this.actRGB.Push(G);
\r
3217 if ((chip.bGuitarBass_B) && autoB)
\r
3219 this.actLaneFlushGB.Start(B);
\r
3220 this.actRGB.Push(B);
\r
3227 int pressingR = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.R) ? 4 : 0;
\r
3228 this.t入力メソッド記憶(inst);
\r
3229 int pressingG = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.G) ? 2 : 0;
\r
3230 this.t入力メソッド記憶(inst);
\r
3231 int pressingB = CDTXMania.Instance.Pad.b押されている(inst, Eパッド.B) ? 1 : 0;
\r
3232 this.t入力メソッド記憶(inst);
\r
3233 int pressingRGB = pressingR | pressingG | pressingB;
\r
3234 if (pressingR != 0)
\r
3236 this.actLaneFlushGB.Start(R);
\r
3237 this.actRGB.Push(R);
\r
3239 if (pressingG != 0)
\r
3241 this.actLaneFlushGB.Start(G);
\r
3242 this.actRGB.Push(G);
\r
3244 if (pressingB != 0)
\r
3246 this.actLaneFlushGB.Start(B);
\r
3247 this.actRGB.Push(B);
\r
3249 // auto pickだとここから先に行かないので注意
\r
3250 List<STInputEvent> events = CDTXMania.Instance.Pad.GetEvents(inst, Eパッド.Pick);
\r
3251 if ((events != null) && (events.Count > 0))
\r
3253 foreach (STInputEvent eventPick in events)
\r
3255 if (!eventPick.b押された)
\r
3259 this.t入力メソッド記憶(inst);
\r
3260 long nTime = eventPick.nTimeStamp - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3261 Ech定義 chWailingSound = (inst == E楽器パート.GUITAR) ? Ech定義.Guitar_WailingSound : Ech定義.Bass_WailingSound;
\r
3262 CChip pChip = this.r指定時刻に一番近い未ヒットChip(nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst]); // E楽器パート.GUITARなチップ全てにヒットする
\r
3263 E判定 e判定 = this.e指定時刻からChipのJUDGEを返す(nTime, pChip, this.nInputAdjustTimeMs[indexInst]);
\r
3264 //Trace.TraceInformation("ch={0:x2}, mask1={1:x1}, mask2={2:x2}", pChip.nチャンネル番号, ( pChip.nチャンネル番号 & ~nAutoMask ) & 0x0F, ( flagRGB & ~nAutoMask) & 0x0F );
\r
3266 (pChip != null) &&
\r
3267 ((((int)pChip.eチャンネル番号 & ~nAutoMask) & 0x0F) == ((pressingRGB & ~nAutoMask) & 0x0F)) &&
\r
3268 (e判定 != E判定.Miss))
\r
3270 bool bChipHasR = pChip.bGuitarBass_R;
\r
3271 bool bChipHasG = pChip.bGuitarBass_G;
\r
3272 bool bChipHasB = pChip.bGuitarBass_B;
\r
3273 bool bChipHasW = pChip.bGuitarBass_Wailing;
\r
3274 bool bChipIsO = pChip.bGuitarBass_Open;
\r
3275 bool bSuccessOPEN = bChipIsO && (autoR || pressingR == 0) && (autoG || pressingG == 0) && (autoB || pressingB == 0);
\r
3276 if ((bChipHasR && (autoR || pressingR != 0)) || bSuccessOPEN)
\r
3277 //if ( ( pushingR != 0 ) || autoR || ( flagRGB == 0 ) )
\r
3279 this.actChipFireGB.Start(R, 演奏判定ライン座標);
\r
3281 if ((bChipHasG && (autoG || pressingG != 0)) || bSuccessOPEN)
\r
3282 //if ( ( pushingG != 0 ) || autoG || ( flagRGB == 0 ) )
\r
3284 this.actChipFireGB.Start(G, 演奏判定ライン座標);
\r
3286 if ((bChipHasB && (autoB || pressingB != 0)) || bSuccessOPEN)
\r
3287 //if ( ( pushingB != 0 ) || autoB || ( flagRGB == 0 ) )
\r
3289 this.actChipFireGB.Start(B, 演奏判定ライン座標);
\r
3291 this.tチップのヒット処理(nTime, pChip);
\r
3292 this.tサウンド再生(pChip, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.Instance.ConfigIni.n手動再生音量, CDTXMania.Instance.ConfigIni.b演奏音を強調する[indexInst], e判定 == E判定.Poor);
\r
3293 Ech定義 chWailingChip = (inst == E楽器パート.GUITAR) ? Ech定義.Guitar_Wailing : Ech定義.Bass_Wailing;
\r
3294 CChip item = this.r指定時刻に一番近い未ヒットChip(nTime, chWailingChip, this.nInputAdjustTimeMs[indexInst], 140);
\r
3297 this.queWailing[indexInst].Enqueue(item);
\r
3302 // 以下、間違いレーンでのピック時
\r
3303 CChip NoChipPicked = (inst == E楽器パート.GUITAR) ? this.r現在の空うちギターChip : this.r現在の空うちベースChip;
\r
3304 if ((NoChipPicked != null) || ((NoChipPicked = this.r指定時刻に一番近いChip_ヒット未済問わず不可視考慮(nTime, chWailingSound, this.nInputAdjustTimeMs[indexInst])) != null))
\r
3306 this.tサウンド再生(NoChipPicked, CSound管理.rc演奏用タイマ.nシステム時刻, inst, CDTXMania.Instance.ConfigIni.n手動再生音量, CDTXMania.Instance.ConfigIni.b演奏音を強調する[indexInst], true);
\r
3308 if (!CDTXMania.Instance.ConfigIni.bLight[indexInst])
\r
3310 this.tチップのヒット処理_BadならびにTight時のMiss(inst);
\r
3314 List<STInputEvent> list = CDTXMania.Instance.Pad.GetEvents(inst, Eパッド.Wail);
\r
3315 if ((list != null) && (list.Count > 0))
\r
3317 foreach (STInputEvent eventWailed in list)
\r
3319 if (!eventWailed.b押された)
\r
3323 DoWailingFromQueue(inst, eventWailed.nTimeStamp, autoW);
\r
3329 private void DoWailingFromQueue(E楽器パート inst, long nTimeStamp_Wailed, bool autoW)
\r
3331 int indexInst = (int)inst;
\r
3332 long nTimeWailed = nTimeStamp_Wailed - CSound管理.rc演奏用タイマ.n前回リセットした時のシステム時刻;
\r
3333 CChip chipWailing;
\r
3334 while ((this.queWailing[indexInst].Count > 0) && ((chipWailing = this.queWailing[indexInst].Dequeue()) != null))
\r
3336 if ((nTimeWailed - chipWailing.n発声時刻ms) <= 1000) // #24245 2011.1.26 yyagi: 800 -> 1000
\r
3338 chipWailing.bHit = true;
\r
3339 this.actWailingBonus.Start(inst, this.r現在の歓声Chip[indexInst]);
\r
3340 //if ( !bIsAutoPlay[indexInst] )
\r
3343 int nCombo = (this.actCombo.n現在のコンボ数[indexInst] < 500) ? this.actCombo.n現在のコンボ数[indexInst] : 500;
\r
3344 this.actScore.Add(inst, bIsAutoPlay, nCombo * 3000L); // #24245 2011.1.26 yyagi changed DRUMS->BASS, add nCombo conditions
\r