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 236 - (show annotations) (download)
Thu Jan 16 02:48:22 2014 UTC (10 years, 2 months ago) by ron1120
File size: 10580 byte(s)
#31082 Flip時の不具合の修正。
#xxxxx ギター時のクリップウインドウ表示に仮対応。
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Drawing;
5 using SlimDX;
6 using FDK;
7
8 namespace DTXMania
9 {
10 internal class CActResultRank : CActivity
11 {
12 // コンストラクタ
13
14 public CActResultRank()
15 {
16 base.b活性化してない = true;
17 }
18
19
20 // メソッド
21
22 public void tアニメを完了させる()
23 {
24 this.ctランク表示.n現在の値 = this.ctランク表示.n終了値;
25 }
26
27
28 // CActivity 実装
29
30 public override void On活性化()
31 {
32
33 #region [ 本体位置 ]
34
35 int nX = 138;
36 int nY = 8;
37
38 int nX = 850;
39 int nY = 420;
40
41 this.n本体1X = 0;
42 this.n本体1Y = 0;
43
44 this.n本体2X = 0;
45 this.n本体2Y = 0;
46
47 if (CDTXMania.ConfigIni.bDrums有効)
48 {
49 this.n本体1X = nX;
50 this.n本体1Y = nY;
51 }
52 else if (CDTXMania.ConfigIni.bGuitar有効)
53 {
54 if (CDTXMania.DTX.bチップがある.Guitar)
55 {
56 if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
57 {
58 this.n本体1X = nX;
59 this.n本体1Y = nY;
60 }
61 else
62 {
63 this.n本体1X = nX;
64 this.n本体1Y = nY;
65 }
66 }
67
68 if (CDTXMania.DTX.bチップがある.Bass)
69 {
70 if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
71 {
72 this.n本体2X = nX;
73 this.n本体2Y = nY;
74 }
75 else
76 {
77 this.n本体2X = nX;
78 this.n本体2Y = nY;
79 }
80 }
81
82 }
83 #endregion
84
85 base.On活性化();
86 }
87 public override void On非活性化()
88 {
89 if( this.ctランク表示 != null )
90 {
91 this.ctランク表示 = null;
92 }
93 base.On非活性化();
94 }
95 public override void OnManagedリソスの作成()
96 {
97 if( !base.b活性化してない )
98 {
99 if (CDTXMania.ConfigIni.bDrums有効)
100 {
101 switch (CDTXMania.stage結果.n総合ランク値)
102 {
103 case 0:
104 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
105 break;
106
107 case 1:
108 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
109 break;
110
111 case 2:
112 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
113 break;
114
115 case 3:
116 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
117 break;
118
119 case 4:
120 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
121 break;
122
123 case 5:
124 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
125 break;
126
127 case 6:
128 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
129 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
130 break;
131
132 default:
133 this.txランク文字1P = null;
134 break;
135 }
136 }
137 else if( CDTXMania.ConfigIni.bGuitar有効 )
138 {
139 switch( CDTXMania.stage結果.nランク値.Guitar )
140 {
141 case 0:
142 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
143 break;
144
145 case 1:
146 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
147 break;
148
149 case 2:
150 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
151 break;
152
153 case 3:
154 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
155 break;
156
157 case 4:
158 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
159 break;
160
161 case 5:
162 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
163 break;
164
165 case 6:
166 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
167 this.txランク文字1P = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_rankE.png" ) );
168 if( CDTXMania.ConfigIni.bギタが全部オトプレイである )
169 this.txランク文字1P = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_rankSS.png" ) );
170 break;
171
172 default:
173 this.txランク文字1P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
174 break;
175 }
176 switch (CDTXMania.stage結果.nランク値.Bass)
177 {
178 case 0:
179 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
180 break;
181
182 case 1:
183 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankS.png"));
184 break;
185
186 case 2:
187 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankA.png"));
188 break;
189
190 case 3:
191 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankB.png"));
192 break;
193
194 case 4:
195 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankC.png"));
196 break;
197
198 case 5:
199 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankD.png"));
200 break;
201
202 case 6:
203 case 99: // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
204 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
205 if (CDTXMania.ConfigIni.bスが全部オトプレイである)
206 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankSS.png"));
207 break;
208
209 default:
210 this.txランク文字2P = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\8_rankE.png"));
211 break;
212 }
213 }
214 base.OnManagedリソスの作成();
215 }
216 }
217 public override void OnManagedリソスの解放()
218 {
219 if( !base.b活性化してない )
220 {
221 CDTXMania.tテクスチャの解放( ref this.txランク文字1P );
222 CDTXMania.tテクスチャの解放( ref this.txランク文字2P );
223 base.OnManagedリソスの解放();
224 }
225 }
226 public override int On進行描画()
227 {
228 if( base.b活性化してない )
229 {
230 return 0;
231 }
232 if( base.b初めての進行描画 )
233 {
234 this.ctランク表示 = new CCounter(0, 0x3e8, 2, CDTXMania.Timer);
235 base.b初めての進行描画 = false;
236 }
237 this.ctランク表示.t進行();
238 if( this.ctランク表示.n現在の値 >= 500 )
239 {
240 double num2 = ( (double) ( this.ctランク表示.n現在の値 - 500 ) ) / 500.0;
241 if ( this.txランク文字1P != null && this.n本体1Y != 0 )
242 {
243 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));
244 }
245 if ( this.txランク文字2P != null && this.n本体2Y != 0 )
246 {
247 this.txランク文字2P.t2D描画(CDTXMania.app.Device, this.n本体2X, this.n本体2Y, new Rectangle(0, 0, (int)((double)txランク文字1P.sz画像サイズ.Width * num2), this.txランク文字1P.sz画像サイズ.Height));
248 }
249 }
250 if( !this.ctランク表示.b終了値に達した )
251 {
252 return 0;
253 }
254 return 1;
255 }
256
257
258 // その他
259
260 #region [ private ]
261 //-----------------
262 private CCounter ctランク表示;
263 private int n本体1X;
264 private int n本体1Y;
265 private int n本体2X;
266 private int n本体2Y;
267 private CTexture txランク文字1P;
268 private CTexture txランク文字2P;
269 //-----------------
270 #endregion
271 }
272 }

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