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 290 - (show annotations) (download)
Thu Jan 30 03:21:20 2014 UTC (10 years, 2 months ago) by kairera0467
File size: 20566 byte(s)
#xxxxx ギターベースのHID/SUDアニメーションの実装。
#xxxxx ベース側のウェイリングマークがリバース時に正しい位置に来ないまま処理されていたのを少し改善。
#xxxxx ベースR、Gのレーンフラッシュ座標の修正。
#xxxxx 構造のミスで一瞬だけFC、EXCマークが変な位置に描画されるバグの修正。
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 for (int j = 0; j < 3; j++)
295 {
296
297 if (this.ct表示用.n現在の値 >= 900)
298 {
299 int num14 = 82 + x[j];
300 int num15 = 152 + y[j];
301
302 if ( x[j] != 0 )
303 {
304 if (CDTXMania.stage結果.st演奏記録[j].nPerfect == CDTXMania.stage結果.st演奏記録[j].n全チップ数)
305 {
306 if (this.ct表示用.b終了値に達した)
307 {
308 if (this.txExcellent != null)
309 {
310 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
311 }
312 if (!this.bエクセレント音再生済み)
313 {
314 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
315 {
316 try
317 {
318 if (this.sdDTXで指定されたフルコンボ音 != null)
319 {
320 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
321 this.sdDTXで指定されたフルコンボ音 = null;
322 }
323 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
324 if (this.sdDTXで指定されたフルコンボ音 != null)
325 {
326 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
327 }
328 }
329 catch
330 {
331 }
332 }
333 else
334 {
335 CDTXMania.Skin.soundエクセレント音.t再生する();
336 }
337 this.bエクセレント音再生済み = true;
338 }
339 }
340 else
341 {
342 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
343 float num13 = (float)(1.1 - 0.1);
344 if (this.txExcellent != null)
345 {
346 this.txExcellent.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
347 this.txExcellent.n透明度 = (int)(255.0 * num12);
348 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
349 }
350 }
351 }
352 else if (CDTXMania.stage結果.st演奏記録[j].bフルコンボである && CDTXMania.stage結果.st演奏記録[j].nPerfect != CDTXMania.stage結果.st演奏記録[j].n全チップ数)
353 {
354 if (this.ct表示用.b終了値に達した)
355 {
356 if (this.txFullCombo != null)
357 {
358 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
359 }
360 if (!this.bフルコンボ音再生済み)
361 {
362 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
363 {
364 try
365 {
366 if (this.sdDTXで指定されたフルコンボ音 != null)
367 {
368 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
369 this.sdDTXで指定されたフルコンボ音 = null;
370 }
371 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
372 if (this.sdDTXで指定されたフルコンボ音 != null)
373 {
374 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
375 }
376 }
377 catch
378 {
379 }
380 }
381 else
382 {
383 CDTXMania.Skin.soundフルコンボ音.t再生する();
384 }
385 this.bフルコンボ音再生済み = true;
386 }
387 }
388 else
389 {
390 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
391 float num13 = (float)(1.1 - 0.1);
392 if (this.txFullCombo != null)
393 {
394 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
395 this.txFullCombo.n透明度 = (int)(255.0 * num12);
396 num14 = x[j] + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
397 num15 = y[j] + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
398
399 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
400 }
401 }
402 }
403 }
404 }
405 }
406 #endregion
407
408 if( !this.ctランク表示.b終了値に達した )
409 {
410 return 0;
411 }
412 return 1;
413 }
414
415
416 // その他
417
418 #region [ private ]
419 //-----------------
420 private bool bフルコンボ音再生済み;
421 private bool bエクセレント音再生済み;
422 private CCounter ctランク表示;
423 private CCounter ct表示用;
424 private int n本体0X;
425 private int n本体0Y;
426 private int n本体1X;
427 private int n本体1Y;
428 private int n本体2X;
429 private int n本体2Y;
430 private CTexture txランク文字0P;
431 private CTexture txランク文字1P;
432 private CTexture txランク文字2P;
433 private CSound sdDTXで指定されたフルコンボ音;
434 private CTexture txExcellent;
435 private CTexture txFullCombo;
436 //-----------------
437 #endregion
438
439 }
440 }

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