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 321 - (show annotations) (download)
Thu Feb 13 13:41:38 2014 UTC (10 years, 1 month ago) by kairera0467
File size: 16429 byte(s)
#xxxxx リザルトでFCマークが一瞬だけズレて表示されるバグを今度こそ修正。
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本体X[0] = 0;
43 this.n本体Y[0] = 0;
44
45 this.n本体X[1] = 0;
46 this.n本体Y[1] = 0;
47
48 this.n本体X[2] = 0;
49 this.n本体Y[2] = 0;
50
51 if (CDTXMania.ConfigIni.bDrums有効)
52 {
53 this.n本体X[0] = nX;
54 this.n本体Y[0] = 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本体X[1] = nX;
63 this.n本体Y[1] = nY;
64 }
65 else
66 {
67 this.n本体X[1] = nX;
68 this.n本体Y[1] = nY;
69 }
70 }
71
72 if (CDTXMania.DTX.bチップがある.Bass)
73 {
74 if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
75 {
76 this.n本体X[2] = nX;
77 this.n本体Y[2] = nY;
78 }
79 else
80 {
81 this.n本体X[2] = nX;
82 this.n本体Y[2] = nY;
83 }
84 }
85
86 }
87 #endregion
88
89 this.b全オ.Drums = CDTXMania.ConfigIni.bドラムが全部オトプレイである;
90 this.b全オ.Guitar = CDTXMania.ConfigIni.bギタが全部オトプレイである;
91 this.b全オ.Bass = CDTXMania.ConfigIni.bスが全部オトプレイである;
92
93 this.sdDTXで指定されたフルコンボ音 = null;
94 this.bフルコンボ音再生済み = false;
95 this.bエクセレント音再生済み = false;
96 base.On活性化();
97 }
98 public override void On非活性化()
99 {
100 if( this.ctランク表示 != null )
101 {
102 this.ctランク表示 = null;
103 }
104 if (this.ct表示用 != null)
105 {
106 this.ct表示用 = null;
107 }
108 if (this.sdDTXで指定されたフルコンボ音 != null)
109 {
110 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
111 this.sdDTXで指定されたフルコンボ音 = null;
112 }
113 base.On非活性化();
114 }
115 public override void OnManagedリソスの作成()
116 {
117 if( !base.b活性化してない )
118 {
119
120 this.txFullCombo = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult fullcombo.png"));
121 this.txExcellent = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult Excellent.png"));
122
123 for (int j = 0; j < 3; j++)
124 {
125 switch (CDTXMania.stage結果.nランク値[j])
126 {
127 case 0:
128 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
129 break;
130
131 case 1:
132 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
133 break;
134
135 case 2:
136 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
137 break;
138
139 case 3:
140 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
141 break;
142
143 case 4:
144 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
145 break;
146
147 case 5:
148 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
149 break;
150
151 case 6:
152 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
153 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
154 if (this.b全オ[j])
155 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
156 break;
157
158 default:
159 this.txランク文字[j] = null;
160 break;
161 }
162 }
163 base.OnManagedリソスの作成();
164 }
165 }
166 public override void OnManagedリソスの解放()
167 {
168 if( !base.b活性化してない )
169 {
170 CDTXMania.tテクスチャの解放( ref this.txFullCombo );
171 CDTXMania.tテクスチャの解放( ref this.txExcellent );
172 CDTXMania.t安全にDisposeする( ref this.txランク文字 );
173 base.OnManagedリソスの解放();
174 }
175 }
176 public override int On進行描画()
177 {
178 if( base.b活性化してない )
179 {
180 return 0;
181 }
182 if( base.b初めての進行描画 )
183 {
184 this.ctランク表示 = new CCounter(0, 0x3e8, 2, CDTXMania.Timer);
185 this.ct表示用 = new CCounter(0, 1000, 3, CDTXMania.Timer);
186 base.b初めての進行描画 = false;
187 }
188 this.ctランク表示.t進行();
189 this.ct表示用.t進行();
190
191 if ((CDTXMania.Input管理.Keyboard.bが押されている(0x3c)))
192 {
193 //F7
194 //CDTXMania.stage演奏ドラム画面.actGauge.db現在のゲージ値.Drums = 1.0;
195 //CDTXMania.stage演奏ドラム画面.actAVI.LivePoint = 300.0;
196 //CDTXMania.stage演奏ドラム画面.actGraph.dbグラフ値現在_渡 = 100.0;
197 //CDTXMania.ConfigIni.nヒット範囲ms.Perfect = 1000;
198 this.ct表示用.n現在の値 = 0;
199
200 //CDTXMania.stage結果.st演奏記録.Drums.db演奏型スキル値 = 80.0;
201 }
202
203 if (this.ctランク表示.n現在の値 >= 500)
204 {
205 double num2 = ( (double) ( this.ctランク表示.n現在の値 - 500 ) ) / 500.0;
206 for (int j = 0; j < 3; j++)
207 {
208 if (this.txランク文字[j] != null && this.n本体X[j] != 0)
209 {
210 this.txランク文字[j].t2D描画(CDTXMania.app.Device, this.n本体X[j], this.n本体Y[j], new Rectangle(0, 0, (int)((double)txランク文字[j].sz画像サイズ.Width * num2), this.txランク文字[j].sz画像サイズ.Height));
211 }
212 }
213 }
214
215 #region [ フルコンボ ]
216 for (int j = 0; j < 3; j++)
217 {
218 int num14 = 82 + this.n本体X[j];
219 int num15 = 152 + this.n本体Y[j];
220 if (this.ct表示用.n現在の値 >= 0)
221 {
222 if (this.n本体X[j] != 0)
223 {
224 if (CDTXMania.stage結果.st演奏記録[j].nPerfect == CDTXMania.stage結果.st演奏記録[j].n全チップ数)
225 {
226 if (this.ct表示用.b終了値に達した)
227 {
228 if (this.txExcellent != null)
229 {
230 if( this.ct表示用.n現在の値 >= 900 )
231 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
232 }
233 if (!this.bエクセレント音再生済み)
234 {
235 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
236 {
237 try
238 {
239 if (this.sdDTXで指定されたフルコンボ音 != null)
240 {
241 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
242 this.sdDTXで指定されたフルコンボ音 = null;
243 }
244 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
245 if (this.sdDTXで指定されたフルコンボ音 != null)
246 {
247 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
248 }
249 }
250 catch
251 {
252 }
253 }
254 else
255 {
256 CDTXMania.Skin.soundエクセレント音.t再生する();
257 }
258 this.bエクセレント音再生済み = true;
259 }
260 }
261 else
262 {
263 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
264 float num13 = (float)(1.1 - 0.1);
265 if (this.txExcellent != null)
266 {
267 this.txExcellent.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
268 this.txExcellent.n透明度 = (int)(255.0 * num12);
269 if( this.ct表示用.n現在の値 >= 900 )
270 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
271 }
272 }
273 }
274 else if (CDTXMania.stage結果.st演奏記録[j].bフルコンボである && CDTXMania.stage結果.st演奏記録[j].nPerfect != CDTXMania.stage結果.st演奏記録[j].n全チップ数)
275 {
276 if (this.ct表示用.b終了値に達した)
277 {
278 if (this.txFullCombo != null)
279 {
280 if( this.ct表示用.n現在の値 >= 900 )
281 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
282 }
283 if (!this.bフルコンボ音再生済み)
284 {
285 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
286 {
287 try
288 {
289 if (this.sdDTXで指定されたフルコンボ音 != null)
290 {
291 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
292 this.sdDTXで指定されたフルコンボ音 = null;
293 }
294 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
295 if (this.sdDTXで指定されたフルコンボ音 != null)
296 {
297 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
298 }
299 }
300 catch
301 {
302 }
303 }
304 else
305 {
306 CDTXMania.Skin.soundフルコンボ音.t再生する();
307 }
308 this.bフルコンボ音再生済み = true;
309 }
310 }
311 else
312 {
313 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
314 float num13 = (float)(1.1 - 0.1);
315 //num14 = this.n本体X[j] + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
316 //num15 = this.n本体Y[j] + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
317 if (this.txFullCombo != null)
318 {
319 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
320 this.txFullCombo.n透明度 = (int)(255.0 * num12);
321
322 if( this.ct表示用.n現在の値 >= 900 )
323 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
324 }
325 }
326 }
327 }
328 }
329 }
330 #endregion
331
332 if( !this.ctランク表示.b終了値に達した )
333 {
334 return 0;
335 }
336 return 1;
337 }
338
339
340 // その他
341
342 #region [ private ]
343 //-----------------
344 private bool bフルコンボ音再生済み;
345 private bool bエクセレント音再生済み;
346 private CCounter ctランク表示;
347 private CCounter ct表示用;
348 private STDGBVALUE<int> n本体X;
349 private STDGBVALUE<int> n本体Y;
350 private STDGBVALUE<bool> b全オ;
351 private CSound sdDTXで指定されたフルコンボ音;
352 private STDGBVALUE<CTexture> txランク文字;
353 private CTexture txExcellent;
354 private CTexture txFullCombo;
355 //-----------------
356 #endregion
357
358 }
359 }

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