2 using System.Collections.Generic;
6 using SlimDX.Direct3D9;
10 internal class CAct演奏Drumsレーン : CActivity
14 /// レーンの他にもクリップのウィンドウ表示も兼ねる。要はクラス作成が面倒だっただけ。
19 public CAct演奏Drumsレーン()
24 public override void On活性化()
27 for( int i = 0; i < 10; i++ )
29 this.ct進行[ i ] = new CCounter();
31 this.ct振動進行 = new CCounter();
35 public override void On非活性化()
37 for( int i = 0; i < 10; i++ )
39 this.ct進行[ i ] = null;
45 public override void OnManagedリソースの作成()
47 for( int i = 0; i < 10; i++ )
49 if( CDTXMania.ConfigIni.nLaneDispType.Drums == 0 || CDTXMania.ConfigIni.nLaneDispType.Drums == 2 )
50 this.txLane[ i ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Paret.png" ) );
52 this.txLane[ i ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\Tile black 64x64.png" ) );
54 this.txLaneShadow = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Drums_Shadow.png" ) );
55 base.OnManagedリソースの作成();
58 public override void OnManagedリソースの解放()
60 for( int i = 0; i < 10; i++ )
62 CDTXMania.tテクスチャの解放( ref this.txLane[ i ] );
64 CDTXMania.tテクスチャの解放( ref this.txLaneShadow );
65 base.OnManagedリソースの解放();
68 public override int On進行描画()
70 if( CDTXMania.bXGRelease && !( CDTXMania.ConfigIni.nLaneDispType.Drums == 1 || CDTXMania.ConfigIni.nLaneDispType.Drums == 3 ) )
72 for( int i = 0; i < 10; i++ )
74 if( !this.ct進行[ i ].b停止中 )
77 if ( this.ct進行[ i ].b終了値に達した )
83 if( !this.ct振動進行.b停止中 )
86 if( this.ct振動進行.b終了値に達した )
92 //CDTXMania.act文字コンソール.tPrint( 0, 0, C文字コンソール.Eフォント種別.灰, this.n振動X座標.ToString() );
93 //CDTXMania.act文字コンソール.tPrint( 0, 16, C文字コンソール.Eフォント種別.灰, this.ct振動進行.n現在の値.ToString() );
94 if( this.ct振動進行.b進行中 )
95 this.n振動X座標 = CDTXMania.Random.Next( 12 ) - 6;
100 if( this.txLaneShadow != null )
102 this.txLaneShadow.t2D描画( CDTXMania.app.Device, 0, 0 );
105 if( this.txLane[ 0 ] != null ) //LC
107 float[] f拡大率 = new float[] { 1.0f, 0.97f, 0.93f, 0.90f, 0.86f, 0.90f, 0.93f, 0.97f, 1.0f }; //BD
108 this.txLane[ 0 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 0 ].n現在の値 ];
109 this.txLane[ 0 ].t2D描画( CDTXMania.app.Device, 367 - (int)( 72 * f拡大率[ this.ct進行[ 0 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 0, 0, 72, 720 ) );
111 if( this.txLane[ 1 ] != null ) //HH
113 float[] f拡大率 = new float[] { 1.0f, 0.97f, 0.93f, 0.90f, 0.86f, 0.90f, 0.93f, 0.97f, 1.0f }; //BD
114 this.txLane[ 1 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 1 ].n現在の値 ];
115 this.txLane[ 1 ].t2D描画( CDTXMania.app.Device, 416 - (int)( 49 * f拡大率[ this.ct進行[ 1 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 72, 0, 49, 720 ) );
117 this.txLane[ 1 ].vc拡大縮小倍率.X = 1.0f;
118 this.txLane[ 1 ].t2D描画( CDTXMania.app.Device, 416 + this.n振動X座標, 0, new Rectangle( 121, 0, 3, 720 ) );
120 if( this.txLane[ 2 ] != null ) //SD
122 float[] f拡大率 = new float[] { 1.0f, 0.94f, 0.89f, 0.87f, 0.81f, 0.87f, 0.89f, 0.94f, 1.0f }; //BDのものを使いまわし
123 int[] nX座標補正 = new int[] { 0, 1, 1, 2, 2, 1, 1, 0, 0 };
125 switch( CDTXMania.ConfigIni.eLaneType )
129 this.txLane[ 2 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 2 ].n現在の値 ];
130 this.txLane[ 2 ].t2D描画( CDTXMania.app.Device, 497 - (int)( ( 60 / 2 ) * f拡大率[ this.ct進行[ 2 ].n現在の値 ] ) + nX座標補正[ this.ct進行[ 2 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 172, 0, 60, 720 ) );
134 this.txLane[ 2 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 2 ].n現在の値 ];
135 this.txLane[ 2 ].t2D描画( CDTXMania.app.Device, 446 - (int)( ( 60 / 2 ) * f拡大率[ this.ct進行[ 2 ].n現在の値 ] ) + nX座標補正[ this.ct進行[ 2 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 172, 0, 60, 720 ) );
139 if( this.txLane[ 3 ] != null ) //BD
141 float[] f拡大率 = new float[] { 1.0f, 0.94f, 0.89f, 0.87f, 0.81f, 0.87f, 0.89f, 0.94f, 1.0f }; //BD
142 int[] nX座標補正 = new int[] { 0, 1, 1, 2, 4, 2, 1, 1, 0 };
143 switch( CDTXMania.ConfigIni.eLaneType )
147 this.txLane[ 3 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 3 ].n現在の値 ];
148 this.txLane[ 3 ].t2D描画( CDTXMania.app.Device, 612 - (int)( ( 66 / 2 ) * f拡大率[ this.ct進行[ 3 ].n現在の値 ] ) - nX座標補正[ this.ct進行[ 3 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 284, 0, 66, 720 ) );
152 this.txLane[ 3 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 3 ].n現在の値 ];
153 this.txLane[ 3 ].t2D描画( CDTXMania.app.Device, 563 - (int)( ( 66 / 2 ) * f拡大率[ this.ct進行[ 3 ].n現在の値 ] ) - nX座標補正[ this.ct進行[ 3 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 284, 0, 66, 720 ) );
157 if( this.txLane[ 4 ] != null ) //HT
159 float[] f拡大率 = new float[] { 1.0f, 0.98f, 0.91f, 0.87f, 0.78f, 0.87f, 0.91f, 0.98f, 1.0f }; //HT
160 int[] nX座標補正 = new int[] { 0, 1, 1, 1, 2, 1, 1, 1, 0 };
162 switch( CDTXMania.ConfigIni.eLaneType )
165 this.txLane[ 4 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 4 ].n現在の値 ];
166 this.txLane[ 4 ].t2D描画( CDTXMania.app.Device, 550 - (int)( ( 52 / 2 ) * f拡大率[ this.ct進行[ 4 ].n現在の値 ] ) + nX座標補正[ this.ct進行[ 4 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 229, 0, 52, 720 ) );
167 this.txLane[ 4 ].vc拡大縮小倍率.X = 1.0f;
168 this.txLane[ 4 ].t2D描画( CDTXMania.app.Device, 576 + this.n振動X座標, 0, new Rectangle( 281, 0, 3, 720 ) );
172 nX座標補正 = new int[] { 0, 1, 1, 1, 2, 1, 1, 1, 0 };
173 f拡大率 = new float[] { 1.0f, 0.96f, 0.94f, 0.92f, 0.88f, 0.92f, 0.94f, 0.96f, 1.0f };
174 this.txLane[ 4 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 4 ].n現在の値 ];
175 this.txLane[ 4 ].t2D描画( CDTXMania.app.Device, 593 - nX座標補正[ this.ct進行[ 4 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 229, 0, 52, 720 ) );
176 this.txLane[ 4 ].vc拡大縮小倍率.X = 1.0f;
177 this.txLane[ 4 ].t2D描画( CDTXMania.app.Device, 527 + this.n振動X座標, 0, new Rectangle( 281, 0, 3, 720 ) );
180 this.txLane[ 4 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 4 ].n現在の値 ];
181 this.txLane[ 4 ].t2D描画( CDTXMania.app.Device, 501 - (int)( ( 52 / 2 ) * f拡大率[ this.ct進行[ 4 ].n現在の値 ] ) + nX座標補正[ this.ct進行[ 4 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 229, 0, 52, 720 ) );
186 if( this.txLane[ 5 ] != null ) //LT
188 float[] f拡大率 = new float[] { 1.0f, 0.96f, 0.94f, 0.92f, 0.88f, 0.92f, 0.94f, 0.96f, 1.0f }; //LT
189 int[] nX座標補正 = new int[] { 0, 1, 1, 1, 2, 1, 1, 1, 0 };
190 this.txLane[ 5 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 5 ].n現在の値 ];
191 this.txLane[ 5 ].t2D描画( CDTXMania.app.Device, 642 - nX座標補正[ this.ct進行[ 5 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 347, 0, 52, 720 ) );
193 if( this.txLane[ 6 ] != null ) //FT
195 float[] f拡大率 = new float[] { 1.0f, 0.96f, 0.94f, 0.92f, 0.88f, 0.92f, 0.94f, 0.96f, 1.0f }; //LTの使い回し
196 int[] nX座標補正 = new int[] { 0, 1, 1, 1, 2, 1, 1, 1, 0 };
197 this.txLane[ 6 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 6 ].n現在の値 ];
198 this.txLane[ 6 ].t2D描画( CDTXMania.app.Device, 691 - nX座標補正[ this.ct進行[ 6 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 396, 0, 52, 720 ) );
200 this.txLane[ 6 ].vc拡大縮小倍率.X = 1.0f;
201 this.txLane[ 6 ].t2D描画( CDTXMania.app.Device, 743 + this.n振動X座標, 0, new Rectangle( 448, 0, 2, 720 ) );
203 if( this.txLane[ 9 ] != null ) //RD
205 float[] f拡大率 = new float[] { 1.0f, 0.96f, 0.94f, 0.92f, 0.88f, 0.92f, 0.94f, 0.96f, 1.0f }; //HTの使い回し
206 int[] nX座標補正 = new int[] { 0, 1, 1, 1, 1, 1, 1, 1, 0 };
207 this.txLane[ 9 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 9 ].n現在の値 ];
209 switch( CDTXMania.ConfigIni.eRDPosition )
211 case ERDPosition.RCRD:
212 this.txLane[ 9 ].t2D描画( CDTXMania.app.Device, 815 - nX座標補正[ this.ct進行[ 9 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 520, 0, 38, 720 ) );
213 this.txLane[ 9 ].vc拡大縮小倍率.X = 1.0f;
214 this.txLane[ 9 ].t2D描画( CDTXMania.app.Device, 812 + this.n振動X座標, 0, new Rectangle( 517, 0, 3, 720 ) );
216 case ERDPosition.RDRC:
217 this.txLane[ 9 ].t2D描画( CDTXMania.app.Device, 744 - nX座標補正[ this.ct進行[ 9 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 520, 0, 38, 720 ) );
218 this.txLane[ 9 ].vc拡大縮小倍率.X = 1.0f;
219 this.txLane[ 9 ].t2D描画( CDTXMania.app.Device, 783 + this.n振動X座標, 0, new Rectangle( 517, 0, 3, 720 ) );
224 if( this.txLane[ 7 ] != null ) //CY
226 float[] f拡大率 = new float[] { 1.0f, 0.96f, 0.94f, 0.92f, 0.88f, 0.92f, 0.94f, 0.96f, 1.0f }; //LCの使い回し
227 int[] nX座標補正 = new int[] { 0, 2, 3, 4, 6, 4, 3, 2, 0 };
228 this.txLane[ 7 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 7 ].n現在の値 ];
229 this.txLane[ 7 ].t2D描画( CDTXMania.app.Device, 745 - nX座標補正[ this.ct進行[ 7 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 450, 0, 70, 720 ) );
230 switch( CDTXMania.ConfigIni.eRDPosition )
232 case ERDPosition.RCRD:
233 this.txLane[ 7 ].t2D描画( CDTXMania.app.Device, 745 - nX座標補正[ this.ct進行[ 7 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 450, 0, 70, 720 ) );
235 case ERDPosition.RDRC:
236 this.txLane[ 7 ].t2D描画( CDTXMania.app.Device, 783 - nX座標補正[ this.ct進行[ 7 ].n現在の値 ] + this.n振動X座標, 0, new Rectangle( 450, 0, 70, 720 ) );
240 if( this.txLane[ 8 ] != null ) //LP LBD
242 float[] f拡大率 = new float[] { 1.0f, 0.96f, 0.92f, 0.90f, 0.86f, 0.90f, 0.92f, 0.96f, 1.0f }; //LP LBD
243 this.txLane[ 8 ].vc拡大縮小倍率.X = f拡大率[ this.ct進行[ 8 ].n現在の値 ];
245 switch( CDTXMania.ConfigIni.eLaneType )
248 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 467 - (int)( 51 * f拡大率[ this.ct進行[ 8 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 121, 0, 51, 720 ) );
251 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 467 - (int)( 51 * f拡大率[ this.ct進行[ 8 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 121, 0, 51, 720 ) );
252 this.txLane[ 8 ].vc拡大縮小倍率.X = 1.0f;
253 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 524 + this.n振動X座標, 0, new Rectangle( 281, 0, 3, 720 ) );
256 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 524 - (int)( 51 * f拡大率[ this.ct進行[ 8 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 121, 0, 51, 720 ) );
257 this.txLane[ 8 ].vc拡大縮小倍率.X = 1.0f;
258 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 524 + this.n振動X座標, 0, new Rectangle( 281, 0, 3, 720 ) );
261 this.txLane[ 8 ].t2D描画( CDTXMania.app.Device, 575 - (int)( 51 * f拡大率[ this.ct進行[ 8 ].n現在の値 ] ) + this.n振動X座標, 0, new Rectangle( 121, 0, 51, 720 ) );
266 return base.On進行描画();
269 public void Start( Eレーン lane )
271 this.ct進行[ (int) lane ] = new CCounter( 0, 8, 12, CDTXMania.Timer );
274 public void tVibration()
276 this.ct振動進行 = new CCounter( 0, 30, 20, CDTXMania.Timer );
281 private CTexture[] txLane = new CTexture[ 10 ];
282 private CCounter[] ct進行 = new CCounter[ 10 ];
283 private CCounter ct振動進行;
284 private CTexture txLaneShadow;