Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultRank.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (show annotations) (download)
Thu Jan 16 06:49:50 2014 UTC (10 years, 2 months ago) by ron1120
File size: 20493 byte(s)
#31082 エクセレント、フルコンボの判定がドラムの値になってしまうため、ギター画面でのエクセレント、フルコンボを表示しないように変更。
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Drawing;
5 using System.IO;
6 using SlimDX;
7 using FDK;
8
9 namespace DTXMania
10 {
11 internal class CActResultRank : CActivity
12 {
13
14 // コンストラクタ
15
16 public CActResultRank()
17 {
18 base.b活性化してない = true;
19 }
20
21 // メソッド
22
23 public void tアニメを完了させる()
24 {
25 this.ctランク表示.n現在の値 = this.ctランク表示.n終了値;
26 this.ct表示用.n現在の値 = this.ct表示用.n終了値;
27 }
28
29 // CActivity 実装
30
31 public override void On活性化()
32 {
33
34 #region [ 本体位置 ]
35
36 int nX = 138;
37 int nY = 8;
38
39 int nX = 850;
40 int nY = 420;
41
42 this.n本体1X = 0;
43 this.n本体1Y = 0;
44
45 this.n本体2X = 0;
46 this.n本体2Y = 0;
47
48 if (CDTXMania.ConfigIni.bDrums有効)
49 {
50 this.n本体1X = nX;
51 this.n本体1Y = nY;
52 }
53 else if (CDTXMania.ConfigIni.bGuitar有効)
54 {
55 if (CDTXMania.DTX.bチップがある.Guitar)
56 {
57 if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
58 {
59 this.n本体1X = nX;
60 this.n本体1Y = nY;
61 }
62 else
63 {
64 this.n本体1X = nX;
65 this.n本体1Y = nY;
66 }
67 }
68
69 if (CDTXMania.DTX.bチップがある.Bass)
70 {
71 if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
72 {
73 this.n本体2X = nX;
74 this.n本体2Y = nY;
75 }
76 else
77 {
78 this.n本体2X = nX;
79 this.n本体2Y = nY;
80 }
81 }
82
83 }
84 #endregion
85
86 this.sdDTXで指定されたフルコンボ音 = null;
87 this.bフルコンボ音再生済み = false;
88 this.bエクセレント音再生済み = false;
89 base.On活性化();
90 }
91 public override void On非活性化()
92 {
93 if( this.ctランク表示 != null )
94 {
95 this.ctランク表示 = null;
96 }
97 if (this.ct表示用 != null)
98 {
99 this.ct表示用 = null;
100 }
101 if (this.sdDTXで指定されたフルコンボ音 != null)
102 {
103 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
104 this.sdDTXで指定されたフルコンボ音 = null;
105 }
106 base.On非活性化();
107 }
108 public override void OnManagedリソスの作成()
109 {
110 if( !base.b活性化してない )
111 {
112
113 this.txFullCombo = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult fullcombo.png"));
114 this.txExcellent = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult Excellent.png"));
115
116 if (CDTXMania.ConfigIni.bDrums有効)
117 {
118 switch (CDTXMania.stage結果.n総合ランク値)
119 {
120 case 0:
121 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
122 break;
123
124 case 1:
125 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
126 break;
127
128 case 2:
129 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
130 break;
131
132 case 3:
133 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
134 break;
135
136 case 4:
137 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
138 break;
139
140 case 5:
141 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
142 break;
143
144 case 6:
145 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
146 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
147 break;
148
149 default:
150 this.txランク文字1P = null;
151 break;
152 }
153 }
154 else if( CDTXMania.ConfigIni.bGuitar有効 )
155 {
156 switch( CDTXMania.stage結果.nランク値.Guitar )
157 {
158 case 0:
159 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
160 break;
161
162 case 1:
163 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
164 break;
165
166 case 2:
167 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
168 break;
169
170 case 3:
171 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
172 break;
173
174 case 4:
175 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
176 break;
177
178 case 5:
179 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
180 break;
181
182 case 6:
183 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
184 this.txランク文字1P = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_rankE.png" ) );
185 if( CDTXMania.ConfigIni.bギタが全部オトプレイである )
186 this.txランク文字1P = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_rankSS.png" ) );
187 break;
188
189 default:
190 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
191 break;
192 }
193 switch (CDTXMania.stage結果.nランク値.Bass)
194 {
195 case 0:
196 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
197 break;
198
199 case 1:
200 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
201 break;
202
203 case 2:
204 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
205 break;
206
207 case 3:
208 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
209 break;
210
211 case 4:
212 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
213 break;
214
215 case 5:
216 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
217 break;
218
219 case 6:
220 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
221 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
222 if (CDTXMania.ConfigIni.bスが全部オトプレイである)
223 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
224 break;
225
226 default:
227 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
228 break;
229 }
230 }
231 base.OnManagedリソスの作成();
232 }
233 }
234 public override void OnManagedリソスの解放()
235 {
236 if( !base.b活性化してない )
237 {
238 CDTXMania.tテクスチャの解放(ref this.txFullCombo);
239 CDTXMania.tテクスチャの解放(ref this.txExcellent);
240 CDTXMania.tテクスチャの解放(ref this.txランク文字1P);
241 CDTXMania.tテクスチャの解放( ref this.txランク文字2P );
242 base.OnManagedリソスの解放();
243 }
244 }
245 public override int On進行描画()
246 {
247 if( base.b活性化してない )
248 {
249 return 0;
250 }
251 if( base.b初めての進行描画 )
252 {
253 this.ctランク表示 = new CCounter(0, 0x3e8, 2, CDTXMania.Timer);
254 this.ct表示用 = new CCounter(0, 1000, 3, CDTXMania.Timer);
255 base.b初めての進行描画 = false;
256 }
257 this.ctランク表示.t進行();
258 this.ct表示用.t進行();
259 if (this.ctランク表示.n現在の値 >= 500)
260 {
261 double num2 = ( (double) ( this.ctランク表示.n現在の値 - 500 ) ) / 500.0;
262 if ( this.txランク文字1P != null && this.n本体1Y != 0 )
263 {
264 this.txランク文字1P.t2D描画(CDTXMania.app.Device, this.n本体1X, this.n本体1Y, new Rectangle(0, 0, (int)((double)txランク文字1P.sz画像サイズ.Width * num2), this.txランク文字1P.sz画像サイズ.Height));
265 }
266 if ( this.txランク文字2P != null && this.n本体2Y != 0 )
267 {
268 this.txランク文字2P.t2D描画(CDTXMania.app.Device, this.n本体2X, this.n本体2Y, new Rectangle(0, 0, (int)((double)txランク文字1P.sz画像サイズ.Width * num2), this.txランク文字1P.sz画像サイズ.Height));
269 }
270 }
271
272 #region [ フルコンボ ]
273 if (this.ct表示用.n現在の値 >= 900)
274 {
275
276 for (int j = 0; j < 1; j++)
277 {
278
279 if (j == 2)
280 {
281 this.n本体X = this.n本体2X;
282 this.n本体Y = this.n本体2Y;
283 }
284 else
285 {
286 this.n本体X = this.n本体1X;
287 this.n本体Y = this.n本体1Y;
288 }
289
290 int num14 = 82 + this.n本体X;
291 int num15 = 152 + this.n本体Y;
292
293 if (this.n本体X != 0 && CDTXMania.ConfigIni.bDrums有効)
294 {
295 if (CDTXMania.stage結果.st演奏記録[0].nPerfect == CDTXMania.stage結果.st演奏記録[0].n全チップ数)
296 {
297 if (this.ct表示用.b終了値に達した)
298 {
299 if (this.txExcellent != null)
300 {
301 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
302 }
303 if (!this.bエクセレント音再生済み)
304 {
305 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
306 {
307 try
308 {
309 if (this.sdDTXで指定されたフルコンボ音 != null)
310 {
311 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
312 this.sdDTXで指定されたフルコンボ音 = null;
313 }
314 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
315 if (this.sdDTXで指定されたフルコンボ音 != null)
316 {
317 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
318 }
319 }
320 catch
321 {
322 }
323 }
324 else
325 {
326 CDTXMania.Skin.soundエクセレント音.t再生する();
327 }
328 this.bエクセレント音再生済み = true;
329 }
330 }
331 else
332 {
333 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
334 float num13 = (float)(1.1 - 0.1);
335 if (this.txExcellent != null)
336 {
337 this.txExcellent.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
338 this.txExcellent.n透明度 = (int)(255.0 * num12);
339 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
340 }
341 }
342 if (this.ct表示用.b終了値に達した)
343 {
344
345 }
346 }
347 else if (CDTXMania.stage結果.st演奏記録[j].bフルコンボである && CDTXMania.stage結果.st演奏記録[0].nPerfect != CDTXMania.stage結果.st演奏記録[0].n全チップ数)
348 {
349 if (this.ct表示用.b終了値に達した)
350 {
351 if (this.txFullCombo != null)
352 {
353 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
354 }
355 if (!this.bフルコンボ音再生済み)
356 {
357 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
358 {
359 try
360 {
361 if (this.sdDTXで指定されたフルコンボ音 != null)
362 {
363 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
364 this.sdDTXで指定されたフルコンボ音 = null;
365 }
366 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
367 if (this.sdDTXで指定されたフルコンボ音 != null)
368 {
369 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
370 }
371 }
372 catch
373 {
374 }
375 }
376 else
377 {
378 CDTXMania.Skin.soundフルコンボ音.t再生する();
379 }
380 this.bフルコンボ音再生済み = true;
381 }
382 }
383 else
384 {
385 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
386 float num13 = (float)(1.1 - 0.1);
387 if (this.txFullCombo != null)
388 {
389 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
390 this.txFullCombo.n透明度 = (int)(255.0 * num12);
391 if (CDTXMania.ConfigIni.eNamePlate.Drums >= Eタイプ.C)
392 {
393 num14 = 650;
394 num15 = 526;
395 }
396 else
397 {
398 num14 = this.n本体X + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
399 num15 = this.n本体Y + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
400 }
401 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
402 }
403 }
404 }
405 }
406
407 }
408
409 }
410 #endregion
411
412 if( !this.ctランク表示.b終了値に達した )
413 {
414 return 0;
415 }
416 return 1;
417 }
418
419
420 // その他
421
422 #region [ private ]
423 //-----------------
424 private bool bフルコンボ音再生済み;
425 private bool bエクセレント音再生済み;
426 private CCounter ctランク表示;
427 private CCounter ct表示用;
428 private int n本体X;
429 private int n本体Y;
430 private int n本体1X;
431 private int n本体1Y;
432 private int n本体2X;
433 private int n本体2Y;
434 private CTexture txランク文字1P;
435 private CTexture txランク文字2P;
436 private CSound sdDTXで指定されたフルコンボ音;
437 private CTexture txExcellent;
438 private CTexture txFullCombo;
439 //-----------------
440 #endregion
441 }
442 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26