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

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