2 using System.Collections.Generic;
5 namespace DTXCreator.譜面
7 public class C小節 : IComparable<C小節>
9 public float f小節長倍率 = 1f;
10 public List<Cチップ> listチップ = new List<Cチップ>();
11 public static int n基準の高さdot = 0xc0;
12 public static readonly int n基準の高さgrid = 0xc0;
13 public static int n1グリッドの高さdot
17 return ( n基準の高さdot / n基準の高さgrid );
20 public int n小節長倍率を考慮した現在の小節の高さdot
24 return (int) ( n基準の高さdot * this.f小節長倍率 );
27 public int n小節長倍率を考慮した現在の小節の高さgrid
31 return (int) ( n基準の高さgrid * this.f小節長倍率 );
34 public int n小節番号0to3599
38 return this._n小節番号0to3599;
42 if( ( value < 0 ) || ( value > 0xe0f ) )
44 throw new Exception( "値が範囲(0~3599)を超えています。-->[" + value + "]" );
46 this._n小節番号0to3599 = value;
50 public C小節( int n小節番号0to3599 )
52 this._n小節番号0to3599 = n小節番号0to3599;
54 public int CompareTo( C小節 other )
56 return ( this._n小節番号0to3599 - other._n小節番号0to3599 );
58 public int n位置変換count2grid( int nCount )
60 return (int) ( ( ( n基準の高さgrid * this.f小節長倍率 ) * nCount ) / 384f );
62 public static int n位置変換dot2grid( int nDot )
64 return ( ( nDot * n基準の高さgrid ) / n基準の高さdot );
66 public int n位置変換grid2count( int nGrid )
68 return (int) ( ( nGrid * 384f ) / ( n基準の高さgrid * this.f小節長倍率 ) );
70 public static int n位置変換grid2dot( int nGrid )
72 return ( ( nGrid * n基準の高さdot ) / n基準の高さgrid );
74 public void t小節内の全チップの移動済フラグをリセットする()
76 for( int i = 0; i < this.listチップ.Count; i++ )
78 this.listチップ[ i ].b移動済 = false;
81 public void t小節内の全チップの選択を解除する()
83 for( int i = 0; i < this.listチップ.Count; i++ )
85 Cチップ cチップ = this.listチップ[ i ];
88 this.listチップ[ i ].bドラッグで選択中 = false;
89 this.listチップ[ i ].b確定選択中 = false;
96 private int _n小節番号0to3599;