2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
12 internal class CActResultParameterPanel : CActivity
\r
16 public CActResultParameterPanel()
\r
18 ST文字位置[] st文字位置Array = new ST文字位置[11];
\r
19 ST文字位置 st文字位置 = new ST文字位置();
\r
21 st文字位置.pt = new Point((int)(0 * Scale.X), (int)(0 * Scale.Y));
\r
22 st文字位置Array[0] = st文字位置;
\r
23 ST文字位置 st文字位置2 = new ST文字位置();
\r
25 st文字位置2.pt = new Point((int)(11 * Scale.X), (int)(0 * Scale.Y));
\r
26 st文字位置Array[1] = st文字位置2;
\r
27 ST文字位置 st文字位置3 = new ST文字位置();
\r
29 st文字位置3.pt = new Point((int)(0x16 * Scale.X), (int)(0 * Scale.Y));
\r
30 st文字位置Array[2] = st文字位置3;
\r
31 ST文字位置 st文字位置4 = new ST文字位置();
\r
33 st文字位置4.pt = new Point((int)(0x21 * Scale.X), (int)(0 * Scale.Y));
\r
34 st文字位置Array[3] = st文字位置4;
\r
35 ST文字位置 st文字位置5 = new ST文字位置();
\r
37 st文字位置5.pt = new Point((int)(0x2c * Scale.X), (int)(0 * Scale.Y));
\r
38 st文字位置Array[4] = st文字位置5;
\r
39 ST文字位置 st文字位置6 = new ST文字位置();
\r
41 st文字位置6.pt = new Point((int)(0 * Scale.X), (int)(0x10 * Scale.Y));
\r
42 st文字位置Array[5] = st文字位置6;
\r
43 ST文字位置 st文字位置7 = new ST文字位置();
\r
45 st文字位置7.pt = new Point((int)(11 * Scale.X), (int)(0x10 * Scale.Y));
\r
46 st文字位置Array[6] = st文字位置7;
\r
47 ST文字位置 st文字位置8 = new ST文字位置();
\r
49 st文字位置8.pt = new Point((int)(0x16 * Scale.X), (int)(0x10 * Scale.Y));
\r
50 st文字位置Array[7] = st文字位置8;
\r
51 ST文字位置 st文字位置9 = new ST文字位置();
\r
53 st文字位置9.pt = new Point((int)(0x21 * Scale.X), (int)(0x10 * Scale.Y));
\r
54 st文字位置Array[8] = st文字位置9;
\r
55 ST文字位置 st文字位置10 = new ST文字位置();
\r
57 st文字位置10.pt = new Point((int)(0x2c * Scale.X), (int)(0x10 * Scale.Y));
\r
58 st文字位置Array[9] = st文字位置10;
\r
59 ST文字位置 st文字位置11 = new ST文字位置();
\r
61 st文字位置11.pt = new Point((int)(0x37 * Scale.X), (int)(0x10 * Scale.Y));
\r
62 st文字位置Array[10] = st文字位置11;
\r
63 this.st大文字位置 = st文字位置Array;
\r
64 ST文字位置[] st文字位置Array2 = new ST文字位置[11];
\r
65 ST文字位置 st文字位置12 = new ST文字位置();
\r
67 st文字位置12.pt = new Point((int)(0 * Scale.X), (int)(0x20 * Scale.Y));
\r
68 st文字位置Array2[0] = st文字位置12;
\r
69 ST文字位置 st文字位置13 = new ST文字位置();
\r
71 st文字位置13.pt = new Point((int)(11 * Scale.X), (int)(0x20 * Scale.Y));
\r
72 st文字位置Array2[1] = st文字位置13;
\r
73 ST文字位置 st文字位置14 = new ST文字位置();
\r
75 st文字位置14.pt = new Point((int)(0x16 * Scale.X), (int)(0x20 * Scale.Y));
\r
76 st文字位置Array2[2] = st文字位置14;
\r
77 ST文字位置 st文字位置15 = new ST文字位置();
\r
79 st文字位置15.pt = new Point((int)(0x21 * Scale.X), (int)(0x20 * Scale.Y));
\r
80 st文字位置Array2[3] = st文字位置15;
\r
81 ST文字位置 st文字位置16 = new ST文字位置();
\r
83 st文字位置16.pt = new Point((int)(0x2c * Scale.X), (int)(0x20 * Scale.Y));
\r
84 st文字位置Array2[4] = st文字位置16;
\r
85 ST文字位置 st文字位置17 = new ST文字位置();
\r
87 st文字位置17.pt = new Point((int)(0 * Scale.X), (int)(0x30 * Scale.Y));
\r
88 st文字位置Array2[5] = st文字位置17;
\r
89 ST文字位置 st文字位置18 = new ST文字位置();
\r
91 st文字位置18.pt = new Point((int)(11 * Scale.X), (int)(0x30 * Scale.Y));
\r
92 st文字位置Array2[6] = st文字位置18;
\r
93 ST文字位置 st文字位置19 = new ST文字位置();
\r
95 st文字位置19.pt = new Point((int)(0x16 * Scale.X), (int)(0x30 * Scale.Y));
\r
96 st文字位置Array2[7] = st文字位置19;
\r
97 ST文字位置 st文字位置20 = new ST文字位置();
\r
99 st文字位置20.pt = new Point((int)(0x21 * Scale.X), (int)(0x30 * Scale.Y));
\r
100 st文字位置Array2[8] = st文字位置20;
\r
101 ST文字位置 st文字位置21 = new ST文字位置();
\r
103 st文字位置21.pt = new Point((int)(0x2c * Scale.X), (int)(0x30 * Scale.Y));
\r
104 st文字位置Array2[9] = st文字位置21;
\r
105 ST文字位置 st文字位置22 = new ST文字位置();
\r
107 st文字位置22.pt = new Point((int)(0x37 * Scale.X), (int)(0x30 * Scale.Y));
\r
108 st文字位置Array2[10] = st文字位置22;
\r
109 this.st小文字位置 = st文字位置Array2;
\r
110 base.b活性化してない = true;
\r
116 public void tアニメを完了させる()
\r
118 this.ct表示用.n現在の値 = this.ct表示用.n終了値;
\r
124 public override void On活性化()
\r
126 this.n本体X = (int)(0xf2 * Scale.X);
\r
127 this.n本体Y = (int)(0x44 * Scale.Y);
\r
128 this.sdDTXで指定されたフルコンボ音 = null;
\r
129 this.bフルコンボ音再生済み = false;
\r
132 public override void On非活性化()
\r
134 if (this.ct表示用 != null)
\r
138 if (this.sdDTXで指定されたフルコンボ音 != null)
\r
140 CDTXMania.Instance.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
\r
141 this.sdDTXで指定されたフルコンボ音 = null;
\r
145 public override void OnManagedリソースの作成()
\r
147 if (!base.b活性化してない)
\r
149 this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter panel.png"), true);
\r
150 this.tx文字[0] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter numbers.png"));
\r
151 this.tx文字[1] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter numbers em.png"));
\r
152 this.txFullCombo = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult fullcombo.png"));
\r
153 this.txWhite = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Tile white 64x64.png"));
\r
154 base.OnManagedリソースの作成();
\r
157 public override void OnManagedリソースの解放()
\r
159 if (!base.b活性化してない)
\r
161 TextureFactory.tテクスチャの解放(ref this.txパネル本体);
\r
162 TextureFactory.tテクスチャの解放(ref this.tx文字[0]);
\r
163 TextureFactory.tテクスチャの解放(ref this.tx文字[1]);
\r
164 TextureFactory.tテクスチャの解放(ref this.txFullCombo);
\r
165 TextureFactory.tテクスチャの解放(ref this.txWhite);
\r
166 base.OnManagedリソースの解放();
\r
169 public override int On進行描画()
\r
175 if (base.b初めての進行描画)
\r
177 this.ct表示用 = new CCounter(0, 0x3e7, 2, CDTXMania.Instance.Timer);
\r
178 base.b初めての進行描画 = false;
\r
181 if (this.txパネル本体 != null)
\r
183 this.txパネル本体.t2D描画(
\r
184 CDTXMania.Instance.Device,
\r
189 int num = this.ct表示用.n現在の値;
\r
190 STDGBVALUE<Point> pointArray = new STDGBVALUE<Point>();
\r
191 pointArray.Drums = new Point((int)(0x68 * Scale.X), (int)(0x29 * Scale.Y));
\r
192 pointArray.Guitar = new Point((int)(0xc7 * Scale.X), (int)(0x29 * Scale.Y));
\r
193 pointArray.Bass = new Point((int)(0x129 * Scale.X), (int)(0x29 * Scale.Y));
\r
195 for (E楽器パート i = E楽器パート.DRUMS; i <= E楽器パート.BASS; i++)
\r
197 int x = this.n本体X + pointArray[i].X;
\r
198 int y = this.n本体Y + pointArray[i].Y;
\r
201 this.t大文字表示(x, y, CDTXMania.Instance.stage結果.st演奏記録[i].nPerfect数.ToString("00000"));
\r
205 this.t大文字表示(x, y + (int)(0x16 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[i].nGreat数.ToString("00000"));
\r
209 this.t大文字表示(x, y + (int)(0x2c * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[i].nGood数.ToString("00000"));
\r
213 this.t大文字表示(x, y + (int)(0x42 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[i].nPoor数.ToString("00000"));
\r
217 this.t大文字表示(x, y + (int)(0x58 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[i].nMiss数.ToString("00000"));
\r
221 this.t小文字表示(x + (int)(0x30 * Scale.X), y, string.Format("{0,3:##0}%", CDTXMania.Instance.stage結果.fPerfect率[i]));
\r
225 this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x16 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.Instance.stage結果.fGreat率[i]));
\r
229 this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x2c * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.Instance.stage結果.fGood率[i]));
\r
233 this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x42 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.Instance.stage結果.fPoor率[i]));
\r
237 this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x58 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.Instance.stage結果.fMiss率[i]));
\r
241 this.t大文字表示(x, y + (int)(110 * Scale.Y), string.Format("{0,9:########0}", CDTXMania.Instance.stage結果.st演奏記録[i].n最大コンボ数));
\r
245 this.t大文字表示(x, y + (int)(0x84 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[i].nスコア.ToString("000000000"), CDTXMania.Instance.stage結果.b新記録スコア[i]);
\r
249 this.t大文字表示(x - (int)(11 * Scale.X), y + (int)(0x9a * Scale.Y), string.Format("{0,9:#####0.00}", CDTXMania.Instance.stage結果.st演奏記録[i].db演奏型スキル値), CDTXMania.Instance.stage結果.b新記録スキル[i]);
\r
253 this.t小文字表示(x + (int)(0x48 * Scale.X), y + (int)(0x9a * Scale.Y), "%");
\r
257 this.t大文字表示(x, y + (int)(0xb0 * Scale.Y), string.Format("{0,9:########0}", CDTXMania.Instance.stage結果.n演奏回数[i]));
\r
260 if (this.ct表示用.n現在の値 < 900)
\r
262 int num5 = this.ct表示用.n現在の値 / 100;
\r
263 double num6 = 1.0 - (((double)(this.ct表示用.n現在の値 % 100)) / 100.0);
\r
265 int num8 = 0x6d + (num5 * 0x16);
\r
268 if (this.txWhite != null)
\r
270 this.txWhite.n透明度 = (int)(255.0 * num6);
\r
271 Rectangle rectangle = new Rectangle(0, 0, 0x40, 0);
\r
274 rectangle.Height = num10;
\r
277 rectangle.Width = num9;
\r
279 Rectangle rect = rectangle;
\r
280 rect.X = (int)(rect.X * Scale.X);
\r
281 rect.Y = (int)(rect.Y * Scale.Y);
\r
282 rect.Width = (int)(rect.Width * Scale.X);
\r
283 rect.Height = (int)(rect.Height * Scale.Y);
\r
284 this.txWhite.t2D描画(
\r
285 CDTXMania.Instance.Device,
\r
295 if (this.ct表示用.n現在の値 >= 900)
\r
297 for (E楽器パート j = E楽器パート.DRUMS; j <= E楽器パート.BASS; j++)
\r
299 if (CDTXMania.Instance.stage結果.st演奏記録[j].bフルコンボである)
\r
301 if (this.ct表示用.b終了値に達した)
\r
303 if (this.txFullCombo != null)
\r
305 this.txFullCombo.t2D描画(
\r
306 CDTXMania.Instance.Device,
\r
307 this.n本体X + CDTXMania.Instance.Coordinates.PointFullCombo[j].X,
\r
308 this.n本体Y + CDTXMania.Instance.Coordinates.PointFullCombo[j].Y
\r
311 if (!this.bフルコンボ音再生済み)
\r
313 if (((CDTXMania.Instance.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.Instance.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.Instance.DTX.strフォルダ名 + CDTXMania.Instance.DTX.SOUND_FULLCOMBO))
\r
317 if (this.sdDTXで指定されたフルコンボ音 != null)
\r
319 CDTXMania.Instance.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音);
\r
320 this.sdDTXで指定されたフルコンボ音 = null;
\r
322 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Instance.Sound管理.tサウンドを生成する(CDTXMania.Instance.DTX.strフォルダ名 + CDTXMania.Instance.DTX.SOUND_FULLCOMBO);
\r
323 if (this.sdDTXで指定されたフルコンボ音 != null)
\r
325 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
\r
334 CDTXMania.Instance.Skin.soundフルコンボ音.t再生する();
\r
336 this.bフルコンボ音再生済み = true;
\r
341 double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0;
\r
342 float num13 = (float)(2.0 - num12);
\r
343 if (this.txFullCombo != null)
\r
345 this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f);
\r
346 this.txFullCombo.n透明度 = (int)(255.0 * num12);
\r
347 int num14 = (this.n本体X + CDTXMania.Instance.Coordinates.PointFullCombo[j].X) + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f));
\r
348 int num15 = (this.n本体Y + CDTXMania.Instance.Coordinates.PointFullCombo[j].Y) + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f));
\r
349 this.txFullCombo.t2D描画(CDTXMania.Instance.Device, num14, num15);
\r
355 if (!this.ct表示用.b終了値に達した)
\r
365 #region [ private ]
\r
366 //-----------------
\r
367 [StructLayout(LayoutKind.Sequential)]
\r
368 private struct ST文字位置
\r
374 private bool bフルコンボ音再生済み;
\r
375 private CCounter ct表示用;
\r
378 private CSound sdDTXで指定されたフルコンボ音;
\r
379 private readonly ST文字位置[] st小文字位置;
\r
380 private readonly ST文字位置[] st大文字位置;
\r
381 private CTexture txFullCombo;
\r
382 private CTexture txWhite;
\r
383 private CTexture txパネル本体;
\r
384 private CTexture[] tx文字 = new CTexture[2];
\r
386 private void t小文字表示(int x, int y, string str)
\r
388 this.t小文字表示(x, y, str, false);
\r
390 private void t小文字表示(int x, int y, string str, bool b強調)
\r
392 foreach (char ch in str)
\r
394 for (int i = 0; i < this.st小文字位置.Length; i++)
\r
396 if (this.st小文字位置[i].ch == ch)
\r
398 Rectangle rectangle = new Rectangle(
\r
399 this.st小文字位置[i].pt.X,
\r
400 this.st小文字位置[i].pt.Y,
\r
401 (int)(11 * Scale.X),
\r
402 (int)(0x10 * Scale.Y)
\r
406 rectangle.Width -= (int)(2 * Scale.X);
\r
407 rectangle.Height -= (int)(2 * Scale.Y);
\r
409 if (this.tx文字[b強調 ? 1 : 0] != null)
\r
411 this.tx文字[b強調 ? 1 : 0].t2D描画(CDTXMania.Instance.Device, x, y, rectangle);
\r
416 //x += (int) ( 8 * Scale.X );
\r
417 x += (int)(9 * Scale.X);
\r
420 private void t大文字表示(int x, int y, string str)
\r
422 this.t大文字表示(x, y, str, false);
\r
424 private void t大文字表示(int x, int y, string str, bool b強調)
\r
426 foreach (char ch in str)
\r
428 for (int i = 0; i < this.st大文字位置.Length; i++)
\r
430 if (this.st大文字位置[i].ch == ch)
\r
432 Rectangle rectangle = new Rectangle(
\r
433 this.st大文字位置[i].pt.X,
\r
434 this.st大文字位置[i].pt.Y,
\r
435 (int)(11 * Scale.X),
\r
436 (int)(0x10 * Scale.Y)
\r
440 rectangle.Width -= (int)(2 * Scale.X);
\r
441 rectangle.Height -= (int)(2 * Scale.Y);
\r
443 if (this.tx文字[b強調 ? 1 : 0] != null)
\r
445 this.tx文字[b強調 ? 1 : 0].t2D描画(CDTXMania.Instance.Device, x, y, rectangle);
\r
450 //x += (int) ( 8 * Scale.X );
\r
454 //-----------------
\r