2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
6 using System.Diagnostics;
\r
8 using System.Security.Cryptography;
\r
9 using System.Reflection;
\r
10 using System.Globalization;
\r
15 internal class CDTX : CActivity
\r
31 public class CAVI : IDisposable
\r
34 private bool bDisposed;
\r
36 public string strコメント文 = "";
\r
37 public string strファイル名 = "";
\r
39 public void OnDeviceCreated()
\r
42 string str2 = CDTXMania.DTX.PATH_WAV;
\r
43 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
45 str = str2 + this.strファイル名;
\r
49 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
51 if( File.Exists( str ) )
\r
55 this.avi = new CAvi( str );
\r
56 Trace.TraceInformation( "動画を生成しました。({0})({1})({2}frames)", new object[] { this.strコメント文, str, this.avi.GetMaxFrameCount() } );
\r
58 catch( Exception exception )
\r
60 Trace.TraceError( exception.Message );
\r
61 Trace.TraceError( "動画の生成に失敗しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
67 Trace.TraceWarning( "ファイルが存在しません。({0})({1})", new object[] { this.strコメント文, str } );
\r
71 public override string ToString()
\r
73 return string.Format( "CAVI{0}: File:{1}, Comment:{2}", CDTX.tZZ( this.n番号 ), this.strファイル名, this.strコメント文 );
\r
76 #region [ IDisposable 実装 ]
\r
78 public void Dispose()
\r
80 if( !this.bDisposed )
\r
82 if( this.avi != null )
\r
85 string str2 = CDTXMania.DTX.PATH_WAV;
\r
86 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
88 str = str2 + this.strファイル名;
\r
92 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
96 Trace.TraceInformation( "動画を解放しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
98 this.bDisposed = true;
\r
101 //-----------------
\r
104 public class CAVIPAN
\r
107 public int n移動時間ct;
\r
109 public Point pt動画側開始位置 = new Point( 0, 0 );
\r
110 public Point pt動画側終了位置 = new Point( 0, 0 );
\r
111 public Point pt表示側開始位置 = new Point( 0, 0 );
\r
112 public Point pt表示側終了位置 = new Point( 0, 0 );
\r
113 public Size sz開始サイズ = new Size( 0, 0 );
\r
114 public Size sz終了サイズ = new Size( 0, 0 );
\r
116 public override string ToString()
\r
118 return string.Format( "CAVIPAN{0}: AVI:{14}, 開始サイズ:{1}x{2}, 終了サイズ:{3}x{4}, 動画側開始位置:{5}x{6}, 動画側終了位置:{7}x{8}, 表示側開始位置:{9}x{10}, 表示側終了位置:{11}x{12}, 移動時間:{13}ct", new object[] { CDTX.tZZ( this.n番号 ), this.sz開始サイズ.Width, this.sz開始サイズ.Height, this.sz終了サイズ.Width, this.sz終了サイズ.Height, this.pt動画側開始位置.X, this.pt動画側開始位置.Y, this.pt動画側終了位置.X, this.pt動画側終了位置.Y, this.pt表示側開始位置.X, this.pt表示側開始位置.Y, this.pt表示側終了位置.X, this.pt表示側終了位置.Y, this.n移動時間ct, CDTX.tZZ( this.nAVI番号 ) } );
\r
125 public Point pt画像側右下座標 = new Point( 0, 0 );
\r
126 public Point pt画像側左上座標 = new Point( 0, 0 );
\r
127 public Point pt表示座標 = new Point( 0, 0 );
\r
129 public override string ToString()
\r
131 return string.Format( "CBGA{0}, BMP:{1}, 画像側左上座標:{2}x{3}, 画像側右下座標:{4}x{5}, 表示座標:{6}x{7}", new object[] { CDTX.tZZ( this.n番号 ), CDTX.tZZ( this.nBMP番号 ), this.pt画像側左上座標.X, this.pt画像側左上座標.Y, this.pt画像側右下座標.X, this.pt画像側右下座標.Y, this.pt表示座標.X, this.pt表示座標.Y } );
\r
134 public class CBGAPAN
\r
137 public int n移動時間ct;
\r
139 public Point pt画像側開始位置 = new Point( 0, 0 );
\r
140 public Point pt画像側終了位置 = new Point( 0, 0 );
\r
141 public Point pt表示側開始位置 = new Point( 0, 0 );
\r
142 public Point pt表示側終了位置 = new Point( 0, 0 );
\r
143 public Size sz開始サイズ = new Size( 0, 0 );
\r
144 public Size sz終了サイズ = new Size( 0, 0 );
\r
146 public override string ToString()
\r
148 return string.Format( "CBGAPAN{0}: BMP:{14}, 開始サイズ:{1}x{2}, 終了サイズ:{3}x{4}, 画像側開始位置:{5}x{6}, 画像側終了位置:{7}x{8}, 表示側開始位置:{9}x{10}, 表示側終了位置:{11}x{12}, 移動時間:{13}ct", new object[] { CDTX.tZZ( this.nBMP番号 ), this.sz開始サイズ.Width, this.sz開始サイズ.Height, this.sz終了サイズ.Width, this.sz終了サイズ.Height, this.pt画像側開始位置.X, this.pt画像側開始位置.Y, this.pt画像側終了位置.X, this.pt画像側終了位置.Y, this.pt表示側開始位置.X, this.pt表示側開始位置.Y, this.pt表示側終了位置.X, this.pt表示側終了位置.Y, this.n移動時間ct, CDTX.tZZ( this.nBMP番号 ) } );
\r
151 public class CBMP : IDisposable
\r
155 public string strコメント文 = "";
\r
156 public string strファイル名 = "";
\r
157 public CTexture tx画像;
\r
162 return this.tx画像.sz画像サイズ.Height;
\r
169 return this.tx画像.sz画像サイズ.Width;
\r
173 public void OnDeviceCreated()
\r
176 string str2 = CDTXMania.DTX.PATH_WAV;
\r
177 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
179 str = str2 + this.strファイル名;
\r
183 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
185 if( File.Exists( str ) )
\r
187 this.tx画像 = CDTXMania.tテクスチャの生成( str, true );
\r
188 if( this.tx画像 != null )
\r
190 if( CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
192 Trace.TraceInformation( "テクスチャを生成しました。({0})({1})({2}x{3})", new object[] { this.strコメント文, str, this.n幅, this.n高さ } );
\r
198 Trace.TraceError( "テクスチャの生成に失敗しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
204 Trace.TraceWarning( "ファイルが存在しません。({0})({1})", new object[] { this.strコメント文, str } );
\r
208 public override string ToString()
\r
210 return string.Format( "CBMP{0}: File:{1}, Comment:{2}", CDTX.tZZ( this.n番号 ), this.strファイル名, this.strコメント文 );
\r
213 #region [ IDisposable 実装 ]
\r
214 //-----------------
\r
215 public void Dispose()
\r
217 if( !this.bDisposed済み )
\r
219 if( this.tx画像 != null )
\r
222 string str2 = CDTXMania.DTX.PATH_WAV;
\r
223 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
225 str = str2 + this.strファイル名;
\r
229 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
231 CDTXMania.tテクスチャの解放( ref this.tx画像 );
\r
232 if( CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
234 Trace.TraceInformation( "テクスチャを解放しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
238 this.bDisposed済み = true;
\r
241 //-----------------
\r
244 #region [ private ]
\r
245 //-----------------
\r
246 private bool bDisposed済み;
\r
247 //-----------------
\r
250 public class CBMPTEX : IDisposable
\r
254 public string strコメント文 = "";
\r
255 public string strファイル名 = "";
\r
256 public CTexture tx画像;
\r
261 return this.tx画像.sz画像サイズ.Height;
\r
268 return this.tx画像.sz画像サイズ.Width;
\r
272 public void OnDeviceCreated()
\r
275 string str2 = CDTXMania.DTX.PATH_WAV;
\r
276 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
278 str = str2 + this.strファイル名;
\r
282 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
284 if( File.Exists( str ) )
\r
286 this.tx画像 = CDTXMania.tテクスチャの生成( str );
\r
287 if( this.tx画像 != null )
\r
289 if( CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
291 Trace.TraceInformation( "テクスチャを生成しました。({0})({1})(Gr:{2}x{3})(Tx:{4}x{5})", new object[] { this.strコメント文, str, this.tx画像.sz画像サイズ.Width, this.tx画像.sz画像サイズ.Height, this.tx画像.szテクスチャサイズ.Width, this.tx画像.szテクスチャサイズ.Height } );
\r
297 Trace.TraceError( "テクスチャの生成に失敗しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
302 Trace.TraceWarning( "ファイルが存在しません。({0})({1})", new object[] { this.strコメント文, str } );
\r
306 public override string ToString()
\r
308 return string.Format( "CBMPTEX{0}: File:{1}, Comment:{2}", CDTX.tZZ( this.n番号 ), this.strファイル名, this.strコメント文 );
\r
311 #region [ IDisposable 実装 ]
\r
312 //-----------------
\r
313 public void Dispose()
\r
315 if( !this.bDisposed済み )
\r
317 if( this.tx画像 != null )
\r
320 string str2 = CDTXMania.DTX.PATH_WAV;
\r
321 if( ( str2 != null ) && ( str2.Length > 0 ) )
\r
323 str = str2 + this.strファイル名;
\r
327 str = CDTXMania.DTX.strフォルダ名 + this.strファイル名;
\r
329 CDTXMania.tテクスチャの解放( ref this.tx画像 );
\r
330 if( CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
332 Trace.TraceInformation( "テクスチャを解放しました。({0})({1})", new object[] { this.strコメント文, str } );
\r
336 this.bDisposed済み = true;
\r
339 //-----------------
\r
342 #region [ private ]
\r
343 //-----------------
\r
344 private bool bDisposed済み;
\r
345 //-----------------
\r
350 public double dbBPM値;
\r
352 public int n表記上の番号;
\r
354 public override string ToString()
\r
356 StringBuilder builder = new StringBuilder( 0x80 );
\r
357 if( this.n内部番号 != this.n表記上の番号 )
\r
359 builder.Append( string.Format( "CBPM{0}(内部{1})", CDTX.tZZ( this.n表記上の番号 ), this.n内部番号 ) );
\r
363 builder.Append( string.Format( "CBPM{0}", CDTX.tZZ( this.n表記上の番号 ) ) );
\r
365 builder.Append( string.Format( ", BPM:{0}", this.dbBPM値 ) );
\r
366 return builder.ToString();
\r
369 public class CChip : IComparable<CDTX.CChip>
\r
372 public bool b可視 = true;
\r
373 public double dbチップサイズ倍率 = 1.0;
\r
374 public double db実数値;
\r
375 public EAVI種別 eAVI種別;
\r
376 public EBGA種別 eBGA種別;
\r
377 public E楽器パート e楽器パート = E楽器パート.UNKNOWN;
\r
378 public int nチャンネル番号;
\r
379 public STDGBVALUE<int> nバーからの距離dot;
\r
381 public int n整数値・内部番号;
\r
383 public int n透明度 = 0xff;
\r
385 public int n発声時刻ms;
\r
386 public int nLag; // 2011.2.1 yyagi
\r
387 public CDTX.CAVI rAVI;
\r
388 public CDTX.CAVIPAN rAVIPan;
\r
389 public CDTX.CBGA rBGA;
\r
390 public CDTX.CBGAPAN rBGAPan;
\r
391 public CDTX.CBMP rBMP;
\r
392 public CDTX.CBMPTEX rBMPTEX;
\r
393 public bool bBPMチップである
\r
397 if (this.nチャンネル番号 == 3 || this.nチャンネル番号 == 8) {
\r
404 public bool bWAVを使うチャンネルである
\r
408 switch( this.nチャンネル番号 )
\r
499 public bool b自動再生音チャンネルである
\r
503 int num = this.nチャンネル番号;
\r
504 if( ( ( ( num != 1 ) && ( ( 0x61 > num ) || ( num > 0x69 ) ) ) && ( ( 0x70 > num ) || ( num > 0x79 ) ) ) && ( ( 0x80 > num ) || ( num > 0x89 ) ) )
\r
506 return ( ( 0x90 <= num ) && ( num <= 0x92 ) );
\r
514 this.nバーからの距離dot = new STDGBVALUE<int>();
\r
515 this.nバーからの距離dot.Drums = 0;
\r
516 this.nバーからの距離dot.Guitar = 0;
\r
517 this.nバーからの距離dot.Bass = 0;
\r
523 this.n整数値・内部番号 = 0;
\r
528 this.dbチップサイズ倍率 = 1.0;
\r
531 this.e楽器パート = E楽器パート.UNKNOWN;
\r
533 this.nバーからの距離dot.Drums = 0;
\r
534 this.nバーからの距離dot.Guitar = 0;
\r
535 this.nバーからの距離dot.Bass = 0;
\r
538 public override string ToString()
\r
541 switch( this.nチャンネル番号 )
\r
600 str = "RideCymbal";
\r
604 str = "LeftCymbal";
\r
644 str = "ギターWailing";
\r
648 str = "ギターWailing音切替";
\r
652 str = "HHClose(不可視)";
\r
656 str = "Snare(不可視)";
\r
664 str = "HiTom(不可視)";
\r
668 str = "LowTom(不可視)";
\r
672 str = "Cymbal(不可視)";
\r
676 str = "FloorTom(不可視)";
\r
680 str = "HHOpen(不可視)";
\r
684 str = "RideCymbal(不可視)";
\r
688 str = "LeftCymbal(不可視)";
\r
896 str = "ベースWailing";
\r
900 str = "ベースWailing音切替";
\r
904 str = "HHClose(空うち)";
\r
908 str = "Snare(空うち)";
\r
916 str = "HiTom(空うち)";
\r
920 str = "LowTom(空うち)";
\r
924 str = "Cymbal(空うち)";
\r
928 str = "FloorTom(空うち)";
\r
932 str = "HHOpen(空うち)";
\r
936 str = "RideCymbal(空うち)";
\r
948 str = "LeftCymbal(空うち)";
\r
952 str = "BGAスコープ画像切替1";
\r
956 str = "BGAスコープ画像切替2";
\r
960 str = "BGAスコープ画像切替3";
\r
964 str = "BGAスコープ画像切替4";
\r
968 str = "BGAスコープ画像切替5";
\r
972 str = "BGAスコープ画像切替6";
\r
976 str = "BGAスコープ画像切替7";
\r
980 str = "BGAスコープ画像切替8";
\r
987 return string.Format( "CChip: 位置:{0:D4}.{1:D3}, 時刻{2:D6}, Ch:{3:X2}({4}), Pn:{5}({11})(内部{6}), Pd:{7}, Sz:{8}, UseWav:{9}, Auto:{10}", new object[] { this.n発声位置 / 384, this.n発声位置 % 384, this.n発声時刻ms, this.nチャンネル番号, str, this.n整数値, this.n整数値・内部番号, this.db実数値, this.dbチップサイズ倍率, this.bWAVを使うチャンネルである, this.b自動再生音チャンネルである, CDTX.tZZ( this.n整数値 ) } );
\r
990 #region [ IComparable 実装 ]
\r
991 //-----------------
\r
992 public int CompareTo( CDTX.CChip other )
\r
994 byte[] buffer = new byte[] {
\r
995 5, 5, 3, 3, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5,
\r
996 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5,
\r
997 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5,
\r
998 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
999 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1000 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1001 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1002 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1003 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1004 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1005 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1006 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1007 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1008 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1009 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1010 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
\r
1012 if( this.n発声位置 < other.n発声位置 )
\r
1016 if( this.n発声位置 > other.n発声位置 )
\r
1020 if( buffer[ this.nチャンネル番号 ] < buffer[ other.nチャンネル番号 ] )
\r
1024 if( buffer[ this.nチャンネル番号 ] > buffer[ other.nチャンネル番号 ] )
\r
1030 //-----------------
\r
1033 public class CWAV : IDisposable
\r
1035 public bool bBGMとして使う;
\r
1036 public List<int> listこのWAVを使用するチャンネル番号の集合 = new List<int>( 0x10 );
\r
1037 public int nチップサイズ = 100;
\r
1039 public long[] n一時停止時刻 = new long[ 4 ];
\r
1040 public int n音量 = 100;
\r
1041 public int n現在再生中のサウンド番号;
\r
1042 public long[] n再生開始時刻 = new long[ 4 ];
\r
1044 public int n表記上の番号;
\r
1045 public CSound[] rSound = new CSound[ 4 ];
\r
1046 public string strコメント文 = "";
\r
1047 public string strファイル名 = "";
\r
1048 public bool bBGMとして使わない
\r
1052 return !this.bBGMとして使う;
\r
1056 this.bBGMとして使う = !value;
\r
1060 public override string ToString()
\r
1062 StringBuilder builder = new StringBuilder( 0x80 );
\r
1063 if( this.n表記上の番号 == this.n内部番号 )
\r
1065 builder.Append( string.Format( "CWAV{0}: ", CDTX.tZZ( this.n表記上の番号 ) ) );
\r
1069 builder.Append( string.Format( "CWAV{0}(内部{1}): ", CDTX.tZZ( this.n表記上の番号 ), this.n内部番号 ) );
\r
1071 builder.Append( string.Format( "音量:{0}, 位置:{1}, サイズ:{2}, BGM:{3}, File:{4}, Comment:{5}", new object[] { this.n音量, this.n位置, this.nチップサイズ, this.bBGMとして使う ? 'Y' : 'N', this.strファイル名, this.strコメント文 } ) );
\r
1072 return builder.ToString();
\r
1075 #region [ IDisposable+α実装 ]
\r
1076 //-----------------
\r
1077 public void Dispose()
\r
1079 this.Dispose( true );
\r
1081 public void Dispose( bool bサウンドのDisposeも行う )
\r
1083 if( !this.bDisposed済み )
\r
1085 for( int i = 0; i < 4; i++ )
\r
1087 if( bサウンドのDisposeも行う && ( this.rSound[ i ] != null ) )
\r
1089 CDTXMania.Sound管理.tサウンドを破棄する( this.rSound[ i ] );
\r
1091 this.rSound[ i ] = null;
\r
1092 if( ( i == 0 ) && CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
1094 Trace.TraceInformation( "サウンドを解放しました。({0})({1})", new object[] { this.strコメント文, this.strファイル名 } );
\r
1097 this.bDisposed済み = true;
\r
1100 //-----------------
\r
1103 #region [ private ]
\r
1104 //-----------------
\r
1105 private bool bDisposed済み;
\r
1106 //-----------------
\r
1113 [StructLayout( LayoutKind.Sequential )]
\r
1114 public struct STLANEINT
\r
1126 public int Guitar;
\r
1128 public int this[ int index ]
\r
1165 return this.Guitar;
\r
1170 throw new IndexOutOfRangeException();
\r
1176 throw new ArgumentOutOfRangeException();
\r
1221 this.Guitar = value;
\r
1225 this.Bass = value;
\r
1228 throw new IndexOutOfRangeException();
\r
1235 return this.HH + this.SD + this.BD + this.HT + this.LT + this.CY + this.FT + this.HHO + this.RD + this.LC;
\r
1240 [StructLayout( LayoutKind.Sequential )]
\r
1241 public struct STRESULT
\r
1250 public string this[ int index ]
\r
1277 throw new IndexOutOfRangeException();
\r
1311 throw new IndexOutOfRangeException();
\r
1316 [StructLayout( LayoutKind.Sequential )]
\r
1317 public struct STチップがある
\r
1319 public bool Drums;
\r
1320 public bool Guitar;
\r
1322 public bool HHOpen;
\r
1324 public bool LeftCymbal;
\r
1325 public bool OpenGuitar;
\r
1326 public bool OpenBass;
\r
1327 public bool this[ int index ]
\r
1334 return this.Drums;
\r
1337 return this.Guitar;
\r
1343 return this.HHOpen;
\r
1349 return this.LeftCymbal;
\r
1352 return this.OpenGuitar;
\r
1355 return this.OpenBass;
\r
1357 throw new IndexOutOfRangeException();
\r
1364 this.Drums = value;
\r
1368 this.Guitar = value;
\r
1372 this.Bass = value;
\r
1376 this.HHOpen = value;
\r
1380 this.Ride = value;
\r
1384 this.LeftCymbal = value;
\r
1388 this.OpenGuitar = value;
\r
1392 this.OpenBass = value;
\r
1395 throw new IndexOutOfRangeException();
\r
1403 public int nBGMAdjust
\r
1408 public string ARTIST;
\r
1409 public string BACKGROUND;
\r
1410 public string BACKGROUND_GR;
\r
1411 public double BASEBPM;
\r
1412 public bool BLACKCOLORKEY;
\r
1413 public double BPM;
\r
1414 public STチップがある bチップがある;
\r
1415 public string COMMENT;
\r
1416 public double db再生速度;
\r
1418 public string GENRE;
\r
1419 public bool HIDDENLEVEL;
\r
1420 public STDGBVALUE<int> LEVEL;
\r
1421 public Dictionary<int, CAVI> listAVI;
\r
1422 public Dictionary<int, CAVIPAN> listAVIPAN;
\r
1423 public Dictionary<int, CBGA> listBGA;
\r
1424 public Dictionary<int, CBGAPAN> listBGAPAN;
\r
1425 public Dictionary<int, CBMP> listBMP;
\r
1426 public Dictionary<int, CBMPTEX> listBMPTEX;
\r
1427 public Dictionary<int, CBPM> listBPM;
\r
1428 public List<CChip> listChip;
\r
1429 public Dictionary<int, CWAV> listWAV;
\r
1430 public string MIDIFILE;
\r
1431 public bool MIDINOTE;
\r
1432 public int MIDIレベル;
\r
1433 public STLANEINT n可視チップ数;
\r
1434 public const int n最大音数 = 4;
\r
1435 public const int n小節の解像度 = 384;
\r
1436 public string PANEL;
\r
1437 public string PATH_WAV;
\r
1438 public string PREIMAGE;
\r
1439 public string PREMOVIE;
\r
1440 public string PREVIEW;
\r
1441 public STRESULT RESULTIMAGE;
\r
1442 public STRESULT RESULTMOVIE;
\r
1443 public STRESULT RESULTSOUND;
\r
1444 public string SOUND_AUDIENCE;
\r
1445 public string SOUND_FULLCOMBO;
\r
1446 public string SOUND_NOWLOADING;
\r
1447 public string SOUND_STAGEFAILED;
\r
1448 public string STAGEFILE;
\r
1449 public string strハッシュofDTXファイル;
\r
1450 public string strファイル名;
\r
1451 public string strファイル名の絶対パス;
\r
1452 public string strフォルダ名;
\r
1453 public string TITLE;
\r
1454 #if TEST_NOTEOFFMODE
\r
1455 public bool bHH演奏で直前のHHを消音する;
\r
1456 public bool bGUITAR演奏で直前のGUITARを消音する;
\r
1457 public bool bBASS演奏で直前のBASSを消音する;
\r
1465 this.COMMENT = "";
\r
1468 this.PREVIEW = "";
\r
1469 this.PREIMAGE = "";
\r
1470 this.PREMOVIE = "";
\r
1471 this.STAGEFILE = "";
\r
1472 this.BACKGROUND = "";
\r
1473 this.BACKGROUND_GR = "";
\r
1474 this.PATH_WAV = "";
\r
1475 this.MIDIFILE = "";
\r
1476 this.SOUND_STAGEFAILED = "";
\r
1477 this.SOUND_FULLCOMBO = "";
\r
1478 this.SOUND_NOWLOADING = "";
\r
1479 this.SOUND_AUDIENCE = "";
\r
1481 this.BLACKCOLORKEY = true;
\r
1482 STDGBVALUE<int> stdgbvalue = new STDGBVALUE<int>();
\r
1483 stdgbvalue.Drums = 0;
\r
1484 stdgbvalue.Guitar = 0;
\r
1485 stdgbvalue.Bass = 0;
\r
1486 this.LEVEL = stdgbvalue;
\r
1488 #if true // 2010.12.31 yyagi #RESULTxxxのリファクタ後。ここはnew()して参照渡ししなくてもいいよね?
\r
1489 for (int i = 0; i < 7; i++) {
\r
1490 this.RESULTIMAGE[i] = "";
\r
1491 this.RESULTMOVIE[i] = "";
\r
1492 this.RESULTSOUND[i] = "";
\r
1494 #else // #RESULTxxxのリファクタ前
\r
1495 STRESULT stresult4 = new STRESULT();
\r
1496 STRESULT stresult = stresult4;
\r
1504 this.RESULTIMAGE = stresult;
\r
1505 stresult4 = new STRESULT();
\r
1506 STRESULT stresult2 = stresult4;
\r
1507 stresult2.SS = "";
\r
1514 this.RESULTMOVIE = stresult2;
\r
1515 STRESULT stresult3 = new STRESULT();
\r
1516 stresult3.SS = "";
\r
1523 this.RESULTSOUND = stresult3;
\r
1525 this.db再生速度 = 1.0;
\r
1526 this.strハッシュofDTXファイル = "";
\r
1527 STチップがある stチップがある = new STチップがある();
\r
1528 stチップがある.Drums = false;
\r
1529 stチップがある.Guitar = false;
\r
1530 stチップがある.Bass = false;
\r
1531 stチップがある.HHOpen = false;
\r
1532 stチップがある.Ride = false;
\r
1533 stチップがある.LeftCymbal = false;
\r
1534 stチップがある.OpenGuitar = false;
\r
1535 stチップがある.OpenBass = false;
\r
1536 this.bチップがある = stチップがある;
\r
1537 this.strファイル名 = "";
\r
1538 this.strフォルダ名 = "";
\r
1539 this.strファイル名の絶対パス = "";
\r
1540 this.n無限管理WAV = new int[ 36 * 36 ];
\r
1541 this.n無限管理BPM = new int[ 36 * 36 ];
\r
1542 this.n無限管理VOL = new int[ 36 * 36 ];
\r
1543 this.n無限管理PAN = new int[ 36 * 36 ];
\r
1544 this.n無限管理SIZE = new int[ 36 * 36 ];
\r
1545 this.nRESULTIMAGE用優先順位 = new int[ 7 ];
\r
1546 this.nRESULTMOVIE用優先順位 = new int[ 7 ];
\r
1547 this.nRESULTSOUND用優先順位 = new int[ 7 ];
\r
1549 #if true // 2011.1.1 yyagi GDA->DTX変換テーブル リファクタ後
\r
1550 STGDAPARAM[] stgdaparamArray = new STGDAPARAM[] { // GDA->DTX conversion table
\r
1551 new STGDAPARAM("TC", 0x03), new STGDAPARAM("BL", 0x02), new STGDAPARAM("GS", 0x29),
\r
1552 new STGDAPARAM("DS", 0x30), new STGDAPARAM("FI", 0x53), new STGDAPARAM("HH", 0x11),
\r
1553 new STGDAPARAM("SD", 0x12), new STGDAPARAM("BD", 0x13), new STGDAPARAM("HT", 0x14),
\r
1554 new STGDAPARAM("LT", 0x15), new STGDAPARAM("CY", 0x16), new STGDAPARAM("G1", 0x21),
\r
1555 new STGDAPARAM("G2", 0x22), new STGDAPARAM("G3", 0x23), new STGDAPARAM("G4", 0x24),
\r
1556 new STGDAPARAM("G5", 0x25), new STGDAPARAM("G6", 0x26), new STGDAPARAM("G7", 0x27),
\r
1557 new STGDAPARAM("GW", 0x28), new STGDAPARAM("01", 0x61), new STGDAPARAM("02", 0x62),
\r
1558 new STGDAPARAM("03", 0x63), new STGDAPARAM("04", 0x64), new STGDAPARAM("05", 0x65),
\r
1559 new STGDAPARAM("06", 0x66), new STGDAPARAM("07", 0x67), new STGDAPARAM("08", 0x68),
\r
1560 new STGDAPARAM("09", 0x69), new STGDAPARAM("0A", 0x70), new STGDAPARAM("0B", 0x71),
\r
1561 new STGDAPARAM("0C", 0x72), new STGDAPARAM("0D", 0x73), new STGDAPARAM("0E", 0x74),
\r
1562 new STGDAPARAM("0F", 0x75), new STGDAPARAM("10", 0x76), new STGDAPARAM("11", 0x77),
\r
1563 new STGDAPARAM("12", 0x78), new STGDAPARAM("13", 0x79), new STGDAPARAM("14", 0x80),
\r
1564 new STGDAPARAM("15", 0x81), new STGDAPARAM("16", 0x82), new STGDAPARAM("17", 0x83),
\r
1565 new STGDAPARAM("18", 0x84), new STGDAPARAM("19", 0x85), new STGDAPARAM("1A", 0x86),
\r
1566 new STGDAPARAM("1B", 0x87), new STGDAPARAM("1C", 0x88), new STGDAPARAM("1D", 0x89),
\r
1567 new STGDAPARAM("1E", 0x90), new STGDAPARAM("1F", 0x91), new STGDAPARAM("20", 0x92),
\r
1568 new STGDAPARAM("B1", 0xA1), new STGDAPARAM("B2", 0xA2), new STGDAPARAM("B3", 0xA3),
\r
1569 new STGDAPARAM("B4", 0xA4), new STGDAPARAM("B5", 0xA5), new STGDAPARAM("B6", 0xA6),
\r
1570 new STGDAPARAM("B7", 0xA7), new STGDAPARAM("BW", 0xA8), new STGDAPARAM("G0", 0x20),
\r
1571 new STGDAPARAM("B0", 0xA0)
\r
1573 #else // 2011.1.1 yyagi GDA->DTX変換テーブル リファクタ前
\r
1574 STGDAPARAM[] stgdaparamArray = new STGDAPARAM[62];
\r
1575 STGDAPARAM stgdaparam62 = new STGDAPARAM();
\r
1576 STGDAPARAM stgdaparam = stgdaparam62;
\r
1577 stgdaparam.s = "TC";
\r
1579 stgdaparamArray[ 0 ] = stgdaparam;
\r
1580 stgdaparam62 = new STGDAPARAM();
\r
1581 STGDAPARAM stgdaparam2 = stgdaparam62;
\r
1582 stgdaparam2.s = "BL";
\r
1583 stgdaparam2.c = 2;
\r
1584 stgdaparamArray[ 1 ] = stgdaparam2;
\r
1585 stgdaparam62 = new STGDAPARAM();
\r
1586 STGDAPARAM stgdaparam3 = stgdaparam62;
\r
1587 stgdaparam3.s = "GS";
\r
1588 stgdaparam3.c = 0x29;
\r
1589 stgdaparamArray[ 2 ] = stgdaparam3;
\r
1590 stgdaparam62 = new STGDAPARAM();
\r
1591 STGDAPARAM stgdaparam4 = stgdaparam62;
\r
1592 stgdaparam4.s = "DS";
\r
1593 stgdaparam4.c = 0x30;
\r
1594 stgdaparamArray[ 3 ] = stgdaparam4;
\r
1595 stgdaparam62 = new STGDAPARAM();
\r
1596 STGDAPARAM stgdaparam5 = stgdaparam62;
\r
1597 stgdaparam5.s = "FI";
\r
1598 stgdaparam5.c = 0x53;
\r
1599 stgdaparamArray[ 4 ] = stgdaparam5;
\r
1600 stgdaparam62 = new STGDAPARAM();
\r
1601 STGDAPARAM stgdaparam6 = stgdaparam62;
\r
1602 stgdaparam6.s = "HH";
\r
1603 stgdaparam6.c = 0x11;
\r
1604 stgdaparamArray[ 5 ] = stgdaparam6;
\r
1605 stgdaparam62 = new STGDAPARAM();
\r
1606 STGDAPARAM stgdaparam7 = stgdaparam62;
\r
1607 stgdaparam7.s = "SD";
\r
1608 stgdaparam7.c = 0x12;
\r
1609 stgdaparamArray[ 6 ] = stgdaparam7;
\r
1610 stgdaparam62 = new STGDAPARAM();
\r
1611 STGDAPARAM stgdaparam8 = stgdaparam62;
\r
1612 stgdaparam8.s = "BD";
\r
1613 stgdaparam8.c = 0x13;
\r
1614 stgdaparamArray[ 7 ] = stgdaparam8;
\r
1615 stgdaparam62 = new STGDAPARAM();
\r
1616 STGDAPARAM stgdaparam9 = stgdaparam62;
\r
1617 stgdaparam9.s = "HT";
\r
1618 stgdaparam9.c = 20;
\r
1619 stgdaparamArray[ 8 ] = stgdaparam9;
\r
1620 stgdaparam62 = new STGDAPARAM();
\r
1621 STGDAPARAM stgdaparam10 = stgdaparam62;
\r
1622 stgdaparam10.s = "LT";
\r
1623 stgdaparam10.c = 0x15;
\r
1624 stgdaparamArray[ 9 ] = stgdaparam10;
\r
1625 stgdaparam62 = new STGDAPARAM();
\r
1626 STGDAPARAM stgdaparam11 = stgdaparam62;
\r
1627 stgdaparam11.s = "CY";
\r
1628 stgdaparam11.c = 0x16;
\r
1629 stgdaparamArray[ 10 ] = stgdaparam11;
\r
1630 stgdaparam62 = new STGDAPARAM();
\r
1631 STGDAPARAM stgdaparam12 = stgdaparam62;
\r
1632 stgdaparam12.s = "G1";
\r
1633 stgdaparam12.c = 0x21;
\r
1634 stgdaparamArray[ 11 ] = stgdaparam12;
\r
1635 stgdaparam62 = new STGDAPARAM();
\r
1636 STGDAPARAM stgdaparam13 = stgdaparam62;
\r
1637 stgdaparam13.s = "G2";
\r
1638 stgdaparam13.c = 0x22;
\r
1639 stgdaparamArray[ 12 ] = stgdaparam13;
\r
1640 stgdaparam62 = new STGDAPARAM();
\r
1641 STGDAPARAM stgdaparam14 = stgdaparam62;
\r
1642 stgdaparam14.s = "G3";
\r
1643 stgdaparam14.c = 0x23;
\r
1644 stgdaparamArray[ 13 ] = stgdaparam14;
\r
1645 stgdaparam62 = new STGDAPARAM();
\r
1646 STGDAPARAM stgdaparam15 = stgdaparam62;
\r
1647 stgdaparam15.s = "G4";
\r
1648 stgdaparam15.c = 0x24;
\r
1649 stgdaparamArray[ 14 ] = stgdaparam15;
\r
1650 stgdaparam62 = new STGDAPARAM();
\r
1651 STGDAPARAM stgdaparam16 = stgdaparam62;
\r
1652 stgdaparam16.s = "G5";
\r
1653 stgdaparam16.c = 0x25;
\r
1654 stgdaparamArray[ 15 ] = stgdaparam16;
\r
1655 stgdaparam62 = new STGDAPARAM();
\r
1656 STGDAPARAM stgdaparam17 = stgdaparam62;
\r
1657 stgdaparam17.s = "G6";
\r
1658 stgdaparam17.c = 0x26;
\r
1659 stgdaparamArray[ 0x10 ] = stgdaparam17;
\r
1660 stgdaparam62 = new STGDAPARAM();
\r
1661 STGDAPARAM stgdaparam18 = stgdaparam62;
\r
1662 stgdaparam18.s = "G7";
\r
1663 stgdaparam18.c = 0x27;
\r
1664 stgdaparamArray[ 0x11 ] = stgdaparam18;
\r
1665 stgdaparam62 = new STGDAPARAM();
\r
1666 STGDAPARAM stgdaparam19 = stgdaparam62;
\r
1667 stgdaparam19.s = "GW";
\r
1668 stgdaparam19.c = 40;
\r
1669 stgdaparamArray[ 0x12 ] = stgdaparam19;
\r
1670 stgdaparam62 = new STGDAPARAM();
\r
1671 STGDAPARAM stgdaparam20 = stgdaparam62;
\r
1672 stgdaparam20.s = "01";
\r
1673 stgdaparam20.c = 0x61;
\r
1674 stgdaparamArray[ 0x13 ] = stgdaparam20;
\r
1675 stgdaparam62 = new STGDAPARAM();
\r
1676 STGDAPARAM stgdaparam21 = stgdaparam62;
\r
1677 stgdaparam21.s = "02";
\r
1678 stgdaparam21.c = 0x62;
\r
1679 stgdaparamArray[ 20 ] = stgdaparam21;
\r
1680 stgdaparam62 = new STGDAPARAM();
\r
1681 STGDAPARAM stgdaparam22 = stgdaparam62;
\r
1682 stgdaparam22.s = "03";
\r
1683 stgdaparam22.c = 0x63;
\r
1684 stgdaparamArray[ 0x15 ] = stgdaparam22;
\r
1685 stgdaparam62 = new STGDAPARAM();
\r
1686 STGDAPARAM stgdaparam23 = stgdaparam62;
\r
1687 stgdaparam23.s = "04";
\r
1688 stgdaparam23.c = 100;
\r
1689 stgdaparamArray[ 0x16 ] = stgdaparam23;
\r
1690 stgdaparam62 = new STGDAPARAM();
\r
1691 STGDAPARAM stgdaparam24 = stgdaparam62;
\r
1692 stgdaparam24.s = "05";
\r
1693 stgdaparam24.c = 0x65;
\r
1694 stgdaparamArray[ 0x17 ] = stgdaparam24;
\r
1695 stgdaparam62 = new STGDAPARAM();
\r
1696 STGDAPARAM stgdaparam25 = stgdaparam62;
\r
1697 stgdaparam25.s = "06";
\r
1698 stgdaparam25.c = 0x66;
\r
1699 stgdaparamArray[ 0x18 ] = stgdaparam25;
\r
1700 stgdaparam62 = new STGDAPARAM();
\r
1701 STGDAPARAM stgdaparam26 = stgdaparam62;
\r
1702 stgdaparam26.s = "07";
\r
1703 stgdaparam26.c = 0x67;
\r
1704 stgdaparamArray[ 0x19 ] = stgdaparam26;
\r
1705 stgdaparam62 = new STGDAPARAM();
\r
1706 STGDAPARAM stgdaparam27 = stgdaparam62;
\r
1707 stgdaparam27.s = "08";
\r
1708 stgdaparam27.c = 0x68;
\r
1709 stgdaparamArray[ 0x1a ] = stgdaparam27;
\r
1710 stgdaparam62 = new STGDAPARAM();
\r
1711 STGDAPARAM stgdaparam28 = stgdaparam62;
\r
1712 stgdaparam28.s = "09";
\r
1713 stgdaparam28.c = 0x69;
\r
1714 stgdaparamArray[ 0x1b ] = stgdaparam28;
\r
1715 stgdaparam62 = new STGDAPARAM();
\r
1716 STGDAPARAM stgdaparam29 = stgdaparam62;
\r
1717 stgdaparam29.s = "0A";
\r
1718 stgdaparam29.c = 0x70;
\r
1719 stgdaparamArray[ 0x1c ] = stgdaparam29;
\r
1720 stgdaparam62 = new STGDAPARAM();
\r
1721 STGDAPARAM stgdaparam30 = stgdaparam62;
\r
1722 stgdaparam30.s = "0B";
\r
1723 stgdaparam30.c = 0x71;
\r
1724 stgdaparamArray[ 0x1d ] = stgdaparam30;
\r
1725 stgdaparam62 = new STGDAPARAM();
\r
1726 STGDAPARAM stgdaparam31 = stgdaparam62;
\r
1727 stgdaparam31.s = "0C";
\r
1728 stgdaparam31.c = 0x72;
\r
1729 stgdaparamArray[ 30 ] = stgdaparam31;
\r
1730 stgdaparam62 = new STGDAPARAM();
\r
1731 STGDAPARAM stgdaparam32 = stgdaparam62;
\r
1732 stgdaparam32.s = "0D";
\r
1733 stgdaparam32.c = 0x73;
\r
1734 stgdaparamArray[ 0x1f ] = stgdaparam32;
\r
1735 stgdaparam62 = new STGDAPARAM();
\r
1736 STGDAPARAM stgdaparam33 = stgdaparam62;
\r
1737 stgdaparam33.s = "0E";
\r
1738 stgdaparam33.c = 0x74;
\r
1739 stgdaparamArray[ 0x20 ] = stgdaparam33;
\r
1740 stgdaparam62 = new STGDAPARAM();
\r
1741 STGDAPARAM stgdaparam34 = stgdaparam62;
\r
1742 stgdaparam34.s = "0F";
\r
1743 stgdaparam34.c = 0x75;
\r
1744 stgdaparamArray[ 0x21 ] = stgdaparam34;
\r
1745 stgdaparam62 = new STGDAPARAM();
\r
1746 STGDAPARAM stgdaparam35 = stgdaparam62;
\r
1747 stgdaparam35.s = "10";
\r
1748 stgdaparam35.c = 0x76;
\r
1749 stgdaparamArray[ 0x22 ] = stgdaparam35;
\r
1750 stgdaparam62 = new STGDAPARAM();
\r
1751 STGDAPARAM stgdaparam36 = stgdaparam62;
\r
1752 stgdaparam36.s = "11";
\r
1753 stgdaparam36.c = 0x77;
\r
1754 stgdaparamArray[ 0x23 ] = stgdaparam36;
\r
1755 stgdaparam62 = new STGDAPARAM();
\r
1756 STGDAPARAM stgdaparam37 = stgdaparam62;
\r
1757 stgdaparam37.s = "12";
\r
1758 stgdaparam37.c = 120;
\r
1759 stgdaparamArray[ 0x24 ] = stgdaparam37;
\r
1760 stgdaparam62 = new STGDAPARAM();
\r
1761 STGDAPARAM stgdaparam38 = stgdaparam62;
\r
1762 stgdaparam38.s = "13";
\r
1763 stgdaparam38.c = 0x79;
\r
1764 stgdaparamArray[ 0x25 ] = stgdaparam38;
\r
1765 stgdaparam62 = new STGDAPARAM();
\r
1766 STGDAPARAM stgdaparam39 = stgdaparam62;
\r
1767 stgdaparam39.s = "14";
\r
1768 stgdaparam39.c = 0x80;
\r
1769 stgdaparamArray[ 0x26 ] = stgdaparam39;
\r
1770 stgdaparam62 = new STGDAPARAM();
\r
1771 STGDAPARAM stgdaparam40 = stgdaparam62;
\r
1772 stgdaparam40.s = "15";
\r
1773 stgdaparam40.c = 0x81;
\r
1774 stgdaparamArray[ 0x27 ] = stgdaparam40;
\r
1775 stgdaparam62 = new STGDAPARAM();
\r
1776 STGDAPARAM stgdaparam41 = stgdaparam62;
\r
1777 stgdaparam41.s = "16";
\r
1778 stgdaparam41.c = 130;
\r
1779 stgdaparamArray[ 40 ] = stgdaparam41;
\r
1780 stgdaparam62 = new STGDAPARAM();
\r
1781 STGDAPARAM stgdaparam42 = stgdaparam62;
\r
1782 stgdaparam42.s = "17";
\r
1783 stgdaparam42.c = 0x83;
\r
1784 stgdaparamArray[ 0x29 ] = stgdaparam42;
\r
1785 stgdaparam62 = new STGDAPARAM();
\r
1786 STGDAPARAM stgdaparam43 = stgdaparam62;
\r
1787 stgdaparam43.s = "18";
\r
1788 stgdaparam43.c = 0x84;
\r
1789 stgdaparamArray[ 0x2a ] = stgdaparam43;
\r
1790 stgdaparam62 = new STGDAPARAM();
\r
1791 STGDAPARAM stgdaparam44 = stgdaparam62;
\r
1792 stgdaparam44.s = "19";
\r
1793 stgdaparam44.c = 0x85;
\r
1794 stgdaparamArray[ 0x2b ] = stgdaparam44;
\r
1795 stgdaparam62 = new STGDAPARAM();
\r
1796 STGDAPARAM stgdaparam45 = stgdaparam62;
\r
1797 stgdaparam45.s = "1A";
\r
1798 stgdaparam45.c = 0x86;
\r
1799 stgdaparamArray[ 0x2c ] = stgdaparam45;
\r
1800 stgdaparam62 = new STGDAPARAM();
\r
1801 STGDAPARAM stgdaparam46 = stgdaparam62;
\r
1802 stgdaparam46.s = "1B";
\r
1803 stgdaparam46.c = 0x87;
\r
1804 stgdaparamArray[ 0x2d ] = stgdaparam46;
\r
1805 stgdaparam62 = new STGDAPARAM();
\r
1806 STGDAPARAM stgdaparam47 = stgdaparam62;
\r
1807 stgdaparam47.s = "1C";
\r
1808 stgdaparam47.c = 0x88;
\r
1809 stgdaparamArray[ 0x2e ] = stgdaparam47;
\r
1810 stgdaparam62 = new STGDAPARAM();
\r
1811 STGDAPARAM stgdaparam48 = stgdaparam62;
\r
1812 stgdaparam48.s = "1D";
\r
1813 stgdaparam48.c = 0x89;
\r
1814 stgdaparamArray[ 0x2f ] = stgdaparam48;
\r
1815 stgdaparam62 = new STGDAPARAM();
\r
1816 STGDAPARAM stgdaparam49 = stgdaparam62;
\r
1817 stgdaparam49.s = "1E";
\r
1818 stgdaparam49.c = 0x90;
\r
1819 stgdaparamArray[ 0x30 ] = stgdaparam49;
\r
1820 stgdaparam62 = new STGDAPARAM();
\r
1821 STGDAPARAM stgdaparam50 = stgdaparam62;
\r
1822 stgdaparam50.s = "1F";
\r
1823 stgdaparam50.c = 0x91;
\r
1824 stgdaparamArray[ 0x31 ] = stgdaparam50;
\r
1825 stgdaparam62 = new STGDAPARAM();
\r
1826 STGDAPARAM stgdaparam51 = stgdaparam62;
\r
1827 stgdaparam51.s = "20";
\r
1828 stgdaparam51.c = 0x92;
\r
1829 stgdaparamArray[ 50 ] = stgdaparam51;
\r
1830 stgdaparam62 = new STGDAPARAM();
\r
1831 STGDAPARAM stgdaparam52 = stgdaparam62;
\r
1832 stgdaparam52.s = "B1";
\r
1833 stgdaparam52.c = 0xa1;
\r
1834 stgdaparamArray[ 0x33 ] = stgdaparam52;
\r
1835 stgdaparam62 = new STGDAPARAM();
\r
1836 STGDAPARAM stgdaparam53 = stgdaparam62;
\r
1837 stgdaparam53.s = "B2";
\r
1838 stgdaparam53.c = 0xa2;
\r
1839 stgdaparamArray[ 0x34 ] = stgdaparam53;
\r
1840 stgdaparam62 = new STGDAPARAM();
\r
1841 STGDAPARAM stgdaparam54 = stgdaparam62;
\r
1842 stgdaparam54.s = "B3";
\r
1843 stgdaparam54.c = 0xa3;
\r
1844 stgdaparamArray[ 0x35 ] = stgdaparam54;
\r
1845 stgdaparam62 = new STGDAPARAM();
\r
1846 STGDAPARAM stgdaparam55 = stgdaparam62;
\r
1847 stgdaparam55.s = "B4";
\r
1848 stgdaparam55.c = 0xa4;
\r
1849 stgdaparamArray[ 0x36 ] = stgdaparam55;
\r
1850 stgdaparam62 = new STGDAPARAM();
\r
1851 STGDAPARAM stgdaparam56 = stgdaparam62;
\r
1852 stgdaparam56.s = "B5";
\r
1853 stgdaparam56.c = 0xa5;
\r
1854 stgdaparamArray[ 0x37 ] = stgdaparam56;
\r
1855 stgdaparam62 = new STGDAPARAM();
\r
1856 STGDAPARAM stgdaparam57 = stgdaparam62;
\r
1857 stgdaparam57.s = "B6";
\r
1858 stgdaparam57.c = 0xa6;
\r
1859 stgdaparamArray[ 0x38 ] = stgdaparam57;
\r
1860 stgdaparam62 = new STGDAPARAM();
\r
1861 STGDAPARAM stgdaparam58 = stgdaparam62;
\r
1862 stgdaparam58.s = "B7";
\r
1863 stgdaparam58.c = 0xa7;
\r
1864 stgdaparamArray[ 0x39 ] = stgdaparam58;
\r
1865 stgdaparam62 = new STGDAPARAM();
\r
1866 STGDAPARAM stgdaparam59 = stgdaparam62;
\r
1867 stgdaparam59.s = "BW";
\r
1868 stgdaparam59.c = 0xa8;
\r
1869 stgdaparamArray[ 0x3a ] = stgdaparam59;
\r
1870 stgdaparam62 = new STGDAPARAM();
\r
1871 STGDAPARAM stgdaparam60 = stgdaparam62;
\r
1872 stgdaparam60.s = "G0";
\r
1873 stgdaparam60.c = 0x20;
\r
1874 stgdaparamArray[ 0x3b ] = stgdaparam60;
\r
1875 STGDAPARAM stgdaparam61 = new STGDAPARAM();
\r
1876 stgdaparam61.s = "B0";
\r
1877 stgdaparam61.c = 160;
\r
1878 stgdaparamArray[ 60 ] = stgdaparam61;
\r
1880 this.stGDAParam = stgdaparamArray;
\r
1881 this.nBGMAdjust = 0;
\r
1883 #if TEST_NOTEOFFMODE
\r
1884 this.bHH演奏で直前のHHを消音する = true;
\r
1885 this.bGUITAR演奏で直前のGUITARを消音する = true;
\r
1886 this.bBASS演奏で直前のBASSを消音する = true;
\r
1890 public CDTX( string str全入力文字列 )
\r
1894 this.t入力・全入力文字列から( str全入力文字列 );
\r
1896 public CDTX( string strファイル名, bool bヘッダのみ )
\r
1900 this.t入力( strファイル名, bヘッダのみ );
\r
1902 public CDTX( string str全入力文字列, double db再生速度, int nBGMAdjust )
\r
1906 this.t入力・全入力文字列から( str全入力文字列, db再生速度, nBGMAdjust );
\r
1908 public CDTX( string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust )
\r
1912 this.t入力( strファイル名, bヘッダのみ, db再生速度, nBGMAdjust );
\r
1918 public int nモニタを考慮した音量( E楽器パート part )
\r
1920 CConfigIni configIni = CDTXMania.ConfigIni;
\r
1923 case E楽器パート.DRUMS:
\r
1924 if( configIni.b演奏音を強調する.Drums )
\r
1926 return configIni.n自動再生音量;
\r
1928 return configIni.n手動再生音量;
\r
1930 case E楽器パート.GUITAR:
\r
1931 if( configIni.b演奏音を強調する.Guitar )
\r
1933 return configIni.n自動再生音量;
\r
1935 return configIni.n手動再生音量;
\r
1938 if( configIni.b演奏音を強調する.Bass )
\r
1940 return configIni.n自動再生音量;
\r
1942 return configIni.n手動再生音量;
\r
1944 if( ( !configIni.b演奏音を強調する.Drums && !configIni.b演奏音を強調する.Guitar ) && !configIni.b演奏音を強調する.Bass )
\r
1946 return configIni.n手動再生音量;
\r
1948 return configIni.n自動再生音量;
\r
1950 public void tAVIの読み込み()
\r
1952 if( this.listAVI != null )
\r
1954 foreach( CAVI cavi in this.listAVI.Values )
\r
1956 cavi.OnDeviceCreated();
\r
1959 if( !this.bヘッダのみ )
\r
1961 foreach( CChip chip in this.listChip )
\r
1963 if( chip.nチャンネル番号 == 0x54 )
\r
1965 chip.eAVI種別 = EAVI種別.Unknown;
\r
1967 chip.rAVIPan = null;
\r
1968 if( this.listAVIPAN.ContainsKey( chip.n整数値 ) )
\r
1970 CAVIPAN cavipan = this.listAVIPAN[ chip.n整数値 ];
\r
1971 if( this.listAVI.ContainsKey( cavipan.nAVI番号 ) && ( this.listAVI[ cavipan.nAVI番号 ].avi != null ) )
\r
1973 chip.eAVI種別 = EAVI種別.AVIPAN;
\r
1974 chip.rAVI = this.listAVI[ cavipan.nAVI番号 ];
\r
1975 chip.rAVIPan = cavipan;
\r
1979 if( this.listAVI.ContainsKey( chip.n整数値 ) && ( this.listAVI[ chip.n整数値 ].avi != null ) )
\r
1981 chip.eAVI種別 = EAVI種別.AVI;
\r
1982 chip.rAVI = this.listAVI[ chip.n整数値 ];
\r
1988 public void tBMP_BMPTEXの読み込み()
\r
1990 if( this.listBMP != null )
\r
1992 foreach( CBMP cbmp in this.listBMP.Values )
\r
1994 cbmp.OnDeviceCreated();
\r
1997 if( this.listBMPTEX != null )
\r
1999 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
2001 cbmptex.OnDeviceCreated();
\r
2004 if( !this.bヘッダのみ )
\r
2006 foreach( CChip chip in this.listChip )
\r
2008 if( ( ( ( chip.nチャンネル番号 == 4 ) || ( chip.nチャンネル番号 == 7 ) ) || ( ( chip.nチャンネル番号 >= 0x55 ) && ( chip.nチャンネル番号 <= 0x59 ) ) ) || ( chip.nチャンネル番号 == 0x60 ) )
\r
2010 chip.eBGA種別 = EBGA種別.Unknown;
\r
2012 chip.rBMPTEX = null;
\r
2014 chip.rBGAPan = null;
\r
2015 if( this.listBGAPAN.ContainsKey( chip.n整数値 ) )
\r
2017 CBGAPAN cbgapan = this.listBGAPAN[ chip.n整数値 ];
\r
2018 if( this.listBMPTEX.ContainsKey( cbgapan.nBMP番号 ) && this.listBMPTEX[ cbgapan.nBMP番号 ].bUse )
\r
2020 chip.eBGA種別 = EBGA種別.BGAPAN;
\r
2021 chip.rBMPTEX = this.listBMPTEX[ cbgapan.nBMP番号 ];
\r
2022 chip.rBGAPan = cbgapan;
\r
2025 if( this.listBMP.ContainsKey( cbgapan.nBMP番号 ) && this.listBMP[ cbgapan.nBMP番号 ].bUse )
\r
2027 chip.eBGA種別 = EBGA種別.BGAPAN;
\r
2028 chip.rBMP = this.listBMP[ cbgapan.nBMP番号 ];
\r
2029 chip.rBGAPan = cbgapan;
\r
2033 if( this.listBGA.ContainsKey( chip.n整数値 ) )
\r
2035 CBGA cbga = this.listBGA[ chip.n整数値 ];
\r
2036 if( this.listBMPTEX.ContainsKey( cbga.nBMP番号 ) && this.listBMPTEX[ cbga.nBMP番号 ].bUse )
\r
2038 chip.eBGA種別 = EBGA種別.BGA;
\r
2039 chip.rBMPTEX = this.listBMPTEX[ cbga.nBMP番号 ];
\r
2043 if( this.listBMP.ContainsKey( cbga.nBMP番号 ) && this.listBMP[ cbga.nBMP番号 ].bUse )
\r
2045 chip.eBGA種別 = EBGA種別.BGA;
\r
2046 chip.rBMP = this.listBMP[ cbga.nBMP番号 ];
\r
2051 if( this.listBMPTEX.ContainsKey( chip.n整数値 ) && this.listBMPTEX[ chip.n整数値 ].bUse )
\r
2053 chip.eBGA種別 = EBGA種別.BMPTEX;
\r
2054 chip.rBMPTEX = this.listBMPTEX[ chip.n整数値 ];
\r
2057 if( this.listBMP.ContainsKey( chip.n整数値 ) && this.listBMP[ chip.n整数値 ].bUse )
\r
2059 chip.eBGA種別 = EBGA種別.BMP;
\r
2060 chip.rBMP = this.listBMP[ chip.n整数値 ];
\r
2064 if( ( ( ( chip.nチャンネル番号 == 0xc4 ) || ( chip.nチャンネル番号 == 0xc7 ) ) || ( ( chip.nチャンネル番号 >= 0xd5 ) && ( chip.nチャンネル番号 <= 0xd9 ) ) ) || ( chip.nチャンネル番号 == 0xe0 ) )
\r
2066 chip.eBGA種別 = EBGA種別.Unknown;
\r
2068 chip.rBMPTEX = null;
\r
2070 chip.rBGAPan = null;
\r
2071 if( this.listBMPTEX.ContainsKey( chip.n整数値 ) && this.listBMPTEX[ chip.n整数値 ].bUse )
\r
2073 chip.eBGA種別 = EBGA種別.BMPTEX;
\r
2074 chip.rBMPTEX = this.listBMPTEX[ chip.n整数値 ];
\r
2076 else if( this.listBMP.ContainsKey( chip.n整数値 ) && this.listBMP[ chip.n整数値 ].bUse )
\r
2078 chip.eBGA種別 = EBGA種別.BMP;
\r
2079 chip.rBMP = this.listBMP[ chip.n整数値 ];
\r
2085 public void tWave再生位置自動補正()
\r
2087 foreach( CWAV cwav in this.listWAV.Values )
\r
2089 this.tWave再生位置自動補正( cwav );
\r
2092 public void tWave再生位置自動補正( CWAV wc )
\r
2094 for( int i = 0; i < 4; i++ )
\r
2096 if( ( ( wc.rSound[ i ] != null ) && wc.rSound[ i ].b再生中 ) && ( wc.rSound[ i ].n総演奏時間ms >= 5000 ) )
\r
2098 long nCurrentTime = CDTXMania.Timer.nシステム時刻;
\r
2099 if( nCurrentTime > wc.n再生開始時刻[ i ] )
\r
2101 long nAbsTimeFromStartPlaying = nCurrentTime - wc.n再生開始時刻[ i ];
\r
2102 wc.rSound[ i ].t再生位置を変更する( wc.rSound[ i ].t時刻から位置を返す( nAbsTimeFromStartPlaying ) );
\r
2107 public void tWavの再生停止( int nWaveの内部番号 )
\r
2109 if( this.listWAV.ContainsKey( nWaveの内部番号 ) )
\r
2111 CWAV cwav = this.listWAV[ nWaveの内部番号 ];
\r
2112 for( int i = 0; i < 4; i++ )
\r
2114 if( cwav.rSound[ i ] != null )
\r
2116 cwav.rSound[ i ].t再生を停止する();
\r
2121 public void tWAVの読み込み()
\r
2123 // Trace.TraceInformation("WAV files={0}", this.listWAV.Count);
\r
2125 foreach (CWAV cwav in this.listWAV.Values)
\r
2127 // string strCount = count.ToString() + " / " + this.listWAV.Count.ToString();
\r
2128 // Debug.WriteLine(strCount);
\r
2129 // CDTXMania.act文字コンソール.tPrint(0, 0, C文字コンソール.Eフォント種別.白, strCount);
\r
2132 string str = string.IsNullOrEmpty(this.PATH_WAV) ? this.strフォルダ名 : this.PATH_WAV;
\r
2133 str = str + cwav.strファイル名;
\r
2136 for( int i = 0; i < 4; i++ )
\r
2140 cwav.rSound[i] = CDTXMania.Sound管理.tサウンドを生成する(str);
\r
2141 cwav.rSound[ i ].n音量 = 100;
\r
2142 if( ( i == 0 ) && CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
2144 Trace.TraceInformation( "サウンドを作成しました。({3})({0})({1})({2}bytes)", new object[] { cwav.strコメント文, str, cwav.rSound[ i ].nサウンドバッファサイズ, cwav.rSound[ i ].bストリーム再生する ? "Stream" : "OnMemory" } );
\r
2149 cwav.rSound[ i ] = null;
\r
2152 Trace.TraceError( "サウンドの作成に失敗しました。({0})({1})", new object[] { cwav.strコメント文, str } );
\r
2155 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].bストリーム再生する )
\r
2159 // Type t = typeof(CSound);
\r
2160 // MethodInfo[] methods = t.GetMethods(
\r
2161 // BindingFlags.Public | BindingFlags.NonPublic |
\r
2162 // BindingFlags.Instance | BindingFlags.Static
\r
2165 // for (int j = 1; j < 3; j++)
\r
2167 // SlimDX.DirectSound.SoundBuffer result;
\r
2168 // CDTXMania.Sound管理.Device.DuplicateSoundBuffer(
\r
2169 // cwav.rSound[0].Buffer,
\r
2171 // cwav.rSound[j].Buffer = (SlimDX.DirectSound.SecondarySoundBuffer)result;
\r
2172 // cwav.rSound[j].bストリーム再生する = cwav.rSound[0].bストリーム再生する;
\r
2173 // cwav.rSound[j].bループする
\r
2174 // foreach(MethodInfo m in methods) {
\r
2175 // if (m cwav..rSound[j].
\r
2177 // cwav.rSound[0].Buffer.
\r
2179 cwav.rSound[1] = cwav.rSound[0]; // #24007 2010.11.23 yyagi add: to accelerate loading chip sounds
\r
2180 cwav.rSound[2] = cwav.rSound[0]; //
\r
2181 cwav.rSound[3] = cwav.rSound[0]; //
\r
2186 catch( Exception exception )
\r
2188 Trace.TraceError( "サウンドの生成に失敗しました。({0})({1})({2})", new object[] { exception.Message, cwav.strコメント文, str } );
\r
2189 for( int j = 0; j < 4; j++ )
\r
2191 cwav.rSound[ j ] = null;
\r
2197 public static string tZZ( int n )
\r
2199 if( ( n < 0 ) || ( n >= 36 * 36) )
\r
2203 string str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
\r
2204 return new string( new char[] { str[ n / 36 ], str[ n % 36 ] } );
\r
2208 /// ギターのレーンビットパターン
\r
2210 public enum Eレーンビットパターン
\r
2221 public void tギターとベースのランダム化(E楽器パート part, Eランダムモード eRandom)
\r
2223 if( ( ( part == E楽器パート.GUITAR ) || ( part == E楽器パート.BASS ) ) && ( eRandom != Eランダムモード.OFF ) )
\r
2225 int[,] nランダムレーン候補 = new int[ , ] { { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 2, 1, 3, 4, 6, 5, 7 }, { 0, 1, 4, 5, 2, 3, 6, 7 }, { 0, 2, 4, 6, 1, 3, 5, 7 }, { 0, 4, 1, 5, 2, 6, 3, 7 }, { 0, 4, 2, 6, 1, 5, 3, 7 } };
\r
2226 int n小節番号 = -10000;
\r
2227 int n小節内乱数6通り = 0;
\r
2228 // int GOTO_END = 0; // gotoの飛び先のダミーコードで使うダミー変数
\r
2229 foreach( CChip chip in this.listChip )
\r
2231 int nRGBレーンビットパターン;
\r
2232 int n新RGBレーンビットパターン = 0; // 「未割り当てのローカル変数」ビルドエラー回避のために0を初期値に設定
\r
2234 if( ( chip.n発声位置 / 384 ) != n小節番号 ) // 小節が変化したら
\r
2236 n小節番号 = chip.n発声位置 / 384;
\r
2237 n小節内乱数6通り = CDTXMania.Random.Next( 6 );
\r
2239 int nランダム化前チャンネル番号 = chip.nチャンネル番号;
\r
2240 if( ( ( ( part != E楽器パート.GUITAR ) || ( 0x20 > nランダム化前チャンネル番号 ) ) || ( nランダム化前チャンネル番号 > 0x27 ) )
\r
2241 && ( ( ( part != E楽器パート.BASS ) || ( 0xA0 > nランダム化前チャンネル番号 ) ) || ( nランダム化前チャンネル番号 > 0xa7 ) )
\r
2248 case Eランダムモード.RANDOM: // 1小節単位でレーンのR/G/Bがランダムに入れ替わる
\r
2249 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | nランダムレーン候補[ n小節内乱数6通り, nランダム化前チャンネル番号 & 0x07 ];
\r
2250 continue; // goto Label_02C4;
\r
2252 case Eランダムモード.SUPERRANDOM: // チップごとにR/G/Bがランダムで入れ替わる(レーンの本数までは変わらない)。
\r
2253 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | nランダムレーン候補[ CDTXMania.Random.Next( 6 ), nランダム化前チャンネル番号 & 0x07 ];
\r
2254 continue; // goto Label_02C4;
\r
2256 case Eランダムモード.HYPERRANDOM: // レーンの本数も変わる
\r
2257 nRGBレーンビットパターン = nランダム化前チャンネル番号 & 7;
\r
2258 // n新RGBレーンビットパターン = (int)Eレーンビットパターン.OPEN; // この値は結局未使用なので削除
\r
2259 flag = ((part == E楽器パート.GUITAR) && this.bチップがある.OpenGuitar) || ((part == E楽器パート.BASS) && this.bチップがある.OpenBass); // #23546 2010.10.28 yyagi fixed (bチップがある.Bass→bチップがある.OpenBass)
\r
2260 if (((nRGBレーンビットパターン != (int)Eレーンビットパターン.xxB) && (nRGBレーンビットパターン != (int)Eレーンビットパターン.xGx)) && (nRGBレーンビットパターン != (int)Eレーンビットパターン.Rxx)) // xxB, xGx, Rxx レーン1本相当
\r
2262 break; // レーン1本相当でなければ、とりあえず先に進む
\r
2264 n新RGBレーンビットパターン = CDTXMania.Random.Next( 6 ) + 1; // レーン1本相当なら、レーン1本か2本(1~6)に変化して終了
\r
2268 continue; // goto Label_02C4;
\r
2270 switch( nRGBレーンビットパターン )
\r
2272 case (int)Eレーンビットパターン.xGB: // xGB レーン2本相当
\r
2273 case (int)Eレーンビットパターン.RxB: // RxB
\r
2274 case (int)Eレーンビットパターン.RGx: // RGx
\r
2275 n新RGBレーンビットパターン = flag ? CDTXMania.Random.Next( 8 ) : ( CDTXMania.Random.Next( 7 ) + 1 ); // OPENあり譜面ならOPENを含むランダム, OPENなし譜面ならOPENを含まないランダム
\r
2276 break; // goto Label_02B2;
\r
2279 if( nRGBレーンビットパターン == (int)Eレーンビットパターン.RGB ) // RGB レーン3本相当
\r
2281 if( flag ) // OPENあり譜面の場合
\r
2283 int n乱数パーセント = CDTXMania.Random.Next( 100 );
\r
2284 if( n乱数パーセント < 30 )
\r
2286 n新RGBレーンビットパターン = (int)Eレーンビットパターン.OPEN;
\r
2288 else if( n乱数パーセント < 60 )
\r
2290 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGB;
\r
2292 else if( n乱数パーセント < 85 )
\r
2294 switch( CDTXMania.Random.Next( 3 ) )
\r
2297 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGB;
\r
2298 break; // goto Label_02B2;
\r
2301 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RxB;
\r
2302 break; // goto Label_02B2;
\r
2304 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGx;
\r
2308 switch( CDTXMania.Random.Next( 3 ) )
\r
2311 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xxB;
\r
2312 break; // goto Label_02B2;
\r
2315 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGx;
\r
2316 break; // goto Label_02B2;
\r
2318 n新RGBレーンビットパターン = (int)Eレーンビットパターン.Rxx;
\r
2321 else // OPENなし譜面の場合
\r
2323 int n乱数パーセント = CDTXMania.Random.Next( 100 );
\r
2324 if( n乱数パーセント < 60 )
\r
2326 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGB;
\r
2328 else if( n乱数パーセント < 85 )
\r
2330 switch( CDTXMania.Random.Next( 3 ) )
\r
2333 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGB;
\r
2334 break; // goto Label_02B2;
\r
2337 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RxB;
\r
2338 break; // goto Label_02B2;
\r
2340 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGx;
\r
2344 switch( CDTXMania.Random.Next( 3 ) )
\r
2347 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xxB;
\r
2348 break; // goto Label_02B2;
\r
2351 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGx;
\r
2352 break; // goto Label_02B2;
\r
2354 n新RGBレーンビットパターン = (int)Eレーンビットパターン.Rxx;
\r
2358 break; // goto Label_02B2;
\r
2361 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | n新RGBレーンビットパターン;
\r
2363 // GOTO_END++; // goto用のダミーコード
\r
2367 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane )
\r
2369 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, CDTXMania.ConfigIni.n自動再生音量, false, false );
\r
2371 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane, int nVol )
\r
2373 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, nVol, false, false );
\r
2375 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane, int nVol, bool bMIDIMonitor )
\r
2377 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, nVol, bMIDIMonitor, false );
\r
2379 public void tチップの再生( CChip pChip, long n再生開始システム時刻ms, int nLane, int nVol, bool bMIDIMonitor, bool bBad )
\r
2381 if( pChip.n整数値・内部番号 >= 0 )
\r
2383 if( ( nLane < 0 ) || ( nLane > 10 ) )
\r
2385 throw new ArgumentOutOfRangeException();
\r
2387 if( this.listWAV.ContainsKey( pChip.n整数値・内部番号 ) )
\r
2389 CWAV wc = this.listWAV[ pChip.n整数値・内部番号 ];
\r
2390 int index = wc.n現在再生中のサウンド番号 = ( wc.n現在再生中のサウンド番号 + 1 ) % 4;
\r
2391 if( ( wc.rSound[ 0 ] != null ) && wc.rSound[ 0 ].bストリーム再生する )
\r
2393 index = wc.n現在再生中のサウンド番号 = 0;
\r
2395 CSound sound = wc.rSound[ index ];
\r
2396 if( sound != null )
\r
2398 sound.n音量 = (int) ( ( (double) ( nVol * wc.n音量 ) ) / 100.0 );
\r
2399 sound.n位置 = wc.n位置;
\r
2402 sound.db周波数倍率 = ( (float) ( 100 + ( ( ( CDTXMania.Random.Next( 3 ) + 1 ) * 7 ) * ( 1 - ( CDTXMania.Random.Next( 2 ) * 2 ) ) ) ) ) / 100f;
\r
2406 sound.db周波数倍率 = 1.0;
\r
2408 sound.db再生速度 = ( (double) CDTXMania.ConfigIni.n演奏速度 ) / 20.0;
\r
2411 wc.n再生開始時刻[ wc.n現在再生中のサウンド番号 ] = n再生開始システム時刻ms;
\r
2412 this.tWave再生位置自動補正( wc );
\r
2416 public void t各自動再生音チップの再生時刻を変更する( int nBGMAdjustの増減値 )
\r
2418 this.nBGMAdjust += nBGMAdjustの増減値;
\r
2419 for( int i = 0; i < this.listChip.Count; i++ )
\r
2421 int nChannelNumber = this.listChip[ i ].nチャンネル番号;
\r
2423 ( nChannelNumber == 1 ) ||
\r
2424 ( ( 0x61 <= nChannelNumber ) && ( nChannelNumber <= 0x69 ) )
\r
2426 ( ( 0x70 <= nChannelNumber ) && ( nChannelNumber <= 0x79 ) )
\r
2428 ( ( ( 0x80 <= nChannelNumber ) && ( nChannelNumber <= 0x89 ) ) || ( ( 0x90 <= nChannelNumber ) && ( nChannelNumber <= 0x92 ) ) )
\r
2431 this.listChip[ i ].n発声時刻ms += nBGMAdjustの増減値;
\r
2434 foreach( CWAV cwav in this.listWAV.Values )
\r
2436 for( int j = 0; j < 4; j++ )
\r
2438 if( ( cwav.rSound[ j ] != null ) && cwav.rSound[ j ].b再生中 )
\r
2440 cwav.n再生開始時刻[ j ] += nBGMAdjustの増減値;
\r
2445 public void t全チップの再生一時停止()
\r
2447 foreach( CWAV cwav in this.listWAV.Values )
\r
2449 for( int i = 0; i < 4; i++ )
\r
2451 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].b再生中 )
\r
2453 cwav.rSound[ i ].t再生を一時停止する();
\r
2454 cwav.n一時停止時刻[ i ] = CDTXMania.Timer.nシステム時刻;
\r
2459 public void t全チップの再生再開()
\r
2461 foreach( CWAV cwav in this.listWAV.Values )
\r
2463 for( int i = 0; i < 4; i++ )
\r
2465 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].b一時停止中 )
\r
2467 long num1 = cwav.n一時停止時刻[ i ];
\r
2468 long num2 = cwav.n再生開始時刻[ i ];
\r
2469 cwav.rSound[ i ].t再生を再開する( cwav.n一時停止時刻[ i ] - cwav.n再生開始時刻[ i ] );
\r
2470 cwav.n再生開始時刻[ i ] += CDTXMania.Timer.nシステム時刻 - cwav.n一時停止時刻[ i ];
\r
2475 public void t全チップの再生停止()
\r
2477 foreach( CWAV cwav in this.listWAV.Values )
\r
2479 this.tWavの再生停止( cwav.n内部番号 );
\r
2482 public void t入力( string strファイル名, bool bヘッダのみ )
\r
2484 this.t入力( strファイル名, bヘッダのみ, 1.0, 0 );
\r
2486 public void t入力( string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust )
\r
2488 this.bヘッダのみ = bヘッダのみ;
\r
2489 this.strファイル名の絶対パス = Path.GetFullPath( strファイル名 );
\r
2490 this.strファイル名 = Path.GetFileName( this.strファイル名の絶対パス );
\r
2491 this.strフォルダ名 = Path.GetDirectoryName( this.strファイル名の絶対パス ) + @"\";
\r
2492 string ext = Path.GetExtension( this.strファイル名 ).ToLower();
\r
2495 if( !( ext == ".dtx" ) )
\r
2497 if( ext == ".gda" )
\r
2499 this.e種別 = E種別.GDA;
\r
2501 else if( ext == ".g2d" )
\r
2503 this.e種別 = E種別.G2D;
\r
2505 else if( ext == ".bms" )
\r
2507 this.e種別 = E種別.BMS;
\r
2509 else if( ext == ".bme" )
\r
2511 this.e種別 = E種別.BME;
\r
2513 else if( ext == ".mid" )
\r
2515 this.e種別 = E種別.SMF;
\r
2520 this.e種別 = E種別.DTX;
\r
2523 if( this.e種別 != E種別.SMF )
\r
2525 StreamReader reader = new StreamReader( strファイル名, Encoding.GetEncoding( "shift-jis" ) );
\r
2526 string str2 = reader.ReadToEnd();
\r
2528 this.t入力・全入力文字列から( str2, db再生速度, nBGMAdjust );
\r
2532 Trace.TraceWarning( "SMF の演奏は未対応です。(検討中)" );
\r
2535 public void t入力・全入力文字列から( string str全入力文字列 )
\r
2537 this.t入力・全入力文字列から( str全入力文字列, 1.0, 0 );
\r
2539 public unsafe void t入力・全入力文字列から( string str全入力文字列, double db再生速度, int nBGMAdjust )
\r
2541 if( !string.IsNullOrEmpty( str全入力文字列 ) )
\r
2543 this.db再生速度 = db再生速度;
\r
2544 str全入力文字列 = str全入力文字列.Replace( Environment.NewLine, "\n" );
\r
2545 str全入力文字列 = str全入力文字列.Replace( '\t', ' ' );
\r
2546 str全入力文字列 = str全入力文字列 + "\n";
\r
2547 for( int j = 0; j < 36 * 36; j++ )
\r
2549 this.n無限管理WAV[ j ] = -j;
\r
2550 this.n無限管理BPM[ j ] = -j;
\r
2551 this.n無限管理VOL[ j ] = -j;
\r
2552 this.n無限管理PAN[ j ] = -10000 - j;
\r
2553 this.n無限管理SIZE[ j ] = -j;
\r
2555 this.n内部番号WAV1to = 1;
\r
2556 this.n内部番号BPM1to = 1;
\r
2557 this.bstackIFからENDIFをスキップする = new Stack<bool>();
\r
2558 this.bstackIFからENDIFをスキップする.Push( false );
\r
2560 for( int k = 0; k < 7; k++ )
\r
2562 this.nRESULTIMAGE用優先順位[ k ] = 0;
\r
2563 this.nRESULTMOVIE用優先順位[ k ] = 0;
\r
2564 this.nRESULTSOUND用優先順位[ k ] = 0;
\r
2566 CharEnumerator ce = str全入力文字列.GetEnumerator();
\r
2567 if( ce.MoveNext() )
\r
2572 if( !this.t入力・空白と改行をスキップする( ref ce ) )
\r
2576 if( ce.Current == '#' )
\r
2578 if( ce.MoveNext() )
\r
2580 StringBuilder builder = new StringBuilder( 0x20 );
\r
2581 if( this.t入力・コマンド文字列を抜き出す( ref ce, ref builder ) )
\r
2583 StringBuilder builder2 = new StringBuilder( 0x400 );
\r
2584 if( this.t入力・パラメータ文字列を抜き出す( ref ce, ref builder2 ) )
\r
2586 StringBuilder builder3 = new StringBuilder( 0x400 );
\r
2587 if( this.t入力・コメント文字列を抜き出す( ref ce, ref builder3 ) )
\r
2589 this.t入力・行解析( ref builder, ref builder2, ref builder3 );
\r
2599 while( this.t入力・コメントをスキップする( ref ce ) );
\r
2600 this.n無限管理WAV = null;
\r
2601 this.n無限管理BPM = null;
\r
2602 this.n無限管理VOL = null;
\r
2603 this.n無限管理PAN = null;
\r
2604 this.n無限管理SIZE = null;
\r
2605 if( !this.bヘッダのみ )
\r
2609 foreach( CBPM cbpm2 in this.listBPM.Values )
\r
2611 if( cbpm2.n表記上の番号 == 0 )
\r
2617 if( cbpm == null )
\r
2619 cbpm = new CBPM();
\r
2620 cbpm.n内部番号 = this.n内部番号BPM1to++;
\r
2622 cbpm.dbBPM値 = 120.0;
\r
2623 this.listBPM.Add( cbpm.n内部番号, cbpm );
\r
2624 CChip item = new CChip();
\r
2626 item.nチャンネル番号 = 8;
\r
2628 item.n整数値・内部番号 = cbpm.n内部番号;
\r
2629 this.listChip.Add( item );
\r
2633 CChip chip2 = new CChip();
\r
2635 chip2.nチャンネル番号 = 8;
\r
2637 chip2.n整数値・内部番号 = cbpm.n内部番号;
\r
2638 this.listChip.Add( chip2 );
\r
2640 if( this.listBMP.ContainsKey( 0 ) )
\r
2642 CChip chip4 = new CChip();
\r
2644 chip4.nチャンネル番号 = 4;
\r
2646 chip4.n整数値・内部番号 = 0;
\r
2647 CChip chip3 = chip4;
\r
2648 this.listChip.Add( chip3 );
\r
2650 foreach( CWAV cwav in this.listWAV.Values )
\r
2652 if( cwav.nチップサイズ < 0 )
\r
2654 cwav.nチップサイズ = 100;
\r
2656 if( cwav.n位置 <= -10000 )
\r
2660 if( cwav.n音量 < 0 )
\r
2665 foreach( CWAV cwav2 in this.listWAV.Values )
\r
2667 foreach( CChip chip5 in this.listChip )
\r
2669 if( chip5.n整数値・内部番号 == cwav2.n内部番号 )
\r
2671 chip5.dbチップサイズ倍率 = ( (double) cwav2.nチップサイズ ) / 100.0;
\r
2675 for( int m = 0xb1; m <= 0xbb; m++ )
\r
2677 foreach( CChip chip6 in this.listChip )
\r
2679 if( chip6.nチャンネル番号 == m )
\r
2681 CChip chip7 = new CChip();
\r
2683 chip7.nチャンネル番号 = chip6.nチャンネル番号;
\r
2684 chip7.n整数値 = chip6.n整数値;
\r
2685 chip7.n整数値・内部番号 = chip6.n整数値・内部番号;
\r
2686 this.listChip.Add( chip7 );
\r
2691 if( this.listChip.Count > 0 )
\r
2693 this.listChip.Sort();
\r
2694 double num4 = 1.0;
\r
2695 int num5 = ( this.listChip[ this.listChip.Count - 1 ].n発声位置 + 384 ) - ( this.listChip[ this.listChip.Count - 1 ].n発声位置 % 384 );
\r
2696 for( int num6 = 0; num6 <= num5; num6 += 384 )
\r
2698 CChip chip8 = new CChip();
\r
2699 chip8.n発声位置 = num6;
\r
2700 chip8.nチャンネル番号 = 80;
\r
2701 chip8.n整数値 = 0x50f;
\r
2702 this.listChip.Add( chip8 );
\r
2704 this.listChip.Sort();
\r
2707 for( int num9 = 0; num9 < num5; num9 += 384 )
\r
2710 while( ( num8 < this.listChip.Count ) && ( this.listChip[ num8 ].n発声位置 < ( num9 + 384 ) ) )
\r
2712 if( this.listChip[ num8 ].nチャンネル番号 == 0xc1 )
\r
2714 num10 = this.listChip[ num8 ].n発声位置 - num9;
\r
2718 if( ( this.e種別 == E種別.BMS ) || ( this.e種別 == E種別.BME ) )
\r
2722 while( ( num7 < this.listChip.Count ) && ( this.listChip[ num7 ].n発声位置 <= num9 ) )
\r
2724 if( this.listChip[ num7 ].nチャンネル番号 == 2 )
\r
2726 num4 = this.listChip[ num7 ].db実数値;
\r
2730 for( int num11 = 0; num11 < 100; num11++ )
\r
2732 int num12 = (int) ( ( (double) ( 384 * num11 ) ) / ( 4.0 * num4 ) );
\r
2733 if( ( num12 + num10 ) >= 384 )
\r
2737 if( ( ( num12 + num10 ) % 384 ) != 0 )
\r
2739 CChip chip9 = new CChip();
\r
2740 chip9.n発声位置 = ( num9 + num12 ) + num10;
\r
2741 chip9.nチャンネル番号 = 0x51;
\r
2742 chip9.n整数値 = 36 * 36 - 1;
\r
2743 this.listChip.Add( chip9 );
\r
2747 this.listChip.Sort();
\r
2750 Predicate<CChip> match = null;
\r
2751 for( int i = 0; i < this.listChip.Count; i++ )
\r
2753 int startIndex = i;
\r
2756 if( match == null )
\r
2758 match = delegate( CChip c )
\r
2760 return ( c.nチャンネル番号 == 0xc2 ) && ( c.n発声位置 == this.listChip[ i ].n発声位置 );
\r
2763 startIndex = this.listChip.FindIndex( startIndex, match );
\r
2764 if( startIndex == -1 )
\r
2768 if( this.listChip[ startIndex ].n整数値 == 1 )
\r
2772 if( this.listChip[ startIndex ].n整数値 == 2 )
\r
2778 if( ( ( this.listChip[ i ].nチャンネル番号 == 80 ) || ( this.listChip[ i ].nチャンネル番号 == 0x51 ) ) && ( this.listChip[ i ].n整数値 == 0x50f ) )
\r
2780 this.listChip[ i ].b可視 = flag;
\r
2783 double bpm = 120.0;
\r
2784 double num15 = 1.0;
\r
2788 foreach( CChip chip10 in this.listChip )
\r
2790 chip10.n発声時刻ms = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2791 if( ( ( this.e種別 == E種別.BMS ) || ( this.e種別 == E種別.BME ) ) && ( ( num15 != 1.0 ) && ( ( chip10.n発声位置 / 384) != nBar ) ) )
\r
2793 num16 = chip10.n発声位置;
\r
2794 num17 = chip10.n発声時刻ms;
\r
2797 nBar = chip10.n発声位置 / 384;
\r
2798 num26 = chip10.nチャンネル番号;
\r
2803 num16 = chip10.n発声位置;
\r
2804 num17 = chip10.n発声時刻ms;
\r
2805 num15 = chip10.db実数値;
\r
2810 num16 = chip10.n発声位置;
\r
2811 num17 = chip10.n発声時刻ms;
\r
2812 bpm = this.BASEBPM + chip10.n整数値;
\r
2838 num16 = chip10.n発声位置;
\r
2839 num17 = chip10.n発声時刻ms;
\r
2840 if( this.listBPM.ContainsKey( chip10.n整数値・内部番号 ) )
\r
2842 bpm = ( ( this.listBPM[ chip10.n整数値・内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + this.listBPM[ chip10.n整数値・内部番号 ].dbBPM値;
\r
2848 if( this.listAVIPAN.ContainsKey( chip10.n整数値 ) )
\r
2850 int num21 = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2851 int num22 = num17 + ( (int) ( ( ( 0x271 * ( ( chip10.n発声位置 + this.listAVIPAN[ chip10.n整数値 ].n移動時間ct ) - num16 ) ) * num15 ) / bpm ) );
\r
2852 chip10.n総移動時間 = num22 - num21;
\r
2861 if( this.listBGAPAN.ContainsKey( chip10.n整数値 ) )
\r
2863 int num19 = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2864 int num20 = num17 + ( (int) ( ( ( 0x271 * ( ( chip10.n発声位置 + this.listBGAPAN[ chip10.n整数値 ].n移動時間ct ) - num16 ) ) * num15 ) / bpm ) );
\r
2865 chip10.n総移動時間 = num20 - num19;
\r
2868 if( this.db再生速度 > 0.0 )
\r
2870 foreach( CChip chip11 in this.listChip )
\r
2872 chip11.n発声時刻ms = (int) ( ( (double) chip11.n発声時刻ms ) / this.db再生速度 );
\r
2875 this.nBGMAdjust = 0;
\r
2876 this.t各自動再生音チップの再生時刻を変更する( nBGMAdjust );
\r
2877 for( int n = 0; n < 12; n++ )
\r
2879 this.n可視チップ数[ n ] = 0;
\r
2881 foreach( CChip chip12 in this.listChip )
\r
2883 int num24 = chip12.nチャンネル番号;
\r
2884 if( ( 0x11 <= num24 ) && ( num24 <= 0x1a ) )
\r
2886 this.n可視チップ数[ num24 - 0x11 ]++;
\r
2888 if( ( 0x20 <= num24 ) && ( num24 <= 0x27 ) )
\r
2890 this.n可視チップ数.Guitar++;
\r
2892 if( ( 0xA0 <= num24 ) && ( num24 <= 0xa7 ) )
\r
2894 this.n可視チップ数.Bass++;
\r
2897 foreach( CChip chip13 in this.listChip )
\r
2899 if( ( chip13.bWAVを使うチャンネルである && this.listWAV.ContainsKey( chip13.n整数値・内部番号 ) ) && !this.listWAV[ chip13.n整数値・内部番号 ].listこのWAVを使用するチャンネル番号の集合.Contains( chip13.nチャンネル番号 ) )
\r
2901 this.listWAV[ chip13.n整数値・内部番号 ].listこのWAVを使用するチャンネル番号の集合.Add( chip13.nチャンネル番号 );
\r
2904 byte[] buffer = null;
\r
2907 FileStream stream = new FileStream( this.strファイル名の絶対パス, FileMode.Open, FileAccess.Read );
\r
2908 buffer = new byte[ stream.Length ];
\r
2909 stream.Read( buffer, 0, (int) stream.Length );
\r
2912 catch( Exception exception )
\r
2914 Trace.TraceError( exception.Message );
\r
2915 Trace.TraceError( "DTXのハッシュの計算に失敗しました。({0})", new object[] { this.strファイル名の絶対パス } );
\r
2917 if( buffer != null )
\r
2919 byte[] buffer2 = new MD5CryptoServiceProvider().ComputeHash( buffer );
\r
2920 StringBuilder builder4 = new StringBuilder();
\r
2921 foreach( byte num25 in buffer2 )
\r
2923 builder4.Append( num25.ToString( "x2" ) );
\r
2925 this.strハッシュofDTXファイル = builder4.ToString();
\r
2929 this.strハッシュofDTXファイル = "00000000000000000000000000000000";
\r
2931 if( CDTXMania.ConfigIni.bLogDTX詳細ログ出力 )
\r
2933 foreach( CWAV cwav3 in this.listWAV.Values )
\r
2935 Trace.TraceInformation( cwav3.ToString() );
\r
2937 foreach( CAVI cavi in this.listAVI.Values )
\r
2939 Trace.TraceInformation( cavi.ToString() );
\r
2941 foreach( CAVIPAN cavipan in this.listAVIPAN.Values )
\r
2943 Trace.TraceInformation( cavipan.ToString() );
\r
2945 foreach( CBGA cbga in this.listBGA.Values )
\r
2947 Trace.TraceInformation( cbga.ToString() );
\r
2949 foreach( CBGAPAN cbgapan in this.listBGAPAN.Values )
\r
2951 Trace.TraceInformation( cbgapan.ToString() );
\r
2953 foreach( CBMP cbmp in this.listBMP.Values )
\r
2955 Trace.TraceInformation( cbmp.ToString() );
\r
2957 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
2959 Trace.TraceInformation( cbmptex.ToString() );
\r
2961 foreach( CBPM cbpm3 in this.listBPM.Values )
\r
2963 Trace.TraceInformation( cbpm3.ToString() );
\r
2965 foreach( CChip chip14 in this.listChip )
\r
2967 Trace.TraceInformation( chip14.ToString() );
\r
2976 /// Swap infos between Guitar and Bass (notes, level, n可視チップ数, bチップがある)
\r
2978 public void SwapGuitarBassInfos() // #24063 2011.1.24 yyagi ギターとベースの譜面情報入替
\r
2980 for (int i = this.listChip.Count - 1; i >= 0; i--) {
\r
2981 if (listChip[i].e楽器パート == E楽器パート.BASS) {
\r
2982 listChip[i].e楽器パート = E楽器パート.GUITAR;
\r
2983 listChip[i].nチャンネル番号 -= ( 0xA0 - 0x20 );
\r
2985 else if ( listChip[i].e楽器パート == E楽器パート.GUITAR )
\r
2987 listChip[i].e楽器パート = E楽器パート.BASS;
\r
2988 listChip[i].nチャンネル番号 += ( 0xA0 - 0x20 );
\r
2991 int t = this.LEVEL.Bass;
\r
2992 this.LEVEL.Bass = this.LEVEL.Guitar;
\r
2993 this.LEVEL.Guitar = t;
\r
2995 t = this.n可視チップ数.Bass;
\r
2996 this.n可視チップ数.Bass = this.n可視チップ数.Guitar;
\r
2997 this.n可視チップ数.Guitar = t;
\r
2999 bool ts = this.bチップがある.Bass;
\r
3000 this.bチップがある.Bass = this.bチップがある.Guitar;
\r
3001 this.bチップがある.Guitar = ts;
\r
3003 // SwapGuitarBassInfos_AutoFlags();
\r
3005 //public void SwapGuitarBassInfos_AutoFlags()
\r
3007 // bool ts = CDTXMania.ConfigIni.bAutoPlay.Bass; // #24415 2011.2.21 yyagi: FLIP時のリザルトにAUTOの記録が混ざらないよう、AUTOのフラグもswapする
\r
3008 // CDTXMania.ConfigIni.bAutoPlay.Bass = CDTXMania.ConfigIni.bAutoPlay.Guitar;
\r
3009 // CDTXMania.ConfigIni.bAutoPlay.Guitar = ts;
\r
3011 // CDTXMania.ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped = !CDTXMania.ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped;
\r
3016 public override void On活性化()
\r
3018 this.listWAV = new Dictionary<int, CWAV>();
\r
3019 this.listBMP = new Dictionary<int, CBMP>();
\r
3020 this.listBMPTEX = new Dictionary<int, CBMPTEX>();
\r
3021 this.listBPM = new Dictionary<int, CBPM>();
\r
3022 this.listBGAPAN = new Dictionary<int, CBGAPAN>();
\r
3023 this.listBGA = new Dictionary<int, CBGA>();
\r
3024 this.listAVIPAN = new Dictionary<int, CAVIPAN>();
\r
3025 this.listAVI = new Dictionary<int, CAVI>();
\r
3026 this.listChip = new List<CChip>();
\r
3029 public override void On非活性化()
\r
3031 if( this.listWAV != null )
\r
3033 foreach( CWAV cwav in this.listWAV.Values )
\r
3037 this.listWAV = null;
\r
3039 if( this.listBMP != null )
\r
3041 foreach( CBMP cbmp in this.listBMP.Values )
\r
3045 this.listBMP = null;
\r
3047 if( this.listBMPTEX != null )
\r
3049 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
3051 cbmptex.Dispose();
\r
3053 this.listBMPTEX = null;
\r
3055 if( this.listAVI != null )
\r
3057 foreach( CAVI cavi in this.listAVI.Values )
\r
3061 this.listAVI = null;
\r
3063 if( this.listBPM != null )
\r
3065 this.listBPM.Clear();
\r
3066 this.listBPM = null;
\r
3068 if( this.listBGAPAN != null )
\r
3070 this.listBGAPAN.Clear();
\r
3071 this.listBGAPAN = null;
\r
3073 if( this.listBGA != null )
\r
3075 this.listBGA.Clear();
\r
3076 this.listBGA = null;
\r
3078 if( this.listAVIPAN != null )
\r
3080 this.listAVIPAN.Clear();
\r
3081 this.listAVIPAN = null;
\r
3083 if( this.listChip != null )
\r
3085 this.listChip.Clear();
\r
3089 public override void OnManagedリソースの作成()
\r
3091 if( !base.b活性化してない )
\r
3093 this.tBMP_BMPTEXの読み込み();
\r
3095 base.OnManagedリソースの作成();
\r
3098 public override void OnManagedリソースの解放()
\r
3100 if( !base.b活性化してない )
\r
3102 if( this.listBMP != null )
\r
3104 foreach( CBMP cbmp in this.listBMP.Values )
\r
3109 if( this.listBMPTEX != null )
\r
3111 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
3113 cbmptex.Dispose();
\r
3116 if( this.listAVI != null )
\r
3118 foreach( CAVI cavi in this.listAVI.Values )
\r
3123 base.OnManagedリソースの解放();
\r
3130 #region [ private ]
\r
3131 //-----------------
\r
3132 [StructLayout( LayoutKind.Sequential )]
\r
3133 private struct STGDAPARAM // GDAチャンネル番号に対応するDTXチャンネル番号
\r
3135 public string s; // GDAチャンネル番号
\r
3136 public int c; // DTXチャンネル番号
\r
3138 public STGDAPARAM(string _s, int _c) { // 2011.1.1 yyagi 構造体のコンストラクタ追加(初期化簡易化のため)
\r
3144 private readonly STGDAPARAM[] stGDAParam;
\r
3145 private bool bヘッダのみ;
\r
3146 private Stack<bool> bstackIFからENDIFをスキップする;
\r
3148 private int n現在の行数;
\r
3149 private int n現在の乱数;
\r
3151 private int n内部番号BPM1to;
\r
3152 private int n内部番号WAV1to;
\r
3153 private int[] n無限管理BPM;
\r
3154 private int[] n無限管理PAN;
\r
3155 private int[] n無限管理SIZE;
\r
3156 private int[] n無限管理VOL;
\r
3157 private int[] n無限管理WAV;
\r
3158 private int[] nRESULTIMAGE用優先順位;
\r
3159 private int[] nRESULTMOVIE用優先順位;
\r
3160 private int[] nRESULTSOUND用優先順位;
\r
3162 private bool t入力・コマンド文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3164 if( this.t入力・空白をスキップする( ref ce ) )
\r
3166 while( ( ( ce.Current != ':' ) && ( ce.Current != ' ' ) ) && ( ( ce.Current != ';' ) && ( ce.Current != '\n' ) ) )
\r
3168 sb文字列.Append( ce.Current );
\r
3169 if( !ce.MoveNext() )
\r
3174 if( ce.Current == ':' )
\r
3176 if( !ce.MoveNext() )
\r
3180 if( !this.t入力・空白をスキップする( ref ce ) )
\r
3189 private bool t入力・コメントをスキップする( ref CharEnumerator ce )
\r
3191 while( ce.Current != '\n' )
\r
3193 if( !ce.MoveNext() )
\r
3198 return ce.MoveNext();
\r
3200 private bool t入力・コメント文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3202 if( ce.Current != ';' )
\r
3206 if( ce.MoveNext() )
\r
3208 while( ce.Current != '\n' )
\r
3210 sb文字列.Append( ce.Current );
\r
3211 if( !ce.MoveNext() )
\r
3220 private void t入力・パラメータ食い込みチェック( string strコマンド名, ref string strコマンド, ref string strパラメータ )
\r
3222 if( ( strコマンド.Length > strコマンド名.Length ) && strコマンド.StartsWith( strコマンド名, StringComparison.OrdinalIgnoreCase ) )
\r
3224 strパラメータ = strコマンド.Substring( strコマンド名.Length ).Trim();
\r
3225 strコマンド = strコマンド.Substring( 0, strコマンド名.Length );
\r
3228 private bool t入力・パラメータ文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3230 if( this.t入力・空白をスキップする( ref ce ) )
\r
3232 while( ( ce.Current != '\n' ) && ( ce.Current != ';' ) )
\r
3234 sb文字列.Append( ce.Current );
\r
3235 if( !ce.MoveNext() )
\r
3244 private bool t入力・空白と改行をスキップする( ref CharEnumerator ce )
\r
3246 while( ( ce.Current == ' ' ) || ( ce.Current == '\n' ) )
\r
3248 if( ce.Current == '\n' )
\r
3252 if( !ce.MoveNext() )
\r
3259 private bool t入力・空白をスキップする( ref CharEnumerator ce )
\r
3261 while( ce.Current == ' ' )
\r
3263 if( !ce.MoveNext() )
\r
3270 private void t入力・行解析( ref StringBuilder sbコマンド, ref StringBuilder sbパラメータ, ref StringBuilder sbコメント )
\r
3272 string str = sbコマンド.ToString();
\r
3273 string str2 = sbパラメータ.ToString().Trim();
\r
3274 string str3 = sbコメント.ToString();
\r
3275 if( str.StartsWith( "IF", StringComparison.OrdinalIgnoreCase ) )
\r
3277 this.t入力・パラメータ食い込みチェック( "IF", ref str, ref str2 );
\r
3278 if( this.bstackIFからENDIFをスキップする.Count == 0xff )
\r
3280 Trace.TraceWarning( "#IF の入れ子の数が 255 を超えました。この #IF を無視します。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3282 else if( this.bstackIFからENDIFをスキップする.Peek() )
\r
3284 this.bstackIFからENDIFをスキップする.Push( true );
\r
3289 if( !int.TryParse( str2, out result ) )
\r
3293 this.bstackIFからENDIFをスキップする.Push( result != this.n現在の乱数 );
\r
3296 else if( str.StartsWith( "ENDIF", StringComparison.OrdinalIgnoreCase ) )
\r
3298 this.t入力・パラメータ食い込みチェック( "ENDIF", ref str, ref str2 );
\r
3299 if( this.bstackIFからENDIFをスキップする.Count > 1 )
\r
3301 this.bstackIFからENDIFをスキップする.Pop();
\r
3305 Trace.TraceWarning( "#ENDIF に対応する #IF がありません。この #ENDIF を無視します。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3308 else if( !this.bstackIFからENDIFをスキップする.Peek() )
\r
3310 if( str.StartsWith( "PATH_WAV", StringComparison.OrdinalIgnoreCase ) )
\r
3312 this.t入力・パラメータ食い込みチェック( "PATH_WAV", ref str, ref str2 );
\r
3313 this.PATH_WAV = str2;
\r
3315 else if( str.StartsWith( "TITLE", StringComparison.OrdinalIgnoreCase ) )
\r
3317 this.t入力・パラメータ食い込みチェック( "TITLE", ref str, ref str2 );
\r
3318 this.TITLE = str2;
\r
3320 else if( str.StartsWith( "ARTIST", StringComparison.OrdinalIgnoreCase ) )
\r
3322 this.t入力・パラメータ食い込みチェック( "ARTIST", ref str, ref str2 );
\r
3323 this.ARTIST = str2;
\r
3325 else if( str.StartsWith( "COMMENT", StringComparison.OrdinalIgnoreCase ) )
\r
3327 this.t入力・パラメータ食い込みチェック( "COMMENT", ref str, ref str2 );
\r
3328 this.COMMENT = str2;
\r
3330 else if( str.StartsWith( "DLEVEL", StringComparison.OrdinalIgnoreCase ) || str.StartsWith( "PLAYLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3333 this.t入力・パラメータ食い込みチェック( "DLEVEL", ref str, ref str2 );
\r
3334 this.t入力・パラメータ食い込みチェック( "PLAYLEVEL", ref str, ref str2 );
\r
3335 if( int.TryParse( str2, out dlevel ) )
\r
3341 else if( dlevel > 100 )
\r
3345 this.LEVEL.Drums = dlevel;
\r
3348 else if( str.StartsWith( "GLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3351 this.t入力・パラメータ食い込みチェック( "GLEVEL", ref str, ref str2 );
\r
3352 if( int.TryParse( str2, out glevel ) )
\r
3358 else if( glevel > 100 )
\r
3362 this.LEVEL.Guitar = glevel;
\r
3365 else if( str.StartsWith( "BLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3368 this.t入力・パラメータ食い込みチェック( "BLEVEL", ref str, ref str2 );
\r
3369 if( int.TryParse( str2, out blevel ) )
\r
3375 else if( blevel > 100 )
\r
3379 this.LEVEL.Bass = blevel;
\r
3382 #if TEST_NOTEOFFMODE
\r
3383 else if (str.StartsWith("SUPRESSNOTEOFF_HIHAT", StringComparison.OrdinalIgnoreCase)) {
\r
3384 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_HIHAT", ref str, ref str2);
\r
3385 this.bHH演奏で直前のHHを消音する = !str2.ToLower().Equals("on");
\r
3387 else if (str.StartsWith("SUPRESSNOTEOFF_GUITAR", StringComparison.OrdinalIgnoreCase)) {
\r
3388 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_GUITAR", ref str, ref str2);
\r
3389 this.bGUITAR演奏で直前のGUITARを消音する = !str2.ToLower().Equals("on");
\r
3391 else if (str.StartsWith("SUPRESSNOTEOFF_BASS", StringComparison.OrdinalIgnoreCase)) {
\r
3392 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_BASS", ref str, ref str2);
\r
3393 this.bBASS演奏で直前のBASSを消音する = !str2.ToLower().Equals("on");
\r
3396 else if (str.StartsWith("GENRE", StringComparison.OrdinalIgnoreCase)) {
\r
3397 this.t入力・パラメータ食い込みチェック("GENRE", ref str, ref str2);
\r
3398 this.GENRE = str2;
\r
3400 if (str.StartsWith("HIDDENLEVEL", StringComparison.OrdinalIgnoreCase)) {
\r
3401 this.t入力・パラメータ食い込みチェック("HIDDENLEVEL", ref str, ref str2);
\r
3402 this.HIDDENLEVEL = str2.ToLower().Equals("on");
\r
3404 if (str.StartsWith("STAGEFILE", StringComparison.OrdinalIgnoreCase)) {
\r
3405 this.t入力・パラメータ食い込みチェック("STAGEFILE", ref str, ref str2);
\r
3406 this.STAGEFILE = str2;
\r
3407 } else if (str.StartsWith("PREVIEW", StringComparison.OrdinalIgnoreCase)) {
\r
3408 this.t入力・パラメータ食い込みチェック("PREVIEW", ref str, ref str2);
\r
3409 this.PREVIEW = str2;
\r
3410 } else if (str.StartsWith("PREIMAGE", StringComparison.OrdinalIgnoreCase)) {
\r
3411 this.t入力・パラメータ食い込みチェック("PREIMAGE", ref str, ref str2);
\r
3412 this.PREIMAGE = str2;
\r
3413 } else if (str.StartsWith("PREMOVIE", StringComparison.OrdinalIgnoreCase)) {
\r
3414 this.t入力・パラメータ食い込みチェック("PREMOVIE", ref str, ref str2);
\r
3415 this.PREMOVIE = str2;
\r
3416 } else if (str.StartsWith("BACKGROUND_GR", StringComparison.OrdinalIgnoreCase)) {
\r
3417 this.t入力・パラメータ食い込みチェック("BACKGROUND_GR", ref str, ref str2);
\r
3418 this.BACKGROUND_GR = str2;
\r
3419 } else if (str.StartsWith("BACKGROUND", StringComparison.OrdinalIgnoreCase) || str.StartsWith("WALL", StringComparison.OrdinalIgnoreCase)) {
\r
3420 this.t入力・パラメータ食い込みチェック("BACKGROUND", ref str, ref str2);
\r
3421 this.t入力・パラメータ食い込みチェック("WALL", ref str, ref str2);
\r
3422 this.BACKGROUND = str2;
\r
3424 if (str.StartsWith("RANDOM", StringComparison.OrdinalIgnoreCase)) {
\r
3425 this.t入力・パラメータ食い込みチェック("RANDOM", ref str, ref str2);
\r
3427 if (!int.TryParse(str2, out num5)) {
\r
3430 this.n現在の乱数 = CDTXMania.Random.Next(num5) + 1;
\r
3432 if (str.StartsWith("SOUND_NOWLOADING", StringComparison.OrdinalIgnoreCase)) {
\r
3433 this.t入力・パラメータ食い込みチェック("SOUND_NOWLOADING", ref str, ref str2);
\r
3434 this.SOUND_NOWLOADING = str2;
\r
3435 } else if (!this.bヘッダのみ) {
\r
3436 if (str.StartsWith("PANEL", StringComparison.OrdinalIgnoreCase)) {
\r
3437 this.t入力・パラメータ食い込みチェック("PANEL", ref str, ref str2);
\r
3438 int dummyResult; // #23885 2010.12.12 yyagi: not to confuse "#PANEL strings (panel)" and "#PANEL int (panpot of EL)"
\r
3439 if (!int.TryParse(str2, out dummyResult)) { // 数値じゃないならPANELとみなす
\r
3440 this.PANEL = str2; //
\r
3442 } // 数値ならPAN ELとみなす
\r
3445 if (str.StartsWith("MIDIFILE", StringComparison.OrdinalIgnoreCase)) {
\r
3446 this.t入力・パラメータ食い込みチェック("MIDIFILE", ref str, ref str2);
\r
3447 this.MIDIFILE = str2;
\r
3449 if (str.StartsWith("MIDINOTE", StringComparison.OrdinalIgnoreCase)) {
\r
3450 this.t入力・パラメータ食い込みチェック("MIDINOTE", ref str, ref str2);
\r
3451 this.MIDINOTE = str2.ToLower().Equals("on");
\r
3453 if (str.StartsWith("BLACKCOLORKEY", StringComparison.OrdinalIgnoreCase)) {
\r
3454 this.t入力・パラメータ食い込みチェック("BLACKCOLORKEY", ref str, ref str2);
\r
3455 this.BLACKCOLORKEY = str2.ToLower().Equals("on");
\r
3457 if (str.StartsWith("BASEBPM", StringComparison.OrdinalIgnoreCase)) {
\r
3458 this.t入力・パラメータ食い込みチェック("BASEBPM", ref str, ref str2);
\r
3459 double basebpm = 0.0;
\r
3460 //if( double.TryParse( str2, out num6 ) && ( num6 > 0.0 ) )
\r
3461 if (TryParse(str2, out basebpm) && basebpm > 0.0) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
3462 { // #24204 2011.01.21 yyagi: Fix the condition correctly
\r
3463 this.BASEBPM = basebpm;
\r
3465 } else if (str.StartsWith("SOUND_STAGEFAILED", StringComparison.OrdinalIgnoreCase)) {
\r
3466 this.t入力・パラメータ食い込みチェック("SOUND_STAGEFAILED", ref str, ref str2);
\r
3467 this.SOUND_STAGEFAILED = str2;
\r
3468 } else if (str.StartsWith("SOUND_FULLCOMBO", StringComparison.OrdinalIgnoreCase)) {
\r
3469 this.t入力・パラメータ食い込みチェック("SOUND_FULLCOMBO", ref str, ref str2);
\r
3470 this.SOUND_FULLCOMBO = str2;
\r
3471 } else if (str.StartsWith("SOUND_AUDIENCE", StringComparison.OrdinalIgnoreCase)) {
\r
3472 this.t入力・パラメータ食い込みチェック("SOUND_AUDIENCE", ref str, ref str2);
\r
3473 this.SOUND_AUDIENCE = str2;
\r
3474 } else if (!this.t入力・行解析・WAVVOL_VOLUME(str, str2, str3) &&
\r
3475 !this.t入力・行解析・WAVPAN_PAN(str, str2, str3) &&
\r
3476 !this.t入力・行解析・WAV(str, str2, str3) &&
\r
3477 !this.t入力・行解析・BMPTEX(str, str2, str3) &&
\r
3478 !this.t入力・行解析・BMP(str, str2, str3) &&
\r
3479 !this.t入力・行解析・BGAPAN(str, str2, str3) &&
\r
3480 !this.t入力・行解析・BGA(str, str2, str3) &&
\r
3481 !this.t入力・行解析・AVIPAN(str, str2, str3) &&
\r
3482 !this.t入力・行解析・AVI_VIDEO(str, str2, str3) &&
\r
3483 !this.t入力・行解析・BPM_BPMzz(str, str2, str3) &&
\r
3484 !this.t入力・行解析・RESULTIMAGE(str, str2, str3) &&
\r
3485 !this.t入力・行解析・RESULTMOVIE(str, str2, str3) &&
\r
3486 !this.t入力・行解析・RESULTSOUND(str, str2, str3) &&
\r
3487 !this.t入力・行解析・SIZE(str, str2, str3)) {
\r
3488 this.t入力・行解析・チップ配置(str, str2, str3);
\r
3492 int xx = 0; // #23885 2010.12.12 yyagi: dummy line to exit parsing the line
\r
3498 private bool t入力・行解析・AVI_VIDEO( string strコマンド, string strパラメータ, string strコメント )
\r
3500 if( strコマンド.StartsWith( "AVI", StringComparison.OrdinalIgnoreCase ) )
\r
3502 strコマンド = strコマンド.Substring( 3 );
\r
3504 else if( strコマンド.StartsWith( "VIDEO", StringComparison.OrdinalIgnoreCase ) )
\r
3506 strコマンド = strコマンド.Substring( 5 );
\r
3512 if( strコマンド.Length < 2 )
\r
3516 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3517 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3519 Trace.TraceError( "AVI(VIDEO)番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3522 CAVI cavi = new CAVI();
\r
3524 cavi.strファイル名 = strパラメータ;
\r
3525 cavi.strコメント文 = strコメント;
\r
3526 if( this.listAVI.ContainsKey( key ) )
\r
3528 this.listAVI.Remove( key );
\r
3530 this.listAVI.Add( key, cavi );
\r
3533 private bool t入力・行解析・AVIPAN( string strコマンド, string strパラメータ, string strコメント )
\r
3535 if( strコマンド.StartsWith( "AVIPAN", StringComparison.OrdinalIgnoreCase ) )
\r
3537 strコマンド = strコマンド.Substring( 6 );
\r
3543 if( strコマンド.Length < 2 )
\r
3547 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3548 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3550 Trace.TraceError( "AVIPAN番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3553 CAVIPAN cavipan = new CAVIPAN();
\r
3554 cavipan.n番号 = key;
\r
3555 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3556 if( strArray.Length < 14 )
\r
3558 Trace.TraceError( "AVIPAN: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3563 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3565 Trace.TraceError( "AVIPAN: {2}番目の数(AVI番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3568 cavipan.nAVI番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3569 if( ( cavipan.nAVI番号 < 1 ) || ( cavipan.nAVI番号 >= 36 * 36 ) )
\r
3571 Trace.TraceError( "AVIPAN: {2}番目の数(AVI番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3576 if( !int.TryParse( strArray[ index ], out result ) )
\r
3578 Trace.TraceError( "AVIPAN: {2}番目の引数(開始転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3581 cavipan.sz開始サイズ.Width = result;
\r
3584 if( !int.TryParse( strArray[ index ], out result ) )
\r
3586 Trace.TraceError( "AVIPAN: {2}番目の引数(開始転送サイズ・高さ)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3589 cavipan.sz開始サイズ.Height = result;
\r
3592 if( !int.TryParse( strArray[ index ], out result ) )
\r
3594 Trace.TraceError( "AVIPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3597 cavipan.sz終了サイズ.Width = result;
\r
3600 if( !int.TryParse( strArray[ index ], out result ) )
\r
3602 Trace.TraceError( "AVIPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3605 cavipan.sz終了サイズ.Height = result;
\r
3608 if( !int.TryParse( strArray[ index ], out result ) )
\r
3610 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3613 cavipan.pt動画側開始位置.X = result;
\r
3616 if( !int.TryParse( strArray[ index ], out result ) )
\r
3618 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3621 cavipan.pt動画側開始位置.Y = result;
\r
3624 if( !int.TryParse( strArray[ index ], out result ) )
\r
3626 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3629 cavipan.pt動画側終了位置.X = result;
\r
3632 if( !int.TryParse( strArray[ index ], out result ) )
\r
3634 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3637 cavipan.pt動画側終了位置.Y = result;
\r
3640 if( !int.TryParse( strArray[ index ], out result ) )
\r
3642 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3645 cavipan.pt表示側開始位置.X = result;
\r
3648 if( !int.TryParse( strArray[ index ], out result ) )
\r
3650 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3653 cavipan.pt表示側開始位置.Y = result;
\r
3656 if( !int.TryParse( strArray[ index ], out result ) )
\r
3658 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3661 cavipan.pt表示側終了位置.X = result;
\r
3664 if( !int.TryParse( strArray[ index ], out result ) )
\r
3666 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3669 cavipan.pt表示側終了位置.Y = result;
\r
3672 if( !int.TryParse( strArray[ index ], out result ) )
\r
3674 Trace.TraceError( "AVIPAN: {2}番目の引数(移動時間)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3681 cavipan.n移動時間ct = result;
\r
3683 if( this.listAVIPAN.ContainsKey( key ) )
\r
3685 this.listAVIPAN.Remove( key );
\r
3687 this.listAVIPAN.Add( key, cavipan );
\r
3690 private bool t入力・行解析・BGA( string strコマンド, string strパラメータ, string strコメント )
\r
3692 if( strコマンド.StartsWith( "BGA", StringComparison.OrdinalIgnoreCase ) )
\r
3694 strコマンド = strコマンド.Substring( 3 );
\r
3700 if( strコマンド.Length < 2 )
\r
3704 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3705 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3707 Trace.TraceError( "BGA番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3710 CBGA cbga = new CBGA();
\r
3712 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3713 if( strArray.Length < 7 )
\r
3715 Trace.TraceError( "BGA: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3720 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3722 Trace.TraceError( "BGA: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3725 cbga.nBMP番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3726 if( ( cbga.nBMP番号 < 1 ) || ( cbga.nBMP番号 >= 36 * 36 ) )
\r
3728 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3733 if( !int.TryParse( strArray[ index ], out result ) )
\r
3735 Trace.TraceError( "BGA: {2}番目の引数(画像側位置1・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3738 cbga.pt画像側左上座標.X = result;
\r
3741 if( !int.TryParse( strArray[ index ], out result ) )
\r
3743 Trace.TraceError( "BGA: {2}番目の引数(画像側位置1・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3746 cbga.pt画像側左上座標.Y = result;
\r
3749 if( !int.TryParse( strArray[ index ], out result ) )
\r
3751 Trace.TraceError( "BGA: {2}番目の引数(画像側座標2・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3754 cbga.pt画像側右下座標.X = result;
\r
3757 if( !int.TryParse( strArray[ index ], out result ) )
\r
3759 Trace.TraceError( "BGA: {2}番目の引数(画像側座標2・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3762 cbga.pt画像側右下座標.Y = result;
\r
3765 if( !int.TryParse( strArray[ index ], out result ) )
\r
3767 Trace.TraceError( "BGA: {2}番目の引数(表示位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3770 cbga.pt表示座標.X = result;
\r
3773 if( !int.TryParse( strArray[ index ], out result ) )
\r
3775 Trace.TraceError( "BGA: {2}番目の引数(表示位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3778 cbga.pt表示座標.Y = result;
\r
3780 if( cbga.pt画像側左上座標.X > cbga.pt画像側右下座標.X )
\r
3782 result = cbga.pt画像側左上座標.X;
\r
3783 cbga.pt画像側左上座標.X = cbga.pt画像側右下座標.X;
\r
3784 cbga.pt画像側右下座標.X = result;
\r
3786 if( cbga.pt画像側左上座標.Y > cbga.pt画像側右下座標.Y )
\r
3788 result = cbga.pt画像側左上座標.Y;
\r
3789 cbga.pt画像側左上座標.Y = cbga.pt画像側右下座標.Y;
\r
3790 cbga.pt画像側右下座標.Y = result;
\r
3792 if( this.listBGA.ContainsKey( key ) )
\r
3794 this.listBGA.Remove( key );
\r
3796 this.listBGA.Add( key, cbga );
\r
3799 private bool t入力・行解析・BGAPAN( string strコマンド, string strパラメータ, string strコメント )
\r
3801 if( strコマンド.StartsWith( "BGAPAN", StringComparison.OrdinalIgnoreCase ) )
\r
3803 strコマンド = strコマンド.Substring( 6 );
\r
3809 if( strコマンド.Length < 2 )
\r
3813 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3814 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3816 Trace.TraceError( "BGAPAN番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3819 CBGAPAN cbgapan = new CBGAPAN();
\r
3820 cbgapan.n番号 = key;
\r
3821 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3822 if( strArray.Length < 14 )
\r
3824 Trace.TraceError( "BGAPAN: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3829 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3831 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3834 cbgapan.nBMP番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3835 if( ( cbgapan.nBMP番号 < 1 ) || ( cbgapan.nBMP番号 >= 36 * 36 ) )
\r
3837 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3842 if( !int.TryParse( strArray[ index ], out result ) )
\r
3844 Trace.TraceError( "BGAPAN: {2}番目の引数(開始転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3847 cbgapan.sz開始サイズ.Width = result;
\r
3850 if( !int.TryParse( strArray[ index ], out result ) )
\r
3852 Trace.TraceError( "BGAPAN: {2}番目の引数(開始転送サイズ・高さ)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3855 cbgapan.sz開始サイズ.Height = result;
\r
3858 if( !int.TryParse( strArray[ index ], out result ) )
\r
3860 Trace.TraceError( "BGAPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3863 cbgapan.sz終了サイズ.Width = result;
\r
3866 if( !int.TryParse( strArray[ index ], out result ) )
\r
3868 Trace.TraceError( "BGAPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3871 cbgapan.sz終了サイズ.Height = result;
\r
3874 if( !int.TryParse( strArray[ index ], out result ) )
\r
3876 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3879 cbgapan.pt画像側開始位置.X = result;
\r
3882 if( !int.TryParse( strArray[ index ], out result ) )
\r
3884 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3887 cbgapan.pt画像側開始位置.Y = result;
\r
3890 if( !int.TryParse( strArray[ index ], out result ) )
\r
3892 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3895 cbgapan.pt画像側終了位置.X = result;
\r
3898 if( !int.TryParse( strArray[ index ], out result ) )
\r
3900 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3903 cbgapan.pt画像側終了位置.Y = result;
\r
3906 if( !int.TryParse( strArray[ index ], out result ) )
\r
3908 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3911 cbgapan.pt表示側開始位置.X = result;
\r
3914 if( !int.TryParse( strArray[ index ], out result ) )
\r
3916 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3919 cbgapan.pt表示側開始位置.Y = result;
\r
3922 if( !int.TryParse( strArray[ index ], out result ) )
\r
3924 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3927 cbgapan.pt表示側終了位置.X = result;
\r
3930 if( !int.TryParse( strArray[ index ], out result ) )
\r
3932 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3935 cbgapan.pt表示側終了位置.Y = result;
\r
3938 if( !int.TryParse( strArray[ index ], out result ) )
\r
3940 Trace.TraceError( "BGAPAN: {2}番目の引数(移動時間)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3947 cbgapan.n移動時間ct = result;
\r
3949 if( this.listBGAPAN.ContainsKey( key ) )
\r
3951 this.listBGAPAN.Remove( key );
\r
3953 this.listBGAPAN.Add( key, cbgapan );
\r
3956 private bool t入力・行解析・BMP( string strコマンド, string strパラメータ, string strコメント )
\r
3958 if( strコマンド.StartsWith( "BMP", StringComparison.OrdinalIgnoreCase ) )
\r
3960 strコマンド = strコマンド.Substring( 3 );
\r
3967 if( strコマンド.Length < 2 )
\r
3973 key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3974 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3976 Trace.TraceError( "BMP番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3980 CBMP cbmp = new CBMP();
\r
3982 cbmp.strファイル名 = strパラメータ;
\r
3983 cbmp.strコメント文 = strコメント;
\r
3984 if( this.listBMP.ContainsKey( key ) )
\r
3986 this.listBMP.Remove( key );
\r
3988 this.listBMP.Add( key, cbmp );
\r
3991 private bool t入力・行解析・BMPTEX( string strコマンド, string strパラメータ, string strコメント )
\r
3993 if( strコマンド.StartsWith( "BMPTEX", StringComparison.OrdinalIgnoreCase ) )
\r
3995 strコマンド = strコマンド.Substring( 6 );
\r
4001 if( strコマンド.Length < 2 )
\r
4005 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4006 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
4008 Trace.TraceError( "BMPTEX番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4011 CBMPTEX cbmptex = new CBMPTEX();
\r
4012 cbmptex.n番号 = key;
\r
4013 cbmptex.strファイル名 = strパラメータ;
\r
4014 cbmptex.strコメント文 = strコメント;
\r
4015 if( this.listBMPTEX.ContainsKey( key ) )
\r
4017 this.listBMPTEX.Remove( key );
\r
4019 this.listBMPTEX.Add( key, cbmptex );
\r
4022 private bool t入力・行解析・BPM_BPMzz( string strコマンド, string strパラメータ, string strコメント )
\r
4024 if( strコマンド.StartsWith( "BPM", StringComparison.OrdinalIgnoreCase ) )
\r
4026 strコマンド = strコマンド.Substring( 3 );
\r
4033 if( strコマンド.Length < 2 )
\r
4039 index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4040 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4042 Trace.TraceError( "BPM番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4046 double result = 0.0;
\r
4047 // if( !double.TryParse( strパラメータ, out result ) )
\r
4048 if ( !TryParse( strパラメータ, out result) ) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4052 if( result <= 0.0 )
\r
4058 this.BPM = result;
\r
4060 CBPM cbpm = new CBPM();
\r
4061 cbpm.n内部番号 = this.n内部番号BPM1to;
\r
4062 cbpm.n表記上の番号 = index;
\r
4063 cbpm.dbBPM値 = result;
\r
4064 this.listBPM.Add( this.n内部番号BPM1to, cbpm );
\r
4065 if( this.n無限管理BPM[ index ] == -index )
\r
4067 for( int i = 0; i < this.listChip.Count; i++ )
\r
4069 CChip chip = this.listChip[ i ];
\r
4070 if( chip.bBPMチップである && ( chip.n整数値・内部番号 == -index ) )
\r
4072 chip.n整数値・内部番号 = this.n内部番号BPM1to;
\r
4076 this.n無限管理BPM[ index ] = this.n内部番号BPM1to;
\r
4077 this.n内部番号BPM1to++;
\r
4080 private bool t入力・行解析・RESULTIMAGE( string strコマンド, string strパラメータ, string strコメント )
\r
4082 if( strコマンド.StartsWith( "RESULTIMAGE", StringComparison.OrdinalIgnoreCase ) )
\r
4084 strコマンド = strコマンド.Substring( 11 );
\r
4090 if( strコマンド.Length < 2 )
\r
4092 for( int i = 0; i < 7; i++ )
\r
4094 if( this.nRESULTIMAGE用優先順位[ i ] == 0 )
\r
4096 this.RESULTIMAGE[ i ] = strパラメータ.Trim();
\r
4102 switch( strコマンド.ToUpper() )
\r
4105 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 0, strパラメータ );
\r
4109 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 1, strパラメータ );
\r
4113 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 2, strパラメータ );
\r
4117 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 3, strパラメータ );
\r
4121 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 4, strパラメータ );
\r
4125 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 5, strパラメータ );
\r
4129 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 6, strパラメータ );
\r
4135 private void t入力・行解析・RESULTIMAGE・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4137 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4139 for( int i = nランク0to6; i >= 0; i-- )
\r
4141 if( this.nRESULTIMAGE用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4143 this.nRESULTIMAGE用優先順位[ i ] = 7 - nランク0to6;
\r
4144 this.RESULTIMAGE[ i ] = strファイル名;
\r
4149 private bool t入力・行解析・RESULTMOVIE( string strコマンド, string strパラメータ, string strコメント )
\r
4151 if( strコマンド.StartsWith( "RESULTMOVIE", StringComparison.OrdinalIgnoreCase ) )
\r
4153 strコマンド = strコマンド.Substring( 11 );
\r
4159 if( strコマンド.Length < 2 )
\r
4161 for( int i = 0; i < 7; i++ )
\r
4163 if( this.nRESULTMOVIE用優先順位[ i ] == 0 )
\r
4165 this.RESULTMOVIE[ i ] = strパラメータ.Trim();
\r
4171 switch( strコマンド.ToUpper() )
\r
4174 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 0, strパラメータ );
\r
4178 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 1, strパラメータ );
\r
4182 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 2, strパラメータ );
\r
4186 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 3, strパラメータ );
\r
4190 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 4, strパラメータ );
\r
4194 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 5, strパラメータ );
\r
4198 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 6, strパラメータ );
\r
4205 private void t入力・行解析・RESULTMOVIE・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4207 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4209 for( int i = nランク0to6; i >= 0; i-- )
\r
4211 if( this.nRESULTMOVIE用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4213 this.nRESULTMOVIE用優先順位[ i ] = 7 - nランク0to6;
\r
4214 this.RESULTMOVIE[ i ] = strファイル名;
\r
4219 private bool t入力・行解析・RESULTSOUND( string strコマンド, string strパラメータ, string strコメント )
\r
4221 if( strコマンド.StartsWith( "RESULTSOUND", StringComparison.OrdinalIgnoreCase ) )
\r
4223 strコマンド = strコマンド.Substring( 11 );
\r
4229 if( strコマンド.Length < 2 )
\r
4231 for( int i = 0; i < 7; i++ )
\r
4233 if( this.nRESULTSOUND用優先順位[ i ] == 0 )
\r
4235 this.RESULTSOUND[ i ] = strパラメータ.Trim();
\r
4241 switch( strコマンド.ToUpper() )
\r
4244 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 0, strパラメータ );
\r
4248 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 1, strパラメータ );
\r
4252 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 2, strパラメータ );
\r
4256 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 3, strパラメータ );
\r
4260 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 4, strパラメータ );
\r
4264 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 5, strパラメータ );
\r
4268 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 6, strパラメータ );
\r
4275 private void t入力・行解析・RESULTSOUND・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4277 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4279 for( int i = nランク0to6; i >= 0; i-- )
\r
4281 if( this.nRESULTSOUND用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4283 this.nRESULTSOUND用優先順位[ i ] = 7 - nランク0to6;
\r
4284 this.RESULTSOUND[ i ] = strファイル名;
\r
4289 private bool t入力・行解析・SIZE( string strコマンド, string strパラメータ, string strコメント )
\r
4292 if( strコマンド.StartsWith( "SIZE", StringComparison.OrdinalIgnoreCase ) )
\r
4294 strコマンド = strコマンド.Substring( 4 );
\r
4300 if( strコマンド.Length < 2 )
\r
4304 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4305 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4307 Trace.TraceError( "SIZE番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4310 if( int.TryParse( strパラメータ, out num2 ) )
\r
4316 else if( num2 > 100 )
\r
4320 if( this.n無限管理SIZE[ index ] == -index )
\r
4322 foreach( CWAV cwav in this.listWAV.Values )
\r
4324 if( cwav.nチップサイズ == -index )
\r
4326 cwav.nチップサイズ = num2;
\r
4330 this.n無限管理SIZE[ index ] = num2;
\r
4334 private bool t入力・行解析・WAV( string strコマンド, string strパラメータ, string strコメント )
\r
4336 if( strコマンド.StartsWith( "WAV", StringComparison.OrdinalIgnoreCase ) )
\r
4338 strコマンド = strコマンド.Substring( 3 );
\r
4344 if( strコマンド.Length < 2 )
\r
4348 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4349 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4351 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4354 CWAV cwav = new CWAV();
\r
4355 cwav.n内部番号 = this.n内部番号WAV1to;
\r
4356 cwav.n表記上の番号 = index;
\r
4357 cwav.nチップサイズ = this.n無限管理SIZE[ index ];
\r
4358 cwav.n位置 = this.n無限管理PAN[ index ];
\r
4359 cwav.n音量 = this.n無限管理VOL[ index ];
\r
4360 cwav.strファイル名 = strパラメータ;
\r
4361 cwav.strコメント文 = strコメント;
\r
4362 this.listWAV.Add( this.n内部番号WAV1to, cwav );
\r
4363 if( this.n無限管理WAV[ index ] == -index )
\r
4365 for( int i = 0; i < this.listChip.Count; i++ )
\r
4367 CChip chip = this.listChip[ i ];
\r
4368 if( chip.bWAVを使うチャンネルである && ( chip.n整数値・内部番号 == -index ) )
\r
4370 chip.n整数値・内部番号 = this.n内部番号WAV1to;
\r
4374 this.n無限管理WAV[ index ] = this.n内部番号WAV1to;
\r
4375 this.n内部番号WAV1to++;
\r
4378 private bool t入力・行解析・WAVPAN_PAN( string strコマンド, string strパラメータ, string strコメント )
\r
4381 if( strコマンド.StartsWith( "WAVPAN", StringComparison.OrdinalIgnoreCase ) )
\r
4383 strコマンド = strコマンド.Substring(6);
\r
4385 else if( strコマンド.StartsWith( "PAN", StringComparison.OrdinalIgnoreCase ) )
\r
4387 strコマンド = strコマンド.Substring(3);
\r
4393 if( strコマンド.Length < 2 )
\r
4397 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4398 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4400 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4403 if( int.TryParse( strパラメータ, out num2 ) )
\r
4409 else if( num2 >= 100 )
\r
4413 if( this.n無限管理PAN[ index ] == ( -10000 - index ) )
\r
4415 foreach( CWAV cwav in this.listWAV.Values )
\r
4417 if( cwav.n位置 == ( -10000 - index ) )
\r
4423 this.n無限管理PAN[ index ] = num2;
\r
4427 private bool t入力・行解析・WAVVOL_VOLUME( string strコマンド, string strパラメータ, string strコメント )
\r
4430 if( strコマンド.StartsWith( "WAVVOL", StringComparison.OrdinalIgnoreCase ) )
\r
4432 strコマンド = strコマンド.Substring( 6 );
\r
4434 else if( strコマンド.StartsWith( "VOLUME", StringComparison.OrdinalIgnoreCase ) )
\r
4436 strコマンド = strコマンド.Substring( 6 );
\r
4442 if( strコマンド.Length < 2 )
\r
4446 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4447 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4449 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4452 if( int.TryParse( strパラメータ, out num2 ) )
\r
4458 else if( num2 >= 100 )
\r
4462 if( this.n無限管理VOL[ index ] == -index )
\r
4464 foreach( CWAV cwav in this.listWAV.Values )
\r
4466 if( cwav.n音量 == -index )
\r
4472 this.n無限管理VOL[ index ] = num2;
\r
4476 private bool t入力・行解析・チップ配置( string strコマンド, string strパラメータ, string strコメント )
\r
4478 if( strコマンド.Length != 5 )
\r
4482 int num = C変換.n小節番号の文字列3桁を数値に変換して返す( strコマンド.Substring( 0, 3 ) );
\r
4489 if( ( this.e種別 != E種別.GDA ) && ( this.e種別 != E種別.G2D ) )
\r
4491 c = C変換.n16進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 3, 2 ) );
\r
4499 string str = strコマンド.Substring( 3, 2 );
\r
4500 foreach( STGDAPARAM stgdaparam in this.stGDAParam )
\r
4502 if( str.Equals( stgdaparam.s, StringComparison.OrdinalIgnoreCase ) )
\r
4513 if( ( c >= 0x11 ) && ( c <= 0x1a ) )
\r
4515 this.bチップがある.Drums = true;
\r
4517 else if( ( c >= 0x20 ) && ( c <= 0x27 ) )
\r
4519 this.bチップがある.Guitar = true;
\r
4521 else if( ( c >= 0xA0 ) && ( c <= 0xa7 ) )
\r
4523 this.bチップがある.Bass = true;
\r
4528 this.bチップがある.HHOpen = true;
\r
4532 this.bチップがある.Ride = true;
\r
4536 this.bチップがある.LeftCymbal = true;
\r
4540 this.bチップがある.OpenGuitar = true;
\r
4544 this.bチップがある.OpenBass = true;
\r
4547 case 0x02: // 小節長変更
\r
4549 double result = 0.0;
\r
4550 //if( !double.TryParse( strパラメータ, out result ) )
\r
4551 if (!TryParse(strパラメータ, out result)) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4553 Trace.TraceError( "小節長倍率に不正な値を指定しました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4556 CChip item = new CChip();
\r
4557 item.n発声位置 = num * 384;
\r
4558 item.nチャンネル番号 = c;
\r
4559 item.db実数値 = result;
\r
4560 this.listChip.Add( item );
\r
4564 if( string.IsNullOrEmpty( strパラメータ ) )
\r
4569 StringBuilder builder = new StringBuilder( strパラメータ.Length );
\r
4570 CharEnumerator enumerator = strパラメータ.GetEnumerator();
\r
4571 while( enumerator.MoveNext() )
\r
4573 if( enumerator.Current != '_' )
\r
4575 if( "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".IndexOf( enumerator.Current ) < 0 )
\r
4577 Trace.TraceError( "不正なオブジェクト指定があります。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4580 builder.Append( enumerator.Current );
\r
4584 strパラメータ = builder.ToString();
\r
4585 if( ( num4 % 2 ) != 0 )
\r
4589 for( int i = 0; i < ( num4 / 2 ); i++ )
\r
4594 index = C変換.n16進数2桁の文字列を数値に変換して返す( strパラメータ.Substring( i * 2, 2 ) );
\r
4598 index = C変換.n36進数2桁の文字列を数値に変換して返す( strパラメータ.Substring( i * 2, 2 ) );
\r
4602 CChip chip2 = new CChip();
\r
4603 chip2.n発声位置 = ( num * 384 ) + ( ( 384 * i ) / ( num4 / 2 ) );
\r
4604 chip2.nチャンネル番号 = c;
\r
4605 chip2.n整数値 = index;
\r
4606 chip2.n整数値・内部番号 = index;
\r
4607 if( ( c >= 0x11 ) && ( c <= 0x1a ) )
\r
4609 chip2.e楽器パート = E楽器パート.DRUMS;
\r
4611 if( ( c >= 0x20 ) && ( c <= 0x27 ) )
\r
4613 chip2.e楽器パート = E楽器パート.GUITAR;
\r
4615 if( ( c >= 160 ) && ( c <= 0xa7 ) )
\r
4617 chip2.e楽器パート = E楽器パート.BASS;
\r
4619 if( chip2.bWAVを使うチャンネルである )
\r
4621 chip2.n整数値・内部番号 = this.n無限管理WAV[ index ];
\r
4623 else if( chip2.bBPMチップである )
\r
4625 chip2.n整数値・内部番号 = this.n無限管理BPM[ index ];
\r
4629 if( ( index > 0 ) && ( index != 2 ) )
\r
4631 chip2.n発声位置 -= 0x20;
\r
4633 else if( index == 2 )
\r
4635 chip2.n発声位置 += 0x20;
\r
4638 this.listChip.Add( chip2 );
\r
4644 #region [#23880 2010.12.30 yyagi: コンマとスペースの両方を小数点として扱うTryParse]
\r
4646 /// 小数点としてコンマとピリオドの両方を受け付けるTryParse()
\r
4648 /// <param name="s">strings convert to double</param>
\r
4649 /// <param name="result">parsed double value</param>
\r
4650 /// <returns>s が正常に変換された場合は true。それ以外の場合は false。</returns>
\r
4651 /// <exception cref="ArgumentException">style が NumberStyles 値でないか、style に NumberStyles.AllowHexSpecifier 値が含まれている</exception>
\r
4652 private bool TryParse(string s, out double result) { // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4653 // EU諸国での #BPM 123,45 のような記述に対応するため、
\r
4654 // 小数点の最終位置を検出して、それをlocaleにあった
\r
4655 // 文字に置き換えてからTryParse()する
\r
4658 const string DecimalSeparators = ".,"; // 小数点文字
\r
4659 const string GroupSeparators = ".,' "; // 桁区切り文字
\r
4660 const string NumberSymbols = "0123456789"; // 数値文字
\r
4662 int len = s.Length; // 文字列長
\r
4663 int decimalPosition = len; // 真の小数点の位置 最初は文字列終端位置に仮置きする
\r
4665 for (int i = 0; i < len; i++) { // まず、真の小数点(一番最後に現れる小数点)の位置を求める
\r
4667 if (NumberSymbols.IndexOf(c) >= 0) { // 数値だったらスキップ
\r
4669 } else if (DecimalSeparators.IndexOf(c) >= 0) { // 小数点文字だったら、その都度位置を上書き記憶
\r
4670 decimalPosition = i;
\r
4671 } else if (GroupSeparators.IndexOf(c) >= 0) { // 桁区切り文字の場合もスキップ
\r
4673 } else { // 数値・小数点・区切り文字以外がきたらループ終了
\r
4678 StringBuilder decimalStr = new StringBuilder(16);
\r
4679 for (int i = 0; i < len; i++) { // 次に、localeにあった数値文字列を生成する
\r
4681 if (NumberSymbols.IndexOf(c) >= 0) { // 数値だったら
\r
4682 decimalStr.Append(c); // そのままコピー
\r
4683 } else if (DecimalSeparators.IndexOf(c) >= 0) { // 小数点文字だったら
\r
4684 if (i == decimalPosition) { // 最後に出現した小数点文字なら、localeに合った小数点を出力する
\r
4685 decimalStr.Append(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
\r
4687 } else if (GroupSeparators.IndexOf(c) >= 0) { // 桁区切り文字だったら
\r
4688 continue; // 何もしない(スキップ)
\r
4693 return double.TryParse(decimalStr.ToString(), out result); // 最後に、自分のlocale向けの文字列に対してTryParse実行
\r
4696 //-----------------
\r