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 CDTX.CAVI rAVI;
\r
387 public CDTX.CAVIPAN rAVIPan;
\r
388 public CDTX.CBGA rBGA;
\r
389 public CDTX.CBGAPAN rBGAPan;
\r
390 public CDTX.CBMP rBMP;
\r
391 public CDTX.CBMPTEX rBMPTEX;
\r
392 public bool bBPMチップである
\r
396 if (this.nチャンネル番号 == 3 || this.nチャンネル番号 == 8) {
\r
403 public bool bWAVを使うチャンネルである
\r
407 switch( this.nチャンネル番号 )
\r
498 public bool b自動再生音チャンネルである
\r
502 int num = this.nチャンネル番号;
\r
503 if( ( ( ( num != 1 ) && ( ( 0x61 > num ) || ( num > 0x69 ) ) ) && ( ( 0x70 > num ) || ( num > 0x79 ) ) ) && ( ( 0x80 > num ) || ( num > 0x89 ) ) )
\r
505 return ( ( 0x90 <= num ) && ( num <= 0x92 ) );
\r
513 STDGBVALUE<int> stdgbvalue = new STDGBVALUE<int>();
\r
514 stdgbvalue.Drums = 0;
\r
515 stdgbvalue.Guitar = 0;
\r
516 stdgbvalue.Bass = 0;
\r
517 this.nバーからの距離dot = stdgbvalue;
\r
523 this.n整数値・内部番号 = 0;
\r
527 this.dbチップサイズ倍率 = 1.0;
\r
530 this.e楽器パート = E楽器パート.UNKNOWN;
\r
532 this.nバーからの距離dot.Drums = 0;
\r
533 this.nバーからの距離dot.Guitar = 0;
\r
534 this.nバーからの距離dot.Bass = 0;
\r
537 public override string ToString()
\r
540 switch( this.nチャンネル番号 )
\r
599 str = "RideCymbal";
\r
603 str = "LeftCymbal";
\r
643 str = "ギターWailing";
\r
647 str = "ギターWailing音切替";
\r
651 str = "HHClose(不可視)";
\r
655 str = "Snare(不可視)";
\r
663 str = "HiTom(不可視)";
\r
667 str = "LowTom(不可視)";
\r
671 str = "Cymbal(不可視)";
\r
675 str = "FloorTom(不可視)";
\r
679 str = "HHOpen(不可視)";
\r
683 str = "RideCymbal(不可視)";
\r
687 str = "LeftCymbal(不可視)";
\r
895 str = "ベースWailing";
\r
899 str = "ベースWailing音切替";
\r
903 str = "HHClose(空うち)";
\r
907 str = "Snare(空うち)";
\r
915 str = "HiTom(空うち)";
\r
919 str = "LowTom(空うち)";
\r
923 str = "Cymbal(空うち)";
\r
927 str = "FloorTom(空うち)";
\r
931 str = "HHOpen(空うち)";
\r
935 str = "RideCymbal(空うち)";
\r
947 str = "LeftCymbal(空うち)";
\r
951 str = "BGAスコープ画像切替1";
\r
955 str = "BGAスコープ画像切替2";
\r
959 str = "BGAスコープ画像切替3";
\r
963 str = "BGAスコープ画像切替4";
\r
967 str = "BGAスコープ画像切替5";
\r
971 str = "BGAスコープ画像切替6";
\r
975 str = "BGAスコープ画像切替7";
\r
979 str = "BGAスコープ画像切替8";
\r
986 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
989 #region [ IComparable 実装 ]
\r
990 //-----------------
\r
991 public int CompareTo( CDTX.CChip other )
\r
993 byte[] buffer = new byte[] {
\r
994 5, 5, 3, 3, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5,
\r
995 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5,
\r
996 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5,
\r
997 5, 5, 5, 5, 5, 5, 5, 5, 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 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5,
\r
1005 5, 5, 5, 5, 5, 5, 5, 5, 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
1011 if( this.n発声位置 < other.n発声位置 )
\r
1015 if( this.n発声位置 > other.n発声位置 )
\r
1019 if( buffer[ this.nチャンネル番号 ] < buffer[ other.nチャンネル番号 ] )
\r
1023 if( buffer[ this.nチャンネル番号 ] > buffer[ other.nチャンネル番号 ] )
\r
1029 //-----------------
\r
1032 public class CWAV : IDisposable
\r
1034 public bool bBGMとして使う;
\r
1035 public List<int> listこのWAVを使用するチャンネル番号の集合 = new List<int>( 0x10 );
\r
1036 public int nチップサイズ = 100;
\r
1038 public long[] n一時停止時刻 = new long[ 4 ];
\r
1039 public int n音量 = 100;
\r
1040 public int n現在再生中のサウンド番号;
\r
1041 public long[] n再生開始時刻 = new long[ 4 ];
\r
1043 public int n表記上の番号;
\r
1044 public CSound[] rSound = new CSound[ 4 ];
\r
1045 public string strコメント文 = "";
\r
1046 public string strファイル名 = "";
\r
1047 public bool bBGMとして使わない
\r
1051 return !this.bBGMとして使う;
\r
1055 this.bBGMとして使う = !value;
\r
1059 public override string ToString()
\r
1061 StringBuilder builder = new StringBuilder( 0x80 );
\r
1062 if( this.n表記上の番号 == this.n内部番号 )
\r
1064 builder.Append( string.Format( "CWAV{0}: ", CDTX.tZZ( this.n表記上の番号 ) ) );
\r
1068 builder.Append( string.Format( "CWAV{0}(内部{1}): ", CDTX.tZZ( this.n表記上の番号 ), this.n内部番号 ) );
\r
1070 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
1071 return builder.ToString();
\r
1074 #region [ IDisposable+α実装 ]
\r
1075 //-----------------
\r
1076 public void Dispose()
\r
1078 this.Dispose( true );
\r
1080 public void Dispose( bool bサウンドのDisposeも行う )
\r
1082 if( !this.bDisposed済み )
\r
1084 for( int i = 0; i < 4; i++ )
\r
1086 if( bサウンドのDisposeも行う && ( this.rSound[ i ] != null ) )
\r
1088 CDTXMania.Sound管理.tサウンドを破棄する( this.rSound[ i ] );
\r
1090 this.rSound[ i ] = null;
\r
1091 if( ( i == 0 ) && CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
1093 Trace.TraceInformation( "サウンドを解放しました。({0})({1})", new object[] { this.strコメント文, this.strファイル名 } );
\r
1096 this.bDisposed済み = true;
\r
1099 //-----------------
\r
1102 #region [ private ]
\r
1103 //-----------------
\r
1104 private bool bDisposed済み;
\r
1105 //-----------------
\r
1112 [StructLayout( LayoutKind.Sequential )]
\r
1113 public struct STLANEINT
\r
1125 public int Guitar;
\r
1127 public int this[ int index ]
\r
1164 return this.Guitar;
\r
1169 throw new IndexOutOfRangeException();
\r
1175 throw new ArgumentOutOfRangeException();
\r
1220 this.Guitar = value;
\r
1224 this.Bass = value;
\r
1227 throw new IndexOutOfRangeException();
\r
1234 return this.HH + this.SD + this.BD + this.HT + this.LT + this.CY + this.FT + this.HHO + this.RD + this.LC;
\r
1239 [StructLayout( LayoutKind.Sequential )]
\r
1240 public struct STRESULT
\r
1249 public string this[ int index ]
\r
1276 throw new IndexOutOfRangeException();
\r
1310 throw new IndexOutOfRangeException();
\r
1315 [StructLayout( LayoutKind.Sequential )]
\r
1316 public struct STチップがある
\r
1318 public bool Drums;
\r
1319 public bool Guitar;
\r
1321 public bool HHOpen;
\r
1323 public bool LeftCymbal;
\r
1324 public bool OpenGuitar;
\r
1325 public bool OpenBass;
\r
1326 public bool this[ int index ]
\r
1333 return this.Drums;
\r
1336 return this.Guitar;
\r
1342 return this.HHOpen;
\r
1348 return this.LeftCymbal;
\r
1351 return this.OpenGuitar;
\r
1354 return this.OpenBass;
\r
1356 throw new IndexOutOfRangeException();
\r
1363 this.Drums = value;
\r
1367 this.Guitar = value;
\r
1371 this.Bass = value;
\r
1375 this.HHOpen = value;
\r
1379 this.Ride = value;
\r
1383 this.LeftCymbal = value;
\r
1387 this.OpenGuitar = value;
\r
1391 this.OpenBass = value;
\r
1394 throw new IndexOutOfRangeException();
\r
1402 public int nBGMAdjust
\r
1407 public string ARTIST;
\r
1408 public string BACKGROUND;
\r
1409 public string BACKGROUND_GR;
\r
1410 public double BASEBPM;
\r
1411 public bool BLACKCOLORKEY;
\r
1412 public double BPM;
\r
1413 public STチップがある bチップがある;
\r
1414 public string COMMENT;
\r
1415 public double db再生速度;
\r
1417 public string GENRE;
\r
1418 public bool HIDDENLEVEL;
\r
1419 public STDGBVALUE<int> LEVEL;
\r
1420 public Dictionary<int, CAVI> listAVI;
\r
1421 public Dictionary<int, CAVIPAN> listAVIPAN;
\r
1422 public Dictionary<int, CBGA> listBGA;
\r
1423 public Dictionary<int, CBGAPAN> listBGAPAN;
\r
1424 public Dictionary<int, CBMP> listBMP;
\r
1425 public Dictionary<int, CBMPTEX> listBMPTEX;
\r
1426 public Dictionary<int, CBPM> listBPM;
\r
1427 public List<CChip> listChip;
\r
1428 public Dictionary<int, CWAV> listWAV;
\r
1429 public string MIDIFILE;
\r
1430 public bool MIDINOTE;
\r
1431 public int MIDIレベル;
\r
1432 public STLANEINT n可視チップ数;
\r
1433 public const int n最大音数 = 4;
\r
1434 public const int n小節の解像度 = 384;
\r
1435 public string PANEL;
\r
1436 public string PATH_WAV;
\r
1437 public string PREIMAGE;
\r
1438 public string PREMOVIE;
\r
1439 public string PREVIEW;
\r
1440 public STRESULT RESULTIMAGE;
\r
1441 public STRESULT RESULTMOVIE;
\r
1442 public STRESULT RESULTSOUND;
\r
1443 public string SOUND_AUDIENCE;
\r
1444 public string SOUND_FULLCOMBO;
\r
1445 public string SOUND_NOWLOADING;
\r
1446 public string SOUND_STAGEFAILED;
\r
1447 public string STAGEFILE;
\r
1448 public string strハッシュofDTXファイル;
\r
1449 public string strファイル名;
\r
1450 public string strファイル名の絶対パス;
\r
1451 public string strフォルダ名;
\r
1452 public string TITLE;
\r
1453 #if TEST_NOTEOFFMODE
\r
1454 public bool bHH演奏で直前のHHを消音する;
\r
1455 public bool bGUITAR演奏で直前のGUITARを消音する;
\r
1456 public bool bBASS演奏で直前のBASSを消音する;
\r
1464 this.COMMENT = "";
\r
1467 this.PREVIEW = "";
\r
1468 this.PREIMAGE = "";
\r
1469 this.PREMOVIE = "";
\r
1470 this.STAGEFILE = "";
\r
1471 this.BACKGROUND = "";
\r
1472 this.BACKGROUND_GR = "";
\r
1473 this.PATH_WAV = "";
\r
1474 this.MIDIFILE = "";
\r
1475 this.SOUND_STAGEFAILED = "";
\r
1476 this.SOUND_FULLCOMBO = "";
\r
1477 this.SOUND_NOWLOADING = "";
\r
1478 this.SOUND_AUDIENCE = "";
\r
1480 this.BLACKCOLORKEY = true;
\r
1481 STDGBVALUE<int> stdgbvalue = new STDGBVALUE<int>();
\r
1482 stdgbvalue.Drums = 0;
\r
1483 stdgbvalue.Guitar = 0;
\r
1484 stdgbvalue.Bass = 0;
\r
1485 this.LEVEL = stdgbvalue;
\r
1487 #if true // 2010.12.31 yyagi #RESULTxxxのリファクタ後。ここはnew()して参照渡ししなくてもいいよね?
\r
1488 for (int i = 0; i < 7; i++) {
\r
1489 this.RESULTIMAGE[i] = "";
\r
1490 this.RESULTMOVIE[i] = "";
\r
1491 this.RESULTSOUND[i] = "";
\r
1493 #else // #RESULTxxxのリファクタ前
\r
1494 STRESULT stresult4 = new STRESULT();
\r
1495 STRESULT stresult = stresult4;
\r
1503 this.RESULTIMAGE = stresult;
\r
1504 stresult4 = new STRESULT();
\r
1505 STRESULT stresult2 = stresult4;
\r
1506 stresult2.SS = "";
\r
1513 this.RESULTMOVIE = stresult2;
\r
1514 STRESULT stresult3 = new STRESULT();
\r
1515 stresult3.SS = "";
\r
1522 this.RESULTSOUND = stresult3;
\r
1524 this.db再生速度 = 1.0;
\r
1525 this.strハッシュofDTXファイル = "";
\r
1526 STチップがある stチップがある = new STチップがある();
\r
1527 stチップがある.Drums = false;
\r
1528 stチップがある.Guitar = false;
\r
1529 stチップがある.Bass = false;
\r
1530 stチップがある.HHOpen = false;
\r
1531 stチップがある.Ride = false;
\r
1532 stチップがある.LeftCymbal = false;
\r
1533 stチップがある.OpenGuitar = false;
\r
1534 stチップがある.OpenBass = false;
\r
1535 this.bチップがある = stチップがある;
\r
1536 this.strファイル名 = "";
\r
1537 this.strフォルダ名 = "";
\r
1538 this.strファイル名の絶対パス = "";
\r
1539 this.n無限管理WAV = new int[ 36 * 36 ];
\r
1540 this.n無限管理BPM = new int[ 36 * 36 ];
\r
1541 this.n無限管理VOL = new int[ 36 * 36 ];
\r
1542 this.n無限管理PAN = new int[ 36 * 36 ];
\r
1543 this.n無限管理SIZE = new int[ 36 * 36 ];
\r
1544 this.nRESULTIMAGE用優先順位 = new int[ 7 ];
\r
1545 this.nRESULTMOVIE用優先順位 = new int[ 7 ];
\r
1546 this.nRESULTSOUND用優先順位 = new int[ 7 ];
\r
1548 #if true // 2011.1.1 yyagi GDA->DTX変換テーブル リファクタ後
\r
1549 STGDAPARAM[] stgdaparamArray = new STGDAPARAM[] { // GDA->DTX conversion table
\r
1550 new STGDAPARAM("TC", 0x03), new STGDAPARAM("BL", 0x02), new STGDAPARAM("GS", 0x29),
\r
1551 new STGDAPARAM("DS", 0x30), new STGDAPARAM("FI", 0x53), new STGDAPARAM("HH", 0x11),
\r
1552 new STGDAPARAM("SD", 0x12), new STGDAPARAM("BD", 0x13), new STGDAPARAM("HT", 0x14),
\r
1553 new STGDAPARAM("LT", 0x15), new STGDAPARAM("CY", 0x16), new STGDAPARAM("G1", 0x21),
\r
1554 new STGDAPARAM("G2", 0x22), new STGDAPARAM("G3", 0x23), new STGDAPARAM("G4", 0x24),
\r
1555 new STGDAPARAM("G5", 0x25), new STGDAPARAM("G6", 0x26), new STGDAPARAM("G7", 0x27),
\r
1556 new STGDAPARAM("GW", 0x28), new STGDAPARAM("01", 0x61), new STGDAPARAM("02", 0x62),
\r
1557 new STGDAPARAM("03", 0x63), new STGDAPARAM("04", 0x64), new STGDAPARAM("05", 0x65),
\r
1558 new STGDAPARAM("06", 0x66), new STGDAPARAM("07", 0x67), new STGDAPARAM("08", 0x68),
\r
1559 new STGDAPARAM("09", 0x69), new STGDAPARAM("0A", 0x70), new STGDAPARAM("0B", 0x71),
\r
1560 new STGDAPARAM("0C", 0x72), new STGDAPARAM("0D", 0x73), new STGDAPARAM("0E", 0x74),
\r
1561 new STGDAPARAM("0F", 0x75), new STGDAPARAM("10", 0x76), new STGDAPARAM("11", 0x77),
\r
1562 new STGDAPARAM("12", 0x78), new STGDAPARAM("13", 0x79), new STGDAPARAM("14", 0x80),
\r
1563 new STGDAPARAM("15", 0x81), new STGDAPARAM("16", 0x82), new STGDAPARAM("17", 0x83),
\r
1564 new STGDAPARAM("18", 0x84), new STGDAPARAM("19", 0x85), new STGDAPARAM("1A", 0x86),
\r
1565 new STGDAPARAM("1B", 0x87), new STGDAPARAM("1C", 0x88), new STGDAPARAM("1D", 0x89),
\r
1566 new STGDAPARAM("1E", 0x90), new STGDAPARAM("1F", 0x91), new STGDAPARAM("20", 0x92),
\r
1567 new STGDAPARAM("B1", 0xA1), new STGDAPARAM("B2", 0xA2), new STGDAPARAM("B3", 0xA3),
\r
1568 new STGDAPARAM("B4", 0xA4), new STGDAPARAM("B5", 0xA5), new STGDAPARAM("B6", 0xA6),
\r
1569 new STGDAPARAM("B7", 0xA7), new STGDAPARAM("BW", 0xA8), new STGDAPARAM("G0", 0x20),
\r
1570 new STGDAPARAM("B0", 0xA0)
\r
1572 #else // 2011.1.1 yyagi GDA->DTX変換テーブル リファクタ前
\r
1573 STGDAPARAM[] stgdaparamArray = new STGDAPARAM[62];
\r
1574 STGDAPARAM stgdaparam62 = new STGDAPARAM();
\r
1575 STGDAPARAM stgdaparam = stgdaparam62;
\r
1576 stgdaparam.s = "TC";
\r
1578 stgdaparamArray[ 0 ] = stgdaparam;
\r
1579 stgdaparam62 = new STGDAPARAM();
\r
1580 STGDAPARAM stgdaparam2 = stgdaparam62;
\r
1581 stgdaparam2.s = "BL";
\r
1582 stgdaparam2.c = 2;
\r
1583 stgdaparamArray[ 1 ] = stgdaparam2;
\r
1584 stgdaparam62 = new STGDAPARAM();
\r
1585 STGDAPARAM stgdaparam3 = stgdaparam62;
\r
1586 stgdaparam3.s = "GS";
\r
1587 stgdaparam3.c = 0x29;
\r
1588 stgdaparamArray[ 2 ] = stgdaparam3;
\r
1589 stgdaparam62 = new STGDAPARAM();
\r
1590 STGDAPARAM stgdaparam4 = stgdaparam62;
\r
1591 stgdaparam4.s = "DS";
\r
1592 stgdaparam4.c = 0x30;
\r
1593 stgdaparamArray[ 3 ] = stgdaparam4;
\r
1594 stgdaparam62 = new STGDAPARAM();
\r
1595 STGDAPARAM stgdaparam5 = stgdaparam62;
\r
1596 stgdaparam5.s = "FI";
\r
1597 stgdaparam5.c = 0x53;
\r
1598 stgdaparamArray[ 4 ] = stgdaparam5;
\r
1599 stgdaparam62 = new STGDAPARAM();
\r
1600 STGDAPARAM stgdaparam6 = stgdaparam62;
\r
1601 stgdaparam6.s = "HH";
\r
1602 stgdaparam6.c = 0x11;
\r
1603 stgdaparamArray[ 5 ] = stgdaparam6;
\r
1604 stgdaparam62 = new STGDAPARAM();
\r
1605 STGDAPARAM stgdaparam7 = stgdaparam62;
\r
1606 stgdaparam7.s = "SD";
\r
1607 stgdaparam7.c = 0x12;
\r
1608 stgdaparamArray[ 6 ] = stgdaparam7;
\r
1609 stgdaparam62 = new STGDAPARAM();
\r
1610 STGDAPARAM stgdaparam8 = stgdaparam62;
\r
1611 stgdaparam8.s = "BD";
\r
1612 stgdaparam8.c = 0x13;
\r
1613 stgdaparamArray[ 7 ] = stgdaparam8;
\r
1614 stgdaparam62 = new STGDAPARAM();
\r
1615 STGDAPARAM stgdaparam9 = stgdaparam62;
\r
1616 stgdaparam9.s = "HT";
\r
1617 stgdaparam9.c = 20;
\r
1618 stgdaparamArray[ 8 ] = stgdaparam9;
\r
1619 stgdaparam62 = new STGDAPARAM();
\r
1620 STGDAPARAM stgdaparam10 = stgdaparam62;
\r
1621 stgdaparam10.s = "LT";
\r
1622 stgdaparam10.c = 0x15;
\r
1623 stgdaparamArray[ 9 ] = stgdaparam10;
\r
1624 stgdaparam62 = new STGDAPARAM();
\r
1625 STGDAPARAM stgdaparam11 = stgdaparam62;
\r
1626 stgdaparam11.s = "CY";
\r
1627 stgdaparam11.c = 0x16;
\r
1628 stgdaparamArray[ 10 ] = stgdaparam11;
\r
1629 stgdaparam62 = new STGDAPARAM();
\r
1630 STGDAPARAM stgdaparam12 = stgdaparam62;
\r
1631 stgdaparam12.s = "G1";
\r
1632 stgdaparam12.c = 0x21;
\r
1633 stgdaparamArray[ 11 ] = stgdaparam12;
\r
1634 stgdaparam62 = new STGDAPARAM();
\r
1635 STGDAPARAM stgdaparam13 = stgdaparam62;
\r
1636 stgdaparam13.s = "G2";
\r
1637 stgdaparam13.c = 0x22;
\r
1638 stgdaparamArray[ 12 ] = stgdaparam13;
\r
1639 stgdaparam62 = new STGDAPARAM();
\r
1640 STGDAPARAM stgdaparam14 = stgdaparam62;
\r
1641 stgdaparam14.s = "G3";
\r
1642 stgdaparam14.c = 0x23;
\r
1643 stgdaparamArray[ 13 ] = stgdaparam14;
\r
1644 stgdaparam62 = new STGDAPARAM();
\r
1645 STGDAPARAM stgdaparam15 = stgdaparam62;
\r
1646 stgdaparam15.s = "G4";
\r
1647 stgdaparam15.c = 0x24;
\r
1648 stgdaparamArray[ 14 ] = stgdaparam15;
\r
1649 stgdaparam62 = new STGDAPARAM();
\r
1650 STGDAPARAM stgdaparam16 = stgdaparam62;
\r
1651 stgdaparam16.s = "G5";
\r
1652 stgdaparam16.c = 0x25;
\r
1653 stgdaparamArray[ 15 ] = stgdaparam16;
\r
1654 stgdaparam62 = new STGDAPARAM();
\r
1655 STGDAPARAM stgdaparam17 = stgdaparam62;
\r
1656 stgdaparam17.s = "G6";
\r
1657 stgdaparam17.c = 0x26;
\r
1658 stgdaparamArray[ 0x10 ] = stgdaparam17;
\r
1659 stgdaparam62 = new STGDAPARAM();
\r
1660 STGDAPARAM stgdaparam18 = stgdaparam62;
\r
1661 stgdaparam18.s = "G7";
\r
1662 stgdaparam18.c = 0x27;
\r
1663 stgdaparamArray[ 0x11 ] = stgdaparam18;
\r
1664 stgdaparam62 = new STGDAPARAM();
\r
1665 STGDAPARAM stgdaparam19 = stgdaparam62;
\r
1666 stgdaparam19.s = "GW";
\r
1667 stgdaparam19.c = 40;
\r
1668 stgdaparamArray[ 0x12 ] = stgdaparam19;
\r
1669 stgdaparam62 = new STGDAPARAM();
\r
1670 STGDAPARAM stgdaparam20 = stgdaparam62;
\r
1671 stgdaparam20.s = "01";
\r
1672 stgdaparam20.c = 0x61;
\r
1673 stgdaparamArray[ 0x13 ] = stgdaparam20;
\r
1674 stgdaparam62 = new STGDAPARAM();
\r
1675 STGDAPARAM stgdaparam21 = stgdaparam62;
\r
1676 stgdaparam21.s = "02";
\r
1677 stgdaparam21.c = 0x62;
\r
1678 stgdaparamArray[ 20 ] = stgdaparam21;
\r
1679 stgdaparam62 = new STGDAPARAM();
\r
1680 STGDAPARAM stgdaparam22 = stgdaparam62;
\r
1681 stgdaparam22.s = "03";
\r
1682 stgdaparam22.c = 0x63;
\r
1683 stgdaparamArray[ 0x15 ] = stgdaparam22;
\r
1684 stgdaparam62 = new STGDAPARAM();
\r
1685 STGDAPARAM stgdaparam23 = stgdaparam62;
\r
1686 stgdaparam23.s = "04";
\r
1687 stgdaparam23.c = 100;
\r
1688 stgdaparamArray[ 0x16 ] = stgdaparam23;
\r
1689 stgdaparam62 = new STGDAPARAM();
\r
1690 STGDAPARAM stgdaparam24 = stgdaparam62;
\r
1691 stgdaparam24.s = "05";
\r
1692 stgdaparam24.c = 0x65;
\r
1693 stgdaparamArray[ 0x17 ] = stgdaparam24;
\r
1694 stgdaparam62 = new STGDAPARAM();
\r
1695 STGDAPARAM stgdaparam25 = stgdaparam62;
\r
1696 stgdaparam25.s = "06";
\r
1697 stgdaparam25.c = 0x66;
\r
1698 stgdaparamArray[ 0x18 ] = stgdaparam25;
\r
1699 stgdaparam62 = new STGDAPARAM();
\r
1700 STGDAPARAM stgdaparam26 = stgdaparam62;
\r
1701 stgdaparam26.s = "07";
\r
1702 stgdaparam26.c = 0x67;
\r
1703 stgdaparamArray[ 0x19 ] = stgdaparam26;
\r
1704 stgdaparam62 = new STGDAPARAM();
\r
1705 STGDAPARAM stgdaparam27 = stgdaparam62;
\r
1706 stgdaparam27.s = "08";
\r
1707 stgdaparam27.c = 0x68;
\r
1708 stgdaparamArray[ 0x1a ] = stgdaparam27;
\r
1709 stgdaparam62 = new STGDAPARAM();
\r
1710 STGDAPARAM stgdaparam28 = stgdaparam62;
\r
1711 stgdaparam28.s = "09";
\r
1712 stgdaparam28.c = 0x69;
\r
1713 stgdaparamArray[ 0x1b ] = stgdaparam28;
\r
1714 stgdaparam62 = new STGDAPARAM();
\r
1715 STGDAPARAM stgdaparam29 = stgdaparam62;
\r
1716 stgdaparam29.s = "0A";
\r
1717 stgdaparam29.c = 0x70;
\r
1718 stgdaparamArray[ 0x1c ] = stgdaparam29;
\r
1719 stgdaparam62 = new STGDAPARAM();
\r
1720 STGDAPARAM stgdaparam30 = stgdaparam62;
\r
1721 stgdaparam30.s = "0B";
\r
1722 stgdaparam30.c = 0x71;
\r
1723 stgdaparamArray[ 0x1d ] = stgdaparam30;
\r
1724 stgdaparam62 = new STGDAPARAM();
\r
1725 STGDAPARAM stgdaparam31 = stgdaparam62;
\r
1726 stgdaparam31.s = "0C";
\r
1727 stgdaparam31.c = 0x72;
\r
1728 stgdaparamArray[ 30 ] = stgdaparam31;
\r
1729 stgdaparam62 = new STGDAPARAM();
\r
1730 STGDAPARAM stgdaparam32 = stgdaparam62;
\r
1731 stgdaparam32.s = "0D";
\r
1732 stgdaparam32.c = 0x73;
\r
1733 stgdaparamArray[ 0x1f ] = stgdaparam32;
\r
1734 stgdaparam62 = new STGDAPARAM();
\r
1735 STGDAPARAM stgdaparam33 = stgdaparam62;
\r
1736 stgdaparam33.s = "0E";
\r
1737 stgdaparam33.c = 0x74;
\r
1738 stgdaparamArray[ 0x20 ] = stgdaparam33;
\r
1739 stgdaparam62 = new STGDAPARAM();
\r
1740 STGDAPARAM stgdaparam34 = stgdaparam62;
\r
1741 stgdaparam34.s = "0F";
\r
1742 stgdaparam34.c = 0x75;
\r
1743 stgdaparamArray[ 0x21 ] = stgdaparam34;
\r
1744 stgdaparam62 = new STGDAPARAM();
\r
1745 STGDAPARAM stgdaparam35 = stgdaparam62;
\r
1746 stgdaparam35.s = "10";
\r
1747 stgdaparam35.c = 0x76;
\r
1748 stgdaparamArray[ 0x22 ] = stgdaparam35;
\r
1749 stgdaparam62 = new STGDAPARAM();
\r
1750 STGDAPARAM stgdaparam36 = stgdaparam62;
\r
1751 stgdaparam36.s = "11";
\r
1752 stgdaparam36.c = 0x77;
\r
1753 stgdaparamArray[ 0x23 ] = stgdaparam36;
\r
1754 stgdaparam62 = new STGDAPARAM();
\r
1755 STGDAPARAM stgdaparam37 = stgdaparam62;
\r
1756 stgdaparam37.s = "12";
\r
1757 stgdaparam37.c = 120;
\r
1758 stgdaparamArray[ 0x24 ] = stgdaparam37;
\r
1759 stgdaparam62 = new STGDAPARAM();
\r
1760 STGDAPARAM stgdaparam38 = stgdaparam62;
\r
1761 stgdaparam38.s = "13";
\r
1762 stgdaparam38.c = 0x79;
\r
1763 stgdaparamArray[ 0x25 ] = stgdaparam38;
\r
1764 stgdaparam62 = new STGDAPARAM();
\r
1765 STGDAPARAM stgdaparam39 = stgdaparam62;
\r
1766 stgdaparam39.s = "14";
\r
1767 stgdaparam39.c = 0x80;
\r
1768 stgdaparamArray[ 0x26 ] = stgdaparam39;
\r
1769 stgdaparam62 = new STGDAPARAM();
\r
1770 STGDAPARAM stgdaparam40 = stgdaparam62;
\r
1771 stgdaparam40.s = "15";
\r
1772 stgdaparam40.c = 0x81;
\r
1773 stgdaparamArray[ 0x27 ] = stgdaparam40;
\r
1774 stgdaparam62 = new STGDAPARAM();
\r
1775 STGDAPARAM stgdaparam41 = stgdaparam62;
\r
1776 stgdaparam41.s = "16";
\r
1777 stgdaparam41.c = 130;
\r
1778 stgdaparamArray[ 40 ] = stgdaparam41;
\r
1779 stgdaparam62 = new STGDAPARAM();
\r
1780 STGDAPARAM stgdaparam42 = stgdaparam62;
\r
1781 stgdaparam42.s = "17";
\r
1782 stgdaparam42.c = 0x83;
\r
1783 stgdaparamArray[ 0x29 ] = stgdaparam42;
\r
1784 stgdaparam62 = new STGDAPARAM();
\r
1785 STGDAPARAM stgdaparam43 = stgdaparam62;
\r
1786 stgdaparam43.s = "18";
\r
1787 stgdaparam43.c = 0x84;
\r
1788 stgdaparamArray[ 0x2a ] = stgdaparam43;
\r
1789 stgdaparam62 = new STGDAPARAM();
\r
1790 STGDAPARAM stgdaparam44 = stgdaparam62;
\r
1791 stgdaparam44.s = "19";
\r
1792 stgdaparam44.c = 0x85;
\r
1793 stgdaparamArray[ 0x2b ] = stgdaparam44;
\r
1794 stgdaparam62 = new STGDAPARAM();
\r
1795 STGDAPARAM stgdaparam45 = stgdaparam62;
\r
1796 stgdaparam45.s = "1A";
\r
1797 stgdaparam45.c = 0x86;
\r
1798 stgdaparamArray[ 0x2c ] = stgdaparam45;
\r
1799 stgdaparam62 = new STGDAPARAM();
\r
1800 STGDAPARAM stgdaparam46 = stgdaparam62;
\r
1801 stgdaparam46.s = "1B";
\r
1802 stgdaparam46.c = 0x87;
\r
1803 stgdaparamArray[ 0x2d ] = stgdaparam46;
\r
1804 stgdaparam62 = new STGDAPARAM();
\r
1805 STGDAPARAM stgdaparam47 = stgdaparam62;
\r
1806 stgdaparam47.s = "1C";
\r
1807 stgdaparam47.c = 0x88;
\r
1808 stgdaparamArray[ 0x2e ] = stgdaparam47;
\r
1809 stgdaparam62 = new STGDAPARAM();
\r
1810 STGDAPARAM stgdaparam48 = stgdaparam62;
\r
1811 stgdaparam48.s = "1D";
\r
1812 stgdaparam48.c = 0x89;
\r
1813 stgdaparamArray[ 0x2f ] = stgdaparam48;
\r
1814 stgdaparam62 = new STGDAPARAM();
\r
1815 STGDAPARAM stgdaparam49 = stgdaparam62;
\r
1816 stgdaparam49.s = "1E";
\r
1817 stgdaparam49.c = 0x90;
\r
1818 stgdaparamArray[ 0x30 ] = stgdaparam49;
\r
1819 stgdaparam62 = new STGDAPARAM();
\r
1820 STGDAPARAM stgdaparam50 = stgdaparam62;
\r
1821 stgdaparam50.s = "1F";
\r
1822 stgdaparam50.c = 0x91;
\r
1823 stgdaparamArray[ 0x31 ] = stgdaparam50;
\r
1824 stgdaparam62 = new STGDAPARAM();
\r
1825 STGDAPARAM stgdaparam51 = stgdaparam62;
\r
1826 stgdaparam51.s = "20";
\r
1827 stgdaparam51.c = 0x92;
\r
1828 stgdaparamArray[ 50 ] = stgdaparam51;
\r
1829 stgdaparam62 = new STGDAPARAM();
\r
1830 STGDAPARAM stgdaparam52 = stgdaparam62;
\r
1831 stgdaparam52.s = "B1";
\r
1832 stgdaparam52.c = 0xa1;
\r
1833 stgdaparamArray[ 0x33 ] = stgdaparam52;
\r
1834 stgdaparam62 = new STGDAPARAM();
\r
1835 STGDAPARAM stgdaparam53 = stgdaparam62;
\r
1836 stgdaparam53.s = "B2";
\r
1837 stgdaparam53.c = 0xa2;
\r
1838 stgdaparamArray[ 0x34 ] = stgdaparam53;
\r
1839 stgdaparam62 = new STGDAPARAM();
\r
1840 STGDAPARAM stgdaparam54 = stgdaparam62;
\r
1841 stgdaparam54.s = "B3";
\r
1842 stgdaparam54.c = 0xa3;
\r
1843 stgdaparamArray[ 0x35 ] = stgdaparam54;
\r
1844 stgdaparam62 = new STGDAPARAM();
\r
1845 STGDAPARAM stgdaparam55 = stgdaparam62;
\r
1846 stgdaparam55.s = "B4";
\r
1847 stgdaparam55.c = 0xa4;
\r
1848 stgdaparamArray[ 0x36 ] = stgdaparam55;
\r
1849 stgdaparam62 = new STGDAPARAM();
\r
1850 STGDAPARAM stgdaparam56 = stgdaparam62;
\r
1851 stgdaparam56.s = "B5";
\r
1852 stgdaparam56.c = 0xa5;
\r
1853 stgdaparamArray[ 0x37 ] = stgdaparam56;
\r
1854 stgdaparam62 = new STGDAPARAM();
\r
1855 STGDAPARAM stgdaparam57 = stgdaparam62;
\r
1856 stgdaparam57.s = "B6";
\r
1857 stgdaparam57.c = 0xa6;
\r
1858 stgdaparamArray[ 0x38 ] = stgdaparam57;
\r
1859 stgdaparam62 = new STGDAPARAM();
\r
1860 STGDAPARAM stgdaparam58 = stgdaparam62;
\r
1861 stgdaparam58.s = "B7";
\r
1862 stgdaparam58.c = 0xa7;
\r
1863 stgdaparamArray[ 0x39 ] = stgdaparam58;
\r
1864 stgdaparam62 = new STGDAPARAM();
\r
1865 STGDAPARAM stgdaparam59 = stgdaparam62;
\r
1866 stgdaparam59.s = "BW";
\r
1867 stgdaparam59.c = 0xa8;
\r
1868 stgdaparamArray[ 0x3a ] = stgdaparam59;
\r
1869 stgdaparam62 = new STGDAPARAM();
\r
1870 STGDAPARAM stgdaparam60 = stgdaparam62;
\r
1871 stgdaparam60.s = "G0";
\r
1872 stgdaparam60.c = 0x20;
\r
1873 stgdaparamArray[ 0x3b ] = stgdaparam60;
\r
1874 STGDAPARAM stgdaparam61 = new STGDAPARAM();
\r
1875 stgdaparam61.s = "B0";
\r
1876 stgdaparam61.c = 160;
\r
1877 stgdaparamArray[ 60 ] = stgdaparam61;
\r
1879 this.stGDAParam = stgdaparamArray;
\r
1880 this.nBGMAdjust = 0;
\r
1882 #if TEST_NOTEOFFMODE
\r
1883 this.bHH演奏で直前のHHを消音する = true;
\r
1884 this.bGUITAR演奏で直前のGUITARを消音する = true;
\r
1885 this.bBASS演奏で直前のBASSを消音する = true;
\r
1889 public CDTX( string str全入力文字列 )
\r
1893 this.t入力・全入力文字列から( str全入力文字列 );
\r
1895 public CDTX( string strファイル名, bool bヘッダのみ )
\r
1899 this.t入力( strファイル名, bヘッダのみ );
\r
1901 public CDTX( string str全入力文字列, double db再生速度, int nBGMAdjust )
\r
1905 this.t入力・全入力文字列から( str全入力文字列, db再生速度, nBGMAdjust );
\r
1907 public CDTX( string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust )
\r
1911 this.t入力( strファイル名, bヘッダのみ, db再生速度, nBGMAdjust );
\r
1917 public int nモニタを考慮した音量( E楽器パート part )
\r
1919 CConfigIni configIni = CDTXMania.ConfigIni;
\r
1922 case E楽器パート.DRUMS:
\r
1923 if( configIni.b演奏音を強調する.Drums )
\r
1925 return configIni.n自動再生音量;
\r
1927 return configIni.n手動再生音量;
\r
1929 case E楽器パート.GUITAR:
\r
1930 if( configIni.b演奏音を強調する.Guitar )
\r
1932 return configIni.n自動再生音量;
\r
1934 return configIni.n手動再生音量;
\r
1937 if( configIni.b演奏音を強調する.Bass )
\r
1939 return configIni.n自動再生音量;
\r
1941 return configIni.n手動再生音量;
\r
1943 if( ( !configIni.b演奏音を強調する.Drums && !configIni.b演奏音を強調する.Guitar ) && !configIni.b演奏音を強調する.Bass )
\r
1945 return configIni.n手動再生音量;
\r
1947 return configIni.n自動再生音量;
\r
1949 public void tAVIの読み込み()
\r
1951 if( this.listAVI != null )
\r
1953 foreach( CAVI cavi in this.listAVI.Values )
\r
1955 cavi.OnDeviceCreated();
\r
1958 if( !this.bヘッダのみ )
\r
1960 foreach( CChip chip in this.listChip )
\r
1962 if( chip.nチャンネル番号 == 0x54 )
\r
1964 chip.eAVI種別 = EAVI種別.Unknown;
\r
1966 chip.rAVIPan = null;
\r
1967 if( this.listAVIPAN.ContainsKey( chip.n整数値 ) )
\r
1969 CAVIPAN cavipan = this.listAVIPAN[ chip.n整数値 ];
\r
1970 if( this.listAVI.ContainsKey( cavipan.nAVI番号 ) && ( this.listAVI[ cavipan.nAVI番号 ].avi != null ) )
\r
1972 chip.eAVI種別 = EAVI種別.AVIPAN;
\r
1973 chip.rAVI = this.listAVI[ cavipan.nAVI番号 ];
\r
1974 chip.rAVIPan = cavipan;
\r
1978 if( this.listAVI.ContainsKey( chip.n整数値 ) && ( this.listAVI[ chip.n整数値 ].avi != null ) )
\r
1980 chip.eAVI種別 = EAVI種別.AVI;
\r
1981 chip.rAVI = this.listAVI[ chip.n整数値 ];
\r
1987 public void tBMP_BMPTEXの読み込み()
\r
1989 if( this.listBMP != null )
\r
1991 foreach( CBMP cbmp in this.listBMP.Values )
\r
1993 cbmp.OnDeviceCreated();
\r
1996 if( this.listBMPTEX != null )
\r
1998 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
2000 cbmptex.OnDeviceCreated();
\r
2003 if( !this.bヘッダのみ )
\r
2005 foreach( CChip chip in this.listChip )
\r
2007 if( ( ( ( chip.nチャンネル番号 == 4 ) || ( chip.nチャンネル番号 == 7 ) ) || ( ( chip.nチャンネル番号 >= 0x55 ) && ( chip.nチャンネル番号 <= 0x59 ) ) ) || ( chip.nチャンネル番号 == 0x60 ) )
\r
2009 chip.eBGA種別 = EBGA種別.Unknown;
\r
2011 chip.rBMPTEX = null;
\r
2013 chip.rBGAPan = null;
\r
2014 if( this.listBGAPAN.ContainsKey( chip.n整数値 ) )
\r
2016 CBGAPAN cbgapan = this.listBGAPAN[ chip.n整数値 ];
\r
2017 if( this.listBMPTEX.ContainsKey( cbgapan.nBMP番号 ) && this.listBMPTEX[ cbgapan.nBMP番号 ].bUse )
\r
2019 chip.eBGA種別 = EBGA種別.BGAPAN;
\r
2020 chip.rBMPTEX = this.listBMPTEX[ cbgapan.nBMP番号 ];
\r
2021 chip.rBGAPan = cbgapan;
\r
2024 if( this.listBMP.ContainsKey( cbgapan.nBMP番号 ) && this.listBMP[ cbgapan.nBMP番号 ].bUse )
\r
2026 chip.eBGA種別 = EBGA種別.BGAPAN;
\r
2027 chip.rBMP = this.listBMP[ cbgapan.nBMP番号 ];
\r
2028 chip.rBGAPan = cbgapan;
\r
2032 if( this.listBGA.ContainsKey( chip.n整数値 ) )
\r
2034 CBGA cbga = this.listBGA[ chip.n整数値 ];
\r
2035 if( this.listBMPTEX.ContainsKey( cbga.nBMP番号 ) && this.listBMPTEX[ cbga.nBMP番号 ].bUse )
\r
2037 chip.eBGA種別 = EBGA種別.BGA;
\r
2038 chip.rBMPTEX = this.listBMPTEX[ cbga.nBMP番号 ];
\r
2042 if( this.listBMP.ContainsKey( cbga.nBMP番号 ) && this.listBMP[ cbga.nBMP番号 ].bUse )
\r
2044 chip.eBGA種別 = EBGA種別.BGA;
\r
2045 chip.rBMP = this.listBMP[ cbga.nBMP番号 ];
\r
2050 if( this.listBMPTEX.ContainsKey( chip.n整数値 ) && this.listBMPTEX[ chip.n整数値 ].bUse )
\r
2052 chip.eBGA種別 = EBGA種別.BMPTEX;
\r
2053 chip.rBMPTEX = this.listBMPTEX[ chip.n整数値 ];
\r
2056 if( this.listBMP.ContainsKey( chip.n整数値 ) && this.listBMP[ chip.n整数値 ].bUse )
\r
2058 chip.eBGA種別 = EBGA種別.BMP;
\r
2059 chip.rBMP = this.listBMP[ chip.n整数値 ];
\r
2063 if( ( ( ( chip.nチャンネル番号 == 0xc4 ) || ( chip.nチャンネル番号 == 0xc7 ) ) || ( ( chip.nチャンネル番号 >= 0xd5 ) && ( chip.nチャンネル番号 <= 0xd9 ) ) ) || ( chip.nチャンネル番号 == 0xe0 ) )
\r
2065 chip.eBGA種別 = EBGA種別.Unknown;
\r
2067 chip.rBMPTEX = null;
\r
2069 chip.rBGAPan = null;
\r
2070 if( this.listBMPTEX.ContainsKey( chip.n整数値 ) && this.listBMPTEX[ chip.n整数値 ].bUse )
\r
2072 chip.eBGA種別 = EBGA種別.BMPTEX;
\r
2073 chip.rBMPTEX = this.listBMPTEX[ chip.n整数値 ];
\r
2075 else if( this.listBMP.ContainsKey( chip.n整数値 ) && this.listBMP[ chip.n整数値 ].bUse )
\r
2077 chip.eBGA種別 = EBGA種別.BMP;
\r
2078 chip.rBMP = this.listBMP[ chip.n整数値 ];
\r
2084 public void tWave再生位置自動補正()
\r
2086 foreach( CWAV cwav in this.listWAV.Values )
\r
2088 this.tWave再生位置自動補正( cwav );
\r
2091 public void tWave再生位置自動補正( CWAV wc )
\r
2093 for( int i = 0; i < 4; i++ )
\r
2095 if( ( ( wc.rSound[ i ] != null ) && wc.rSound[ i ].b再生中 ) && ( wc.rSound[ i ].n総演奏時間ms >= 5000 ) )
\r
2097 long nCurrentTime = CDTXMania.Timer.nシステム時刻;
\r
2098 if( nCurrentTime > wc.n再生開始時刻[ i ] )
\r
2100 long nAbsTimeFromStartPlaying = nCurrentTime - wc.n再生開始時刻[ i ];
\r
2101 wc.rSound[ i ].t再生位置を変更する( wc.rSound[ i ].t時刻から位置を返す( nAbsTimeFromStartPlaying ) );
\r
2106 public void tWavの再生停止( int nWaveの内部番号 )
\r
2108 if( this.listWAV.ContainsKey( nWaveの内部番号 ) )
\r
2110 CWAV cwav = this.listWAV[ nWaveの内部番号 ];
\r
2111 for( int i = 0; i < 4; i++ )
\r
2113 if( cwav.rSound[ i ] != null )
\r
2115 cwav.rSound[ i ].t再生を停止する();
\r
2120 public void tWAVの読み込み()
\r
2122 // Trace.TraceInformation("WAV files={0}", this.listWAV.Count);
\r
2124 foreach (CWAV cwav in this.listWAV.Values)
\r
2126 // string strCount = count.ToString() + " / " + this.listWAV.Count.ToString();
\r
2127 // Debug.WriteLine(strCount);
\r
2128 // CDTXMania.act文字コンソール.tPrint(0, 0, C文字コンソール.Eフォント種別.白, strCount);
\r
2131 string str = string.IsNullOrEmpty(this.PATH_WAV) ? this.strフォルダ名 : this.PATH_WAV;
\r
2132 str = str + cwav.strファイル名;
\r
2135 for( int i = 0; i < 4; i++ )
\r
2139 cwav.rSound[i] = CDTXMania.Sound管理.tサウンドを生成する(str);
\r
2140 cwav.rSound[ i ].n音量 = 100;
\r
2141 if( ( i == 0 ) && CDTXMania.ConfigIni.bLog作成解放ログ出力 )
\r
2143 Trace.TraceInformation( "サウンドを作成しました。({3})({0})({1})({2}bytes)", new object[] { cwav.strコメント文, str, cwav.rSound[ i ].nサウンドバッファサイズ, cwav.rSound[ i ].bストリーム再生する ? "Stream" : "OnMemory" } );
\r
2148 cwav.rSound[ i ] = null;
\r
2151 Trace.TraceError( "サウンドの作成に失敗しました。({0})({1})", new object[] { cwav.strコメント文, str } );
\r
2154 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].bストリーム再生する )
\r
2158 // Type t = typeof(CSound);
\r
2159 // MethodInfo[] methods = t.GetMethods(
\r
2160 // BindingFlags.Public | BindingFlags.NonPublic |
\r
2161 // BindingFlags.Instance | BindingFlags.Static
\r
2164 // for (int j = 1; j < 3; j++)
\r
2166 // SlimDX.DirectSound.SoundBuffer result;
\r
2167 // CDTXMania.Sound管理.Device.DuplicateSoundBuffer(
\r
2168 // cwav.rSound[0].Buffer,
\r
2170 // cwav.rSound[j].Buffer = (SlimDX.DirectSound.SecondarySoundBuffer)result;
\r
2171 // cwav.rSound[j].bストリーム再生する = cwav.rSound[0].bストリーム再生する;
\r
2172 // cwav.rSound[j].bループする
\r
2173 // foreach(MethodInfo m in methods) {
\r
2174 // if (m cwav..rSound[j].
\r
2176 // cwav.rSound[0].Buffer.
\r
2178 cwav.rSound[1] = cwav.rSound[0]; // #24007 2010.11.23 yyagi add: to accelerate loading chip sounds
\r
2179 cwav.rSound[2] = cwav.rSound[0]; //
\r
2180 cwav.rSound[3] = cwav.rSound[0]; //
\r
2185 catch( Exception exception )
\r
2187 Trace.TraceError( "サウンドの生成に失敗しました。({0})({1})({2})", new object[] { exception.Message, cwav.strコメント文, str } );
\r
2188 for( int j = 0; j < 4; j++ )
\r
2190 cwav.rSound[ j ] = null;
\r
2196 public static string tZZ( int n )
\r
2198 if( ( n < 0 ) || ( n >= 36 * 36) )
\r
2202 string str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
\r
2203 return new string( new char[] { str[ n / 36 ], str[ n % 36 ] } );
\r
2207 /// ギターのレーンビットパターン
\r
2209 public enum Eレーンビットパターン
\r
2220 public void tギターとベースのランダム化(E楽器パート part, Eランダムモード eRandom)
\r
2222 if( ( ( part == E楽器パート.GUITAR ) || ( part == E楽器パート.BASS ) ) && ( eRandom != Eランダムモード.OFF ) )
\r
2224 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
2225 int n小節番号 = -10000;
\r
2226 int n小節内乱数6通り = 0;
\r
2227 // int GOTO_END = 0; // gotoの飛び先のダミーコードで使うダミー変数
\r
2228 foreach( CChip chip in this.listChip )
\r
2230 int nRGBレーンビットパターン;
\r
2231 int n新RGBレーンビットパターン = 0; // 「未割り当てのローカル変数」ビルドエラー回避のために0を初期値に設定
\r
2233 if( ( chip.n発声位置 / 384 ) != n小節番号 ) // 小節が変化したら
\r
2235 n小節番号 = chip.n発声位置 / 384;
\r
2236 n小節内乱数6通り = CDTXMania.Random.Next( 6 );
\r
2238 int nランダム化前チャンネル番号 = chip.nチャンネル番号;
\r
2239 if( ( ( ( part != E楽器パート.GUITAR ) || ( 0x20 > nランダム化前チャンネル番号 ) ) || ( nランダム化前チャンネル番号 > 0x27 ) )
\r
2240 && ( ( ( part != E楽器パート.BASS ) || ( 0xA0 > nランダム化前チャンネル番号 ) ) || ( nランダム化前チャンネル番号 > 0xa7 ) )
\r
2247 case Eランダムモード.RANDOM: // 1小節単位でレーンのR/G/Bがランダムに入れ替わる
\r
2248 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | nランダムレーン候補[ n小節内乱数6通り, nランダム化前チャンネル番号 & 0x07 ];
\r
2249 continue; // goto Label_02C4;
\r
2251 case Eランダムモード.SUPERRANDOM: // チップごとにR/G/Bがランダムで入れ替わる(レーンの本数までは変わらない)。
\r
2252 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | nランダムレーン候補[ CDTXMania.Random.Next( 6 ), nランダム化前チャンネル番号 & 0x07 ];
\r
2253 continue; // goto Label_02C4;
\r
2255 case Eランダムモード.HYPERRANDOM: // レーンの本数も変わる
\r
2256 nRGBレーンビットパターン = nランダム化前チャンネル番号 & 7;
\r
2257 // n新RGBレーンビットパターン = (int)Eレーンビットパターン.OPEN; // この値は結局未使用なので削除
\r
2258 flag = ((part == E楽器パート.GUITAR) && this.bチップがある.OpenGuitar) || ((part == E楽器パート.BASS) && this.bチップがある.OpenBass); // #23546 2010.10.28 yyagi fixed (bチップがある.Bass→bチップがある.OpenBass)
\r
2259 if (((nRGBレーンビットパターン != (int)Eレーンビットパターン.xxB) && (nRGBレーンビットパターン != (int)Eレーンビットパターン.xGx)) && (nRGBレーンビットパターン != (int)Eレーンビットパターン.Rxx)) // xxB, xGx, Rxx レーン1本相当
\r
2261 break; // レーン1本相当でなければ、とりあえず先に進む
\r
2263 n新RGBレーンビットパターン = CDTXMania.Random.Next( 6 ) + 1; // レーン1本相当なら、レーン1本か2本(1~6)に変化して終了
\r
2267 continue; // goto Label_02C4;
\r
2269 switch( nRGBレーンビットパターン )
\r
2271 case (int)Eレーンビットパターン.xGB: // xGB レーン2本相当
\r
2272 case (int)Eレーンビットパターン.RxB: // RxB
\r
2273 case (int)Eレーンビットパターン.RGx: // RGx
\r
2274 n新RGBレーンビットパターン = flag ? CDTXMania.Random.Next( 8 ) : ( CDTXMania.Random.Next( 7 ) + 1 ); // OPENあり譜面ならOPENを含むランダム, OPENなし譜面ならOPENを含まないランダム
\r
2275 break; // goto Label_02B2;
\r
2278 if( nRGBレーンビットパターン == (int)Eレーンビットパターン.RGB ) // RGB レーン3本相当
\r
2280 if( flag ) // OPENあり譜面の場合
\r
2282 int n乱数パーセント = CDTXMania.Random.Next( 100 );
\r
2283 if( n乱数パーセント < 30 )
\r
2285 n新RGBレーンビットパターン = (int)Eレーンビットパターン.OPEN;
\r
2287 else if( n乱数パーセント < 60 )
\r
2289 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGB;
\r
2291 else if( n乱数パーセント < 85 )
\r
2293 switch( CDTXMania.Random.Next( 3 ) )
\r
2296 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGB;
\r
2297 break; // goto Label_02B2;
\r
2300 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RxB;
\r
2301 break; // goto Label_02B2;
\r
2303 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGx;
\r
2307 switch( CDTXMania.Random.Next( 3 ) )
\r
2310 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xxB;
\r
2311 break; // goto Label_02B2;
\r
2314 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGx;
\r
2315 break; // goto Label_02B2;
\r
2317 n新RGBレーンビットパターン = (int)Eレーンビットパターン.Rxx;
\r
2320 else // OPENなし譜面の場合
\r
2322 int n乱数パーセント = CDTXMania.Random.Next( 100 );
\r
2323 if( n乱数パーセント < 60 )
\r
2325 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGB;
\r
2327 else if( n乱数パーセント < 85 )
\r
2329 switch( CDTXMania.Random.Next( 3 ) )
\r
2332 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGB;
\r
2333 break; // goto Label_02B2;
\r
2336 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RxB;
\r
2337 break; // goto Label_02B2;
\r
2339 n新RGBレーンビットパターン = (int)Eレーンビットパターン.RGx;
\r
2343 switch( CDTXMania.Random.Next( 3 ) )
\r
2346 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xxB;
\r
2347 break; // goto Label_02B2;
\r
2350 n新RGBレーンビットパターン = (int)Eレーンビットパターン.xGx;
\r
2351 break; // goto Label_02B2;
\r
2353 n新RGBレーンビットパターン = (int)Eレーンビットパターン.Rxx;
\r
2357 break; // goto Label_02B2;
\r
2360 chip.nチャンネル番号 = ( nランダム化前チャンネル番号 & 0xF0 ) | n新RGBレーンビットパターン;
\r
2362 // GOTO_END++; // goto用のダミーコード
\r
2366 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane )
\r
2368 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, CDTXMania.ConfigIni.n自動再生音量, false, false );
\r
2370 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane, int nVol )
\r
2372 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, nVol, false, false );
\r
2374 public void tチップの再生( CChip rChip, long n再生開始システム時刻ms, int nLane, int nVol, bool bMIDIMonitor )
\r
2376 this.tチップの再生( rChip, n再生開始システム時刻ms, nLane, nVol, bMIDIMonitor, false );
\r
2378 public void tチップの再生( CChip pChip, long n再生開始システム時刻ms, int nLane, int nVol, bool bMIDIMonitor, bool bBad )
\r
2380 if( pChip.n整数値・内部番号 >= 0 )
\r
2382 if( ( nLane < 0 ) || ( nLane > 10 ) )
\r
2384 throw new ArgumentOutOfRangeException();
\r
2386 if( this.listWAV.ContainsKey( pChip.n整数値・内部番号 ) )
\r
2388 CWAV wc = this.listWAV[ pChip.n整数値・内部番号 ];
\r
2389 int index = wc.n現在再生中のサウンド番号 = ( wc.n現在再生中のサウンド番号 + 1 ) % 4;
\r
2390 if( ( wc.rSound[ 0 ] != null ) && wc.rSound[ 0 ].bストリーム再生する )
\r
2392 index = wc.n現在再生中のサウンド番号 = 0;
\r
2394 CSound sound = wc.rSound[ index ];
\r
2395 if( sound != null )
\r
2397 sound.n音量 = (int) ( ( (double) ( nVol * wc.n音量 ) ) / 100.0 );
\r
2398 sound.n位置 = wc.n位置;
\r
2401 sound.db周波数倍率 = ( (float) ( 100 + ( ( ( CDTXMania.Random.Next( 3 ) + 1 ) * 7 ) * ( 1 - ( CDTXMania.Random.Next( 2 ) * 2 ) ) ) ) ) / 100f;
\r
2405 sound.db周波数倍率 = 1.0;
\r
2407 sound.db再生速度 = ( (double) CDTXMania.ConfigIni.n演奏速度 ) / 20.0;
\r
2410 wc.n再生開始時刻[ wc.n現在再生中のサウンド番号 ] = n再生開始システム時刻ms;
\r
2411 this.tWave再生位置自動補正( wc );
\r
2415 public void t各自動再生音チップの再生時刻を変更する( int nBGMAdjustの増減値 )
\r
2417 this.nBGMAdjust += nBGMAdjustの増減値;
\r
2418 for( int i = 0; i < this.listChip.Count; i++ )
\r
2420 int nChannelNumber = this.listChip[ i ].nチャンネル番号;
\r
2422 ( nChannelNumber == 1 ) ||
\r
2423 ( ( 0x61 <= nChannelNumber ) && ( nChannelNumber <= 0x69 ) )
\r
2425 ( ( 0x70 <= nChannelNumber ) && ( nChannelNumber <= 0x79 ) )
\r
2427 ( ( ( 0x80 <= nChannelNumber ) && ( nChannelNumber <= 0x89 ) ) || ( ( 0x90 <= nChannelNumber ) && ( nChannelNumber <= 0x92 ) ) )
\r
2430 this.listChip[ i ].n発声時刻ms += nBGMAdjustの増減値;
\r
2433 foreach( CWAV cwav in this.listWAV.Values )
\r
2435 for( int j = 0; j < 4; j++ )
\r
2437 if( ( cwav.rSound[ j ] != null ) && cwav.rSound[ j ].b再生中 )
\r
2439 cwav.n再生開始時刻[ j ] += nBGMAdjustの増減値;
\r
2444 public void t全チップの再生一時停止()
\r
2446 foreach( CWAV cwav in this.listWAV.Values )
\r
2448 for( int i = 0; i < 4; i++ )
\r
2450 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].b再生中 )
\r
2452 cwav.rSound[ i ].t再生を一時停止する();
\r
2453 cwav.n一時停止時刻[ i ] = CDTXMania.Timer.nシステム時刻;
\r
2458 public void t全チップの再生再開()
\r
2460 foreach( CWAV cwav in this.listWAV.Values )
\r
2462 for( int i = 0; i < 4; i++ )
\r
2464 if( ( cwav.rSound[ i ] != null ) && cwav.rSound[ i ].b一時停止中 )
\r
2466 long num1 = cwav.n一時停止時刻[ i ];
\r
2467 long num2 = cwav.n再生開始時刻[ i ];
\r
2468 cwav.rSound[ i ].t再生を再開する( cwav.n一時停止時刻[ i ] - cwav.n再生開始時刻[ i ] );
\r
2469 cwav.n再生開始時刻[ i ] += CDTXMania.Timer.nシステム時刻 - cwav.n一時停止時刻[ i ];
\r
2474 public void t全チップの再生停止()
\r
2476 foreach( CWAV cwav in this.listWAV.Values )
\r
2478 this.tWavの再生停止( cwav.n内部番号 );
\r
2481 public void t入力( string strファイル名, bool bヘッダのみ )
\r
2483 this.t入力( strファイル名, bヘッダのみ, 1.0, 0 );
\r
2485 public void t入力( string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust )
\r
2487 this.bヘッダのみ = bヘッダのみ;
\r
2488 this.strファイル名の絶対パス = Path.GetFullPath( strファイル名 );
\r
2489 this.strファイル名 = Path.GetFileName( this.strファイル名の絶対パス );
\r
2490 this.strフォルダ名 = Path.GetDirectoryName( this.strファイル名の絶対パス ) + @"\";
\r
2491 string str3 = Path.GetExtension( this.strファイル名 ).ToLower();
\r
2492 if( str3 != null )
\r
2494 if( !( str3 == ".dtx" ) )
\r
2496 if( str3 == ".gda" )
\r
2498 this.e種別 = E種別.GDA;
\r
2500 else if( str3 == ".g2d" )
\r
2502 this.e種別 = E種別.G2D;
\r
2504 else if( str3 == ".bms" )
\r
2506 this.e種別 = E種別.BMS;
\r
2508 else if( str3 == ".bme" )
\r
2510 this.e種別 = E種別.BME;
\r
2512 else if( str3 == ".mid" )
\r
2514 this.e種別 = E種別.SMF;
\r
2519 this.e種別 = E種別.DTX;
\r
2522 if( this.e種別 != E種別.SMF )
\r
2524 StreamReader reader = new StreamReader( strファイル名, Encoding.GetEncoding( "shift-jis" ) );
\r
2525 string str2 = reader.ReadToEnd();
\r
2527 this.t入力・全入力文字列から( str2, db再生速度, nBGMAdjust );
\r
2531 Trace.TraceWarning( "SMF の演奏は未対応です。(検討中)" );
\r
2534 public void t入力・全入力文字列から( string str全入力文字列 )
\r
2536 this.t入力・全入力文字列から( str全入力文字列, 1.0, 0 );
\r
2538 public unsafe void t入力・全入力文字列から( string str全入力文字列, double db再生速度, int nBGMAdjust )
\r
2540 if( !string.IsNullOrEmpty( str全入力文字列 ) )
\r
2542 this.db再生速度 = db再生速度;
\r
2543 str全入力文字列 = str全入力文字列.Replace( Environment.NewLine, "\n" );
\r
2544 str全入力文字列 = str全入力文字列.Replace( '\t', ' ' );
\r
2545 str全入力文字列 = str全入力文字列 + "\n";
\r
2546 for( int j = 0; j < 36 * 36; j++ )
\r
2548 this.n無限管理WAV[ j ] = -j;
\r
2549 this.n無限管理BPM[ j ] = -j;
\r
2550 this.n無限管理VOL[ j ] = -j;
\r
2551 this.n無限管理PAN[ j ] = -10000 - j;
\r
2552 this.n無限管理SIZE[ j ] = -j;
\r
2554 this.n内部番号WAV1to = 1;
\r
2555 this.n内部番号BPM1to = 1;
\r
2556 this.bstackIFからENDIFをスキップする = new Stack<bool>();
\r
2557 this.bstackIFからENDIFをスキップする.Push( false );
\r
2559 for( int k = 0; k < 7; k++ )
\r
2561 this.nRESULTIMAGE用優先順位[ k ] = 0;
\r
2562 this.nRESULTMOVIE用優先順位[ k ] = 0;
\r
2563 this.nRESULTSOUND用優先順位[ k ] = 0;
\r
2565 CharEnumerator ce = str全入力文字列.GetEnumerator();
\r
2566 if( ce.MoveNext() )
\r
2571 if( !this.t入力・空白と改行をスキップする( ref ce ) )
\r
2575 if( ce.Current == '#' )
\r
2577 if( ce.MoveNext() )
\r
2579 StringBuilder builder = new StringBuilder( 0x20 );
\r
2580 if( this.t入力・コマンド文字列を抜き出す( ref ce, ref builder ) )
\r
2582 StringBuilder builder2 = new StringBuilder( 0x400 );
\r
2583 if( this.t入力・パラメータ文字列を抜き出す( ref ce, ref builder2 ) )
\r
2585 StringBuilder builder3 = new StringBuilder( 0x400 );
\r
2586 if( this.t入力・コメント文字列を抜き出す( ref ce, ref builder3 ) )
\r
2588 this.t入力・行解析( ref builder, ref builder2, ref builder3 );
\r
2598 while( this.t入力・コメントをスキップする( ref ce ) );
\r
2599 this.n無限管理WAV = null;
\r
2600 this.n無限管理BPM = null;
\r
2601 this.n無限管理VOL = null;
\r
2602 this.n無限管理PAN = null;
\r
2603 this.n無限管理SIZE = null;
\r
2604 if( !this.bヘッダのみ )
\r
2608 foreach( CBPM cbpm2 in this.listBPM.Values )
\r
2610 if( cbpm2.n表記上の番号 == 0 )
\r
2616 if( cbpm == null )
\r
2618 cbpm = new CBPM();
\r
2619 cbpm.n内部番号 = this.n内部番号BPM1to++;
\r
2621 cbpm.dbBPM値 = 120.0;
\r
2622 this.listBPM.Add( cbpm.n内部番号, cbpm );
\r
2623 CChip item = new CChip();
\r
2625 item.nチャンネル番号 = 8;
\r
2627 item.n整数値・内部番号 = cbpm.n内部番号;
\r
2628 this.listChip.Add( item );
\r
2632 CChip chip2 = new CChip();
\r
2634 chip2.nチャンネル番号 = 8;
\r
2636 chip2.n整数値・内部番号 = cbpm.n内部番号;
\r
2637 this.listChip.Add( chip2 );
\r
2639 if( this.listBMP.ContainsKey( 0 ) )
\r
2641 CChip chip4 = new CChip();
\r
2643 chip4.nチャンネル番号 = 4;
\r
2645 chip4.n整数値・内部番号 = 0;
\r
2646 CChip chip3 = chip4;
\r
2647 this.listChip.Add( chip3 );
\r
2649 foreach( CWAV cwav in this.listWAV.Values )
\r
2651 if( cwav.nチップサイズ < 0 )
\r
2653 cwav.nチップサイズ = 100;
\r
2655 if( cwav.n位置 <= -10000 )
\r
2659 if( cwav.n音量 < 0 )
\r
2664 foreach( CWAV cwav2 in this.listWAV.Values )
\r
2666 foreach( CChip chip5 in this.listChip )
\r
2668 if( chip5.n整数値・内部番号 == cwav2.n内部番号 )
\r
2670 chip5.dbチップサイズ倍率 = ( (double) cwav2.nチップサイズ ) / 100.0;
\r
2674 for( int m = 0xb1; m <= 0xbb; m++ )
\r
2676 foreach( CChip chip6 in this.listChip )
\r
2678 if( chip6.nチャンネル番号 == m )
\r
2680 CChip chip7 = new CChip();
\r
2682 chip7.nチャンネル番号 = chip6.nチャンネル番号;
\r
2683 chip7.n整数値 = chip6.n整数値;
\r
2684 chip7.n整数値・内部番号 = chip6.n整数値・内部番号;
\r
2685 this.listChip.Add( chip7 );
\r
2690 if( this.listChip.Count > 0 )
\r
2692 this.listChip.Sort();
\r
2693 double num4 = 1.0;
\r
2694 int num5 = ( this.listChip[ this.listChip.Count - 1 ].n発声位置 + 384 ) - ( this.listChip[ this.listChip.Count - 1 ].n発声位置 % 384 );
\r
2695 for( int num6 = 0; num6 <= num5; num6 += 384 )
\r
2697 CChip chip8 = new CChip();
\r
2698 chip8.n発声位置 = num6;
\r
2699 chip8.nチャンネル番号 = 80;
\r
2700 chip8.n整数値 = 0x50f;
\r
2701 this.listChip.Add( chip8 );
\r
2703 this.listChip.Sort();
\r
2706 for( int num9 = 0; num9 < num5; num9 += 384 )
\r
2709 while( ( num8 < this.listChip.Count ) && ( this.listChip[ num8 ].n発声位置 < ( num9 + 384 ) ) )
\r
2711 if( this.listChip[ num8 ].nチャンネル番号 == 0xc1 )
\r
2713 num10 = this.listChip[ num8 ].n発声位置 - num9;
\r
2717 if( ( this.e種別 == E種別.BMS ) || ( this.e種別 == E種別.BME ) )
\r
2721 while( ( num7 < this.listChip.Count ) && ( this.listChip[ num7 ].n発声位置 <= num9 ) )
\r
2723 if( this.listChip[ num7 ].nチャンネル番号 == 2 )
\r
2725 num4 = this.listChip[ num7 ].db実数値;
\r
2729 for( int num11 = 0; num11 < 100; num11++ )
\r
2731 int num12 = (int) ( ( (double) ( 384 * num11 ) ) / ( 4.0 * num4 ) );
\r
2732 if( ( num12 + num10 ) >= 384 )
\r
2736 if( ( ( num12 + num10 ) % 384 ) != 0 )
\r
2738 CChip chip9 = new CChip();
\r
2739 chip9.n発声位置 = ( num9 + num12 ) + num10;
\r
2740 chip9.nチャンネル番号 = 0x51;
\r
2741 chip9.n整数値 = 36 * 36 - 1;
\r
2742 this.listChip.Add( chip9 );
\r
2746 this.listChip.Sort();
\r
2749 Predicate<CChip> match = null;
\r
2750 for( int i = 0; i < this.listChip.Count; i++ )
\r
2752 int startIndex = i;
\r
2755 if( match == null )
\r
2757 match = delegate( CChip c )
\r
2759 return ( c.nチャンネル番号 == 0xc2 ) && ( c.n発声位置 == this.listChip[ i ].n発声位置 );
\r
2762 startIndex = this.listChip.FindIndex( startIndex, match );
\r
2763 if( startIndex == -1 )
\r
2767 if( this.listChip[ startIndex ].n整数値 == 1 )
\r
2771 if( this.listChip[ startIndex ].n整数値 == 2 )
\r
2777 if( ( ( this.listChip[ i ].nチャンネル番号 == 80 ) || ( this.listChip[ i ].nチャンネル番号 == 0x51 ) ) && ( this.listChip[ i ].n整数値 == 0x50f ) )
\r
2779 this.listChip[ i ].b可視 = flag;
\r
2782 double bpm = 120.0;
\r
2783 double num15 = 1.0;
\r
2787 foreach( CChip chip10 in this.listChip )
\r
2789 chip10.n発声時刻ms = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2790 if( ( ( this.e種別 == E種別.BMS ) || ( this.e種別 == E種別.BME ) ) && ( ( num15 != 1.0 ) && ( ( chip10.n発声位置 / 384) != num18 ) ) )
\r
2792 num16 = chip10.n発声位置;
\r
2793 num17 = chip10.n発声時刻ms;
\r
2796 num18 = chip10.n発声位置 / 384;
\r
2797 num26 = chip10.nチャンネル番号;
\r
2802 num16 = chip10.n発声位置;
\r
2803 num17 = chip10.n発声時刻ms;
\r
2804 num15 = chip10.db実数値;
\r
2809 num16 = chip10.n発声位置;
\r
2810 num17 = chip10.n発声時刻ms;
\r
2811 bpm = this.BASEBPM + chip10.n整数値;
\r
2837 num16 = chip10.n発声位置;
\r
2838 num17 = chip10.n発声時刻ms;
\r
2839 if( this.listBPM.ContainsKey( chip10.n整数値・内部番号 ) )
\r
2841 bpm = ( ( this.listBPM[ chip10.n整数値・内部番号 ].n表記上の番号 == 0 ) ? 0.0 : this.BASEBPM ) + this.listBPM[ chip10.n整数値・内部番号 ].dbBPM値;
\r
2847 if( this.listAVIPAN.ContainsKey( chip10.n整数値 ) )
\r
2849 int num21 = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2850 int num22 = num17 + ( (int) ( ( ( 0x271 * ( ( chip10.n発声位置 + this.listAVIPAN[ chip10.n整数値 ].n移動時間ct ) - num16 ) ) * num15 ) / bpm ) );
\r
2851 chip10.n総移動時間 = num22 - num21;
\r
2860 if( this.listBGAPAN.ContainsKey( chip10.n整数値 ) )
\r
2862 int num19 = num17 + ( (int) ( ( ( 0x271 * ( chip10.n発声位置 - num16 ) ) * num15 ) / bpm ) );
\r
2863 int num20 = num17 + ( (int) ( ( ( 0x271 * ( ( chip10.n発声位置 + this.listBGAPAN[ chip10.n整数値 ].n移動時間ct ) - num16 ) ) * num15 ) / bpm ) );
\r
2864 chip10.n総移動時間 = num20 - num19;
\r
2867 if( this.db再生速度 > 0.0 )
\r
2869 foreach( CChip chip11 in this.listChip )
\r
2871 chip11.n発声時刻ms = (int) ( ( (double) chip11.n発声時刻ms ) / this.db再生速度 );
\r
2874 this.nBGMAdjust = 0;
\r
2875 this.t各自動再生音チップの再生時刻を変更する( nBGMAdjust );
\r
2876 for( int n = 0; n < 12; n++ )
\r
2878 this.n可視チップ数[ n ] = 0;
\r
2880 foreach( CChip chip12 in this.listChip )
\r
2882 int num24 = chip12.nチャンネル番号;
\r
2883 if( ( 0x11 <= num24 ) && ( num24 <= 0x1a ) )
\r
2885 this.n可視チップ数[ num24 - 0x11 ]++;
\r
2887 if( ( 0x20 <= num24 ) && ( num24 <= 0x27 ) )
\r
2889 this.n可視チップ数.Guitar++;
\r
2891 if( ( 0xA0 <= num24 ) && ( num24 <= 0xa7 ) )
\r
2893 this.n可視チップ数.Bass++;
\r
2896 foreach( CChip chip13 in this.listChip )
\r
2898 if( ( chip13.bWAVを使うチャンネルである && this.listWAV.ContainsKey( chip13.n整数値・内部番号 ) ) && !this.listWAV[ chip13.n整数値・内部番号 ].listこのWAVを使用するチャンネル番号の集合.Contains( chip13.nチャンネル番号 ) )
\r
2900 this.listWAV[ chip13.n整数値・内部番号 ].listこのWAVを使用するチャンネル番号の集合.Add( chip13.nチャンネル番号 );
\r
2903 byte[] buffer = null;
\r
2906 FileStream stream = new FileStream( this.strファイル名の絶対パス, FileMode.Open, FileAccess.Read );
\r
2907 buffer = new byte[ stream.Length ];
\r
2908 stream.Read( buffer, 0, (int) stream.Length );
\r
2911 catch( Exception exception )
\r
2913 Trace.TraceError( exception.Message );
\r
2914 Trace.TraceError( "DTXのハッシュの計算に失敗しました。({0})", new object[] { this.strファイル名の絶対パス } );
\r
2916 if( buffer != null )
\r
2918 byte[] buffer2 = new MD5CryptoServiceProvider().ComputeHash( buffer );
\r
2919 StringBuilder builder4 = new StringBuilder();
\r
2920 foreach( byte num25 in buffer2 )
\r
2922 builder4.Append( num25.ToString( "x2" ) );
\r
2924 this.strハッシュofDTXファイル = builder4.ToString();
\r
2928 this.strハッシュofDTXファイル = "00000000000000000000000000000000";
\r
2930 if( CDTXMania.ConfigIni.bLogDTX詳細ログ出力 )
\r
2932 foreach( CWAV cwav3 in this.listWAV.Values )
\r
2934 Trace.TraceInformation( cwav3.ToString() );
\r
2936 foreach( CAVI cavi in this.listAVI.Values )
\r
2938 Trace.TraceInformation( cavi.ToString() );
\r
2940 foreach( CAVIPAN cavipan in this.listAVIPAN.Values )
\r
2942 Trace.TraceInformation( cavipan.ToString() );
\r
2944 foreach( CBGA cbga in this.listBGA.Values )
\r
2946 Trace.TraceInformation( cbga.ToString() );
\r
2948 foreach( CBGAPAN cbgapan in this.listBGAPAN.Values )
\r
2950 Trace.TraceInformation( cbgapan.ToString() );
\r
2952 foreach( CBMP cbmp in this.listBMP.Values )
\r
2954 Trace.TraceInformation( cbmp.ToString() );
\r
2956 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
2958 Trace.TraceInformation( cbmptex.ToString() );
\r
2960 foreach( CBPM cbpm3 in this.listBPM.Values )
\r
2962 Trace.TraceInformation( cbpm3.ToString() );
\r
2964 foreach( CChip chip14 in this.listChip )
\r
2966 Trace.TraceInformation( chip14.ToString() );
\r
2976 public override void On活性化()
\r
2978 this.listWAV = new Dictionary<int, CWAV>();
\r
2979 this.listBMP = new Dictionary<int, CBMP>();
\r
2980 this.listBMPTEX = new Dictionary<int, CBMPTEX>();
\r
2981 this.listBPM = new Dictionary<int, CBPM>();
\r
2982 this.listBGAPAN = new Dictionary<int, CBGAPAN>();
\r
2983 this.listBGA = new Dictionary<int, CBGA>();
\r
2984 this.listAVIPAN = new Dictionary<int, CAVIPAN>();
\r
2985 this.listAVI = new Dictionary<int, CAVI>();
\r
2986 this.listChip = new List<CChip>();
\r
2989 public override void On非活性化()
\r
2991 if( this.listWAV != null )
\r
2993 foreach( CWAV cwav in this.listWAV.Values )
\r
2997 this.listWAV = null;
\r
2999 if( this.listBMP != null )
\r
3001 foreach( CBMP cbmp in this.listBMP.Values )
\r
3005 this.listBMP = null;
\r
3007 if( this.listBMPTEX != null )
\r
3009 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
3011 cbmptex.Dispose();
\r
3013 this.listBMPTEX = null;
\r
3015 if( this.listAVI != null )
\r
3017 foreach( CAVI cavi in this.listAVI.Values )
\r
3021 this.listAVI = null;
\r
3023 if( this.listBPM != null )
\r
3025 this.listBPM.Clear();
\r
3026 this.listBPM = null;
\r
3028 if( this.listBGAPAN != null )
\r
3030 this.listBGAPAN.Clear();
\r
3031 this.listBGAPAN = null;
\r
3033 if( this.listBGA != null )
\r
3035 this.listBGA.Clear();
\r
3036 this.listBGA = null;
\r
3038 if( this.listAVIPAN != null )
\r
3040 this.listAVIPAN.Clear();
\r
3041 this.listAVIPAN = null;
\r
3043 if( this.listChip != null )
\r
3045 this.listChip.Clear();
\r
3049 public override void OnManagedリソースの作成()
\r
3051 if( !base.b活性化してない )
\r
3053 this.tBMP_BMPTEXの読み込み();
\r
3055 base.OnManagedリソースの作成();
\r
3058 public override void OnManagedリソースの解放()
\r
3060 if( !base.b活性化してない )
\r
3062 if( this.listBMP != null )
\r
3064 foreach( CBMP cbmp in this.listBMP.Values )
\r
3069 if( this.listBMPTEX != null )
\r
3071 foreach( CBMPTEX cbmptex in this.listBMPTEX.Values )
\r
3073 cbmptex.Dispose();
\r
3076 if( this.listAVI != null )
\r
3078 foreach( CAVI cavi in this.listAVI.Values )
\r
3083 base.OnManagedリソースの解放();
\r
3090 #region [ private ]
\r
3091 //-----------------
\r
3092 [StructLayout( LayoutKind.Sequential )]
\r
3093 private struct STGDAPARAM // GDAチャンネル番号に対応するDTXチャンネル番号
\r
3095 public string s; // GDAチャンネル番号
\r
3096 public int c; // DTXチャンネル番号
\r
3098 public STGDAPARAM(string _s, int _c) { // 2011.1.1 yyagi 構造体のコンストラクタ追加(初期化簡易化のため)
\r
3104 private readonly STGDAPARAM[] stGDAParam;
\r
3105 private bool bヘッダのみ;
\r
3106 private Stack<bool> bstackIFからENDIFをスキップする;
\r
3108 private int n現在の行数;
\r
3109 private int n現在の乱数;
\r
3111 private int n内部番号BPM1to;
\r
3112 private int n内部番号WAV1to;
\r
3113 private int[] n無限管理BPM;
\r
3114 private int[] n無限管理PAN;
\r
3115 private int[] n無限管理SIZE;
\r
3116 private int[] n無限管理VOL;
\r
3117 private int[] n無限管理WAV;
\r
3118 private int[] nRESULTIMAGE用優先順位;
\r
3119 private int[] nRESULTMOVIE用優先順位;
\r
3120 private int[] nRESULTSOUND用優先順位;
\r
3122 private bool t入力・コマンド文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3124 if( this.t入力・空白をスキップする( ref ce ) )
\r
3126 while( ( ( ce.Current != ':' ) && ( ce.Current != ' ' ) ) && ( ( ce.Current != ';' ) && ( ce.Current != '\n' ) ) )
\r
3128 sb文字列.Append( ce.Current );
\r
3129 if( !ce.MoveNext() )
\r
3134 if( ce.Current == ':' )
\r
3136 if( !ce.MoveNext() )
\r
3140 if( !this.t入力・空白をスキップする( ref ce ) )
\r
3149 private bool t入力・コメントをスキップする( ref CharEnumerator ce )
\r
3151 while( ce.Current != '\n' )
\r
3153 if( !ce.MoveNext() )
\r
3158 return ce.MoveNext();
\r
3160 private bool t入力・コメント文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3162 if( ce.Current != ';' )
\r
3166 if( ce.MoveNext() )
\r
3168 while( ce.Current != '\n' )
\r
3170 sb文字列.Append( ce.Current );
\r
3171 if( !ce.MoveNext() )
\r
3180 private void t入力・パラメータ食い込みチェック( string strコマンド名, ref string strコマンド, ref string strパラメータ )
\r
3182 if( ( strコマンド.Length > strコマンド名.Length ) && strコマンド.StartsWith( strコマンド名, StringComparison.OrdinalIgnoreCase ) )
\r
3184 strパラメータ = strコマンド.Substring( strコマンド名.Length ).Trim();
\r
3185 strコマンド = strコマンド.Substring( 0, strコマンド名.Length );
\r
3188 private bool t入力・パラメータ文字列を抜き出す( ref CharEnumerator ce, ref StringBuilder sb文字列 )
\r
3190 if( this.t入力・空白をスキップする( ref ce ) )
\r
3192 while( ( ce.Current != '\n' ) && ( ce.Current != ';' ) )
\r
3194 sb文字列.Append( ce.Current );
\r
3195 if( !ce.MoveNext() )
\r
3204 private bool t入力・空白と改行をスキップする( ref CharEnumerator ce )
\r
3206 while( ( ce.Current == ' ' ) || ( ce.Current == '\n' ) )
\r
3208 if( ce.Current == '\n' )
\r
3212 if( !ce.MoveNext() )
\r
3219 private bool t入力・空白をスキップする( ref CharEnumerator ce )
\r
3221 while( ce.Current == ' ' )
\r
3223 if( !ce.MoveNext() )
\r
3230 private void t入力・行解析( ref StringBuilder sbコマンド, ref StringBuilder sbパラメータ, ref StringBuilder sbコメント )
\r
3232 string str = sbコマンド.ToString();
\r
3233 string str2 = sbパラメータ.ToString().Trim();
\r
3234 string str3 = sbコメント.ToString();
\r
3235 if( str.StartsWith( "IF", StringComparison.OrdinalIgnoreCase ) )
\r
3237 this.t入力・パラメータ食い込みチェック( "IF", ref str, ref str2 );
\r
3238 if( this.bstackIFからENDIFをスキップする.Count == 0xff )
\r
3240 Trace.TraceWarning( "#IF の入れ子の数が 255 を超えました。この #IF を無視します。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3242 else if( this.bstackIFからENDIFをスキップする.Peek() )
\r
3244 this.bstackIFからENDIFをスキップする.Push( true );
\r
3249 if( !int.TryParse( str2, out result ) )
\r
3253 this.bstackIFからENDIFをスキップする.Push( result != this.n現在の乱数 );
\r
3256 else if( str.StartsWith( "ENDIF", StringComparison.OrdinalIgnoreCase ) )
\r
3258 this.t入力・パラメータ食い込みチェック( "ENDIF", ref str, ref str2 );
\r
3259 if( this.bstackIFからENDIFをスキップする.Count > 1 )
\r
3261 this.bstackIFからENDIFをスキップする.Pop();
\r
3265 Trace.TraceWarning( "#ENDIF に対応する #IF がありません。この #ENDIF を無視します。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3268 else if( !this.bstackIFからENDIFをスキップする.Peek() )
\r
3270 if( str.StartsWith( "PATH_WAV", StringComparison.OrdinalIgnoreCase ) )
\r
3272 this.t入力・パラメータ食い込みチェック( "PATH_WAV", ref str, ref str2 );
\r
3273 this.PATH_WAV = str2;
\r
3275 else if( str.StartsWith( "TITLE", StringComparison.OrdinalIgnoreCase ) )
\r
3277 this.t入力・パラメータ食い込みチェック( "TITLE", ref str, ref str2 );
\r
3278 this.TITLE = str2;
\r
3280 else if( str.StartsWith( "ARTIST", StringComparison.OrdinalIgnoreCase ) )
\r
3282 this.t入力・パラメータ食い込みチェック( "ARTIST", ref str, ref str2 );
\r
3283 this.ARTIST = str2;
\r
3285 else if( str.StartsWith( "COMMENT", StringComparison.OrdinalIgnoreCase ) )
\r
3287 this.t入力・パラメータ食い込みチェック( "COMMENT", ref str, ref str2 );
\r
3288 this.COMMENT = str2;
\r
3290 else if( str.StartsWith( "DLEVEL", StringComparison.OrdinalIgnoreCase ) || str.StartsWith( "PLAYLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3293 this.t入力・パラメータ食い込みチェック( "DLEVEL", ref str, ref str2 );
\r
3294 this.t入力・パラメータ食い込みチェック( "PLAYLEVEL", ref str, ref str2 );
\r
3295 if( int.TryParse( str2, out dlevel ) )
\r
3301 else if( dlevel > 100 )
\r
3305 this.LEVEL.Drums = dlevel;
\r
3308 else if( str.StartsWith( "GLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3311 this.t入力・パラメータ食い込みチェック( "GLEVEL", ref str, ref str2 );
\r
3312 if( int.TryParse( str2, out glevel ) )
\r
3318 else if( glevel > 100 )
\r
3322 this.LEVEL.Guitar = glevel;
\r
3325 else if( str.StartsWith( "BLEVEL", StringComparison.OrdinalIgnoreCase ) )
\r
3328 this.t入力・パラメータ食い込みチェック( "BLEVEL", ref str, ref str2 );
\r
3329 if( int.TryParse( str2, out blevel ) )
\r
3335 else if( blevel > 100 )
\r
3339 this.LEVEL.Bass = blevel;
\r
3342 #if TEST_NOTEOFFMODE
\r
3343 else if (str.StartsWith("SUPRESSNOTEOFF_HIHAT", StringComparison.OrdinalIgnoreCase)) {
\r
3344 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_HIHAT", ref str, ref str2);
\r
3345 this.bHH演奏で直前のHHを消音する = !str2.ToLower().Equals("on");
\r
3347 else if (str.StartsWith("SUPRESSNOTEOFF_GUITAR", StringComparison.OrdinalIgnoreCase)) {
\r
3348 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_GUITAR", ref str, ref str2);
\r
3349 this.bGUITAR演奏で直前のGUITARを消音する = !str2.ToLower().Equals("on");
\r
3351 else if (str.StartsWith("SUPRESSNOTEOFF_BASS", StringComparison.OrdinalIgnoreCase)) {
\r
3352 this.t入力・パラメータ食い込みチェック("SUPRESSNOTEOFF_BASS", ref str, ref str2);
\r
3353 this.bBASS演奏で直前のBASSを消音する = !str2.ToLower().Equals("on");
\r
3356 else if (str.StartsWith("GENRE", StringComparison.OrdinalIgnoreCase)) {
\r
3357 this.t入力・パラメータ食い込みチェック("GENRE", ref str, ref str2);
\r
3358 this.GENRE = str2;
\r
3360 if (str.StartsWith("HIDDENLEVEL", StringComparison.OrdinalIgnoreCase)) {
\r
3361 this.t入力・パラメータ食い込みチェック("HIDDENLEVEL", ref str, ref str2);
\r
3362 this.HIDDENLEVEL = str2.ToLower().Equals("on");
\r
3364 if (str.StartsWith("STAGEFILE", StringComparison.OrdinalIgnoreCase)) {
\r
3365 this.t入力・パラメータ食い込みチェック("STAGEFILE", ref str, ref str2);
\r
3366 this.STAGEFILE = str2;
\r
3367 } else if (str.StartsWith("PREVIEW", StringComparison.OrdinalIgnoreCase)) {
\r
3368 this.t入力・パラメータ食い込みチェック("PREVIEW", ref str, ref str2);
\r
3369 this.PREVIEW = str2;
\r
3370 } else if (str.StartsWith("PREIMAGE", StringComparison.OrdinalIgnoreCase)) {
\r
3371 this.t入力・パラメータ食い込みチェック("PREIMAGE", ref str, ref str2);
\r
3372 this.PREIMAGE = str2;
\r
3373 } else if (str.StartsWith("PREMOVIE", StringComparison.OrdinalIgnoreCase)) {
\r
3374 this.t入力・パラメータ食い込みチェック("PREMOVIE", ref str, ref str2);
\r
3375 this.PREMOVIE = str2;
\r
3376 } else if (str.StartsWith("BACKGROUND_GR", StringComparison.OrdinalIgnoreCase)) {
\r
3377 this.t入力・パラメータ食い込みチェック("BACKGROUND_GR", ref str, ref str2);
\r
3378 this.BACKGROUND_GR = str2;
\r
3379 } else if (str.StartsWith("BACKGROUND", StringComparison.OrdinalIgnoreCase) || str.StartsWith("WALL", StringComparison.OrdinalIgnoreCase)) {
\r
3380 this.t入力・パラメータ食い込みチェック("BACKGROUND", ref str, ref str2);
\r
3381 this.t入力・パラメータ食い込みチェック("WALL", ref str, ref str2);
\r
3382 this.BACKGROUND = str2;
\r
3384 if (str.StartsWith("RANDOM", StringComparison.OrdinalIgnoreCase)) {
\r
3385 this.t入力・パラメータ食い込みチェック("RANDOM", ref str, ref str2);
\r
3387 if (!int.TryParse(str2, out num5)) {
\r
3390 this.n現在の乱数 = CDTXMania.Random.Next(num5) + 1;
\r
3392 if (str.StartsWith("SOUND_NOWLOADING", StringComparison.OrdinalIgnoreCase)) {
\r
3393 this.t入力・パラメータ食い込みチェック("SOUND_NOWLOADING", ref str, ref str2);
\r
3394 this.SOUND_NOWLOADING = str2;
\r
3395 } else if (!this.bヘッダのみ) {
\r
3396 if (str.StartsWith("PANEL", StringComparison.OrdinalIgnoreCase)) {
\r
3397 this.t入力・パラメータ食い込みチェック("PANEL", ref str, ref str2);
\r
3398 int dummyResult; // #23885 2010.12.12 yyagi: not to confuse "#PANEL strings (panel)" and "#PANEL int (panpot of EL)"
\r
3399 if (!int.TryParse(str2, out dummyResult)) { // 数値じゃないならPANELとみなす
\r
3400 this.PANEL = str2; //
\r
3402 } // 数値ならPAN ELとみなす
\r
3405 if (str.StartsWith("MIDIFILE", StringComparison.OrdinalIgnoreCase)) {
\r
3406 this.t入力・パラメータ食い込みチェック("MIDIFILE", ref str, ref str2);
\r
3407 this.MIDIFILE = str2;
\r
3409 if (str.StartsWith("MIDINOTE", StringComparison.OrdinalIgnoreCase)) {
\r
3410 this.t入力・パラメータ食い込みチェック("MIDINOTE", ref str, ref str2);
\r
3411 this.MIDINOTE = str2.ToLower().Equals("on");
\r
3413 if (str.StartsWith("BLACKCOLORKEY", StringComparison.OrdinalIgnoreCase)) {
\r
3414 this.t入力・パラメータ食い込みチェック("BLACKCOLORKEY", ref str, ref str2);
\r
3415 this.BLACKCOLORKEY = str2.ToLower().Equals("on");
\r
3417 if (str.StartsWith("BASEBPM", StringComparison.OrdinalIgnoreCase)) {
\r
3418 this.t入力・パラメータ食い込みチェック("BASEBPM", ref str, ref str2);
\r
3419 double basebpm = 0.0;
\r
3420 //if( double.TryParse( str2, out num6 ) && ( num6 > 0.0 ) )
\r
3421 if (!TryParse(str2, out basebpm) && (basebpm > 0.0)) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
3423 this.BASEBPM = basebpm;
\r
3425 } else if (str.StartsWith("SOUND_STAGEFAILED", StringComparison.OrdinalIgnoreCase)) {
\r
3426 this.t入力・パラメータ食い込みチェック("SOUND_STAGEFAILED", ref str, ref str2);
\r
3427 this.SOUND_STAGEFAILED = str2;
\r
3428 } else if (str.StartsWith("SOUND_FULLCOMBO", StringComparison.OrdinalIgnoreCase)) {
\r
3429 this.t入力・パラメータ食い込みチェック("SOUND_FULLCOMBO", ref str, ref str2);
\r
3430 this.SOUND_FULLCOMBO = str2;
\r
3431 } else if (str.StartsWith("SOUND_AUDIENCE", StringComparison.OrdinalIgnoreCase)) {
\r
3432 this.t入力・パラメータ食い込みチェック("SOUND_AUDIENCE", ref str, ref str2);
\r
3433 this.SOUND_AUDIENCE = str2;
\r
3434 } else if (!this.t入力・行解析・WAVVOL_VOLUME(str, str2, str3) &&
\r
3435 !this.t入力・行解析・WAVPAN_PAN(str, str2, str3) &&
\r
3436 !this.t入力・行解析・WAV(str, str2, str3) &&
\r
3437 !this.t入力・行解析・BMPTEX(str, str2, str3) &&
\r
3438 !this.t入力・行解析・BMP(str, str2, str3) &&
\r
3439 !this.t入力・行解析・BGAPAN(str, str2, str3) &&
\r
3440 !this.t入力・行解析・BGA(str, str2, str3) &&
\r
3441 !this.t入力・行解析・AVIPAN(str, str2, str3) &&
\r
3442 !this.t入力・行解析・AVI_VIDEO(str, str2, str3) &&
\r
3443 !this.t入力・行解析・BPM_BPMzz(str, str2, str3) &&
\r
3444 !this.t入力・行解析・RESULTIMAGE(str, str2, str3) &&
\r
3445 !this.t入力・行解析・RESULTMOVIE(str, str2, str3) &&
\r
3446 !this.t入力・行解析・RESULTSOUND(str, str2, str3) &&
\r
3447 !this.t入力・行解析・SIZE(str, str2, str3)) {
\r
3448 this.t入力・行解析・チップ配置(str, str2, str3);
\r
3452 int xx = 0; // #23885 2010.12.12 yyagi: dummy line to exit parsing the line
\r
3458 private bool t入力・行解析・AVI_VIDEO( string strコマンド, string strパラメータ, string strコメント )
\r
3460 if( strコマンド.StartsWith( "AVI", StringComparison.OrdinalIgnoreCase ) )
\r
3462 strコマンド = strコマンド.Substring( 3 );
\r
3464 else if( strコマンド.StartsWith( "VIDEO", StringComparison.OrdinalIgnoreCase ) )
\r
3466 strコマンド = strコマンド.Substring( 5 );
\r
3472 if( strコマンド.Length < 2 )
\r
3476 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3477 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3479 Trace.TraceError( "AVI(VIDEO)番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3482 CAVI cavi = new CAVI();
\r
3484 cavi.strファイル名 = strパラメータ;
\r
3485 cavi.strコメント文 = strコメント;
\r
3486 if( this.listAVI.ContainsKey( key ) )
\r
3488 this.listAVI.Remove( key );
\r
3490 this.listAVI.Add( key, cavi );
\r
3493 private bool t入力・行解析・AVIPAN( string strコマンド, string strパラメータ, string strコメント )
\r
3495 if( strコマンド.StartsWith( "AVIPAN", StringComparison.OrdinalIgnoreCase ) )
\r
3497 strコマンド = strコマンド.Substring( 6 );
\r
3503 if( strコマンド.Length < 2 )
\r
3507 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3508 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3510 Trace.TraceError( "AVIPAN番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3513 CAVIPAN cavipan = new CAVIPAN();
\r
3514 cavipan.n番号 = key;
\r
3515 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3516 if( strArray.Length < 14 )
\r
3518 Trace.TraceError( "AVIPAN: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3523 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3525 Trace.TraceError( "AVIPAN: {2}番目の数(AVI番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3528 cavipan.nAVI番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3529 if( ( cavipan.nAVI番号 < 1 ) || ( cavipan.nAVI番号 >= 36 * 36 ) )
\r
3531 Trace.TraceError( "AVIPAN: {2}番目の数(AVI番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3536 if( !int.TryParse( strArray[ index ], out result ) )
\r
3538 Trace.TraceError( "AVIPAN: {2}番目の引数(開始転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3541 cavipan.sz開始サイズ.Width = result;
\r
3544 if( !int.TryParse( strArray[ index ], out result ) )
\r
3546 Trace.TraceError( "AVIPAN: {2}番目の引数(開始転送サイズ・高さ)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3549 cavipan.sz開始サイズ.Height = result;
\r
3552 if( !int.TryParse( strArray[ index ], out result ) )
\r
3554 Trace.TraceError( "AVIPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3557 cavipan.sz終了サイズ.Width = result;
\r
3560 if( !int.TryParse( strArray[ index ], out result ) )
\r
3562 Trace.TraceError( "AVIPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3565 cavipan.sz終了サイズ.Height = result;
\r
3568 if( !int.TryParse( strArray[ index ], out result ) )
\r
3570 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3573 cavipan.pt動画側開始位置.X = result;
\r
3576 if( !int.TryParse( strArray[ index ], out result ) )
\r
3578 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3581 cavipan.pt動画側開始位置.Y = result;
\r
3584 if( !int.TryParse( strArray[ index ], out result ) )
\r
3586 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3589 cavipan.pt動画側終了位置.X = result;
\r
3592 if( !int.TryParse( strArray[ index ], out result ) )
\r
3594 Trace.TraceError( "AVIPAN: {2}番目の引数(画像側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3597 cavipan.pt動画側終了位置.Y = result;
\r
3600 if( !int.TryParse( strArray[ index ], out result ) )
\r
3602 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3605 cavipan.pt表示側開始位置.X = result;
\r
3608 if( !int.TryParse( strArray[ index ], out result ) )
\r
3610 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3613 cavipan.pt表示側開始位置.Y = result;
\r
3616 if( !int.TryParse( strArray[ index ], out result ) )
\r
3618 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3621 cavipan.pt表示側終了位置.X = result;
\r
3624 if( !int.TryParse( strArray[ index ], out result ) )
\r
3626 Trace.TraceError( "AVIPAN: {2}番目の引数(表示側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3629 cavipan.pt表示側終了位置.Y = result;
\r
3632 if( !int.TryParse( strArray[ index ], out result ) )
\r
3634 Trace.TraceError( "AVIPAN: {2}番目の引数(移動時間)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3641 cavipan.n移動時間ct = result;
\r
3643 if( this.listAVIPAN.ContainsKey( key ) )
\r
3645 this.listAVIPAN.Remove( key );
\r
3647 this.listAVIPAN.Add( key, cavipan );
\r
3650 private bool t入力・行解析・BGA( string strコマンド, string strパラメータ, string strコメント )
\r
3652 if( strコマンド.StartsWith( "BGA", StringComparison.OrdinalIgnoreCase ) )
\r
3654 strコマンド = strコマンド.Substring( 3 );
\r
3660 if( strコマンド.Length < 2 )
\r
3664 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3665 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3667 Trace.TraceError( "BGA番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3670 CBGA cbga = new CBGA();
\r
3672 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3673 if( strArray.Length < 7 )
\r
3675 Trace.TraceError( "BGA: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3680 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3682 Trace.TraceError( "BGA: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3685 cbga.nBMP番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3686 if( ( cbga.nBMP番号 < 1 ) || ( cbga.nBMP番号 >= 36 * 36 ) )
\r
3688 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3693 if( !int.TryParse( strArray[ index ], out result ) )
\r
3695 Trace.TraceError( "BGA: {2}番目の引数(画像側位置1・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3698 cbga.pt画像側左上座標.X = result;
\r
3701 if( !int.TryParse( strArray[ index ], out result ) )
\r
3703 Trace.TraceError( "BGA: {2}番目の引数(画像側位置1・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3706 cbga.pt画像側左上座標.Y = result;
\r
3709 if( !int.TryParse( strArray[ index ], out result ) )
\r
3711 Trace.TraceError( "BGA: {2}番目の引数(画像側座標2・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3714 cbga.pt画像側右下座標.X = result;
\r
3717 if( !int.TryParse( strArray[ index ], out result ) )
\r
3719 Trace.TraceError( "BGA: {2}番目の引数(画像側座標2・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3722 cbga.pt画像側右下座標.Y = result;
\r
3725 if( !int.TryParse( strArray[ index ], out result ) )
\r
3727 Trace.TraceError( "BGA: {2}番目の引数(表示位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3730 cbga.pt表示座標.X = result;
\r
3733 if( !int.TryParse( strArray[ index ], out result ) )
\r
3735 Trace.TraceError( "BGA: {2}番目の引数(表示位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3738 cbga.pt表示座標.Y = result;
\r
3740 if( cbga.pt画像側左上座標.X > cbga.pt画像側右下座標.X )
\r
3742 result = cbga.pt画像側左上座標.X;
\r
3743 cbga.pt画像側左上座標.X = cbga.pt画像側右下座標.X;
\r
3744 cbga.pt画像側右下座標.X = result;
\r
3746 if( cbga.pt画像側左上座標.Y > cbga.pt画像側右下座標.Y )
\r
3748 result = cbga.pt画像側左上座標.Y;
\r
3749 cbga.pt画像側左上座標.Y = cbga.pt画像側右下座標.Y;
\r
3750 cbga.pt画像側右下座標.Y = result;
\r
3752 if( this.listBGA.ContainsKey( key ) )
\r
3754 this.listBGA.Remove( key );
\r
3756 this.listBGA.Add( key, cbga );
\r
3759 private bool t入力・行解析・BGAPAN( string strコマンド, string strパラメータ, string strコメント )
\r
3761 if( strコマンド.StartsWith( "BGAPAN", StringComparison.OrdinalIgnoreCase ) )
\r
3763 strコマンド = strコマンド.Substring( 6 );
\r
3769 if( strコマンド.Length < 2 )
\r
3773 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3774 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3776 Trace.TraceError( "BGAPAN番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3779 CBGAPAN cbgapan = new CBGAPAN();
\r
3780 cbgapan.n番号 = key;
\r
3781 string[] strArray = strパラメータ.Split( new char[] { ' ', ',', '(', ')', '[', ']', 'x', '|' }, StringSplitOptions.RemoveEmptyEntries );
\r
3782 if( strArray.Length < 14 )
\r
3784 Trace.TraceError( "BGAPAN: 引数が足りません。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3789 if( ( strArray[ index ].Length == 0 ) || ( strArray[ index ].Length > 2 ) )
\r
3791 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3794 cbgapan.nBMP番号 = C変換.n36進数2桁の文字列を数値に変換して返す( strArray[ index ] );
\r
3795 if( ( cbgapan.nBMP番号 < 1 ) || ( cbgapan.nBMP番号 >= 36 * 36 ) )
\r
3797 Trace.TraceError( "BGAPAN: {2}番目の数(BMP番号)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3802 if( !int.TryParse( strArray[ index ], out result ) )
\r
3804 Trace.TraceError( "BGAPAN: {2}番目の引数(開始転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3807 cbgapan.sz開始サイズ.Width = result;
\r
3810 if( !int.TryParse( strArray[ index ], out result ) )
\r
3812 Trace.TraceError( "BGAPAN: {2}番目の引数(開始転送サイズ・高さ)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3815 cbgapan.sz開始サイズ.Height = result;
\r
3818 if( !int.TryParse( strArray[ index ], out result ) )
\r
3820 Trace.TraceError( "BGAPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3823 cbgapan.sz終了サイズ.Width = result;
\r
3826 if( !int.TryParse( strArray[ index ], out result ) )
\r
3828 Trace.TraceError( "BGAPAN: {2}番目の引数(終了転送サイズ・幅)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3831 cbgapan.sz終了サイズ.Height = result;
\r
3834 if( !int.TryParse( strArray[ index ], out result ) )
\r
3836 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3839 cbgapan.pt画像側開始位置.X = result;
\r
3842 if( !int.TryParse( strArray[ index ], out result ) )
\r
3844 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3847 cbgapan.pt画像側開始位置.Y = result;
\r
3850 if( !int.TryParse( strArray[ index ], out result ) )
\r
3852 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3855 cbgapan.pt画像側終了位置.X = result;
\r
3858 if( !int.TryParse( strArray[ index ], out result ) )
\r
3860 Trace.TraceError( "BGAPAN: {2}番目の引数(画像側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3863 cbgapan.pt画像側終了位置.Y = result;
\r
3866 if( !int.TryParse( strArray[ index ], out result ) )
\r
3868 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側開始位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3871 cbgapan.pt表示側開始位置.X = result;
\r
3874 if( !int.TryParse( strArray[ index ], out result ) )
\r
3876 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側開始位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3879 cbgapan.pt表示側開始位置.Y = result;
\r
3882 if( !int.TryParse( strArray[ index ], out result ) )
\r
3884 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側終了位置・X)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3887 cbgapan.pt表示側終了位置.X = result;
\r
3890 if( !int.TryParse( strArray[ index ], out result ) )
\r
3892 Trace.TraceError( "BGAPAN: {2}番目の引数(表示側終了位置・Y)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3895 cbgapan.pt表示側終了位置.Y = result;
\r
3898 if( !int.TryParse( strArray[ index ], out result ) )
\r
3900 Trace.TraceError( "BGAPAN: {2}番目の引数(移動時間)が異常です。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数, index + 1 } );
\r
3907 cbgapan.n移動時間ct = result;
\r
3909 if( this.listBGAPAN.ContainsKey( key ) )
\r
3911 this.listBGAPAN.Remove( key );
\r
3913 this.listBGAPAN.Add( key, cbgapan );
\r
3916 private bool t入力・行解析・BMP( string strコマンド, string strパラメータ, string strコメント )
\r
3918 if( strコマンド.StartsWith( "BMP", StringComparison.OrdinalIgnoreCase ) )
\r
3920 strコマンド = strコマンド.Substring( 3 );
\r
3927 if( strコマンド.Length < 2 )
\r
3933 key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3934 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3936 Trace.TraceError( "BMP番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3940 CBMP cbmp = new CBMP();
\r
3942 cbmp.strファイル名 = strパラメータ;
\r
3943 cbmp.strコメント文 = strコメント;
\r
3944 if( this.listBMP.ContainsKey( key ) )
\r
3946 this.listBMP.Remove( key );
\r
3948 this.listBMP.Add( key, cbmp );
\r
3951 private bool t入力・行解析・BMPTEX( string strコマンド, string strパラメータ, string strコメント )
\r
3953 if( strコマンド.StartsWith( "BMPTEX", StringComparison.OrdinalIgnoreCase ) )
\r
3955 strコマンド = strコマンド.Substring( 6 );
\r
3961 if( strコマンド.Length < 2 )
\r
3965 int key = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
3966 if( ( key < 0 ) || ( key >= 36 * 36 ) )
\r
3968 Trace.TraceError( "BMPTEX番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
3971 CBMPTEX cbmptex = new CBMPTEX();
\r
3972 cbmptex.n番号 = key;
\r
3973 cbmptex.strファイル名 = strパラメータ;
\r
3974 cbmptex.strコメント文 = strコメント;
\r
3975 if( this.listBMPTEX.ContainsKey( key ) )
\r
3977 this.listBMPTEX.Remove( key );
\r
3979 this.listBMPTEX.Add( key, cbmptex );
\r
3982 private bool t入力・行解析・BPM_BPMzz( string strコマンド, string strパラメータ, string strコメント )
\r
3984 if( strコマンド.StartsWith( "BPM", StringComparison.OrdinalIgnoreCase ) )
\r
3986 strコマンド = strコマンド.Substring( 3 );
\r
3993 if( strコマンド.Length < 2 )
\r
3999 index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4000 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4002 Trace.TraceError( "BPM番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4006 double result = 0.0;
\r
4007 // if( !double.TryParse( strパラメータ, out result ) )
\r
4008 if ( !TryParse( strパラメータ, out result) ) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4012 if( result <= 0.0 )
\r
4018 this.BPM = result;
\r
4020 CBPM cbpm = new CBPM();
\r
4021 cbpm.n内部番号 = this.n内部番号BPM1to;
\r
4022 cbpm.n表記上の番号 = index;
\r
4023 cbpm.dbBPM値 = result;
\r
4024 this.listBPM.Add( this.n内部番号BPM1to, cbpm );
\r
4025 if( this.n無限管理BPM[ index ] == -index )
\r
4027 for( int i = 0; i < this.listChip.Count; i++ )
\r
4029 CChip chip = this.listChip[ i ];
\r
4030 if( chip.bBPMチップである && ( chip.n整数値・内部番号 == -index ) )
\r
4032 chip.n整数値・内部番号 = this.n内部番号BPM1to;
\r
4036 this.n無限管理BPM[ index ] = this.n内部番号BPM1to;
\r
4037 this.n内部番号BPM1to++;
\r
4040 private bool t入力・行解析・RESULTIMAGE( string strコマンド, string strパラメータ, string strコメント )
\r
4042 if( strコマンド.StartsWith( "RESULTIMAGE", StringComparison.OrdinalIgnoreCase ) )
\r
4044 strコマンド = strコマンド.Substring( 11 );
\r
4050 if( strコマンド.Length < 2 )
\r
4052 for( int i = 0; i < 7; i++ )
\r
4054 if( this.nRESULTIMAGE用優先順位[ i ] == 0 )
\r
4056 this.RESULTIMAGE[ i ] = strパラメータ.Trim();
\r
4062 switch( strコマンド.ToUpper() )
\r
4065 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 0, strパラメータ );
\r
4069 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 1, strパラメータ );
\r
4073 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 2, strパラメータ );
\r
4077 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 3, strパラメータ );
\r
4081 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 4, strパラメータ );
\r
4085 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 5, strパラメータ );
\r
4089 this.t入力・行解析・RESULTIMAGE・ファイルを設定する( 6, strパラメータ );
\r
4096 private void t入力・行解析・RESULTIMAGE・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4098 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4100 for( int i = nランク0to6; i >= 0; i-- )
\r
4102 if( this.nRESULTIMAGE用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4104 this.nRESULTIMAGE用優先順位[ i ] = 7 - nランク0to6;
\r
4105 this.RESULTIMAGE[ i ] = strファイル名;
\r
4110 private bool t入力・行解析・RESULTMOVIE( string strコマンド, string strパラメータ, string strコメント )
\r
4112 if( strコマンド.StartsWith( "RESULTMOVIE", StringComparison.OrdinalIgnoreCase ) )
\r
4114 strコマンド = strコマンド.Substring( 11 );
\r
4120 if( strコマンド.Length < 2 )
\r
4122 for( int i = 0; i < 7; i++ )
\r
4124 if( this.nRESULTMOVIE用優先順位[ i ] == 0 )
\r
4126 this.RESULTMOVIE[ i ] = strパラメータ.Trim();
\r
4132 switch( strコマンド.ToUpper() )
\r
4135 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 0, strパラメータ );
\r
4139 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 1, strパラメータ );
\r
4143 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 2, strパラメータ );
\r
4147 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 3, strパラメータ );
\r
4151 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 4, strパラメータ );
\r
4155 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 5, strパラメータ );
\r
4159 this.t入力・行解析・RESULTMOVIE・ファイルを設定する( 6, strパラメータ );
\r
4166 private void t入力・行解析・RESULTMOVIE・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4168 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4170 for( int i = nランク0to6; i >= 0; i-- )
\r
4172 if( this.nRESULTMOVIE用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4174 this.nRESULTMOVIE用優先順位[ i ] = 7 - nランク0to6;
\r
4175 this.RESULTMOVIE[ i ] = strファイル名;
\r
4180 private bool t入力・行解析・RESULTSOUND( string strコマンド, string strパラメータ, string strコメント )
\r
4182 if( strコマンド.StartsWith( "RESULTSOUND", StringComparison.OrdinalIgnoreCase ) )
\r
4184 strコマンド = strコマンド.Substring( 11 );
\r
4190 if( strコマンド.Length < 2 )
\r
4192 for( int i = 0; i < 7; i++ )
\r
4194 if( this.nRESULTSOUND用優先順位[ i ] == 0 )
\r
4196 this.RESULTSOUND[ i ] = strパラメータ.Trim();
\r
4202 switch( strコマンド.ToUpper() )
\r
4205 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 0, strパラメータ );
\r
4209 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 1, strパラメータ );
\r
4213 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 2, strパラメータ );
\r
4217 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 3, strパラメータ );
\r
4221 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 4, strパラメータ );
\r
4225 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 5, strパラメータ );
\r
4229 this.t入力・行解析・RESULTSOUND・ファイルを設定する( 6, strパラメータ );
\r
4236 private void t入力・行解析・RESULTSOUND・ファイルを設定する( int nランク0to6, string strファイル名 )
\r
4238 if( ( nランク0to6 >= 0 ) && ( nランク0to6 <= 6 ) )
\r
4240 for( int i = nランク0to6; i >= 0; i-- )
\r
4242 if( this.nRESULTSOUND用優先順位[ i ] < ( 7 - nランク0to6 ) )
\r
4244 this.nRESULTSOUND用優先順位[ i ] = 7 - nランク0to6;
\r
4245 this.RESULTSOUND[ i ] = strファイル名;
\r
4250 private bool t入力・行解析・SIZE( string strコマンド, string strパラメータ, string strコメント )
\r
4253 if( strコマンド.StartsWith( "SIZE", StringComparison.OrdinalIgnoreCase ) )
\r
4255 strコマンド = strコマンド.Substring( 4 );
\r
4261 if( strコマンド.Length < 2 )
\r
4265 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4266 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4268 Trace.TraceError( "SIZE番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4271 if( int.TryParse( strパラメータ, out num2 ) )
\r
4277 else if( num2 > 100 )
\r
4281 if( this.n無限管理SIZE[ index ] == -index )
\r
4283 foreach( CWAV cwav in this.listWAV.Values )
\r
4285 if( cwav.nチップサイズ == -index )
\r
4287 cwav.nチップサイズ = num2;
\r
4291 this.n無限管理SIZE[ index ] = num2;
\r
4295 private bool t入力・行解析・WAV( string strコマンド, string strパラメータ, string strコメント )
\r
4297 if( strコマンド.StartsWith( "WAV", StringComparison.OrdinalIgnoreCase ) )
\r
4299 strコマンド = strコマンド.Substring( 3 );
\r
4305 if( strコマンド.Length < 2 )
\r
4309 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4310 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4312 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4315 CWAV cwav = new CWAV();
\r
4316 cwav.n内部番号 = this.n内部番号WAV1to;
\r
4317 cwav.n表記上の番号 = index;
\r
4318 cwav.nチップサイズ = this.n無限管理SIZE[ index ];
\r
4319 cwav.n位置 = this.n無限管理PAN[ index ];
\r
4320 cwav.n音量 = this.n無限管理VOL[ index ];
\r
4321 cwav.strファイル名 = strパラメータ;
\r
4322 cwav.strコメント文 = strコメント;
\r
4323 this.listWAV.Add( this.n内部番号WAV1to, cwav );
\r
4324 if( this.n無限管理WAV[ index ] == -index )
\r
4326 for( int i = 0; i < this.listChip.Count; i++ )
\r
4328 CChip chip = this.listChip[ i ];
\r
4329 if( chip.bWAVを使うチャンネルである && ( chip.n整数値・内部番号 == -index ) )
\r
4331 chip.n整数値・内部番号 = this.n内部番号WAV1to;
\r
4335 this.n無限管理WAV[ index ] = this.n内部番号WAV1to;
\r
4336 this.n内部番号WAV1to++;
\r
4339 private bool t入力・行解析・WAVPAN_PAN( string strコマンド, string strパラメータ, string strコメント )
\r
4342 if( strコマンド.StartsWith( "WAVPAN", StringComparison.OrdinalIgnoreCase ) )
\r
4344 strコマンド = strコマンド.Substring(6);
\r
4346 else if( strコマンド.StartsWith( "PAN", StringComparison.OrdinalIgnoreCase ) )
\r
4348 strコマンド = strコマンド.Substring(3);
\r
4354 if( strコマンド.Length < 2 )
\r
4358 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4359 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4361 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4364 if( int.TryParse( strパラメータ, out num2 ) )
\r
4370 else if( num2 >= 100 )
\r
4374 if( this.n無限管理PAN[ index ] == ( -10000 - index ) )
\r
4376 foreach( CWAV cwav in this.listWAV.Values )
\r
4378 if( cwav.n位置 == ( -10000 - index ) )
\r
4384 this.n無限管理PAN[ index ] = num2;
\r
4388 private bool t入力・行解析・WAVVOL_VOLUME( string strコマンド, string strパラメータ, string strコメント )
\r
4391 if( strコマンド.StartsWith( "WAVVOL", StringComparison.OrdinalIgnoreCase ) )
\r
4393 strコマンド = strコマンド.Substring( 6 );
\r
4395 else if( strコマンド.StartsWith( "VOLUME", StringComparison.OrdinalIgnoreCase ) )
\r
4397 strコマンド = strコマンド.Substring( 6 );
\r
4403 if( strコマンド.Length < 2 )
\r
4407 int index = C変換.n36進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 0, 2 ) );
\r
4408 if( ( index < 0 ) || ( index >= 36 * 36 ) )
\r
4410 Trace.TraceError( "WAV番号に 00~ZZ 以外の値または不正な文字列が指定されました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4413 if( int.TryParse( strパラメータ, out num2 ) )
\r
4419 else if( num2 >= 100 )
\r
4423 if( this.n無限管理VOL[ index ] == -index )
\r
4425 foreach( CWAV cwav in this.listWAV.Values )
\r
4427 if( cwav.n音量 == -index )
\r
4433 this.n無限管理VOL[ index ] = num2;
\r
4437 private bool t入力・行解析・チップ配置( string strコマンド, string strパラメータ, string strコメント )
\r
4439 if( strコマンド.Length != 5 )
\r
4443 int num = C変換.n小節番号の文字列3桁を数値に変換して返す( strコマンド.Substring( 0, 3 ) );
\r
4450 if( ( this.e種別 != E種別.GDA ) && ( this.e種別 != E種別.G2D ) )
\r
4452 c = C変換.n16進数2桁の文字列を数値に変換して返す( strコマンド.Substring( 3, 2 ) );
\r
4460 string str = strコマンド.Substring( 3, 2 );
\r
4461 foreach( STGDAPARAM stgdaparam in this.stGDAParam )
\r
4463 if( str.Equals( stgdaparam.s, StringComparison.OrdinalIgnoreCase ) )
\r
4474 if( ( c >= 0x11 ) && ( c <= 0x1a ) )
\r
4476 this.bチップがある.Drums = true;
\r
4478 else if( ( c >= 0x20 ) && ( c <= 0x27 ) )
\r
4480 this.bチップがある.Guitar = true;
\r
4482 else if( ( c >= 0xA0 ) && ( c <= 0xa7 ) )
\r
4484 this.bチップがある.Bass = true;
\r
4489 this.bチップがある.HHOpen = true;
\r
4493 this.bチップがある.Ride = true;
\r
4497 this.bチップがある.LeftCymbal = true;
\r
4501 this.bチップがある.OpenGuitar = true;
\r
4505 this.bチップがある.OpenBass = true;
\r
4508 case 0x02: // 小節長変更
\r
4510 double result = 0.0;
\r
4511 //if( !double.TryParse( strパラメータ, out result ) )
\r
4512 if (!TryParse(strパラメータ, out result)) // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4514 Trace.TraceError( "小節長倍率に不正な値を指定しました。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4517 CChip item = new CChip();
\r
4518 item.n発声位置 = num * 384;
\r
4519 item.nチャンネル番号 = c;
\r
4520 item.db実数値 = result;
\r
4521 this.listChip.Add( item );
\r
4525 if( string.IsNullOrEmpty( strパラメータ ) )
\r
4530 StringBuilder builder = new StringBuilder( strパラメータ.Length );
\r
4531 CharEnumerator enumerator = strパラメータ.GetEnumerator();
\r
4532 while( enumerator.MoveNext() )
\r
4534 if( enumerator.Current != '_' )
\r
4536 if( "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".IndexOf( enumerator.Current ) < 0 )
\r
4538 Trace.TraceError( "不正なオブジェクト指定があります。[{0}: {1}行]", new object[] { this.strファイル名の絶対パス, this.n現在の行数 } );
\r
4541 builder.Append( enumerator.Current );
\r
4545 strパラメータ = builder.ToString();
\r
4546 if( ( num4 % 2 ) != 0 )
\r
4550 for( int i = 0; i < ( num4 / 2 ); i++ )
\r
4555 index = C変換.n16進数2桁の文字列を数値に変換して返す( strパラメータ.Substring( i * 2, 2 ) );
\r
4559 index = C変換.n36進数2桁の文字列を数値に変換して返す( strパラメータ.Substring( i * 2, 2 ) );
\r
4563 CChip chip2 = new CChip();
\r
4564 chip2.n発声位置 = ( num * 384 ) + ( ( 384 * i ) / ( num4 / 2 ) );
\r
4565 chip2.nチャンネル番号 = c;
\r
4566 chip2.n整数値 = index;
\r
4567 chip2.n整数値・内部番号 = index;
\r
4568 if( ( c >= 0x11 ) && ( c <= 0x1a ) )
\r
4570 chip2.e楽器パート = E楽器パート.DRUMS;
\r
4572 if( ( c >= 0x20 ) && ( c <= 0x27 ) )
\r
4574 chip2.e楽器パート = E楽器パート.GUITAR;
\r
4576 if( ( c >= 160 ) && ( c <= 0xa7 ) )
\r
4578 chip2.e楽器パート = E楽器パート.BASS;
\r
4580 if( chip2.bWAVを使うチャンネルである )
\r
4582 chip2.n整数値・内部番号 = this.n無限管理WAV[ index ];
\r
4584 else if( chip2.bBPMチップである )
\r
4586 chip2.n整数値・内部番号 = this.n無限管理BPM[ index ];
\r
4590 if( ( index > 0 ) && ( index != 2 ) )
\r
4592 chip2.n発声位置 -= 0x20;
\r
4594 else if( index == 2 )
\r
4596 chip2.n発声位置 += 0x20;
\r
4599 this.listChip.Add( chip2 );
\r
4605 #region [#23880 2010.12.30 yyagi: コンマとスペースの両方を小数点として扱うTryParse]
\r
4607 /// 小数点としてコンマとピリオドの両方を受け付けるTryParse()
\r
4609 /// <param name="s">strings convert to double</param>
\r
4610 /// <param name="result">parsed double value</param>
\r
4611 /// <returns>s が正常に変換された場合は true。それ以外の場合は false。</returns>
\r
4612 /// <exception cref="ArgumentException">style が NumberStyles 値でないか、style に NumberStyles.AllowHexSpecifier 値が含まれている</exception>
\r
4613 private bool TryParse(string s, out double result) { // #23880 2010.12.30 yyagi: alternative TryParse to permit both '.' and ',' for decimal point
\r
4614 // EU諸国での #BPM 123,45 のような記述に対応するため、
\r
4615 // 小数点の最終位置を検出して、それをlocaleにあった
\r
4616 // 文字に置き換えてからTryParse()する
\r
4619 const string DecimalSeparators = ".,"; // 小数点文字
\r
4620 const string GroupSeparators = ".,' "; // 桁区切り文字
\r
4621 const string NumberSymbols = "0123456789"; // 数値文字
\r
4623 int len = s.Length; // 文字列長
\r
4624 int decimalPosition = len; // 真の小数点の位置 最初は文字列終端位置に仮置きする
\r
4626 for (int i = 0; i < len; i++) { // まず、真の小数点(一番最後に現れる小数点)の位置を求める
\r
4628 if (NumberSymbols.IndexOf(c) >= 0) { // 数値だったらスキップ
\r
4630 } else if (DecimalSeparators.IndexOf(c) >= 0) { // 小数点文字だったら、その都度位置を上書き記憶
\r
4631 decimalPosition = i;
\r
4632 } else if (GroupSeparators.IndexOf(c) >= 0) { // 桁区切り文字の場合もスキップ
\r
4634 } else { // 数値・小数点・区切り文字以外がきたらループ終了
\r
4639 StringBuilder decimalStr = new StringBuilder(16);
\r
4640 for (int i = 0; i < len; i++) { // 次に、localeにあった数値文字列を生成する
\r
4642 if (NumberSymbols.IndexOf(c) >= 0) { // 数値だったら
\r
4643 decimalStr.Append(c); // そのままコピー
\r
4644 } else if (DecimalSeparators.IndexOf(c) >= 0) { // 小数点文字だったら
\r
4645 if (i == decimalPosition) { // 最後に出現した小数点文字なら、localeに合った小数点を出力する
\r
4646 decimalStr.Append(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
\r
4648 } else if (GroupSeparators.IndexOf(c) >= 0) { // 桁区切り文字だったら
\r
4649 continue; // 何もしない(スキップ)
\r
4654 return double.TryParse(decimalStr.ToString(), out result); // 最後に、自分のlocale向けの文字列に対してTryParse実行
\r
4657 //-----------------
\r