2 using System.Collections.Generic;
\r
4 using System.Drawing;
\r
5 using System.Diagnostics;
\r
11 internal class CActResultSongBar : CActivity
\r
15 public CActResultSongBar()
\r
17 base.b活性化してない = true;
\r
23 public void tアニメを完了させる()
\r
25 this.ct登場用.n現在の値 = this.ct登場用.n終了値;
\r
31 public override void On活性化()
\r
35 this.ft曲名用フォント = new Font( "MS PGothic", 44f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel );
\r
38 public override void On非活性化()
\r
40 if( this.ft曲名用フォント != null )
\r
42 this.ft曲名用フォント.Dispose();
\r
43 this.ft曲名用フォント = null;
\r
45 if( this.ct登場用 != null )
\r
51 public override void OnManagedリソースの作成()
\r
53 if( !base.b活性化してない )
\r
55 this.txバー = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenResult song bar.png" ), false );
\r
58 Bitmap image = new Bitmap( (int)(0x3a8 * Scale.X), (int)(0x36 * Scale.Y) );
\r
59 Graphics graphics = Graphics.FromImage( image );
\r
60 graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
\r
61 graphics.DrawString( CDTXMania.Instance.DTX.TITLE, this.ft曲名用フォント, Brushes.White, ( float ) 8f * Scale.X, ( float ) 0f );
\r
62 this.tx曲名 = new CTexture( CDTXMania.Instance.Device, image, CDTXMania.Instance.TextureFormat );
\r
63 this.tx曲名.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f );
\r
67 catch( CTextureCreateFailedException )
\r
69 Trace.TraceError( "曲名テクスチャの生成に失敗しました。" );
\r
72 base.OnManagedリソースの作成();
\r
75 public override void OnManagedリソースの解放()
\r
77 if( !base.b活性化してない )
\r
79 TextureFactory.tテクスチャの解放( ref this.txバー );
\r
80 TextureFactory.tテクスチャの解放( ref this.tx曲名 );
\r
81 base.OnManagedリソースの解放();
\r
84 public override int On進行描画()
\r
90 if( base.b初めての進行描画 )
\r
92 this.ct登場用 = new CCounter( 0, 270, 4, CDTXMania.Instance.Timer );
\r
93 base.b初めての進行描画 = false;
\r
97 int num2 = num - 0x40;
\r
98 if( this.ct登場用.b進行中 )
\r
100 if( this.ct登場用.n現在の値 <= 100 )
\r
102 double num3 = 1.0 - ( ( (double) this.ct登場用.n現在の値 ) / 100.0 );
\r
103 this.n本体X = -( (int) ( num * Math.Sin( Math.PI / 2 * num3 ) ) );
\r
106 else if( this.ct登場用.n現在の値 <= 200 )
\r
108 double num4 = ( (double) ( this.ct登場用.n現在の値 - 100 ) ) / 100.0;
\r
109 this.n本体X = -( (int) ( ( ( (double) num ) / 6.0 ) * Math.Sin( Math.PI * num4 ) ) );
\r
112 else if( this.ct登場用.n現在の値 <= 270 )
\r
114 double num5 = ( (double) ( this.ct登場用.n現在の値 - 200 ) ) / 70.0;
\r
115 this.n本体X = -( (int) ( ( ( (double) num ) / 18.0 ) * Math.Sin( Math.PI * num5 ) ) );
\r
124 int num6 = this.n本体X;
\r
127 while( num8 < num2 )
\r
129 Rectangle rectangle = new Rectangle( 0, 0, 0x40, 0x40 );
\r
130 if( ( num8 + rectangle.Width ) >= num2 )
\r
132 rectangle.Width -= ( num8 + rectangle.Width ) - num2;
\r
134 if( this.txバー != null )
\r
136 Rectangle rectangle1 = rectangle;
\r
137 rectangle1.X = (int) ( rectangle1.X * Scale.X );
\r
138 rectangle1.Y = (int) ( rectangle1.Y * Scale.Y );
\r
139 rectangle1.Width = (int) ( rectangle1.Width * Scale.X );
\r
140 rectangle1.Height = (int) ( rectangle1.Height * Scale.Y );
\r
142 CDTXMania.Instance.Device,
\r
143 (num6 + num8) * Scale.X,
\r
148 num8 += rectangle.Width;
\r
150 if( this.txバー != null )
\r
153 CDTXMania.Instance.Device,
\r
154 (num6 + num8) * Scale.X,
\r
157 (int)(0x40 * Scale.X),
\r
159 (int)(0x40 * Scale.X),
\r
160 (int)(0x40 * Scale.Y)
\r
164 if( this.tx曲名 != null )
\r
167 CDTXMania.Instance.Device,
\r
168 this.n本体X * Scale.X,
\r
169 (this.n本体Y + 20) * Scale.Y
\r
172 if( !this.ct登場用.b終了値に達した )
\r
182 #region [ private ]
\r
183 //-----------------
\r
184 private CCounter ct登場用;
\r
185 private Font ft曲名用フォント;
\r
188 private CTextureAf txバー;
\r
189 private CTexture tx曲名;
\r
190 //-----------------
\r