| 100 |
get; |
get; |
| 101 |
set; |
set; |
| 102 |
} |
} |
| 103 |
public static int nPerfect範囲ms |
#region [ 入力範囲ms ] |
| 104 |
|
public static int nPerfect範囲ms |
| 105 |
{ |
{ |
| 106 |
get |
get |
| 107 |
{ |
{ |
| 160 |
} |
} |
| 161 |
return ConfigIni.nヒット範囲ms.Poor; |
return ConfigIni.nヒット範囲ms.Poor; |
| 162 |
} |
} |
| 163 |
} |
} |
| 164 |
public static CPad Pad |
#endregion |
| 165 |
|
public static CPad Pad |
| 166 |
{ |
{ |
| 167 |
get; |
get; |
| 168 |
private set; |
private set; |
| 325 |
{ |
{ |
| 326 |
get { return base.Window.Handle; } |
get { return base.Window.Handle; } |
| 327 |
} |
} |
| 328 |
|
public static CDTXVmode DTXVmode // #28821 2014.1.23 yyagi |
| 329 |
|
{ |
| 330 |
|
get; |
| 331 |
|
set; |
| 332 |
|
} |
| 333 |
|
|
| 334 |
// コンストラクタ |
// コンストラクタ |
| 335 |
|
|
| 570 |
} |
} |
| 571 |
#endregion |
#endregion |
| 572 |
|
|
| 573 |
|
#region [ DTXCreatorからの指示 ] |
| 574 |
|
if ( this.Window.IsReceivedMessage ) // ウインドウメッセージで、 |
| 575 |
|
{ |
| 576 |
|
string strMes = this.Window.strMessage; |
| 577 |
|
this.Window.IsReceivedMessage = false; |
| 578 |
|
|
| 579 |
|
if ( strMes != null ) |
| 580 |
|
{ |
| 581 |
|
//Debug.WriteLine( "msg arg=" + strMes ); |
| 582 |
|
DTXVmode.ParseArguments( strMes ); |
| 583 |
|
|
| 584 |
|
if ( DTXVmode.Enabled ) |
| 585 |
|
{ |
| 586 |
|
//Debug.WriteLine( "DTXV mode is enabled," ); |
| 587 |
|
bコンパクトモード = true; |
| 588 |
|
strコンパクトモードファイル = DTXVmode.filename; |
| 589 |
|
} |
| 590 |
|
} |
| 591 |
|
} |
| 592 |
|
#endregion |
| 593 |
|
|
| 594 |
this.Device.BeginScene(); |
this.Device.BeginScene(); |
| 595 |
this.Device.Clear(ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0); |
this.Device.Clear(ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0); |
| 596 |
|
|
| 1137 |
case CStage.Eステージ.演奏: |
case CStage.Eステージ.演奏: |
| 1138 |
#region [ *** ] |
#region [ *** ] |
| 1139 |
//----------------------------- |
//----------------------------- |
| 1140 |
|
|
| 1141 |
|
#region [ DTXVモード中にDTXCreatorから指示を受けた場合の処理 ] |
| 1142 |
|
if ( DTXVmode.Enabled && DTXVmode.Refreshed ) |
| 1143 |
|
{ |
| 1144 |
|
DTXVmode.Refreshed = false; |
| 1145 |
|
|
| 1146 |
|
if ( DTXVmode.Command == CDTXVmode.ECommand.Stop ) |
| 1147 |
|
{ |
| 1148 |
|
if ( !ConfigIni.bギタレボモード ) |
| 1149 |
|
{ |
| 1150 |
|
CDTXMania.stage演奏ドラム画面.t停止(); |
| 1151 |
|
} |
| 1152 |
|
else |
| 1153 |
|
{ |
| 1154 |
|
CDTXMania.stage演奏ギター画面.t停止(); |
| 1155 |
|
} |
| 1156 |
|
} |
| 1157 |
|
else if ( DTXVmode.Command == CDTXVmode.ECommand.Play ) |
| 1158 |
|
{ |
| 1159 |
|
if ( DTXVmode.NeedReload ) |
| 1160 |
|
{ |
| 1161 |
|
if ( !ConfigIni.bギタレボモード ) |
| 1162 |
|
{ |
| 1163 |
|
CDTXMania.stage演奏ドラム画面.t再読込(); |
| 1164 |
|
} |
| 1165 |
|
else |
| 1166 |
|
{ |
| 1167 |
|
CDTXMania.stage演奏ギター画面.t再読込(); |
| 1168 |
|
} |
| 1169 |
|
} |
| 1170 |
|
else |
| 1171 |
|
{ |
| 1172 |
|
if ( !ConfigIni.bギタレボモード ) |
| 1173 |
|
{ |
| 1174 |
|
CDTXMania.stage演奏ドラム画面.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar ); |
| 1175 |
|
} |
| 1176 |
|
else |
| 1177 |
|
{ |
| 1178 |
|
CDTXMania.stage演奏ギター画面.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar ); |
| 1179 |
|
} |
| 1180 |
|
} |
| 1181 |
|
} |
| 1182 |
|
} |
| 1183 |
|
#endregion |
| 1184 |
|
|
| 1185 |
switch( this.n進行描画の戻り値 ) |
switch( this.n進行描画の戻り値 ) |
| 1186 |
{ |
{ |
| 1187 |
|
case (int) E演奏画面の戻り値.再読込・再演奏: |
| 1188 |
|
#region [ DTXファイルを再読み込みして、再演奏 ] |
| 1189 |
|
DTX.t全チップの再生停止(); |
| 1190 |
|
DTX.On非活性化(); |
| 1191 |
|
r現在のステージ.On非活性化(); |
| 1192 |
|
stage曲読み込み.On活性化(); |
| 1193 |
|
r直前のステージ = r現在のステージ; |
| 1194 |
|
r現在のステージ = stage曲読み込み; |
| 1195 |
|
this.tガベージコレクションを実行する(); |
| 1196 |
|
break; |
| 1197 |
|
#endregion |
| 1198 |
|
|
| 1199 |
|
//case (int) E演奏画面の戻り値.再演奏: |
| 1200 |
|
#region [ 再読み込み無しで、再演奏 ] |
| 1201 |
|
#endregion |
| 1202 |
|
// break; |
| 1203 |
|
|
| 1204 |
case (int) E演奏画面の戻り値.継続: |
case (int) E演奏画面の戻り値.継続: |
| 1205 |
break; |
break; |
| 1206 |
|
|
| 1656 |
private List<CActivity> listトップレベルActivities; |
private List<CActivity> listトップレベルActivities; |
| 1657 |
public int n進行描画の戻り値; |
public int n進行描画の戻り値; |
| 1658 |
private MouseButtons mb = System.Windows.Forms.MouseButtons.Left; |
private MouseButtons mb = System.Windows.Forms.MouseButtons.Left; |
| 1659 |
private string strWindowTitle = ""; |
private string strWindowTitle |
| 1660 |
|
{ |
| 1661 |
|
get |
| 1662 |
|
{ |
| 1663 |
|
if ( DTXVmode.Enabled ) |
| 1664 |
|
{ |
| 1665 |
|
return "DTXViewer release " + VERSION; |
| 1666 |
|
} |
| 1667 |
|
else |
| 1668 |
|
{ |
| 1669 |
|
return "DTXMania .NET style release " + VERSION; |
| 1670 |
|
} |
| 1671 |
|
} |
| 1672 |
|
} |
| 1673 |
|
|
| 1674 |
private void t起動処理() |
private void t起動処理() |
| 1675 |
{ |
{ |
| 1736 |
Trace.TraceInformation( "CLR Version: " + Environment.Version.ToString() ); |
Trace.TraceInformation( "CLR Version: " + Environment.Version.ToString() ); |
| 1737 |
//--------------------- |
//--------------------- |
| 1738 |
#endregion |
#endregion |
| 1739 |
#region [ コンパクトモードスイッチの有無 ] |
#region [ DTXVmodeクラス の初期化 ] |
| 1740 |
|
//--------------------- |
| 1741 |
|
//Trace.TraceInformation( "DTXVモードの初期化を行います。" ); |
| 1742 |
|
//Trace.Indent(); |
| 1743 |
|
try |
| 1744 |
|
{ |
| 1745 |
|
DTXVmode = new CDTXVmode(); |
| 1746 |
|
DTXVmode.Enabled = false; |
| 1747 |
|
//Trace.TraceInformation( "DTXVモードの初期化を完了しました。" ); |
| 1748 |
|
} |
| 1749 |
|
finally |
| 1750 |
|
{ |
| 1751 |
|
//Trace.Unindent(); |
| 1752 |
|
} |
| 1753 |
|
//--------------------- |
| 1754 |
|
#endregion |
| 1755 |
|
#region [ コンパクトモードスイッチの有無、もしくは、DTXViewerとしての起動 ] |
| 1756 |
//--------------------- |
//--------------------- |
| 1757 |
bコンパクトモード = false; |
bコンパクトモード = false; |
| 1758 |
strコンパクトモードファイル = ""; |
strコンパクトモードファイル = ""; |
| 1760 |
if( ( commandLineArgs != null ) && ( commandLineArgs.Length > 1 ) ) |
if( ( commandLineArgs != null ) && ( commandLineArgs.Length > 1 ) ) |
| 1761 |
{ |
{ |
| 1762 |
bコンパクトモード = true; |
bコンパクトモード = true; |
| 1763 |
strコンパクトモードファイル = commandLineArgs[ 1 ]; |
string arg = ""; |
| 1764 |
Trace.TraceInformation( "コンパクトモードで起動します。[{0}]", strコンパクトモードファイル ); |
|
| 1765 |
|
for ( int i = 1; i < commandLineArgs.Length; i++ ) |
| 1766 |
|
{ |
| 1767 |
|
if ( i != 1 ) |
| 1768 |
|
{ |
| 1769 |
|
arg += " " + "\"" + commandLineArgs[ i ] + "\""; |
| 1770 |
|
} |
| 1771 |
|
else |
| 1772 |
|
{ |
| 1773 |
|
arg += commandLineArgs[ i ]; |
| 1774 |
|
} |
| 1775 |
|
} |
| 1776 |
|
DTXVmode.ParseArguments( arg ); |
| 1777 |
|
|
| 1778 |
|
if ( DTXVmode.Enabled ) |
| 1779 |
|
{ |
| 1780 |
|
DTXVmode.Refreshed = false; // 初回起動時は再読み込みに走らせない |
| 1781 |
|
strコンパクトモードファイル = DTXVmode.filename; |
| 1782 |
|
} |
| 1783 |
|
else // 通常のコンパクトモード |
| 1784 |
|
{ |
| 1785 |
|
strコンパクトモードファイル = commandLineArgs[ 1 ]; |
| 1786 |
|
} |
| 1787 |
|
|
| 1788 |
|
if ( !File.Exists( strコンパクトモードファイル ) ) // #32985 2014.1.23 yyagi |
| 1789 |
|
{ |
| 1790 |
|
Trace.TraceError( "コンパクトモードで指定されたファイルが見つかりません。DTXManiaを終了します。[{0}]", strコンパクトモードファイル ); |
| 1791 |
|
#if DEBUG |
| 1792 |
|
Environment.Exit( -1 ); |
| 1793 |
|
#else |
| 1794 |
|
throw new FileNotFoundException( "コンパクトモードで指定されたファイルが見つかりません。DTXManiaを終了します。", strコンパクトモードファイル ); |
| 1795 |
|
#endif |
| 1796 |
|
} |
| 1797 |
|
if ( DTXVmode.Enabled ) |
| 1798 |
|
{ |
| 1799 |
|
Trace.TraceInformation( "DTXVモードで起動します。[{0}]", strコンパクトモードファイル ); |
| 1800 |
|
} |
| 1801 |
|
else |
| 1802 |
|
{ |
| 1803 |
|
Trace.TraceInformation( "コンパクトモードで起動します。[{0}]", strコンパクトモードファイル ); |
| 1804 |
|
} |
| 1805 |
} |
} |
| 1806 |
//--------------------- |
//--------------------- |
| 1807 |
#endregion |
#endregion |
| 1808 |
|
|
| 1809 |
#region [ ウィンドウ初期化 ] |
#region [ ウィンドウ初期化 ] |
| 1810 |
//--------------------- |
//--------------------- |
|
this.strWindowTitle = "DTXMania .NET style release " + VERSION; |
|
| 1811 |
base.Window.StartPosition = FormStartPosition.Manual; // #30675 2013.02.04 ikanick add |
base.Window.StartPosition = FormStartPosition.Manual; // #30675 2013.02.04 ikanick add |
| 1812 |
base.Window.Location = new Point(ConfigIni.n初期ウィンドウ開始位置X, ConfigIni.n初期ウィンドウ開始位置Y); // #30675 2013.02.04 ikanick add |
base.Window.Location = new Point( ConfigIni.n初期ウィンドウ開始位置X, ConfigIni.n初期ウィンドウ開始位置Y ); // #30675 2013.02.04 ikanick add |
| 1813 |
|
|
| 1814 |
|
base.Window.Text = this.strWindowTitle; // 事前にDTXVmodeの実体を作っておくこと |
| 1815 |
|
|
| 1816 |
|
|
| 1817 |
|
base.Window.StartPosition = FormStartPosition.Manual; // #30675 2013.02.04 ikanick add |
| 1818 |
|
base.Window.Location = new Point( ConfigIni.n初期ウィンドウ開始位置X, ConfigIni.n初期ウィンドウ開始位置Y ); // #30675 2013.02.04 ikanick add |
| 1819 |
|
|
|
base.Window.Text = this.strWindowTitle; |
|
| 1820 |
base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #34510 yyagi 2010.10.31 to change window size got from Config.ini |
base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #34510 yyagi 2010.10.31 to change window size got from Config.ini |
| 1821 |
#if !WindowedFullscreen |
#if !WindowedFullscreen |
| 1822 |
if (!ConfigIni.bウィンドウモード) // #23510 2010.11.02 yyagi: add; to recover window size in case bootup with fullscreen mode |
if (!ConfigIni.bウィンドウモード) // #23510 2010.11.02 yyagi: add; to recover window size in case bootup with fullscreen mode |
| 2056 |
0, |
0, |
| 2057 |
CDTXMania.ConfigIni.nASIODevice |
CDTXMania.ConfigIni.nASIODevice |
| 2058 |
); |
); |
| 2059 |
AddSoundTypeToWindowTitle(); |
ShowWindowTitleWithSoundType(); |
| 2060 |
FDK.CSound管理.bIsTimeStretch = CDTXMania.ConfigIni.bTimeStretch; |
FDK.CSound管理.bIsTimeStretch = CDTXMania.ConfigIni.bTimeStretch; |
| 2061 |
Trace.TraceInformation("サウンドデバイスの初期化を完了しました。"); |
Trace.TraceInformation("サウンドデバイスの初期化を完了しました。"); |
| 2062 |
} |
} |
| 2206 |
//--------------------- |
//--------------------- |
| 2207 |
#endregion |
#endregion |
| 2208 |
} |
} |
| 2209 |
public void AddSoundTypeToWindowTitle() |
public void ShowWindowTitleWithSoundType() |
| 2210 |
{ |
{ |
| 2211 |
string delay = ""; |
string delay = ""; |
| 2212 |
if (Sound管理.GetCurrentSoundDeviceType() != "DirectSound") |
if (Sound管理.GetCurrentSoundDeviceType() != "DirectSound") |
| 2484 |
// if ( ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.16 yyagi ギターベースがスワップしているときは元に戻す |
// if ( ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.16 yyagi ギターベースがスワップしているときは元に戻す |
| 2485 |
if ( ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped ) // #24415 2011.2.21 yyagi FLIP中かつ演奏中にalt-f4で終了したときは、AUTOのフラグをswapして戻す |
if ( ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped ) // #24415 2011.2.21 yyagi FLIP中かつ演奏中にalt-f4で終了したときは、AUTOのフラグをswapして戻す |
| 2486 |
{ |
{ |
| 2487 |
ConfigIni.SwapGuitarBassInfos_AutoFlags(); |
ConfigIni.SwapGuitarBassInfos_AutoFlags(); |
| 2488 |
} |
} |
| 2489 |
string str = strEXEのあるフォルダ + "Config.ini"; |
string str = strEXEのあるフォルダ + "Config.ini"; |
| 2490 |
Trace.Indent(); |
Trace.Indent(); |
| 2491 |
try |
try |
| 2492 |
{ |
{ |
| 2493 |
ConfigIni.t書き出し( str ); |
if ( DTXVmode.Enabled ) |
| 2494 |
Trace.TraceInformation( "保存しました。({0})", new object[] { str } ); |
{ |
| 2495 |
|
Trace.TraceInformation( "DTXVモードだったため、Config.iniは保存しません。" ); |
| 2496 |
|
} |
| 2497 |
|
else |
| 2498 |
|
{ |
| 2499 |
|
ConfigIni.t書き出し( str ); |
| 2500 |
|
Trace.TraceInformation( "保存しました。({0})", str ); |
| 2501 |
|
} |
| 2502 |
} |
} |
| 2503 |
catch( Exception e ) |
catch( Exception e ) |
| 2504 |
{ |
{ |
| 2505 |
Trace.TraceError( e.Message ); |
Trace.TraceError( e.Message ); |
| 2506 |
Trace.TraceError( "Config.ini の出力に失敗しました。({0})", new object[] { str } ); |
Trace.TraceError( "Config.ini の出力に失敗しました。({0})", str ); |
| 2507 |
} |
} |
| 2508 |
finally |
finally |
| 2509 |
{ |
{ |
| 2511 |
} |
} |
| 2512 |
//--------------------- |
//--------------------- |
| 2513 |
#endregion |
#endregion |
| 2514 |
|
#region [ DTXVmodeの終了処理 ] |
| 2515 |
|
//--------------------- |
| 2516 |
|
//Trace.TraceInformation( "DTXVモードの終了処理を行います。" ); |
| 2517 |
|
//Trace.Indent(); |
| 2518 |
|
try |
| 2519 |
|
{ |
| 2520 |
|
if ( DTXVmode != null ) |
| 2521 |
|
{ |
| 2522 |
|
DTXVmode = null; |
| 2523 |
|
//Trace.TraceInformation( "DTXVモードの終了処理を完了しました。" ); |
| 2524 |
|
} |
| 2525 |
|
else |
| 2526 |
|
{ |
| 2527 |
|
//Trace.TraceInformation( "DTXVモードは使用されていません。" ); |
| 2528 |
|
} |
| 2529 |
|
} |
| 2530 |
|
finally |
| 2531 |
|
{ |
| 2532 |
|
//Trace.Unindent(); |
| 2533 |
|
} |
| 2534 |
|
//--------------------- |
| 2535 |
|
#endregion |
| 2536 |
Trace.TraceInformation("アプリケーションの終了処理を完了しました。"); |
Trace.TraceInformation("アプリケーションの終了処理を完了しました。"); |
| 2537 |
|
|
| 2538 |
|
|