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 this.ptFullCombo位置 = new Point[] { new Point( (int) ( 0x80 * Scale.X ), (int) ( 0xed * Scale.Y ) ), new Point( (int) ( 0xdf * Scale.X ), (int) ( 0xed * Scale.Y ) ), new Point( (int) ( 0x141 * Scale.X ), (int) ( 0xed * Scale.Y ) ) };
\r
111 base.b活性化してない = true;
\r
117 public void tアニメを完了させる()
\r
119 this.ct表示用.n現在の値 = this.ct表示用.n終了値;
\r
125 public override void On活性化()
\r
127 this.n本体X = (int)(0xf2 * Scale.X);
\r
128 this.n本体Y = (int)(0x44 * Scale.Y);
\r
129 this.sdDTXで指定されたフルコンボ音 = null;
\r
130 this.bフルコンボ音再生済み = false;
\r
133 public override void On非活性化()
\r
135 if( this.ct表示用 != null )
\r
139 if( this.sdDTXで指定されたフルコンボ音 != null )
\r
141 CDTXMania.Instance.Sound管理.tサウンドを破棄する( this.sdDTXで指定されたフルコンボ音 );
\r
142 this.sdDTXで指定されたフルコンボ音 = null;
\r
146 public override void OnManagedリソースの作成()
\r
148 if( !base.b活性化してない )
\r
150 this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter panel.png" ), true );
\r
151 this.tx文字[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter numbers.png" ) );
\r
152 this.tx文字[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter numbers em.png" ) );
\r
153 this.txFullCombo = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult fullcombo.png" ) );
\r
154 this.txWhite = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Tile white 64x64.png" ) );
\r
155 base.OnManagedリソースの作成();
\r
158 public override void OnManagedリソースの解放()
\r
160 if( !base.b活性化してない )
\r
162 TextureFactory.tテクスチャの解放( ref this.txパネル本体 );
\r
163 TextureFactory.tテクスチャの解放( ref this.tx文字[ 0 ] );
\r
164 TextureFactory.tテクスチャの解放( ref this.tx文字[ 1 ] );
\r
165 TextureFactory.tテクスチャの解放( ref this.txFullCombo );
\r
166 TextureFactory.tテクスチャの解放( ref this.txWhite );
\r
167 base.OnManagedリソースの解放();
\r
170 public override int On進行描画()
\r
172 if( base.b活性化してない )
\r
176 if( base.b初めての進行描画 )
\r
178 this.ct表示用 = new CCounter( 0, 0x3e7, 2, CDTXMania.Instance.Timer );
\r
179 base.b初めての進行描画 = false;
\r
182 if( this.txパネル本体 != null )
\r
184 this.txパネル本体.t2D描画(
\r
185 CDTXMania.Instance.Device,
\r
190 int num = this.ct表示用.n現在の値;
\r
191 Point[] pointArray = new Point[] { new Point( (int) ( 0x68 * Scale.X ), (int) ( 0x29 * Scale.Y ) ), new Point( (int) ( 0xc7 * Scale.X ), (int) ( 0x29 * Scale.Y ) ), new Point( (int) ( 0x129 * Scale.X ), (int) ( 0x29 * Scale.Y ) ) };
\r
192 for( int i = 0; i < 3; i++ )
\r
194 int x = this.n本体X + pointArray[ i ].X;
\r
195 int y = this.n本体Y + pointArray[ i ].Y;
\r
198 this.t大文字表示( x, y, CDTXMania.Instance.stage結果.st演奏記録[ i ].nPerfect数.ToString( "00000" ) );
\r
202 this.t大文字表示( x, y + (int)(0x16 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[ i ].nGreat数.ToString( "00000" ) );
\r
206 this.t大文字表示( x, y + (int)(0x2c * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[ i ].nGood数.ToString( "00000" ) );
\r
210 this.t大文字表示( x, y + (int)(0x42 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[ i ].nPoor数.ToString( "00000" ) );
\r
214 this.t大文字表示( x, y + (int)(0x58 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[ i ].nMiss数.ToString( "00000" ) );
\r
218 this.t小文字表示( x + (int) ( 0x30 * Scale.X ), y, string.Format( "{0,3:##0}%", CDTXMania.Instance.stage結果.fPerfect率[ i ] ) );
\r
222 this.t小文字表示( x + (int)(0x30 * Scale.X), y + (int)(0x16 * Scale.Y), string.Format( "{0,3:##0}%", CDTXMania.Instance.stage結果.fGreat率[ i ] ) );
\r
226 this.t小文字表示( x + (int)(0x30 * Scale.X), y + (int)(0x2c * Scale.Y), string.Format( "{0,3:##0}%", CDTXMania.Instance.stage結果.fGood率[ i ] ) );
\r
230 this.t小文字表示( x + (int)(0x30 * Scale.X), y + (int)(0x42 * Scale.Y), string.Format( "{0,3:##0}%", CDTXMania.Instance.stage結果.fPoor率[ i ] ) );
\r
234 this.t小文字表示( x + (int)(0x30 * Scale.X), y + (int)(0x58 * Scale.Y), string.Format( "{0,3:##0}%", CDTXMania.Instance.stage結果.fMiss率[ i ] ) );
\r
238 this.t大文字表示( x, y + (int)(110 * Scale.Y), string.Format( "{0,9:########0}", CDTXMania.Instance.stage結果.st演奏記録[ i ].n最大コンボ数 ) );
\r
242 this.t大文字表示( x, y + (int)(0x84 * Scale.Y), CDTXMania.Instance.stage結果.st演奏記録[ i ].nスコア.ToString( "000000000" ), CDTXMania.Instance.stage結果.b新記録スコア[ i ] );
\r
246 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
250 this.t小文字表示( x + (int)(0x48 * Scale.X), y + (int)(0x9a * Scale.Y), "%" );
\r
254 this.t大文字表示( x, y + (int)(0xb0 * Scale.Y), string.Format( "{0,9:########0}", CDTXMania.Instance.stage結果.n演奏回数[ i ] ) );
\r
257 if( this.ct表示用.n現在の値 < 900 )
\r
259 int num5 = this.ct表示用.n現在の値 / 100;
\r
260 double num6 = 1.0 - ( ( (double) ( this.ct表示用.n現在の値 % 100 ) ) / 100.0 );
\r
262 int num8 = 0x6d + ( num5 * 0x16 );
\r
265 if( this.txWhite != null )
\r
267 this.txWhite.n透明度 = (int) ( 255.0 * num6 );
\r
268 Rectangle rectangle = new Rectangle( 0, 0, 0x40, 0 );
\r
271 rectangle.Height = num10;
\r
274 rectangle.Width = num9;
\r
276 Rectangle rect = rectangle;
\r
277 rect.X = (int) ( rect.X * Scale.X );
\r
278 rect.Y = (int) ( rect.Y * Scale.Y );
\r
279 rect.Width = (int) ( rect.Width * Scale.X );
\r
280 rect.Height = (int) ( rect.Height * Scale.Y );
\r
281 this.txWhite.t2D描画(
\r
282 CDTXMania.Instance.Device,
\r
292 if( this.ct表示用.n現在の値 >= 900 )
\r
294 for( int j = 0; j < 3; j++ )
\r
296 if( CDTXMania.Instance.stage結果.st演奏記録[ j ].bフルコンボである )
\r
298 if( this.ct表示用.b終了値に達した )
\r
300 if( this.txFullCombo != null )
\r
302 this.txFullCombo.t2D描画(
\r
303 CDTXMania.Instance.Device,
\r
304 this.n本体X + this.ptFullCombo位置[ j ].X,
\r
305 this.n本体Y + this.ptFullCombo位置[ j ].Y
\r
308 if( !this.bフルコンボ音再生済み )
\r
310 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
314 if( this.sdDTXで指定されたフルコンボ音 != null )
\r
316 CDTXMania.Instance.Sound管理.tサウンドを破棄する( this.sdDTXで指定されたフルコンボ音 );
\r
317 this.sdDTXで指定されたフルコンボ音 = null;
\r
319 this.sdDTXで指定されたフルコンボ音 = CDTXMania.Instance.Sound管理.tサウンドを生成する( CDTXMania.Instance.DTX.strフォルダ名 + CDTXMania.Instance.DTX.SOUND_FULLCOMBO );
\r
320 if( this.sdDTXで指定されたフルコンボ音 != null )
\r
322 this.sdDTXで指定されたフルコンボ音.t再生を開始する();
\r
331 CDTXMania.Instance.Skin.soundフルコンボ音.t再生する();
\r
333 this.bフルコンボ音再生済み = true;
\r
338 double num12 = ( (double) ( this.ct表示用.n現在の値 - 900 ) ) / 100.0;
\r
339 float num13 = (float) ( 2.0 - num12 );
\r
340 if( this.txFullCombo != null )
\r
342 this.txFullCombo.vc拡大縮小倍率 = new Vector3( num13, num13, 1f );
\r
343 this.txFullCombo.n透明度 = (int) ( 255.0 * num12 );
\r
344 int num14 = ( this.n本体X + this.ptFullCombo位置[ j ].X ) + ( (int) ( ( this.txFullCombo.sz画像サイズ.Width * ( 1f - num13 ) ) / 2f ) );
\r
345 int num15 = ( this.n本体Y + this.ptFullCombo位置[ j ].Y ) + ( (int) ( ( this.txFullCombo.sz画像サイズ.Height * ( 1f - num13 ) ) / 2f ) );
\r
346 this.txFullCombo.t2D描画( CDTXMania.Instance.Device, num14, num15 );
\r
352 if( !this.ct表示用.b終了値に達した )
\r
362 #region [ private ]
\r
363 //-----------------
\r
364 [StructLayout( LayoutKind.Sequential )]
\r
365 private struct ST文字位置
\r
371 private bool bフルコンボ音再生済み;
\r
372 private CCounter ct表示用;
\r
375 private readonly Point[] ptFullCombo位置;
\r
376 private CSound sdDTXで指定されたフルコンボ音;
\r
377 private readonly ST文字位置[] st小文字位置;
\r
378 private readonly ST文字位置[] st大文字位置;
\r
379 private CTexture txFullCombo;
\r
380 private CTexture txWhite;
\r
381 private CTexture txパネル本体;
\r
382 private CTexture[] tx文字 = new CTexture[ 2 ];
\r
384 private void t小文字表示( int x, int y, string str )
\r
386 this.t小文字表示( x, y, str, false );
\r
388 private void t小文字表示( int x, int y, string str, bool b強調 )
\r
390 foreach( char ch in str )
\r
392 for( int i = 0; i < this.st小文字位置.Length; i++ )
\r
394 if( this.st小文字位置[ i ].ch == ch )
\r
396 Rectangle rectangle = new Rectangle(
\r
397 this.st小文字位置[ i ].pt.X,
\r
398 this.st小文字位置[ i ].pt.Y,
\r
399 (int)(11 * Scale.X),
\r
400 (int)(0x10 * Scale.Y)
\r
404 rectangle.Width -= (int)(2 * Scale.X);
\r
405 rectangle.Height -= (int)(2 * Scale.Y);
\r
407 if( this.tx文字[ b強調 ? 1 : 0 ] != null )
\r
409 this.tx文字[ b強調 ? 1 : 0 ].t2D描画( CDTXMania.Instance.Device, x, y, rectangle );
\r
414 //x += (int) ( 8 * Scale.X );
\r
415 x += (int) ( 9 * Scale.X );
\r
418 private void t大文字表示( int x, int y, string str )
\r
420 this.t大文字表示( x, y, str, false );
\r
422 private void t大文字表示( int x, int y, string str, bool b強調 )
\r
424 foreach( char ch in str )
\r
426 for( int i = 0; i < this.st大文字位置.Length; i++ )
\r
428 if( this.st大文字位置[ i ].ch == ch )
\r
430 Rectangle rectangle = new Rectangle(
\r
431 this.st大文字位置[ i ].pt.X,
\r
432 this.st大文字位置[ i ].pt.Y,
\r
433 (int)(11 * Scale.X),
\r
434 (int)(0x10 * Scale.Y)
\r
438 rectangle.Width -= (int)(2 * Scale.X);
\r
439 rectangle.Height -= (int)(2 * Scale.Y);
\r
441 if( this.tx文字[ b強調 ? 1 : 0 ] != null )
\r
443 this.tx文字[ b強調 ? 1 : 0 ].t2D描画( CDTXMania.Instance.Device, x, y, rectangle );
\r
448 //x += (int) ( 8 * Scale.X );
\r
452 //-----------------
\r