2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
6 using System.Diagnostics;
\r
12 internal class CAct演奏Drumsゲージ : CAct演奏ゲージ共通
\r
18 public CAct演奏Drumsゲージ()
\r
20 base.b活性化してない = true;
\r
26 public override void On活性化()
\r
28 // CAct演奏ゲージ共通.Init()に移動
\r
29 // this.dbゲージ値 = ( CDTXMania.Instance.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663;
\r
32 public override void On非活性化()
\r
36 for( int i = 0; i < 24; i++ )
\r
38 this.st白い星[ i ].ct進行 = null;
\r
42 public override void OnManagedリソースの作成()
\r
44 if( !base.b活性化してない )
\r
46 this.txゲージ = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums gauge.png" ) );
\r
47 this.txゲージ白 = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlayDrums_gauge_white.png " ) );
\r
48 base.OnManagedリソースの作成();
\r
51 public override void OnManagedリソースの解放()
\r
53 if( !base.b活性化してない )
\r
55 TextureFactory.tテクスチャの解放( ref this.txゲージ白 );
\r
56 TextureFactory.tテクスチャの解放( ref this.txゲージ );
\r
57 base.OnManagedリソースの解放();
\r
60 public override int On進行描画()
\r
62 if ( !base.b活性化してない )
\r
64 #region [ 初めての進行描画 ]
\r
65 if ( base.b初めての進行描画 )
\r
67 for ( int k = 0; k < 0x18; k++ )
\r
69 this.st白い星[ k ].x = 2 + CDTXMania.Instance.Random.Next( 4 );
\r
70 this.st白い星[ k ].fScale = 0.2f + ( CDTXMania.Instance.Random.Next( 2 ) * 0.05f );
\r
71 this.st白い星[ k ].ct進行 = new CCounter( 0, 0x160, 8 + CDTXMania.Instance.Random.Next( 4 ), CDTXMania.Instance.Timer );
\r
72 this.st白い星[ k ].ct進行.n現在の値 = CDTXMania.Instance.Random.Next( 0x160 );
\r
74 this.ct本体移動 = new CCounter( 0, 0x1a, 20, CDTXMania.Instance.Timer );
\r
75 this.ct本体振動 = new CCounter( 0, 360, 4, CDTXMania.Instance.Timer );
\r
76 base.b初めての進行描画 = false;
\r
79 this.ct本体移動.t進行Loop();
\r
80 this.ct本体振動.t進行Loop();
\r
82 #region [ Risky残りMiss回数表示 ]
\r
83 if ( this.bRisky && this.actLVLNFont != null ) // #23599 2011.7.30 yyagi Risky残りMiss回数表示
\r
85 CActLVLNFont.EFontColor efc = this.IsDanger( E楽器パート.DRUMS ) ?
\r
86 CActLVLNFont.EFontColor.Red : CActLVLNFont.EFontColor.Yellow;
\r
87 actLVLNFont.t文字列描画( (int) ( 12 * Scale.X ), (int) ( 408 * Scale.Y ), nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Right );
\r
91 #region [ 緑orオレンジのゲージ表示 ]
\r
92 const double dbゲージ最大値 = 352.0 * Scale.Y;
\r
93 int n表示するゲージの高さ = ( this.dbゲージ値 == 1.0 ) ?
\r
94 ( (int) ( dbゲージ最大値 * this.dbゲージ値 ) ) :
\r
95 ( (int) ( ( dbゲージ最大値 * this.dbゲージ値 ) + ( 2.0 * Math.Sin( Math.PI * 2 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ) );
\r
97 if ( n表示するゲージの高さ <= 0 )
\r
101 if ( this.txゲージ != null )
\r
103 this.txゲージ.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f );
\r
104 this.txゲージ.n透明度 = 0xff;
\r
105 this.txゲージ.b加算合成 = false;
\r
107 int nCtゲージ内部上昇スクロール現在値 = (int) ( this.ct本体移動.n現在の値 * Scale.Y );
\r
108 int n表示ゲージ最大値 = (int) ( 0x195 * Scale.Y );
\r
109 int ybar = ( n表示ゲージ最大値 - n表示するゲージの高さ ) - nCtゲージ内部上昇スクロール現在値;
\r
110 int height = n表示するゲージの高さ + nCtゲージ内部上昇スクロール現在値;
\r
111 while ( height > 0 )
\r
113 Rectangle rect = ( this.dbゲージ値 == 1.0 ) ?
\r
114 new Rectangle( 48, 0, 48, 61 ) :
\r
115 new Rectangle( 0, 0, 48, 61 );
\r
116 #region [ clipping ]
\r
117 if ( ybar < ( n表示ゲージ最大値 - n表示するゲージの高さ ) )
\r
119 int d = ( n表示ゲージ最大値 - n表示するゲージの高さ ) - ybar;
\r
124 if ( ( ybar + rect.Height ) > n表示ゲージ最大値 )
\r
126 int num7 = ( ybar + rect.Height ) - n表示ゲージ最大値;
\r
127 rect.Height -= num7;
\r
129 if ( rect.Top >= rect.Bottom )
\r
134 if ( this.txゲージ != null )
\r
137 CDTXMania.Instance.Device,
\r
143 height -= rect.Height;
\r
144 ybar += rect.Height;
\r
148 if ( this.txゲージ白 != null )
\r
150 this.txゲージ白.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f );
\r
151 this.txゲージ白.n透明度 = 180;
\r
152 this.txゲージ白.b加算合成 = true;
\r
155 Rectangle rect = new Rectangle(
\r
158 (int) ( 0x10 * Scale.X ),
\r
159 (int) ( 0x40 * 4 * Scale.Y )
\r
161 #region [ clipping1 ]
\r
162 int ylight = ( n表示ゲージ最大値 - n表示するゲージの高さ ) + (int) ( 0 * 0x40 * Scale.Y );
\r
163 if ( ylight >= n表示ゲージ最大値 )
\r
170 #region [ Clipping2 ]
\r
171 if ( ( ylight + rect.Height ) > n表示ゲージ最大値 )
\r
173 int d = ( ylight + rect.Height ) - n表示ゲージ最大値;
\r
177 if ( ( rect.Top < rect.Bottom ) && ( this.txゲージ白 != null ) )
\r
180 CDTXMania.Instance.Device,
\r
181 (int) ( 6 * Scale.X ),
\r
182 (int) ( ylight + 0.5f ),
\r
189 #region [ ゲージ頂上の光源 ]
\r
190 if ( this.txゲージ != null )
\r
192 //this.txゲージ.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f );
\r
193 this.txゲージ.n透明度 = 0xff;
\r
194 this.txゲージ.b加算合成 = false;
\r
197 Rectangle rect = new Rectangle(
\r
198 (int) ( 0x30 * Scale.X ),
\r
200 (int) ( 0x10 * Scale.X ),
\r
201 (int) ( 0x10 * Scale.Y )
\r
203 int yゲージ頂上 = n表示ゲージ最大値 - n表示するゲージの高さ;
\r
204 if ( yゲージ頂上 < n表示ゲージ最大値 )
\r
206 #region [ clipping ]
\r
207 if ( ( yゲージ頂上 + rect.Height ) > n表示ゲージ最大値 )
\r
209 int d = ( yゲージ頂上 + rect.Height ) - n表示ゲージ最大値;
\r
213 if ( ( rect.Top < rect.Bottom ) && ( this.txゲージ != null ) )
\r
216 CDTXMania.Instance.Device,
\r
217 (int) ( 6 * Scale.X ),
\r
218 (int) ( yゲージ頂上 + 0.5f ),
\r
226 if ( this.txゲージ != null )
\r
228 this.txゲージ.b加算合成 = true;
\r
230 for ( int j = 0; j < 24; j++ )
\r
232 this.st白い星[ j ].ct進行.t進行Loop();
\r
233 int x = 6 + this.st白い星[ j ].x;
\r
234 int y泡 = ( n表示ゲージ最大値 - n表示するゲージの高さ ) + (int) ( ( 0x160 - this.st白い星[ j ].ct進行.n現在の値 ) * Scale.Y );
\r
235 int n透明度 = ( this.st白い星[ j ].ct進行.n現在の値 < 0xb0 ) ? 0 : ( (int) ( 255.0 * ( ( (double) ( this.st白い星[ j ].ct進行.n現在の値 - 0xb0 ) ) / 176.0 ) ) );
\r
236 if ( ( n透明度 != 0 ) && ( y泡 < (int) ( 0x191 * Scale.Y ) ) )
\r
238 Rectangle rect = new Rectangle(
\r
239 (int) ( 0 * Scale.X ),
\r
240 (int) ( 0x20 * Scale.Y ),
\r
241 (int) ( 0x20 * Scale.X ),
\r
242 (int) ( 0x20 * Scale.Y )
\r
244 if ( this.txゲージ != null )
\r
246 this.txゲージ.vc拡大縮小倍率 = new Vector3( this.st白い星[ j ].fScale, this.st白い星[ j ].fScale, 1f );
\r
247 this.txゲージ.n透明度 = n透明度;
\r
249 CDTXMania.Instance.Device,
\r
250 (int) ( x * Scale.X ),
\r
251 (int) ( y泡 + 0.5f ),
\r
265 #region [ private ]
\r
266 //-----------------
\r
267 [StructLayout( LayoutKind.Sequential )]
\r
268 private struct ST白い星
\r
271 public float fScale;
\r
272 public CCounter ct進行;
\r
275 private CTextureAf txゲージ白;
\r
276 private const int STAR_MAX = 0x18;
\r
277 private ST白い星[] st白い星 = new ST白い星[ 0x18 ];
\r
278 //-----------------
\r