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 313 - (show annotations) (download)
Tue Feb 11 13:19:05 2014 UTC (10 years, 1 month ago) by ron1120
File size: 15475 byte(s)
#xxxxx 選曲、スキルメーター、リザルトのプログラムの見直し。
#xxxxx ゲージの描写方法の変更とそれに伴う画像の変更。
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 if (this.ctランク表示.n現在の値 >= 500)
191 {
192 double num2 = ( (double) ( this.ctランク表示.n現在の値 - 500 ) ) / 500.0;
193 for (int j = 0; j < 3; j++)
194 {
195 if (this.txランク文字[j] != null && this.n本体X[j] != 0)
196 {
197 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));
198 }
199 }
200 }
201
202 #region [ フルコンボ ]
203 for (int j = 0; j < 3; j++)
204 {
205
206 if (this.ct表示用.n現在の値 >= 900)
207 {
208 int num14 = 82 + this.n本体X[j];
209 int num15 = 152 + this.n本体Y[j];
210
211 if (this.n本体X[j] != 0)
212 {
213 if (CDTXMania.stage結果.st演奏記録[j].nPerfect == CDTXMania.stage結果.st演奏記録[j].n全チップ数)
214 {
215 if (this.ct表示用.b終了値に達した)
216 {
217 if (this.txExcellent != null)
218 {
219 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
220 }
221 if (!this.bエクセレント音再生済み)
222 {
223 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
224 {
225 try
226 {
227 if (this.sdDTXで指定されたフルコンボ音 != null)
228 {
229 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
230 this.sdDTXで指定されたフルコンボ音 = null;
231 }
232 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
233 if (this.sdDTXで指定されたフルコンボ音 != null)
234 {
235 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
236 }
237 }
238 catch
239 {
240 }
241 }
242 else
243 {
244 CDTXMania.Skin.soundエクセレント音.t再生する();
245 }
246 this.bエクセレント音再生済み = true;
247 }
248 }
249 else
250 {
251 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
252 float num13 = (float)(1.1 - 0.1);
253 if (this.txExcellent != null)
254 {
255 this.txExcellent.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
256 this.txExcellent.n透明度 = (int)(255.0 * num12);
257 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
258 }
259 }
260 }
261 else if (CDTXMania.stage結果.st演奏記録[j].bフルコンボである && CDTXMania.stage結果.st演奏記録[j].nPerfect != CDTXMania.stage結果.st演奏記録[j].n全チップ数)
262 {
263 if (this.ct表示用.b終了値に達した)
264 {
265 if (this.txFullCombo != null)
266 {
267 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
268 }
269 if (!this.bフルコンボ音再生済み)
270 {
271 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
272 {
273 try
274 {
275 if (this.sdDTXで指定されたフルコンボ音 != null)
276 {
277 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
278 this.sdDTXで指定されたフルコンボ音 = null;
279 }
280 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
281 if (this.sdDTXで指定されたフルコンボ音 != null)
282 {
283 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
284 }
285 }
286 catch
287 {
288 }
289 }
290 else
291 {
292 CDTXMania.Skin.soundフルコンボ音.t再生する();
293 }
294 this.bフルコンボ音再生済み = true;
295 }
296 }
297 else
298 {
299 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
300 float num13 = (float)(1.1 - 0.1);
301 if (this.txFullCombo != null)
302 {
303 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
304 this.txFullCombo.n透明度 = (int)(255.0 * num12);
305 num14 = this.n本体X[j] + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
306 num15 = this.n本体Y[j] + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
307
308 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
309 }
310 }
311 }
312 }
313 }
314 }
315 #endregion
316
317 if( !this.ctランク表示.b終了値に達した )
318 {
319 return 0;
320 }
321 return 1;
322 }
323
324
325 // その他
326
327 #region [ private ]
328 //-----------------
329 private bool bフルコンボ音再生済み;
330 private bool bエクセレント音再生済み;
331 private CCounter ctランク表示;
332 private CCounter ct表示用;
333 private STDGBVALUE<int> n本体X;
334 private STDGBVALUE<int> n本体Y;
335 private STDGBVALUE<bool> b全オ;
336 private CSound sdDTXで指定されたフルコンボ音;
337 private STDGBVALUE<CTexture> txランク文字;
338 private CTexture txExcellent;
339 private CTexture txFullCombo;
340 //-----------------
341 #endregion
342
343 }
344 }

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