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 581 - (show annotations) (download)
Sun May 24 05:50:14 2020 UTC (3 years, 10 months ago) by kairera0467
File size: 16693 byte(s)
#35379 ジャケット画像の描画でtxTumbnailを使用しないよう変更
#35379 前回の修正で発生した不具合を修正
#35379 ランクEまたはオート演奏した場合、リザルトのランク画像でメモリリークが発生していたのを修正
#xxxxx バージョンの変更
#xxxxx DTXMania rev:2033adeeee1e46267cf36b50919c9ecee8804076の変更を取り込み
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 if (this.b全オ[j])
154 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
155 else // 2020.5.20 kairera0467 解放漏れ修正
156 this.txランク文字[j] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
157 break;
158
159 default:
160 this.txランク文字[j] = null;
161 break;
162 }
163 }
164 base.OnManagedリソスの作成();
165 }
166 }
167 public override void OnManagedリソスの解放()
168 {
169 if( !base.b活性化してない )
170 {
171 CDTXMania.tテクスチャの解放( ref this.txFullCombo );
172 CDTXMania.tテクスチャの解放( ref this.txExcellent );
173 CDTXMania.t安全にDisposeする( ref this.txランク文字.Drums );
174 CDTXMania.t安全にDisposeする( ref this.txランク文字.Guitar );
175 CDTXMania.t安全にDisposeする( ref this.txランク文字.Bass );
176 base.OnManagedリソスの解放();
177 }
178 }
179 public override int On進行描画()
180 {
181 if( base.b活性化してない )
182 {
183 return 0;
184 }
185 if( base.b初めての進行描画 )
186 {
187 this.ctランク表示 = new CCounter(0, 0x3e8, 2, CDTXMania.Timer);
188 this.ct表示用 = new CCounter(0, 1000, 3, CDTXMania.Timer);
189 base.b初めての進行描画 = false;
190 }
191 this.ctランク表示.t進行();
192 this.ct表示用.t進行();
193
194 if ((CDTXMania.Input管理.Keyboard.bが押されている(0x3c)))
195 {
196 //F7
197 //CDTXMania.stage演奏ドラム画面.actGauge.db現在のゲージ値.Drums = 1.0;
198 //CDTXMania.stage演奏ドラム画面.actAVI.LivePoint = 300.0;
199 //CDTXMania.stage演奏ドラム画面.actGraph.dbグラフ値現在_渡 = 100.0;
200 //CDTXMania.ConfigIni.nヒット範囲ms.Perfect = 1000;
201 this.ct表示用.n現在の値 = 0;
202
203 //CDTXMania.stage結果.st演奏記録.Drums.db演奏型スキル値 = 80.0;
204 }
205
206 if (this.ctランク表示.n現在の値 >= 500)
207 {
208 double num2 = ( (double) ( this.ctランク表示.n現在の値 - 500 ) ) / 500.0;
209 for (int j = 0; j < 3; j++)
210 {
211 if (this.txランク文字[j] != null && this.n本体X[j] != 0)
212 {
213 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));
214 }
215 }
216 }
217
218 #region [ フルコンボ ]
219 for (int j = 0; j < 3; j++)
220 {
221 int num14 = 82 + this.n本体X[j];
222 int num15 = 152 + this.n本体Y[j];
223 if (this.ct表示用.n現在の値 >= 0)
224 {
225 if (this.n本体X[j] != 0)
226 {
227 if (CDTXMania.stage結果.st演奏記録[j].nPerfect == CDTXMania.stage結果.st演奏記録[j].n全チップ数)
228 {
229 if (this.ct表示用.b終了値に達した)
230 {
231 if (this.txExcellent != null)
232 {
233 if( this.ct表示用.n現在の値 >= 900 )
234 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
235 }
236 if (!this.bエクセレント音再生済み)
237 {
238 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
239 {
240 try
241 {
242 if (this.sdDTXで指定されたフルコンボ音 != null)
243 {
244 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
245 this.sdDTXで指定されたフルコンボ音 = null;
246 }
247 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
248 if (this.sdDTXで指定されたフルコンボ音 != null)
249 {
250 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
251 }
252 }
253 catch
254 {
255 }
256 }
257 else
258 {
259 CDTXMania.Skin.soundエクセレント音.t再生する();
260 }
261 this.bエクセレント音再生済み = true;
262 }
263 }
264 else
265 {
266 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
267 float num13 = (float)(1.1 - 0.1);
268 if (this.txExcellent != null)
269 {
270 this.txExcellent.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
271 this.txExcellent.n透明度 = (int)(255.0 * num12);
272 if( this.ct表示用.n現在の値 >= 900 )
273 this.txExcellent.t2D描画(CDTXMania.app.Device, num14, num15);
274 }
275 }
276 }
277 else if (CDTXMania.stage結果.st演奏記録[j].bフルコンボである && CDTXMania.stage結果.st演奏記録[j].nPerfect != CDTXMania.stage結果.st演奏記録[j].n全チップ数)
278 {
279 if (this.ct表示用.b終了値に達した)
280 {
281 if (this.txFullCombo != null)
282 {
283 if( this.ct表示用.n現在の値 >= 900 )
284 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
285 }
286 if (!this.bフルコンボ音再生済み)
287 {
288 if (((CDTXMania.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO))
289 {
290 try
291 {
292 if (this.sdDTXで指定されたフルコンボ音 != null)
293 {
294 CDTXMania.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
295 this.sdDTXで指定されたフルコンボ音 = null;
296 }
297 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Sound管理.tサウンドを生成する(CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.SOUND_FULLCOMBO);
298 if (this.sdDTXで指定されたフルコンボ音 != null)
299 {
300 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
301 }
302 }
303 catch
304 {
305 }
306 }
307 else
308 {
309 CDTXMania.Skin.soundフルコンボ音.t再生する();
310 }
311 this.bフルコンボ音再生済み = true;
312 }
313 }
314 else
315 {
316 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
317 float num13 = (float)(1.1 - 0.1);
318 //num14 = this.n本体X[j] + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
319 //num15 = this.n本体Y[j] + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
320 if (this.txFullCombo != null)
321 {
322 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
323 this.txFullCombo.n透明度 = (int)(255.0 * num12);
324
325 if( this.ct表示用.n現在の値 >= 900 )
326 this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15);
327 }
328 }
329 }
330 }
331 }
332 }
333 #endregion
334
335 if( !this.ctランク表示.b終了値に達した )
336 {
337 return 0;
338 }
339 return 1;
340 }
341
342
343 // その他
344
345 #region [ private ]
346 //-----------------
347 private bool bフルコンボ音再生済み;
348 private bool bエクセレント音再生済み;
349 private CCounter ctランク表示;
350 private CCounter ct表示用;
351 private STDGBVALUE<int> n本体X;
352 private STDGBVALUE<int> n本体Y;
353 private STDGBVALUE<bool> b全オ;
354 private CSound sdDTXで指定されたフルコンボ音;
355 private STDGBVALUE<CTexture> txランク文字;
356 private CTexture txExcellent;
357 private CTexture txFullCombo;
358 //-----------------
359 #endregion
360
361 }
362 }

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