2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
10 internal class CAct演奏判定文字列共通 : CActivity
\r
14 protected STSTATUS[] st状態 = new STSTATUS[ 12 ];
\r
15 [StructLayout( LayoutKind.Sequential )]
\r
16 protected struct STSTATUS
\r
18 public CCounter ct進行;
\r
20 public float fX方向拡大率;
\r
21 public float fY方向拡大率;
\r
25 public int nLag; // 2011.2.1 yyagi
\r
28 protected readonly ST判定文字列[] st判定文字列;
\r
29 [StructLayout( LayoutKind.Sequential )]
\r
30 protected struct ST判定文字列
\r
33 public Rectangle rc;
\r
36 protected readonly STlag数値[] stLag数値; // 2011.2.1 yyagi
\r
37 [StructLayout( LayoutKind.Sequential )]
\r
38 protected struct STlag数値
\r
40 public Rectangle rc;
\r
44 protected CTexture[] tx判定文字列 = new CTexture[ 3 ];
\r
45 protected CTexture txlag数値 = new CTexture(); // 2011.2.1 yyagi
\r
50 public CAct演奏判定文字列共通()
\r
52 this.st判定文字列 = new ST判定文字列[ 7 ];
\r
53 Rectangle[] r = new Rectangle[] {
\r
54 new Rectangle( 0, 0, 0x80, 0x2a ),
\r
55 new Rectangle( 0, 0x2b, 0x80, 0x2a ),
\r
56 new Rectangle( 0, 0x56, 0x80, 0x2a ),
\r
57 new Rectangle( 0, 0, 0x80, 0x2a ),
\r
58 new Rectangle( 0, 0x2b, 0x80, 0x2a ),
\r
59 new Rectangle( 0, 0x56, 0x80, 0x2a ),
\r
60 new Rectangle( 0, 0, 0x80, 0x2a )
\r
62 for ( int i = 0; i < 7; i++ )
\r
64 this.st判定文字列[ i ] = new ST判定文字列();
\r
65 this.st判定文字列[ i ].n画像番号 = i / 3;
\r
66 this.st判定文字列[ i ].rc = r[i];
\r
69 this.stLag数値 = new STlag数値[ 12 * 2 ]; // 2011.2.1 yyagi
\r
70 for ( int i = 0; i < 12; i++ )
\r
72 this.stLag数値[ i ].rc = new Rectangle( ( i % 4 ) * 15 , ( i / 4 ) * 19 , 15, 19 );
\r
73 this.stLag数値[ i + 12 ].rc = new Rectangle( ( i % 4 ) * 15 + 64, ( i / 4 ) * 19 + 64, 15, 19 );
\r
75 base.b活性化してない = true;
\r
81 public virtual void Start( int nLane, E判定 judge, int lag )
\r
83 if( ( nLane < 0 ) || ( nLane > 11 ) )
\r
85 throw new IndexOutOfRangeException( "有効範囲は 0~11 です。" );
\r
87 if( ( ( nLane >= 8 ) || ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Drums ) != E判定文字表示位置.表示OFF ) ) && ( ( ( nLane != 10 ) || ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Guitar ) != E判定文字表示位置.表示OFF ) ) && ( ( nLane != 11 ) || ( ( (E判定文字表示位置) CDTXMania.ConfigIni.判定文字表示位置.Bass ) != E判定文字表示位置.表示OFF ) ) ) )
\r
89 this.st状態[ nLane ].ct進行 = new CCounter( 0, 300, 1, CDTXMania.Timer );
\r
90 this.st状態[ nLane ].judge = judge;
\r
91 this.st状態[ nLane ].fX方向拡大率 = 1f;
\r
92 this.st状態[ nLane ].fY方向拡大率 = 1f;
\r
93 this.st状態[ nLane ].n相対X座標 = 0;
\r
94 this.st状態[ nLane ].n相対Y座標 = 0;
\r
95 this.st状態[ nLane ].n透明度 = 0xff;
\r
96 this.st状態[ nLane ].nLag = lag;
\r
103 public override void On活性化()
\r
105 for( int i = 0; i < 12; i++ )
\r
107 this.st状態[ i ].ct進行 = new CCounter();
\r
111 public override void On非活性化()
\r
113 for( int i = 0; i < 12; i++ )
\r
115 this.st状態[ i ].ct進行 = null;
\r
119 public override void OnManagedリソースの作成()
\r
121 if( !base.b活性化してない )
\r
123 this.tx判定文字列[ 0 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 1.png" ) );
\r
124 this.tx判定文字列[ 1 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 2.png" ) );
\r
125 this.tx判定文字列[ 2 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 3.png" ) );
\r
126 this.txlag数値 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect level numbers.png" ) );
\r
127 base.OnManagedリソースの作成();
\r
130 public override void OnManagedリソースの解放()
\r
132 if( !base.b活性化してない )
\r
134 CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 0 ] );
\r
135 CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 1 ] );
\r
136 CDTXMania.tテクスチャの解放( ref this.tx判定文字列[ 2 ] );
\r
137 CDTXMania.tテクスチャの解放( ref this.txlag数値 );
\r
138 base.OnManagedリソースの解放();
\r